From 0eb537adb18c460bea34c9128a7c43e2fe85c812 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Fri, 10 Mar 2017 15:23:36 +0100 Subject: [PATCH] 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 Reviewed-by: Volker Lendecke --- source3/winbindd/wb_lookupsid.c | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/source3/winbindd/wb_lookupsid.c b/source3/winbindd/wb_lookupsid.c index 7ff5c1e0e22..8873ebb42ce 100644 --- a/source3/winbindd/wb_lookupsid.c +++ b/source3/winbindd/wb_lookupsid.c @@ -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, -- 2.47.3