mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Eric W. Biederman" <ebiederm@xmission.com>
To: <linux-fsdevel@vger.kernel.org>
Cc: Linux Containers <containers@lists.linux-foundation.org>,
	<linux-kernel@vger.kernel.org>, Al Viro <viro@ZenIV.linux.org.uk>,
	"Eric W. Biederman" <ebiederm@xmission.com>
Subject: [PATCH review 1/6] vfs: Allow chroot if you have CAP_SYS_CHROOT in your user namespace
Date: Mon, 19 Nov 2012 02:50:17 -0800	[thread overview]
Message-ID: <1353322222-27060-1-git-send-email-ebiederm@xmission.com> (raw)
In-Reply-To: <87k3thc1h3.fsf@xmission.com>

From: "Eric W. Biederman" <ebiederm@xmission.com>

Once you are confined to a user namespace applications can not gain
privilege and escape the user namespace so there is no longer a reason
to restrict chroot.

Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
---
 fs/open.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/open.c b/fs/open.c
index 59071f5..182d866 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -435,7 +435,7 @@ SYSCALL_DEFINE1(chroot, const char __user *, filename)
 		goto dput_and_out;
 
 	error = -EPERM;
-	if (!capable(CAP_SYS_CHROOT))
+	if (!nsown_capable(CAP_SYS_CHROOT))
 		goto dput_and_out;
 	error = security_path_chroot(&path);
 	if (error)
-- 
1.7.5.4


  reply	other threads:[~2012-11-19 10:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-19 10:48 [PATCH review 0/6] mount namespace container enhancements Eric W. Biederman
2012-11-19 10:50 ` Eric W. Biederman [this message]
2012-11-19 10:50   ` [PATCH review 2/6] vfs: Add setns support for the mount namespace Eric W. Biederman
2012-11-19 10:50   ` [PATCH review 3/6] vfs: Add a user namespace reference from struct mnt_namespace Eric W. Biederman
2012-11-19 10:50   ` [PATCH review 4/6] vfs: Only support slave subtrees across different user namespaces Eric W. Biederman
2012-11-19 10:50   ` [PATCH review 5/6] vfs: Allow unprivileged manipulation of the mount namespace Eric W. Biederman
2012-11-19 10:50   ` [PATCH review 6/6] userns: fix return value on mntns_install() failure Eric W. Biederman
2012-11-20  3:19 ` [PATCH review 0/6] mount namespace container enhancements Gao feng
2012-11-20  4:29   ` Eric W. Biederman

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=1353322222-27060-1-git-send-email-ebiederm@xmission.com \
    --to=ebiederm@xmission.com \
    --cc=containers@lists.linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /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

all inboxes | Powered by JetHome®