diff options
Diffstat (limited to 'utils/shadow/patches/004-fix-su-controoling-term.patch')
-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; + } |