cdown / rpms / util-linux

Forked from rpms/util-linux 2 years ago
Clone
5113bc
From 6bb8e6d4c38f260109852ef8b43876ea1aff3810 Mon Sep 17 00:00:00 2001
5113bc
From: Werner Fink <werner@suse.de>
5113bc
Date: Tue, 22 Mar 2016 10:38:59 +0100
5113bc
Subject: [PATCH 165/173] sulogin: Always make echo work after performing
5113bc
 getpasswd even if root account is locked
5113bc
5113bc
If the root account is locked and no password was provided then the terminal
5113bc
line is not set back to do echo of the input. This correct a small overlook
5113bc
in commit 7ff1162e67164cb4ece19dd809c26272461aa254
5113bc
5113bc
Upstream: http://github.com/karelzak/util-linux/commit/6988998b66b4b95c494d60599f8e3de2ffbaeece
5113bc
Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=1561200
5113bc
Signed-off-by: Werner Fink <werner@suse.de>
5113bc
---
5113bc
 login-utils/sulogin.c | 3 +--
5113bc
 1 file changed, 1 insertion(+), 2 deletions(-)
5113bc
5113bc
diff --git a/login-utils/sulogin.c b/login-utils/sulogin.c
5113bc
index a17b91d71..a6918282e 100644
5113bc
--- a/login-utils/sulogin.c
5113bc
+++ b/login-utils/sulogin.c
5113bc
@@ -676,8 +676,7 @@ quit:
5113bc
 	alarm(0);
5113bc
 	if (tc)
5113bc
 		tcsetattr(fd, TCSAFLUSH, &con->tio);
5113bc
-	if (ret && *ret != '\0')
5113bc
-		tcfinal(con);
5113bc
+	tcfinal(con);
5113bc
 	printf("\r\n");
5113bc
 out:
5113bc
 	return ret;
5113bc
-- 
5113bc
2.14.4
5113bc