diff options
author | Tim Chase <[email protected]> | 2014-01-18 10:46:43 -0600 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2014-01-23 11:07:29 -0800 |
commit | 4461aa6118fa55dc83f5d75c6d428767c3634fba (patch) | |
tree | 61f1c8eeeb2985aea613df4d3a882c5718706954 | |
parent | 04aa2de8f788654dda15e0b598fc874915b0fc06 (diff) |
Allow chown/chgrp when no ACL SAs exist.
From the comment in the commit:
Some ZFS implementations (ZEVO) create neither a ZNODE_ACL nor a DACL_ACES
SA in which case ENOENT is returned from zfs_acl_node_read() when the
SA can't be located. Allow chown/chgrp to succeed in these cases rather
than returning an error that makes no sense in the context of the caller.
Signed-off-by: Tim Chase <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue zfs-osx/zfs#86
Closes #1911
Closes #2029
-rw-r--r-- | module/zfs/zfs_acl.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/module/zfs/zfs_acl.c b/module/zfs/zfs_acl.c index c5f76036f..89b624528 100644 --- a/module/zfs/zfs_acl.c +++ b/module/zfs/zfs_acl.c @@ -1166,6 +1166,17 @@ zfs_acl_chown_setattr(znode_t *zp) zp->z_mode = zfs_mode_compute(zp->z_mode, aclp, &zp->z_pflags, zp->z_uid, zp->z_gid); + /* + * Some ZFS implementations (ZEVO) create neither a ZNODE_ACL + * nor a DACL_ACES SA in which case ENOENT is returned from + * zfs_acl_node_read() when the SA can't be located. + * Allow chown/chgrp to succeed in these cases rather than + * returning an error that makes no sense in the context of + * the caller. + */ + if (error == ENOENT) + return (0); + return (error); } |