From: Werner Fink Date: Tue, 22 Mar 2016 09:38:59 +0000 (+0100) Subject: sulogin: Always make echo work after performing getpasswd even if root account is... X-Git-Tag: v2.28-rc2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6988998b66b4b95c494d60599f8e3de2ffbaeece;p=thirdparty%2Futil-linux.git sulogin: Always make echo work after performing getpasswd even if root account is locked 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 --- diff --git a/login-utils/sulogin.c b/login-utils/sulogin.c index c6d17b3b63..601d38caf2 100644 --- a/login-utils/sulogin.c +++ b/login-utils/sulogin.c @@ -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;