2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-30 22:05:27 +00:00

parser: added nosymfollow mount option

Adds the corresponding `MS_NOSYMFOLLOW` flag to parser/mount.h as well,
defined as (1 << 8) just as in the util-linux and the kernel.

Signed-off-by: Oliver Calder <oliver.calder@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
Oliver Calder
2023-04-11 15:05:47 -05:00
committed by John Johansen
parent 257b3cfbf6
commit 231c469d86
2 changed files with 10 additions and 1 deletions

View File

@@ -98,6 +98,9 @@
* nomand
* #define MS_DIRSYNC 128 Directory modifications are synchronous
* dirsync
* #define MS_NOSYMFOLLOW 256 Do not follow symlinks
* symfollow
* nosymfollow
* #define MS_NOATIME 1024 Do not update access times
* noatime
* atime
@@ -249,6 +252,8 @@ static struct mnt_keyword_table mnt_opts_table[] = {
{"mand", MS_MAND, 0},
{"nomand", 0, MS_MAND},
{"dirsync", MS_DIRSYNC, 0},
{"symfollow", 0, MS_NOSYMFOLLOW},
{"nosymfollow", MS_NOSYMFOLLOW, 0},
{"atime", 0, MS_NOATIME},
{"noatime", MS_NOATIME, 0},
{"diratime", 0, MS_NODIRATIME},

View File

@@ -40,6 +40,8 @@
#define MS_MAND (1 << 6)
#define MS_NOMAND 0
#define MS_DIRSYNC (1 << 7)
#define MS_SYMFOLLOW 0
#define MS_NOSYMFOLLOW (1 << 8)
#define MS_NODIRSYNC 0
#define MS_NOATIME (1 << 10)
#define MS_ATIME 0
@@ -76,12 +78,14 @@
#define MS_ALL_FLAGS (MS_RDONLY | MS_NOSUID | MS_NODEV | MS_NOEXEC | \
MS_SYNC | MS_REMOUNT | MS_MAND | MS_DIRSYNC | \
MS_NOSYMFOLLOW | \
MS_NOATIME | MS_NODIRATIME | MS_BIND | MS_RBIND | \
MS_MOVE | MS_VERBOSE | MS_ACL | \
MS_UNBINDABLE | MS_RUNBINDABLE | \
MS_PRIVATE | MS_RPRIVATE | \
MS_SLAVE | MS_RSLAVE | MS_SHARED | MS_RSHARED | \
MS_RELATIME | MS_IVERSION | MS_STRICTATIME | MS_LAZYTIME | MS_USER)
MS_RELATIME | MS_IVERSION | MS_STRICTATIME | \
MS_LAZYTIME | MS_USER)
/* set of flags we don't use but define (but not with the kernel values)
* for MNT_FLAGS