Close all non-stdio FDs in virt-login-shell (CVE-2013-4400)
authorDaniel P. Berrange <berrange@redhat.com>
Wed, 9 Oct 2013 14:14:34 +0000 (15:14 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 21 Oct 2013 13:18:59 +0000 (14:18 +0100)
commit6fc87e07a22587b9f38845ce1a0d6db1c7483fe9
treea5642b9840599321c2a2b08678100a261a92c1af
parentd8accf54e310b90bd8794edd2d6d1f7d74bb421d
Close all non-stdio FDs in virt-login-shell (CVE-2013-4400)

We don't want to inherit any FDs in the new namespace
except for the stdio FDs. Explicitly close them all,
just in case some do not have the close-on-exec flag
set.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
(cherry picked from commit b7fcc799ad5d8f3e55b89b94e599903e3c092467)
tools/virt-login-shell.c