diff options
author | Jeremy Allison <jra@samba.org> | 2008-06-24 16:37:15 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2008-06-24 16:37:15 -0700 |
commit | ee6b168e6ea7ef0d7b498b5c881ac28d48e07c6f (patch) | |
tree | e94bcc57c06bdf199d40b335a4f39a1f5417992b /source3/auth | |
parent | 2341f3381d32972eade1286891a8c45ebce756df (diff) | |
download | samba-ee6b168e6ea7ef0d7b498b5c881ac28d48e07c6f.tar.gz samba-ee6b168e6ea7ef0d7b498b5c881ac28d48e07c6f.tar.bz2 samba-ee6b168e6ea7ef0d7b498b5c881ac28d48e07c6f.zip |
Fix bug #5555. Don't return NT_STATUS_PASSWORD_MUST_CHANGE error on machine account logon.
Jeremy.
(This used to be commit 10da498a2349bf5944183adf5a9284eafa2b8b74)
Diffstat (limited to 'source3/auth')
-rw-r--r-- | source3/auth/auth_sam.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c index 5e393f7220..50bf15318b 100644 --- a/source3/auth/auth_sam.c +++ b/source3/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; } |