diff options
author | Pelle Johnsen <pelle.johnsen@gmail.com> | 2015-07-03 13:44:10 +0200 |
---|---|---|
committer | Pelle Johnsen <pelle.johnsen@gmail.com> | 2015-07-03 13:44:10 +0200 |
commit | a14b3c86518e0b161d7356e7f3de01bb220bade9 (patch) | |
tree | aeb984bb5ecc59d29fa097dc62abbad513c048b1 /utils/shadow/patches | |
parent | 5b8d596ab9df3a7bd86892e7206a18f67d61e43e (diff) |
shadow: fix su controlling terminal #1521
Signed-off-by: Pelle Johnsen <pelle.johnsen@gmail.com>
Diffstat (limited to 'utils/shadow/patches')
-rw-r--r-- | utils/shadow/patches/004-fix-su-controoling-term.patch | 16 |
1 files changed, 16 insertions, 0 deletions
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; + } |