mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
winbindd: remove bogus fallback to the forest root in wb_lookupsid*()
It's the job of the domain controller in our domain to traverse the trust chain. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
parent
a29da90059
commit
0eb537adb1
@ -71,36 +71,15 @@ static void wb_lookupsid_done(struct tevent_req *subreq)
|
||||
subreq, struct tevent_req);
|
||||
struct wb_lookupsid_state *state = tevent_req_data(
|
||||
req, struct wb_lookupsid_state);
|
||||
struct winbindd_domain *forest_root;
|
||||
NTSTATUS status, result;
|
||||
|
||||
status = dcerpc_wbint_LookupSid_recv(subreq, state, &result);
|
||||
TALLOC_FREE(subreq);
|
||||
if (tevent_req_nterror(req, status)) {
|
||||
if (any_nt_status_not_ok(status, result, &status)) {
|
||||
tevent_req_nterror(req, status);
|
||||
return;
|
||||
}
|
||||
if (NT_STATUS_IS_OK(result)) {
|
||||
tevent_req_done(req);
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Let's try the forest root
|
||||
*/
|
||||
forest_root = find_root_domain();
|
||||
if ((forest_root == NULL) || (forest_root == state->lookup_domain)) {
|
||||
tevent_req_nterror(req, result);
|
||||
return;
|
||||
}
|
||||
state->lookup_domain = forest_root;
|
||||
|
||||
subreq = dcerpc_wbint_LookupSid_send(
|
||||
state, state->ev, dom_child_handle(state->lookup_domain),
|
||||
&state->sid, &state->type, &state->domname, &state->name);
|
||||
if (tevent_req_nomem(subreq, req)) {
|
||||
return;
|
||||
}
|
||||
tevent_req_set_callback(subreq, wb_lookupsid_done, req);
|
||||
tevent_req_done(req);
|
||||
}
|
||||
|
||||
NTSTATUS wb_lookupsid_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
|
||||
|
Loading…
Reference in New Issue
Block a user