diff options
Diffstat (limited to 'nsswitch/pam_winbind.c')
-rw-r--r-- | nsswitch/pam_winbind.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nsswitch/pam_winbind.c b/nsswitch/pam_winbind.c index f06f2b5ba8..f1b88cba4b 100644 --- a/nsswitch/pam_winbind.c +++ b/nsswitch/pam_winbind.c @@ -508,6 +508,9 @@ config_from_pam: ctrl |= WINBIND_CACHED_LOGIN; else if (!strcasecmp(*v, "mkhomedir")) ctrl |= WINBIND_MKHOMEDIR; + else if (!strncasecmp(*v, "warn_pwd_expire", + strlen("warn_pwd_expire"))) + ctrl |= WINBIND_WARN_PWD_EXPIRE; else if (type != PAM_WINBIND_CLEANUP) { __pam_log(pamh, ctrl, LOG_ERR, "pam_parse: unknown option: %s", *v); @@ -2379,7 +2382,7 @@ static int get_warn_pwd_expire_from_config(struct pwb_context *ctx) ret = get_config_item_int(ctx, "warn_pwd_expire", WINBIND_WARN_PWD_EXPIRE); /* no or broken setting */ - if (ret <= 0) { + if (ret < 0) { return DEFAULT_DAYS_TO_WARN_BEFORE_PWD_EXPIRES; } return ret; |