| To: | xfs@xxxxxxxxxxx |
|---|---|
| Subject: | [PATCH 3/4] xfs: allow un-init user namespace to change file's project id |
| From: | Gao feng <gaofeng@xxxxxxxxxxxxxx> |
| Date: | Wed, 4 Sep 2013 14:38:36 +0800 |
| Cc: | dwight.engen@xxxxxxxxxx, david@xxxxxxxxxxxxx, bfoster@xxxxxxxxxx, ebiederm@xxxxxxxxxxxx, Gao feng <gaofeng@xxxxxxxxxxxxxx> |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <1378276717-9663-1-git-send-email-gaofeng@xxxxxxxxxxxxxx> |
| References: | <1378276717-9663-1-git-send-email-gaofeng@xxxxxxxxxxxxxx> |
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
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH 4/4] userns: eofblocks: convert project id from user to kernel space, Gao feng |
|---|---|
| Next by Date: | [PATCH 0/4] xfs: Allow user to change project id in un-init userns, Gao feng |
| Previous by Thread: | [PATCH 4/4] userns: eofblocks: convert project id from user to kernel space, Gao feng |
| Next by Thread: | Re: [PATCH 0/4] xfs: Allow user to change project id in un-init userns, Dave Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |