cdown / rpms / util-linux

Forked from rpms/util-linux 2 years ago
Clone

Blame SOURCES/0165-sulogin-Always-make-echo-work-after-performing-getpa.patch

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