diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-06-08 19:27:06 +0400 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-06-08 19:27:06 +0400 |
commit | 65e14b458892a150681c42bb5837acf68f2d9b60 (patch) | |
tree | 2a9046ae5f3de67d64b0b717383e3c255768263f /loginutils/login.c | |
parent | bdbbb7ec49040563628758a2581a5f8e44f53277 (diff) |
login: ask passwords even for wrong usernames.
# size busybox_old busybox_unstripped
text data bss dec hex filename
680099 2704 15648 698451 aa853 busybox_old
680110 2704 15648 698462 aa85e busybox_unstripped
Diffstat (limited to 'loginutils/login.c')
-rw-r--r-- | loginutils/login.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/loginutils/login.c b/loginutils/login.c index 142695008..b6924b641 100644 --- a/loginutils/login.c +++ b/loginutils/login.c @@ -276,8 +276,8 @@ int login_main(int argc, char **argv) pw = getpwnam(username); if (!pw) { - safe_strncpy(username, "UNKNOWN", sizeof(username)); - goto auth_failed; + strcpy(username, "UNKNOWN"); + goto fake_it; } if (pw->pw_passwd[0] == '!' || pw->pw_passwd[0] == '*') @@ -292,11 +292,10 @@ int login_main(int argc, char **argv) /* Don't check the password if password entry is empty (!) */ if (!pw->pw_passwd[0]) break; - + fake_it: /* authorization takes place here */ if (correct_password(pw)) break; - auth_failed: opt &= ~LOGIN_OPT_f; bb_do_delay(FAIL_DELAY); |