is one allowed to reenter a user namespace?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
when trying to enter a namespace, the behaviour wrt. to entering an
existing namespace that the process is _already_ a part of is
different for user names and all other namespaces. For user namespaces
one gets EINVAL, while for other namespaces it succeeds. In other
words, for user namespaces only, entering the namspace is not idempotent.

# unshare --mount sleep 10000 &

# nsenter --target=$(pgrep sleep) --mount /bin/true
# nsenter --target=$(pgrep sleep) --ipc /bin/true
# nsenter --target=$(pgrep sleep) --net /bin/true
# nsenter --target=$(pgrep sleep) --uts /bin/true
# nsenter --target=$(pgrep sleep) --user /bin/true
nsenter: setns of 'ns/user' failed: Invalid argument
(and the EINVAL is from setns())

Is this difference intended?

-
Zbyszek
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux