summaryrefslogtreecommitdiffstats
path: root/login-utils/sulogin.c
diff options
context:
space:
mode:
authorWerner Fink2016-03-22 10:38:59 +0100
committerKarel Zak2016-03-22 10:50:39 +0100
commit6988998b66b4b95c494d60599f8e3de2ffbaeece (patch)
treec7a94b2408b86c8b4713b33bee77192b602e4fad /login-utils/sulogin.c
parentlscpu: revert unnecessary path_exist() (diff)
downloadkernel-qcow2-util-linux-6988998b66b4b95c494d60599f8e3de2ffbaeece.tar.gz
kernel-qcow2-util-linux-6988998b66b4b95c494d60599f8e3de2ffbaeece.tar.xz
kernel-qcow2-util-linux-6988998b66b4b95c494d60599f8e3de2ffbaeece.zip
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 <werner@suse.de>
Diffstat (limited to 'login-utils/sulogin.c')
-rw-r--r--login-utils/sulogin.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/login-utils/sulogin.c b/login-utils/sulogin.c
index c6d17b3b6..601d38caf 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;