HomeFreeBSD

Don't perform ACL-to-mode translation on empty ACL

Description

Don't perform ACL-to-mode translation on empty ACL

In zfs_acl_chown_setattr(), the zfs_mode_comput() function is used to
create a traditional mode value based on an ACL. If no ACL exists, this
processing shouldn't be done. Problems caused by this were most evident
on version 4 filesystems which not only don't have system attributes,
and also frequently have empty ACLs. On such filesystems, performing a
chown() operation could have the effect of dirtying the mode bits in
memory but not on the file system as follows:

  1. create a file with typical mode of 664

echo test > test
chown anyuser test
ls -l test

and the mode will show up as all zeroes. Unmounting/mounting and/or
exporting/importing the filesystem will reveal the proper mode again.

Signed-off-by: Tim Chase <tim@chase2k.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #1264

Details

Provenance
Tim Chase <tim@chase2k.com>Authored on Oct 7 2014, 1:01 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Oct 21 2014, 4:23 PM
Parents
rG62bdd5eb7a35: Illumos 4924 - LZ4 Compression for metadata
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG356d9ed4c81d: Don't perform ACL-to-mode translation on empty ACL (authored by Tim Chase <tim@chase2k.com>).Oct 21 2014, 4:23 PM