Treat maxPwdAge == 0 as passwords never expire.
authorAndrew Kroeger <andrew@sprocks.gotdns.com>
Fri, 7 Mar 2008 11:56:04 +0000 (05:56 -0600)
committerAndrew Kroeger <andrew@sprocks.gotdns.com>
Fri, 7 Mar 2008 11:59:56 +0000 (05:59 -0600)
(This used to be commit d28f2cb678b334086f601505c88e56b9c1ee559d)

source4/dsdb/common/util.c

index 07a433780b4a6365479775ed2dcd8c9b821f2a82..88c8afd6ccae50cde955e8a84444019289334dfc 100644 (file)
@@ -517,7 +517,7 @@ NTTIME samdb_result_force_password_change(struct ldb_context *sam_ldb,
 
        maxPwdAge = samdb_search_int64(sam_ldb, mem_ctx, 0, domain_dn, "maxPwdAge", NULL);
        if (maxPwdAge == 0) {
-               return 0;
+               return 0x7FFFFFFFFFFFFFFFULL;
        } else {
                attr_time -= maxPwdAge;
        }