util-linux/sys-utils
Karel Zak 0490a6ca26 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>
2015-04-14 11:39:15 +02:00
..
.gitignore build-sys: support ./configure ADJTIME_PATH= 2014-06-19 10:30:56 +02:00
Makemodule.am tests: add test_dmesg that has fixed boot time 2015-03-23 10:34:49 +01:00
blkdiscard.8 docs: remove obsolete and unneeded comments from man-page files 2015-01-12 11:03:26 +01:00
blkdiscard.c textual: grammarize and harmonize the stat error message 2015-02-02 11:27:10 +01:00
chcpu.8 docs: bring eight more man pages closer to standard formatting 2014-07-21 10:29:44 +02:00
chcpu.c textual: add a docstring to most of the utilities 2015-01-06 11:27:38 +01:00
ctrlaltdel.8 docs: standardize the phrases for --help and --version in all man pages 2013-10-15 10:28:30 +02:00
ctrlaltdel.c textual: add a docstring to most of the utilities 2015-01-06 11:27:38 +01:00
dmesg.1 colors: cleanup man pages, add hint to usage() 2015-02-25 12:40:06 +01:00
dmesg.c dmesg: use GMT in tests, add DMESG_TEST_BOOTIME 2015-03-23 11:40:59 +01:00
eject.1 docs: restore minus symbols in long opts 2015-01-20 18:15:30 -05:00
eject.c eject: use parse_switch() 2015-02-24 12:08:40 +01:00
fallocate.1 docs: restore minus symbols in long opts 2015-01-20 18:15:30 -05:00
fallocate.c textual: grammarize and harmonize the stat error message 2015-02-02 11:27:10 +01:00
flock.1 flock: add --verbose option 2015-03-03 19:35:27 +00:00
flock.c lib/timer: use separate file for timers 2015-03-06 13:17:20 +01:00
fsfreeze.8 docs: remove obsolete and unneeded comments from man-page files 2015-01-12 11:03:26 +01:00
fsfreeze.c textual: grammarize and harmonize the stat error message 2015-02-02 11:27:10 +01:00
fstab.5 docs: fstab(5) grammar / English fixes, and some other updates 2015-02-27 14:50:16 +01:00
fstrim.8 docs: remove obsolete and unneeded comments from man-page files 2015-01-12 11:03:26 +01:00
fstrim.c textual: grammarize and harmonize the stat error message 2015-02-02 11:27:10 +01:00
fstrim.service.in fstrim: add systemd units 2014-04-07 12:38:18 +02:00
fstrim.timer fstrim: daily -> weekly in systemd timer 2014-04-10 09:38:17 +02:00
hwclock-cmos.c hwclock: enable --directisa for x86_64 2015-01-09 10:44:00 +01:00
hwclock-rtc.c hwclock: internationalizing the message of the used interface 2014-02-10 18:41:55 +01:00
hwclock.8.in hwclock: cosmetic changes to man page 2015-03-17 10:55:46 +01:00
hwclock.c hwclock: non-root access in test mode 2015-03-17 10:17:26 -04:00
hwclock.h hwclock: remove referal to deprecated keyboard interface 2014-09-19 19:31:02 +01:00
ipcmk.1 docs: fix some things that were overlooked during the first pass 2014-07-28 11:16:53 +02:00
ipcmk.c ipc*: use customary fputs() instead of fprintf() with the usage macros 2015-01-06 11:50:18 +01:00
ipcrm.1 docs: restore minus symbols in long opts 2015-01-20 18:15:30 -05:00
ipcrm.c build: fix printf warnings for icc (-Wformat-security) 2015-01-21 11:15:19 +01:00
ipcs.1 docs: bring four more man pages closer to standard formatting 2014-07-17 14:01:04 +02:00
ipcs.c ipc*: use customary fputs() instead of fprintf() with the usage macros 2015-01-06 11:50:18 +01:00
ipcutils.c ipcs: remove FIXME markup 2015-01-07 21:57:53 +00:00
ipcutils.h ipcs: fix size_t overflow 2014-03-11 11:22:07 +01:00
ldattach.8 docs: restore minus symbols in long opts 2015-01-20 18:15:30 -05:00
ldattach.c textual: add a docstring to most of the utilities 2015-01-06 11:27:38 +01:00
losetup.8 docs: restore minus symbols in long opts 2015-01-20 18:15:30 -05:00
losetup.c textual: add a docstring to most of the utilities 2015-01-06 11:27:38 +01:00
lp.h
lscpu-dmi.c lscpu: fix cppcheck warnings 2014-09-16 11:16:09 +02:00
lscpu.1 docs: remove obsolete and unneeded comments from man-page files 2015-01-12 11:03:26 +01:00
lscpu.c lscpu: add s-Par support 2015-02-11 11:46:19 +01:00
lscpu.h lscpu: add s-Par support 2015-02-11 11:46:19 +01:00
mount.8 mount: fix lazytime docs 2015-03-30 12:52:22 +02:00
mount.c mount: don't remount read-only on --bind 2015-03-20 12:42:33 +01:00
mountpoint.1 docs: remove obsolete and unneeded comments from man-page files 2015-01-12 11:03:26 +01:00
mountpoint.c textual: add a docstring to most of the utilities 2015-01-06 11:27:38 +01:00
nsenter.1 nsenter: add -Z to set selinux context 2015-03-20 15:39:38 +01:00
nsenter.c nsenter: add -Z to set selinux context 2015-03-20 15:39:38 +01:00
pivot_root.8 docs: standardize the phrases for --help and --version in all man pages 2013-10-15 10:28:30 +02:00
pivot_root.c textual: add a docstring to most of the utilities 2015-01-06 11:27:38 +01:00
prlimit.1 docs: fix some spelling errors and typos in man pages 2015-02-27 14:48:56 +01:00
prlimit.c prlimit: tell in --verbose output which pid got the new limit 2015-02-24 11:22:26 +01:00
readprofile.8 docs: don't use bold or italics for "[option]" in synopsis of man pages 2014-12-19 09:57:23 +01:00
readprofile.c textual: add a docstring to most of the utilities 2015-01-06 11:27:38 +01:00
renice.1 docs: mention nice(1) in renice(1) manual page 2015-02-02 11:27:10 +01:00
renice.c textual: add a docstring to most of the utilities 2015-01-06 11:27:38 +01:00
rtcwake.8.in docs: bring the rtcwake man page closer to standard formatting 2014-07-29 12:14:56 +02:00
rtcwake.c build: fix printf warnings for icc (-Wformat-security) 2015-01-21 11:15:19 +01:00
setarch.8 docs: mention that setarch may not be able to set all listed architectures 2015-01-12 11:33:47 +01:00
setarch.c setarch: fix regression for sparc builds 2015-03-30 11:50:01 +02:00
setpriv.1 docs: restore minus symbols in long opts 2015-01-20 18:15:30 -05:00
setpriv.c textual: add a docstring to most of the utilities 2015-01-06 11:27:38 +01:00
setsid.1 docs: remove obsolete and unneeded comments from man-page files 2015-01-12 11:03:26 +01:00
setsid.c textual: add a docstring to most of the utilities 2015-01-06 11:27:38 +01:00
swapoff.8 build-sys: move swapon from mount/ to sys-utils/ 2012-01-11 12:14:29 +01:00
swapoff.c textual: add a docstring to most of the utilities 2015-01-06 11:27:38 +01:00
swapon-common.c swapon: split swapon-common.c 2014-09-22 13:16:25 +02:00
swapon-common.h swapon: split swapon-common.c 2014-09-22 13:16:25 +02:00
swapon.8 docs: remove obsolete and unneeded comments from man-page files 2015-01-12 11:03:26 +01:00
swapon.c textual: grammarize and harmonize the stat error message 2015-02-02 11:27:10 +01:00
switch_root.8 switch_root: document that maintains /run too 2015-01-26 11:45:43 +01:00
switch_root.c textual: grammarize and harmonize the stat error message 2015-02-02 11:27:10 +01:00
tunelp.8 docs: restore minus symbols in long opts 2015-01-20 18:15:30 -05:00
tunelp.c tunelp: use parse_switch() 2015-03-05 10:31:18 +01:00
umount.8 docs: restore minus symbols in long opts 2015-01-20 18:15:30 -05:00
umount.c textual: add a docstring to most of the utilities 2015-01-06 11:27:38 +01:00
unshare.1 unshare: allow persisting namespaces 2015-04-14 11:39:15 +02:00
unshare.c unshare: allow persisting namespaces 2015-04-14 11:39:15 +02:00
wdctl.8 docs: restore minus symbols in long opts 2015-01-20 18:15:30 -05:00
wdctl.c textual: add a docstring to most of the utilities 2015-01-06 11:27:38 +01:00
zramctl.8 docs: improve the description of --size in the man page of zramctl 2014-08-20 10:47:07 +02:00
zramctl.c maint: fix shadow declaration 2015-01-07 10:08:21 +01:00