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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx>
---
 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

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs




[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux