[lxc-devel] [lxc/master] attach: don't close stdout of getent

Blub on Github lxc-bot at linuxcontainers.org
Tue Aug 13 12:27:24 UTC 2019


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 416 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20190813/9b948281/attachment.bin>
-------------- next part --------------
From 59f0e209cc0ef0e4b047e42452a8d13dd97426f7 Mon Sep 17 00:00:00 2001
From: Wolfgang Bumiller <w.bumiller at proxmox.com>
Date: Tue, 13 Aug 2019 14:17:30 +0200
Subject: [PATCH] attach: don't close stdout of getent

Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
---
 src/lxc/attach.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lxc/attach.c b/src/lxc/attach.c
index f63331edec..80c41fe263 100644
--- a/src/lxc/attach.c
+++ b/src/lxc/attach.c
@@ -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);
 		}
 


More information about the lxc-devel mailing list