]> git.proxmox.com Git - mirror_lxc.git/commitdiff
attach: don't close stdout of getent
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 13 Aug 2019 12:17:30 +0000 (14:17 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 13 Aug 2019 12:24:30 +0000 (14:24 +0200)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
src/lxc/attach.c

index f63331edec952129a2c8d56c1fea8c56f7fd4ec3..80c41fe263a164a9ed628fe87163c5b833f99e75 100644 (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);
                }