summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-02-13 00:25:40 +0100
committerGünther Deschner <gd@samba.org>2008-02-13 00:29:37 +0100
commit0ba3d44f7321cb235eb214194395d5da02824690 (patch)
tree6e383ccde2598de941883c5794632867de05f3c2 /source3/winbindd
parentf57c67b8f3e75a9aa50c24ff892b12b530de6a38 (diff)
downloadsamba-0ba3d44f7321cb235eb214194395d5da02824690.tar.gz
samba-0ba3d44f7321cb235eb214194395d5da02824690.tar.bz2
samba-0ba3d44f7321cb235eb214194395d5da02824690.zip
Use rpccli_lsa_EnumTrustDom all over the place.
Guenther (This used to be commit a25e7ffbca9c2c97dd36b0596e7cb38a72aaf9d9)
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/winbindd_rpc.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/source3/winbindd/winbindd_rpc.c b/source3/winbindd/winbindd_rpc.c
index 2703f2f64a..326ff61122 100644
--- a/source3/winbindd/winbindd_rpc.c
+++ b/source3/winbindd/winbindd_rpc.c
@@ -1008,22 +1008,24 @@ static NTSTATUS trusted_domains(struct winbindd_domain *domain,
result = STATUS_MORE_ENTRIES;
while (NT_STATUS_EQUAL(result, STATUS_MORE_ENTRIES)) {
- uint32 start_idx, num;
+ uint32 start_idx;
char **tmp_names;
DOM_SID *tmp_sids;
int i;
+ struct lsa_DomainList dom_list;
- result = rpccli_lsa_enum_trust_dom(cli, mem_ctx,
- &lsa_policy, &enum_ctx,
- &num, &tmp_names,
- &tmp_sids);
+ result = rpccli_lsa_EnumTrustDom(cli, mem_ctx,
+ &lsa_policy,
+ &enum_ctx,
+ &dom_list,
+ (uint32_t)-1);
if (!NT_STATUS_IS_OK(result) &&
!NT_STATUS_EQUAL(result, STATUS_MORE_ENTRIES))
break;
start_idx = *num_domains;
- *num_domains += num;
+ *num_domains += dom_list.count;
*names = TALLOC_REALLOC_ARRAY(mem_ctx, *names,
char *, *num_domains);
*dom_sids = TALLOC_REALLOC_ARRAY(mem_ctx, *dom_sids,
@@ -1035,8 +1037,8 @@ static NTSTATUS trusted_domains(struct winbindd_domain *domain,
return NT_STATUS_NO_MEMORY;
for (i=0; i<num; i++) {
- (*names)[start_idx+i] = tmp_names[i];
- (*dom_sids)[start_idx+i] = tmp_sids[i];
+ (*names)[start_idx+i] = dom_list.domains[i].name.string;
+ (*dom_sids)[start_idx+i] = dom_list.domains[i].sid;
(*alt_names)[start_idx+i] = talloc_strdup(mem_ctx, "");
}
}