From a14b3c86518e0b161d7356e7f3de01bb220bade9 Mon Sep 17 00:00:00 2001 From: Pelle Johnsen Date: Fri, 3 Jul 2015 13:44:10 +0200 Subject: shadow: fix su controlling terminal #1521 Signed-off-by: Pelle Johnsen --- utils/shadow/patches/004-fix-su-controoling-term.patch | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 utils/shadow/patches/004-fix-su-controoling-term.patch (limited to 'utils/shadow/patches') diff --git a/utils/shadow/patches/004-fix-su-controoling-term.patch b/utils/shadow/patches/004-fix-su-controoling-term.patch new file mode 100644 index 000000000..4c130c736 --- /dev/null +++ b/utils/shadow/patches/004-fix-su-controoling-term.patch @@ -0,0 +1,16 @@ +--- a/src/su.c ++++ b/src/su.c +@@ -1090,8 +1090,12 @@ + + if (fd >= 0) { + err = ioctl (fd, TIOCNOTTY, (char *) 0); ++ if (-1 == err && ENOTTY == errno) { ++ /* There are no controlling terminal already */ ++ err = 0; ++ } + (void) close (fd); +- } else if (ENXIO == errno) { ++ } else if (ENXIO == errno || EACCES == errno) { + /* There are no controlling terminal already */ + err = 0; + } -- cgit v1.2.3