s3: Fix bug 7842: WINBIND_LOOKUPRIDS does not return the proper domain name
authorVolker Lendecke <vl@samba.org>
Sat, 4 Dec 2010 19:16:00 +0000 (20:16 +0100)
committerJeremy Allison <jra@samba.org>
Mon, 6 Dec 2010 20:18:07 +0000 (21:18 +0100)
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Dec  6 21:18:07 CET 2010 on sn-devel-104

source3/librpc/idl/wbint.idl
source3/winbindd/winbindd_dual_srv.c
source3/winbindd/winbindd_lookuprids.c

index 4ac36930d3855c6c47e6cf6c9eddd13b5ea7df6a..470fb8b7eb39d4eaba1847f3134c0dd61c5901d8 100644 (file)
@@ -142,6 +142,7 @@ interface wbint
 
     NTSTATUS wbint_LookupRids(
        [in] wbint_RidArray *rids,
+       [out,string,charset(UTF8)] char **domain_name,
        [out] wbint_Principals *names
        );
 
index b661fb37e44b4f5b82881b7461a6a254ca3db9c3..1501fd8c6dbf8a098009f563835b72ef1402a900 100644 (file)
@@ -385,6 +385,8 @@ NTSTATUS _wbint_LookupRids(struct pipes_struct *p, struct wbint_LookupRids *r)
                return status;
        }
 
+       *r->out.domain_name = talloc_move(r->out.domain_name, &domain_name);
+
        result = talloc_array(p->mem_ctx, struct wbint_Principal,
                              r->in.rids->num_rids);
        if (result == NULL) {
index bd0a94601330b6b6bf174871470ff69f449c3bd6..5577ad47431b177371efeba8d760fe8bfdcf12ee 100644 (file)
@@ -84,7 +84,8 @@ struct tevent_req *winbindd_lookuprids_send(TALLOC_CTX *mem_ctx,
        }
 
        subreq = dcerpc_wbint_LookupRids_send(
-               state, ev, domain->child.binding_handle, &state->rids, &state->names);
+               state, ev, domain->child.binding_handle, &state->rids,
+               &state->domain_name, &state->names);
        if (tevent_req_nomem(subreq, req)) {
                return tevent_req_post(req, ev);
        }