linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Serge E. Hallyn" <serue@us.ibm.com>
To: Containers <containers@lists.osdl.org>, linux-fsdevel@vger.kernel.org
Subject: [RFC] [PATCH 3/4] uid_ns: replace i_uid check in fs/namespace.c
Date: Mon, 6 Nov 2006 22:20:07 -0600	[thread overview]
Message-ID: <20061107042007.GD28706@sergelap.austin.ibm.com> (raw)
In-Reply-To: <20061107041814.GA28706@sergelap.austin.ibm.com>

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@us.ibm.com>

---

 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

  parent reply	other threads:[~2006-11-07  4:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-07  4:18 [RFC] [PATCH 0/4] uid_ns: introduction Serge E. Hallyn
2006-11-07  4:19 ` [RFC] [PATCH 1/4] uid_ns: introduce inode uid check helper Serge E. Hallyn
2006-11-09 20:05   ` Cedric Le Goater
2006-11-07  4:19 ` [RFC] [PATCH 2/4] uid_ns: replace inode->fsuid checks under fs/ Serge E. Hallyn
2006-11-07  4:20 ` Serge E. Hallyn [this message]
2006-11-07  4:20 ` [RFC] [PATCH 4/4] uid_ns: Add filesystem uid checks Serge E. Hallyn
2006-11-08  0:52 ` [RFC] [PATCH 0/4] uid_ns: introduction Herbert Poetzl
2006-11-08 17:46   ` Trond Myklebust
2006-11-08 20:34     ` Eric W. Biederman
2006-11-08 21:27       ` Herbert Poetzl
2006-11-08 21:54         ` Serge E. Hallyn
2006-11-09  0:42           ` Herbert Poetzl
2006-11-09 13:26           ` Eric W. Biederman
2006-11-09 16:50             ` Serge E. Hallyn
2006-11-09 17:17               ` Herbert Poetzl
2006-11-09 17:35                 ` Serge E. Hallyn
2006-11-09 20:12                   ` Cedric Le Goater

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061107042007.GD28706@sergelap.austin.ibm.com \
    --to=serue@us.ibm.com \
    --cc=containers@lists.osdl.org \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).