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
This commit is contained in:
Pawel Jakub Dawidek 2005-01-15 17:09:53 +00:00
parent 70861d0ddd
commit 39cfb23935

View File

@ -279,6 +279,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.
*/