start: log setns() failure

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner 2018-05-25 00:25:16 +02:00
parent 8f3e3c131b
commit c0b48eff17
No known key found for this signature in database
GPG Key ID: 8EB056D53EECB12D

View File

@ -1486,8 +1486,16 @@ static inline int do_share_ns(void *arg)
continue;
ret = setns(handler->nsfd[i], 0);
if (ret < 0)
if (ret < 0) {
/*
* Note that joining a user and/or mount namespace
* requires the process is not multithreaded otherwise
* setns() will fail here.
*/
SYSERROR("Failed to inherit %s namespace",
ns_info[i].proc_name);
return -1;
}
DEBUG("Inherited %s namespace", ns_info[i].proc_name);
}