Hi!
> On SLES12 (kernel 3.12.28) setns() fails for the fd opened from "user"
> namespace. I'm getting EINVAL here. Everything seems to work fine if I
> comment the rf |= open_ns_fd(argv[1], "user"); line above.
> 
> Unfortunately EINVAL seems to be catch-all error for setns(), any idea
> what is wrong here?

And it seems to be the case of:

EINVAL The caller attempted to join the user namespace in which
       it is already a member.

Since the ns_create only creates a new network namespace the rest of the
namespaces are inherited. At least when I change the ns_create that
creates the handle to create new user namespace as well it can
succesfully join it.

Why do we attempt to join all namespaces in the ns_exec? I guess that we
will have to change it to get a list of namespaces to join the same way
the ns_create does it.

-- 
Cyril Hrubis
chru...@suse.cz

------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to