s3-pam_winbind: Fix Bug 6253: Use correct value for password expiry calculation.
authorGünther Deschner <gd@samba.org>
Thu, 18 Jun 2009 23:57:16 +0000 (01:57 +0200)
committerGünther Deschner <gd@samba.org>
Thu, 18 Jun 2009 23:59:17 +0000 (01:59 +0200)
Based on patch from Blindauer Emmanuel <samba@mooby.net>.

Guenther

nsswitch/pam_winbind.c

index 545c87d0c4b811b168b0e76bafa1dd0da17484b3..e90f1b75ad63973e1dcca996ef97b30cc78f5727 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 == -1) {
+       if ((policy->expire == (int64_t)-1) ||
+           (policy->expire == 0)) {
                return;
        }