forwarded 846112 util-li...@vger.kernel.org tags 846112 +patch stop Looks like this was an upstream issue. The attached patch has been submitted upstream.
Bjørn
From 73d33c8b1ae640aa72e0638ed9662c051f6431c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Mork?= <bj...@mork.no> Date: Mon, 28 Nov 2016 16:40:22 +0100 Subject: [PATCH 2/2] sulogin: make Control-D break out of the main loop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit getpasswd() must return NULL to force breaking out of the main loop. Anything else will be treated as a password to be verified, and will end up with Login incorrect and a repeated password prompt. (unless the root password happened to be Control-D :) Signed-off-by: Bjørn Mork <bj...@mork.no> --- login-utils/sulogin.c | 1 + 1 file changed, 1 insertion(+) diff --git a/login-utils/sulogin.c b/login-utils/sulogin.c index 6a3890e80a16..7fe938150e19 100644 --- a/login-utils/sulogin.c +++ b/login-utils/sulogin.c @@ -695,6 +695,7 @@ static char *getpasswd(struct console *con) ptr--; break; case CEOF: + ret = (char*)0; goto quit; default: if ((size_t)(ptr - &pass[0]) >= (sizeof(pass) -1 )) { -- 2.10.2
signature.asc
Description: PGP signature