blib/lib/Config/Model/models/Fstab/CommonOptions.pl

filter: Statementstmt 100% 12 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 16 / 16 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« blib/lib/Config/Model/models/Fstab.pl ↑ Summary blib/lib/Config/Model/models/Fstab/Ext2FsOpt.pl »
1 #
2 # This file is part of Config-Model
3 #
4 # This software is Copyright (c) 2005-2022 by Dominique Dumont.
5 #
6 # This is free software, licensed under:
7 #
8 # The GNU Lesser General Public License, Version 2.1, February 1999
9 #
10 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 2 ▶use v5.20;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 2 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15 return [
16 {
17 2 'accept' => [
18 'X-[\w.-]*',
19 {
20 'description' => 'All options prefixed with "X-" are interpreted as comments or as userspace application-specific options. These options are not stored in user space (e.g., mtab file), nor sent to the mount.type helpers nor to the mount(2) system call. The suggested format is X-appname.option.',
21 'type' => 'leaf',
22 'value_type' => 'uniline'
23 },
24 'x-[\w.-]*',
25 {
26 'description' => "=pod
27  
28 The same as X-* options, but stored permanently in user space. This
29 means the options are also available for umount(8) or other
30 operations. Note that maintaining mount options in user space is
31 tricky, because it\x{2019}s necessary to use libmount-based tools and there
32 is no guarantee that the options will be always available (for example
33 after a move mount operation or in unshared namespace).
34  
35 Note that before util-linux v2.30 the x-* options have not been
36 maintained by libmount and stored in user space (functionality was the
37 same as for X-* now), but due to the growing number of use-cases (in
38 initrd, systemd etc.) the functionality has been extended to keep
39 existing fstab configurations usable without a change.
40  
41 ",
42 'type' => 'leaf',
43 'value_type' => 'uniline'
44 }
45 ],
46 'author' => [
47 'Dominique Dumont'
48 ],
49 'class_description' => 'options valid for all types of file systems.',
50 'copyright' => [
51 '2010,2011 Dominique Dumont'
52 ],
53 'element' => [
54 'async',
55 {
56 'description' => 'All I/O to the filesystem should be done asynchronously. (See also the sync option.)
57 ',
58 'type' => 'leaf',
59 'value_type' => 'boolean'
60 },
61 'atime',
62 {
63 'description' => 'Do not use the noatime feature, so the inode access time is controlled by kernel defaults. See also the descriptions of the relatime and strictatime mount options.',
64 'type' => 'leaf',
65 'value_type' => 'boolean'
66 },
67 'auto',
68 {
69 'description' => 'Can be mounted with the -a option of C<mount> command',
70 'type' => 'leaf',
71 'value_type' => 'boolean'
72 },
73 'context',
74 {
75 'description' => '=pod
76  
77 The C<context=> option is useful when mounting filesystems that do not
78 support extended attributes, such as a floppy or hard disk formatted
79 with VFAT, or systems that are not normally running under SELinux,
80 such as an ext3 or ext4 formatted disk from a non-SELinux
81 workstation. You can also use C<context=> on filesystems you do not
82 trust, such as a floppy. It also helps in compatibility with
83 xattr-supporting filesystems on earlier 2.4.x kernel versions. Even
84 where xattrs are supported, you can save time not having to label
85 every file by assigning the entire disk one security context.
86  
87 A commonly used option for removable media is C<context="system_u:object_r:removable_t>.
88 ',
89 'type' => 'leaf',
90 'value_type' => 'uniline'
91 },
92 'fscontext',
93 {
94 'description' => '=pod
95  
96 The C<fscontext=> option works for all filesystems, regardless of their
97 xattr support. The fscontext option sets the overarching filesystem
98 label to a specific security context. This filesystem label is
99 separate from the individual labels on the files. It represents the
100 entire filesystem for certain kinds of permission checks, such as
101 during mount or file creation. Individual file labels are still
102 obtained from the xattrs on the files themselves. The context option
103 actually sets the aggregate context that fscontext provides, in
104 addition to supplying the same label for individual files.
105 ',
106 'type' => 'leaf',
107 'value_type' => 'uniline'
108 },
109 'defcontext',
110 {
111 'description' => 'You can set the default security context for unlabeled files using C<defcontext=> option. This overrides the value set for unlabeled files in the policy and requires a filesystem that supports xattr labeling.',
112 'type' => 'leaf',
113 'value_type' => 'uniline'
114 },
115 'rootcontext',
116 {
117 'description' => 'The C<rootcontext=> option allows you to explicitly label the root inode of a FS being mounted before that FS or inode becomes visible to userspace. This was found to be useful for things like stateless Linux. The special value C<@target> can be used to assign the current context of the target mountpoint location.',
118 'type' => 'leaf',
119 'value_type' => 'uniline'
120 },
121 'defaults',
122 {
123 'description' => 'Use the default options: rw, suid, dev, exec, auto, nouser, and async.
124  
125 Note that the real set of all default mount options depends on the kernel and filesystem type. See the beginning of this section for more details.',
126 'help' => {
127 '1' => 'option equivalent to rw, suid, dev, exec, auto, nouser, and async'
128 },
129 'type' => 'leaf',
130 'value_type' => 'boolean'
131 },
132 'dev',
133 {
134 'description' => 'Interpret character or block special devices on the filesystem.',
135 'type' => 'leaf',
136 'value_type' => 'boolean'
137 },
138 'diratime',
139 {
140 'description' => 'Update directory inode access times on this filesystem. This is the default. (This option is ignored when noatime is set.)',
141 'type' => 'leaf',
142 'upstream_default' => '1',
143 'value_type' => 'boolean'
144 },
145 'dirsync',
146 {
147 'description' => 'All directory updates within the filesystem should be done synchronously. This affects the following system calls: C<creat(2)>, C<link(2)>, C<unlink(2)>, C<symlink(2)>, C<mkdir(2)>, C<rmdir(2)>, C<mknod(2)> and C<rename(2)>.
148 ',
149 'type' => 'leaf',
150 'upstream_default' => '1',
151 'value_type' => 'boolean'
152 },
153 'exec',
154 {
155 'description' => 'Permit execution of binaries.',
156 'type' => 'leaf',
157 'value_type' => 'boolean'
158 },
159 'group',
160 {
161 'description' => "Allow an ordinary user to mount the filesystem if one of that user\x{2019}s groups matches the group of the device. This option implies the options nosuid and nodev (unless overridden by subsequent options, as in the option line group,dev,suid).",
162 'type' => 'leaf',
163 'value_type' => 'boolean'
164 },
165 'iversion',
166 {
167 'description' => 'Every time the inode is modified, the i_version field will be incremented.
168 ',
169 'type' => 'leaf',
170 'value_type' => 'boolean'
171 },
172 'mand',
173 {
174 'description' => 'Allow mandatory locks on this filesystem. See L<fcntl(2)>.
175 This option was deprecated in Linux 5.15.
176 ',
177 'type' => 'leaf',
178 'value_type' => 'boolean'
179 },
180 '_netdev',
181 {
182 'description' => 'The filesystem resides on a device that requires network access (used to prevent the system from attempting to mount these filesystems until the network has been enabled on the system).',
183 'type' => 'leaf',
184 'value_type' => 'boolean'
185 },
186 'nofail',
187 {
188 'description' => 'Do not report errors for this device if it does not exist.',
189 'type' => 'leaf',
190 'value_type' => 'boolean'
191 },
192 'relatime',
193 {
194 'description' => "=pod
195  
196 Update inode access times relative to modify or change time. Access
197 time is only updated if the previous access time was earlier than the
198 current modify or change time. (Similar to noatime, but it doesn\x{2019}t
199 break mutt(1) or other applications that need to know if a file has
200 been read since the last time it was modified.)
201  
202 Since Linux 2.6.30, the kernel defaults to the behavior provided by
203 this option (unless noatime was specified), and the strictatime option
204 is required to obtain traditional semantics. In addition, since Linux
205 2.6.30, the file\x{2019}s last access time is always updated if it is more
206 than 1 day old.
207 ",
208 'type' => 'leaf',
209 'value_type' => 'boolean'
210 },
211 'strictatime',
212 {
213 'description' => 'Allows to explicitly request full atime updates. This makes it possible for the kernel to default to relatime or noatime but still allow userspace to override it. For more details about the default system mount options see C</proc/mounts>.',
214 'type' => 'leaf',
215 'value_type' => 'boolean'
216 },
217 'lazytime',
218 {
219 'description' => '=pod
220  
221 Only update times (atime, mtime, ctime) on the in-memory version of
222 the file inode.
223  
224 This mount option significantly reduces writes to the inode table for
225 workloads that perform frequent random writes to preallocated files.
226  
227 The on-disk timestamps are updated only when:
228  
229 '.'=over
230  
231 '.'=item *
232  
233 the inode needs to be updated for some change unrelated to file timestamps
234  
235 '.'=item *
236  
237 the application employs fsync(2), syncfs(2), or sync(2)
238  
239 '.'=item *
240  
241 an undeleted inode is evicted from memory
242  
243 '.'=item *
244  
245 more than 24 hours have passed since the inode was written to disk.
246  
247 '.'=back
248 ',
249 'type' => 'leaf',
250 'value_type' => 'boolean'
251 },
252 'suid',
253 {
254 'description' => 'Honor set-user-ID and set-group-ID bits or file capabilities when executing programs from this filesystem.',
255 'type' => 'leaf',
256 'value_type' => 'boolean'
257 },
258 'silent',
259 {
260 'description' => 'Turn on the silent flag.
261 ',
262 'type' => 'leaf',
263 'value_type' => 'boolean'
264 },
265 'loud',
266 {
267 'description' => 'Turn off the silent flag.
268  
269 ',
270 'type' => 'leaf',
271 'value_type' => 'boolean'
272 },
273 'owner',
274 {
275 'description' => 'Allow an ordinary user to mount the filesystem if that user is the owner of the device. This option implies the options nosuid and nodev (unless overridden by subsequent options, as in the option line owner,dev,suid).',
276 'type' => 'leaf',
277 'value_type' => 'boolean'
278 },
279 'rw',
280 {
281 'description' => 'Mount the filesystem read-write.',
282 'help' => {
283 '0' => 'read-only file system'
284 },
285 'type' => 'leaf',
286 'value_type' => 'boolean'
287 },
288 'sync',
289 {
290 'description' => 'All I/O to the filesystem should be done synchronously. In the case of media with a limited number of write cycles (e.g. some flash drives), sync may cause life-cycle shortening.',
291 'type' => 'leaf',
292 'value_type' => 'boolean'
293 },
294 'user',
295 {
296 'description' => 'Allow an ordinary user to mount the filesystem. The name of the mounting user is written to the mtab file (or to the private libmount file in /run/mount on systems without a regular mtab) so that this same user can unmount the filesystem again. This option implies the options noexec, nosuid, and nodev (unless overridden by subsequent options, as in the option line user,exec,dev,suid).',
297 'help' => {
298 '0' => 'Only root can mount the file system',
299 '1' => 'user can mount the file system'
300 },
301 'type' => 'leaf',
302 'value_type' => 'boolean'
303 },
304 'users',
305 {
306 'description' => 'Allow any user to mount and to unmount the filesystem, even when some other ordinary user mounted it. This option implies the options noexec, nosuid, and nodev (unless overridden by subsequent options, as in the option line users,exec,dev,suid).',
307 'help' => {
308 '0' => 'Only root can mount the file system',
309 '1' => 'user can mount the file system'
310 },
311 'type' => 'leaf',
312 'value_type' => 'boolean'
313 },
314 'nosymfollow',
315 {
316 'description' => 'Do not follow symlinks when resolving paths. Symlinks can still be created, and readlink(1), readlink(2), realpath(1), and realpath(3) all still work properly.',
317 'type' => 'leaf',
318 'value_type' => 'boolean'
319 }
320 ],
321 'license' => 'LGPL2',
322 'name' => 'Fstab::CommonOptions'
323 }
324 ]
325 ;
« blib/lib/Config/Model/models/Fstab.pl ↑ Summary blib/lib/Config/Model/models/Fstab/Ext2FsOpt.pl »