aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/user_namespace.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/user_namespace.h')
-rw-r--r--include/linux/user_namespace.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h
index 8d493083486a..9f3579ff543d 100644
--- a/include/linux/user_namespace.h
+++ b/include/linux/user_namespace.h
@@ -17,6 +17,10 @@ struct uid_gid_map { /* 64 bytes -- 1 cache line */
17 } extent[UID_GID_MAP_MAX_EXTENTS]; 17 } extent[UID_GID_MAP_MAX_EXTENTS];
18}; 18};
19 19
20#define USERNS_SETGROUPS_ALLOWED 1UL
21
22#define USERNS_INIT_FLAGS USERNS_SETGROUPS_ALLOWED
23
20struct user_namespace { 24struct user_namespace {
21 struct uid_gid_map uid_map; 25 struct uid_gid_map uid_map;
22 struct uid_gid_map gid_map; 26 struct uid_gid_map gid_map;
@@ -27,6 +31,7 @@ struct user_namespace {
27 kuid_t owner; 31 kuid_t owner;
28 kgid_t group; 32 kgid_t group;
29 unsigned int proc_inum; 33 unsigned int proc_inum;
34 unsigned long flags;
30 35
31 /* Register of per-UID persistent keyrings for this namespace */ 36 /* Register of per-UID persistent keyrings for this namespace */
32#ifdef CONFIG_PERSISTENT_KEYRINGS 37#ifdef CONFIG_PERSISTENT_KEYRINGS
@@ -63,6 +68,8 @@ extern const struct seq_operations proc_projid_seq_operations;
63extern ssize_t proc_uid_map_write(struct file *, const char __user *, size_t, loff_t *); 68extern ssize_t proc_uid_map_write(struct file *, const char __user *, size_t, loff_t *);
64extern ssize_t proc_gid_map_write(struct file *, const char __user *, size_t, loff_t *); 69extern ssize_t proc_gid_map_write(struct file *, const char __user *, size_t, loff_t *);
65extern ssize_t proc_projid_map_write(struct file *, const char __user *, size_t, loff_t *); 70extern ssize_t proc_projid_map_write(struct file *, const char __user *, size_t, loff_t *);
71extern ssize_t proc_setgroups_write(struct file *, const char __user *, size_t, loff_t *);
72extern int proc_setgroups_show(struct seq_file *m, void *v);
66extern bool userns_may_setgroups(const struct user_namespace *ns); 73extern bool userns_may_setgroups(const struct user_namespace *ns);
67#else 74#else
68 75