]> git.ipfire.org Git - thirdparty/util-linux.git/commit
unshare,nsenter: spawn shell by default
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 14 Feb 2013 02:05:48 +0000 (21:05 -0500)
committerKarel Zak <kzak@redhat.com>
Thu, 14 Feb 2013 13:42:35 +0000 (14:42 +0100)
commit57580694269be36cc52138b0f82e72f09338e192
tree1b4f0a31421327529afc83c9d2b16750f465fe49
parent4127f053ba482b0bd4d6976d4ca90bf77e827461
unshare,nsenter: spawn shell by default

The behaviour mimics chroot.

Possibly it would have been nicer to to query the password database in
the new namepace and run the shell of the user there, but it's hard to
do correctly. getpwuid() might need to load nss plugins, and the arch
in the new namespace might be different (in case of NEWNS mounts), or
the hostname might be different, etc. So in general it's not possible
to do it reliably.

Signed-off-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
include/exec_shell.h [new file with mode: 0644]
lib/Makemodule.am
lib/exec_shell.c [new file with mode: 0644]
sys-utils/Makemodule.am
sys-utils/nsenter.1
sys-utils/nsenter.c
sys-utils/unshare.c