diff options
author | Nikolay Borisov <[email protected]> | 2016-08-04 00:31:08 +0300 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-08-08 10:47:43 -0700 |
commit | 64aefee1b847b747147016c039f5b0e276a9e1b7 (patch) | |
tree | 09896b05f5b44ce499c75148558c8ff347bc0eca /module/zfs/zfs_acl.c | |
parent | 938cfeb0f27303721081223816d4f251ffeb1767 (diff) |
Fix interaction between userns uid/gid and SA
* When the uid/gid change is handled in zfs_setattr we want to
actually adjust the user passed uid to a KUID and write that to disk.
* In trace points use the i_uid member without doing translation,
since it has already been performed.
* Use kuid in zfs_aclset_common
Signed-off-by: Nikolay Borisov <[email protected]>
Signed-off-by: Chunwei Chen <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #4928
Diffstat (limited to 'module/zfs/zfs_acl.c')
-rw-r--r-- | module/zfs/zfs_acl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/zfs_acl.c b/module/zfs/zfs_acl.c index bbb731495..28ebfcc67 100644 --- a/module/zfs/zfs_acl.c +++ b/module/zfs/zfs_acl.c @@ -1326,7 +1326,7 @@ zfs_aclset_common(znode_t *zp, zfs_acl_t *aclp, cred_t *cr, dmu_tx_t *tx) mode = zp->z_mode; mode = zfs_mode_compute(mode, aclp, &zp->z_pflags, - zfs_uid_read(ZTOI(zp)), zfs_gid_read(ZTOI(zp))); + KUID_TO_SUID(ZTOI(zp)->i_uid), KGID_TO_SGID(ZTOI(zp)->i_gid)); zp->z_mode = mode; SA_ADD_BULK_ATTR(bulk, count, SA_ZPL_MODE(zsb), NULL, |