|
@@ -16,6 +16,7 @@
|
|
#include <linux/sched.h>
|
|
#include <linux/sched.h>
|
|
#include <linux/module.h>
|
|
#include <linux/module.h>
|
|
#include <linux/bitops.h>
|
|
#include <linux/bitops.h>
|
|
|
|
+#include <linux/user_namespace.h>
|
|
#include <linux/mount.h>
|
|
#include <linux/mount.h>
|
|
#include <linux/pid_namespace.h>
|
|
#include <linux/pid_namespace.h>
|
|
#include <linux/parser.h>
|
|
#include <linux/parser.h>
|
|
@@ -108,6 +109,9 @@ static struct dentry *proc_mount(struct file_system_type *fs_type,
|
|
} else {
|
|
} else {
|
|
ns = task_active_pid_ns(current);
|
|
ns = task_active_pid_ns(current);
|
|
options = data;
|
|
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);
|
|
sb = sget(fs_type, proc_test_super, proc_set_super, flags, ns);
|