summaryrefslogtreecommitdiff
path: root/source4/auth/auth_sam.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-02-28 08:50:00 +1100
committerAndrew Bartlett <abartlet@samba.org>2008-02-28 08:50:00 +1100
commit5043215f219f90a899a8dc75518540a04b93301f (patch)
tree61b72bfb81e80cb61739c40351b20422b632cbc8 /source4/auth/auth_sam.c
parent446fb38765c8b3d0e8cf3f74442029cabca3a41b (diff)
downloadsamba-5043215f219f90a899a8dc75518540a04b93301f.tar.gz
samba-5043215f219f90a899a8dc75518540a04b93301f.tar.bz2
samba-5043215f219f90a899a8dc75518540a04b93301f.zip
Generate ACB_PW_EXPIRED correctly
More correctly handle expired passwords, and do not expire machine accounts. Test that the behaviour is consistant with windows, using the RPC-SAMR test. Change NETLOGON to directly query the userAccountControl, just because we don't want to do the extra expiry processing here. Andrew Bartlett (This used to be commit acda1f69bc9b9c43e157e254d0bae54d11363661)
Diffstat (limited to 'source4/auth/auth_sam.c')
-rw-r--r--source4/auth/auth_sam.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/auth/auth_sam.c b/source4/auth/auth_sam.c
index 9189640150..4cb8d2b304 100644
--- a/source4/auth/auth_sam.c
+++ b/source4/auth/auth_sam.c
@@ -226,7 +226,9 @@ static NTSTATUS authsam_authenticate(struct auth_context *auth_context,
{
struct samr_Password *lm_pwd, *nt_pwd;
NTSTATUS nt_status;
- uint16_t acct_flags = samdb_result_acct_flags(msgs[0], "userAccountControl");
+ struct ldb_dn *domain_dn = samdb_result_dn(sam_ctx, mem_ctx, msgs_domain_ref[0], "nCName", NULL);
+
+ uint16_t acct_flags = samdb_result_acct_flags(sam_ctx, mem_ctx, msgs[0], domain_dn);
/* Quit if the account was locked out. */
if (acct_flags & ACB_AUTOLOCK) {