diff options
Diffstat (limited to 'source3/passdb')
-rw-r--r-- | source3/passdb/pdb_ads.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/passdb/pdb_ads.c b/source3/passdb/pdb_ads.c index 0dc39fd308..51aac2cd7a 100644 --- a/source3/passdb/pdb_ads.c +++ b/source3/passdb/pdb_ads.c @@ -1966,7 +1966,15 @@ static bool pdb_ads_search_filter(struct pdb_methods *m, continue; } sid_peek_rid(&sid, &e->rid); - e->acct_flags = ACB_NORMAL; + + if (tldap_pull_uint32(users[i], "userAccountControl", &ctrl)) { + e->acct_flags = ds_uf2acb(ctrl); + if (e->acct_flags & (ACB_WSTRUST|ACB_SVRTRUST)) { + e->acct_flags |= ACB_NORMAL; + } + } else { + e->acct_flags = ACB_NORMAL; + } if (e->rid == DOMAIN_RID_GUEST) { /* |