Allow changing namespaces for child process
anti-social opened this issue · 2 comments
anti-social commented
We need to implement support for setns
syscall.
Documentation says that setns
supports 0 as nstype
argument:
0 Allow any type of namespace to be joined.
How we can implement this?
Specific method:
cmd.setns_any(fd);
Or using Option
:
cmd.setns(fd, None)
Or with special type:
cmd.setns(fd, SetNs::Any)
tailhook commented
I don't think it's a good idea to introduce another type just for this task. And I think that Option<Namespace>
describes the idea of verifying that this is of certain kind of namespace or not verifying at all, just well (given the argument is named well and documented).