r23358: Fix from Justin Maggard <jmaggard@infrant.com> - ensure we don't
authorJeremy Allison <jra@samba.org>
Tue, 5 Jun 2007 23:35:39 +0000 (23:35 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:23:09 +0000 (12:23 -0500)
expire a password if it's explicitly set as ACB_PWNOTREQ.
Jeremy.

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);