userns: Implement unshare of the user namespace
- Add CLONE_THREAD to the unshare flags if CLONE_NEWUSER is selected As changing user namespaces is only valid if all there is only a single thread. - Restore the code to add CLONE_VM if CLONE_THREAD is selected and the code to addCLONE_SIGHAND if CLONE_VM is selected. Making the constraints in the code clear. Acked-by: Serge Hallyn <serge.hallyn@canonical.com> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
This commit is contained in:
@@ -67,7 +67,7 @@ void exit_task_namespaces(struct task_struct *tsk);
|
||||
void switch_task_namespaces(struct task_struct *tsk, struct nsproxy *new);
|
||||
void free_nsproxy(struct nsproxy *ns);
|
||||
int unshare_nsproxy_namespaces(unsigned long, struct nsproxy **,
|
||||
struct fs_struct *);
|
||||
struct cred *, struct fs_struct *);
|
||||
int __init nsproxy_cache_init(void);
|
||||
|
||||
static inline void put_nsproxy(struct nsproxy *ns)
|
||||
|
||||
Reference in New Issue
Block a user