* src/login.c: After login_prompt(), do not check for unset

username, but for empty username.
This commit is contained in:
nekral-guest 2009-04-22 20:46:49 +00:00
parent 3704745289
commit c55311aa6d
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2009-04-22 Nicolas François <nicolas.francois@centraliens.net>
* src/login.c: After login_prompt(), do not check for unset
username, but for empty username.
2009-04-22 Nicolas François <nicolas.francois@centraliens.net> 2009-04-22 Nicolas François <nicolas.francois@centraliens.net>
* lib/defines.h: Define USER_NAME_MAX_LENGTH, based on utmp and * lib/defines.h: Define USER_NAME_MAX_LENGTH, based on utmp and

View File

@ -925,7 +925,7 @@ int main (int argc, char **argv)
username[USER_NAME_MAX_LENGTH] = '\0'; username[USER_NAME_MAX_LENGTH] = '\0';
login_prompt (_("\n%s login: "), username, USER_NAME_MAX_LENGTH); login_prompt (_("\n%s login: "), username, USER_NAME_MAX_LENGTH);
if ('\0' == username) { if ('\0' == username[0]) {
/* Prompt for a new login */ /* Prompt for a new login */
free (username); free (username);
username = NULL; username = NULL;