]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
agetty: Return old behavior with empty logname
authorStanislav Brabec <sbrabec@suse.cz>
Mon, 19 Nov 2018 23:38:14 +0000 (00:38 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 4 Jan 2019 10:17:09 +0000 (11:17 +0100)
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 <sbrabec@suse.cz>
term-utils/agetty.c

index 615db2c78739e34cfc69c499699a41f8205c2390..fc373847eee3618128cfc1e02459abacc32e841f 100644 (file)
@@ -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;
                }
        }