* src/login.c: After login_prompt(), do not check for unset
username, but for empty username.
This commit is contained in:
parent
3704745289
commit
c55311aa6d
@ -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
|
||||||
|
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user