From 0a74caa473f491050bc5f64b6d6956c00088c5cd Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 27 Jun 2011 14:34:39 +0200 Subject: s3: explicitly pass domain_sid to wbint_LookupRids() (bug #7841) Autobuild-User: Volker Lendecke Autobuild-Date: Mon Jun 27 18:21:30 CEST 2011 on sn-devel-104 --- source3/winbindd/winbindd_lookuprids.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'source3/winbindd/winbindd_lookuprids.c') diff --git a/source3/winbindd/winbindd_lookuprids.c b/source3/winbindd/winbindd_lookuprids.c index 738adbaefc..e1d7d18e0b 100644 --- a/source3/winbindd/winbindd_lookuprids.c +++ b/source3/winbindd/winbindd_lookuprids.c @@ -24,6 +24,7 @@ struct winbindd_lookuprids_state { struct tevent_context *ev; + struct dom_sid domain_sid; const char *domain_name; struct wbint_RidArray rids; struct wbint_Principals names; @@ -42,7 +43,6 @@ struct tevent_req *winbindd_lookuprids_send(TALLOC_CTX *mem_ctx, struct tevent_req *req, *subreq; struct winbindd_lookuprids_state *state; struct winbindd_domain *domain; - struct dom_sid sid; req = tevent_req_create(mem_ctx, &state, struct winbindd_lookuprids_state); @@ -56,16 +56,16 @@ struct tevent_req *winbindd_lookuprids_send(TALLOC_CTX *mem_ctx, DEBUG(3, ("lookuprids (%s)\n", request->data.sid)); - if (!string_to_sid(&sid, request->data.sid)) { + if (!string_to_sid(&state->domain_sid, request->data.sid)) { DEBUG(5, ("%s not a SID\n", request->data.sid)); tevent_req_nterror(req, NT_STATUS_INVALID_PARAMETER); return tevent_req_post(req, ev); } - domain = find_lookup_domain_from_sid(&sid); + domain = find_lookup_domain_from_sid(&state->domain_sid); if (domain == NULL) { DEBUG(5, ("Domain for sid %s not found\n", - sid_string_dbg(&sid))); + sid_string_dbg(&state->domain_sid))); tevent_req_nterror(req, NT_STATUS_NO_SUCH_DOMAIN); return tevent_req_post(req, ev); } @@ -84,8 +84,8 @@ struct tevent_req *winbindd_lookuprids_send(TALLOC_CTX *mem_ctx, } subreq = dcerpc_wbint_LookupRids_send( - state, ev, dom_child_handle(domain), &state->rids, - &state->domain_name, &state->names); + state, ev, dom_child_handle(domain), &state->domain_sid, + &state->rids, &state->domain_name, &state->names); if (tevent_req_nomem(subreq, req)) { return tevent_req_post(req, ev); } -- cgit