summaryrefslogtreecommitdiff
path: root/source4/libnet/libnet_user.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libnet/libnet_user.c')
-rw-r--r--source4/libnet/libnet_user.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source4/libnet/libnet_user.c b/source4/libnet/libnet_user.c
index dce7320c73..c768319452 100644
--- a/source4/libnet/libnet_user.c
+++ b/source4/libnet/libnet_user.c
@@ -957,7 +957,9 @@ struct composite_context* libnet_UserList_send(struct libnet_context *ctx,
/* prepare arguments of QueryDomainInfo call */
s->query_domain.in.handle = &ctx->lsa.handle;
s->query_domain.in.level = LSA_POLICY_INFO_DOMAIN;
-
+ s->query_domain.out.info = talloc_zero(c, union lsa_PolicyInformation *);
+ if (composite_nomem(s->query_domain.out.info, c)) return c;
+
/* send the request */
query_req = dcerpc_lsa_QueryInfoPolicy_send(ctx->lsa.pipe, c, &s->query_domain);
if (composite_nomem(query_req, c)) return c;
@@ -987,6 +989,8 @@ static void continue_lsa_domain_opened(struct composite_context *ctx)
/* prepare arguments of QueryDomainInfo call */
s->query_domain.in.handle = &s->ctx->lsa.handle;
s->query_domain.in.level = LSA_POLICY_INFO_DOMAIN;
+ s->query_domain.out.info = talloc_zero(c, union lsa_PolicyInformation *);
+ if (composite_nomem(s->query_domain.out.info, c)) return;
/* send the request */
query_req = dcerpc_lsa_QueryInfoPolicy_send(s->ctx->lsa.pipe, c, &s->query_domain);
@@ -1015,7 +1019,7 @@ static void continue_domain_queried(struct rpc_request *req)
if (!composite_is_ok(c)) return;
/* get the returned domain info */
- s->dominfo = s->query_domain.out.info->domain;
+ s->dominfo = (*s->query_domain.out.info)->domain;
/* make sure we have samr domain handle before continuing */
prereq_met = samr_domain_opened(s->ctx, s->domain_name, &c, &s->domain_open,
@@ -1107,7 +1111,7 @@ static void continue_users_enumerated(struct rpc_request *req)
for (i = 0; i < s->user_list.out.sam->count; i++) {
struct dom_sid *user_sid;
struct samr_SamEntry *entry = &s->user_list.out.sam->entries[i];
- struct dom_sid *domain_sid = s->query_domain.out.info->domain.sid;
+ struct dom_sid *domain_sid = (*s->query_domain.out.info)->domain.sid;
/* construct user sid from returned rid and queried domain sid */
user_sid = dom_sid_add_rid(c, domain_sid, entry->idx);