]> git.proxmox.com Git - lxc.git/commitdiff
merge fix for 'getent' in lxc-attach
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 13 Aug 2019 12:18:47 +0000 (14:18 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 13 Aug 2019 12:20:15 +0000 (14:20 +0200)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
debian/patches/extra/0005-attach-don-t-close-stdout-of-getent.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/extra/0005-attach-don-t-close-stdout-of-getent.patch b/debian/patches/extra/0005-attach-don-t-close-stdout-of-getent.patch
new file mode 100644 (file)
index 0000000..02568fa
--- /dev/null
@@ -0,0 +1,26 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Wolfgang Bumiller <w.bumiller@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@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 8b34a412e..6075688c2 100644
+--- a/src/lxc/attach.c
++++ b/src/lxc/attach.c
+@@ -488,7 +488,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);
+               }
+-- 
+2.20.1
+
index 622174cfba3f147fa3bc7006476cea9ed79261c2..ba6f5afc1615f45ba59bff0adc8e739a128b8df5 100644 (file)
@@ -12,3 +12,4 @@ extra/0001-conf-use-SYSERROR-on-lxc_write_to_file-errors.patch
 extra/0002-Revert-conf-remove-extra-MS_BIND-with-sysfs-mixed.patch
 extra/0003-CVE-2019-5736-runC-rexec-callers-as-memfd.patch
 extra/0004-apparmor-generate-ro-bind-remount-rule-list.patch
+extra/0005-attach-don-t-close-stdout-of-getent.patch