From ab31c537196c9eaea09e1021cfc153b051193784 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Sun, 2 Sep 2018 14:24:47 +0100 Subject: [PATCH] init: reprompt login: if blank user name --- Applications/util/init.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Applications/util/init.c b/Applications/util/init.c index 70640c98..cf4a5525 100644 --- a/Applications/util/init.c +++ b/Applications/util/init.c @@ -837,6 +837,9 @@ static pid_t getty(const char **argv, const char *id) if ((p = strchr(buf, '\n')) != NULL) *p = '\0'; /* strip newline */ + if (*buf == 0) + continue; + pwd = getpwnam(buf); if (pwd == NULL || *pwd->pw_passwd) -- 2.34.1