First Commit
[librecmc/package-feed.git] / utils / shadow / patches / 004-fix-su-controoling-term.patch
1 --- a/src/su.c
2 +++ b/src/su.c
3 @@ -1090,8 +1090,12 @@
4  
5                 if (fd >= 0) {
6                         err = ioctl (fd, TIOCNOTTY, (char *) 0);
7 +                       if (-1 == err && ENOTTY == errno) {
8 +                               /* There are no controlling terminal already */
9 +                               err = 0;
10 +                       }
11                         (void) close (fd);
12 -               } else if (ENXIO == errno) {
13 +               } else if (ENXIO == errno || EACCES == errno) {
14                         /* There are no controlling terminal already */
15                         err = 0;
16                 }