]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3-pam_winbind: Fix Bug 6253: Use correct value for password expiry calculation.
authorGünther Deschner <gd@samba.org>
Tue, 5 May 2009 10:54:21 +0000 (12:54 +0200)
committerKarolin Seeger <kseeger@samba.org>
Fri, 19 Jun 2009 06:17:54 +0000 (08:17 +0200)
Based on patch from Blindauer Emmanuel <samba@mooby.net>.

Guenther

source/nsswitch/pam_winbind.c

index 26ef1d4fae28a08e4d8ccf025638ef28abda3ad0..1211ffd44de46fb67f541fa292be0c245fdbd2cb 100644 (file)
@@ -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;
        }