void-packages/srcpkgs/util-linux/patches/0001-sulogin-fix-getpasswd.patch
Érico Nogueira 3d6657e5d6 util-linux: backport sulogin(8) fix.
sulogin wasn't actually logging in, making single user mode useless.

Reported by kciN on IRC.
2021-08-03 18:29:41 -03:00

26 lines
780 B
Diff

From 3c466f7c353beb3076a2be8fb2931b9951430128 Mon Sep 17 00:00:00 2001
From: Karel Zak <kzak@redhat.com>
Date: Thu, 29 Jul 2021 21:28:00 +0200
Subject: [PATCH 1/6] sulogin: fix getpasswd()
Fixes: https://github.com/karelzak/util-linux/issues/1400
Signed-off-by: Karel Zak <kzak@redhat.com>
---
login-utils/sulogin.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/login-utils/sulogin.c b/login-utils/sulogin.c
index 3016ef483..4d48943ad 100644
--- a/login-utils/sulogin.c
+++ b/login-utils/sulogin.c
@@ -621,6 +621,7 @@ static char *getpasswd(struct console *con)
cp = &con->cp;
tty = con->tio;
+ ret = pass;
tty.c_iflag &= ~(IUCLC|IXON|IXOFF|IXANY);
tty.c_lflag &= ~(ECHO|ECHOE|ECHOK|ECHONL|TOSTOP|ISIG);
tc = (tcsetattr(fd, TCSAFLUSH, &tty) == 0);
--
2.32.0