Whamcloud - gitweb
LU-11101 quota: fix setattr project check
Similar patch motivated by upstream patch:
ext4: fix setattr project check in fssetxattr ioctl
Currently, project quota could be changed by fssetxattr
ioctl, and existed permission check inode_owner_or_capable()
is obviously not enough, just think that common users could
change project id of file, that could make users to
break project quota easily.
This patch try to follow same regular of xfs project
quota:
"Project Quota ID state is only allowed to change from
within the init namespace. Enforce that restriction only
if we are trying to change the quota ID state.
Everything else is allowed in user namespaces."
Test-Parameters: trivial testlist=sanity-quota,sanity-quota
Change-Id: If03bb120476eca9707b1b4db64e9594bb99df59e
Signed-off-by: Wang Shilong <wshilong@ddn.com>i
Reviewed-on: https://review.whamcloud.com/32730
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>