[RFC] [PATCH 3/4] uid_ns: replace i_uid check in fs/namespace.c

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

 



Replace a inode->i_uid==current->fsuid check in fs/namespace.c with
the inode_task_same_uid helper, which will eventually be checking
uid namespaces.

Signed-off-by: Serge E. Hallyn <serue@xxxxxxxxxx>

---

 fs/namespace.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

bccafb526d224ae0c82c3370c0056eef5686bb4a
diff --git a/fs/namespace.c b/fs/namespace.c
index ec1a255..e199769 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -697,7 +697,7 @@ static int mount_is_safe(struct nameidat
 	if (S_ISLNK(nd->dentry->d_inode->i_mode))
 		return -EPERM;
 	if (nd->dentry->d_inode->i_mode & S_ISVTX) {
-		if (current->uid != nd->dentry->d_inode->i_uid)
+		if (!inode_task_same_uid(nd->dentry->d_inode, current))
 			return -EPERM;
 	}
 	/*
-- 
1.1.6
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux