summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2013-06-04 15:22:29 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2013-06-04 15:22:29 +1000
commit9330396e8767e35f195aa99c19ac7210b8858251 (patch)
treedf82fe67c499c9270e779c33bc86d488ed69759a /fs
parentc2dc55f9a5826f538390e3326164c5346d0faafe (diff)
parent78008c404acd8e731d1e06618cc5995961e847a6 (diff)
Merge remote-tracking branch 'userns/for-next'
Diffstat (limited to 'fs')
-rw-r--r--fs/proc/root.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/proc/root.c b/fs/proc/root.c
index 41a6ea93f486..04ec276c7bab 100644
--- a/fs/proc/root.c
+++ b/fs/proc/root.c
@@ -110,7 +110,8 @@ static struct dentry *proc_mount(struct file_system_type *fs_type,
ns = task_active_pid_ns(current);
options = data;
- if (!current_user_ns()->may_mount_proc)
+ if (!current_user_ns()->may_mount_proc ||
+ !ns_capable(ns->user_ns, CAP_SYS_ADMIN))
return ERR_PTR(-EPERM);
}