summaryrefslogtreecommitdiff
path: root/include/linux/utsname.h
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-07-26 15:02:49 +0400
committerEric W. Biederman <ebiederm@xmission.com>2012-11-20 16:17:43 +0400
commitbcf58e725ddc45d31addbc6627d4f0edccc824c1 (patch)
treee6dff2fbed40f26d8c45f78e23a7476527573bf1 /include/linux/utsname.h
parent142e1d1d5f088e7a38659daca6e84a730967774a (diff)
downloadlinux-bcf58e725ddc45d31addbc6627d4f0edccc824c1.tar.xz
userns: Make create_new_namespaces take a user_ns parameter
Modify create_new_namespaces to explicitly take a user namespace parameter, instead of implicitly through the task_struct. This allows an implementation of unshare(CLONE_NEWUSER) where the new user namespace is not stored onto the current task_struct until after all of the namespaces are created. Acked-by: Serge Hallyn <serge.hallyn@canonical.com> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'include/linux/utsname.h')
-rw-r--r--include/linux/utsname.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/utsname.h b/include/linux/utsname.h
index 2b345206722a..221f4a0a7502 100644
--- a/include/linux/utsname.h
+++ b/include/linux/utsname.h
@@ -33,7 +33,7 @@ static inline void get_uts_ns(struct uts_namespace *ns)
}
extern struct uts_namespace *copy_utsname(unsigned long flags,
- struct task_struct *tsk);
+ struct user_namespace *user_ns, struct uts_namespace *old_ns);
extern void free_uts_ns(struct kref *kref);
static inline void put_uts_ns(struct uts_namespace *ns)
@@ -50,12 +50,12 @@ static inline void put_uts_ns(struct uts_namespace *ns)
}
static inline struct uts_namespace *copy_utsname(unsigned long flags,
- struct task_struct *tsk)
+ struct user_namespace *user_ns, struct uts_namespace *old_ns)
{
if (flags & CLONE_NEWUTS)
return ERR_PTR(-EINVAL);
- return tsk->nsproxy->uts_ns;
+ return old_ns;
}
#endif