mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-01 11:21:51 +00:00
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:
parent
cde1975bc2
commit
b2e0d98705
5 changed files with 51 additions and 8 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue