]> git.proxmox.com Git - mirror_lxc.git/commit - src/lxc/cmd/lxc_usernsexec.c
lxc-usernsexec: reopen fds 0,1,2 separately
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Wed, 14 Oct 2015 03:13:47 +0000 (03:13 +0000)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 29 Oct 2015 21:56:31 +0000 (17:56 -0400)
commitb5f4bc783f5f19d6de61dfa37fa57e13a4f2ac12
tree9f920841eee8d7f03dfa9944222d649eae95874c
parentf348e47c93568b4f0c371cf5df1c98d4e816a86c
lxc-usernsexec: reopen fds 0,1,2 separately

lxc-usernsexec was using fd 0 and reopening it as 0,1,2 for
the new task.  If doing "lxc-usernsexec .. < script" this
will corrupt the file 'script'.

Reported-by: Fiedler Roman <Roman.Fiedler@ait.ac.at>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/lxc_usernsexec.c