attach: don't close stdout of getent

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
Wolfgang Bumiller 2019-08-13 14:17:30 +02:00
parent 2ffda4c4f1
commit 59f0e209cc

View File

@ -459,7 +459,7 @@ static char *lxc_attach_getpwshell(uid_t uid)
close(STDERR_FILENO);
} else {
(void)dup3(fd, STDIN_FILENO, O_CLOEXEC);
(void)dup3(fd, STDOUT_FILENO, O_CLOEXEC);
(void)dup3(fd, STDERR_FILENO, O_CLOEXEC);
close(fd);
}