diff options
author | Jeremy Allison <jra@samba.org> | 2008-06-24 16:42:30 -0700 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2008-06-25 09:25:54 +0200 |
commit | 46888ae889092f099d159530bf5fd58007275e9c (patch) | |
tree | 70e74cab107942254b684d85416f30e7a8e499b8 | |
parent | a142ff51235ce0158417917a7cf1650dda62b206 (diff) | |
download | samba-46888ae889092f099d159530bf5fd58007275e9c.tar.gz |
Fix bug #5555. Don't return NT_STATUS_PASSWORD_MUST_CHANGE error on machine account logon.
Jeremy.
(cherry picked from commit 2a3e2c9550acb1c55c0c55e4bfb0faaadad2f6fd)
-rw-r--r-- | source/auth/auth_sam.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/auth/auth_sam.c b/source/auth/auth_sam.c index 4d25d31b565..66952ff4969 100644 --- a/source/auth/auth_sam.c +++ b/source/auth/auth_sam.c @@ -166,8 +166,9 @@ static NTSTATUS sam_account_ok(TALLOC_CTX *mem_ctx, time_t must_change_time = pdb_get_pass_must_change_time(sampass); time_t last_set_time = pdb_get_pass_last_set_time(sampass); - /* check for immediate expiry "must change at next logon" */ - if (last_set_time == 0) { + /* check for immediate expiry "must change at next logon" + * for a user account. */ + if (((acct_ctrl & (ACB_WSTRUST|ACB_SVRTRUST)) == 0) && (last_set_time == 0)) { DEBUG(1,("sam_account_ok: Account for user '%s' password must change!.\n", pdb_get_username(sampass))); return NT_STATUS_PASSWORD_MUST_CHANGE; } |