mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-01-13 11:40:25 +03:00
Use provided uid/gid for setattr
When changing the uid/gid of a file via zfs_setattr() use the Posix id passed in iattr->ia_uid/gid. While the zfs_fuid_create() code already had the fuid support disabled for Linux it was returning the uid/gid from the credential. With this change the 'chown' command which relies on setxattr is now working properly. Also remove a little stray white space which was in front of zfs_update_inode() call and the end of zfs_setattr().
This commit is contained in:
parent
efd1832bc6
commit
037849f854
@ -639,10 +639,10 @@ zfs_fuid_create(zfs_sb_t *zsb, uint64_t id, cred_t *cr,
|
||||
}
|
||||
return (FUID_ENCODE(idx, rid));
|
||||
#else
|
||||
if (type == ZFS_OWNER)
|
||||
return crgetuid(cr);
|
||||
else
|
||||
return crgetgid(cr);
|
||||
/*
|
||||
* The Linux port only supports POSIX IDs, use the passed id.
|
||||
*/
|
||||
return (id);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -2575,7 +2575,7 @@ out:
|
||||
} else {
|
||||
err2 = sa_bulk_update(zp->z_sa_hdl, bulk, count, tx);
|
||||
dmu_tx_commit(tx);
|
||||
zfs_inode_update(zp);
|
||||
zfs_inode_update(zp);
|
||||
}
|
||||
|
||||
out2:
|
||||
|
Loading…
Reference in New Issue
Block a user