]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
sulogin: Always make echo work after performing getpasswd even if root account is...
authorWerner Fink <werner@suse.de>
Tue, 22 Mar 2016 09:38:59 +0000 (10:38 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 22 Mar 2016 09:50:39 +0000 (10:50 +0100)
If the root account is locked and no password was provided then the terminal
line is not set back to do echo of the input. This correct a small overlook
in commit 7ff1162e67164cb4ece19dd809c26272461aa254

Signed-off-by: Werner Fink <werner@suse.de>
login-utils/sulogin.c

index c6d17b3b6382995082f17e7a71bf89b3a040546d..601d38caf2419843fae8b2d207c5ed53b160df9a 100644 (file)
@@ -744,8 +744,7 @@ quit:
        alarm(0);
        if (tc)
                tcsetattr(fd, TCSAFLUSH, &con->tio);
-       if (ret && *ret != '\0')
-               tcfinal(con);
+       tcfinal(con);
        printf("\r\n");
 out:
        return ret;