s4:SAMR RPC - Fix the criteria for group searches
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Tue, 12 Jan 2010 21:16:36 +0000 (22:16 +0100)
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Thu, 14 Jan 2010 09:58:06 +0000 (10:58 +0100)
This should match the MS-SAMR documentation (section 3.1.5.5.1.1)

source4/rpc_server/samr/dcesrv_samr.c

index 1621003ea3dc926c79c69eacc17e1f0f7893047d..7de2377fe9e48a9418f66ea0b2b1b14d400c631e 100644 (file)
@@ -521,11 +521,11 @@ static NTSTATUS dcesrv_samr_info_DomGeneralInformation(struct samr_domain_state
        info->num_users = samdb_search_count(state->sam_ctx, state->domain_dn,
                                             "(objectClass=user)");
        info->num_groups = samdb_search_count(state->sam_ctx, state->domain_dn,
        info->num_users = samdb_search_count(state->sam_ctx, state->domain_dn,
                                             "(objectClass=user)");
        info->num_groups = samdb_search_count(state->sam_ctx, state->domain_dn,
-                                             "(&(objectClass=group)(sAMAccountType=%u))",
-                                             ATYPE_GLOBAL_GROUP);
+                                             "(&(objectClass=group)(groupType=%u))",
+                                             GTYPE_SECURITY_GLOBAL_GROUP);
        info->num_aliases = samdb_search_count(state->sam_ctx, state->domain_dn,
        info->num_aliases = samdb_search_count(state->sam_ctx, state->domain_dn,
-                                              "(&(objectClass=group)(sAMAccountType=%u))",
-                                              ATYPE_LOCAL_GROUP);
+                                              "(&(objectClass=group)(groupType=%u))",
+                                              GTYPE_SECURITY_DOMAIN_LOCAL_GROUP);
 
        return NT_STATUS_OK;
 }
 
        return NT_STATUS_OK;
 }