diff options
author | pjd <pjd@FreeBSD.org> | 2005-01-15 17:09:53 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2005-01-15 17:09:53 +0000 |
commit | a87efbfe91654abbf9a6a2f9a4f266d029551934 (patch) | |
tree | 224b5ba1a3e7e681613e532d20f15a07ec1e0416 /sys | |
parent | 4251591c3ff01576e2acad27e01e8f9d4ada062d (diff) | |
download | FreeBSD-src-a87efbfe91654abbf9a6a2f9a4f266d029551934.zip FreeBSD-src-a87efbfe91654abbf9a6a2f9a4f266d029551934.tar.gz |
Fix ACLs handling for the root file system.
Without this fix, when ACLs are set via tunefs(8) on the root file system,
they are removed on boot when 'mount -a' is called, because mount(8)
called for the root file system always add MNT_UPDATE flag and MNT_UPDATE
flag isn't perfect.
Now, one cannot remove ACLs stored in superblock (configured with tunefs(8))
via 'mount -a' nor 'mount -u -o noacls <file system>', but it is still
possible to mount file system which doesn't have ACLs in superblock via
'mount -o acls <file system>' or /etc/fstab's 'acls' option.
Reported by: Lech Lorens/pl.comp.os.bsd
Discussed with: phk, rwatson
Reviewed by: rwatson
MFC after: 2 weeks
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ufs/ffs/ffs_vfsops.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c index 9ca5ccd..50791c2 100644 --- a/sys/ufs/ffs/ffs_vfsops.c +++ b/sys/ufs/ffs/ffs_vfsops.c @@ -280,6 +280,11 @@ ffs_mount(struct mount *mp, struct thread *td) if (mp->mnt_flag & MNT_SOFTDEP) mp->mnt_flag &= ~MNT_ASYNC; /* + * Keep MNT_ACLS flag if it is stored in superblock. + */ + if ((fs->fs_flags & FS_ACLS) != 0) + mp->mnt_flag |= MNT_ACLS; + /* * If not updating name, process export requests. */ error = vfs_copyopt(mp->mnt_optnew, "export", &export, sizeof export); |