mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
shadow: fix su controlling terminal #1521
Signed-off-by: Pelle Johnsen <pelle.johnsen@gmail.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user