packages/utils/shadow/patches/004-fix-su-controoling-term.patch
Rosen Penev 87e5ded04c
shadow: update to 4.8.1
Fixed license information.

Removed patch requiring autoreconf and replaced with a configure variable.

Removed faulty patch that broke systems without a disabled crypt size hack.
Replaced with using a SED command as well as bcrypt, which works in musl.

Removed su patch and converted it to a SED command in the Makefile.

Added new shadow utilities.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-02 13:07:52 -08:00

16 lines
440 B
Diff

--- a/src/su.c
+++ b/src/su.c
@@ -1122,8 +1122,12 @@ int main (int argc, char **argv)
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;
}