diff options
Diffstat (limited to 'source3/librpc/gen_ndr/cli_wbint.c')
-rw-r--r-- | source3/librpc/gen_ndr/cli_wbint.c | 1647 |
1 files changed, 1647 insertions, 0 deletions
diff --git a/source3/librpc/gen_ndr/cli_wbint.c b/source3/librpc/gen_ndr/cli_wbint.c new file mode 100644 index 0000000000..de6b345a0e --- /dev/null +++ b/source3/librpc/gen_ndr/cli_wbint.c @@ -0,0 +1,1647 @@ +/* + * Unix SMB/CIFS implementation. + * client auto-generated by pidl. DO NOT MODIFY! + */ + +#include "includes.h" +#include "librpc/gen_ndr/cli_wbint.h" + +struct rpccli_wbint_Ping_state { + struct wbint_Ping orig; + struct wbint_Ping tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wbint_Ping_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wbint_Ping_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint32_t _in_data /* [in] */, + uint32_t *_out_data /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_wbint_Ping_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wbint_Ping_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.in_data = _in_data; + + /* Out parameters */ + state->orig.out.out_data = _out_data; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wbint_Ping, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_wbint_Ping_out_memory"); + if (tevent_req_nomem(state->out_mem_ctx, req)) { + return tevent_req_post(req, ev); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_wbint, + NDR_WBINT_PING, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wbint_Ping_done, req); + return req; +} + +static void rpccli_wbint_Ping_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wbint_Ping_state *state = tevent_req_data( + req, struct rpccli_wbint_Ping_state); + NTSTATUS status; + TALLOC_CTX *mem_ctx; + + if (state->out_mem_ctx) { + mem_ctx = state->out_mem_ctx; + } else { + mem_ctx = state; + } + + status = state->dispatch_recv(subreq, mem_ctx); + TALLOC_FREE(subreq); + if (!NT_STATUS_IS_OK(status)) { + tevent_req_nterror(req, status); + return; + } + + /* Copy out parameters */ + *state->orig.out.out_data = *state->tmp.out.out_data; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wbint_Ping, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wbint_Ping_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx) +{ + struct rpccli_wbint_Ping_state *state = tevent_req_data( + req, struct rpccli_wbint_Ping_state); + NTSTATUS status; + + if (tevent_req_is_nterror(req, &status)) { + tevent_req_received(req); + return status; + } + + /* Steal possbile out parameters to the callers context */ + talloc_steal(mem_ctx, state->out_mem_ctx); + + tevent_req_received(req); + return NT_STATUS_OK; +} + +NTSTATUS rpccli_wbint_Ping(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + uint32_t in_data /* [in] */, + uint32_t *out_data /* [out] [ref] */) +{ + struct wbint_Ping r; + NTSTATUS status; + + /* In parameters */ + r.in.in_data = in_data; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wbint_Ping, &r); + } + + status = cli->dispatch(cli, + mem_ctx, + &ndr_table_wbint, + NDR_WBINT_PING, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wbint_Ping, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *out_data = *r.out.out_data; + + /* Return result */ + return NT_STATUS_OK; +} + +struct rpccli_wbint_LookupSid_state { + struct wbint_LookupSid orig; + struct wbint_LookupSid tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wbint_LookupSid_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wbint_LookupSid_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct dom_sid *_sid /* [in] [ref] */, + enum lsa_SidType *_type /* [out] [ref] */, + const char **_domain /* [out] [ref,charset(UTF8)] */, + const char **_name /* [out] [ref,charset(UTF8)] */) +{ + struct tevent_req *req; + struct rpccli_wbint_LookupSid_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wbint_LookupSid_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.sid = _sid; + + /* Out parameters */ + state->orig.out.type = _type; + state->orig.out.domain = _domain; + state->orig.out.name = _name; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wbint_LookupSid, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_wbint_LookupSid_out_memory"); + if (tevent_req_nomem(state->out_mem_ctx, req)) { + return tevent_req_post(req, ev); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_wbint, + NDR_WBINT_LOOKUPSID, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wbint_LookupSid_done, req); + return req; +} + +static void rpccli_wbint_LookupSid_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wbint_LookupSid_state *state = tevent_req_data( + req, struct rpccli_wbint_LookupSid_state); + NTSTATUS status; + TALLOC_CTX *mem_ctx; + + if (state->out_mem_ctx) { + mem_ctx = state->out_mem_ctx; + } else { + mem_ctx = state; + } + + status = state->dispatch_recv(subreq, mem_ctx); + TALLOC_FREE(subreq); + if (!NT_STATUS_IS_OK(status)) { + tevent_req_nterror(req, status); + return; + } + + /* Copy out parameters */ + *state->orig.out.type = *state->tmp.out.type; + *state->orig.out.domain = *state->tmp.out.domain; + *state->orig.out.name = *state->tmp.out.name; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wbint_LookupSid, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wbint_LookupSid_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_wbint_LookupSid_state *state = tevent_req_data( + req, struct rpccli_wbint_LookupSid_state); + NTSTATUS status; + + if (tevent_req_is_nterror(req, &status)) { + tevent_req_received(req); + return status; + } + + /* Steal possbile out parameters to the callers context */ + talloc_steal(mem_ctx, state->out_mem_ctx); + + /* Return result */ + *result = state->orig.out.result; + + tevent_req_received(req); + return NT_STATUS_OK; +} + +NTSTATUS rpccli_wbint_LookupSid(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct dom_sid *sid /* [in] [ref] */, + enum lsa_SidType *type /* [out] [ref] */, + const char **domain /* [out] [ref,charset(UTF8)] */, + const char **name /* [out] [ref,charset(UTF8)] */) +{ + struct wbint_LookupSid r; + NTSTATUS status; + + /* In parameters */ + r.in.sid = sid; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wbint_LookupSid, &r); + } + + status = cli->dispatch(cli, + mem_ctx, + &ndr_table_wbint, + NDR_WBINT_LOOKUPSID, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wbint_LookupSid, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *type = *r.out.type; + *domain = *r.out.domain; + *name = *r.out.name; + + /* Return result */ + return r.out.result; +} + +struct rpccli_wbint_LookupName_state { + struct wbint_LookupName orig; + struct wbint_LookupName tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wbint_LookupName_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wbint_LookupName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_domain /* [in] [ref,charset(UTF8)] */, + const char *_name /* [in] [ref,charset(UTF8)] */, + uint32_t _flags /* [in] */, + enum lsa_SidType *_type /* [out] [ref] */, + struct dom_sid *_sid /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_wbint_LookupName_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wbint_LookupName_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.domain = _domain; + state->orig.in.name = _name; + state->orig.in.flags = _flags; + + /* Out parameters */ + state->orig.out.type = _type; + state->orig.out.sid = _sid; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wbint_LookupName, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_wbint_LookupName_out_memory"); + if (tevent_req_nomem(state->out_mem_ctx, req)) { + return tevent_req_post(req, ev); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_wbint, + NDR_WBINT_LOOKUPNAME, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wbint_LookupName_done, req); + return req; +} + +static void rpccli_wbint_LookupName_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wbint_LookupName_state *state = tevent_req_data( + req, struct rpccli_wbint_LookupName_state); + NTSTATUS status; + TALLOC_CTX *mem_ctx; + + if (state->out_mem_ctx) { + mem_ctx = state->out_mem_ctx; + } else { + mem_ctx = state; + } + + status = state->dispatch_recv(subreq, mem_ctx); + TALLOC_FREE(subreq); + if (!NT_STATUS_IS_OK(status)) { + tevent_req_nterror(req, status); + return; + } + + /* Copy out parameters */ + *state->orig.out.type = *state->tmp.out.type; + *state->orig.out.sid = *state->tmp.out.sid; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wbint_LookupName, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wbint_LookupName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_wbint_LookupName_state *state = tevent_req_data( + req, struct rpccli_wbint_LookupName_state); + NTSTATUS status; + + if (tevent_req_is_nterror(req, &status)) { + tevent_req_received(req); + return status; + } + + /* Steal possbile out parameters to the callers context */ + talloc_steal(mem_ctx, state->out_mem_ctx); + + /* Return result */ + *result = state->orig.out.result; + + tevent_req_received(req); + return NT_STATUS_OK; +} + +NTSTATUS rpccli_wbint_LookupName(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + const char *domain /* [in] [ref,charset(UTF8)] */, + const char *name /* [in] [ref,charset(UTF8)] */, + uint32_t flags /* [in] */, + enum lsa_SidType *type /* [out] [ref] */, + struct dom_sid *sid /* [out] [ref] */) +{ + struct wbint_LookupName r; + NTSTATUS status; + + /* In parameters */ + r.in.domain = domain; + r.in.name = name; + r.in.flags = flags; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wbint_LookupName, &r); + } + + status = cli->dispatch(cli, + mem_ctx, + &ndr_table_wbint, + NDR_WBINT_LOOKUPNAME, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wbint_LookupName, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *type = *r.out.type; + *sid = *r.out.sid; + + /* Return result */ + return r.out.result; +} + +struct rpccli_wbint_Sid2Uid_state { + struct wbint_Sid2Uid orig; + struct wbint_Sid2Uid tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wbint_Sid2Uid_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wbint_Sid2Uid_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_dom_name /* [in] [unique,charset(UTF8)] */, + struct dom_sid *_sid /* [in] [ref] */, + uint64_t *_uid /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_wbint_Sid2Uid_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wbint_Sid2Uid_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.dom_name = _dom_name; + state->orig.in.sid = _sid; + + /* Out parameters */ + state->orig.out.uid = _uid; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wbint_Sid2Uid, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_wbint_Sid2Uid_out_memory"); + if (tevent_req_nomem(state->out_mem_ctx, req)) { + return tevent_req_post(req, ev); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_wbint, + NDR_WBINT_SID2UID, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wbint_Sid2Uid_done, req); + return req; +} + +static void rpccli_wbint_Sid2Uid_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wbint_Sid2Uid_state *state = tevent_req_data( + req, struct rpccli_wbint_Sid2Uid_state); + NTSTATUS status; + TALLOC_CTX *mem_ctx; + + if (state->out_mem_ctx) { + mem_ctx = state->out_mem_ctx; + } else { + mem_ctx = state; + } + + status = state->dispatch_recv(subreq, mem_ctx); + TALLOC_FREE(subreq); + if (!NT_STATUS_IS_OK(status)) { + tevent_req_nterror(req, status); + return; + } + + /* Copy out parameters */ + *state->orig.out.uid = *state->tmp.out.uid; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wbint_Sid2Uid, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wbint_Sid2Uid_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_wbint_Sid2Uid_state *state = tevent_req_data( + req, struct rpccli_wbint_Sid2Uid_state); + NTSTATUS status; + + if (tevent_req_is_nterror(req, &status)) { + tevent_req_received(req); + return status; + } + + /* Steal possbile out parameters to the callers context */ + talloc_steal(mem_ctx, state->out_mem_ctx); + + /* Return result */ + *result = state->orig.out.result; + + tevent_req_received(req); + return NT_STATUS_OK; +} + +NTSTATUS rpccli_wbint_Sid2Uid(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + const char *dom_name /* [in] [unique,charset(UTF8)] */, + struct dom_sid *sid /* [in] [ref] */, + uint64_t *uid /* [out] [ref] */) +{ + struct wbint_Sid2Uid r; + NTSTATUS status; + + /* In parameters */ + r.in.dom_name = dom_name; + r.in.sid = sid; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wbint_Sid2Uid, &r); + } + + status = cli->dispatch(cli, + mem_ctx, + &ndr_table_wbint, + NDR_WBINT_SID2UID, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wbint_Sid2Uid, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *uid = *r.out.uid; + + /* Return result */ + return r.out.result; +} + +struct rpccli_wbint_Sid2Gid_state { + struct wbint_Sid2Gid orig; + struct wbint_Sid2Gid tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wbint_Sid2Gid_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wbint_Sid2Gid_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_dom_name /* [in] [unique,charset(UTF8)] */, + struct dom_sid *_sid /* [in] [ref] */, + uint64_t *_gid /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_wbint_Sid2Gid_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wbint_Sid2Gid_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.dom_name = _dom_name; + state->orig.in.sid = _sid; + + /* Out parameters */ + state->orig.out.gid = _gid; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wbint_Sid2Gid, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_wbint_Sid2Gid_out_memory"); + if (tevent_req_nomem(state->out_mem_ctx, req)) { + return tevent_req_post(req, ev); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_wbint, + NDR_WBINT_SID2GID, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wbint_Sid2Gid_done, req); + return req; +} + +static void rpccli_wbint_Sid2Gid_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wbint_Sid2Gid_state *state = tevent_req_data( + req, struct rpccli_wbint_Sid2Gid_state); + NTSTATUS status; + TALLOC_CTX *mem_ctx; + + if (state->out_mem_ctx) { + mem_ctx = state->out_mem_ctx; + } else { + mem_ctx = state; + } + + status = state->dispatch_recv(subreq, mem_ctx); + TALLOC_FREE(subreq); + if (!NT_STATUS_IS_OK(status)) { + tevent_req_nterror(req, status); + return; + } + + /* Copy out parameters */ + *state->orig.out.gid = *state->tmp.out.gid; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wbint_Sid2Gid, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wbint_Sid2Gid_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_wbint_Sid2Gid_state *state = tevent_req_data( + req, struct rpccli_wbint_Sid2Gid_state); + NTSTATUS status; + + if (tevent_req_is_nterror(req, &status)) { + tevent_req_received(req); + return status; + } + + /* Steal possbile out parameters to the callers context */ + talloc_steal(mem_ctx, state->out_mem_ctx); + + /* Return result */ + *result = state->orig.out.result; + + tevent_req_received(req); + return NT_STATUS_OK; +} + +NTSTATUS rpccli_wbint_Sid2Gid(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + const char *dom_name /* [in] [unique,charset(UTF8)] */, + struct dom_sid *sid /* [in] [ref] */, + uint64_t *gid /* [out] [ref] */) +{ + struct wbint_Sid2Gid r; + NTSTATUS status; + + /* In parameters */ + r.in.dom_name = dom_name; + r.in.sid = sid; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wbint_Sid2Gid, &r); + } + + status = cli->dispatch(cli, + mem_ctx, + &ndr_table_wbint, + NDR_WBINT_SID2GID, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wbint_Sid2Gid, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *gid = *r.out.gid; + + /* Return result */ + return r.out.result; +} + +struct rpccli_wbint_Uid2Sid_state { + struct wbint_Uid2Sid orig; + struct wbint_Uid2Sid tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wbint_Uid2Sid_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wbint_Uid2Sid_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_dom_name /* [in] [unique,charset(UTF8)] */, + uint64_t _uid /* [in] */, + struct dom_sid *_sid /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_wbint_Uid2Sid_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wbint_Uid2Sid_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.dom_name = _dom_name; + state->orig.in.uid = _uid; + + /* Out parameters */ + state->orig.out.sid = _sid; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wbint_Uid2Sid, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_wbint_Uid2Sid_out_memory"); + if (tevent_req_nomem(state->out_mem_ctx, req)) { + return tevent_req_post(req, ev); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_wbint, + NDR_WBINT_UID2SID, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wbint_Uid2Sid_done, req); + return req; +} + +static void rpccli_wbint_Uid2Sid_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wbint_Uid2Sid_state *state = tevent_req_data( + req, struct rpccli_wbint_Uid2Sid_state); + NTSTATUS status; + TALLOC_CTX *mem_ctx; + + if (state->out_mem_ctx) { + mem_ctx = state->out_mem_ctx; + } else { + mem_ctx = state; + } + + status = state->dispatch_recv(subreq, mem_ctx); + TALLOC_FREE(subreq); + if (!NT_STATUS_IS_OK(status)) { + tevent_req_nterror(req, status); + return; + } + + /* Copy out parameters */ + *state->orig.out.sid = *state->tmp.out.sid; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wbint_Uid2Sid, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wbint_Uid2Sid_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_wbint_Uid2Sid_state *state = tevent_req_data( + req, struct rpccli_wbint_Uid2Sid_state); + NTSTATUS status; + + if (tevent_req_is_nterror(req, &status)) { + tevent_req_received(req); + return status; + } + + /* Steal possbile out parameters to the callers context */ + talloc_steal(mem_ctx, state->out_mem_ctx); + + /* Return result */ + *result = state->orig.out.result; + + tevent_req_received(req); + return NT_STATUS_OK; +} + +NTSTATUS rpccli_wbint_Uid2Sid(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + const char *dom_name /* [in] [unique,charset(UTF8)] */, + uint64_t uid /* [in] */, + struct dom_sid *sid /* [out] [ref] */) +{ + struct wbint_Uid2Sid r; + NTSTATUS status; + + /* In parameters */ + r.in.dom_name = dom_name; + r.in.uid = uid; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wbint_Uid2Sid, &r); + } + + status = cli->dispatch(cli, + mem_ctx, + &ndr_table_wbint, + NDR_WBINT_UID2SID, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wbint_Uid2Sid, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *sid = *r.out.sid; + + /* Return result */ + return r.out.result; +} + +struct rpccli_wbint_Gid2Sid_state { + struct wbint_Gid2Sid orig; + struct wbint_Gid2Sid tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wbint_Gid2Sid_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wbint_Gid2Sid_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_dom_name /* [in] [unique,charset(UTF8)] */, + uint64_t _gid /* [in] */, + struct dom_sid *_sid /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_wbint_Gid2Sid_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wbint_Gid2Sid_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.dom_name = _dom_name; + state->orig.in.gid = _gid; + + /* Out parameters */ + state->orig.out.sid = _sid; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wbint_Gid2Sid, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_wbint_Gid2Sid_out_memory"); + if (tevent_req_nomem(state->out_mem_ctx, req)) { + return tevent_req_post(req, ev); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_wbint, + NDR_WBINT_GID2SID, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wbint_Gid2Sid_done, req); + return req; +} + +static void rpccli_wbint_Gid2Sid_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wbint_Gid2Sid_state *state = tevent_req_data( + req, struct rpccli_wbint_Gid2Sid_state); + NTSTATUS status; + TALLOC_CTX *mem_ctx; + + if (state->out_mem_ctx) { + mem_ctx = state->out_mem_ctx; + } else { + mem_ctx = state; + } + + status = state->dispatch_recv(subreq, mem_ctx); + TALLOC_FREE(subreq); + if (!NT_STATUS_IS_OK(status)) { + tevent_req_nterror(req, status); + return; + } + + /* Copy out parameters */ + *state->orig.out.sid = *state->tmp.out.sid; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wbint_Gid2Sid, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wbint_Gid2Sid_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_wbint_Gid2Sid_state *state = tevent_req_data( + req, struct rpccli_wbint_Gid2Sid_state); + NTSTATUS status; + + if (tevent_req_is_nterror(req, &status)) { + tevent_req_received(req); + return status; + } + + /* Steal possbile out parameters to the callers context */ + talloc_steal(mem_ctx, state->out_mem_ctx); + + /* Return result */ + *result = state->orig.out.result; + + tevent_req_received(req); + return NT_STATUS_OK; +} + +NTSTATUS rpccli_wbint_Gid2Sid(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + const char *dom_name /* [in] [unique,charset(UTF8)] */, + uint64_t gid /* [in] */, + struct dom_sid *sid /* [out] [ref] */) +{ + struct wbint_Gid2Sid r; + NTSTATUS status; + + /* In parameters */ + r.in.dom_name = dom_name; + r.in.gid = gid; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wbint_Gid2Sid, &r); + } + + status = cli->dispatch(cli, + mem_ctx, + &ndr_table_wbint, + NDR_WBINT_GID2SID, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wbint_Gid2Sid, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *sid = *r.out.sid; + + /* Return result */ + return r.out.result; +} + +struct rpccli_wbint_QueryUser_state { + struct wbint_QueryUser orig; + struct wbint_QueryUser tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wbint_QueryUser_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wbint_QueryUser_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct dom_sid *_sid /* [in] [ref] */, + struct wbint_userinfo *_info /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_wbint_QueryUser_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wbint_QueryUser_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.sid = _sid; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wbint_QueryUser, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_wbint_QueryUser_out_memory"); + if (tevent_req_nomem(state->out_mem_ctx, req)) { + return tevent_req_post(req, ev); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_wbint, + NDR_WBINT_QUERYUSER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wbint_QueryUser_done, req); + return req; +} + +static void rpccli_wbint_QueryUser_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wbint_QueryUser_state *state = tevent_req_data( + req, struct rpccli_wbint_QueryUser_state); + NTSTATUS status; + TALLOC_CTX *mem_ctx; + + if (state->out_mem_ctx) { + mem_ctx = state->out_mem_ctx; + } else { + mem_ctx = state; + } + + status = state->dispatch_recv(subreq, mem_ctx); + TALLOC_FREE(subreq); + if (!NT_STATUS_IS_OK(status)) { + tevent_req_nterror(req, status); + return; + } + + /* Copy out parameters */ + *state->orig.out.info = *state->tmp.out.info; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wbint_QueryUser, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wbint_QueryUser_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_wbint_QueryUser_state *state = tevent_req_data( + req, struct rpccli_wbint_QueryUser_state); + NTSTATUS status; + + if (tevent_req_is_nterror(req, &status)) { + tevent_req_received(req); + return status; + } + + /* Steal possbile out parameters to the callers context */ + talloc_steal(mem_ctx, state->out_mem_ctx); + + /* Return result */ + *result = state->orig.out.result; + + tevent_req_received(req); + return NT_STATUS_OK; +} + +NTSTATUS rpccli_wbint_QueryUser(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct dom_sid *sid /* [in] [ref] */, + struct wbint_userinfo *info /* [out] [ref] */) +{ + struct wbint_QueryUser r; + NTSTATUS status; + + /* In parameters */ + r.in.sid = sid; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wbint_QueryUser, &r); + } + + status = cli->dispatch(cli, + mem_ctx, + &ndr_table_wbint, + NDR_WBINT_QUERYUSER, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wbint_QueryUser, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *info = *r.out.info; + + /* Return result */ + return r.out.result; +} + +struct rpccli_wbint_LookupUserAliases_state { + struct wbint_LookupUserAliases orig; + struct wbint_LookupUserAliases tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wbint_LookupUserAliases_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wbint_LookupUserAliases_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct wbint_SidArray *_sids /* [in] [ref] */, + struct wbint_RidArray *_rids /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_wbint_LookupUserAliases_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wbint_LookupUserAliases_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.sids = _sids; + + /* Out parameters */ + state->orig.out.rids = _rids; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wbint_LookupUserAliases, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_wbint_LookupUserAliases_out_memory"); + if (tevent_req_nomem(state->out_mem_ctx, req)) { + return tevent_req_post(req, ev); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_wbint, + NDR_WBINT_LOOKUPUSERALIASES, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wbint_LookupUserAliases_done, req); + return req; +} + +static void rpccli_wbint_LookupUserAliases_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wbint_LookupUserAliases_state *state = tevent_req_data( + req, struct rpccli_wbint_LookupUserAliases_state); + NTSTATUS status; + TALLOC_CTX *mem_ctx; + + if (state->out_mem_ctx) { + mem_ctx = state->out_mem_ctx; + } else { + mem_ctx = state; + } + + status = state->dispatch_recv(subreq, mem_ctx); + TALLOC_FREE(subreq); + if (!NT_STATUS_IS_OK(status)) { + tevent_req_nterror(req, status); + return; + } + + /* Copy out parameters */ + *state->orig.out.rids = *state->tmp.out.rids; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wbint_LookupUserAliases, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wbint_LookupUserAliases_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_wbint_LookupUserAliases_state *state = tevent_req_data( + req, struct rpccli_wbint_LookupUserAliases_state); + NTSTATUS status; + + if (tevent_req_is_nterror(req, &status)) { + tevent_req_received(req); + return status; + } + + /* Steal possbile out parameters to the callers context */ + talloc_steal(mem_ctx, state->out_mem_ctx); + + /* Return result */ + *result = state->orig.out.result; + + tevent_req_received(req); + return NT_STATUS_OK; +} + +NTSTATUS rpccli_wbint_LookupUserAliases(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct wbint_SidArray *sids /* [in] [ref] */, + struct wbint_RidArray *rids /* [out] [ref] */) +{ + struct wbint_LookupUserAliases r; + NTSTATUS status; + + /* In parameters */ + r.in.sids = sids; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wbint_LookupUserAliases, &r); + } + + status = cli->dispatch(cli, + mem_ctx, + &ndr_table_wbint, + NDR_WBINT_LOOKUPUSERALIASES, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wbint_LookupUserAliases, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *rids = *r.out.rids; + + /* Return result */ + return r.out.result; +} + +struct rpccli_wbint_LookupUserGroups_state { + struct wbint_LookupUserGroups orig; + struct wbint_LookupUserGroups tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wbint_LookupUserGroups_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wbint_LookupUserGroups_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct dom_sid *_sid /* [in] [ref] */, + struct wbint_SidArray *_sids /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_wbint_LookupUserGroups_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wbint_LookupUserGroups_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.sid = _sid; + + /* Out parameters */ + state->orig.out.sids = _sids; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wbint_LookupUserGroups, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_wbint_LookupUserGroups_out_memory"); + if (tevent_req_nomem(state->out_mem_ctx, req)) { + return tevent_req_post(req, ev); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_wbint, + NDR_WBINT_LOOKUPUSERGROUPS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wbint_LookupUserGroups_done, req); + return req; +} + +static void rpccli_wbint_LookupUserGroups_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wbint_LookupUserGroups_state *state = tevent_req_data( + req, struct rpccli_wbint_LookupUserGroups_state); + NTSTATUS status; + TALLOC_CTX *mem_ctx; + + if (state->out_mem_ctx) { + mem_ctx = state->out_mem_ctx; + } else { + mem_ctx = state; + } + + status = state->dispatch_recv(subreq, mem_ctx); + TALLOC_FREE(subreq); + if (!NT_STATUS_IS_OK(status)) { + tevent_req_nterror(req, status); + return; + } + + /* Copy out parameters */ + *state->orig.out.sids = *state->tmp.out.sids; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wbint_LookupUserGroups, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wbint_LookupUserGroups_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_wbint_LookupUserGroups_state *state = tevent_req_data( + req, struct rpccli_wbint_LookupUserGroups_state); + NTSTATUS status; + + if (tevent_req_is_nterror(req, &status)) { + tevent_req_received(req); + return status; + } + + /* Steal possbile out parameters to the callers context */ + talloc_steal(mem_ctx, state->out_mem_ctx); + + /* Return result */ + *result = state->orig.out.result; + + tevent_req_received(req); + return NT_STATUS_OK; +} + +NTSTATUS rpccli_wbint_LookupUserGroups(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + struct dom_sid *sid /* [in] [ref] */, + struct wbint_SidArray *sids /* [out] [ref] */) +{ + struct wbint_LookupUserGroups r; + NTSTATUS status; + + /* In parameters */ + r.in.sid = sid; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wbint_LookupUserGroups, &r); + } + + status = cli->dispatch(cli, + mem_ctx, + &ndr_table_wbint, + NDR_WBINT_LOOKUPUSERGROUPS, + &r); + + if (!NT_STATUS_IS_OK(status)) { + return status; + } + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wbint_LookupUserGroups, &r); + } + + if (NT_STATUS_IS_ERR(status)) { + return status; + } + + /* Return variables */ + *sids = *r.out.sids; + + /* Return result */ + return r.out.result; +} + |