mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-04 21:31:51 +00: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:
parent
dbec28460a
commit
b376c3e1b6
4 changed files with 81 additions and 11 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue