diff options
author | Karel Zak | 2015-04-09 11:34:02 +0200 |
---|---|---|
committer | Karel Zak | 2015-04-14 11:39:15 +0200 |
commit | 0490a6ca26f6e7bf9eed5521d240661adb302ba2 (patch) | |
tree | 0788a179e43144219d9226badd190b1a77f6e713 /tests | |
parent | lib/sysfs.c: use fcntl(..F_DUPFD_CLOEXEC) instead of dup(2) (diff) | |
download | kernel-qcow2-util-linux-0490a6ca26f6e7bf9eed5521d240661adb302ba2.tar.gz kernel-qcow2-util-linux-0490a6ca26f6e7bf9eed5521d240661adb302ba2.tar.xz kernel-qcow2-util-linux-0490a6ca26f6e7bf9eed5521d240661adb302ba2.zip |
unshare: allow persisting namespaces
For nsenter(1) we already support namespace specification by file
(e.g. bind mount to namespace /proc/[pid]/ns/[type] file). For
example:
# nsenter --uts=/some/path
This patch extends unshare(1) to setup the bind mount for specified
namespace, for example
# touch /some/path
# unshare --uts=/some/path hostname FOO
# nsenter --uts=/some/path hostname
FOO
Note that the problem is mount namespace, because create bind mount
to ns/mount file within unshared namespace does not make sense.
Based on patch from Lubomir Rintel <lkundrak@v3.sk>.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions