2016-09-20 08:45:15 -05:00
|
|
|
#ifndef UTIL_LINUX_FINDMNT_H
|
|
|
|
#define UTIL_LINUX_FINDMNT_H
|
|
|
|
|
|
|
|
/* flags */
|
|
|
|
enum {
|
|
|
|
FL_EVALUATE = (1 << 1),
|
|
|
|
FL_CANONICALIZE = (1 << 2),
|
|
|
|
FL_FIRSTONLY = (1 << 3),
|
|
|
|
FL_INVERT = (1 << 4),
|
|
|
|
FL_NOSWAPMATCH = (1 << 6),
|
|
|
|
FL_NOFSROOT = (1 << 7),
|
|
|
|
FL_SUBMOUNTS = (1 << 8),
|
|
|
|
FL_POLL = (1 << 9),
|
|
|
|
FL_DF = (1 << 10),
|
|
|
|
FL_ALL = (1 << 11),
|
|
|
|
FL_UNIQ = (1 << 12),
|
|
|
|
FL_BYTES = (1 << 13),
|
|
|
|
FL_NOCACHE = (1 << 14),
|
|
|
|
FL_STRICTTARGET = (1 << 15),
|
|
|
|
FL_VERBOSE = (1 << 16),
|
2018-05-08 13:08:47 -05:00
|
|
|
FL_PSEUDO = (1 << 17),
|
|
|
|
FL_REAL = (1 << 18),
|
findmnt: add option to list all fs-independent flags
It might be useful for security auditing purposes list all possible
mount flags/options including default set which are normally not listed.
This patch adds "--vfs-all" option to list all fs-independent flags
on VFS-OPTIONS column, as well as libmount funcionality to accomplish
it.
i.e.:
$ findmnt -o VFS-OPTIONS
VFS-OPTIONS
rw,relatime
rw,nosuid,nodev,noexec,relatime
rw,nosuid,nodev,noexec,relatime
ro,nosuid,nodev,noexec
...
$ findmnt --vfs-all -o VFS-OPTIONS
VFS-OPTIONS
rw,exec,suid,dev,async,loud,nomand,atime,noiversion,diratime,relatime,nostrictatime,nolazytime,symfollow
rw,noexec,nosuid,nodev,async,loud,nomand,atime,noiversion,diratime,relatime,nostrictatime,nolazytime,symfollow
rw,noexec,nosuid,nodev,async,loud,nomand,atime,noiversion,diratime,relatime,nostrictatime,nolazytime,symfollow
ro,noexec,nosuid,nodev,async,loud,nomand,atime,noiversion,diratime,norelatime,nostrictatime,nolazytime,symfollow
...
[kzak@redhat.com: - cleanup coding style and comments]
Signed-off-by: Roberto Bergantinos Corpas <rbergant@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
2021-01-12 04:58:53 -06:00
|
|
|
FL_VFS_ALL = (1 << 19),
|
2021-03-22 08:58:05 -05:00
|
|
|
FL_SHADOWED = (1 << 20),
|
2016-09-20 08:45:15 -05:00
|
|
|
|
|
|
|
/* basic table settings */
|
2021-03-22 08:58:05 -05:00
|
|
|
FL_ASCII = (1 << 21),
|
|
|
|
FL_RAW = (1 << 22),
|
|
|
|
FL_NOHEADINGS = (1 << 23),
|
|
|
|
FL_EXPORT = (1 << 24),
|
|
|
|
FL_TREE = (1 << 25),
|
|
|
|
FL_JSON = (1 << 26),
|
2016-09-20 08:45:15 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
extern struct libmnt_cache *cache;
|
|
|
|
extern int flags;
|
|
|
|
extern int parse_nerrors;
|
|
|
|
|
|
|
|
extern int is_listall_mode(void);
|
|
|
|
extern struct libmnt_fs *get_next_fs(struct libmnt_table *tb, struct libmnt_iter *itr);
|
|
|
|
extern int verify_table(struct libmnt_table *tb);
|
|
|
|
|
|
|
|
#endif /* UTIL_LINUX_FINDMNT_H */
|