mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
userns: Add a limit on the number of user namespaces
Export the export the maximum number of user namespaces as /proc/sys/userns/max_user_namespaces. Acked-by: Kees Cook <keescook@chromium.org> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
This commit is contained in:
@@ -44,9 +44,15 @@ struct user_namespace {
|
||||
struct ctl_table_set set;
|
||||
struct ctl_table_header *sysctls;
|
||||
#endif
|
||||
int max_user_namespaces;
|
||||
atomic_t user_namespaces;
|
||||
};
|
||||
|
||||
extern struct user_namespace init_user_ns;
|
||||
extern bool setup_userns_sysctls(struct user_namespace *ns);
|
||||
extern void retire_userns_sysctls(struct user_namespace *ns);
|
||||
extern bool inc_user_namespaces(struct user_namespace *ns);
|
||||
extern void dec_user_namespaces(struct user_namespace *ns);
|
||||
|
||||
#ifdef CONFIG_USER_NS
|
||||
|
||||
|
Reference in New Issue
Block a user