summaryrefslogtreecommitdiff
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.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/user_namespace.h b/include/linux/user_namespace.h
index 95142cae446a..17651f08d67f 100644
--- a/include/linux/user_namespace.h
+++ b/include/linux/user_namespace.h
@@ -39,6 +39,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 +67,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)
{
}