diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 2001-11-05 10:33:45 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2001-11-05 10:33:45 +0000 |
| commit | 751a2cd05bfeb7d1948f912446187a063b251c19 (patch) | |
| tree | 7f6f014359fd4040035d296d37a4471acc8e4c33 /sys | |
| parent | a9dbc63dc2a2c6866b650af62ab04bc59da50d30 (diff) | |
Notes
Diffstat (limited to 'sys')
| -rw-r--r-- | sys/kern/vfs_extattr.c | 10 | ||||
| -rw-r--r-- | sys/kern/vfs_syscalls.c | 10 | ||||
| -rw-r--r-- | sys/sys/mount.h | 13 |
3 files changed, 15 insertions, 18 deletions
diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index cb82b0839359..696c92e37c56 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -365,14 +365,8 @@ update: mp->mnt_flag |= MNT_RDONLY; else if (mp->mnt_flag & MNT_RDONLY) mp->mnt_kern_flag |= MNTK_WANTRDWR; - mp->mnt_flag &=~ (MNT_NOSUID | MNT_NOEXEC | MNT_NODEV | - MNT_SYNCHRONOUS | MNT_UNION | MNT_ASYNC | MNT_NOATIME | - MNT_NOSYMFOLLOW | MNT_IGNORE | - MNT_NOCLUSTERR | MNT_NOCLUSTERW | MNT_SUIDDIR); - mp->mnt_flag |= fsflags & (MNT_NOSUID | MNT_NOEXEC | - MNT_NODEV | MNT_SYNCHRONOUS | MNT_UNION | MNT_ASYNC | MNT_FORCE | - MNT_NOSYMFOLLOW | MNT_IGNORE | - MNT_NOATIME | MNT_NOCLUSTERR | MNT_NOCLUSTERW | MNT_SUIDDIR); + mp->mnt_flag &=~ MNT_UPDATEMASK; + mp->mnt_flag |= fsflags & (MNT_UPDATEMASK | MNT_FORCE); /* * Mount the filesystem. * XXX The final recipients of VFS_MOUNT just overwrite the ndp they diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index cb82b0839359..696c92e37c56 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -365,14 +365,8 @@ update: mp->mnt_flag |= MNT_RDONLY; else if (mp->mnt_flag & MNT_RDONLY) mp->mnt_kern_flag |= MNTK_WANTRDWR; - mp->mnt_flag &=~ (MNT_NOSUID | MNT_NOEXEC | MNT_NODEV | - MNT_SYNCHRONOUS | MNT_UNION | MNT_ASYNC | MNT_NOATIME | - MNT_NOSYMFOLLOW | MNT_IGNORE | - MNT_NOCLUSTERR | MNT_NOCLUSTERW | MNT_SUIDDIR); - mp->mnt_flag |= fsflags & (MNT_NOSUID | MNT_NOEXEC | - MNT_NODEV | MNT_SYNCHRONOUS | MNT_UNION | MNT_ASYNC | MNT_FORCE | - MNT_NOSYMFOLLOW | MNT_IGNORE | - MNT_NOATIME | MNT_NOCLUSTERR | MNT_NOCLUSTERW | MNT_SUIDDIR); + mp->mnt_flag &=~ MNT_UPDATEMASK; + mp->mnt_flag |= fsflags & (MNT_UPDATEMASK | MNT_FORCE); /* * Mount the filesystem. * XXX The final recipients of VFS_MOUNT just overwrite the ndp they diff --git a/sys/sys/mount.h b/sys/sys/mount.h index 8b0d01200780..e2b856157c01 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -153,6 +153,7 @@ struct mount { #define MNT_SUIDDIR 0x00100000 /* special handling of SUID on dirs */ #define MNT_SOFTDEP 0x00200000 /* soft updates being done */ #define MNT_NOSYMFOLLOW 0x00400000 /* do not follow symlinks */ +#define MNT_JAILDEVFS 0x02000000 /* Jail friendly DEVFS behaviour */ #define MNT_NOATIME 0x10000000 /* disable update of file access time */ #define MNT_NOCLUSTERR 0x40000000 /* disable cluster read */ #define MNT_NOCLUSTERW 0x80000000 /* disable cluster write */ @@ -190,7 +191,16 @@ struct mount { MNT_LOCAL | MNT_USER | MNT_QUOTA | \ MNT_ROOTFS | MNT_NOATIME | MNT_NOCLUSTERR| \ MNT_NOCLUSTERW | MNT_SUIDDIR | MNT_SOFTDEP | \ - MNT_IGNORE | MNT_EXPUBLIC | MNT_NOSYMFOLLOW) + MNT_IGNORE | MNT_EXPUBLIC | MNT_NOSYMFOLLOW | \ + MNT_JAILDEVFS) + +/* Mask of flags that can be updated */ +#define MNT_UPDATEMASK (MNT_NOSUID | MNT_NOEXEC | MNT_NODEV | \ + MNT_SYNCHRONOUS | MNT_UNION | MNT_ASYNC | \ + MNT_NOATIME | \ + MNT_NOSYMFOLLOW | MNT_IGNORE | MNT_JAILDEVFS | \ + MNT_NOCLUSTERR | MNT_NOCLUSTERW | MNT_SUIDDIR) + /* * External filesystem command modifier flags. * Unmount can use the MNT_FORCE flag. @@ -206,7 +216,6 @@ struct mount { /* * Still available */ -#define MNT_SPARE1 0x02000000 #define MNT_SPARE2 0x04000000 #define MNT_SPARE3 0x08000000 /* |
