diff options
author | rwatson <rwatson@FreeBSD.org> | 2002-10-15 20:00:06 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2002-10-15 20:00:06 +0000 |
commit | e112f21cae55108a775ed54902155daf287fc1cb (patch) | |
tree | f7a07c45466c7dfee9128e7615e9fdd1daa66907 /sys/ufs | |
parent | 55f0babdd0feab7dc92e60db61494018f3d712de (diff) | |
download | FreeBSD-src-e112f21cae55108a775ed54902155daf287fc1cb.zip FreeBSD-src-e112f21cae55108a775ed54902155daf287fc1cb.tar.gz |
If the FS_MULTILABEL flag is set in a UFS or UFS2 superblock,
automatically set MNT_MULTILABEL in the mount flags.
If FS_ACLS is set in a UFS or UFS2 superblock, automatically
set MNT_ACLS in the mount flags.
If either of these flags is set, but the appropriate kernel option
to support the features associated with the flag isn't available,
then print a warning at mount-time.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories
Diffstat (limited to 'sys/ufs')
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 41b249c..76e243e 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -34,6 +34,7 @@ * $FreeBSD$ */ +#include "opt_mac.h" #include "opt_quota.h" #include "opt_ufs.h" @@ -729,6 +730,22 @@ ffs_mountfs(devvp, mp, td, malloctype) vfs_getnewfsid(mp); mp->mnt_maxsymlinklen = fs->fs_maxsymlinklen; mp->mnt_flag |= MNT_LOCAL; + if ((fs->fs_flags & FS_MULTILABEL) != 0) +#ifdef MAC + mp->mnt_flag |= MNT_MULTILABEL; +#else + printf( +"WARNING: %s: multilabel flag on fs but no MAC support\n", + fs->fs_fsmnt); +#endif + if ((fs->fs_flags & FS_ACLS) != 0) +#ifdef UFS_ACL + mp->mnt_flag |= MNT_ACLS; +#else + printf( +"WARNING: %s: ACLs flag on fs but no ACLs support\n", + fs->fs_fsmnt); +#endif ump->um_mountp = mp; ump->um_dev = dev; ump->um_devvp = devvp; |