From: Stanislav Brabec Date: Mon, 19 Nov 2018 23:38:14 +0000 (+0100) Subject: agetty: Return old behavior with empty logname X-Git-Tag: v2.34-rc1~262 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d16afd8d157d41bd128da9f792ee49a716b76fd1;p=thirdparty%2Futil-linux.git agetty: Return old behavior with empty logname c094fcd37 introduced a behavior change: When Return is entered with empty logname, nothing happens. As it confuses users, return back the old behavior: re-prompt. Signed-off-by: Stanislav Brabec --- diff --git a/term-utils/agetty.c b/term-utils/agetty.c index 615db2c787..fc373847ee 100644 --- a/term-utils/agetty.c +++ b/term-utils/agetty.c @@ -2185,7 +2185,7 @@ static char *get_logname(struct issue *ie, struct options *op, struct termios *t break; } /* Everything was erased. */ - if (bp == logname) + if (bp == logname && cp->eol == '\0') goto no_reload; } }