[PATCH 3/4] xfs: allow un-init user namespace to change file's project id

Gao feng gaofeng at cn.fujitsu.com
Wed Sep 4 01:38:36 CDT 2013


We already make sure un-init user namespace can only change
project id to the ids we allowd. changing project id of files
in un-init user namespace is under control. it's safe to allow
un-init user namespace to change files' project id.

Signed-off-by: Gao feng <gaofeng at cn.fujitsu.com>
---
 fs/xfs/xfs_ioctl.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
index 8db622f..b4e1741 100644
--- a/fs/xfs/xfs_ioctl.c
+++ b/fs/xfs/xfs_ioctl.c
@@ -1026,14 +1026,8 @@ xfs_ioctl_setattr(
 
 	/*
 	 * Do a quota reservation only if projid is actually going to change.
-	 * Only allow changing of projid from init_user_ns since it is a
-	 * non user namespace aware identifier.
 	 */
 	if (mask & FSX_PROJID) {
-		if (current_user_ns() != &init_user_ns) {
-			code = XFS_ERROR(EINVAL);
-			goto error_return;
-		}
 
 		if (XFS_IS_QUOTA_RUNNING(mp) &&
 		    XFS_IS_PQUOTA_ON(mp) &&
-- 
1.8.3.1



More information about the xfs mailing list