From: Günther Deschner Date: Tue, 5 May 2009 10:54:21 +0000 (+0200) Subject: s3-pam_winbind: Fix Bug 6253: Use correct value for password expiry calculation. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3815e87f1ffea44c4d76e6c2515ff4894f6896c9;p=thirdparty%2Fsamba.git s3-pam_winbind: Fix Bug 6253: Use correct value for password expiry calculation. Based on patch from Blindauer Emmanuel . Guenther --- diff --git a/source/nsswitch/pam_winbind.c b/source/nsswitch/pam_winbind.c index 26ef1d4fae2..1211ffd44de 100644 --- a/source/nsswitch/pam_winbind.c +++ b/source/nsswitch/pam_winbind.c @@ -914,7 +914,8 @@ static void _pam_warn_password_expiry(struct pwb_context *ctx, /* now check for the global password policy */ /* good catch from Ralf Haferkamp: an expiry of "never" is translated * to -1 */ - if (policy->expire <= 0) { + if ((policy->expire == (int64_t)-1) || + (policy->expire == 0)) { return; }