s4:SAMR RPC - Fix the criteria for group searches
[ira/wip.git] / 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,
-                                             "(&(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,
-                                              "(&(objectClass=group)(sAMAccountType=%u))",
-                                              ATYPE_LOCAL_GROUP);
+                                              "(&(objectClass=group)(groupType=%u))",
+                                              GTYPE_SECURITY_DOMAIN_LOCAL_GROUP);
 
        return NT_STATUS_OK;
 }