]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
sulogin: fix getpasswd()
authorKarel Zak <kzak@redhat.com>
Thu, 29 Jul 2021 19:28:00 +0000 (21:28 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 29 Jul 2021 19:28:00 +0000 (21:28 +0200)
Fixes: https://github.com/karelzak/util-linux/issues/1400
Signed-off-by: Karel Zak <kzak@redhat.com>
login-utils/sulogin.c

index 3016ef4836a5a54944af53ba000fd48b9b48e1e9..4d48943ad9ac4925547b99f4c2e9fcf25500b901 100644 (file)
@@ -621,6 +621,7 @@ static char *getpasswd(struct console *con)
        cp = &con->cp;
        tty = con->tio;
 
+       ret = pass;
        tty.c_iflag &= ~(IUCLC|IXON|IXOFF|IXANY);
        tty.c_lflag &= ~(ECHO|ECHOE|ECHOK|ECHONL|TOSTOP|ISIG);
        tc = (tcsetattr(fd, TCSAFLUSH, &tty) == 0);