diff options
-rw-r--r-- | libbb/correct_password.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libbb/correct_password.c b/libbb/correct_password.c index 815c51c43..f1793cd17 100644 --- a/libbb/correct_password.c +++ b/libbb/correct_password.c | |||
@@ -54,13 +54,11 @@ int correct_password(const struct passwd *pw) | |||
54 | struct spwd spw; | 54 | struct spwd spw; |
55 | struct spwd *result; | 55 | struct spwd *result; |
56 | char buffer[256]; | 56 | char buffer[256]; |
57 | if (getspnam_r(pw->pw_name, &spw, buffer, sizeof(buffer), &result) == 0) | 57 | correct = (getspnam_r(pw->pw_name, &spw, buffer, sizeof(buffer), &result)) ? "aa" : spw.sp_pwdp; |
58 | correct = spw.sp_pwdp; | ||
59 | /* else: no valid shadow password, checking ordinary one */ | ||
60 | } | 58 | } |
61 | #endif | 59 | #endif |
62 | 60 | ||
63 | if (!correct || correct[0] == '\0') | 61 | if (!correct[0]) /* empty password field? */ |
64 | return 1; | 62 | return 1; |
65 | 63 | ||
66 | fake_it: | 64 | fake_it: |