#include "includes.h"
#include "winbindd.h"
#include "librpc/gen_ndr/cli_wbint.h"
+#include "../libcli/security/security.h"
struct wb_lookupusergroups_state {
struct tevent_context *ev;
{
struct tevent_req *req, *subreq;
struct wb_lookupusergroups_state *state;
- NTSTATUS status;
req = tevent_req_create(mem_ctx, &state,
struct wb_lookupusergroups_state);
}
sid_copy(&state->sid, sid);
- status = wcache_lookup_usergroups(domain, state, sid,
- &state->sids.num_sids,
- &state->sids.sids);
- if (NT_STATUS_IS_OK(status)) {
- tevent_req_done(req);
- return tevent_req_post(req, ev);
- }
-
- subreq = rpccli_wbint_LookupUserGroups_send(
- state, ev, domain->child.rpccli, &state->sid, &state->sids);
+ subreq = dcerpc_wbint_LookupUserGroups_send(
+ state, ev, domain->child.binding_handle, &state->sid, &state->sids);
if (tevent_req_nomem(subreq, req)) {
return tevent_req_post(req, ev);
}
req, struct wb_lookupusergroups_state);
NTSTATUS status, result;
- status = rpccli_wbint_LookupUserGroups_recv(subreq, state, &result);
+ status = dcerpc_wbint_LookupUserGroups_recv(subreq, state, &result);
TALLOC_FREE(subreq);
- if (!NT_STATUS_IS_OK(status)) {
+ if (any_nt_status_not_ok(status, result, &status)) {
tevent_req_nterror(req, status);
return;
}
- if (!NT_STATUS_IS_OK(result)) {
- tevent_req_nterror(req, result);
- return;
- }
tevent_req_done(req);
}