Skip to content

Commit

Permalink
vfs: Allow chroot if you have CAP_SYS_CHROOT in your user namespace
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric W. Biederman committed Nov 19, 2012
1 parent 50804fe commit a85fb27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/open.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a85fb27

Please sign in to comment.