Use rpccli_samr_EnumDomainGroups in rpcclient.
authorGünther Deschner <gd@samba.org>
Tue, 12 Feb 2008 10:17:53 +0000 (11:17 +0100)
committerGünther Deschner <gd@samba.org>
Tue, 12 Feb 2008 10:17:53 +0000 (11:17 +0100)
Guenther
(This used to be commit e76c350dabae421c56c92decf413161e54549c10)

source3/rpcclient/cmd_samr.c

index 5ee28c63361ea49242fc80655b4a9d330ba92313..3d6866e57edd3f52d2d7c199597fc166a9ffeb09 100644 (file)
@@ -898,7 +898,7 @@ static NTSTATUS cmd_samr_enum_dom_groups(struct rpc_pipe_client *cli,
        NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
        uint32 start_idx, size, num_dom_groups, i;
        uint32 access_mask = MAXIMUM_ALLOWED_ACCESS;
-       struct acct_info *dom_groups;
+       struct samr_SamArray *dom_groups = NULL;
        bool got_connect_pol = False, got_domain_pol = False;
 
        if ((argc < 1) || (argc > 2)) {
@@ -938,17 +938,19 @@ static NTSTATUS cmd_samr_enum_dom_groups(struct rpc_pipe_client *cli,
        size = 0xffff;
 
        do {
-               result = rpccli_samr_enum_dom_groups(
-                       cli, mem_ctx, &domain_pol, &start_idx, size,
-                       &dom_groups, &num_dom_groups);
-
+               result = rpccli_samr_EnumDomainGroups(cli, mem_ctx,
+                                                     &domain_pol,
+                                                     &start_idx,
+                                                     &dom_groups,
+                                                     size,
+                                                     &num_dom_groups);
                if (NT_STATUS_IS_OK(result) ||
                    NT_STATUS_V(result) == NT_STATUS_V(STATUS_MORE_ENTRIES)) {
 
                        for (i = 0; i < num_dom_groups; i++)
                                printf("group:[%s] rid:[0x%x]\n",
-                                      dom_groups[i].acct_name,
-                                      dom_groups[i].rid);
+                                      dom_groups->entries[i].name.string,
+                                      dom_groups->entries[i].idx);
                }
 
        } while (NT_STATUS_V(result) == NT_STATUS_V(STATUS_MORE_ENTRIES));