1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00

Use rpccli_samr_QueryDomainInfo() in net rpc.

Guenther
This commit is contained in:
Günther Deschner 2008-02-05 15:55:11 +01:00
parent ed16b2f63b
commit 82073db9f7

View File

@ -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: