diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-01 10:50:58 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-01 10:50:58 -0700 |
| commit | 974857266aae29c371ac2313ab520616335caec9 (patch) | |
| tree | 9c2c67433a2783f29fe1f99cf44380b4fbb725af /fs/proc/root.c | |
| parent | 5ed0505c713805f89473cdc0bbfb5110dfd840cb (diff) | |
| parent | 07961ac7c0ee8b546658717034fe692fd12eefa9 (diff) | |
Merge v3.9-rc5 into char-misc-next
This picks up the fixes in 3.9-rc5 that we need here.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/proc/root.c')
| -rw-r--r-- | fs/proc/root.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/proc/root.c b/fs/proc/root.c index c6e9fac26bac..9c7fab1d23f0 100644 --- a/fs/proc/root.c +++ b/fs/proc/root.c @@ -16,6 +16,7 @@ #include <linux/sched.h> #include <linux/module.h> #include <linux/bitops.h> +#include <linux/user_namespace.h> #include <linux/mount.h> #include <linux/pid_namespace.h> #include <linux/parser.h> @@ -108,6 +109,9 @@ static struct dentry *proc_mount(struct file_system_type *fs_type, } else { ns = task_active_pid_ns(current); options = data; + + if (!current_user_ns()->may_mount_proc) + return ERR_PTR(-EPERM); } sb = sget(fs_type, proc_test_super, proc_set_super, flags, ns); |
