static NTSTATUS dcerpc_lsa_lookup_sids_noalloc(struct dcerpc_binding_handle *h,
TALLOC_CTX *mem_ctx,
+ TALLOC_CTX *domains_ctx,
+ TALLOC_CTX *names_ctx,
struct policy_handle *pol,
int num_sids,
const struct dom_sid *sids,
name = lsa_names.names[i].name.string;
if (name) {
- (names)[i] = talloc_strdup(names, name);
+ (names)[i] = talloc_strdup(names_ctx, name);
if ((names)[i] == NULL) {
DEBUG(0, ("cli_lsa_lookup_sids_noalloc(): out of memory\n"));
*presult = NT_STATUS_UNSUCCESSFUL;
} else {
(names)[i] = NULL;
}
- domains[i] = talloc_strdup(domains,
+ domains[i] = talloc_strdup(domains_ctx,
dom_name ? dom_name : "");
(types)[i] = lsa_names.names[i].sid_type;
if ((domains)[i] == NULL) {
status = dcerpc_lsa_lookup_sids_noalloc(h,
mem_ctx,
+ (TALLOC_CTX *)domains,
+ (TALLOC_CTX *)names,
pol,
hunk_num_sids,
hunk_sids,
}
sids_left -= hunk_num_sids;
- sids_processed += hunk_num_sids; /* only used in DEBUG */
+ sids_processed += hunk_num_sids;
hunk_sids += hunk_num_sids;
hunk_domains += hunk_num_sids;
hunk_names += hunk_num_sids;