Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[cascardo/linux.git] / include / linux / user_namespace.h
index 95142ca..b9bd2e6 100644 (file)
@@ -25,6 +25,7 @@ struct user_namespace {
        struct user_namespace   *parent;
        kuid_t                  owner;
        kgid_t                  group;
+       unsigned int            proc_inum;
 };
 
 extern struct user_namespace init_user_ns;
@@ -39,6 +40,7 @@ static inline struct user_namespace *get_user_ns(struct user_namespace *ns)
 }
 
 extern int create_user_ns(struct cred *new);
+extern int unshare_userns(unsigned long unshare_flags, struct cred **new_cred);
 extern void free_user_ns(struct kref *kref);
 
 static inline void put_user_ns(struct user_namespace *ns)
@@ -66,6 +68,14 @@ static inline int create_user_ns(struct cred *new)
        return -EINVAL;
 }
 
+static inline int unshare_userns(unsigned long unshare_flags,
+                                struct cred **new_cred)
+{
+       if (unshare_flags & CLONE_NEWUSER)
+               return -EINVAL;
+       return 0;
+}
+
 static inline void put_user_ns(struct user_namespace *ns)
 {
 }