]> git.ipfire.org Git - thirdparty/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)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 2 Dec 2019 12:58:55 +0000 (13:58 +0100)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
src/lxc/attach.c

index b36653ff0904992319efa14a8e0a5e068af79469..90b6892062d8d115957a26feeaa2ff6216f96f85 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);
                }