mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-06-06 22:16:38 +03:00
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 <n.borisov.lkml@gmail.com> Signed-off-by: Chunwei Chen <david.chen@osnexus.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #4928
This commit is contained in:
committed by
Brian Behlendorf
parent
938cfeb0f2
commit
64aefee1b8
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user