aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/sched.h1
-rw-r--r--include/linux/user_namespace.h4
2 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index c667255d70db..731edaca8ffd 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -26,6 +26,7 @@
26#define CLONE_STOPPED 0x02000000 /* Start in stopped state */ 26#define CLONE_STOPPED 0x02000000 /* Start in stopped state */
27#define CLONE_NEWUTS 0x04000000 /* New utsname group? */ 27#define CLONE_NEWUTS 0x04000000 /* New utsname group? */
28#define CLONE_NEWIPC 0x08000000 /* New ipcs */ 28#define CLONE_NEWIPC 0x08000000 /* New ipcs */
29#define CLONE_NEWUSER 0x10000000 /* New user namespace */
29 30
30/* 31/*
31 * Scheduling policies 32 * Scheduling policies
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h
index 92a45867ecfb..bb320573bb9e 100644
--- a/include/linux/user_namespace.h
+++ b/include/linux/user_namespace.h
@@ -4,6 +4,7 @@
4#include <linux/kref.h> 4#include <linux/kref.h>
5#include <linux/nsproxy.h> 5#include <linux/nsproxy.h>
6#include <linux/sched.h> 6#include <linux/sched.h>
7#include <linux/err.h>
7 8
8#define UIDHASH_BITS (CONFIG_BASE_SMALL ? 3 : 8) 9#define UIDHASH_BITS (CONFIG_BASE_SMALL ? 3 : 8)
9#define UIDHASH_SZ (1 << UIDHASH_BITS) 10#define UIDHASH_SZ (1 << UIDHASH_BITS)
@@ -45,6 +46,9 @@ static inline struct user_namespace *get_user_ns(struct user_namespace *ns)
45static inline struct user_namespace *copy_user_ns(int flags, 46static inline struct user_namespace *copy_user_ns(int flags,
46 struct user_namespace *old_ns) 47 struct user_namespace *old_ns)
47{ 48{
49 if (flags & CLONE_NEWUSER)
50 return ERR_PTR(-EINVAL);
51
48 return NULL; 52 return NULL;
49} 53}
50 54