s3: Add ACB_NORMAL to workstations, match RPC-SAMR
authorVolker Lendecke <vl@samba.org>
Sat, 19 Feb 2011 16:52:50 +0000 (17:52 +0100)
committerVolker Lendecke <vl@samba.org>
Sun, 20 Feb 2011 09:23:29 +0000 (10:23 +0100)
source3/passdb/pdb_ads.c

index 0dc39fd308de7394da7a174a2a95b34407506969..51aac2cd7a7a1006bee1e5eb5ccf819faf3d65b9 100644 (file)
@@ -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) {
                        /*