diff options
-rw-r--r-- | modules/pam_unix/passverify.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/pam_unix/passverify.c b/modules/pam_unix/passverify.c index 7993737c..9d365dc9 100644 --- a/modules/pam_unix/passverify.c +++ b/modules/pam_unix/passverify.c @@ -337,7 +337,7 @@ PAMH_ARG_DECL(int check_shadow_expiry, D(("need a new password 2")); return PAM_NEW_AUTHTOK_REQD; } - if (spent->sp_warn >= 0) { + if (spent->sp_warn > 0) { long warn = spent->sp_warn > spent->sp_max ? -1 : spent->sp_max - spent->sp_warn; if (passed >= warn) { @@ -346,7 +346,7 @@ PAMH_ARG_DECL(int check_shadow_expiry, } } } - if (spent->sp_min >= 0 && passed < spent->sp_min) { + if (spent->sp_min > 0 && passed < spent->sp_min) { /* * The last password change was too recent. This error will be ignored * if no password change is attempted. |