summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-02-05 15:55:11 +0100
committerGünther Deschner <gd@samba.org>2008-02-06 02:09:04 +0100
commitb0374e6b34ada32e74288d8984c5476661217348 (patch)
treed5b57ad8edcc0c0cbc95eb4aeaca5bec87ce98ce /source3
parent498e6786e41c0ea417f65e18a60b24b99fb54671 (diff)
downloadsamba-b0374e6b34ada32e74288d8984c5476661217348.tar.gz
samba-b0374e6b34ada32e74288d8984c5476661217348.tar.bz2
samba-b0374e6b34ada32e74288d8984c5476661217348.zip
Use rpccli_samr_QueryDomainInfo() in net rpc.
Guenther (This used to be commit 82073db9f717249ccf108b238ed64170163fc4a7)
Diffstat (limited to 'source3')
-rw-r--r--source3/utils/net_rpc.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 2d4302f970..a1e093a335 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -445,7 +445,7 @@ NTSTATUS rpc_info_internals(const DOM_SID *domain_sid,
{
POLICY_HND connect_pol, domain_pol;
NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
- SAM_UNK_CTR ctr;
+ union samr_DomainInfo *info = NULL;
fstring sid_str;
sid_to_fstring(sid_str, domain_sid);
@@ -471,18 +471,18 @@ NTSTATUS rpc_info_internals(const DOM_SID *domain_sid,
goto done;
}
- ZERO_STRUCT(ctr);
- result = rpccli_samr_query_dom_info(pipe_hnd, mem_ctx, &domain_pol,
- 2, &ctr);
+ result = rpccli_samr_QueryDomainInfo(pipe_hnd, mem_ctx,
+ &domain_pol,
+ 2,
+ &info);
if (NT_STATUS_IS_OK(result)) {
- TALLOC_CTX *ctx = talloc_init("rpc_info_internals");
- d_printf("Domain Name: %s\n", unistr2_to_ascii_talloc(ctx, &ctr.info.inf2.uni_domain));
+ d_printf("Domain Name: %s\n", info->info2.domain_name.string);
d_printf("Domain SID: %s\n", sid_str);
- d_printf("Sequence number: %llu\n", (unsigned long long)ctr.info.inf2.seq_num);
- d_printf("Num users: %u\n", ctr.info.inf2.num_domain_usrs);
- d_printf("Num domain groups: %u\n", ctr.info.inf2.num_domain_grps);
- d_printf("Num local groups: %u\n", ctr.info.inf2.num_local_grps);
- talloc_destroy(ctx);
+ d_printf("Sequence number: %llu\n",
+ (unsigned long long)info->info2.sequence_num);
+ d_printf("Num users: %u\n", info->info2.num_users);
+ d_printf("Num domain groups: %u\n", info->info2.num_groups);
+ d_printf("Num local groups: %u\n", info->info2.num_aliases);
}
done: