summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2011-06-27 14:34:39 +0200
committerVolker Lendecke <vlendec@samba.org>2011-06-27 18:21:30 +0200
commit0a74caa473f491050bc5f64b6d6956c00088c5cd (patch)
tree9da7237b0311c8efde89dbda6520111ef9e2ca3f /source3
parent2ff0d5882fe5df0113eaaa4728bab4057a3f324b (diff)
downloadsamba-0a74caa473f491050bc5f64b6d6956c00088c5cd.tar.gz
samba-0a74caa473f491050bc5f64b6d6956c00088c5cd.tar.bz2
samba-0a74caa473f491050bc5f64b6d6956c00088c5cd.zip
s3: explicitly pass domain_sid to wbint_LookupRids() (bug #7841)
Autobuild-User: Volker Lendecke <vlendec@samba.org> Autobuild-Date: Mon Jun 27 18:21:30 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/librpc/idl/wbint.idl1
-rw-r--r--source3/winbindd/wb_lookupsids.c2
-rw-r--r--source3/winbindd/winbindd_dual_srv.c5
-rw-r--r--source3/winbindd/winbindd_lookuprids.c12
4 files changed, 11 insertions, 9 deletions
diff --git a/source3/librpc/idl/wbint.idl b/source3/librpc/idl/wbint.idl
index 5f7e9bf808..cb8a4e42a3 100644
--- a/source3/librpc/idl/wbint.idl
+++ b/source3/librpc/idl/wbint.idl
@@ -164,6 +164,7 @@ interface wbint
);
NTSTATUS wbint_LookupRids(
+ [in] dom_sid *domain_sid,
[in] wbint_RidArray *rids,
[out,string,charset(UTF8)] char **domain_name,
[out] wbint_Principals *names
diff --git a/source3/winbindd/wb_lookupsids.c b/source3/winbindd/wb_lookupsids.c
index 03b2ca9029..b4b7b9c8cb 100644
--- a/source3/winbindd/wb_lookupsids.c
+++ b/source3/winbindd/wb_lookupsids.c
@@ -198,7 +198,7 @@ static bool wb_lookupsids_next(struct tevent_req *req,
}
subreq = dcerpc_wbint_LookupRids_send(
state, state->ev, dom_child_handle(d->domain),
- &state->rids, &state->domain_name,
+ &d->sid, &state->rids, &state->domain_name,
&state->rid_names);
if (tevent_req_nomem(subreq, req)) {
return false;
diff --git a/source3/winbindd/winbindd_dual_srv.c b/source3/winbindd/winbindd_dual_srv.c
index c2510bc84d..a52951e560 100644
--- a/source3/winbindd/winbindd_dual_srv.c
+++ b/source3/winbindd/winbindd_dual_srv.c
@@ -494,7 +494,7 @@ NTSTATUS _wbint_LookupRids(struct pipes_struct *p, struct wbint_LookupRids *r)
}
status = domain->methods->rids_to_names(
- domain, talloc_tos(), &domain->sid, r->in.rids->rids,
+ domain, talloc_tos(), r->in.domain_sid, r->in.rids->rids,
r->in.rids->num_rids, &domain_name, &names, &types);
if (!NT_STATUS_IS_OK(status)) {
return status;
@@ -509,7 +509,8 @@ NTSTATUS _wbint_LookupRids(struct pipes_struct *p, struct wbint_LookupRids *r)
}
for (i=0; i<r->in.rids->num_rids; i++) {
- sid_compose(&result[i].sid, &domain->sid, r->in.rids->rids[i]);
+ sid_compose(&result[i].sid, r->in.domain_sid,
+ r->in.rids->rids[i]);
result[i].type = types[i];
result[i].name = talloc_move(result, &names[i]);
}
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);
}