r23358: Fix from Justin Maggard <jmaggard@infrant.com> - ensure we don't
[sfrench/samba-autobuild/.git] / source / auth / auth_sam.c
index 64556cabd34f04c936815957e7d64bea10b8a8bb..b6364a6ca49537953b07ddb3cfeb31ed62c1bf56 100644 (file)
@@ -163,7 +163,7 @@ static NTSTATUS sam_account_ok(TALLOC_CTX *mem_ctx,
                return NT_STATUS_ACCOUNT_EXPIRED;
        }
 
-       if (!(pdb_get_acct_ctrl(sampass) & ACB_PWNOEXP)) {
+       if (!(pdb_get_acct_ctrl(sampass) & ACB_PWNOEXP) && !(pdb_get_acct_ctrl(sampass) & ACB_PWNOTREQ)) {
                time_t must_change_time = pdb_get_pass_must_change_time(sampass);
                time_t last_set_time = pdb_get_pass_last_set_time(sampass);