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>
Showing
- include/linux/nsproxy.h 1 addition, 1 deletioninclude/linux/nsproxy.h
- include/linux/user_namespace.h 9 additions, 0 deletionsinclude/linux/user_namespace.h
- kernel/fork.c 22 additions, 3 deletionskernel/fork.c
- kernel/nsproxy.c 4 additions, 4 deletionskernel/nsproxy.c
- kernel/user_namespace.c 15 additions, 0 deletionskernel/user_namespace.c
Please register or sign in to comment