diff options
author | Stefan Metzmacher <metze@samba.org> | 2009-07-30 18:56:42 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2009-07-31 14:13:55 +0200 |
commit | 3abe59cb2df9d2394d37f68c413d9098fa0a368f (patch) | |
tree | 16cea31c512171544ff72a85c78b0c7d8764e881 | |
parent | 2ed71264e1b80b5563147112a10ce5bea36f9779 (diff) | |
download | samba-3abe59cb2df9d2394d37f68c413d9098fa0a368f.tar.gz samba-3abe59cb2df9d2394d37f68c413d9098fa0a368f.tar.bz2 samba-3abe59cb2df9d2394d37f68c413d9098fa0a368f.zip |
librpc: rerun "make idl"
metze
32 files changed, 81119 insertions, 0 deletions
diff --git a/librpc/gen_ndr/cli_dfs.c b/librpc/gen_ndr/cli_dfs.c index e8691dc635..685e3b5e75 100644 --- a/librpc/gen_ndr/cli_dfs.c +++ b/librpc/gen_ndr/cli_dfs.c @@ -6,6 +6,115 @@ #include "includes.h" #include "../librpc/gen_ndr/cli_dfs.h" +struct rpccli_dfs_GetManagerVersion_state { + struct dfs_GetManagerVersion orig; + struct dfs_GetManagerVersion tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dfs_GetManagerVersion_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dfs_GetManagerVersion_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + enum dfs_ManagerVersion *_version /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_dfs_GetManagerVersion_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dfs_GetManagerVersion_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + state->orig.out.version = _version; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dfs_GetManagerVersion, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_dfs_GetManagerVersion_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_netdfs, + NDR_DFS_GETMANAGERVERSION, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dfs_GetManagerVersion_done, req); + return req; +} + +static void rpccli_dfs_GetManagerVersion_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dfs_GetManagerVersion_state *state = tevent_req_data( + req, struct rpccli_dfs_GetManagerVersion_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.version = *state->tmp.out.version; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dfs_GetManagerVersion, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dfs_GetManagerVersion_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx) +{ + struct rpccli_dfs_GetManagerVersion_state *state = tevent_req_data( + req, struct rpccli_dfs_GetManagerVersion_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_dfs_GetManagerVersion(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, enum dfs_ManagerVersion *version /* [out] [ref] */) @@ -44,6 +153,126 @@ NTSTATUS rpccli_dfs_GetManagerVersion(struct rpc_pipe_client *cli, return NT_STATUS_OK; } +struct rpccli_dfs_Add_state { + struct dfs_Add orig; + struct dfs_Add tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dfs_Add_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dfs_Add_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_path /* [in] [ref,charset(UTF16)] */, + const char *_server /* [in] [ref,charset(UTF16)] */, + const char *_share /* [in] [unique,charset(UTF16)] */, + const char *_comment /* [in] [unique,charset(UTF16)] */, + uint32_t _flags /* [in] */) +{ + struct tevent_req *req; + struct rpccli_dfs_Add_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dfs_Add_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.path = _path; + state->orig.in.server = _server; + state->orig.in.share = _share; + state->orig.in.comment = _comment; + state->orig.in.flags = _flags; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dfs_Add, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_netdfs, + NDR_DFS_ADD, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dfs_Add_done, req); + return req; +} + +static void rpccli_dfs_Add_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dfs_Add_state *state = tevent_req_data( + req, struct rpccli_dfs_Add_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dfs_Add, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dfs_Add_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dfs_Add_state *state = tevent_req_data( + req, struct rpccli_dfs_Add_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_dfs_Add(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *path /* [in] [ref,charset(UTF16)] */, @@ -95,6 +324,122 @@ NTSTATUS rpccli_dfs_Add(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_dfs_Remove_state { + struct dfs_Remove orig; + struct dfs_Remove tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dfs_Remove_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dfs_Remove_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_dfs_entry_path /* [in] [ref,charset(UTF16)] */, + const char *_servername /* [in] [unique,charset(UTF16)] */, + const char *_sharename /* [in] [unique,charset(UTF16)] */) +{ + struct tevent_req *req; + struct rpccli_dfs_Remove_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dfs_Remove_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.dfs_entry_path = _dfs_entry_path; + state->orig.in.servername = _servername; + state->orig.in.sharename = _sharename; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dfs_Remove, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_netdfs, + NDR_DFS_REMOVE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dfs_Remove_done, req); + return req; +} + +static void rpccli_dfs_Remove_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dfs_Remove_state *state = tevent_req_data( + req, struct rpccli_dfs_Remove_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dfs_Remove, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dfs_Remove_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dfs_Remove_state *state = tevent_req_data( + req, struct rpccli_dfs_Remove_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_dfs_Remove(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *dfs_entry_path /* [in] [ref,charset(UTF16)] */, @@ -142,6 +487,126 @@ NTSTATUS rpccli_dfs_Remove(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_dfs_SetInfo_state { + struct dfs_SetInfo orig; + struct dfs_SetInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dfs_SetInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dfs_SetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_dfs_entry_path /* [in] [charset(UTF16)] */, + const char *_servername /* [in] [unique,charset(UTF16)] */, + const char *_sharename /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + union dfs_Info *_info /* [in] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_dfs_SetInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dfs_SetInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.dfs_entry_path = _dfs_entry_path; + state->orig.in.servername = _servername; + state->orig.in.sharename = _sharename; + state->orig.in.level = _level; + state->orig.in.info = _info; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dfs_SetInfo, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_netdfs, + NDR_DFS_SETINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dfs_SetInfo_done, req); + return req; +} + +static void rpccli_dfs_SetInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dfs_SetInfo_state *state = tevent_req_data( + req, struct rpccli_dfs_SetInfo_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dfs_SetInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dfs_SetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dfs_SetInfo_state *state = tevent_req_data( + req, struct rpccli_dfs_SetInfo_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_dfs_SetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *dfs_entry_path /* [in] [charset(UTF16)] */, @@ -193,6 +658,133 @@ NTSTATUS rpccli_dfs_SetInfo(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_dfs_GetInfo_state { + struct dfs_GetInfo orig; + struct dfs_GetInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dfs_GetInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dfs_GetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_dfs_entry_path /* [in] [charset(UTF16)] */, + const char *_servername /* [in] [unique,charset(UTF16)] */, + const char *_sharename /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + union dfs_Info *_info /* [out] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_dfs_GetInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dfs_GetInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.dfs_entry_path = _dfs_entry_path; + state->orig.in.servername = _servername; + state->orig.in.sharename = _sharename; + state->orig.in.level = _level; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dfs_GetInfo, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_dfs_GetInfo_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_netdfs, + NDR_DFS_GETINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dfs_GetInfo_done, req); + return req; +} + +static void rpccli_dfs_GetInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dfs_GetInfo_state *state = tevent_req_data( + req, struct rpccli_dfs_GetInfo_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(dfs_GetInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dfs_GetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dfs_GetInfo_state *state = tevent_req_data( + req, struct rpccli_dfs_GetInfo_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_dfs_GetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *dfs_entry_path /* [in] [charset(UTF16)] */, @@ -244,6 +836,138 @@ NTSTATUS rpccli_dfs_GetInfo(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_dfs_Enum_state { + struct dfs_Enum orig; + struct dfs_Enum tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dfs_Enum_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dfs_Enum_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint32_t _level /* [in] */, + uint32_t _bufsize /* [in] */, + struct dfs_EnumStruct *_info /* [in,out] [unique] */, + uint32_t *_total /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_dfs_Enum_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dfs_Enum_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.level = _level; + state->orig.in.bufsize = _bufsize; + state->orig.in.info = _info; + state->orig.in.total = _total; + + /* Out parameters */ + state->orig.out.info = _info; + state->orig.out.total = _total; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dfs_Enum, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_dfs_Enum_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_netdfs, + NDR_DFS_ENUM, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dfs_Enum_done, req); + return req; +} + +static void rpccli_dfs_Enum_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dfs_Enum_state *state = tevent_req_data( + req, struct rpccli_dfs_Enum_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 */ + if (state->orig.out.info && state->tmp.out.info) { + *state->orig.out.info = *state->tmp.out.info; + } + if (state->orig.out.total && state->tmp.out.total) { + *state->orig.out.total = *state->tmp.out.total; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dfs_Enum, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dfs_Enum_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dfs_Enum_state *state = tevent_req_data( + req, struct rpccli_dfs_Enum_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_dfs_Enum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t level /* [in] */, @@ -299,6 +1023,116 @@ NTSTATUS rpccli_dfs_Enum(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_dfs_Rename_state { + struct dfs_Rename orig; + struct dfs_Rename tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dfs_Rename_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dfs_Rename_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_dfs_Rename_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dfs_Rename_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dfs_Rename, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_netdfs, + NDR_DFS_RENAME, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dfs_Rename_done, req); + return req; +} + +static void rpccli_dfs_Rename_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dfs_Rename_state *state = tevent_req_data( + req, struct rpccli_dfs_Rename_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dfs_Rename, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dfs_Rename_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dfs_Rename_state *state = tevent_req_data( + req, struct rpccli_dfs_Rename_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_dfs_Rename(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -340,6 +1174,116 @@ NTSTATUS rpccli_dfs_Rename(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_dfs_Move_state { + struct dfs_Move orig; + struct dfs_Move tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dfs_Move_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dfs_Move_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_dfs_Move_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dfs_Move_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dfs_Move, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_netdfs, + NDR_DFS_MOVE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dfs_Move_done, req); + return req; +} + +static void rpccli_dfs_Move_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dfs_Move_state *state = tevent_req_data( + req, struct rpccli_dfs_Move_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dfs_Move, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dfs_Move_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dfs_Move_state *state = tevent_req_data( + req, struct rpccli_dfs_Move_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_dfs_Move(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -381,6 +1325,116 @@ NTSTATUS rpccli_dfs_Move(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_dfs_ManagerGetConfigInfo_state { + struct dfs_ManagerGetConfigInfo orig; + struct dfs_ManagerGetConfigInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dfs_ManagerGetConfigInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dfs_ManagerGetConfigInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_dfs_ManagerGetConfigInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dfs_ManagerGetConfigInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dfs_ManagerGetConfigInfo, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_netdfs, + NDR_DFS_MANAGERGETCONFIGINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dfs_ManagerGetConfigInfo_done, req); + return req; +} + +static void rpccli_dfs_ManagerGetConfigInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dfs_ManagerGetConfigInfo_state *state = tevent_req_data( + req, struct rpccli_dfs_ManagerGetConfigInfo_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dfs_ManagerGetConfigInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dfs_ManagerGetConfigInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dfs_ManagerGetConfigInfo_state *state = tevent_req_data( + req, struct rpccli_dfs_ManagerGetConfigInfo_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_dfs_ManagerGetConfigInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -422,6 +1476,116 @@ NTSTATUS rpccli_dfs_ManagerGetConfigInfo(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_dfs_ManagerSendSiteInfo_state { + struct dfs_ManagerSendSiteInfo orig; + struct dfs_ManagerSendSiteInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dfs_ManagerSendSiteInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dfs_ManagerSendSiteInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_dfs_ManagerSendSiteInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dfs_ManagerSendSiteInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dfs_ManagerSendSiteInfo, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_netdfs, + NDR_DFS_MANAGERSENDSITEINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dfs_ManagerSendSiteInfo_done, req); + return req; +} + +static void rpccli_dfs_ManagerSendSiteInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dfs_ManagerSendSiteInfo_state *state = tevent_req_data( + req, struct rpccli_dfs_ManagerSendSiteInfo_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dfs_ManagerSendSiteInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dfs_ManagerSendSiteInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dfs_ManagerSendSiteInfo_state *state = tevent_req_data( + req, struct rpccli_dfs_ManagerSendSiteInfo_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_dfs_ManagerSendSiteInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -463,6 +1627,144 @@ NTSTATUS rpccli_dfs_ManagerSendSiteInfo(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_dfs_AddFtRoot_state { + struct dfs_AddFtRoot orig; + struct dfs_AddFtRoot tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dfs_AddFtRoot_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dfs_AddFtRoot_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_servername /* [in] [charset(UTF16)] */, + const char *_dns_servername /* [in] [charset(UTF16)] */, + const char *_dfsname /* [in] [charset(UTF16)] */, + const char *_rootshare /* [in] [charset(UTF16)] */, + const char *_comment /* [in] [charset(UTF16)] */, + const char *_dfs_config_dn /* [in] [charset(UTF16)] */, + uint8_t _unknown1 /* [in] */, + uint32_t _flags /* [in] */, + struct dfs_UnknownStruct **_unknown2 /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_dfs_AddFtRoot_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dfs_AddFtRoot_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.servername = _servername; + state->orig.in.dns_servername = _dns_servername; + state->orig.in.dfsname = _dfsname; + state->orig.in.rootshare = _rootshare; + state->orig.in.comment = _comment; + state->orig.in.dfs_config_dn = _dfs_config_dn; + state->orig.in.unknown1 = _unknown1; + state->orig.in.flags = _flags; + state->orig.in.unknown2 = _unknown2; + + /* Out parameters */ + state->orig.out.unknown2 = _unknown2; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dfs_AddFtRoot, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_dfs_AddFtRoot_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_netdfs, + NDR_DFS_ADDFTROOT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dfs_AddFtRoot_done, req); + return req; +} + +static void rpccli_dfs_AddFtRoot_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dfs_AddFtRoot_state *state = tevent_req_data( + req, struct rpccli_dfs_AddFtRoot_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 */ + if (state->orig.out.unknown2 && state->tmp.out.unknown2) { + *state->orig.out.unknown2 = *state->tmp.out.unknown2; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dfs_AddFtRoot, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dfs_AddFtRoot_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dfs_AddFtRoot_state *state = tevent_req_data( + req, struct rpccli_dfs_AddFtRoot_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_dfs_AddFtRoot(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername /* [in] [charset(UTF16)] */, @@ -525,6 +1827,138 @@ NTSTATUS rpccli_dfs_AddFtRoot(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_dfs_RemoveFtRoot_state { + struct dfs_RemoveFtRoot orig; + struct dfs_RemoveFtRoot tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dfs_RemoveFtRoot_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dfs_RemoveFtRoot_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_servername /* [in] [charset(UTF16)] */, + const char *_dns_servername /* [in] [charset(UTF16)] */, + const char *_dfsname /* [in] [charset(UTF16)] */, + const char *_rootshare /* [in] [charset(UTF16)] */, + uint32_t _flags /* [in] */, + struct dfs_UnknownStruct **_unknown /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_dfs_RemoveFtRoot_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dfs_RemoveFtRoot_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.servername = _servername; + state->orig.in.dns_servername = _dns_servername; + state->orig.in.dfsname = _dfsname; + state->orig.in.rootshare = _rootshare; + state->orig.in.flags = _flags; + state->orig.in.unknown = _unknown; + + /* Out parameters */ + state->orig.out.unknown = _unknown; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dfs_RemoveFtRoot, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_dfs_RemoveFtRoot_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_netdfs, + NDR_DFS_REMOVEFTROOT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dfs_RemoveFtRoot_done, req); + return req; +} + +static void rpccli_dfs_RemoveFtRoot_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dfs_RemoveFtRoot_state *state = tevent_req_data( + req, struct rpccli_dfs_RemoveFtRoot_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 */ + if (state->orig.out.unknown && state->tmp.out.unknown) { + *state->orig.out.unknown = *state->tmp.out.unknown; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dfs_RemoveFtRoot, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dfs_RemoveFtRoot_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dfs_RemoveFtRoot_state *state = tevent_req_data( + req, struct rpccli_dfs_RemoveFtRoot_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_dfs_RemoveFtRoot(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername /* [in] [charset(UTF16)] */, @@ -581,6 +2015,124 @@ NTSTATUS rpccli_dfs_RemoveFtRoot(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_dfs_AddStdRoot_state { + struct dfs_AddStdRoot orig; + struct dfs_AddStdRoot tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dfs_AddStdRoot_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dfs_AddStdRoot_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_servername /* [in] [charset(UTF16)] */, + const char *_rootshare /* [in] [charset(UTF16)] */, + const char *_comment /* [in] [charset(UTF16)] */, + uint32_t _flags /* [in] */) +{ + struct tevent_req *req; + struct rpccli_dfs_AddStdRoot_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dfs_AddStdRoot_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.servername = _servername; + state->orig.in.rootshare = _rootshare; + state->orig.in.comment = _comment; + state->orig.in.flags = _flags; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dfs_AddStdRoot, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_netdfs, + NDR_DFS_ADDSTDROOT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dfs_AddStdRoot_done, req); + return req; +} + +static void rpccli_dfs_AddStdRoot_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dfs_AddStdRoot_state *state = tevent_req_data( + req, struct rpccli_dfs_AddStdRoot_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dfs_AddStdRoot, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dfs_AddStdRoot_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dfs_AddStdRoot_state *state = tevent_req_data( + req, struct rpccli_dfs_AddStdRoot_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_dfs_AddStdRoot(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername /* [in] [charset(UTF16)] */, @@ -630,6 +2182,122 @@ NTSTATUS rpccli_dfs_AddStdRoot(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_dfs_RemoveStdRoot_state { + struct dfs_RemoveStdRoot orig; + struct dfs_RemoveStdRoot tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dfs_RemoveStdRoot_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dfs_RemoveStdRoot_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_servername /* [in] [charset(UTF16)] */, + const char *_rootshare /* [in] [charset(UTF16)] */, + uint32_t _flags /* [in] */) +{ + struct tevent_req *req; + struct rpccli_dfs_RemoveStdRoot_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dfs_RemoveStdRoot_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.servername = _servername; + state->orig.in.rootshare = _rootshare; + state->orig.in.flags = _flags; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dfs_RemoveStdRoot, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_netdfs, + NDR_DFS_REMOVESTDROOT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dfs_RemoveStdRoot_done, req); + return req; +} + +static void rpccli_dfs_RemoveStdRoot_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dfs_RemoveStdRoot_state *state = tevent_req_data( + req, struct rpccli_dfs_RemoveStdRoot_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dfs_RemoveStdRoot, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dfs_RemoveStdRoot_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dfs_RemoveStdRoot_state *state = tevent_req_data( + req, struct rpccli_dfs_RemoveStdRoot_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_dfs_RemoveStdRoot(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername /* [in] [charset(UTF16)] */, @@ -677,6 +2345,120 @@ NTSTATUS rpccli_dfs_RemoveStdRoot(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_dfs_ManagerInitialize_state { + struct dfs_ManagerInitialize orig; + struct dfs_ManagerInitialize tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dfs_ManagerInitialize_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dfs_ManagerInitialize_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_servername /* [in] [ref,charset(UTF16)] */, + uint32_t _flags /* [in] */) +{ + struct tevent_req *req; + struct rpccli_dfs_ManagerInitialize_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dfs_ManagerInitialize_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.servername = _servername; + state->orig.in.flags = _flags; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dfs_ManagerInitialize, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_netdfs, + NDR_DFS_MANAGERINITIALIZE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dfs_ManagerInitialize_done, req); + return req; +} + +static void rpccli_dfs_ManagerInitialize_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dfs_ManagerInitialize_state *state = tevent_req_data( + req, struct rpccli_dfs_ManagerInitialize_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dfs_ManagerInitialize, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dfs_ManagerInitialize_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dfs_ManagerInitialize_state *state = tevent_req_data( + req, struct rpccli_dfs_ManagerInitialize_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_dfs_ManagerInitialize(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername /* [in] [ref,charset(UTF16)] */, @@ -722,6 +2504,124 @@ NTSTATUS rpccli_dfs_ManagerInitialize(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_dfs_AddStdRootForced_state { + struct dfs_AddStdRootForced orig; + struct dfs_AddStdRootForced tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dfs_AddStdRootForced_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dfs_AddStdRootForced_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_servername /* [in] [charset(UTF16)] */, + const char *_rootshare /* [in] [charset(UTF16)] */, + const char *_comment /* [in] [charset(UTF16)] */, + const char *_store /* [in] [charset(UTF16)] */) +{ + struct tevent_req *req; + struct rpccli_dfs_AddStdRootForced_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dfs_AddStdRootForced_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.servername = _servername; + state->orig.in.rootshare = _rootshare; + state->orig.in.comment = _comment; + state->orig.in.store = _store; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dfs_AddStdRootForced, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_netdfs, + NDR_DFS_ADDSTDROOTFORCED, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dfs_AddStdRootForced_done, req); + return req; +} + +static void rpccli_dfs_AddStdRootForced_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dfs_AddStdRootForced_state *state = tevent_req_data( + req, struct rpccli_dfs_AddStdRootForced_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dfs_AddStdRootForced, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dfs_AddStdRootForced_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dfs_AddStdRootForced_state *state = tevent_req_data( + req, struct rpccli_dfs_AddStdRootForced_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_dfs_AddStdRootForced(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername /* [in] [charset(UTF16)] */, @@ -771,6 +2671,136 @@ NTSTATUS rpccli_dfs_AddStdRootForced(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_dfs_GetDcAddress_state { + struct dfs_GetDcAddress orig; + struct dfs_GetDcAddress tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dfs_GetDcAddress_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dfs_GetDcAddress_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_servername /* [in] [charset(UTF16)] */, + const char **_server_fullname /* [in,out] [ref,charset(UTF16)] */, + uint8_t *_is_root /* [in,out] [ref] */, + uint32_t *_ttl /* [in,out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_dfs_GetDcAddress_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dfs_GetDcAddress_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.servername = _servername; + state->orig.in.server_fullname = _server_fullname; + state->orig.in.is_root = _is_root; + state->orig.in.ttl = _ttl; + + /* Out parameters */ + state->orig.out.server_fullname = _server_fullname; + state->orig.out.is_root = _is_root; + state->orig.out.ttl = _ttl; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dfs_GetDcAddress, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_dfs_GetDcAddress_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_netdfs, + NDR_DFS_GETDCADDRESS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dfs_GetDcAddress_done, req); + return req; +} + +static void rpccli_dfs_GetDcAddress_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dfs_GetDcAddress_state *state = tevent_req_data( + req, struct rpccli_dfs_GetDcAddress_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.server_fullname = *state->tmp.out.server_fullname; + *state->orig.out.is_root = *state->tmp.out.is_root; + *state->orig.out.ttl = *state->tmp.out.ttl; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dfs_GetDcAddress, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dfs_GetDcAddress_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dfs_GetDcAddress_state *state = tevent_req_data( + req, struct rpccli_dfs_GetDcAddress_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_dfs_GetDcAddress(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername /* [in] [charset(UTF16)] */, @@ -823,6 +2853,124 @@ NTSTATUS rpccli_dfs_GetDcAddress(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_dfs_SetDcAddress_state { + struct dfs_SetDcAddress orig; + struct dfs_SetDcAddress tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dfs_SetDcAddress_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dfs_SetDcAddress_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_servername /* [in] [charset(UTF16)] */, + const char *_server_fullname /* [in] [charset(UTF16)] */, + uint32_t _flags /* [in] */, + uint32_t _ttl /* [in] */) +{ + struct tevent_req *req; + struct rpccli_dfs_SetDcAddress_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dfs_SetDcAddress_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.servername = _servername; + state->orig.in.server_fullname = _server_fullname; + state->orig.in.flags = _flags; + state->orig.in.ttl = _ttl; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dfs_SetDcAddress, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_netdfs, + NDR_DFS_SETDCADDRESS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dfs_SetDcAddress_done, req); + return req; +} + +static void rpccli_dfs_SetDcAddress_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dfs_SetDcAddress_state *state = tevent_req_data( + req, struct rpccli_dfs_SetDcAddress_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dfs_SetDcAddress, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dfs_SetDcAddress_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dfs_SetDcAddress_state *state = tevent_req_data( + req, struct rpccli_dfs_SetDcAddress_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_dfs_SetDcAddress(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername /* [in] [charset(UTF16)] */, @@ -872,6 +3020,120 @@ NTSTATUS rpccli_dfs_SetDcAddress(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_dfs_FlushFtTable_state { + struct dfs_FlushFtTable orig; + struct dfs_FlushFtTable tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dfs_FlushFtTable_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dfs_FlushFtTable_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_servername /* [in] [charset(UTF16)] */, + const char *_rootshare /* [in] [charset(UTF16)] */) +{ + struct tevent_req *req; + struct rpccli_dfs_FlushFtTable_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dfs_FlushFtTable_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.servername = _servername; + state->orig.in.rootshare = _rootshare; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dfs_FlushFtTable, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_netdfs, + NDR_DFS_FLUSHFTTABLE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dfs_FlushFtTable_done, req); + return req; +} + +static void rpccli_dfs_FlushFtTable_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dfs_FlushFtTable_state *state = tevent_req_data( + req, struct rpccli_dfs_FlushFtTable_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dfs_FlushFtTable, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dfs_FlushFtTable_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dfs_FlushFtTable_state *state = tevent_req_data( + req, struct rpccli_dfs_FlushFtTable_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_dfs_FlushFtTable(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername /* [in] [charset(UTF16)] */, @@ -917,6 +3179,116 @@ NTSTATUS rpccli_dfs_FlushFtTable(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_dfs_Add2_state { + struct dfs_Add2 orig; + struct dfs_Add2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dfs_Add2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dfs_Add2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_dfs_Add2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dfs_Add2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dfs_Add2, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_netdfs, + NDR_DFS_ADD2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dfs_Add2_done, req); + return req; +} + +static void rpccli_dfs_Add2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dfs_Add2_state *state = tevent_req_data( + req, struct rpccli_dfs_Add2_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dfs_Add2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dfs_Add2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dfs_Add2_state *state = tevent_req_data( + req, struct rpccli_dfs_Add2_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_dfs_Add2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -958,6 +3330,116 @@ NTSTATUS rpccli_dfs_Add2(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_dfs_Remove2_state { + struct dfs_Remove2 orig; + struct dfs_Remove2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dfs_Remove2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dfs_Remove2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_dfs_Remove2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dfs_Remove2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dfs_Remove2, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_netdfs, + NDR_DFS_REMOVE2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dfs_Remove2_done, req); + return req; +} + +static void rpccli_dfs_Remove2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dfs_Remove2_state *state = tevent_req_data( + req, struct rpccli_dfs_Remove2_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dfs_Remove2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dfs_Remove2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dfs_Remove2_state *state = tevent_req_data( + req, struct rpccli_dfs_Remove2_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_dfs_Remove2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -999,6 +3481,140 @@ NTSTATUS rpccli_dfs_Remove2(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_dfs_EnumEx_state { + struct dfs_EnumEx orig; + struct dfs_EnumEx tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dfs_EnumEx_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dfs_EnumEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_dfs_name /* [in] [charset(UTF16)] */, + uint32_t _level /* [in] */, + uint32_t _bufsize /* [in] */, + struct dfs_EnumStruct *_info /* [in,out] [unique] */, + uint32_t *_total /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_dfs_EnumEx_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dfs_EnumEx_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.dfs_name = _dfs_name; + state->orig.in.level = _level; + state->orig.in.bufsize = _bufsize; + state->orig.in.info = _info; + state->orig.in.total = _total; + + /* Out parameters */ + state->orig.out.info = _info; + state->orig.out.total = _total; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dfs_EnumEx, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_dfs_EnumEx_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_netdfs, + NDR_DFS_ENUMEX, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dfs_EnumEx_done, req); + return req; +} + +static void rpccli_dfs_EnumEx_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dfs_EnumEx_state *state = tevent_req_data( + req, struct rpccli_dfs_EnumEx_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 */ + if (state->orig.out.info && state->tmp.out.info) { + *state->orig.out.info = *state->tmp.out.info; + } + if (state->orig.out.total && state->tmp.out.total) { + *state->orig.out.total = *state->tmp.out.total; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dfs_EnumEx, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dfs_EnumEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dfs_EnumEx_state *state = tevent_req_data( + req, struct rpccli_dfs_EnumEx_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_dfs_EnumEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *dfs_name /* [in] [charset(UTF16)] */, @@ -1056,6 +3672,116 @@ NTSTATUS rpccli_dfs_EnumEx(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_dfs_SetInfo2_state { + struct dfs_SetInfo2 orig; + struct dfs_SetInfo2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dfs_SetInfo2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dfs_SetInfo2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_dfs_SetInfo2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dfs_SetInfo2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dfs_SetInfo2, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_netdfs, + NDR_DFS_SETINFO2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dfs_SetInfo2_done, req); + return req; +} + +static void rpccli_dfs_SetInfo2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dfs_SetInfo2_state *state = tevent_req_data( + req, struct rpccli_dfs_SetInfo2_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dfs_SetInfo2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dfs_SetInfo2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dfs_SetInfo2_state *state = tevent_req_data( + req, struct rpccli_dfs_SetInfo2_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_dfs_SetInfo2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) diff --git a/librpc/gen_ndr/cli_dfs.h b/librpc/gen_ndr/cli_dfs.h index 9e40a5695b..ed958e211e 100644 --- a/librpc/gen_ndr/cli_dfs.h +++ b/librpc/gen_ndr/cli_dfs.h @@ -1,9 +1,26 @@ #include "../librpc/gen_ndr/ndr_dfs.h" #ifndef __CLI_NETDFS__ #define __CLI_NETDFS__ +struct tevent_req *rpccli_dfs_GetManagerVersion_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + enum dfs_ManagerVersion *_version /* [out] [ref] */); +NTSTATUS rpccli_dfs_GetManagerVersion_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx); NTSTATUS rpccli_dfs_GetManagerVersion(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, enum dfs_ManagerVersion *version /* [out] [ref] */); +struct tevent_req *rpccli_dfs_Add_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_path /* [in] [ref,charset(UTF16)] */, + const char *_server /* [in] [ref,charset(UTF16)] */, + const char *_share /* [in] [unique,charset(UTF16)] */, + const char *_comment /* [in] [unique,charset(UTF16)] */, + uint32_t _flags /* [in] */); +NTSTATUS rpccli_dfs_Add_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dfs_Add(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *path /* [in] [ref,charset(UTF16)] */, @@ -12,12 +29,32 @@ NTSTATUS rpccli_dfs_Add(struct rpc_pipe_client *cli, const char *comment /* [in] [unique,charset(UTF16)] */, uint32_t flags /* [in] */, WERROR *werror); +struct tevent_req *rpccli_dfs_Remove_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_dfs_entry_path /* [in] [ref,charset(UTF16)] */, + const char *_servername /* [in] [unique,charset(UTF16)] */, + const char *_sharename /* [in] [unique,charset(UTF16)] */); +NTSTATUS rpccli_dfs_Remove_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dfs_Remove(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *dfs_entry_path /* [in] [ref,charset(UTF16)] */, const char *servername /* [in] [unique,charset(UTF16)] */, const char *sharename /* [in] [unique,charset(UTF16)] */, WERROR *werror); +struct tevent_req *rpccli_dfs_SetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_dfs_entry_path /* [in] [charset(UTF16)] */, + const char *_servername /* [in] [unique,charset(UTF16)] */, + const char *_sharename /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + union dfs_Info *_info /* [in] [ref,switch_is(level)] */); +NTSTATUS rpccli_dfs_SetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dfs_SetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *dfs_entry_path /* [in] [charset(UTF16)] */, @@ -26,6 +63,17 @@ NTSTATUS rpccli_dfs_SetInfo(struct rpc_pipe_client *cli, uint32_t level /* [in] */, union dfs_Info *info /* [in] [ref,switch_is(level)] */, WERROR *werror); +struct tevent_req *rpccli_dfs_GetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_dfs_entry_path /* [in] [charset(UTF16)] */, + const char *_servername /* [in] [unique,charset(UTF16)] */, + const char *_sharename /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + union dfs_Info *_info /* [out] [ref,switch_is(level)] */); +NTSTATUS rpccli_dfs_GetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dfs_GetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *dfs_entry_path /* [in] [charset(UTF16)] */, @@ -34,6 +82,16 @@ NTSTATUS rpccli_dfs_GetInfo(struct rpc_pipe_client *cli, uint32_t level /* [in] */, union dfs_Info *info /* [out] [ref,switch_is(level)] */, WERROR *werror); +struct tevent_req *rpccli_dfs_Enum_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint32_t _level /* [in] */, + uint32_t _bufsize /* [in] */, + struct dfs_EnumStruct *_info /* [in,out] [unique] */, + uint32_t *_total /* [in,out] [unique] */); +NTSTATUS rpccli_dfs_Enum_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dfs_Enum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t level /* [in] */, @@ -41,18 +99,57 @@ NTSTATUS rpccli_dfs_Enum(struct rpc_pipe_client *cli, struct dfs_EnumStruct *info /* [in,out] [unique] */, uint32_t *total /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_dfs_Rename_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_dfs_Rename_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dfs_Rename(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_dfs_Move_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_dfs_Move_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dfs_Move(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_dfs_ManagerGetConfigInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_dfs_ManagerGetConfigInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dfs_ManagerGetConfigInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_dfs_ManagerSendSiteInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_dfs_ManagerSendSiteInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dfs_ManagerSendSiteInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_dfs_AddFtRoot_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_servername /* [in] [charset(UTF16)] */, + const char *_dns_servername /* [in] [charset(UTF16)] */, + const char *_dfsname /* [in] [charset(UTF16)] */, + const char *_rootshare /* [in] [charset(UTF16)] */, + const char *_comment /* [in] [charset(UTF16)] */, + const char *_dfs_config_dn /* [in] [charset(UTF16)] */, + uint8_t _unknown1 /* [in] */, + uint32_t _flags /* [in] */, + struct dfs_UnknownStruct **_unknown2 /* [in,out] [unique] */); +NTSTATUS rpccli_dfs_AddFtRoot_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dfs_AddFtRoot(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername /* [in] [charset(UTF16)] */, @@ -65,6 +162,18 @@ NTSTATUS rpccli_dfs_AddFtRoot(struct rpc_pipe_client *cli, uint32_t flags /* [in] */, struct dfs_UnknownStruct **unknown2 /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_dfs_RemoveFtRoot_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_servername /* [in] [charset(UTF16)] */, + const char *_dns_servername /* [in] [charset(UTF16)] */, + const char *_dfsname /* [in] [charset(UTF16)] */, + const char *_rootshare /* [in] [charset(UTF16)] */, + uint32_t _flags /* [in] */, + struct dfs_UnknownStruct **_unknown /* [in,out] [unique] */); +NTSTATUS rpccli_dfs_RemoveFtRoot_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dfs_RemoveFtRoot(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername /* [in] [charset(UTF16)] */, @@ -74,6 +183,16 @@ NTSTATUS rpccli_dfs_RemoveFtRoot(struct rpc_pipe_client *cli, uint32_t flags /* [in] */, struct dfs_UnknownStruct **unknown /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_dfs_AddStdRoot_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_servername /* [in] [charset(UTF16)] */, + const char *_rootshare /* [in] [charset(UTF16)] */, + const char *_comment /* [in] [charset(UTF16)] */, + uint32_t _flags /* [in] */); +NTSTATUS rpccli_dfs_AddStdRoot_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dfs_AddStdRoot(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername /* [in] [charset(UTF16)] */, @@ -81,17 +200,44 @@ NTSTATUS rpccli_dfs_AddStdRoot(struct rpc_pipe_client *cli, const char *comment /* [in] [charset(UTF16)] */, uint32_t flags /* [in] */, WERROR *werror); +struct tevent_req *rpccli_dfs_RemoveStdRoot_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_servername /* [in] [charset(UTF16)] */, + const char *_rootshare /* [in] [charset(UTF16)] */, + uint32_t _flags /* [in] */); +NTSTATUS rpccli_dfs_RemoveStdRoot_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dfs_RemoveStdRoot(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername /* [in] [charset(UTF16)] */, const char *rootshare /* [in] [charset(UTF16)] */, uint32_t flags /* [in] */, WERROR *werror); +struct tevent_req *rpccli_dfs_ManagerInitialize_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_servername /* [in] [ref,charset(UTF16)] */, + uint32_t _flags /* [in] */); +NTSTATUS rpccli_dfs_ManagerInitialize_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dfs_ManagerInitialize(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername /* [in] [ref,charset(UTF16)] */, uint32_t flags /* [in] */, WERROR *werror); +struct tevent_req *rpccli_dfs_AddStdRootForced_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_servername /* [in] [charset(UTF16)] */, + const char *_rootshare /* [in] [charset(UTF16)] */, + const char *_comment /* [in] [charset(UTF16)] */, + const char *_store /* [in] [charset(UTF16)] */); +NTSTATUS rpccli_dfs_AddStdRootForced_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dfs_AddStdRootForced(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername /* [in] [charset(UTF16)] */, @@ -99,6 +245,16 @@ NTSTATUS rpccli_dfs_AddStdRootForced(struct rpc_pipe_client *cli, const char *comment /* [in] [charset(UTF16)] */, const char *store /* [in] [charset(UTF16)] */, WERROR *werror); +struct tevent_req *rpccli_dfs_GetDcAddress_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_servername /* [in] [charset(UTF16)] */, + const char **_server_fullname /* [in,out] [ref,charset(UTF16)] */, + uint8_t *_is_root /* [in,out] [ref] */, + uint32_t *_ttl /* [in,out] [ref] */); +NTSTATUS rpccli_dfs_GetDcAddress_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dfs_GetDcAddress(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername /* [in] [charset(UTF16)] */, @@ -106,6 +262,16 @@ NTSTATUS rpccli_dfs_GetDcAddress(struct rpc_pipe_client *cli, uint8_t *is_root /* [in,out] [ref] */, uint32_t *ttl /* [in,out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_dfs_SetDcAddress_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_servername /* [in] [charset(UTF16)] */, + const char *_server_fullname /* [in] [charset(UTF16)] */, + uint32_t _flags /* [in] */, + uint32_t _ttl /* [in] */); +NTSTATUS rpccli_dfs_SetDcAddress_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dfs_SetDcAddress(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername /* [in] [charset(UTF16)] */, @@ -113,17 +279,48 @@ NTSTATUS rpccli_dfs_SetDcAddress(struct rpc_pipe_client *cli, uint32_t flags /* [in] */, uint32_t ttl /* [in] */, WERROR *werror); +struct tevent_req *rpccli_dfs_FlushFtTable_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_servername /* [in] [charset(UTF16)] */, + const char *_rootshare /* [in] [charset(UTF16)] */); +NTSTATUS rpccli_dfs_FlushFtTable_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dfs_FlushFtTable(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername /* [in] [charset(UTF16)] */, const char *rootshare /* [in] [charset(UTF16)] */, WERROR *werror); +struct tevent_req *rpccli_dfs_Add2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_dfs_Add2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dfs_Add2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_dfs_Remove2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_dfs_Remove2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dfs_Remove2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_dfs_EnumEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_dfs_name /* [in] [charset(UTF16)] */, + uint32_t _level /* [in] */, + uint32_t _bufsize /* [in] */, + struct dfs_EnumStruct *_info /* [in,out] [unique] */, + uint32_t *_total /* [in,out] [unique] */); +NTSTATUS rpccli_dfs_EnumEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dfs_EnumEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *dfs_name /* [in] [charset(UTF16)] */, @@ -132,6 +329,12 @@ NTSTATUS rpccli_dfs_EnumEx(struct rpc_pipe_client *cli, struct dfs_EnumStruct *info /* [in,out] [unique] */, uint32_t *total /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_dfs_SetInfo2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_dfs_SetInfo2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dfs_SetInfo2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); diff --git a/librpc/gen_ndr/cli_drsuapi.c b/librpc/gen_ndr/cli_drsuapi.c index be83eebe1f..14c89aa194 100644 --- a/librpc/gen_ndr/cli_drsuapi.c +++ b/librpc/gen_ndr/cli_drsuapi.c @@ -6,6 +6,133 @@ #include "includes.h" #include "../librpc/gen_ndr/cli_drsuapi.h" +struct rpccli_drsuapi_DsBind_state { + struct drsuapi_DsBind orig; + struct drsuapi_DsBind tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_drsuapi_DsBind_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_drsuapi_DsBind_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct GUID *_bind_guid /* [in] [unique] */, + struct drsuapi_DsBindInfoCtr *_bind_info /* [in,out] [unique] */, + struct policy_handle *_bind_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_drsuapi_DsBind_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_drsuapi_DsBind_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.bind_guid = _bind_guid; + state->orig.in.bind_info = _bind_info; + + /* Out parameters */ + state->orig.out.bind_info = _bind_info; + state->orig.out.bind_handle = _bind_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(drsuapi_DsBind, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_drsuapi_DsBind_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_drsuapi, + NDR_DRSUAPI_DSBIND, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_drsuapi_DsBind_done, req); + return req; +} + +static void rpccli_drsuapi_DsBind_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_drsuapi_DsBind_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsBind_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 */ + if (state->orig.out.bind_info && state->tmp.out.bind_info) { + *state->orig.out.bind_info = *state->tmp.out.bind_info; + } + *state->orig.out.bind_handle = *state->tmp.out.bind_handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(drsuapi_DsBind, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_drsuapi_DsBind_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_drsuapi_DsBind_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsBind_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_drsuapi_DsBind(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct GUID *bind_guid /* [in] [unique] */, @@ -56,6 +183,126 @@ NTSTATUS rpccli_drsuapi_DsBind(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_drsuapi_DsUnbind_state { + struct drsuapi_DsUnbind orig; + struct drsuapi_DsUnbind tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_drsuapi_DsUnbind_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_drsuapi_DsUnbind_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_bind_handle /* [in,out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_drsuapi_DsUnbind_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_drsuapi_DsUnbind_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.bind_handle = _bind_handle; + + /* Out parameters */ + state->orig.out.bind_handle = _bind_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(drsuapi_DsUnbind, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_drsuapi_DsUnbind_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_drsuapi, + NDR_DRSUAPI_DSUNBIND, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_drsuapi_DsUnbind_done, req); + return req; +} + +static void rpccli_drsuapi_DsUnbind_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_drsuapi_DsUnbind_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsUnbind_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.bind_handle = *state->tmp.out.bind_handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(drsuapi_DsUnbind, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_drsuapi_DsUnbind_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_drsuapi_DsUnbind_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsUnbind_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_drsuapi_DsUnbind(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *bind_handle /* [in,out] [ref] */, @@ -100,6 +347,122 @@ NTSTATUS rpccli_drsuapi_DsUnbind(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_drsuapi_DsReplicaSync_state { + struct drsuapi_DsReplicaSync orig; + struct drsuapi_DsReplicaSync tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_drsuapi_DsReplicaSync_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_drsuapi_DsReplicaSync_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_bind_handle /* [in] [ref] */, + int32_t _level /* [in] */, + union drsuapi_DsReplicaSyncRequest _req /* [in] [switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_drsuapi_DsReplicaSync_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_drsuapi_DsReplicaSync_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.bind_handle = _bind_handle; + state->orig.in.level = _level; + state->orig.in.req = _req; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaSync, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_drsuapi, + NDR_DRSUAPI_DSREPLICASYNC, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_drsuapi_DsReplicaSync_done, req); + return req; +} + +static void rpccli_drsuapi_DsReplicaSync_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_drsuapi_DsReplicaSync_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsReplicaSync_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaSync, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_drsuapi_DsReplicaSync_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_drsuapi_DsReplicaSync_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsReplicaSync_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_drsuapi_DsReplicaSync(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *bind_handle /* [in] [ref] */, @@ -147,6 +510,134 @@ NTSTATUS rpccli_drsuapi_DsReplicaSync(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_drsuapi_DsGetNCChanges_state { + struct drsuapi_DsGetNCChanges orig; + struct drsuapi_DsGetNCChanges tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_drsuapi_DsGetNCChanges_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_drsuapi_DsGetNCChanges_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_bind_handle /* [in] [ref] */, + int32_t _level /* [in] */, + union drsuapi_DsGetNCChangesRequest *_req /* [in] [ref,switch_is(level)] */, + int32_t *_level_out /* [out] [ref] */, + union drsuapi_DsGetNCChangesCtr *_ctr /* [out] [ref,switch_is(*level_out)] */) +{ + struct tevent_req *req; + struct rpccli_drsuapi_DsGetNCChanges_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_drsuapi_DsGetNCChanges_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.bind_handle = _bind_handle; + state->orig.in.level = _level; + state->orig.in.req = _req; + + /* Out parameters */ + state->orig.out.level_out = _level_out; + state->orig.out.ctr = _ctr; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(drsuapi_DsGetNCChanges, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_drsuapi_DsGetNCChanges_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_drsuapi, + NDR_DRSUAPI_DSGETNCCHANGES, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_drsuapi_DsGetNCChanges_done, req); + return req; +} + +static void rpccli_drsuapi_DsGetNCChanges_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_drsuapi_DsGetNCChanges_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsGetNCChanges_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.level_out = *state->tmp.out.level_out; + *state->orig.out.ctr = *state->tmp.out.ctr; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(drsuapi_DsGetNCChanges, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_drsuapi_DsGetNCChanges_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_drsuapi_DsGetNCChanges_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsGetNCChanges_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_drsuapi_DsGetNCChanges(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *bind_handle /* [in] [ref] */, @@ -198,6 +689,122 @@ NTSTATUS rpccli_drsuapi_DsGetNCChanges(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_drsuapi_DsReplicaUpdateRefs_state { + struct drsuapi_DsReplicaUpdateRefs orig; + struct drsuapi_DsReplicaUpdateRefs tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_drsuapi_DsReplicaUpdateRefs_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_drsuapi_DsReplicaUpdateRefs_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_bind_handle /* [in] [ref] */, + int32_t _level /* [in] */, + union drsuapi_DsReplicaUpdateRefsRequest _req /* [in] [switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_drsuapi_DsReplicaUpdateRefs_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_drsuapi_DsReplicaUpdateRefs_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.bind_handle = _bind_handle; + state->orig.in.level = _level; + state->orig.in.req = _req; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaUpdateRefs, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_drsuapi, + NDR_DRSUAPI_DSREPLICAUPDATEREFS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_drsuapi_DsReplicaUpdateRefs_done, req); + return req; +} + +static void rpccli_drsuapi_DsReplicaUpdateRefs_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_drsuapi_DsReplicaUpdateRefs_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsReplicaUpdateRefs_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(drsuapi_DsReplicaUpdateRefs, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_drsuapi_DsReplicaUpdateRefs_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_drsuapi_DsReplicaUpdateRefs_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsReplicaUpdateRefs_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_drsuapi_DsReplicaUpdateRefs(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *bind_handle /* [in] [ref] */, @@ -245,6 +852,116 @@ NTSTATUS rpccli_drsuapi_DsReplicaUpdateRefs(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_DRSUAPI_REPLICA_ADD_state { + struct DRSUAPI_REPLICA_ADD orig; + struct DRSUAPI_REPLICA_ADD tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_DRSUAPI_REPLICA_ADD_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_DRSUAPI_REPLICA_ADD_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_DRSUAPI_REPLICA_ADD_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_DRSUAPI_REPLICA_ADD_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(DRSUAPI_REPLICA_ADD, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_drsuapi, + NDR_DRSUAPI_REPLICA_ADD, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_DRSUAPI_REPLICA_ADD_done, req); + return req; +} + +static void rpccli_DRSUAPI_REPLICA_ADD_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_DRSUAPI_REPLICA_ADD_state *state = tevent_req_data( + req, struct rpccli_DRSUAPI_REPLICA_ADD_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(DRSUAPI_REPLICA_ADD, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_DRSUAPI_REPLICA_ADD_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_DRSUAPI_REPLICA_ADD_state *state = tevent_req_data( + req, struct rpccli_DRSUAPI_REPLICA_ADD_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_DRSUAPI_REPLICA_ADD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -286,6 +1003,116 @@ NTSTATUS rpccli_DRSUAPI_REPLICA_ADD(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_DRSUAPI_REPLICA_DEL_state { + struct DRSUAPI_REPLICA_DEL orig; + struct DRSUAPI_REPLICA_DEL tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_DRSUAPI_REPLICA_DEL_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_DRSUAPI_REPLICA_DEL_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_DRSUAPI_REPLICA_DEL_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_DRSUAPI_REPLICA_DEL_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(DRSUAPI_REPLICA_DEL, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_drsuapi, + NDR_DRSUAPI_REPLICA_DEL, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_DRSUAPI_REPLICA_DEL_done, req); + return req; +} + +static void rpccli_DRSUAPI_REPLICA_DEL_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_DRSUAPI_REPLICA_DEL_state *state = tevent_req_data( + req, struct rpccli_DRSUAPI_REPLICA_DEL_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(DRSUAPI_REPLICA_DEL, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_DRSUAPI_REPLICA_DEL_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_DRSUAPI_REPLICA_DEL_state *state = tevent_req_data( + req, struct rpccli_DRSUAPI_REPLICA_DEL_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_DRSUAPI_REPLICA_DEL(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -327,6 +1154,116 @@ NTSTATUS rpccli_DRSUAPI_REPLICA_DEL(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_DRSUAPI_REPLICA_MODIFY_state { + struct DRSUAPI_REPLICA_MODIFY orig; + struct DRSUAPI_REPLICA_MODIFY tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_DRSUAPI_REPLICA_MODIFY_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_DRSUAPI_REPLICA_MODIFY_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_DRSUAPI_REPLICA_MODIFY_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_DRSUAPI_REPLICA_MODIFY_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(DRSUAPI_REPLICA_MODIFY, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_drsuapi, + NDR_DRSUAPI_REPLICA_MODIFY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_DRSUAPI_REPLICA_MODIFY_done, req); + return req; +} + +static void rpccli_DRSUAPI_REPLICA_MODIFY_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_DRSUAPI_REPLICA_MODIFY_state *state = tevent_req_data( + req, struct rpccli_DRSUAPI_REPLICA_MODIFY_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(DRSUAPI_REPLICA_MODIFY, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_DRSUAPI_REPLICA_MODIFY_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_DRSUAPI_REPLICA_MODIFY_state *state = tevent_req_data( + req, struct rpccli_DRSUAPI_REPLICA_MODIFY_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_DRSUAPI_REPLICA_MODIFY(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -368,6 +1305,116 @@ NTSTATUS rpccli_DRSUAPI_REPLICA_MODIFY(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_DRSUAPI_VERIFY_NAMES_state { + struct DRSUAPI_VERIFY_NAMES orig; + struct DRSUAPI_VERIFY_NAMES tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_DRSUAPI_VERIFY_NAMES_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_DRSUAPI_VERIFY_NAMES_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_DRSUAPI_VERIFY_NAMES_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_DRSUAPI_VERIFY_NAMES_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(DRSUAPI_VERIFY_NAMES, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_drsuapi, + NDR_DRSUAPI_VERIFY_NAMES, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_DRSUAPI_VERIFY_NAMES_done, req); + return req; +} + +static void rpccli_DRSUAPI_VERIFY_NAMES_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_DRSUAPI_VERIFY_NAMES_state *state = tevent_req_data( + req, struct rpccli_DRSUAPI_VERIFY_NAMES_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(DRSUAPI_VERIFY_NAMES, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_DRSUAPI_VERIFY_NAMES_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_DRSUAPI_VERIFY_NAMES_state *state = tevent_req_data( + req, struct rpccli_DRSUAPI_VERIFY_NAMES_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_DRSUAPI_VERIFY_NAMES(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -409,6 +1456,134 @@ NTSTATUS rpccli_DRSUAPI_VERIFY_NAMES(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_drsuapi_DsGetMemberships_state { + struct drsuapi_DsGetMemberships orig; + struct drsuapi_DsGetMemberships tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_drsuapi_DsGetMemberships_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_drsuapi_DsGetMemberships_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_bind_handle /* [in] [ref] */, + int32_t _level /* [in] */, + union drsuapi_DsGetMembershipsRequest *_req /* [in] [ref,switch_is(level)] */, + int32_t *_level_out /* [out] [ref] */, + union drsuapi_DsGetMembershipsCtr *_ctr /* [out] [ref,switch_is(*level_out)] */) +{ + struct tevent_req *req; + struct rpccli_drsuapi_DsGetMemberships_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_drsuapi_DsGetMemberships_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.bind_handle = _bind_handle; + state->orig.in.level = _level; + state->orig.in.req = _req; + + /* Out parameters */ + state->orig.out.level_out = _level_out; + state->orig.out.ctr = _ctr; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(drsuapi_DsGetMemberships, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_drsuapi_DsGetMemberships_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_drsuapi, + NDR_DRSUAPI_DSGETMEMBERSHIPS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_drsuapi_DsGetMemberships_done, req); + return req; +} + +static void rpccli_drsuapi_DsGetMemberships_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_drsuapi_DsGetMemberships_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsGetMemberships_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.level_out = *state->tmp.out.level_out; + *state->orig.out.ctr = *state->tmp.out.ctr; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(drsuapi_DsGetMemberships, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_drsuapi_DsGetMemberships_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_drsuapi_DsGetMemberships_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsGetMemberships_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_drsuapi_DsGetMemberships(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *bind_handle /* [in] [ref] */, @@ -460,6 +1635,116 @@ NTSTATUS rpccli_drsuapi_DsGetMemberships(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_DRSUAPI_INTER_DOMAIN_MOVE_state { + struct DRSUAPI_INTER_DOMAIN_MOVE orig; + struct DRSUAPI_INTER_DOMAIN_MOVE tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_DRSUAPI_INTER_DOMAIN_MOVE_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_DRSUAPI_INTER_DOMAIN_MOVE_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_DRSUAPI_INTER_DOMAIN_MOVE_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_DRSUAPI_INTER_DOMAIN_MOVE_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(DRSUAPI_INTER_DOMAIN_MOVE, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_drsuapi, + NDR_DRSUAPI_INTER_DOMAIN_MOVE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_DRSUAPI_INTER_DOMAIN_MOVE_done, req); + return req; +} + +static void rpccli_DRSUAPI_INTER_DOMAIN_MOVE_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_DRSUAPI_INTER_DOMAIN_MOVE_state *state = tevent_req_data( + req, struct rpccli_DRSUAPI_INTER_DOMAIN_MOVE_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(DRSUAPI_INTER_DOMAIN_MOVE, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_DRSUAPI_INTER_DOMAIN_MOVE_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_DRSUAPI_INTER_DOMAIN_MOVE_state *state = tevent_req_data( + req, struct rpccli_DRSUAPI_INTER_DOMAIN_MOVE_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_DRSUAPI_INTER_DOMAIN_MOVE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -501,6 +1786,134 @@ NTSTATUS rpccli_DRSUAPI_INTER_DOMAIN_MOVE(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_drsuapi_DsGetNT4ChangeLog_state { + struct drsuapi_DsGetNT4ChangeLog orig; + struct drsuapi_DsGetNT4ChangeLog tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_drsuapi_DsGetNT4ChangeLog_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_drsuapi_DsGetNT4ChangeLog_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_bind_handle /* [in] [ref] */, + uint32_t _level /* [in] */, + union drsuapi_DsGetNT4ChangeLogRequest *_req /* [in] [ref,switch_is(level)] */, + uint32_t *_level_out /* [out] [ref] */, + union drsuapi_DsGetNT4ChangeLogInfo *_info /* [out] [ref,switch_is(*level_out)] */) +{ + struct tevent_req *req; + struct rpccli_drsuapi_DsGetNT4ChangeLog_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_drsuapi_DsGetNT4ChangeLog_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.bind_handle = _bind_handle; + state->orig.in.level = _level; + state->orig.in.req = _req; + + /* Out parameters */ + state->orig.out.level_out = _level_out; + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(drsuapi_DsGetNT4ChangeLog, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_drsuapi_DsGetNT4ChangeLog_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_drsuapi, + NDR_DRSUAPI_DSGETNT4CHANGELOG, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_drsuapi_DsGetNT4ChangeLog_done, req); + return req; +} + +static void rpccli_drsuapi_DsGetNT4ChangeLog_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_drsuapi_DsGetNT4ChangeLog_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsGetNT4ChangeLog_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.level_out = *state->tmp.out.level_out; + *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(drsuapi_DsGetNT4ChangeLog, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_drsuapi_DsGetNT4ChangeLog_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_drsuapi_DsGetNT4ChangeLog_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsGetNT4ChangeLog_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_drsuapi_DsGetNT4ChangeLog(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *bind_handle /* [in] [ref] */, @@ -552,6 +1965,134 @@ NTSTATUS rpccli_drsuapi_DsGetNT4ChangeLog(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_drsuapi_DsCrackNames_state { + struct drsuapi_DsCrackNames orig; + struct drsuapi_DsCrackNames tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_drsuapi_DsCrackNames_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_drsuapi_DsCrackNames_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_bind_handle /* [in] [ref] */, + int32_t _level /* [in] */, + union drsuapi_DsNameRequest *_req /* [in] [ref,switch_is(level)] */, + int32_t *_level_out /* [out] [ref] */, + union drsuapi_DsNameCtr *_ctr /* [out] [ref,switch_is(*level_out)] */) +{ + struct tevent_req *req; + struct rpccli_drsuapi_DsCrackNames_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_drsuapi_DsCrackNames_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.bind_handle = _bind_handle; + state->orig.in.level = _level; + state->orig.in.req = _req; + + /* Out parameters */ + state->orig.out.level_out = _level_out; + state->orig.out.ctr = _ctr; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(drsuapi_DsCrackNames, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_drsuapi_DsCrackNames_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_drsuapi, + NDR_DRSUAPI_DSCRACKNAMES, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_drsuapi_DsCrackNames_done, req); + return req; +} + +static void rpccli_drsuapi_DsCrackNames_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_drsuapi_DsCrackNames_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsCrackNames_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.level_out = *state->tmp.out.level_out; + *state->orig.out.ctr = *state->tmp.out.ctr; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(drsuapi_DsCrackNames, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_drsuapi_DsCrackNames_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_drsuapi_DsCrackNames_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsCrackNames_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_drsuapi_DsCrackNames(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *bind_handle /* [in] [ref] */, @@ -603,6 +2144,134 @@ NTSTATUS rpccli_drsuapi_DsCrackNames(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_drsuapi_DsWriteAccountSpn_state { + struct drsuapi_DsWriteAccountSpn orig; + struct drsuapi_DsWriteAccountSpn tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_drsuapi_DsWriteAccountSpn_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_drsuapi_DsWriteAccountSpn_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_bind_handle /* [in] [ref] */, + int32_t _level /* [in] */, + union drsuapi_DsWriteAccountSpnRequest *_req /* [in] [ref,switch_is(level)] */, + int32_t *_level_out /* [out] [ref] */, + union drsuapi_DsWriteAccountSpnResult *_res /* [out] [ref,switch_is(*level_out)] */) +{ + struct tevent_req *req; + struct rpccli_drsuapi_DsWriteAccountSpn_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_drsuapi_DsWriteAccountSpn_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.bind_handle = _bind_handle; + state->orig.in.level = _level; + state->orig.in.req = _req; + + /* Out parameters */ + state->orig.out.level_out = _level_out; + state->orig.out.res = _res; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(drsuapi_DsWriteAccountSpn, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_drsuapi_DsWriteAccountSpn_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_drsuapi, + NDR_DRSUAPI_DSWRITEACCOUNTSPN, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_drsuapi_DsWriteAccountSpn_done, req); + return req; +} + +static void rpccli_drsuapi_DsWriteAccountSpn_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_drsuapi_DsWriteAccountSpn_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsWriteAccountSpn_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.level_out = *state->tmp.out.level_out; + *state->orig.out.res = *state->tmp.out.res; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(drsuapi_DsWriteAccountSpn, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_drsuapi_DsWriteAccountSpn_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_drsuapi_DsWriteAccountSpn_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsWriteAccountSpn_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_drsuapi_DsWriteAccountSpn(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *bind_handle /* [in] [ref] */, @@ -654,6 +2323,134 @@ NTSTATUS rpccli_drsuapi_DsWriteAccountSpn(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_drsuapi_DsRemoveDSServer_state { + struct drsuapi_DsRemoveDSServer orig; + struct drsuapi_DsRemoveDSServer tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_drsuapi_DsRemoveDSServer_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_drsuapi_DsRemoveDSServer_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_bind_handle /* [in] [ref] */, + int32_t _level /* [in] */, + union drsuapi_DsRemoveDSServerRequest *_req /* [in] [ref,switch_is(level)] */, + int32_t *_level_out /* [out] [ref] */, + union drsuapi_DsRemoveDSServerResult *_res /* [out] [ref,switch_is(*level_out)] */) +{ + struct tevent_req *req; + struct rpccli_drsuapi_DsRemoveDSServer_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_drsuapi_DsRemoveDSServer_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.bind_handle = _bind_handle; + state->orig.in.level = _level; + state->orig.in.req = _req; + + /* Out parameters */ + state->orig.out.level_out = _level_out; + state->orig.out.res = _res; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(drsuapi_DsRemoveDSServer, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_drsuapi_DsRemoveDSServer_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_drsuapi, + NDR_DRSUAPI_DSREMOVEDSSERVER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_drsuapi_DsRemoveDSServer_done, req); + return req; +} + +static void rpccli_drsuapi_DsRemoveDSServer_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_drsuapi_DsRemoveDSServer_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsRemoveDSServer_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.level_out = *state->tmp.out.level_out; + *state->orig.out.res = *state->tmp.out.res; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(drsuapi_DsRemoveDSServer, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_drsuapi_DsRemoveDSServer_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_drsuapi_DsRemoveDSServer_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsRemoveDSServer_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_drsuapi_DsRemoveDSServer(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *bind_handle /* [in] [ref] */, @@ -705,6 +2502,116 @@ NTSTATUS rpccli_drsuapi_DsRemoveDSServer(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_DRSUAPI_REMOVE_DS_DOMAIN_state { + struct DRSUAPI_REMOVE_DS_DOMAIN orig; + struct DRSUAPI_REMOVE_DS_DOMAIN tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_DRSUAPI_REMOVE_DS_DOMAIN_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_DRSUAPI_REMOVE_DS_DOMAIN_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_DRSUAPI_REMOVE_DS_DOMAIN_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_DRSUAPI_REMOVE_DS_DOMAIN_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(DRSUAPI_REMOVE_DS_DOMAIN, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_drsuapi, + NDR_DRSUAPI_REMOVE_DS_DOMAIN, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_DRSUAPI_REMOVE_DS_DOMAIN_done, req); + return req; +} + +static void rpccli_DRSUAPI_REMOVE_DS_DOMAIN_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_DRSUAPI_REMOVE_DS_DOMAIN_state *state = tevent_req_data( + req, struct rpccli_DRSUAPI_REMOVE_DS_DOMAIN_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(DRSUAPI_REMOVE_DS_DOMAIN, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_DRSUAPI_REMOVE_DS_DOMAIN_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_DRSUAPI_REMOVE_DS_DOMAIN_state *state = tevent_req_data( + req, struct rpccli_DRSUAPI_REMOVE_DS_DOMAIN_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_DRSUAPI_REMOVE_DS_DOMAIN(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -746,6 +2653,134 @@ NTSTATUS rpccli_DRSUAPI_REMOVE_DS_DOMAIN(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_drsuapi_DsGetDomainControllerInfo_state { + struct drsuapi_DsGetDomainControllerInfo orig; + struct drsuapi_DsGetDomainControllerInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_drsuapi_DsGetDomainControllerInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_drsuapi_DsGetDomainControllerInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_bind_handle /* [in] [ref] */, + int32_t _level /* [in] */, + union drsuapi_DsGetDCInfoRequest *_req /* [in] [ref,switch_is(level)] */, + int32_t *_level_out /* [out] [ref] */, + union drsuapi_DsGetDCInfoCtr *_ctr /* [out] [ref,switch_is(*level_out)] */) +{ + struct tevent_req *req; + struct rpccli_drsuapi_DsGetDomainControllerInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_drsuapi_DsGetDomainControllerInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.bind_handle = _bind_handle; + state->orig.in.level = _level; + state->orig.in.req = _req; + + /* Out parameters */ + state->orig.out.level_out = _level_out; + state->orig.out.ctr = _ctr; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(drsuapi_DsGetDomainControllerInfo, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_drsuapi_DsGetDomainControllerInfo_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_drsuapi, + NDR_DRSUAPI_DSGETDOMAINCONTROLLERINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_drsuapi_DsGetDomainControllerInfo_done, req); + return req; +} + +static void rpccli_drsuapi_DsGetDomainControllerInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_drsuapi_DsGetDomainControllerInfo_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsGetDomainControllerInfo_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.level_out = *state->tmp.out.level_out; + *state->orig.out.ctr = *state->tmp.out.ctr; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(drsuapi_DsGetDomainControllerInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_drsuapi_DsGetDomainControllerInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_drsuapi_DsGetDomainControllerInfo_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsGetDomainControllerInfo_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_drsuapi_DsGetDomainControllerInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *bind_handle /* [in] [ref] */, @@ -797,6 +2832,134 @@ NTSTATUS rpccli_drsuapi_DsGetDomainControllerInfo(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_drsuapi_DsAddEntry_state { + struct drsuapi_DsAddEntry orig; + struct drsuapi_DsAddEntry tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_drsuapi_DsAddEntry_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_drsuapi_DsAddEntry_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_bind_handle /* [in] [ref] */, + int32_t _level /* [in] */, + union drsuapi_DsAddEntryRequest *_req /* [in] [ref,switch_is(level)] */, + int32_t *_level_out /* [out] [ref] */, + union drsuapi_DsAddEntryCtr *_ctr /* [out] [ref,switch_is(*level_out)] */) +{ + struct tevent_req *req; + struct rpccli_drsuapi_DsAddEntry_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_drsuapi_DsAddEntry_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.bind_handle = _bind_handle; + state->orig.in.level = _level; + state->orig.in.req = _req; + + /* Out parameters */ + state->orig.out.level_out = _level_out; + state->orig.out.ctr = _ctr; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(drsuapi_DsAddEntry, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_drsuapi_DsAddEntry_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_drsuapi, + NDR_DRSUAPI_DSADDENTRY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_drsuapi_DsAddEntry_done, req); + return req; +} + +static void rpccli_drsuapi_DsAddEntry_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_drsuapi_DsAddEntry_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsAddEntry_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.level_out = *state->tmp.out.level_out; + *state->orig.out.ctr = *state->tmp.out.ctr; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(drsuapi_DsAddEntry, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_drsuapi_DsAddEntry_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_drsuapi_DsAddEntry_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsAddEntry_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_drsuapi_DsAddEntry(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *bind_handle /* [in] [ref] */, @@ -848,6 +3011,116 @@ NTSTATUS rpccli_drsuapi_DsAddEntry(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_DRSUAPI_EXECUTE_KCC_state { + struct DRSUAPI_EXECUTE_KCC orig; + struct DRSUAPI_EXECUTE_KCC tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_DRSUAPI_EXECUTE_KCC_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_DRSUAPI_EXECUTE_KCC_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_DRSUAPI_EXECUTE_KCC_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_DRSUAPI_EXECUTE_KCC_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(DRSUAPI_EXECUTE_KCC, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_drsuapi, + NDR_DRSUAPI_EXECUTE_KCC, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_DRSUAPI_EXECUTE_KCC_done, req); + return req; +} + +static void rpccli_DRSUAPI_EXECUTE_KCC_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_DRSUAPI_EXECUTE_KCC_state *state = tevent_req_data( + req, struct rpccli_DRSUAPI_EXECUTE_KCC_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(DRSUAPI_EXECUTE_KCC, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_DRSUAPI_EXECUTE_KCC_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_DRSUAPI_EXECUTE_KCC_state *state = tevent_req_data( + req, struct rpccli_DRSUAPI_EXECUTE_KCC_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_DRSUAPI_EXECUTE_KCC(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -889,6 +3162,134 @@ NTSTATUS rpccli_DRSUAPI_EXECUTE_KCC(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_drsuapi_DsReplicaGetInfo_state { + struct drsuapi_DsReplicaGetInfo orig; + struct drsuapi_DsReplicaGetInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_drsuapi_DsReplicaGetInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_drsuapi_DsReplicaGetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_bind_handle /* [in] [ref] */, + enum drsuapi_DsReplicaGetInfoLevel _level /* [in] */, + union drsuapi_DsReplicaGetInfoRequest *_req /* [in] [ref,switch_is(level)] */, + enum drsuapi_DsReplicaInfoType *_info_type /* [out] [ref] */, + union drsuapi_DsReplicaInfo *_info /* [out] [ref,switch_is(*info_type)] */) +{ + struct tevent_req *req; + struct rpccli_drsuapi_DsReplicaGetInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_drsuapi_DsReplicaGetInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.bind_handle = _bind_handle; + state->orig.in.level = _level; + state->orig.in.req = _req; + + /* Out parameters */ + state->orig.out.info_type = _info_type; + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(drsuapi_DsReplicaGetInfo, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_drsuapi_DsReplicaGetInfo_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_drsuapi, + NDR_DRSUAPI_DSREPLICAGETINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_drsuapi_DsReplicaGetInfo_done, req); + return req; +} + +static void rpccli_drsuapi_DsReplicaGetInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_drsuapi_DsReplicaGetInfo_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsReplicaGetInfo_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_type = *state->tmp.out.info_type; + *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(drsuapi_DsReplicaGetInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_drsuapi_DsReplicaGetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_drsuapi_DsReplicaGetInfo_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsReplicaGetInfo_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_drsuapi_DsReplicaGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *bind_handle /* [in] [ref] */, @@ -940,6 +3341,116 @@ NTSTATUS rpccli_drsuapi_DsReplicaGetInfo(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_DRSUAPI_ADD_SID_HISTORY_state { + struct DRSUAPI_ADD_SID_HISTORY orig; + struct DRSUAPI_ADD_SID_HISTORY tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_DRSUAPI_ADD_SID_HISTORY_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_DRSUAPI_ADD_SID_HISTORY_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_DRSUAPI_ADD_SID_HISTORY_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_DRSUAPI_ADD_SID_HISTORY_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(DRSUAPI_ADD_SID_HISTORY, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_drsuapi, + NDR_DRSUAPI_ADD_SID_HISTORY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_DRSUAPI_ADD_SID_HISTORY_done, req); + return req; +} + +static void rpccli_DRSUAPI_ADD_SID_HISTORY_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_DRSUAPI_ADD_SID_HISTORY_state *state = tevent_req_data( + req, struct rpccli_DRSUAPI_ADD_SID_HISTORY_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(DRSUAPI_ADD_SID_HISTORY, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_DRSUAPI_ADD_SID_HISTORY_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_DRSUAPI_ADD_SID_HISTORY_state *state = tevent_req_data( + req, struct rpccli_DRSUAPI_ADD_SID_HISTORY_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_DRSUAPI_ADD_SID_HISTORY(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -981,6 +3492,134 @@ NTSTATUS rpccli_DRSUAPI_ADD_SID_HISTORY(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_drsuapi_DsGetMemberships2_state { + struct drsuapi_DsGetMemberships2 orig; + struct drsuapi_DsGetMemberships2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_drsuapi_DsGetMemberships2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_drsuapi_DsGetMemberships2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_bind_handle /* [in] [ref] */, + int32_t _level /* [in] */, + union drsuapi_DsGetMemberships2Request *_req /* [in] [ref,switch_is(level)] */, + int32_t *_level_out /* [out] [ref] */, + union drsuapi_DsGetMemberships2Ctr *_ctr /* [out] [ref,switch_is(*level_out)] */) +{ + struct tevent_req *req; + struct rpccli_drsuapi_DsGetMemberships2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_drsuapi_DsGetMemberships2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.bind_handle = _bind_handle; + state->orig.in.level = _level; + state->orig.in.req = _req; + + /* Out parameters */ + state->orig.out.level_out = _level_out; + state->orig.out.ctr = _ctr; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(drsuapi_DsGetMemberships2, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_drsuapi_DsGetMemberships2_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_drsuapi, + NDR_DRSUAPI_DSGETMEMBERSHIPS2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_drsuapi_DsGetMemberships2_done, req); + return req; +} + +static void rpccli_drsuapi_DsGetMemberships2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_drsuapi_DsGetMemberships2_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsGetMemberships2_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.level_out = *state->tmp.out.level_out; + *state->orig.out.ctr = *state->tmp.out.ctr; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(drsuapi_DsGetMemberships2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_drsuapi_DsGetMemberships2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_drsuapi_DsGetMemberships2_state *state = tevent_req_data( + req, struct rpccli_drsuapi_DsGetMemberships2_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_drsuapi_DsGetMemberships2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *bind_handle /* [in] [ref] */, @@ -1032,6 +3671,116 @@ NTSTATUS rpccli_drsuapi_DsGetMemberships2(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state { + struct DRSUAPI_REPLICA_VERIFY_OBJECTS orig; + struct DRSUAPI_REPLICA_VERIFY_OBJECTS tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(DRSUAPI_REPLICA_VERIFY_OBJECTS, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_drsuapi, + NDR_DRSUAPI_REPLICA_VERIFY_OBJECTS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_done, req); + return req; +} + +static void rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state *state = tevent_req_data( + req, struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(DRSUAPI_REPLICA_VERIFY_OBJECTS, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_state *state = tevent_req_data( + req, struct rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_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_DRSUAPI_REPLICA_VERIFY_OBJECTS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1073,6 +3822,116 @@ NTSTATUS rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state { + struct DRSUAPI_GET_OBJECT_EXISTENCE orig; + struct DRSUAPI_GET_OBJECT_EXISTENCE tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(DRSUAPI_GET_OBJECT_EXISTENCE, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_drsuapi, + NDR_DRSUAPI_GET_OBJECT_EXISTENCE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_done, req); + return req; +} + +static void rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state *state = tevent_req_data( + req, struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(DRSUAPI_GET_OBJECT_EXISTENCE, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_state *state = tevent_req_data( + req, struct rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_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_DRSUAPI_GET_OBJECT_EXISTENCE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1114,6 +3973,134 @@ NTSTATUS rpccli_DRSUAPI_GET_OBJECT_EXISTENCE(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_drsuapi_QuerySitesByCost_state { + struct drsuapi_QuerySitesByCost orig; + struct drsuapi_QuerySitesByCost tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_drsuapi_QuerySitesByCost_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_drsuapi_QuerySitesByCost_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_bind_handle /* [in] [ref] */, + int32_t _level /* [in] */, + union drsuapi_QuerySitesByCostRequest *_req /* [in] [ref,switch_is(level)] */, + int32_t *_level_out /* [out] [ref] */, + union drsuapi_QuerySitesByCostCtr *_ctr /* [out] [ref,switch_is(*level_out)] */) +{ + struct tevent_req *req; + struct rpccli_drsuapi_QuerySitesByCost_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_drsuapi_QuerySitesByCost_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.bind_handle = _bind_handle; + state->orig.in.level = _level; + state->orig.in.req = _req; + + /* Out parameters */ + state->orig.out.level_out = _level_out; + state->orig.out.ctr = _ctr; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(drsuapi_QuerySitesByCost, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_drsuapi_QuerySitesByCost_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_drsuapi, + NDR_DRSUAPI_QUERYSITESBYCOST, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_drsuapi_QuerySitesByCost_done, req); + return req; +} + +static void rpccli_drsuapi_QuerySitesByCost_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_drsuapi_QuerySitesByCost_state *state = tevent_req_data( + req, struct rpccli_drsuapi_QuerySitesByCost_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.level_out = *state->tmp.out.level_out; + *state->orig.out.ctr = *state->tmp.out.ctr; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(drsuapi_QuerySitesByCost, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_drsuapi_QuerySitesByCost_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_drsuapi_QuerySitesByCost_state *state = tevent_req_data( + req, struct rpccli_drsuapi_QuerySitesByCost_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_drsuapi_QuerySitesByCost(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *bind_handle /* [in] [ref] */, diff --git a/librpc/gen_ndr/cli_drsuapi.h b/librpc/gen_ndr/cli_drsuapi.h index 65bc26a60d..447528110d 100644 --- a/librpc/gen_ndr/cli_drsuapi.h +++ b/librpc/gen_ndr/cli_drsuapi.h @@ -1,22 +1,58 @@ #include "../librpc/gen_ndr/ndr_drsuapi.h" #ifndef __CLI_DRSUAPI__ #define __CLI_DRSUAPI__ +struct tevent_req *rpccli_drsuapi_DsBind_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct GUID *_bind_guid /* [in] [unique] */, + struct drsuapi_DsBindInfoCtr *_bind_info /* [in,out] [unique] */, + struct policy_handle *_bind_handle /* [out] [ref] */); +NTSTATUS rpccli_drsuapi_DsBind_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_drsuapi_DsBind(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct GUID *bind_guid /* [in] [unique] */, struct drsuapi_DsBindInfoCtr *bind_info /* [in,out] [unique] */, struct policy_handle *bind_handle /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_drsuapi_DsUnbind_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_bind_handle /* [in,out] [ref] */); +NTSTATUS rpccli_drsuapi_DsUnbind_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_drsuapi_DsUnbind(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *bind_handle /* [in,out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_drsuapi_DsReplicaSync_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_bind_handle /* [in] [ref] */, + int32_t _level /* [in] */, + union drsuapi_DsReplicaSyncRequest _req /* [in] [switch_is(level)] */); +NTSTATUS rpccli_drsuapi_DsReplicaSync_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_drsuapi_DsReplicaSync(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *bind_handle /* [in] [ref] */, int32_t level /* [in] */, union drsuapi_DsReplicaSyncRequest req /* [in] [switch_is(level)] */, WERROR *werror); +struct tevent_req *rpccli_drsuapi_DsGetNCChanges_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_bind_handle /* [in] [ref] */, + int32_t _level /* [in] */, + union drsuapi_DsGetNCChangesRequest *_req /* [in] [ref,switch_is(level)] */, + int32_t *_level_out /* [out] [ref] */, + union drsuapi_DsGetNCChangesCtr *_ctr /* [out] [ref,switch_is(*level_out)] */); +NTSTATUS rpccli_drsuapi_DsGetNCChanges_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_drsuapi_DsGetNCChanges(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *bind_handle /* [in] [ref] */, @@ -25,24 +61,68 @@ NTSTATUS rpccli_drsuapi_DsGetNCChanges(struct rpc_pipe_client *cli, int32_t *level_out /* [out] [ref] */, union drsuapi_DsGetNCChangesCtr *ctr /* [out] [ref,switch_is(*level_out)] */, WERROR *werror); +struct tevent_req *rpccli_drsuapi_DsReplicaUpdateRefs_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_bind_handle /* [in] [ref] */, + int32_t _level /* [in] */, + union drsuapi_DsReplicaUpdateRefsRequest _req /* [in] [switch_is(level)] */); +NTSTATUS rpccli_drsuapi_DsReplicaUpdateRefs_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_drsuapi_DsReplicaUpdateRefs(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *bind_handle /* [in] [ref] */, int32_t level /* [in] */, union drsuapi_DsReplicaUpdateRefsRequest req /* [in] [switch_is(level)] */, WERROR *werror); +struct tevent_req *rpccli_DRSUAPI_REPLICA_ADD_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_DRSUAPI_REPLICA_ADD_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_DRSUAPI_REPLICA_ADD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_DRSUAPI_REPLICA_DEL_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_DRSUAPI_REPLICA_DEL_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_DRSUAPI_REPLICA_DEL(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_DRSUAPI_REPLICA_MODIFY_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_DRSUAPI_REPLICA_MODIFY_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_DRSUAPI_REPLICA_MODIFY(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_DRSUAPI_VERIFY_NAMES_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_DRSUAPI_VERIFY_NAMES_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_DRSUAPI_VERIFY_NAMES(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_drsuapi_DsGetMemberships_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_bind_handle /* [in] [ref] */, + int32_t _level /* [in] */, + union drsuapi_DsGetMembershipsRequest *_req /* [in] [ref,switch_is(level)] */, + int32_t *_level_out /* [out] [ref] */, + union drsuapi_DsGetMembershipsCtr *_ctr /* [out] [ref,switch_is(*level_out)] */); +NTSTATUS rpccli_drsuapi_DsGetMemberships_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_drsuapi_DsGetMemberships(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *bind_handle /* [in] [ref] */, @@ -51,9 +131,26 @@ NTSTATUS rpccli_drsuapi_DsGetMemberships(struct rpc_pipe_client *cli, int32_t *level_out /* [out] [ref] */, union drsuapi_DsGetMembershipsCtr *ctr /* [out] [ref,switch_is(*level_out)] */, WERROR *werror); +struct tevent_req *rpccli_DRSUAPI_INTER_DOMAIN_MOVE_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_DRSUAPI_INTER_DOMAIN_MOVE_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_DRSUAPI_INTER_DOMAIN_MOVE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_drsuapi_DsGetNT4ChangeLog_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_bind_handle /* [in] [ref] */, + uint32_t _level /* [in] */, + union drsuapi_DsGetNT4ChangeLogRequest *_req /* [in] [ref,switch_is(level)] */, + uint32_t *_level_out /* [out] [ref] */, + union drsuapi_DsGetNT4ChangeLogInfo *_info /* [out] [ref,switch_is(*level_out)] */); +NTSTATUS rpccli_drsuapi_DsGetNT4ChangeLog_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_drsuapi_DsGetNT4ChangeLog(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *bind_handle /* [in] [ref] */, @@ -62,6 +159,17 @@ NTSTATUS rpccli_drsuapi_DsGetNT4ChangeLog(struct rpc_pipe_client *cli, uint32_t *level_out /* [out] [ref] */, union drsuapi_DsGetNT4ChangeLogInfo *info /* [out] [ref,switch_is(*level_out)] */, WERROR *werror); +struct tevent_req *rpccli_drsuapi_DsCrackNames_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_bind_handle /* [in] [ref] */, + int32_t _level /* [in] */, + union drsuapi_DsNameRequest *_req /* [in] [ref,switch_is(level)] */, + int32_t *_level_out /* [out] [ref] */, + union drsuapi_DsNameCtr *_ctr /* [out] [ref,switch_is(*level_out)] */); +NTSTATUS rpccli_drsuapi_DsCrackNames_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_drsuapi_DsCrackNames(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *bind_handle /* [in] [ref] */, @@ -70,6 +178,17 @@ NTSTATUS rpccli_drsuapi_DsCrackNames(struct rpc_pipe_client *cli, int32_t *level_out /* [out] [ref] */, union drsuapi_DsNameCtr *ctr /* [out] [ref,switch_is(*level_out)] */, WERROR *werror); +struct tevent_req *rpccli_drsuapi_DsWriteAccountSpn_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_bind_handle /* [in] [ref] */, + int32_t _level /* [in] */, + union drsuapi_DsWriteAccountSpnRequest *_req /* [in] [ref,switch_is(level)] */, + int32_t *_level_out /* [out] [ref] */, + union drsuapi_DsWriteAccountSpnResult *_res /* [out] [ref,switch_is(*level_out)] */); +NTSTATUS rpccli_drsuapi_DsWriteAccountSpn_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_drsuapi_DsWriteAccountSpn(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *bind_handle /* [in] [ref] */, @@ -78,6 +197,17 @@ NTSTATUS rpccli_drsuapi_DsWriteAccountSpn(struct rpc_pipe_client *cli, int32_t *level_out /* [out] [ref] */, union drsuapi_DsWriteAccountSpnResult *res /* [out] [ref,switch_is(*level_out)] */, WERROR *werror); +struct tevent_req *rpccli_drsuapi_DsRemoveDSServer_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_bind_handle /* [in] [ref] */, + int32_t _level /* [in] */, + union drsuapi_DsRemoveDSServerRequest *_req /* [in] [ref,switch_is(level)] */, + int32_t *_level_out /* [out] [ref] */, + union drsuapi_DsRemoveDSServerResult *_res /* [out] [ref,switch_is(*level_out)] */); +NTSTATUS rpccli_drsuapi_DsRemoveDSServer_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_drsuapi_DsRemoveDSServer(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *bind_handle /* [in] [ref] */, @@ -86,9 +216,26 @@ NTSTATUS rpccli_drsuapi_DsRemoveDSServer(struct rpc_pipe_client *cli, int32_t *level_out /* [out] [ref] */, union drsuapi_DsRemoveDSServerResult *res /* [out] [ref,switch_is(*level_out)] */, WERROR *werror); +struct tevent_req *rpccli_DRSUAPI_REMOVE_DS_DOMAIN_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_DRSUAPI_REMOVE_DS_DOMAIN_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_DRSUAPI_REMOVE_DS_DOMAIN(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_drsuapi_DsGetDomainControllerInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_bind_handle /* [in] [ref] */, + int32_t _level /* [in] */, + union drsuapi_DsGetDCInfoRequest *_req /* [in] [ref,switch_is(level)] */, + int32_t *_level_out /* [out] [ref] */, + union drsuapi_DsGetDCInfoCtr *_ctr /* [out] [ref,switch_is(*level_out)] */); +NTSTATUS rpccli_drsuapi_DsGetDomainControllerInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_drsuapi_DsGetDomainControllerInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *bind_handle /* [in] [ref] */, @@ -97,6 +244,17 @@ NTSTATUS rpccli_drsuapi_DsGetDomainControllerInfo(struct rpc_pipe_client *cli, int32_t *level_out /* [out] [ref] */, union drsuapi_DsGetDCInfoCtr *ctr /* [out] [ref,switch_is(*level_out)] */, WERROR *werror); +struct tevent_req *rpccli_drsuapi_DsAddEntry_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_bind_handle /* [in] [ref] */, + int32_t _level /* [in] */, + union drsuapi_DsAddEntryRequest *_req /* [in] [ref,switch_is(level)] */, + int32_t *_level_out /* [out] [ref] */, + union drsuapi_DsAddEntryCtr *_ctr /* [out] [ref,switch_is(*level_out)] */); +NTSTATUS rpccli_drsuapi_DsAddEntry_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_drsuapi_DsAddEntry(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *bind_handle /* [in] [ref] */, @@ -105,9 +263,26 @@ NTSTATUS rpccli_drsuapi_DsAddEntry(struct rpc_pipe_client *cli, int32_t *level_out /* [out] [ref] */, union drsuapi_DsAddEntryCtr *ctr /* [out] [ref,switch_is(*level_out)] */, WERROR *werror); +struct tevent_req *rpccli_DRSUAPI_EXECUTE_KCC_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_DRSUAPI_EXECUTE_KCC_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_DRSUAPI_EXECUTE_KCC(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_drsuapi_DsReplicaGetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_bind_handle /* [in] [ref] */, + enum drsuapi_DsReplicaGetInfoLevel _level /* [in] */, + union drsuapi_DsReplicaGetInfoRequest *_req /* [in] [ref,switch_is(level)] */, + enum drsuapi_DsReplicaInfoType *_info_type /* [out] [ref] */, + union drsuapi_DsReplicaInfo *_info /* [out] [ref,switch_is(*info_type)] */); +NTSTATUS rpccli_drsuapi_DsReplicaGetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_drsuapi_DsReplicaGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *bind_handle /* [in] [ref] */, @@ -116,9 +291,26 @@ NTSTATUS rpccli_drsuapi_DsReplicaGetInfo(struct rpc_pipe_client *cli, enum drsuapi_DsReplicaInfoType *info_type /* [out] [ref] */, union drsuapi_DsReplicaInfo *info /* [out] [ref,switch_is(*info_type)] */, WERROR *werror); +struct tevent_req *rpccli_DRSUAPI_ADD_SID_HISTORY_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_DRSUAPI_ADD_SID_HISTORY_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_DRSUAPI_ADD_SID_HISTORY(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_drsuapi_DsGetMemberships2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_bind_handle /* [in] [ref] */, + int32_t _level /* [in] */, + union drsuapi_DsGetMemberships2Request *_req /* [in] [ref,switch_is(level)] */, + int32_t *_level_out /* [out] [ref] */, + union drsuapi_DsGetMemberships2Ctr *_ctr /* [out] [ref,switch_is(*level_out)] */); +NTSTATUS rpccli_drsuapi_DsGetMemberships2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_drsuapi_DsGetMemberships2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *bind_handle /* [in] [ref] */, @@ -127,12 +319,35 @@ NTSTATUS rpccli_drsuapi_DsGetMemberships2(struct rpc_pipe_client *cli, int32_t *level_out /* [out] [ref] */, union drsuapi_DsGetMemberships2Ctr *ctr /* [out] [ref,switch_is(*level_out)] */, WERROR *werror); +struct tevent_req *rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_DRSUAPI_REPLICA_VERIFY_OBJECTS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_DRSUAPI_GET_OBJECT_EXISTENCE_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_DRSUAPI_GET_OBJECT_EXISTENCE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_drsuapi_QuerySitesByCost_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_bind_handle /* [in] [ref] */, + int32_t _level /* [in] */, + union drsuapi_QuerySitesByCostRequest *_req /* [in] [ref,switch_is(level)] */, + int32_t *_level_out /* [out] [ref] */, + union drsuapi_QuerySitesByCostCtr *_ctr /* [out] [ref,switch_is(*level_out)] */); +NTSTATUS rpccli_drsuapi_QuerySitesByCost_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_drsuapi_QuerySitesByCost(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *bind_handle /* [in] [ref] */, diff --git a/librpc/gen_ndr/cli_dssetup.c b/librpc/gen_ndr/cli_dssetup.c index 6cf923ff82..f0a75c9102 100644 --- a/librpc/gen_ndr/cli_dssetup.c +++ b/librpc/gen_ndr/cli_dssetup.c @@ -6,6 +6,129 @@ #include "includes.h" #include "../librpc/gen_ndr/cli_dssetup.h" +struct rpccli_dssetup_DsRoleGetPrimaryDomainInformation_state { + struct dssetup_DsRoleGetPrimaryDomainInformation orig; + struct dssetup_DsRoleGetPrimaryDomainInformation tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dssetup_DsRoleGetPrimaryDomainInformation_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dssetup_DsRoleGetPrimaryDomainInformation_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + enum dssetup_DsRoleInfoLevel _level /* [in] */, + union dssetup_DsRoleInfo *_info /* [out] [unique,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_dssetup_DsRoleGetPrimaryDomainInformation_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dssetup_DsRoleGetPrimaryDomainInformation_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.level = _level; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleGetPrimaryDomainInformation, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_dssetup_DsRoleGetPrimaryDomainInformation_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_dssetup, + NDR_DSSETUP_DSROLEGETPRIMARYDOMAININFORMATION, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dssetup_DsRoleGetPrimaryDomainInformation_done, req); + return req; +} + +static void rpccli_dssetup_DsRoleGetPrimaryDomainInformation_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dssetup_DsRoleGetPrimaryDomainInformation_state *state = tevent_req_data( + req, struct rpccli_dssetup_DsRoleGetPrimaryDomainInformation_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 */ + if (state->orig.out.info && state->tmp.out.info) { + *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(dssetup_DsRoleGetPrimaryDomainInformation, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dssetup_DsRoleGetPrimaryDomainInformation_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dssetup_DsRoleGetPrimaryDomainInformation_state *state = tevent_req_data( + req, struct rpccli_dssetup_DsRoleGetPrimaryDomainInformation_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_dssetup_DsRoleGetPrimaryDomainInformation(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, enum dssetup_DsRoleInfoLevel level /* [in] */, @@ -53,6 +176,116 @@ NTSTATUS rpccli_dssetup_DsRoleGetPrimaryDomainInformation(struct rpc_pipe_client return werror_to_ntstatus(r.out.result); } +struct rpccli_dssetup_DsRoleDnsNameToFlatName_state { + struct dssetup_DsRoleDnsNameToFlatName orig; + struct dssetup_DsRoleDnsNameToFlatName tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dssetup_DsRoleDnsNameToFlatName_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dssetup_DsRoleDnsNameToFlatName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_dssetup_DsRoleDnsNameToFlatName_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dssetup_DsRoleDnsNameToFlatName_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleDnsNameToFlatName, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_dssetup, + NDR_DSSETUP_DSROLEDNSNAMETOFLATNAME, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dssetup_DsRoleDnsNameToFlatName_done, req); + return req; +} + +static void rpccli_dssetup_DsRoleDnsNameToFlatName_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dssetup_DsRoleDnsNameToFlatName_state *state = tevent_req_data( + req, struct rpccli_dssetup_DsRoleDnsNameToFlatName_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDnsNameToFlatName, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dssetup_DsRoleDnsNameToFlatName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dssetup_DsRoleDnsNameToFlatName_state *state = tevent_req_data( + req, struct rpccli_dssetup_DsRoleDnsNameToFlatName_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_dssetup_DsRoleDnsNameToFlatName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -94,6 +327,116 @@ NTSTATUS rpccli_dssetup_DsRoleDnsNameToFlatName(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_dssetup_DsRoleDcAsDc_state { + struct dssetup_DsRoleDcAsDc orig; + struct dssetup_DsRoleDcAsDc tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dssetup_DsRoleDcAsDc_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dssetup_DsRoleDcAsDc_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_dssetup_DsRoleDcAsDc_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dssetup_DsRoleDcAsDc_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleDcAsDc, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_dssetup, + NDR_DSSETUP_DSROLEDCASDC, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dssetup_DsRoleDcAsDc_done, req); + return req; +} + +static void rpccli_dssetup_DsRoleDcAsDc_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dssetup_DsRoleDcAsDc_state *state = tevent_req_data( + req, struct rpccli_dssetup_DsRoleDcAsDc_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDcAsDc, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dssetup_DsRoleDcAsDc_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dssetup_DsRoleDcAsDc_state *state = tevent_req_data( + req, struct rpccli_dssetup_DsRoleDcAsDc_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_dssetup_DsRoleDcAsDc(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -135,6 +478,116 @@ NTSTATUS rpccli_dssetup_DsRoleDcAsDc(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_dssetup_DsRoleDcAsReplica_state { + struct dssetup_DsRoleDcAsReplica orig; + struct dssetup_DsRoleDcAsReplica tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dssetup_DsRoleDcAsReplica_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dssetup_DsRoleDcAsReplica_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_dssetup_DsRoleDcAsReplica_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dssetup_DsRoleDcAsReplica_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleDcAsReplica, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_dssetup, + NDR_DSSETUP_DSROLEDCASREPLICA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dssetup_DsRoleDcAsReplica_done, req); + return req; +} + +static void rpccli_dssetup_DsRoleDcAsReplica_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dssetup_DsRoleDcAsReplica_state *state = tevent_req_data( + req, struct rpccli_dssetup_DsRoleDcAsReplica_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDcAsReplica, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dssetup_DsRoleDcAsReplica_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dssetup_DsRoleDcAsReplica_state *state = tevent_req_data( + req, struct rpccli_dssetup_DsRoleDcAsReplica_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_dssetup_DsRoleDcAsReplica(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -176,6 +629,116 @@ NTSTATUS rpccli_dssetup_DsRoleDcAsReplica(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_dssetup_DsRoleDemoteDc_state { + struct dssetup_DsRoleDemoteDc orig; + struct dssetup_DsRoleDemoteDc tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dssetup_DsRoleDemoteDc_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dssetup_DsRoleDemoteDc_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_dssetup_DsRoleDemoteDc_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dssetup_DsRoleDemoteDc_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleDemoteDc, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_dssetup, + NDR_DSSETUP_DSROLEDEMOTEDC, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dssetup_DsRoleDemoteDc_done, req); + return req; +} + +static void rpccli_dssetup_DsRoleDemoteDc_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dssetup_DsRoleDemoteDc_state *state = tevent_req_data( + req, struct rpccli_dssetup_DsRoleDemoteDc_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleDemoteDc, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dssetup_DsRoleDemoteDc_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dssetup_DsRoleDemoteDc_state *state = tevent_req_data( + req, struct rpccli_dssetup_DsRoleDemoteDc_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_dssetup_DsRoleDemoteDc(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -217,6 +780,116 @@ NTSTATUS rpccli_dssetup_DsRoleDemoteDc(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_dssetup_DsRoleGetDcOperationProgress_state { + struct dssetup_DsRoleGetDcOperationProgress orig; + struct dssetup_DsRoleGetDcOperationProgress tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dssetup_DsRoleGetDcOperationProgress_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dssetup_DsRoleGetDcOperationProgress_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_dssetup_DsRoleGetDcOperationProgress_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dssetup_DsRoleGetDcOperationProgress_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleGetDcOperationProgress, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_dssetup, + NDR_DSSETUP_DSROLEGETDCOPERATIONPROGRESS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dssetup_DsRoleGetDcOperationProgress_done, req); + return req; +} + +static void rpccli_dssetup_DsRoleGetDcOperationProgress_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dssetup_DsRoleGetDcOperationProgress_state *state = tevent_req_data( + req, struct rpccli_dssetup_DsRoleGetDcOperationProgress_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleGetDcOperationProgress, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dssetup_DsRoleGetDcOperationProgress_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dssetup_DsRoleGetDcOperationProgress_state *state = tevent_req_data( + req, struct rpccli_dssetup_DsRoleGetDcOperationProgress_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_dssetup_DsRoleGetDcOperationProgress(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -258,6 +931,116 @@ NTSTATUS rpccli_dssetup_DsRoleGetDcOperationProgress(struct rpc_pipe_client *cli return werror_to_ntstatus(r.out.result); } +struct rpccli_dssetup_DsRoleGetDcOperationResults_state { + struct dssetup_DsRoleGetDcOperationResults orig; + struct dssetup_DsRoleGetDcOperationResults tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dssetup_DsRoleGetDcOperationResults_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dssetup_DsRoleGetDcOperationResults_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_dssetup_DsRoleGetDcOperationResults_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dssetup_DsRoleGetDcOperationResults_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleGetDcOperationResults, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_dssetup, + NDR_DSSETUP_DSROLEGETDCOPERATIONRESULTS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dssetup_DsRoleGetDcOperationResults_done, req); + return req; +} + +static void rpccli_dssetup_DsRoleGetDcOperationResults_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dssetup_DsRoleGetDcOperationResults_state *state = tevent_req_data( + req, struct rpccli_dssetup_DsRoleGetDcOperationResults_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleGetDcOperationResults, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dssetup_DsRoleGetDcOperationResults_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dssetup_DsRoleGetDcOperationResults_state *state = tevent_req_data( + req, struct rpccli_dssetup_DsRoleGetDcOperationResults_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_dssetup_DsRoleGetDcOperationResults(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -299,6 +1082,116 @@ NTSTATUS rpccli_dssetup_DsRoleGetDcOperationResults(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_dssetup_DsRoleCancel_state { + struct dssetup_DsRoleCancel orig; + struct dssetup_DsRoleCancel tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dssetup_DsRoleCancel_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dssetup_DsRoleCancel_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_dssetup_DsRoleCancel_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dssetup_DsRoleCancel_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleCancel, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_dssetup, + NDR_DSSETUP_DSROLECANCEL, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dssetup_DsRoleCancel_done, req); + return req; +} + +static void rpccli_dssetup_DsRoleCancel_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dssetup_DsRoleCancel_state *state = tevent_req_data( + req, struct rpccli_dssetup_DsRoleCancel_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleCancel, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dssetup_DsRoleCancel_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dssetup_DsRoleCancel_state *state = tevent_req_data( + req, struct rpccli_dssetup_DsRoleCancel_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_dssetup_DsRoleCancel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -340,6 +1233,116 @@ NTSTATUS rpccli_dssetup_DsRoleCancel(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_dssetup_DsRoleServerSaveStateForUpgrade_state { + struct dssetup_DsRoleServerSaveStateForUpgrade orig; + struct dssetup_DsRoleServerSaveStateForUpgrade tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dssetup_DsRoleServerSaveStateForUpgrade_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dssetup_DsRoleServerSaveStateForUpgrade_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_dssetup_DsRoleServerSaveStateForUpgrade_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dssetup_DsRoleServerSaveStateForUpgrade_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleServerSaveStateForUpgrade, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_dssetup, + NDR_DSSETUP_DSROLESERVERSAVESTATEFORUPGRADE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dssetup_DsRoleServerSaveStateForUpgrade_done, req); + return req; +} + +static void rpccli_dssetup_DsRoleServerSaveStateForUpgrade_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dssetup_DsRoleServerSaveStateForUpgrade_state *state = tevent_req_data( + req, struct rpccli_dssetup_DsRoleServerSaveStateForUpgrade_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleServerSaveStateForUpgrade, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dssetup_DsRoleServerSaveStateForUpgrade_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dssetup_DsRoleServerSaveStateForUpgrade_state *state = tevent_req_data( + req, struct rpccli_dssetup_DsRoleServerSaveStateForUpgrade_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_dssetup_DsRoleServerSaveStateForUpgrade(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -381,6 +1384,116 @@ NTSTATUS rpccli_dssetup_DsRoleServerSaveStateForUpgrade(struct rpc_pipe_client * return werror_to_ntstatus(r.out.result); } +struct rpccli_dssetup_DsRoleUpgradeDownlevelServer_state { + struct dssetup_DsRoleUpgradeDownlevelServer orig; + struct dssetup_DsRoleUpgradeDownlevelServer tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dssetup_DsRoleUpgradeDownlevelServer_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dssetup_DsRoleUpgradeDownlevelServer_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_dssetup_DsRoleUpgradeDownlevelServer_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dssetup_DsRoleUpgradeDownlevelServer_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleUpgradeDownlevelServer, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_dssetup, + NDR_DSSETUP_DSROLEUPGRADEDOWNLEVELSERVER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dssetup_DsRoleUpgradeDownlevelServer_done, req); + return req; +} + +static void rpccli_dssetup_DsRoleUpgradeDownlevelServer_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dssetup_DsRoleUpgradeDownlevelServer_state *state = tevent_req_data( + req, struct rpccli_dssetup_DsRoleUpgradeDownlevelServer_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleUpgradeDownlevelServer, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dssetup_DsRoleUpgradeDownlevelServer_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dssetup_DsRoleUpgradeDownlevelServer_state *state = tevent_req_data( + req, struct rpccli_dssetup_DsRoleUpgradeDownlevelServer_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_dssetup_DsRoleUpgradeDownlevelServer(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -422,6 +1535,116 @@ NTSTATUS rpccli_dssetup_DsRoleUpgradeDownlevelServer(struct rpc_pipe_client *cli return werror_to_ntstatus(r.out.result); } +struct rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade_state { + struct dssetup_DsRoleAbortDownlevelServerUpgrade orig; + struct dssetup_DsRoleAbortDownlevelServerUpgrade tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(dssetup_DsRoleAbortDownlevelServerUpgrade, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_dssetup, + NDR_DSSETUP_DSROLEABORTDOWNLEVELSERVERUPGRADE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade_done, req); + return req; +} + +static void rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade_state *state = tevent_req_data( + req, struct rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(dssetup_DsRoleAbortDownlevelServerUpgrade, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade_state *state = tevent_req_data( + req, struct rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade_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_dssetup_DsRoleAbortDownlevelServerUpgrade(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) diff --git a/librpc/gen_ndr/cli_dssetup.h b/librpc/gen_ndr/cli_dssetup.h index e6847c3e06..24b476496f 100644 --- a/librpc/gen_ndr/cli_dssetup.h +++ b/librpc/gen_ndr/cli_dssetup.h @@ -1,38 +1,106 @@ #include "../librpc/gen_ndr/ndr_dssetup.h" #ifndef __CLI_DSSETUP__ #define __CLI_DSSETUP__ +struct tevent_req *rpccli_dssetup_DsRoleGetPrimaryDomainInformation_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + enum dssetup_DsRoleInfoLevel _level /* [in] */, + union dssetup_DsRoleInfo *_info /* [out] [unique,switch_is(level)] */); +NTSTATUS rpccli_dssetup_DsRoleGetPrimaryDomainInformation_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dssetup_DsRoleGetPrimaryDomainInformation(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, enum dssetup_DsRoleInfoLevel level /* [in] */, union dssetup_DsRoleInfo *info /* [out] [unique,switch_is(level)] */, WERROR *werror); +struct tevent_req *rpccli_dssetup_DsRoleDnsNameToFlatName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_dssetup_DsRoleDnsNameToFlatName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dssetup_DsRoleDnsNameToFlatName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_dssetup_DsRoleDcAsDc_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_dssetup_DsRoleDcAsDc_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dssetup_DsRoleDcAsDc(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_dssetup_DsRoleDcAsReplica_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_dssetup_DsRoleDcAsReplica_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dssetup_DsRoleDcAsReplica(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_dssetup_DsRoleDemoteDc_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_dssetup_DsRoleDemoteDc_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dssetup_DsRoleDemoteDc(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_dssetup_DsRoleGetDcOperationProgress_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_dssetup_DsRoleGetDcOperationProgress_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dssetup_DsRoleGetDcOperationProgress(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_dssetup_DsRoleGetDcOperationResults_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_dssetup_DsRoleGetDcOperationResults_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dssetup_DsRoleGetDcOperationResults(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_dssetup_DsRoleCancel_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_dssetup_DsRoleCancel_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dssetup_DsRoleCancel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_dssetup_DsRoleServerSaveStateForUpgrade_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_dssetup_DsRoleServerSaveStateForUpgrade_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dssetup_DsRoleServerSaveStateForUpgrade(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_dssetup_DsRoleUpgradeDownlevelServer_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_dssetup_DsRoleUpgradeDownlevelServer_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dssetup_DsRoleUpgradeDownlevelServer(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_dssetup_DsRoleAbortDownlevelServerUpgrade(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); diff --git a/librpc/gen_ndr/cli_echo.c b/librpc/gen_ndr/cli_echo.c index ff369c7d5a..fd18666e40 100644 --- a/librpc/gen_ndr/cli_echo.c +++ b/librpc/gen_ndr/cli_echo.c @@ -6,6 +6,117 @@ #include "includes.h" #include "../librpc/gen_ndr/cli_echo.h" +struct rpccli_echo_AddOne_state { + struct echo_AddOne orig; + struct echo_AddOne tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_echo_AddOne_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_echo_AddOne_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_echo_AddOne_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_echo_AddOne_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(echo_AddOne, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_echo_AddOne_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_rpcecho, + NDR_ECHO_ADDONE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_echo_AddOne_done, req); + return req; +} + +static void rpccli_echo_AddOne_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_echo_AddOne_state *state = tevent_req_data( + req, struct rpccli_echo_AddOne_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(echo_AddOne, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_echo_AddOne_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx) +{ + struct rpccli_echo_AddOne_state *state = tevent_req_data( + req, struct rpccli_echo_AddOne_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_echo_AddOne(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t in_data /* [in] */, @@ -46,6 +157,119 @@ NTSTATUS rpccli_echo_AddOne(struct rpc_pipe_client *cli, return NT_STATUS_OK; } +struct rpccli_echo_EchoData_state { + struct echo_EchoData orig; + struct echo_EchoData tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_echo_EchoData_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_echo_EchoData_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint32_t _len /* [in] */, + uint8_t *_in_data /* [in] [size_is(len)] */, + uint8_t *_out_data /* [out] [size_is(len)] */) +{ + struct tevent_req *req; + struct rpccli_echo_EchoData_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_echo_EchoData_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.len = _len; + state->orig.in.in_data = _in_data; + + /* Out parameters */ + state->orig.out.out_data = _out_data; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(echo_EchoData, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_echo_EchoData_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_rpcecho, + NDR_ECHO_ECHODATA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_echo_EchoData_done, req); + return req; +} + +static void rpccli_echo_EchoData_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_echo_EchoData_state *state = tevent_req_data( + req, struct rpccli_echo_EchoData_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 */ + memcpy(state->orig.out.out_data, state->tmp.out.out_data, state->tmp.in.len * sizeof(*state->orig.out.out_data)); + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(echo_EchoData, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_echo_EchoData_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx) +{ + struct rpccli_echo_EchoData_state *state = tevent_req_data( + req, struct rpccli_echo_EchoData_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_echo_EchoData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t len /* [in] */, @@ -88,6 +312,110 @@ NTSTATUS rpccli_echo_EchoData(struct rpc_pipe_client *cli, return NT_STATUS_OK; } +struct rpccli_echo_SinkData_state { + struct echo_SinkData orig; + struct echo_SinkData tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_echo_SinkData_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_echo_SinkData_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint32_t _len /* [in] */, + uint8_t *_data /* [in] [size_is(len)] */) +{ + struct tevent_req *req; + struct rpccli_echo_SinkData_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_echo_SinkData_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.len = _len; + state->orig.in.data = _data; + + /* Out parameters */ + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(echo_SinkData, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_rpcecho, + NDR_ECHO_SINKDATA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_echo_SinkData_done, req); + return req; +} + +static void rpccli_echo_SinkData_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_echo_SinkData_state *state = tevent_req_data( + req, struct rpccli_echo_SinkData_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 */ + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(echo_SinkData, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_echo_SinkData_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx) +{ + struct rpccli_echo_SinkData_state *state = tevent_req_data( + req, struct rpccli_echo_SinkData_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_echo_SinkData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t len /* [in] */, @@ -128,6 +456,117 @@ NTSTATUS rpccli_echo_SinkData(struct rpc_pipe_client *cli, return NT_STATUS_OK; } +struct rpccli_echo_SourceData_state { + struct echo_SourceData orig; + struct echo_SourceData tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_echo_SourceData_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_echo_SourceData_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint32_t _len /* [in] */, + uint8_t *_data /* [out] [size_is(len)] */) +{ + struct tevent_req *req; + struct rpccli_echo_SourceData_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_echo_SourceData_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.len = _len; + + /* Out parameters */ + state->orig.out.data = _data; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(echo_SourceData, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_echo_SourceData_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_rpcecho, + NDR_ECHO_SOURCEDATA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_echo_SourceData_done, req); + return req; +} + +static void rpccli_echo_SourceData_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_echo_SourceData_state *state = tevent_req_data( + req, struct rpccli_echo_SourceData_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 */ + memcpy(state->orig.out.data, state->tmp.out.data, state->tmp.in.len * sizeof(*state->orig.out.data)); + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(echo_SourceData, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_echo_SourceData_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx) +{ + struct rpccli_echo_SourceData_state *state = tevent_req_data( + req, struct rpccli_echo_SourceData_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_echo_SourceData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t len /* [in] */, @@ -168,6 +607,117 @@ NTSTATUS rpccli_echo_SourceData(struct rpc_pipe_client *cli, return NT_STATUS_OK; } +struct rpccli_echo_TestCall_state { + struct echo_TestCall orig; + struct echo_TestCall tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_echo_TestCall_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_echo_TestCall_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_s1 /* [in] [ref,charset(UTF16)] */, + const char **_s2 /* [out] [ref,charset(UTF16)] */) +{ + struct tevent_req *req; + struct rpccli_echo_TestCall_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_echo_TestCall_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.s1 = _s1; + + /* Out parameters */ + state->orig.out.s2 = _s2; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(echo_TestCall, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_echo_TestCall_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_rpcecho, + NDR_ECHO_TESTCALL, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_echo_TestCall_done, req); + return req; +} + +static void rpccli_echo_TestCall_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_echo_TestCall_state *state = tevent_req_data( + req, struct rpccli_echo_TestCall_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.s2 = *state->tmp.out.s2; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(echo_TestCall, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_echo_TestCall_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx) +{ + struct rpccli_echo_TestCall_state *state = tevent_req_data( + req, struct rpccli_echo_TestCall_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_echo_TestCall(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *s1 /* [in] [ref,charset(UTF16)] */, @@ -208,6 +758,127 @@ NTSTATUS rpccli_echo_TestCall(struct rpc_pipe_client *cli, return NT_STATUS_OK; } +struct rpccli_echo_TestCall2_state { + struct echo_TestCall2 orig; + struct echo_TestCall2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_echo_TestCall2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_echo_TestCall2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t _level /* [in] */, + union echo_Info *_info /* [out] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_echo_TestCall2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_echo_TestCall2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.level = _level; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(echo_TestCall2, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_echo_TestCall2_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_rpcecho, + NDR_ECHO_TESTCALL2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_echo_TestCall2_done, req); + return req; +} + +static void rpccli_echo_TestCall2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_echo_TestCall2_state *state = tevent_req_data( + req, struct rpccli_echo_TestCall2_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(echo_TestCall2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_echo_TestCall2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_echo_TestCall2_state *state = tevent_req_data( + req, struct rpccli_echo_TestCall2_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_echo_TestCall2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t level /* [in] */, @@ -248,6 +919,118 @@ NTSTATUS rpccli_echo_TestCall2(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_echo_TestSleep_state { + struct echo_TestSleep orig; + struct echo_TestSleep tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_echo_TestSleep_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_echo_TestSleep_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint32_t _seconds /* [in] */) +{ + struct tevent_req *req; + struct rpccli_echo_TestSleep_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_echo_TestSleep_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.seconds = _seconds; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(echo_TestSleep, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_rpcecho, + NDR_ECHO_TESTSLEEP, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_echo_TestSleep_done, req); + return req; +} + +static void rpccli_echo_TestSleep_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_echo_TestSleep_state *state = tevent_req_data( + req, struct rpccli_echo_TestSleep_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(echo_TestSleep, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_echo_TestSleep_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + uint32 *result) +{ + struct rpccli_echo_TestSleep_state *state = tevent_req_data( + req, struct rpccli_echo_TestSleep_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_echo_TestSleep(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t seconds /* [in] */) @@ -286,6 +1069,124 @@ NTSTATUS rpccli_echo_TestSleep(struct rpc_pipe_client *cli, return NT_STATUS_OK; } +struct rpccli_echo_TestEnum_state { + struct echo_TestEnum orig; + struct echo_TestEnum tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_echo_TestEnum_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_echo_TestEnum_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + enum echo_Enum1 *_foo1 /* [in,out] [ref] */, + struct echo_Enum2 *_foo2 /* [in,out] [ref] */, + union echo_Enum3 *_foo3 /* [in,out] [ref,switch_is(*foo1)] */) +{ + struct tevent_req *req; + struct rpccli_echo_TestEnum_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_echo_TestEnum_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.foo1 = _foo1; + state->orig.in.foo2 = _foo2; + state->orig.in.foo3 = _foo3; + + /* Out parameters */ + state->orig.out.foo1 = _foo1; + state->orig.out.foo2 = _foo2; + state->orig.out.foo3 = _foo3; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(echo_TestEnum, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_echo_TestEnum_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_rpcecho, + NDR_ECHO_TESTENUM, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_echo_TestEnum_done, req); + return req; +} + +static void rpccli_echo_TestEnum_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_echo_TestEnum_state *state = tevent_req_data( + req, struct rpccli_echo_TestEnum_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.foo1 = *state->tmp.out.foo1; + *state->orig.out.foo2 = *state->tmp.out.foo2; + *state->orig.out.foo3 = *state->tmp.out.foo3; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(echo_TestEnum, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_echo_TestEnum_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx) +{ + struct rpccli_echo_TestEnum_state *state = tevent_req_data( + req, struct rpccli_echo_TestEnum_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_echo_TestEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, enum echo_Enum1 *foo1 /* [in,out] [ref] */, @@ -331,6 +1232,116 @@ NTSTATUS rpccli_echo_TestEnum(struct rpc_pipe_client *cli, return NT_STATUS_OK; } +struct rpccli_echo_TestSurrounding_state { + struct echo_TestSurrounding orig; + struct echo_TestSurrounding tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_echo_TestSurrounding_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_echo_TestSurrounding_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct echo_Surrounding *_data /* [in,out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_echo_TestSurrounding_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_echo_TestSurrounding_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.data = _data; + + /* Out parameters */ + state->orig.out.data = _data; + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(echo_TestSurrounding, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_echo_TestSurrounding_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_rpcecho, + NDR_ECHO_TESTSURROUNDING, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_echo_TestSurrounding_done, req); + return req; +} + +static void rpccli_echo_TestSurrounding_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_echo_TestSurrounding_state *state = tevent_req_data( + req, struct rpccli_echo_TestSurrounding_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.data = *state->tmp.out.data; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(echo_TestSurrounding, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_echo_TestSurrounding_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx) +{ + struct rpccli_echo_TestSurrounding_state *state = tevent_req_data( + req, struct rpccli_echo_TestSurrounding_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_echo_TestSurrounding(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct echo_Surrounding *data /* [in,out] [ref] */) @@ -370,6 +1381,118 @@ NTSTATUS rpccli_echo_TestSurrounding(struct rpc_pipe_client *cli, return NT_STATUS_OK; } +struct rpccli_echo_TestDoublePointer_state { + struct echo_TestDoublePointer orig; + struct echo_TestDoublePointer tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_echo_TestDoublePointer_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_echo_TestDoublePointer_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t ***_data /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_echo_TestDoublePointer_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_echo_TestDoublePointer_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.data = _data; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(echo_TestDoublePointer, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_rpcecho, + NDR_ECHO_TESTDOUBLEPOINTER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_echo_TestDoublePointer_done, req); + return req; +} + +static void rpccli_echo_TestDoublePointer_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_echo_TestDoublePointer_state *state = tevent_req_data( + req, struct rpccli_echo_TestDoublePointer_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(echo_TestDoublePointer, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_echo_TestDoublePointer_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + uint16 *result) +{ + struct rpccli_echo_TestDoublePointer_state *state = tevent_req_data( + req, struct rpccli_echo_TestDoublePointer_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_echo_TestDoublePointer(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t ***data /* [in] [ref] */) diff --git a/librpc/gen_ndr/cli_echo.h b/librpc/gen_ndr/cli_echo.h index 46dd830a4e..e3a4a16308 100644 --- a/librpc/gen_ndr/cli_echo.h +++ b/librpc/gen_ndr/cli_echo.h @@ -1,42 +1,114 @@ #include "../librpc/gen_ndr/ndr_echo.h" #ifndef __CLI_RPCECHO__ #define __CLI_RPCECHO__ +struct tevent_req *rpccli_echo_AddOne_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] */); +NTSTATUS rpccli_echo_AddOne_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx); NTSTATUS rpccli_echo_AddOne(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t in_data /* [in] */, uint32_t *out_data /* [out] [ref] */); +struct tevent_req *rpccli_echo_EchoData_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint32_t _len /* [in] */, + uint8_t *_in_data /* [in] [size_is(len)] */, + uint8_t *_out_data /* [out] [size_is(len)] */); +NTSTATUS rpccli_echo_EchoData_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx); NTSTATUS rpccli_echo_EchoData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t len /* [in] */, uint8_t *in_data /* [in] [size_is(len)] */, uint8_t *out_data /* [out] [size_is(len)] */); +struct tevent_req *rpccli_echo_SinkData_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint32_t _len /* [in] */, + uint8_t *_data /* [in] [size_is(len)] */); +NTSTATUS rpccli_echo_SinkData_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx); NTSTATUS rpccli_echo_SinkData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t len /* [in] */, uint8_t *data /* [in] [size_is(len)] */); +struct tevent_req *rpccli_echo_SourceData_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint32_t _len /* [in] */, + uint8_t *_data /* [out] [size_is(len)] */); +NTSTATUS rpccli_echo_SourceData_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx); NTSTATUS rpccli_echo_SourceData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t len /* [in] */, uint8_t *data /* [out] [size_is(len)] */); +struct tevent_req *rpccli_echo_TestCall_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_s1 /* [in] [ref,charset(UTF16)] */, + const char **_s2 /* [out] [ref,charset(UTF16)] */); +NTSTATUS rpccli_echo_TestCall_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx); NTSTATUS rpccli_echo_TestCall(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *s1 /* [in] [ref,charset(UTF16)] */, const char **s2 /* [out] [ref,charset(UTF16)] */); +struct tevent_req *rpccli_echo_TestCall2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t _level /* [in] */, + union echo_Info *_info /* [out] [ref,switch_is(level)] */); +NTSTATUS rpccli_echo_TestCall2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_echo_TestCall2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t level /* [in] */, union echo_Info *info /* [out] [ref,switch_is(level)] */); +struct tevent_req *rpccli_echo_TestSleep_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint32_t _seconds /* [in] */); +NTSTATUS rpccli_echo_TestSleep_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + uint32 *result); NTSTATUS rpccli_echo_TestSleep(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t seconds /* [in] */); +struct tevent_req *rpccli_echo_TestEnum_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + enum echo_Enum1 *_foo1 /* [in,out] [ref] */, + struct echo_Enum2 *_foo2 /* [in,out] [ref] */, + union echo_Enum3 *_foo3 /* [in,out] [ref,switch_is(*foo1)] */); +NTSTATUS rpccli_echo_TestEnum_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx); NTSTATUS rpccli_echo_TestEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, enum echo_Enum1 *foo1 /* [in,out] [ref] */, struct echo_Enum2 *foo2 /* [in,out] [ref] */, union echo_Enum3 *foo3 /* [in,out] [ref,switch_is(*foo1)] */); +struct tevent_req *rpccli_echo_TestSurrounding_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct echo_Surrounding *_data /* [in,out] [ref] */); +NTSTATUS rpccli_echo_TestSurrounding_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx); NTSTATUS rpccli_echo_TestSurrounding(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct echo_Surrounding *data /* [in,out] [ref] */); +struct tevent_req *rpccli_echo_TestDoublePointer_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t ***_data /* [in] [ref] */); +NTSTATUS rpccli_echo_TestDoublePointer_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + uint16 *result); NTSTATUS rpccli_echo_TestDoublePointer(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t ***data /* [in] [ref] */); diff --git a/librpc/gen_ndr/cli_epmapper.c b/librpc/gen_ndr/cli_epmapper.c index 0ccefa97cb..a271516fb0 100644 --- a/librpc/gen_ndr/cli_epmapper.c +++ b/librpc/gen_ndr/cli_epmapper.c @@ -6,6 +6,122 @@ #include "includes.h" #include "../librpc/gen_ndr/cli_epmapper.h" +struct rpccli_epm_Insert_state { + struct epm_Insert orig; + struct epm_Insert tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_epm_Insert_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_epm_Insert_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint32_t _num_ents /* [in] */, + struct epm_entry_t *_entries /* [in] [size_is(num_ents)] */, + uint32_t _replace /* [in] */) +{ + struct tevent_req *req; + struct rpccli_epm_Insert_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_epm_Insert_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.num_ents = _num_ents; + state->orig.in.entries = _entries; + state->orig.in.replace = _replace; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(epm_Insert, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_epmapper, + NDR_EPM_INSERT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_epm_Insert_done, req); + return req; +} + +static void rpccli_epm_Insert_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_epm_Insert_state *state = tevent_req_data( + req, struct rpccli_epm_Insert_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(epm_Insert, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_epm_Insert_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + uint32 *result) +{ + struct rpccli_epm_Insert_state *state = tevent_req_data( + req, struct rpccli_epm_Insert_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_epm_Insert(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t num_ents /* [in] */, @@ -48,6 +164,120 @@ NTSTATUS rpccli_epm_Insert(struct rpc_pipe_client *cli, return NT_STATUS_OK; } +struct rpccli_epm_Delete_state { + struct epm_Delete orig; + struct epm_Delete tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_epm_Delete_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_epm_Delete_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint32_t _num_ents /* [in] */, + struct epm_entry_t *_entries /* [in] [size_is(num_ents)] */) +{ + struct tevent_req *req; + struct rpccli_epm_Delete_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_epm_Delete_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.num_ents = _num_ents; + state->orig.in.entries = _entries; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(epm_Delete, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_epmapper, + NDR_EPM_DELETE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_epm_Delete_done, req); + return req; +} + +static void rpccli_epm_Delete_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_epm_Delete_state *state = tevent_req_data( + req, struct rpccli_epm_Delete_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(epm_Delete, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_epm_Delete_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + uint32 *result) +{ + struct rpccli_epm_Delete_state *state = tevent_req_data( + req, struct rpccli_epm_Delete_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_epm_Delete(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t num_ents /* [in] */, @@ -88,6 +318,142 @@ NTSTATUS rpccli_epm_Delete(struct rpc_pipe_client *cli, return NT_STATUS_OK; } +struct rpccli_epm_Lookup_state { + struct epm_Lookup orig; + struct epm_Lookup tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_epm_Lookup_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_epm_Lookup_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint32_t _inquiry_type /* [in] */, + struct GUID *_object /* [in] [ptr] */, + struct rpc_if_id_t *_interface_id /* [in] [ptr] */, + uint32_t _vers_option /* [in] */, + struct policy_handle *_entry_handle /* [in,out] [ref] */, + uint32_t _max_ents /* [in] */, + uint32_t *_num_ents /* [out] [ref] */, + struct epm_entry_t *_entries /* [out] [length_is(*num_ents),size_is(max_ents)] */) +{ + struct tevent_req *req; + struct rpccli_epm_Lookup_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_epm_Lookup_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.inquiry_type = _inquiry_type; + state->orig.in.object = _object; + state->orig.in.interface_id = _interface_id; + state->orig.in.vers_option = _vers_option; + state->orig.in.entry_handle = _entry_handle; + state->orig.in.max_ents = _max_ents; + + /* Out parameters */ + state->orig.out.entry_handle = _entry_handle; + state->orig.out.num_ents = _num_ents; + state->orig.out.entries = _entries; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(epm_Lookup, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_epm_Lookup_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_epmapper, + NDR_EPM_LOOKUP, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_epm_Lookup_done, req); + return req; +} + +static void rpccli_epm_Lookup_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_epm_Lookup_state *state = tevent_req_data( + req, struct rpccli_epm_Lookup_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.entry_handle = *state->tmp.out.entry_handle; + *state->orig.out.num_ents = *state->tmp.out.num_ents; + memcpy(state->orig.out.entries, state->tmp.out.entries, state->tmp.in.max_ents * sizeof(*state->orig.out.entries)); + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(epm_Lookup, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_epm_Lookup_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + uint32 *result) +{ + struct rpccli_epm_Lookup_state *state = tevent_req_data( + req, struct rpccli_epm_Lookup_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_epm_Lookup(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t inquiry_type /* [in] */, @@ -141,6 +507,138 @@ NTSTATUS rpccli_epm_Lookup(struct rpc_pipe_client *cli, return NT_STATUS_OK; } +struct rpccli_epm_Map_state { + struct epm_Map orig; + struct epm_Map tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_epm_Map_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_epm_Map_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct GUID *_object /* [in] [ptr] */, + struct epm_twr_t *_map_tower /* [in] [ptr] */, + struct policy_handle *_entry_handle /* [in,out] [ref] */, + uint32_t _max_towers /* [in] */, + uint32_t *_num_towers /* [out] [ref] */, + struct epm_twr_p_t *_towers /* [out] [length_is(*num_towers),size_is(max_towers)] */) +{ + struct tevent_req *req; + struct rpccli_epm_Map_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_epm_Map_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.object = _object; + state->orig.in.map_tower = _map_tower; + state->orig.in.entry_handle = _entry_handle; + state->orig.in.max_towers = _max_towers; + + /* Out parameters */ + state->orig.out.entry_handle = _entry_handle; + state->orig.out.num_towers = _num_towers; + state->orig.out.towers = _towers; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(epm_Map, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_epm_Map_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_epmapper, + NDR_EPM_MAP, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_epm_Map_done, req); + return req; +} + +static void rpccli_epm_Map_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_epm_Map_state *state = tevent_req_data( + req, struct rpccli_epm_Map_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.entry_handle = *state->tmp.out.entry_handle; + *state->orig.out.num_towers = *state->tmp.out.num_towers; + memcpy(state->orig.out.towers, state->tmp.out.towers, state->tmp.in.max_towers * sizeof(*state->orig.out.towers)); + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(epm_Map, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_epm_Map_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + uint32 *result) +{ + struct rpccli_epm_Map_state *state = tevent_req_data( + req, struct rpccli_epm_Map_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_epm_Map(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct GUID *object /* [in] [ptr] */, @@ -190,6 +688,126 @@ NTSTATUS rpccli_epm_Map(struct rpc_pipe_client *cli, return NT_STATUS_OK; } +struct rpccli_epm_LookupHandleFree_state { + struct epm_LookupHandleFree orig; + struct epm_LookupHandleFree tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_epm_LookupHandleFree_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_epm_LookupHandleFree_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_entry_handle /* [in,out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_epm_LookupHandleFree_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_epm_LookupHandleFree_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.entry_handle = _entry_handle; + + /* Out parameters */ + state->orig.out.entry_handle = _entry_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(epm_LookupHandleFree, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_epm_LookupHandleFree_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_epmapper, + NDR_EPM_LOOKUPHANDLEFREE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_epm_LookupHandleFree_done, req); + return req; +} + +static void rpccli_epm_LookupHandleFree_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_epm_LookupHandleFree_state *state = tevent_req_data( + req, struct rpccli_epm_LookupHandleFree_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.entry_handle = *state->tmp.out.entry_handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(epm_LookupHandleFree, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_epm_LookupHandleFree_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + uint32 *result) +{ + struct rpccli_epm_LookupHandleFree_state *state = tevent_req_data( + req, struct rpccli_epm_LookupHandleFree_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_epm_LookupHandleFree(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *entry_handle /* [in,out] [ref] */) @@ -229,6 +847,118 @@ NTSTATUS rpccli_epm_LookupHandleFree(struct rpc_pipe_client *cli, return NT_STATUS_OK; } +struct rpccli_epm_InqObject_state { + struct epm_InqObject orig; + struct epm_InqObject tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_epm_InqObject_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_epm_InqObject_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct GUID *_epm_object /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_epm_InqObject_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_epm_InqObject_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.epm_object = _epm_object; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(epm_InqObject, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_epmapper, + NDR_EPM_INQOBJECT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_epm_InqObject_done, req); + return req; +} + +static void rpccli_epm_InqObject_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_epm_InqObject_state *state = tevent_req_data( + req, struct rpccli_epm_InqObject_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(epm_InqObject, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_epm_InqObject_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + uint32 *result) +{ + struct rpccli_epm_InqObject_state *state = tevent_req_data( + req, struct rpccli_epm_InqObject_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_epm_InqObject(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct GUID *epm_object /* [in] [ref] */) @@ -267,6 +997,122 @@ NTSTATUS rpccli_epm_InqObject(struct rpc_pipe_client *cli, return NT_STATUS_OK; } +struct rpccli_epm_MgmtDelete_state { + struct epm_MgmtDelete orig; + struct epm_MgmtDelete tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_epm_MgmtDelete_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_epm_MgmtDelete_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint32_t _object_speced /* [in] */, + struct GUID *_object /* [in] [ptr] */, + struct epm_twr_t *_tower /* [in] [ptr] */) +{ + struct tevent_req *req; + struct rpccli_epm_MgmtDelete_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_epm_MgmtDelete_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.object_speced = _object_speced; + state->orig.in.object = _object; + state->orig.in.tower = _tower; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(epm_MgmtDelete, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_epmapper, + NDR_EPM_MGMTDELETE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_epm_MgmtDelete_done, req); + return req; +} + +static void rpccli_epm_MgmtDelete_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_epm_MgmtDelete_state *state = tevent_req_data( + req, struct rpccli_epm_MgmtDelete_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(epm_MgmtDelete, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_epm_MgmtDelete_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + uint32 *result) +{ + struct rpccli_epm_MgmtDelete_state *state = tevent_req_data( + req, struct rpccli_epm_MgmtDelete_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_epm_MgmtDelete(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t object_speced /* [in] */, @@ -309,6 +1155,116 @@ NTSTATUS rpccli_epm_MgmtDelete(struct rpc_pipe_client *cli, return NT_STATUS_OK; } +struct rpccli_epm_MapAuth_state { + struct epm_MapAuth orig; + struct epm_MapAuth tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_epm_MapAuth_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_epm_MapAuth_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_epm_MapAuth_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_epm_MapAuth_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(epm_MapAuth, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_epmapper, + NDR_EPM_MAPAUTH, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_epm_MapAuth_done, req); + return req; +} + +static void rpccli_epm_MapAuth_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_epm_MapAuth_state *state = tevent_req_data( + req, struct rpccli_epm_MapAuth_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(epm_MapAuth, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_epm_MapAuth_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + uint32 *result) +{ + struct rpccli_epm_MapAuth_state *state = tevent_req_data( + req, struct rpccli_epm_MapAuth_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_epm_MapAuth(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { diff --git a/librpc/gen_ndr/cli_epmapper.h b/librpc/gen_ndr/cli_epmapper.h index cc1d3a9267..285a9d9833 100644 --- a/librpc/gen_ndr/cli_epmapper.h +++ b/librpc/gen_ndr/cli_epmapper.h @@ -1,15 +1,46 @@ #include "../librpc/gen_ndr/ndr_epmapper.h" #ifndef __CLI_EPMAPPER__ #define __CLI_EPMAPPER__ +struct tevent_req *rpccli_epm_Insert_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint32_t _num_ents /* [in] */, + struct epm_entry_t *_entries /* [in] [size_is(num_ents)] */, + uint32_t _replace /* [in] */); +NTSTATUS rpccli_epm_Insert_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + uint32 *result); NTSTATUS rpccli_epm_Insert(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t num_ents /* [in] */, struct epm_entry_t *entries /* [in] [size_is(num_ents)] */, uint32_t replace /* [in] */); +struct tevent_req *rpccli_epm_Delete_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint32_t _num_ents /* [in] */, + struct epm_entry_t *_entries /* [in] [size_is(num_ents)] */); +NTSTATUS rpccli_epm_Delete_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + uint32 *result); NTSTATUS rpccli_epm_Delete(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t num_ents /* [in] */, struct epm_entry_t *entries /* [in] [size_is(num_ents)] */); +struct tevent_req *rpccli_epm_Lookup_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint32_t _inquiry_type /* [in] */, + struct GUID *_object /* [in] [ptr] */, + struct rpc_if_id_t *_interface_id /* [in] [ptr] */, + uint32_t _vers_option /* [in] */, + struct policy_handle *_entry_handle /* [in,out] [ref] */, + uint32_t _max_ents /* [in] */, + uint32_t *_num_ents /* [out] [ref] */, + struct epm_entry_t *_entries /* [out] [length_is(*num_ents),size_is(max_ents)] */); +NTSTATUS rpccli_epm_Lookup_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + uint32 *result); NTSTATUS rpccli_epm_Lookup(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t inquiry_type /* [in] */, @@ -20,6 +51,18 @@ NTSTATUS rpccli_epm_Lookup(struct rpc_pipe_client *cli, uint32_t max_ents /* [in] */, uint32_t *num_ents /* [out] [ref] */, struct epm_entry_t *entries /* [out] [length_is(*num_ents),size_is(max_ents)] */); +struct tevent_req *rpccli_epm_Map_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct GUID *_object /* [in] [ptr] */, + struct epm_twr_t *_map_tower /* [in] [ptr] */, + struct policy_handle *_entry_handle /* [in,out] [ref] */, + uint32_t _max_towers /* [in] */, + uint32_t *_num_towers /* [out] [ref] */, + struct epm_twr_p_t *_towers /* [out] [length_is(*num_towers),size_is(max_towers)] */); +NTSTATUS rpccli_epm_Map_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + uint32 *result); NTSTATUS rpccli_epm_Map(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct GUID *object /* [in] [ptr] */, @@ -28,17 +71,46 @@ NTSTATUS rpccli_epm_Map(struct rpc_pipe_client *cli, uint32_t max_towers /* [in] */, uint32_t *num_towers /* [out] [ref] */, struct epm_twr_p_t *towers /* [out] [length_is(*num_towers),size_is(max_towers)] */); +struct tevent_req *rpccli_epm_LookupHandleFree_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_entry_handle /* [in,out] [ref] */); +NTSTATUS rpccli_epm_LookupHandleFree_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + uint32 *result); NTSTATUS rpccli_epm_LookupHandleFree(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *entry_handle /* [in,out] [ref] */); +struct tevent_req *rpccli_epm_InqObject_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct GUID *_epm_object /* [in] [ref] */); +NTSTATUS rpccli_epm_InqObject_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + uint32 *result); NTSTATUS rpccli_epm_InqObject(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct GUID *epm_object /* [in] [ref] */); +struct tevent_req *rpccli_epm_MgmtDelete_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint32_t _object_speced /* [in] */, + struct GUID *_object /* [in] [ptr] */, + struct epm_twr_t *_tower /* [in] [ptr] */); +NTSTATUS rpccli_epm_MgmtDelete_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + uint32 *result); NTSTATUS rpccli_epm_MgmtDelete(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t object_speced /* [in] */, struct GUID *object /* [in] [ptr] */, struct epm_twr_t *tower /* [in] [ptr] */); +struct tevent_req *rpccli_epm_MapAuth_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_epm_MapAuth_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + uint32 *result); NTSTATUS rpccli_epm_MapAuth(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); #endif /* __CLI_EPMAPPER__ */ diff --git a/librpc/gen_ndr/cli_eventlog.c b/librpc/gen_ndr/cli_eventlog.c index b9cf39dea0..a53ca13eb4 100644 --- a/librpc/gen_ndr/cli_eventlog.c +++ b/librpc/gen_ndr/cli_eventlog.c @@ -6,6 +6,120 @@ #include "includes.h" #include "../librpc/gen_ndr/cli_eventlog.h" +struct rpccli_eventlog_ClearEventLogW_state { + struct eventlog_ClearEventLogW orig; + struct eventlog_ClearEventLogW tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_eventlog_ClearEventLogW_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_eventlog_ClearEventLogW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_String *_backupfile /* [in] [unique] */) +{ + struct tevent_req *req; + struct rpccli_eventlog_ClearEventLogW_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_eventlog_ClearEventLogW_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.backupfile = _backupfile; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(eventlog_ClearEventLogW, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_eventlog, + NDR_EVENTLOG_CLEAREVENTLOGW, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_eventlog_ClearEventLogW_done, req); + return req; +} + +static void rpccli_eventlog_ClearEventLogW_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_eventlog_ClearEventLogW_state *state = tevent_req_data( + req, struct rpccli_eventlog_ClearEventLogW_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(eventlog_ClearEventLogW, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_eventlog_ClearEventLogW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_eventlog_ClearEventLogW_state *state = tevent_req_data( + req, struct rpccli_eventlog_ClearEventLogW_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_eventlog_ClearEventLogW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -46,6 +160,120 @@ NTSTATUS rpccli_eventlog_ClearEventLogW(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_eventlog_BackupEventLogW_state { + struct eventlog_BackupEventLogW orig; + struct eventlog_BackupEventLogW tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_eventlog_BackupEventLogW_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_eventlog_BackupEventLogW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_String *_backup_filename /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_eventlog_BackupEventLogW_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_eventlog_BackupEventLogW_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.backup_filename = _backup_filename; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(eventlog_BackupEventLogW, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_eventlog, + NDR_EVENTLOG_BACKUPEVENTLOGW, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_eventlog_BackupEventLogW_done, req); + return req; +} + +static void rpccli_eventlog_BackupEventLogW_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_eventlog_BackupEventLogW_state *state = tevent_req_data( + req, struct rpccli_eventlog_BackupEventLogW_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(eventlog_BackupEventLogW, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_eventlog_BackupEventLogW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_eventlog_BackupEventLogW_state *state = tevent_req_data( + req, struct rpccli_eventlog_BackupEventLogW_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_eventlog_BackupEventLogW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -86,6 +314,126 @@ NTSTATUS rpccli_eventlog_BackupEventLogW(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_eventlog_CloseEventLog_state { + struct eventlog_CloseEventLog orig; + struct eventlog_CloseEventLog tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_eventlog_CloseEventLog_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_eventlog_CloseEventLog_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in,out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_eventlog_CloseEventLog_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_eventlog_CloseEventLog_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(eventlog_CloseEventLog, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_eventlog_CloseEventLog_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_eventlog, + NDR_EVENTLOG_CLOSEEVENTLOG, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_eventlog_CloseEventLog_done, req); + return req; +} + +static void rpccli_eventlog_CloseEventLog_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_eventlog_CloseEventLog_state *state = tevent_req_data( + req, struct rpccli_eventlog_CloseEventLog_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(eventlog_CloseEventLog, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_eventlog_CloseEventLog_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_eventlog_CloseEventLog_state *state = tevent_req_data( + req, struct rpccli_eventlog_CloseEventLog_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_eventlog_CloseEventLog(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in,out] [ref] */) @@ -125,6 +473,126 @@ NTSTATUS rpccli_eventlog_CloseEventLog(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_eventlog_DeregisterEventSource_state { + struct eventlog_DeregisterEventSource orig; + struct eventlog_DeregisterEventSource tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_eventlog_DeregisterEventSource_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_eventlog_DeregisterEventSource_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in,out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_eventlog_DeregisterEventSource_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_eventlog_DeregisterEventSource_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(eventlog_DeregisterEventSource, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_eventlog_DeregisterEventSource_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_eventlog, + NDR_EVENTLOG_DEREGISTEREVENTSOURCE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_eventlog_DeregisterEventSource_done, req); + return req; +} + +static void rpccli_eventlog_DeregisterEventSource_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_eventlog_DeregisterEventSource_state *state = tevent_req_data( + req, struct rpccli_eventlog_DeregisterEventSource_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(eventlog_DeregisterEventSource, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_eventlog_DeregisterEventSource_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_eventlog_DeregisterEventSource_state *state = tevent_req_data( + req, struct rpccli_eventlog_DeregisterEventSource_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_eventlog_DeregisterEventSource(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in,out] [ref] */) @@ -164,6 +632,127 @@ NTSTATUS rpccli_eventlog_DeregisterEventSource(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_eventlog_GetNumRecords_state { + struct eventlog_GetNumRecords orig; + struct eventlog_GetNumRecords tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_eventlog_GetNumRecords_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_eventlog_GetNumRecords_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t *_number /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_eventlog_GetNumRecords_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_eventlog_GetNumRecords_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + + /* Out parameters */ + state->orig.out.number = _number; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(eventlog_GetNumRecords, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_eventlog_GetNumRecords_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_eventlog, + NDR_EVENTLOG_GETNUMRECORDS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_eventlog_GetNumRecords_done, req); + return req; +} + +static void rpccli_eventlog_GetNumRecords_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_eventlog_GetNumRecords_state *state = tevent_req_data( + req, struct rpccli_eventlog_GetNumRecords_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.number = *state->tmp.out.number; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(eventlog_GetNumRecords, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_eventlog_GetNumRecords_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_eventlog_GetNumRecords_state *state = tevent_req_data( + req, struct rpccli_eventlog_GetNumRecords_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_eventlog_GetNumRecords(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -204,6 +793,127 @@ NTSTATUS rpccli_eventlog_GetNumRecords(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_eventlog_GetOldestRecord_state { + struct eventlog_GetOldestRecord orig; + struct eventlog_GetOldestRecord tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_eventlog_GetOldestRecord_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_eventlog_GetOldestRecord_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t *_oldest_entry /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_eventlog_GetOldestRecord_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_eventlog_GetOldestRecord_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + + /* Out parameters */ + state->orig.out.oldest_entry = _oldest_entry; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(eventlog_GetOldestRecord, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_eventlog_GetOldestRecord_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_eventlog, + NDR_EVENTLOG_GETOLDESTRECORD, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_eventlog_GetOldestRecord_done, req); + return req; +} + +static void rpccli_eventlog_GetOldestRecord_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_eventlog_GetOldestRecord_state *state = tevent_req_data( + req, struct rpccli_eventlog_GetOldestRecord_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.oldest_entry = *state->tmp.out.oldest_entry; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(eventlog_GetOldestRecord, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_eventlog_GetOldestRecord_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_eventlog_GetOldestRecord_state *state = tevent_req_data( + req, struct rpccli_eventlog_GetOldestRecord_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_eventlog_GetOldestRecord(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -244,6 +954,116 @@ NTSTATUS rpccli_eventlog_GetOldestRecord(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_eventlog_ChangeNotify_state { + struct eventlog_ChangeNotify orig; + struct eventlog_ChangeNotify tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_eventlog_ChangeNotify_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_eventlog_ChangeNotify_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_eventlog_ChangeNotify_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_eventlog_ChangeNotify_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(eventlog_ChangeNotify, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_eventlog, + NDR_EVENTLOG_CHANGENOTIFY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_eventlog_ChangeNotify_done, req); + return req; +} + +static void rpccli_eventlog_ChangeNotify_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_eventlog_ChangeNotify_state *state = tevent_req_data( + req, struct rpccli_eventlog_ChangeNotify_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(eventlog_ChangeNotify, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_eventlog_ChangeNotify_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_eventlog_ChangeNotify_state *state = tevent_req_data( + req, struct rpccli_eventlog_ChangeNotify_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_eventlog_ChangeNotify(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -280,6 +1100,135 @@ NTSTATUS rpccli_eventlog_ChangeNotify(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_eventlog_OpenEventLogW_state { + struct eventlog_OpenEventLogW orig; + struct eventlog_OpenEventLogW tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_eventlog_OpenEventLogW_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_eventlog_OpenEventLogW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct eventlog_OpenUnknown0 *_unknown0 /* [in] [unique] */, + struct lsa_String *_logname /* [in] [ref] */, + struct lsa_String *_servername /* [in] [ref] */, + uint32_t _major_version /* [in] */, + uint32_t _minor_version /* [in] */, + struct policy_handle *_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_eventlog_OpenEventLogW_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_eventlog_OpenEventLogW_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.unknown0 = _unknown0; + state->orig.in.logname = _logname; + state->orig.in.servername = _servername; + state->orig.in.major_version = _major_version; + state->orig.in.minor_version = _minor_version; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(eventlog_OpenEventLogW, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_eventlog_OpenEventLogW_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_eventlog, + NDR_EVENTLOG_OPENEVENTLOGW, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_eventlog_OpenEventLogW_done, req); + return req; +} + +static void rpccli_eventlog_OpenEventLogW_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_eventlog_OpenEventLogW_state *state = tevent_req_data( + req, struct rpccli_eventlog_OpenEventLogW_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(eventlog_OpenEventLogW, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_eventlog_OpenEventLogW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_eventlog_OpenEventLogW_state *state = tevent_req_data( + req, struct rpccli_eventlog_OpenEventLogW_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_eventlog_OpenEventLogW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct eventlog_OpenUnknown0 *unknown0 /* [in] [unique] */, @@ -328,6 +1277,135 @@ NTSTATUS rpccli_eventlog_OpenEventLogW(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_eventlog_RegisterEventSourceW_state { + struct eventlog_RegisterEventSourceW orig; + struct eventlog_RegisterEventSourceW tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_eventlog_RegisterEventSourceW_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_eventlog_RegisterEventSourceW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct eventlog_OpenUnknown0 *_unknown0 /* [in] [unique] */, + struct lsa_String *_module_name /* [in] [ref] */, + struct lsa_String *_reg_module_name /* [in] [ref] */, + uint32_t _major_version /* [in] */, + uint32_t _minor_version /* [in] */, + struct policy_handle *_log_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_eventlog_RegisterEventSourceW_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_eventlog_RegisterEventSourceW_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.unknown0 = _unknown0; + state->orig.in.module_name = _module_name; + state->orig.in.reg_module_name = _reg_module_name; + state->orig.in.major_version = _major_version; + state->orig.in.minor_version = _minor_version; + + /* Out parameters */ + state->orig.out.log_handle = _log_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(eventlog_RegisterEventSourceW, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_eventlog_RegisterEventSourceW_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_eventlog, + NDR_EVENTLOG_REGISTEREVENTSOURCEW, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_eventlog_RegisterEventSourceW_done, req); + return req; +} + +static void rpccli_eventlog_RegisterEventSourceW_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_eventlog_RegisterEventSourceW_state *state = tevent_req_data( + req, struct rpccli_eventlog_RegisterEventSourceW_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.log_handle = *state->tmp.out.log_handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(eventlog_RegisterEventSourceW, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_eventlog_RegisterEventSourceW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_eventlog_RegisterEventSourceW_state *state = tevent_req_data( + req, struct rpccli_eventlog_RegisterEventSourceW_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_eventlog_RegisterEventSourceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct eventlog_OpenUnknown0 *unknown0 /* [in] [unique] */, @@ -376,6 +1454,133 @@ NTSTATUS rpccli_eventlog_RegisterEventSourceW(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_eventlog_OpenBackupEventLogW_state { + struct eventlog_OpenBackupEventLogW orig; + struct eventlog_OpenBackupEventLogW tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_eventlog_OpenBackupEventLogW_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_eventlog_OpenBackupEventLogW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct eventlog_OpenUnknown0 *_unknown0 /* [in] [unique] */, + struct lsa_String *_backup_logname /* [in] [ref] */, + uint32_t _major_version /* [in] */, + uint32_t _minor_version /* [in] */, + struct policy_handle *_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_eventlog_OpenBackupEventLogW_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_eventlog_OpenBackupEventLogW_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.unknown0 = _unknown0; + state->orig.in.backup_logname = _backup_logname; + state->orig.in.major_version = _major_version; + state->orig.in.minor_version = _minor_version; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(eventlog_OpenBackupEventLogW, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_eventlog_OpenBackupEventLogW_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_eventlog, + NDR_EVENTLOG_OPENBACKUPEVENTLOGW, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_eventlog_OpenBackupEventLogW_done, req); + return req; +} + +static void rpccli_eventlog_OpenBackupEventLogW_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_eventlog_OpenBackupEventLogW_state *state = tevent_req_data( + req, struct rpccli_eventlog_OpenBackupEventLogW_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(eventlog_OpenBackupEventLogW, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_eventlog_OpenBackupEventLogW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_eventlog_OpenBackupEventLogW_state *state = tevent_req_data( + req, struct rpccli_eventlog_OpenBackupEventLogW_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_eventlog_OpenBackupEventLogW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct eventlog_OpenUnknown0 *unknown0 /* [in] [unique] */, @@ -422,6 +1627,139 @@ NTSTATUS rpccli_eventlog_OpenBackupEventLogW(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_eventlog_ReadEventLogW_state { + struct eventlog_ReadEventLogW orig; + struct eventlog_ReadEventLogW tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_eventlog_ReadEventLogW_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_eventlog_ReadEventLogW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _flags /* [in] */, + uint32_t _offset /* [in] */, + uint32_t _number_of_bytes /* [in] [range(0,0x7FFFF)] */, + uint8_t *_data /* [out] [ref,size_is(number_of_bytes)] */, + uint32_t *_sent_size /* [out] [ref] */, + uint32_t *_real_size /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_eventlog_ReadEventLogW_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_eventlog_ReadEventLogW_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.flags = _flags; + state->orig.in.offset = _offset; + state->orig.in.number_of_bytes = _number_of_bytes; + + /* Out parameters */ + state->orig.out.data = _data; + state->orig.out.sent_size = _sent_size; + state->orig.out.real_size = _real_size; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(eventlog_ReadEventLogW, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_eventlog_ReadEventLogW_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_eventlog, + NDR_EVENTLOG_READEVENTLOGW, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_eventlog_ReadEventLogW_done, req); + return req; +} + +static void rpccli_eventlog_ReadEventLogW_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_eventlog_ReadEventLogW_state *state = tevent_req_data( + req, struct rpccli_eventlog_ReadEventLogW_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 */ + memcpy(state->orig.out.data, state->tmp.out.data, state->tmp.in.number_of_bytes * sizeof(*state->orig.out.data)); + *state->orig.out.sent_size = *state->tmp.out.sent_size; + *state->orig.out.real_size = *state->tmp.out.real_size; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(eventlog_ReadEventLogW, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_eventlog_ReadEventLogW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_eventlog_ReadEventLogW_state *state = tevent_req_data( + req, struct rpccli_eventlog_ReadEventLogW_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_eventlog_ReadEventLogW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -472,6 +1810,158 @@ NTSTATUS rpccli_eventlog_ReadEventLogW(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_eventlog_ReportEventW_state { + struct eventlog_ReportEventW orig; + struct eventlog_ReportEventW tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_eventlog_ReportEventW_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_eventlog_ReportEventW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + time_t _timestamp /* [in] */, + enum eventlogEventTypes _event_type /* [in] */, + uint16_t _event_category /* [in] */, + uint32_t _event_id /* [in] */, + uint16_t _num_of_strings /* [in] [range(0,256)] */, + uint32_t _data_size /* [in] [range(0,0x3FFFF)] */, + struct lsa_String *_servername /* [in] [ref] */, + struct dom_sid *_user_sid /* [in] [unique] */, + struct lsa_String **_strings /* [in] [unique,size_is(num_of_strings)] */, + uint8_t *_data /* [in] [unique,size_is(data_size)] */, + uint16_t _flags /* [in] */, + uint32_t *_record_number /* [in,out] [unique] */, + time_t *_time_written /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_eventlog_ReportEventW_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_eventlog_ReportEventW_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.timestamp = _timestamp; + state->orig.in.event_type = _event_type; + state->orig.in.event_category = _event_category; + state->orig.in.event_id = _event_id; + state->orig.in.num_of_strings = _num_of_strings; + state->orig.in.data_size = _data_size; + state->orig.in.servername = _servername; + state->orig.in.user_sid = _user_sid; + state->orig.in.strings = _strings; + state->orig.in.data = _data; + state->orig.in.flags = _flags; + state->orig.in.record_number = _record_number; + state->orig.in.time_written = _time_written; + + /* Out parameters */ + state->orig.out.record_number = _record_number; + state->orig.out.time_written = _time_written; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(eventlog_ReportEventW, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_eventlog_ReportEventW_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_eventlog, + NDR_EVENTLOG_REPORTEVENTW, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_eventlog_ReportEventW_done, req); + return req; +} + +static void rpccli_eventlog_ReportEventW_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_eventlog_ReportEventW_state *state = tevent_req_data( + req, struct rpccli_eventlog_ReportEventW_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 */ + if (state->orig.out.record_number && state->tmp.out.record_number) { + *state->orig.out.record_number = *state->tmp.out.record_number; + } + if (state->orig.out.time_written && state->tmp.out.time_written) { + *state->orig.out.time_written = *state->tmp.out.time_written; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(eventlog_ReportEventW, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_eventlog_ReportEventW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_eventlog_ReportEventW_state *state = tevent_req_data( + req, struct rpccli_eventlog_ReportEventW_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_eventlog_ReportEventW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -542,6 +2032,116 @@ NTSTATUS rpccli_eventlog_ReportEventW(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_eventlog_ClearEventLogA_state { + struct eventlog_ClearEventLogA orig; + struct eventlog_ClearEventLogA tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_eventlog_ClearEventLogA_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_eventlog_ClearEventLogA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_eventlog_ClearEventLogA_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_eventlog_ClearEventLogA_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(eventlog_ClearEventLogA, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_eventlog, + NDR_EVENTLOG_CLEAREVENTLOGA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_eventlog_ClearEventLogA_done, req); + return req; +} + +static void rpccli_eventlog_ClearEventLogA_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_eventlog_ClearEventLogA_state *state = tevent_req_data( + req, struct rpccli_eventlog_ClearEventLogA_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(eventlog_ClearEventLogA, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_eventlog_ClearEventLogA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_eventlog_ClearEventLogA_state *state = tevent_req_data( + req, struct rpccli_eventlog_ClearEventLogA_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_eventlog_ClearEventLogA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -578,6 +2178,116 @@ NTSTATUS rpccli_eventlog_ClearEventLogA(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_eventlog_BackupEventLogA_state { + struct eventlog_BackupEventLogA orig; + struct eventlog_BackupEventLogA tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_eventlog_BackupEventLogA_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_eventlog_BackupEventLogA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_eventlog_BackupEventLogA_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_eventlog_BackupEventLogA_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(eventlog_BackupEventLogA, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_eventlog, + NDR_EVENTLOG_BACKUPEVENTLOGA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_eventlog_BackupEventLogA_done, req); + return req; +} + +static void rpccli_eventlog_BackupEventLogA_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_eventlog_BackupEventLogA_state *state = tevent_req_data( + req, struct rpccli_eventlog_BackupEventLogA_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(eventlog_BackupEventLogA, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_eventlog_BackupEventLogA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_eventlog_BackupEventLogA_state *state = tevent_req_data( + req, struct rpccli_eventlog_BackupEventLogA_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_eventlog_BackupEventLogA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -614,6 +2324,116 @@ NTSTATUS rpccli_eventlog_BackupEventLogA(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_eventlog_OpenEventLogA_state { + struct eventlog_OpenEventLogA orig; + struct eventlog_OpenEventLogA tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_eventlog_OpenEventLogA_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_eventlog_OpenEventLogA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_eventlog_OpenEventLogA_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_eventlog_OpenEventLogA_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(eventlog_OpenEventLogA, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_eventlog, + NDR_EVENTLOG_OPENEVENTLOGA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_eventlog_OpenEventLogA_done, req); + return req; +} + +static void rpccli_eventlog_OpenEventLogA_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_eventlog_OpenEventLogA_state *state = tevent_req_data( + req, struct rpccli_eventlog_OpenEventLogA_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(eventlog_OpenEventLogA, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_eventlog_OpenEventLogA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_eventlog_OpenEventLogA_state *state = tevent_req_data( + req, struct rpccli_eventlog_OpenEventLogA_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_eventlog_OpenEventLogA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -650,6 +2470,116 @@ NTSTATUS rpccli_eventlog_OpenEventLogA(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_eventlog_RegisterEventSourceA_state { + struct eventlog_RegisterEventSourceA orig; + struct eventlog_RegisterEventSourceA tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_eventlog_RegisterEventSourceA_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_eventlog_RegisterEventSourceA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_eventlog_RegisterEventSourceA_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_eventlog_RegisterEventSourceA_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(eventlog_RegisterEventSourceA, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_eventlog, + NDR_EVENTLOG_REGISTEREVENTSOURCEA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_eventlog_RegisterEventSourceA_done, req); + return req; +} + +static void rpccli_eventlog_RegisterEventSourceA_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_eventlog_RegisterEventSourceA_state *state = tevent_req_data( + req, struct rpccli_eventlog_RegisterEventSourceA_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(eventlog_RegisterEventSourceA, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_eventlog_RegisterEventSourceA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_eventlog_RegisterEventSourceA_state *state = tevent_req_data( + req, struct rpccli_eventlog_RegisterEventSourceA_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_eventlog_RegisterEventSourceA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -686,6 +2616,116 @@ NTSTATUS rpccli_eventlog_RegisterEventSourceA(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_eventlog_OpenBackupEventLogA_state { + struct eventlog_OpenBackupEventLogA orig; + struct eventlog_OpenBackupEventLogA tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_eventlog_OpenBackupEventLogA_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_eventlog_OpenBackupEventLogA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_eventlog_OpenBackupEventLogA_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_eventlog_OpenBackupEventLogA_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(eventlog_OpenBackupEventLogA, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_eventlog, + NDR_EVENTLOG_OPENBACKUPEVENTLOGA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_eventlog_OpenBackupEventLogA_done, req); + return req; +} + +static void rpccli_eventlog_OpenBackupEventLogA_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_eventlog_OpenBackupEventLogA_state *state = tevent_req_data( + req, struct rpccli_eventlog_OpenBackupEventLogA_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(eventlog_OpenBackupEventLogA, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_eventlog_OpenBackupEventLogA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_eventlog_OpenBackupEventLogA_state *state = tevent_req_data( + req, struct rpccli_eventlog_OpenBackupEventLogA_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_eventlog_OpenBackupEventLogA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -722,6 +2762,116 @@ NTSTATUS rpccli_eventlog_OpenBackupEventLogA(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_eventlog_ReadEventLogA_state { + struct eventlog_ReadEventLogA orig; + struct eventlog_ReadEventLogA tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_eventlog_ReadEventLogA_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_eventlog_ReadEventLogA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_eventlog_ReadEventLogA_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_eventlog_ReadEventLogA_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(eventlog_ReadEventLogA, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_eventlog, + NDR_EVENTLOG_READEVENTLOGA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_eventlog_ReadEventLogA_done, req); + return req; +} + +static void rpccli_eventlog_ReadEventLogA_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_eventlog_ReadEventLogA_state *state = tevent_req_data( + req, struct rpccli_eventlog_ReadEventLogA_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(eventlog_ReadEventLogA, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_eventlog_ReadEventLogA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_eventlog_ReadEventLogA_state *state = tevent_req_data( + req, struct rpccli_eventlog_ReadEventLogA_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_eventlog_ReadEventLogA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -758,6 +2908,116 @@ NTSTATUS rpccli_eventlog_ReadEventLogA(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_eventlog_ReportEventA_state { + struct eventlog_ReportEventA orig; + struct eventlog_ReportEventA tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_eventlog_ReportEventA_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_eventlog_ReportEventA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_eventlog_ReportEventA_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_eventlog_ReportEventA_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(eventlog_ReportEventA, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_eventlog, + NDR_EVENTLOG_REPORTEVENTA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_eventlog_ReportEventA_done, req); + return req; +} + +static void rpccli_eventlog_ReportEventA_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_eventlog_ReportEventA_state *state = tevent_req_data( + req, struct rpccli_eventlog_ReportEventA_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(eventlog_ReportEventA, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_eventlog_ReportEventA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_eventlog_ReportEventA_state *state = tevent_req_data( + req, struct rpccli_eventlog_ReportEventA_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_eventlog_ReportEventA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -794,6 +3054,116 @@ NTSTATUS rpccli_eventlog_ReportEventA(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_eventlog_RegisterClusterSvc_state { + struct eventlog_RegisterClusterSvc orig; + struct eventlog_RegisterClusterSvc tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_eventlog_RegisterClusterSvc_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_eventlog_RegisterClusterSvc_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_eventlog_RegisterClusterSvc_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_eventlog_RegisterClusterSvc_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(eventlog_RegisterClusterSvc, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_eventlog, + NDR_EVENTLOG_REGISTERCLUSTERSVC, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_eventlog_RegisterClusterSvc_done, req); + return req; +} + +static void rpccli_eventlog_RegisterClusterSvc_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_eventlog_RegisterClusterSvc_state *state = tevent_req_data( + req, struct rpccli_eventlog_RegisterClusterSvc_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(eventlog_RegisterClusterSvc, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_eventlog_RegisterClusterSvc_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_eventlog_RegisterClusterSvc_state *state = tevent_req_data( + req, struct rpccli_eventlog_RegisterClusterSvc_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_eventlog_RegisterClusterSvc(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -830,6 +3200,116 @@ NTSTATUS rpccli_eventlog_RegisterClusterSvc(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_eventlog_DeregisterClusterSvc_state { + struct eventlog_DeregisterClusterSvc orig; + struct eventlog_DeregisterClusterSvc tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_eventlog_DeregisterClusterSvc_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_eventlog_DeregisterClusterSvc_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_eventlog_DeregisterClusterSvc_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_eventlog_DeregisterClusterSvc_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(eventlog_DeregisterClusterSvc, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_eventlog, + NDR_EVENTLOG_DEREGISTERCLUSTERSVC, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_eventlog_DeregisterClusterSvc_done, req); + return req; +} + +static void rpccli_eventlog_DeregisterClusterSvc_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_eventlog_DeregisterClusterSvc_state *state = tevent_req_data( + req, struct rpccli_eventlog_DeregisterClusterSvc_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(eventlog_DeregisterClusterSvc, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_eventlog_DeregisterClusterSvc_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_eventlog_DeregisterClusterSvc_state *state = tevent_req_data( + req, struct rpccli_eventlog_DeregisterClusterSvc_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_eventlog_DeregisterClusterSvc(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -866,6 +3346,116 @@ NTSTATUS rpccli_eventlog_DeregisterClusterSvc(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_eventlog_WriteClusterEvents_state { + struct eventlog_WriteClusterEvents orig; + struct eventlog_WriteClusterEvents tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_eventlog_WriteClusterEvents_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_eventlog_WriteClusterEvents_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_eventlog_WriteClusterEvents_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_eventlog_WriteClusterEvents_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(eventlog_WriteClusterEvents, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_eventlog, + NDR_EVENTLOG_WRITECLUSTEREVENTS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_eventlog_WriteClusterEvents_done, req); + return req; +} + +static void rpccli_eventlog_WriteClusterEvents_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_eventlog_WriteClusterEvents_state *state = tevent_req_data( + req, struct rpccli_eventlog_WriteClusterEvents_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(eventlog_WriteClusterEvents, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_eventlog_WriteClusterEvents_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_eventlog_WriteClusterEvents_state *state = tevent_req_data( + req, struct rpccli_eventlog_WriteClusterEvents_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_eventlog_WriteClusterEvents(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -902,6 +3492,134 @@ NTSTATUS rpccli_eventlog_WriteClusterEvents(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_eventlog_GetLogInformation_state { + struct eventlog_GetLogInformation orig; + struct eventlog_GetLogInformation tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_eventlog_GetLogInformation_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_eventlog_GetLogInformation_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _level /* [in] */, + uint8_t *_buffer /* [out] [ref,size_is(buf_size)] */, + uint32_t _buf_size /* [in] [range(0,1024)] */, + uint32_t *_bytes_needed /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_eventlog_GetLogInformation_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_eventlog_GetLogInformation_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.level = _level; + state->orig.in.buf_size = _buf_size; + + /* Out parameters */ + state->orig.out.buffer = _buffer; + state->orig.out.bytes_needed = _bytes_needed; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(eventlog_GetLogInformation, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_eventlog_GetLogInformation_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_eventlog, + NDR_EVENTLOG_GETLOGINFORMATION, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_eventlog_GetLogInformation_done, req); + return req; +} + +static void rpccli_eventlog_GetLogInformation_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_eventlog_GetLogInformation_state *state = tevent_req_data( + req, struct rpccli_eventlog_GetLogInformation_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 */ + memcpy(state->orig.out.buffer, state->tmp.out.buffer, state->tmp.in.buf_size * sizeof(*state->orig.out.buffer)); + *state->orig.out.bytes_needed = *state->tmp.out.bytes_needed; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(eventlog_GetLogInformation, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_eventlog_GetLogInformation_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_eventlog_GetLogInformation_state *state = tevent_req_data( + req, struct rpccli_eventlog_GetLogInformation_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_eventlog_GetLogInformation(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -948,6 +3666,118 @@ NTSTATUS rpccli_eventlog_GetLogInformation(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_eventlog_FlushEventLog_state { + struct eventlog_FlushEventLog orig; + struct eventlog_FlushEventLog tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_eventlog_FlushEventLog_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_eventlog_FlushEventLog_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_eventlog_FlushEventLog_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_eventlog_FlushEventLog_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(eventlog_FlushEventLog, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_eventlog, + NDR_EVENTLOG_FLUSHEVENTLOG, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_eventlog_FlushEventLog_done, req); + return req; +} + +static void rpccli_eventlog_FlushEventLog_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_eventlog_FlushEventLog_state *state = tevent_req_data( + req, struct rpccli_eventlog_FlushEventLog_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(eventlog_FlushEventLog, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_eventlog_FlushEventLog_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_eventlog_FlushEventLog_state *state = tevent_req_data( + req, struct rpccli_eventlog_FlushEventLog_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_eventlog_FlushEventLog(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */) @@ -986,6 +3816,160 @@ NTSTATUS rpccli_eventlog_FlushEventLog(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_eventlog_ReportEventAndSourceW_state { + struct eventlog_ReportEventAndSourceW orig; + struct eventlog_ReportEventAndSourceW tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_eventlog_ReportEventAndSourceW_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_eventlog_ReportEventAndSourceW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + time_t _timestamp /* [in] */, + enum eventlogEventTypes _event_type /* [in] */, + uint16_t _event_category /* [in] */, + uint32_t _event_id /* [in] */, + struct lsa_String *_sourcename /* [in] [ref] */, + uint16_t _num_of_strings /* [in] [range(0,256)] */, + uint32_t _data_size /* [in] [range(0,0x3FFFF)] */, + struct lsa_String *_servername /* [in] [ref] */, + struct dom_sid *_user_sid /* [in] [unique] */, + struct lsa_String **_strings /* [in] [unique,size_is(num_of_strings)] */, + uint8_t *_data /* [in] [unique,size_is(data_size)] */, + uint16_t _flags /* [in] */, + uint32_t *_record_number /* [in,out] [unique] */, + time_t *_time_written /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_eventlog_ReportEventAndSourceW_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_eventlog_ReportEventAndSourceW_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.timestamp = _timestamp; + state->orig.in.event_type = _event_type; + state->orig.in.event_category = _event_category; + state->orig.in.event_id = _event_id; + state->orig.in.sourcename = _sourcename; + state->orig.in.num_of_strings = _num_of_strings; + state->orig.in.data_size = _data_size; + state->orig.in.servername = _servername; + state->orig.in.user_sid = _user_sid; + state->orig.in.strings = _strings; + state->orig.in.data = _data; + state->orig.in.flags = _flags; + state->orig.in.record_number = _record_number; + state->orig.in.time_written = _time_written; + + /* Out parameters */ + state->orig.out.record_number = _record_number; + state->orig.out.time_written = _time_written; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(eventlog_ReportEventAndSourceW, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_eventlog_ReportEventAndSourceW_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_eventlog, + NDR_EVENTLOG_REPORTEVENTANDSOURCEW, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_eventlog_ReportEventAndSourceW_done, req); + return req; +} + +static void rpccli_eventlog_ReportEventAndSourceW_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_eventlog_ReportEventAndSourceW_state *state = tevent_req_data( + req, struct rpccli_eventlog_ReportEventAndSourceW_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 */ + if (state->orig.out.record_number && state->tmp.out.record_number) { + *state->orig.out.record_number = *state->tmp.out.record_number; + } + if (state->orig.out.time_written && state->tmp.out.time_written) { + *state->orig.out.time_written = *state->tmp.out.time_written; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(eventlog_ReportEventAndSourceW, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_eventlog_ReportEventAndSourceW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_eventlog_ReportEventAndSourceW_state *state = tevent_req_data( + req, struct rpccli_eventlog_ReportEventAndSourceW_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_eventlog_ReportEventAndSourceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, diff --git a/librpc/gen_ndr/cli_eventlog.h b/librpc/gen_ndr/cli_eventlog.h index d905676041..7d54234082 100644 --- a/librpc/gen_ndr/cli_eventlog.h +++ b/librpc/gen_ndr/cli_eventlog.h @@ -1,30 +1,94 @@ #include "../librpc/gen_ndr/ndr_eventlog.h" #ifndef __CLI_EVENTLOG__ #define __CLI_EVENTLOG__ +struct tevent_req *rpccli_eventlog_ClearEventLogW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_String *_backupfile /* [in] [unique] */); +NTSTATUS rpccli_eventlog_ClearEventLogW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_eventlog_ClearEventLogW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct lsa_String *backupfile /* [in] [unique] */); +struct tevent_req *rpccli_eventlog_BackupEventLogW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_String *_backup_filename /* [in] [ref] */); +NTSTATUS rpccli_eventlog_BackupEventLogW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_eventlog_BackupEventLogW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct lsa_String *backup_filename /* [in] [ref] */); +struct tevent_req *rpccli_eventlog_CloseEventLog_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in,out] [ref] */); +NTSTATUS rpccli_eventlog_CloseEventLog_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_eventlog_CloseEventLog(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in,out] [ref] */); +struct tevent_req *rpccli_eventlog_DeregisterEventSource_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in,out] [ref] */); +NTSTATUS rpccli_eventlog_DeregisterEventSource_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_eventlog_DeregisterEventSource(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in,out] [ref] */); +struct tevent_req *rpccli_eventlog_GetNumRecords_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t *_number /* [out] [ref] */); +NTSTATUS rpccli_eventlog_GetNumRecords_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_eventlog_GetNumRecords(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t *number /* [out] [ref] */); +struct tevent_req *rpccli_eventlog_GetOldestRecord_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t *_oldest_entry /* [out] [ref] */); +NTSTATUS rpccli_eventlog_GetOldestRecord_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_eventlog_GetOldestRecord(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t *oldest_entry /* [out] [ref] */); +struct tevent_req *rpccli_eventlog_ChangeNotify_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_eventlog_ChangeNotify_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_eventlog_ChangeNotify(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_eventlog_OpenEventLogW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct eventlog_OpenUnknown0 *_unknown0 /* [in] [unique] */, + struct lsa_String *_logname /* [in] [ref] */, + struct lsa_String *_servername /* [in] [ref] */, + uint32_t _major_version /* [in] */, + uint32_t _minor_version /* [in] */, + struct policy_handle *_handle /* [out] [ref] */); +NTSTATUS rpccli_eventlog_OpenEventLogW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_eventlog_OpenEventLogW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct eventlog_OpenUnknown0 *unknown0 /* [in] [unique] */, @@ -33,6 +97,18 @@ NTSTATUS rpccli_eventlog_OpenEventLogW(struct rpc_pipe_client *cli, uint32_t major_version /* [in] */, uint32_t minor_version /* [in] */, struct policy_handle *handle /* [out] [ref] */); +struct tevent_req *rpccli_eventlog_RegisterEventSourceW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct eventlog_OpenUnknown0 *_unknown0 /* [in] [unique] */, + struct lsa_String *_module_name /* [in] [ref] */, + struct lsa_String *_reg_module_name /* [in] [ref] */, + uint32_t _major_version /* [in] */, + uint32_t _minor_version /* [in] */, + struct policy_handle *_log_handle /* [out] [ref] */); +NTSTATUS rpccli_eventlog_RegisterEventSourceW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_eventlog_RegisterEventSourceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct eventlog_OpenUnknown0 *unknown0 /* [in] [unique] */, @@ -41,6 +117,17 @@ NTSTATUS rpccli_eventlog_RegisterEventSourceW(struct rpc_pipe_client *cli, uint32_t major_version /* [in] */, uint32_t minor_version /* [in] */, struct policy_handle *log_handle /* [out] [ref] */); +struct tevent_req *rpccli_eventlog_OpenBackupEventLogW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct eventlog_OpenUnknown0 *_unknown0 /* [in] [unique] */, + struct lsa_String *_backup_logname /* [in] [ref] */, + uint32_t _major_version /* [in] */, + uint32_t _minor_version /* [in] */, + struct policy_handle *_handle /* [out] [ref] */); +NTSTATUS rpccli_eventlog_OpenBackupEventLogW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_eventlog_OpenBackupEventLogW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct eventlog_OpenUnknown0 *unknown0 /* [in] [unique] */, @@ -48,6 +135,19 @@ NTSTATUS rpccli_eventlog_OpenBackupEventLogW(struct rpc_pipe_client *cli, uint32_t major_version /* [in] */, uint32_t minor_version /* [in] */, struct policy_handle *handle /* [out] [ref] */); +struct tevent_req *rpccli_eventlog_ReadEventLogW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _flags /* [in] */, + uint32_t _offset /* [in] */, + uint32_t _number_of_bytes /* [in] [range(0,0x7FFFF)] */, + uint8_t *_data /* [out] [ref,size_is(number_of_bytes)] */, + uint32_t *_sent_size /* [out] [ref] */, + uint32_t *_real_size /* [out] [ref] */); +NTSTATUS rpccli_eventlog_ReadEventLogW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_eventlog_ReadEventLogW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -57,6 +157,26 @@ NTSTATUS rpccli_eventlog_ReadEventLogW(struct rpc_pipe_client *cli, uint8_t *data /* [out] [ref,size_is(number_of_bytes)] */, uint32_t *sent_size /* [out] [ref] */, uint32_t *real_size /* [out] [ref] */); +struct tevent_req *rpccli_eventlog_ReportEventW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + time_t _timestamp /* [in] */, + enum eventlogEventTypes _event_type /* [in] */, + uint16_t _event_category /* [in] */, + uint32_t _event_id /* [in] */, + uint16_t _num_of_strings /* [in] [range(0,256)] */, + uint32_t _data_size /* [in] [range(0,0x3FFFF)] */, + struct lsa_String *_servername /* [in] [ref] */, + struct dom_sid *_user_sid /* [in] [unique] */, + struct lsa_String **_strings /* [in] [unique,size_is(num_of_strings)] */, + uint8_t *_data /* [in] [unique,size_is(data_size)] */, + uint16_t _flags /* [in] */, + uint32_t *_record_number /* [in,out] [unique] */, + time_t *_time_written /* [in,out] [unique] */); +NTSTATUS rpccli_eventlog_ReportEventW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_eventlog_ReportEventW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -73,26 +193,97 @@ NTSTATUS rpccli_eventlog_ReportEventW(struct rpc_pipe_client *cli, uint16_t flags /* [in] */, uint32_t *record_number /* [in,out] [unique] */, time_t *time_written /* [in,out] [unique] */); +struct tevent_req *rpccli_eventlog_ClearEventLogA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_eventlog_ClearEventLogA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_eventlog_ClearEventLogA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_eventlog_BackupEventLogA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_eventlog_BackupEventLogA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_eventlog_BackupEventLogA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_eventlog_OpenEventLogA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_eventlog_OpenEventLogA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_eventlog_OpenEventLogA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_eventlog_RegisterEventSourceA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_eventlog_RegisterEventSourceA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_eventlog_RegisterEventSourceA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_eventlog_OpenBackupEventLogA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_eventlog_OpenBackupEventLogA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_eventlog_OpenBackupEventLogA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_eventlog_ReadEventLogA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_eventlog_ReadEventLogA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_eventlog_ReadEventLogA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_eventlog_ReportEventA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_eventlog_ReportEventA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_eventlog_ReportEventA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_eventlog_RegisterClusterSvc_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_eventlog_RegisterClusterSvc_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_eventlog_RegisterClusterSvc(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_eventlog_DeregisterClusterSvc_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_eventlog_DeregisterClusterSvc_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_eventlog_DeregisterClusterSvc(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_eventlog_WriteClusterEvents_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_eventlog_WriteClusterEvents_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_eventlog_WriteClusterEvents(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_eventlog_GetLogInformation_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _level /* [in] */, + uint8_t *_buffer /* [out] [ref,size_is(buf_size)] */, + uint32_t _buf_size /* [in] [range(0,1024)] */, + uint32_t *_bytes_needed /* [out] [ref] */); +NTSTATUS rpccli_eventlog_GetLogInformation_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_eventlog_GetLogInformation(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -100,9 +291,37 @@ NTSTATUS rpccli_eventlog_GetLogInformation(struct rpc_pipe_client *cli, uint8_t *buffer /* [out] [ref,size_is(buf_size)] */, uint32_t buf_size /* [in] [range(0,1024)] */, uint32_t *bytes_needed /* [out] [ref] */); +struct tevent_req *rpccli_eventlog_FlushEventLog_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */); +NTSTATUS rpccli_eventlog_FlushEventLog_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_eventlog_FlushEventLog(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */); +struct tevent_req *rpccli_eventlog_ReportEventAndSourceW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + time_t _timestamp /* [in] */, + enum eventlogEventTypes _event_type /* [in] */, + uint16_t _event_category /* [in] */, + uint32_t _event_id /* [in] */, + struct lsa_String *_sourcename /* [in] [ref] */, + uint16_t _num_of_strings /* [in] [range(0,256)] */, + uint32_t _data_size /* [in] [range(0,0x3FFFF)] */, + struct lsa_String *_servername /* [in] [ref] */, + struct dom_sid *_user_sid /* [in] [unique] */, + struct lsa_String **_strings /* [in] [unique,size_is(num_of_strings)] */, + uint8_t *_data /* [in] [unique,size_is(data_size)] */, + uint16_t _flags /* [in] */, + uint32_t *_record_number /* [in,out] [unique] */, + time_t *_time_written /* [in,out] [unique] */); +NTSTATUS rpccli_eventlog_ReportEventAndSourceW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_eventlog_ReportEventAndSourceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, diff --git a/librpc/gen_ndr/cli_initshutdown.c b/librpc/gen_ndr/cli_initshutdown.c index 3861e0c3e4..b3ed6bb1f3 100644 --- a/librpc/gen_ndr/cli_initshutdown.c +++ b/librpc/gen_ndr/cli_initshutdown.c @@ -6,6 +6,126 @@ #include "includes.h" #include "../librpc/gen_ndr/cli_initshutdown.h" +struct rpccli_initshutdown_Init_state { + struct initshutdown_Init orig; + struct initshutdown_Init tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_initshutdown_Init_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_initshutdown_Init_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_hostname /* [in] [unique] */, + struct lsa_StringLarge *_message /* [in] [unique] */, + uint32_t _timeout /* [in] */, + uint8_t _force_apps /* [in] */, + uint8_t _do_reboot /* [in] */) +{ + struct tevent_req *req; + struct rpccli_initshutdown_Init_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_initshutdown_Init_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.hostname = _hostname; + state->orig.in.message = _message; + state->orig.in.timeout = _timeout; + state->orig.in.force_apps = _force_apps; + state->orig.in.do_reboot = _do_reboot; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(initshutdown_Init, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_initshutdown, + NDR_INITSHUTDOWN_INIT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_initshutdown_Init_done, req); + return req; +} + +static void rpccli_initshutdown_Init_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_initshutdown_Init_state *state = tevent_req_data( + req, struct rpccli_initshutdown_Init_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(initshutdown_Init, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_initshutdown_Init_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_initshutdown_Init_state *state = tevent_req_data( + req, struct rpccli_initshutdown_Init_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_initshutdown_Init(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *hostname /* [in] [unique] */, @@ -57,6 +177,118 @@ NTSTATUS rpccli_initshutdown_Init(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_initshutdown_Abort_state { + struct initshutdown_Abort orig; + struct initshutdown_Abort tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_initshutdown_Abort_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_initshutdown_Abort_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_server /* [in] [unique] */) +{ + struct tevent_req *req; + struct rpccli_initshutdown_Abort_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_initshutdown_Abort_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server = _server; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(initshutdown_Abort, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_initshutdown, + NDR_INITSHUTDOWN_ABORT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_initshutdown_Abort_done, req); + return req; +} + +static void rpccli_initshutdown_Abort_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_initshutdown_Abort_state *state = tevent_req_data( + req, struct rpccli_initshutdown_Abort_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(initshutdown_Abort, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_initshutdown_Abort_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_initshutdown_Abort_state *state = tevent_req_data( + req, struct rpccli_initshutdown_Abort_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_initshutdown_Abort(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *server /* [in] [unique] */, @@ -100,6 +332,128 @@ NTSTATUS rpccli_initshutdown_Abort(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_initshutdown_InitEx_state { + struct initshutdown_InitEx orig; + struct initshutdown_InitEx tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_initshutdown_InitEx_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_initshutdown_InitEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_hostname /* [in] [unique] */, + struct lsa_StringLarge *_message /* [in] [unique] */, + uint32_t _timeout /* [in] */, + uint8_t _force_apps /* [in] */, + uint8_t _do_reboot /* [in] */, + uint32_t _reason /* [in] */) +{ + struct tevent_req *req; + struct rpccli_initshutdown_InitEx_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_initshutdown_InitEx_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.hostname = _hostname; + state->orig.in.message = _message; + state->orig.in.timeout = _timeout; + state->orig.in.force_apps = _force_apps; + state->orig.in.do_reboot = _do_reboot; + state->orig.in.reason = _reason; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(initshutdown_InitEx, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_initshutdown, + NDR_INITSHUTDOWN_INITEX, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_initshutdown_InitEx_done, req); + return req; +} + +static void rpccli_initshutdown_InitEx_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_initshutdown_InitEx_state *state = tevent_req_data( + req, struct rpccli_initshutdown_InitEx_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(initshutdown_InitEx, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_initshutdown_InitEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_initshutdown_InitEx_state *state = tevent_req_data( + req, struct rpccli_initshutdown_InitEx_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_initshutdown_InitEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *hostname /* [in] [unique] */, diff --git a/librpc/gen_ndr/cli_initshutdown.h b/librpc/gen_ndr/cli_initshutdown.h index 9a12c5e6fb..1162b8aa72 100644 --- a/librpc/gen_ndr/cli_initshutdown.h +++ b/librpc/gen_ndr/cli_initshutdown.h @@ -1,6 +1,17 @@ #include "../librpc/gen_ndr/ndr_initshutdown.h" #ifndef __CLI_INITSHUTDOWN__ #define __CLI_INITSHUTDOWN__ +struct tevent_req *rpccli_initshutdown_Init_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_hostname /* [in] [unique] */, + struct lsa_StringLarge *_message /* [in] [unique] */, + uint32_t _timeout /* [in] */, + uint8_t _force_apps /* [in] */, + uint8_t _do_reboot /* [in] */); +NTSTATUS rpccli_initshutdown_Init_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_initshutdown_Init(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *hostname /* [in] [unique] */, @@ -9,10 +20,29 @@ NTSTATUS rpccli_initshutdown_Init(struct rpc_pipe_client *cli, uint8_t force_apps /* [in] */, uint8_t do_reboot /* [in] */, WERROR *werror); +struct tevent_req *rpccli_initshutdown_Abort_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_server /* [in] [unique] */); +NTSTATUS rpccli_initshutdown_Abort_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_initshutdown_Abort(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *server /* [in] [unique] */, WERROR *werror); +struct tevent_req *rpccli_initshutdown_InitEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_hostname /* [in] [unique] */, + struct lsa_StringLarge *_message /* [in] [unique] */, + uint32_t _timeout /* [in] */, + uint8_t _force_apps /* [in] */, + uint8_t _do_reboot /* [in] */, + uint32_t _reason /* [in] */); +NTSTATUS rpccli_initshutdown_InitEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_initshutdown_InitEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *hostname /* [in] [unique] */, diff --git a/librpc/gen_ndr/cli_lsa.c b/librpc/gen_ndr/cli_lsa.c index 04cf38aaf3..bc51b71798 100644 --- a/librpc/gen_ndr/cli_lsa.c +++ b/librpc/gen_ndr/cli_lsa.c @@ -6,6 +6,126 @@ #include "includes.h" #include "../librpc/gen_ndr/cli_lsa.h" +struct rpccli_lsa_Close_state { + struct lsa_Close orig; + struct lsa_Close tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_Close_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_Close_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in,out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_Close_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_Close_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_Close, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_Close_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_lsarpc, + NDR_LSA_CLOSE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_Close_done, req); + return req; +} + +static void rpccli_lsa_Close_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_Close_state *state = tevent_req_data( + req, struct rpccli_lsa_Close_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_Close, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_Close_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_Close_state *state = tevent_req_data( + req, struct rpccli_lsa_Close_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_lsa_Close(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in,out] [ref] */) @@ -45,6 +165,118 @@ NTSTATUS rpccli_lsa_Close(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_Delete_state { + struct lsa_Delete orig; + struct lsa_Delete tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_Delete_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_Delete_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_Delete_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_Delete_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_Delete, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_DELETE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_Delete_done, req); + return req; +} + +static void rpccli_lsa_Delete_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_Delete_state *state = tevent_req_data( + req, struct rpccli_lsa_Delete_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_Delete, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_Delete_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_Delete_state *state = tevent_req_data( + req, struct rpccli_lsa_Delete_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_lsa_Delete(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */) @@ -83,6 +315,133 @@ NTSTATUS rpccli_lsa_Delete(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_EnumPrivs_state { + struct lsa_EnumPrivs orig; + struct lsa_EnumPrivs tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_EnumPrivs_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_EnumPrivs_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t *_resume_handle /* [in,out] [ref] */, + struct lsa_PrivArray *_privs /* [out] [ref] */, + uint32_t _max_count /* [in] */) +{ + struct tevent_req *req; + struct rpccli_lsa_EnumPrivs_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_EnumPrivs_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.resume_handle = _resume_handle; + state->orig.in.max_count = _max_count; + + /* Out parameters */ + state->orig.out.resume_handle = _resume_handle; + state->orig.out.privs = _privs; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_EnumPrivs, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_EnumPrivs_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_lsarpc, + NDR_LSA_ENUMPRIVS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_EnumPrivs_done, req); + return req; +} + +static void rpccli_lsa_EnumPrivs_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_EnumPrivs_state *state = tevent_req_data( + req, struct rpccli_lsa_EnumPrivs_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.resume_handle = *state->tmp.out.resume_handle; + *state->orig.out.privs = *state->tmp.out.privs; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_EnumPrivs, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_EnumPrivs_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_EnumPrivs_state *state = tevent_req_data( + req, struct rpccli_lsa_EnumPrivs_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_lsa_EnumPrivs(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -128,6 +487,129 @@ NTSTATUS rpccli_lsa_EnumPrivs(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_QuerySecurity_state { + struct lsa_QuerySecurity orig; + struct lsa_QuerySecurity tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_QuerySecurity_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_QuerySecurity_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _sec_info /* [in] */, + struct sec_desc_buf **_sdbuf /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_QuerySecurity_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_QuerySecurity_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.sec_info = _sec_info; + + /* Out parameters */ + state->orig.out.sdbuf = _sdbuf; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_QuerySecurity, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_QuerySecurity_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_lsarpc, + NDR_LSA_QUERYSECURITY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_QuerySecurity_done, req); + return req; +} + +static void rpccli_lsa_QuerySecurity_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_QuerySecurity_state *state = tevent_req_data( + req, struct rpccli_lsa_QuerySecurity_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.sdbuf = *state->tmp.out.sdbuf; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_QuerySecurity, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_QuerySecurity_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_QuerySecurity_state *state = tevent_req_data( + req, struct rpccli_lsa_QuerySecurity_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_lsa_QuerySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -170,6 +652,122 @@ NTSTATUS rpccli_lsa_QuerySecurity(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_SetSecObj_state { + struct lsa_SetSecObj orig; + struct lsa_SetSecObj tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_SetSecObj_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_SetSecObj_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _sec_info /* [in] */, + struct sec_desc_buf *_sdbuf /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_SetSecObj_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_SetSecObj_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.sec_info = _sec_info; + state->orig.in.sdbuf = _sdbuf; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_SetSecObj, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_SETSECOBJ, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_SetSecObj_done, req); + return req; +} + +static void rpccli_lsa_SetSecObj_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_SetSecObj_state *state = tevent_req_data( + req, struct rpccli_lsa_SetSecObj_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_SetSecObj, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_SetSecObj_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_SetSecObj_state *state = tevent_req_data( + req, struct rpccli_lsa_SetSecObj_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_lsa_SetSecObj(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -212,6 +810,116 @@ NTSTATUS rpccli_lsa_SetSecObj(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_ChangePassword_state { + struct lsa_ChangePassword orig; + struct lsa_ChangePassword tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_ChangePassword_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_ChangePassword_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_lsa_ChangePassword_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_ChangePassword_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_ChangePassword, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_CHANGEPASSWORD, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_ChangePassword_done, req); + return req; +} + +static void rpccli_lsa_ChangePassword_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_ChangePassword_state *state = tevent_req_data( + req, struct rpccli_lsa_ChangePassword_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_ChangePassword, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_ChangePassword_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_ChangePassword_state *state = tevent_req_data( + req, struct rpccli_lsa_ChangePassword_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_lsa_ChangePassword(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -248,6 +956,131 @@ NTSTATUS rpccli_lsa_ChangePassword(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_OpenPolicy_state { + struct lsa_OpenPolicy orig; + struct lsa_OpenPolicy tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_OpenPolicy_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_OpenPolicy_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_system_name /* [in] [unique] */, + struct lsa_ObjectAttribute *_attr /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_OpenPolicy_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_OpenPolicy_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.system_name = _system_name; + state->orig.in.attr = _attr; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_OpenPolicy, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_OpenPolicy_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_lsarpc, + NDR_LSA_OPENPOLICY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_OpenPolicy_done, req); + return req; +} + +static void rpccli_lsa_OpenPolicy_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_OpenPolicy_state *state = tevent_req_data( + req, struct rpccli_lsa_OpenPolicy_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_OpenPolicy, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_OpenPolicy_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_OpenPolicy_state *state = tevent_req_data( + req, struct rpccli_lsa_OpenPolicy_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_lsa_OpenPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name /* [in] [unique] */, @@ -292,6 +1125,129 @@ NTSTATUS rpccli_lsa_OpenPolicy(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_QueryInfoPolicy_state { + struct lsa_QueryInfoPolicy orig; + struct lsa_QueryInfoPolicy tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_QueryInfoPolicy_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_QueryInfoPolicy_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + enum lsa_PolicyInfo _level /* [in] */, + union lsa_PolicyInformation **_info /* [out] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_lsa_QueryInfoPolicy_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_QueryInfoPolicy_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.level = _level; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_QueryInfoPolicy, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_QueryInfoPolicy_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_lsarpc, + NDR_LSA_QUERYINFOPOLICY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_QueryInfoPolicy_done, req); + return req; +} + +static void rpccli_lsa_QueryInfoPolicy_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_QueryInfoPolicy_state *state = tevent_req_data( + req, struct rpccli_lsa_QueryInfoPolicy_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(lsa_QueryInfoPolicy, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_QueryInfoPolicy_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_QueryInfoPolicy_state *state = tevent_req_data( + req, struct rpccli_lsa_QueryInfoPolicy_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_lsa_QueryInfoPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -334,6 +1290,122 @@ NTSTATUS rpccli_lsa_QueryInfoPolicy(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_SetInfoPolicy_state { + struct lsa_SetInfoPolicy orig; + struct lsa_SetInfoPolicy tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_SetInfoPolicy_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_SetInfoPolicy_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + enum lsa_PolicyInfo _level /* [in] */, + union lsa_PolicyInformation *_info /* [in] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_lsa_SetInfoPolicy_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_SetInfoPolicy_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.level = _level; + state->orig.in.info = _info; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_SetInfoPolicy, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_SETINFOPOLICY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_SetInfoPolicy_done, req); + return req; +} + +static void rpccli_lsa_SetInfoPolicy_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_SetInfoPolicy_state *state = tevent_req_data( + req, struct rpccli_lsa_SetInfoPolicy_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_SetInfoPolicy, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_SetInfoPolicy_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_SetInfoPolicy_state *state = tevent_req_data( + req, struct rpccli_lsa_SetInfoPolicy_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_lsa_SetInfoPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -376,6 +1448,116 @@ NTSTATUS rpccli_lsa_SetInfoPolicy(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_ClearAuditLog_state { + struct lsa_ClearAuditLog orig; + struct lsa_ClearAuditLog tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_ClearAuditLog_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_ClearAuditLog_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_lsa_ClearAuditLog_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_ClearAuditLog_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_ClearAuditLog, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_CLEARAUDITLOG, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_ClearAuditLog_done, req); + return req; +} + +static void rpccli_lsa_ClearAuditLog_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_ClearAuditLog_state *state = tevent_req_data( + req, struct rpccli_lsa_ClearAuditLog_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_ClearAuditLog, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_ClearAuditLog_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_ClearAuditLog_state *state = tevent_req_data( + req, struct rpccli_lsa_ClearAuditLog_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_lsa_ClearAuditLog(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -412,6 +1594,131 @@ NTSTATUS rpccli_lsa_ClearAuditLog(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_CreateAccount_state { + struct lsa_CreateAccount orig; + struct lsa_CreateAccount tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_CreateAccount_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_CreateAccount_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct dom_sid2 *_sid /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_acct_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_CreateAccount_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_CreateAccount_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.sid = _sid; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.acct_handle = _acct_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_CreateAccount, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_CreateAccount_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_lsarpc, + NDR_LSA_CREATEACCOUNT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_CreateAccount_done, req); + return req; +} + +static void rpccli_lsa_CreateAccount_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_CreateAccount_state *state = tevent_req_data( + req, struct rpccli_lsa_CreateAccount_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.acct_handle = *state->tmp.out.acct_handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_CreateAccount, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_CreateAccount_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_CreateAccount_state *state = tevent_req_data( + req, struct rpccli_lsa_CreateAccount_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_lsa_CreateAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -456,6 +1763,133 @@ NTSTATUS rpccli_lsa_CreateAccount(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_EnumAccounts_state { + struct lsa_EnumAccounts orig; + struct lsa_EnumAccounts tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_EnumAccounts_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_EnumAccounts_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t *_resume_handle /* [in,out] [ref] */, + struct lsa_SidArray *_sids /* [out] [ref] */, + uint32_t _num_entries /* [in] [range(0,8192)] */) +{ + struct tevent_req *req; + struct rpccli_lsa_EnumAccounts_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_EnumAccounts_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.resume_handle = _resume_handle; + state->orig.in.num_entries = _num_entries; + + /* Out parameters */ + state->orig.out.resume_handle = _resume_handle; + state->orig.out.sids = _sids; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_EnumAccounts, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_EnumAccounts_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_lsarpc, + NDR_LSA_ENUMACCOUNTS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_EnumAccounts_done, req); + return req; +} + +static void rpccli_lsa_EnumAccounts_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_EnumAccounts_state *state = tevent_req_data( + req, struct rpccli_lsa_EnumAccounts_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.resume_handle = *state->tmp.out.resume_handle; + *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(lsa_EnumAccounts, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_EnumAccounts_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_EnumAccounts_state *state = tevent_req_data( + req, struct rpccli_lsa_EnumAccounts_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_lsa_EnumAccounts(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -501,6 +1935,131 @@ NTSTATUS rpccli_lsa_EnumAccounts(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_CreateTrustedDomain_state { + struct lsa_CreateTrustedDomain orig; + struct lsa_CreateTrustedDomain tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_CreateTrustedDomain_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_CreateTrustedDomain_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_policy_handle /* [in] [ref] */, + struct lsa_DomainInfo *_info /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_trustdom_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_CreateTrustedDomain_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_CreateTrustedDomain_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.policy_handle = _policy_handle; + state->orig.in.info = _info; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.trustdom_handle = _trustdom_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomain, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_CreateTrustedDomain_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_lsarpc, + NDR_LSA_CREATETRUSTEDDOMAIN, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_CreateTrustedDomain_done, req); + return req; +} + +static void rpccli_lsa_CreateTrustedDomain_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_CreateTrustedDomain_state *state = tevent_req_data( + req, struct rpccli_lsa_CreateTrustedDomain_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.trustdom_handle = *state->tmp.out.trustdom_handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomain, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_CreateTrustedDomain_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_CreateTrustedDomain_state *state = tevent_req_data( + req, struct rpccli_lsa_CreateTrustedDomain_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_lsa_CreateTrustedDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *policy_handle /* [in] [ref] */, @@ -545,6 +2104,133 @@ NTSTATUS rpccli_lsa_CreateTrustedDomain(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_EnumTrustDom_state { + struct lsa_EnumTrustDom orig; + struct lsa_EnumTrustDom tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_EnumTrustDom_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_EnumTrustDom_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t *_resume_handle /* [in,out] [ref] */, + struct lsa_DomainList *_domains /* [out] [ref] */, + uint32_t _max_size /* [in] */) +{ + struct tevent_req *req; + struct rpccli_lsa_EnumTrustDom_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_EnumTrustDom_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.resume_handle = _resume_handle; + state->orig.in.max_size = _max_size; + + /* Out parameters */ + state->orig.out.resume_handle = _resume_handle; + state->orig.out.domains = _domains; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_EnumTrustDom, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_EnumTrustDom_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_lsarpc, + NDR_LSA_ENUMTRUSTDOM, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_EnumTrustDom_done, req); + return req; +} + +static void rpccli_lsa_EnumTrustDom_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_EnumTrustDom_state *state = tevent_req_data( + req, struct rpccli_lsa_EnumTrustDom_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.resume_handle = *state->tmp.out.resume_handle; + *state->orig.out.domains = *state->tmp.out.domains; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_EnumTrustDom, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_EnumTrustDom_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_EnumTrustDom_state *state = tevent_req_data( + req, struct rpccli_lsa_EnumTrustDom_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_lsa_EnumTrustDom(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -590,6 +2276,141 @@ NTSTATUS rpccli_lsa_EnumTrustDom(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_LookupNames_state { + struct lsa_LookupNames orig; + struct lsa_LookupNames tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_LookupNames_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_LookupNames_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _num_names /* [in] [range(0,1000)] */, + struct lsa_String *_names /* [in] [size_is(num_names)] */, + struct lsa_RefDomainList **_domains /* [out] [ref] */, + struct lsa_TransSidArray *_sids /* [in,out] [ref] */, + enum lsa_LookupNamesLevel _level /* [in] */, + uint32_t *_count /* [in,out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_LookupNames_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_LookupNames_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.num_names = _num_names; + state->orig.in.names = _names; + state->orig.in.sids = _sids; + state->orig.in.level = _level; + state->orig.in.count = _count; + + /* Out parameters */ + state->orig.out.domains = _domains; + state->orig.out.sids = _sids; + state->orig.out.count = _count; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_LookupNames, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_LookupNames_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_lsarpc, + NDR_LSA_LOOKUPNAMES, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_LookupNames_done, req); + return req; +} + +static void rpccli_lsa_LookupNames_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_LookupNames_state *state = tevent_req_data( + req, struct rpccli_lsa_LookupNames_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.domains = *state->tmp.out.domains; + *state->orig.out.sids = *state->tmp.out.sids; + *state->orig.out.count = *state->tmp.out.count; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_LookupNames, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_LookupNames_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_LookupNames_state *state = tevent_req_data( + req, struct rpccli_lsa_LookupNames_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_lsa_LookupNames(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -642,6 +2463,139 @@ NTSTATUS rpccli_lsa_LookupNames(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_LookupSids_state { + struct lsa_LookupSids orig; + struct lsa_LookupSids tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_LookupSids_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_LookupSids_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_SidArray *_sids /* [in] [ref] */, + struct lsa_RefDomainList **_domains /* [out] [ref] */, + struct lsa_TransNameArray *_names /* [in,out] [ref] */, + uint16_t _level /* [in] */, + uint32_t *_count /* [in,out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_LookupSids_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_LookupSids_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.sids = _sids; + state->orig.in.names = _names; + state->orig.in.level = _level; + state->orig.in.count = _count; + + /* Out parameters */ + state->orig.out.domains = _domains; + state->orig.out.names = _names; + state->orig.out.count = _count; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_LookupSids, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_LookupSids_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_lsarpc, + NDR_LSA_LOOKUPSIDS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_LookupSids_done, req); + return req; +} + +static void rpccli_lsa_LookupSids_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_LookupSids_state *state = tevent_req_data( + req, struct rpccli_lsa_LookupSids_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.domains = *state->tmp.out.domains; + *state->orig.out.names = *state->tmp.out.names; + *state->orig.out.count = *state->tmp.out.count; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_LookupSids, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_LookupSids_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_LookupSids_state *state = tevent_req_data( + req, struct rpccli_lsa_LookupSids_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_lsa_LookupSids(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -692,6 +2646,131 @@ NTSTATUS rpccli_lsa_LookupSids(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_CreateSecret_state { + struct lsa_CreateSecret orig; + struct lsa_CreateSecret tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_CreateSecret_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_CreateSecret_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_String _name /* [in] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_sec_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_CreateSecret_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_CreateSecret_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.name = _name; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.sec_handle = _sec_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_CreateSecret, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_CreateSecret_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_lsarpc, + NDR_LSA_CREATESECRET, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_CreateSecret_done, req); + return req; +} + +static void rpccli_lsa_CreateSecret_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_CreateSecret_state *state = tevent_req_data( + req, struct rpccli_lsa_CreateSecret_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.sec_handle = *state->tmp.out.sec_handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_CreateSecret, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_CreateSecret_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_CreateSecret_state *state = tevent_req_data( + req, struct rpccli_lsa_CreateSecret_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_lsa_CreateSecret(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -736,6 +2815,131 @@ NTSTATUS rpccli_lsa_CreateSecret(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_OpenAccount_state { + struct lsa_OpenAccount orig; + struct lsa_OpenAccount tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_OpenAccount_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_OpenAccount_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct dom_sid2 *_sid /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_acct_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_OpenAccount_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_OpenAccount_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.sid = _sid; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.acct_handle = _acct_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_OpenAccount, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_OpenAccount_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_lsarpc, + NDR_LSA_OPENACCOUNT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_OpenAccount_done, req); + return req; +} + +static void rpccli_lsa_OpenAccount_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_OpenAccount_state *state = tevent_req_data( + req, struct rpccli_lsa_OpenAccount_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.acct_handle = *state->tmp.out.acct_handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_OpenAccount, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_OpenAccount_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_OpenAccount_state *state = tevent_req_data( + req, struct rpccli_lsa_OpenAccount_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_lsa_OpenAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -780,6 +2984,127 @@ NTSTATUS rpccli_lsa_OpenAccount(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_EnumPrivsAccount_state { + struct lsa_EnumPrivsAccount orig; + struct lsa_EnumPrivsAccount tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_EnumPrivsAccount_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_EnumPrivsAccount_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_PrivilegeSet **_privs /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_EnumPrivsAccount_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_EnumPrivsAccount_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + + /* Out parameters */ + state->orig.out.privs = _privs; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_EnumPrivsAccount, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_EnumPrivsAccount_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_lsarpc, + NDR_LSA_ENUMPRIVSACCOUNT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_EnumPrivsAccount_done, req); + return req; +} + +static void rpccli_lsa_EnumPrivsAccount_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_EnumPrivsAccount_state *state = tevent_req_data( + req, struct rpccli_lsa_EnumPrivsAccount_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.privs = *state->tmp.out.privs; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_EnumPrivsAccount, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_EnumPrivsAccount_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_EnumPrivsAccount_state *state = tevent_req_data( + req, struct rpccli_lsa_EnumPrivsAccount_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_lsa_EnumPrivsAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -820,6 +3145,120 @@ NTSTATUS rpccli_lsa_EnumPrivsAccount(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_AddPrivilegesToAccount_state { + struct lsa_AddPrivilegesToAccount orig; + struct lsa_AddPrivilegesToAccount tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_AddPrivilegesToAccount_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_AddPrivilegesToAccount_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_PrivilegeSet *_privs /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_AddPrivilegesToAccount_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_AddPrivilegesToAccount_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.privs = _privs; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_AddPrivilegesToAccount, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_ADDPRIVILEGESTOACCOUNT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_AddPrivilegesToAccount_done, req); + return req; +} + +static void rpccli_lsa_AddPrivilegesToAccount_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_AddPrivilegesToAccount_state *state = tevent_req_data( + req, struct rpccli_lsa_AddPrivilegesToAccount_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_AddPrivilegesToAccount, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_AddPrivilegesToAccount_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_AddPrivilegesToAccount_state *state = tevent_req_data( + req, struct rpccli_lsa_AddPrivilegesToAccount_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_lsa_AddPrivilegesToAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -860,6 +3299,122 @@ NTSTATUS rpccli_lsa_AddPrivilegesToAccount(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_RemovePrivilegesFromAccount_state { + struct lsa_RemovePrivilegesFromAccount orig; + struct lsa_RemovePrivilegesFromAccount tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_RemovePrivilegesFromAccount_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_RemovePrivilegesFromAccount_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint8_t _remove_all /* [in] */, + struct lsa_PrivilegeSet *_privs /* [in] [unique] */) +{ + struct tevent_req *req; + struct rpccli_lsa_RemovePrivilegesFromAccount_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_RemovePrivilegesFromAccount_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.remove_all = _remove_all; + state->orig.in.privs = _privs; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_RemovePrivilegesFromAccount, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_REMOVEPRIVILEGESFROMACCOUNT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_RemovePrivilegesFromAccount_done, req); + return req; +} + +static void rpccli_lsa_RemovePrivilegesFromAccount_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_RemovePrivilegesFromAccount_state *state = tevent_req_data( + req, struct rpccli_lsa_RemovePrivilegesFromAccount_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_RemovePrivilegesFromAccount, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_RemovePrivilegesFromAccount_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_RemovePrivilegesFromAccount_state *state = tevent_req_data( + req, struct rpccli_lsa_RemovePrivilegesFromAccount_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_lsa_RemovePrivilegesFromAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -902,6 +3457,116 @@ NTSTATUS rpccli_lsa_RemovePrivilegesFromAccount(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_GetQuotasForAccount_state { + struct lsa_GetQuotasForAccount orig; + struct lsa_GetQuotasForAccount tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_GetQuotasForAccount_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_GetQuotasForAccount_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_lsa_GetQuotasForAccount_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_GetQuotasForAccount_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_GetQuotasForAccount, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_GETQUOTASFORACCOUNT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_GetQuotasForAccount_done, req); + return req; +} + +static void rpccli_lsa_GetQuotasForAccount_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_GetQuotasForAccount_state *state = tevent_req_data( + req, struct rpccli_lsa_GetQuotasForAccount_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_GetQuotasForAccount, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_GetQuotasForAccount_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_GetQuotasForAccount_state *state = tevent_req_data( + req, struct rpccli_lsa_GetQuotasForAccount_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_lsa_GetQuotasForAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -938,6 +3603,116 @@ NTSTATUS rpccli_lsa_GetQuotasForAccount(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_SetQuotasForAccount_state { + struct lsa_SetQuotasForAccount orig; + struct lsa_SetQuotasForAccount tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_SetQuotasForAccount_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_SetQuotasForAccount_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_lsa_SetQuotasForAccount_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_SetQuotasForAccount_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_SetQuotasForAccount, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_SETQUOTASFORACCOUNT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_SetQuotasForAccount_done, req); + return req; +} + +static void rpccli_lsa_SetQuotasForAccount_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_SetQuotasForAccount_state *state = tevent_req_data( + req, struct rpccli_lsa_SetQuotasForAccount_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_SetQuotasForAccount, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_SetQuotasForAccount_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_SetQuotasForAccount_state *state = tevent_req_data( + req, struct rpccli_lsa_SetQuotasForAccount_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_lsa_SetQuotasForAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -974,6 +3749,127 @@ NTSTATUS rpccli_lsa_SetQuotasForAccount(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_GetSystemAccessAccount_state { + struct lsa_GetSystemAccessAccount orig; + struct lsa_GetSystemAccessAccount tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_GetSystemAccessAccount_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_GetSystemAccessAccount_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t *_access_mask /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_GetSystemAccessAccount_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_GetSystemAccessAccount_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + + /* Out parameters */ + state->orig.out.access_mask = _access_mask; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_GetSystemAccessAccount, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_GetSystemAccessAccount_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_lsarpc, + NDR_LSA_GETSYSTEMACCESSACCOUNT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_GetSystemAccessAccount_done, req); + return req; +} + +static void rpccli_lsa_GetSystemAccessAccount_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_GetSystemAccessAccount_state *state = tevent_req_data( + req, struct rpccli_lsa_GetSystemAccessAccount_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.access_mask = *state->tmp.out.access_mask; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_GetSystemAccessAccount, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_GetSystemAccessAccount_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_GetSystemAccessAccount_state *state = tevent_req_data( + req, struct rpccli_lsa_GetSystemAccessAccount_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_lsa_GetSystemAccessAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1014,6 +3910,120 @@ NTSTATUS rpccli_lsa_GetSystemAccessAccount(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_SetSystemAccessAccount_state { + struct lsa_SetSystemAccessAccount orig; + struct lsa_SetSystemAccessAccount tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_SetSystemAccessAccount_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_SetSystemAccessAccount_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _access_mask /* [in] */) +{ + struct tevent_req *req; + struct rpccli_lsa_SetSystemAccessAccount_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_SetSystemAccessAccount_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_SetSystemAccessAccount, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_SETSYSTEMACCESSACCOUNT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_SetSystemAccessAccount_done, req); + return req; +} + +static void rpccli_lsa_SetSystemAccessAccount_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_SetSystemAccessAccount_state *state = tevent_req_data( + req, struct rpccli_lsa_SetSystemAccessAccount_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_SetSystemAccessAccount, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_SetSystemAccessAccount_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_SetSystemAccessAccount_state *state = tevent_req_data( + req, struct rpccli_lsa_SetSystemAccessAccount_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_lsa_SetSystemAccessAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1054,6 +4064,131 @@ NTSTATUS rpccli_lsa_SetSystemAccessAccount(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_OpenTrustedDomain_state { + struct lsa_OpenTrustedDomain orig; + struct lsa_OpenTrustedDomain tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_OpenTrustedDomain_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_OpenTrustedDomain_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct dom_sid2 *_sid /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_trustdom_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_OpenTrustedDomain_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_OpenTrustedDomain_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.sid = _sid; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.trustdom_handle = _trustdom_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_OpenTrustedDomain, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_OpenTrustedDomain_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_lsarpc, + NDR_LSA_OPENTRUSTEDDOMAIN, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_OpenTrustedDomain_done, req); + return req; +} + +static void rpccli_lsa_OpenTrustedDomain_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_OpenTrustedDomain_state *state = tevent_req_data( + req, struct rpccli_lsa_OpenTrustedDomain_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.trustdom_handle = *state->tmp.out.trustdom_handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_OpenTrustedDomain, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_OpenTrustedDomain_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_OpenTrustedDomain_state *state = tevent_req_data( + req, struct rpccli_lsa_OpenTrustedDomain_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_lsa_OpenTrustedDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1098,6 +4233,129 @@ NTSTATUS rpccli_lsa_OpenTrustedDomain(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_QueryTrustedDomainInfo_state { + struct lsa_QueryTrustedDomainInfo orig; + struct lsa_QueryTrustedDomainInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_QueryTrustedDomainInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_QueryTrustedDomainInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_trustdom_handle /* [in] [ref] */, + enum lsa_TrustDomInfoEnum _level /* [in] */, + union lsa_TrustedDomainInfo **_info /* [out] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_lsa_QueryTrustedDomainInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_QueryTrustedDomainInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.trustdom_handle = _trustdom_handle; + state->orig.in.level = _level; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_QueryTrustedDomainInfo, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_QueryTrustedDomainInfo_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_lsarpc, + NDR_LSA_QUERYTRUSTEDDOMAININFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_QueryTrustedDomainInfo_done, req); + return req; +} + +static void rpccli_lsa_QueryTrustedDomainInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_QueryTrustedDomainInfo_state *state = tevent_req_data( + req, struct rpccli_lsa_QueryTrustedDomainInfo_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(lsa_QueryTrustedDomainInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_QueryTrustedDomainInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_QueryTrustedDomainInfo_state *state = tevent_req_data( + req, struct rpccli_lsa_QueryTrustedDomainInfo_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_lsa_QueryTrustedDomainInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *trustdom_handle /* [in] [ref] */, @@ -1140,6 +4398,122 @@ NTSTATUS rpccli_lsa_QueryTrustedDomainInfo(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_SetInformationTrustedDomain_state { + struct lsa_SetInformationTrustedDomain orig; + struct lsa_SetInformationTrustedDomain tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_SetInformationTrustedDomain_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_SetInformationTrustedDomain_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_trustdom_handle /* [in] [ref] */, + enum lsa_TrustDomInfoEnum _level /* [in] */, + union lsa_TrustedDomainInfo *_info /* [in] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_lsa_SetInformationTrustedDomain_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_SetInformationTrustedDomain_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.trustdom_handle = _trustdom_handle; + state->orig.in.level = _level; + state->orig.in.info = _info; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_SetInformationTrustedDomain, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_SETINFORMATIONTRUSTEDDOMAIN, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_SetInformationTrustedDomain_done, req); + return req; +} + +static void rpccli_lsa_SetInformationTrustedDomain_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_SetInformationTrustedDomain_state *state = tevent_req_data( + req, struct rpccli_lsa_SetInformationTrustedDomain_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_SetInformationTrustedDomain, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_SetInformationTrustedDomain_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_SetInformationTrustedDomain_state *state = tevent_req_data( + req, struct rpccli_lsa_SetInformationTrustedDomain_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_lsa_SetInformationTrustedDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *trustdom_handle /* [in] [ref] */, @@ -1182,6 +4556,131 @@ NTSTATUS rpccli_lsa_SetInformationTrustedDomain(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_OpenSecret_state { + struct lsa_OpenSecret orig; + struct lsa_OpenSecret tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_OpenSecret_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_OpenSecret_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_String _name /* [in] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_sec_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_OpenSecret_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_OpenSecret_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.name = _name; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.sec_handle = _sec_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_OpenSecret, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_OpenSecret_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_lsarpc, + NDR_LSA_OPENSECRET, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_OpenSecret_done, req); + return req; +} + +static void rpccli_lsa_OpenSecret_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_OpenSecret_state *state = tevent_req_data( + req, struct rpccli_lsa_OpenSecret_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.sec_handle = *state->tmp.out.sec_handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_OpenSecret, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_OpenSecret_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_OpenSecret_state *state = tevent_req_data( + req, struct rpccli_lsa_OpenSecret_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_lsa_OpenSecret(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1226,6 +4725,122 @@ NTSTATUS rpccli_lsa_OpenSecret(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_SetSecret_state { + struct lsa_SetSecret orig; + struct lsa_SetSecret tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_SetSecret_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_SetSecret_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_sec_handle /* [in] [ref] */, + struct lsa_DATA_BUF *_new_val /* [in] [unique] */, + struct lsa_DATA_BUF *_old_val /* [in] [unique] */) +{ + struct tevent_req *req; + struct rpccli_lsa_SetSecret_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_SetSecret_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.sec_handle = _sec_handle; + state->orig.in.new_val = _new_val; + state->orig.in.old_val = _old_val; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_SetSecret, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_SETSECRET, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_SetSecret_done, req); + return req; +} + +static void rpccli_lsa_SetSecret_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_SetSecret_state *state = tevent_req_data( + req, struct rpccli_lsa_SetSecret_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_SetSecret, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_SetSecret_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_SetSecret_state *state = tevent_req_data( + req, struct rpccli_lsa_SetSecret_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_lsa_SetSecret(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *sec_handle /* [in] [ref] */, @@ -1268,6 +4883,148 @@ NTSTATUS rpccli_lsa_SetSecret(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_QuerySecret_state { + struct lsa_QuerySecret orig; + struct lsa_QuerySecret tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_QuerySecret_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_QuerySecret_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_sec_handle /* [in] [ref] */, + struct lsa_DATA_BUF_PTR *_new_val /* [in,out] [unique] */, + NTTIME *_new_mtime /* [in,out] [unique] */, + struct lsa_DATA_BUF_PTR *_old_val /* [in,out] [unique] */, + NTTIME *_old_mtime /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_lsa_QuerySecret_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_QuerySecret_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.sec_handle = _sec_handle; + state->orig.in.new_val = _new_val; + state->orig.in.new_mtime = _new_mtime; + state->orig.in.old_val = _old_val; + state->orig.in.old_mtime = _old_mtime; + + /* Out parameters */ + state->orig.out.new_val = _new_val; + state->orig.out.new_mtime = _new_mtime; + state->orig.out.old_val = _old_val; + state->orig.out.old_mtime = _old_mtime; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_QuerySecret, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_QuerySecret_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_lsarpc, + NDR_LSA_QUERYSECRET, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_QuerySecret_done, req); + return req; +} + +static void rpccli_lsa_QuerySecret_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_QuerySecret_state *state = tevent_req_data( + req, struct rpccli_lsa_QuerySecret_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 */ + if (state->orig.out.new_val && state->tmp.out.new_val) { + *state->orig.out.new_val = *state->tmp.out.new_val; + } + if (state->orig.out.new_mtime && state->tmp.out.new_mtime) { + *state->orig.out.new_mtime = *state->tmp.out.new_mtime; + } + if (state->orig.out.old_val && state->tmp.out.old_val) { + *state->orig.out.old_val = *state->tmp.out.old_val; + } + if (state->orig.out.old_mtime && state->tmp.out.old_mtime) { + *state->orig.out.old_mtime = *state->tmp.out.old_mtime; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_QuerySecret, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_QuerySecret_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_QuerySecret_state *state = tevent_req_data( + req, struct rpccli_lsa_QuerySecret_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_lsa_QuerySecret(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *sec_handle /* [in] [ref] */, @@ -1326,6 +5083,129 @@ NTSTATUS rpccli_lsa_QuerySecret(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_LookupPrivValue_state { + struct lsa_LookupPrivValue orig; + struct lsa_LookupPrivValue tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_LookupPrivValue_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_LookupPrivValue_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_String *_name /* [in] [ref] */, + struct lsa_LUID *_luid /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_LookupPrivValue_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_LookupPrivValue_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.name = _name; + + /* Out parameters */ + state->orig.out.luid = _luid; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_LookupPrivValue, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_LookupPrivValue_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_lsarpc, + NDR_LSA_LOOKUPPRIVVALUE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_LookupPrivValue_done, req); + return req; +} + +static void rpccli_lsa_LookupPrivValue_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_LookupPrivValue_state *state = tevent_req_data( + req, struct rpccli_lsa_LookupPrivValue_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.luid = *state->tmp.out.luid; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_LookupPrivValue, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_LookupPrivValue_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_LookupPrivValue_state *state = tevent_req_data( + req, struct rpccli_lsa_LookupPrivValue_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_lsa_LookupPrivValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1368,6 +5248,129 @@ NTSTATUS rpccli_lsa_LookupPrivValue(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_LookupPrivName_state { + struct lsa_LookupPrivName orig; + struct lsa_LookupPrivName tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_LookupPrivName_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_LookupPrivName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_LUID *_luid /* [in] [ref] */, + struct lsa_StringLarge **_name /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_LookupPrivName_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_LookupPrivName_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.luid = _luid; + + /* Out parameters */ + state->orig.out.name = _name; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_LookupPrivName, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_LookupPrivName_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_lsarpc, + NDR_LSA_LOOKUPPRIVNAME, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_LookupPrivName_done, req); + return req; +} + +static void rpccli_lsa_LookupPrivName_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_LookupPrivName_state *state = tevent_req_data( + req, struct rpccli_lsa_LookupPrivName_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.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(lsa_LookupPrivName, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_LookupPrivName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_LookupPrivName_state *state = tevent_req_data( + req, struct rpccli_lsa_LookupPrivName_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_lsa_LookupPrivName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1410,6 +5413,136 @@ NTSTATUS rpccli_lsa_LookupPrivName(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_LookupPrivDisplayName_state { + struct lsa_LookupPrivDisplayName orig; + struct lsa_LookupPrivDisplayName tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_LookupPrivDisplayName_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_LookupPrivDisplayName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_String *_name /* [in] [ref] */, + uint16_t _language_id /* [in] */, + uint16_t _language_id_sys /* [in] */, + struct lsa_StringLarge **_disp_name /* [out] [ref] */, + uint16_t *_returned_language_id /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_LookupPrivDisplayName_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_LookupPrivDisplayName_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.name = _name; + state->orig.in.language_id = _language_id; + state->orig.in.language_id_sys = _language_id_sys; + + /* Out parameters */ + state->orig.out.disp_name = _disp_name; + state->orig.out.returned_language_id = _returned_language_id; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_LookupPrivDisplayName, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_LookupPrivDisplayName_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_lsarpc, + NDR_LSA_LOOKUPPRIVDISPLAYNAME, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_LookupPrivDisplayName_done, req); + return req; +} + +static void rpccli_lsa_LookupPrivDisplayName_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_LookupPrivDisplayName_state *state = tevent_req_data( + req, struct rpccli_lsa_LookupPrivDisplayName_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.disp_name = *state->tmp.out.disp_name; + *state->orig.out.returned_language_id = *state->tmp.out.returned_language_id; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_LookupPrivDisplayName, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_LookupPrivDisplayName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_LookupPrivDisplayName_state *state = tevent_req_data( + req, struct rpccli_lsa_LookupPrivDisplayName_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_lsa_LookupPrivDisplayName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1458,6 +5591,126 @@ NTSTATUS rpccli_lsa_LookupPrivDisplayName(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_DeleteObject_state { + struct lsa_DeleteObject orig; + struct lsa_DeleteObject tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_DeleteObject_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_DeleteObject_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in,out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_DeleteObject_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_DeleteObject_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_DeleteObject, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_DeleteObject_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_lsarpc, + NDR_LSA_DELETEOBJECT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_DeleteObject_done, req); + return req; +} + +static void rpccli_lsa_DeleteObject_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_DeleteObject_state *state = tevent_req_data( + req, struct rpccli_lsa_DeleteObject_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_DeleteObject, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_DeleteObject_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_DeleteObject_state *state = tevent_req_data( + req, struct rpccli_lsa_DeleteObject_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_lsa_DeleteObject(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in,out] [ref] */) @@ -1497,6 +5750,129 @@ NTSTATUS rpccli_lsa_DeleteObject(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_EnumAccountsWithUserRight_state { + struct lsa_EnumAccountsWithUserRight orig; + struct lsa_EnumAccountsWithUserRight tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_EnumAccountsWithUserRight_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_EnumAccountsWithUserRight_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_String *_name /* [in] [unique] */, + struct lsa_SidArray *_sids /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_EnumAccountsWithUserRight_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_EnumAccountsWithUserRight_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.name = _name; + + /* Out parameters */ + state->orig.out.sids = _sids; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_EnumAccountsWithUserRight, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_EnumAccountsWithUserRight_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_lsarpc, + NDR_LSA_ENUMACCOUNTSWITHUSERRIGHT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_EnumAccountsWithUserRight_done, req); + return req; +} + +static void rpccli_lsa_EnumAccountsWithUserRight_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_EnumAccountsWithUserRight_state *state = tevent_req_data( + req, struct rpccli_lsa_EnumAccountsWithUserRight_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(lsa_EnumAccountsWithUserRight, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_EnumAccountsWithUserRight_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_EnumAccountsWithUserRight_state *state = tevent_req_data( + req, struct rpccli_lsa_EnumAccountsWithUserRight_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_lsa_EnumAccountsWithUserRight(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1539,6 +5915,129 @@ NTSTATUS rpccli_lsa_EnumAccountsWithUserRight(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_EnumAccountRights_state { + struct lsa_EnumAccountRights orig; + struct lsa_EnumAccountRights tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_EnumAccountRights_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_EnumAccountRights_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct dom_sid2 *_sid /* [in] [ref] */, + struct lsa_RightSet *_rights /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_EnumAccountRights_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_EnumAccountRights_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.sid = _sid; + + /* Out parameters */ + state->orig.out.rights = _rights; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_EnumAccountRights, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_EnumAccountRights_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_lsarpc, + NDR_LSA_ENUMACCOUNTRIGHTS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_EnumAccountRights_done, req); + return req; +} + +static void rpccli_lsa_EnumAccountRights_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_EnumAccountRights_state *state = tevent_req_data( + req, struct rpccli_lsa_EnumAccountRights_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.rights = *state->tmp.out.rights; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_EnumAccountRights, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_EnumAccountRights_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_EnumAccountRights_state *state = tevent_req_data( + req, struct rpccli_lsa_EnumAccountRights_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_lsa_EnumAccountRights(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1581,6 +6080,122 @@ NTSTATUS rpccli_lsa_EnumAccountRights(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_AddAccountRights_state { + struct lsa_AddAccountRights orig; + struct lsa_AddAccountRights tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_AddAccountRights_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_AddAccountRights_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct dom_sid2 *_sid /* [in] [ref] */, + struct lsa_RightSet *_rights /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_AddAccountRights_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_AddAccountRights_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.sid = _sid; + state->orig.in.rights = _rights; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_AddAccountRights, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_ADDACCOUNTRIGHTS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_AddAccountRights_done, req); + return req; +} + +static void rpccli_lsa_AddAccountRights_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_AddAccountRights_state *state = tevent_req_data( + req, struct rpccli_lsa_AddAccountRights_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_AddAccountRights, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_AddAccountRights_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_AddAccountRights_state *state = tevent_req_data( + req, struct rpccli_lsa_AddAccountRights_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_lsa_AddAccountRights(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1623,6 +6238,124 @@ NTSTATUS rpccli_lsa_AddAccountRights(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_RemoveAccountRights_state { + struct lsa_RemoveAccountRights orig; + struct lsa_RemoveAccountRights tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_RemoveAccountRights_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_RemoveAccountRights_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct dom_sid2 *_sid /* [in] [ref] */, + uint8_t _remove_all /* [in] */, + struct lsa_RightSet *_rights /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_RemoveAccountRights_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_RemoveAccountRights_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.sid = _sid; + state->orig.in.remove_all = _remove_all; + state->orig.in.rights = _rights; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_RemoveAccountRights, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_REMOVEACCOUNTRIGHTS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_RemoveAccountRights_done, req); + return req; +} + +static void rpccli_lsa_RemoveAccountRights_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_RemoveAccountRights_state *state = tevent_req_data( + req, struct rpccli_lsa_RemoveAccountRights_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_RemoveAccountRights, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_RemoveAccountRights_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_RemoveAccountRights_state *state = tevent_req_data( + req, struct rpccli_lsa_RemoveAccountRights_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_lsa_RemoveAccountRights(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1667,6 +6400,131 @@ NTSTATUS rpccli_lsa_RemoveAccountRights(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_QueryTrustedDomainInfoBySid_state { + struct lsa_QueryTrustedDomainInfoBySid orig; + struct lsa_QueryTrustedDomainInfoBySid tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_QueryTrustedDomainInfoBySid_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_QueryTrustedDomainInfoBySid_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct dom_sid2 *_dom_sid /* [in] [ref] */, + enum lsa_TrustDomInfoEnum _level /* [in] */, + union lsa_TrustedDomainInfo **_info /* [out] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_lsa_QueryTrustedDomainInfoBySid_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_QueryTrustedDomainInfoBySid_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.dom_sid = _dom_sid; + state->orig.in.level = _level; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_QueryTrustedDomainInfoBySid, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_QueryTrustedDomainInfoBySid_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_lsarpc, + NDR_LSA_QUERYTRUSTEDDOMAININFOBYSID, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_QueryTrustedDomainInfoBySid_done, req); + return req; +} + +static void rpccli_lsa_QueryTrustedDomainInfoBySid_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_QueryTrustedDomainInfoBySid_state *state = tevent_req_data( + req, struct rpccli_lsa_QueryTrustedDomainInfoBySid_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(lsa_QueryTrustedDomainInfoBySid, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_QueryTrustedDomainInfoBySid_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_QueryTrustedDomainInfoBySid_state *state = tevent_req_data( + req, struct rpccli_lsa_QueryTrustedDomainInfoBySid_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_lsa_QueryTrustedDomainInfoBySid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1711,6 +6569,124 @@ NTSTATUS rpccli_lsa_QueryTrustedDomainInfoBySid(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_SetTrustedDomainInfo_state { + struct lsa_SetTrustedDomainInfo orig; + struct lsa_SetTrustedDomainInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_SetTrustedDomainInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_SetTrustedDomainInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct dom_sid2 *_dom_sid /* [in] [ref] */, + enum lsa_TrustDomInfoEnum _level /* [in] */, + union lsa_TrustedDomainInfo *_info /* [in] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_lsa_SetTrustedDomainInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_SetTrustedDomainInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.dom_sid = _dom_sid; + state->orig.in.level = _level; + state->orig.in.info = _info; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_SetTrustedDomainInfo, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_SETTRUSTEDDOMAININFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_SetTrustedDomainInfo_done, req); + return req; +} + +static void rpccli_lsa_SetTrustedDomainInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_SetTrustedDomainInfo_state *state = tevent_req_data( + req, struct rpccli_lsa_SetTrustedDomainInfo_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_SetTrustedDomainInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_SetTrustedDomainInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_SetTrustedDomainInfo_state *state = tevent_req_data( + req, struct rpccli_lsa_SetTrustedDomainInfo_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_lsa_SetTrustedDomainInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1755,6 +6731,120 @@ NTSTATUS rpccli_lsa_SetTrustedDomainInfo(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_DeleteTrustedDomain_state { + struct lsa_DeleteTrustedDomain orig; + struct lsa_DeleteTrustedDomain tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_DeleteTrustedDomain_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_DeleteTrustedDomain_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct dom_sid2 *_dom_sid /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_DeleteTrustedDomain_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_DeleteTrustedDomain_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.dom_sid = _dom_sid; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_DeleteTrustedDomain, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_DELETETRUSTEDDOMAIN, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_DeleteTrustedDomain_done, req); + return req; +} + +static void rpccli_lsa_DeleteTrustedDomain_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_DeleteTrustedDomain_state *state = tevent_req_data( + req, struct rpccli_lsa_DeleteTrustedDomain_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_DeleteTrustedDomain, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_DeleteTrustedDomain_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_DeleteTrustedDomain_state *state = tevent_req_data( + req, struct rpccli_lsa_DeleteTrustedDomain_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_lsa_DeleteTrustedDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1795,6 +6885,122 @@ NTSTATUS rpccli_lsa_DeleteTrustedDomain(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_StorePrivateData_state { + struct lsa_StorePrivateData orig; + struct lsa_StorePrivateData tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_StorePrivateData_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_StorePrivateData_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_String *_name /* [in] [ref] */, + struct lsa_DATA_BUF *_val /* [in] [unique] */) +{ + struct tevent_req *req; + struct rpccli_lsa_StorePrivateData_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_StorePrivateData_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.name = _name; + state->orig.in.val = _val; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_StorePrivateData, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_STOREPRIVATEDATA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_StorePrivateData_done, req); + return req; +} + +static void rpccli_lsa_StorePrivateData_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_StorePrivateData_state *state = tevent_req_data( + req, struct rpccli_lsa_StorePrivateData_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_StorePrivateData, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_StorePrivateData_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_StorePrivateData_state *state = tevent_req_data( + req, struct rpccli_lsa_StorePrivateData_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_lsa_StorePrivateData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1837,6 +7043,130 @@ NTSTATUS rpccli_lsa_StorePrivateData(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_RetrievePrivateData_state { + struct lsa_RetrievePrivateData orig; + struct lsa_RetrievePrivateData tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_RetrievePrivateData_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_RetrievePrivateData_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_String *_name /* [in] [ref] */, + struct lsa_DATA_BUF **_val /* [in,out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_RetrievePrivateData_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_RetrievePrivateData_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.name = _name; + state->orig.in.val = _val; + + /* Out parameters */ + state->orig.out.val = _val; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_RetrievePrivateData, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_RetrievePrivateData_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_lsarpc, + NDR_LSA_RETRIEVEPRIVATEDATA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_RetrievePrivateData_done, req); + return req; +} + +static void rpccli_lsa_RetrievePrivateData_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_RetrievePrivateData_state *state = tevent_req_data( + req, struct rpccli_lsa_RetrievePrivateData_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.val = *state->tmp.out.val; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_RetrievePrivateData, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_RetrievePrivateData_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_RetrievePrivateData_state *state = tevent_req_data( + req, struct rpccli_lsa_RetrievePrivateData_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_lsa_RetrievePrivateData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1880,6 +7210,131 @@ NTSTATUS rpccli_lsa_RetrievePrivateData(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_OpenPolicy2_state { + struct lsa_OpenPolicy2 orig; + struct lsa_OpenPolicy2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_OpenPolicy2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_OpenPolicy2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_system_name /* [in] [unique,charset(UTF16)] */, + struct lsa_ObjectAttribute *_attr /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_OpenPolicy2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_OpenPolicy2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.system_name = _system_name; + state->orig.in.attr = _attr; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_OpenPolicy2, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_OpenPolicy2_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_lsarpc, + NDR_LSA_OPENPOLICY2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_OpenPolicy2_done, req); + return req; +} + +static void rpccli_lsa_OpenPolicy2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_OpenPolicy2_state *state = tevent_req_data( + req, struct rpccli_lsa_OpenPolicy2_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_OpenPolicy2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_OpenPolicy2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_OpenPolicy2_state *state = tevent_req_data( + req, struct rpccli_lsa_OpenPolicy2_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_lsa_OpenPolicy2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *system_name /* [in] [unique,charset(UTF16)] */, @@ -1924,6 +7379,134 @@ NTSTATUS rpccli_lsa_OpenPolicy2(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_GetUserName_state { + struct lsa_GetUserName orig; + struct lsa_GetUserName tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_GetUserName_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_GetUserName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_system_name /* [in] [unique,charset(UTF16)] */, + struct lsa_String **_account_name /* [in,out] [ref] */, + struct lsa_String **_authority_name /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_lsa_GetUserName_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_GetUserName_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.system_name = _system_name; + state->orig.in.account_name = _account_name; + state->orig.in.authority_name = _authority_name; + + /* Out parameters */ + state->orig.out.account_name = _account_name; + state->orig.out.authority_name = _authority_name; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_GetUserName, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_GetUserName_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_lsarpc, + NDR_LSA_GETUSERNAME, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_GetUserName_done, req); + return req; +} + +static void rpccli_lsa_GetUserName_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_GetUserName_state *state = tevent_req_data( + req, struct rpccli_lsa_GetUserName_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.account_name = *state->tmp.out.account_name; + if (state->orig.out.authority_name && state->tmp.out.authority_name) { + *state->orig.out.authority_name = *state->tmp.out.authority_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(lsa_GetUserName, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_GetUserName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_GetUserName_state *state = tevent_req_data( + req, struct rpccli_lsa_GetUserName_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_lsa_GetUserName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *system_name /* [in] [unique,charset(UTF16)] */, @@ -1970,6 +7553,129 @@ NTSTATUS rpccli_lsa_GetUserName(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_QueryInfoPolicy2_state { + struct lsa_QueryInfoPolicy2 orig; + struct lsa_QueryInfoPolicy2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_QueryInfoPolicy2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_QueryInfoPolicy2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + enum lsa_PolicyInfo _level /* [in] */, + union lsa_PolicyInformation **_info /* [out] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_lsa_QueryInfoPolicy2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_QueryInfoPolicy2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.level = _level; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_QueryInfoPolicy2, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_QueryInfoPolicy2_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_lsarpc, + NDR_LSA_QUERYINFOPOLICY2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_QueryInfoPolicy2_done, req); + return req; +} + +static void rpccli_lsa_QueryInfoPolicy2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_QueryInfoPolicy2_state *state = tevent_req_data( + req, struct rpccli_lsa_QueryInfoPolicy2_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(lsa_QueryInfoPolicy2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_QueryInfoPolicy2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_QueryInfoPolicy2_state *state = tevent_req_data( + req, struct rpccli_lsa_QueryInfoPolicy2_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_lsa_QueryInfoPolicy2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -2012,6 +7718,122 @@ NTSTATUS rpccli_lsa_QueryInfoPolicy2(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_SetInfoPolicy2_state { + struct lsa_SetInfoPolicy2 orig; + struct lsa_SetInfoPolicy2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_SetInfoPolicy2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_SetInfoPolicy2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + enum lsa_PolicyInfo _level /* [in] */, + union lsa_PolicyInformation *_info /* [in] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_lsa_SetInfoPolicy2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_SetInfoPolicy2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.level = _level; + state->orig.in.info = _info; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_SetInfoPolicy2, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_SETINFOPOLICY2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_SetInfoPolicy2_done, req); + return req; +} + +static void rpccli_lsa_SetInfoPolicy2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_SetInfoPolicy2_state *state = tevent_req_data( + req, struct rpccli_lsa_SetInfoPolicy2_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_SetInfoPolicy2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_SetInfoPolicy2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_SetInfoPolicy2_state *state = tevent_req_data( + req, struct rpccli_lsa_SetInfoPolicy2_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_lsa_SetInfoPolicy2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -2054,6 +7876,131 @@ NTSTATUS rpccli_lsa_SetInfoPolicy2(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_QueryTrustedDomainInfoByName_state { + struct lsa_QueryTrustedDomainInfoByName orig; + struct lsa_QueryTrustedDomainInfoByName tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_QueryTrustedDomainInfoByName_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_QueryTrustedDomainInfoByName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_String *_trusted_domain /* [in] [ref] */, + enum lsa_TrustDomInfoEnum _level /* [in] */, + union lsa_TrustedDomainInfo **_info /* [out] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_lsa_QueryTrustedDomainInfoByName_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_QueryTrustedDomainInfoByName_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.trusted_domain = _trusted_domain; + state->orig.in.level = _level; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_QueryTrustedDomainInfoByName, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_QueryTrustedDomainInfoByName_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_lsarpc, + NDR_LSA_QUERYTRUSTEDDOMAININFOBYNAME, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_QueryTrustedDomainInfoByName_done, req); + return req; +} + +static void rpccli_lsa_QueryTrustedDomainInfoByName_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_QueryTrustedDomainInfoByName_state *state = tevent_req_data( + req, struct rpccli_lsa_QueryTrustedDomainInfoByName_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(lsa_QueryTrustedDomainInfoByName, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_QueryTrustedDomainInfoByName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_QueryTrustedDomainInfoByName_state *state = tevent_req_data( + req, struct rpccli_lsa_QueryTrustedDomainInfoByName_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_lsa_QueryTrustedDomainInfoByName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -2098,6 +8045,124 @@ NTSTATUS rpccli_lsa_QueryTrustedDomainInfoByName(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_SetTrustedDomainInfoByName_state { + struct lsa_SetTrustedDomainInfoByName orig; + struct lsa_SetTrustedDomainInfoByName tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_SetTrustedDomainInfoByName_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_SetTrustedDomainInfoByName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_String _trusted_domain /* [in] */, + enum lsa_TrustDomInfoEnum _level /* [in] */, + union lsa_TrustedDomainInfo *_info /* [in] [unique,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_lsa_SetTrustedDomainInfoByName_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_SetTrustedDomainInfoByName_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.trusted_domain = _trusted_domain; + state->orig.in.level = _level; + state->orig.in.info = _info; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_SetTrustedDomainInfoByName, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_SETTRUSTEDDOMAININFOBYNAME, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_SetTrustedDomainInfoByName_done, req); + return req; +} + +static void rpccli_lsa_SetTrustedDomainInfoByName_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_SetTrustedDomainInfoByName_state *state = tevent_req_data( + req, struct rpccli_lsa_SetTrustedDomainInfoByName_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_SetTrustedDomainInfoByName, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_SetTrustedDomainInfoByName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_SetTrustedDomainInfoByName_state *state = tevent_req_data( + req, struct rpccli_lsa_SetTrustedDomainInfoByName_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_lsa_SetTrustedDomainInfoByName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -2142,6 +8207,133 @@ NTSTATUS rpccli_lsa_SetTrustedDomainInfoByName(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_EnumTrustedDomainsEx_state { + struct lsa_EnumTrustedDomainsEx orig; + struct lsa_EnumTrustedDomainsEx tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_EnumTrustedDomainsEx_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_EnumTrustedDomainsEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t *_resume_handle /* [in,out] [ref] */, + struct lsa_DomainListEx *_domains /* [out] [ref] */, + uint32_t _max_size /* [in] */) +{ + struct tevent_req *req; + struct rpccli_lsa_EnumTrustedDomainsEx_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_EnumTrustedDomainsEx_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.resume_handle = _resume_handle; + state->orig.in.max_size = _max_size; + + /* Out parameters */ + state->orig.out.resume_handle = _resume_handle; + state->orig.out.domains = _domains; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_EnumTrustedDomainsEx, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_EnumTrustedDomainsEx_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_lsarpc, + NDR_LSA_ENUMTRUSTEDDOMAINSEX, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_EnumTrustedDomainsEx_done, req); + return req; +} + +static void rpccli_lsa_EnumTrustedDomainsEx_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_EnumTrustedDomainsEx_state *state = tevent_req_data( + req, struct rpccli_lsa_EnumTrustedDomainsEx_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.resume_handle = *state->tmp.out.resume_handle; + *state->orig.out.domains = *state->tmp.out.domains; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_EnumTrustedDomainsEx, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_EnumTrustedDomainsEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_EnumTrustedDomainsEx_state *state = tevent_req_data( + req, struct rpccli_lsa_EnumTrustedDomainsEx_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_lsa_EnumTrustedDomainsEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -2187,6 +8379,133 @@ NTSTATUS rpccli_lsa_EnumTrustedDomainsEx(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_CreateTrustedDomainEx_state { + struct lsa_CreateTrustedDomainEx orig; + struct lsa_CreateTrustedDomainEx tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_CreateTrustedDomainEx_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_CreateTrustedDomainEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_policy_handle /* [in] [ref] */, + struct lsa_TrustDomainInfoInfoEx *_info /* [in] [ref] */, + struct lsa_TrustDomainInfoAuthInfoInternal *_auth_info /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_trustdom_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_CreateTrustedDomainEx_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_CreateTrustedDomainEx_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.policy_handle = _policy_handle; + state->orig.in.info = _info; + state->orig.in.auth_info = _auth_info; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.trustdom_handle = _trustdom_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomainEx, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_CreateTrustedDomainEx_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_lsarpc, + NDR_LSA_CREATETRUSTEDDOMAINEX, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_CreateTrustedDomainEx_done, req); + return req; +} + +static void rpccli_lsa_CreateTrustedDomainEx_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_CreateTrustedDomainEx_state *state = tevent_req_data( + req, struct rpccli_lsa_CreateTrustedDomainEx_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.trustdom_handle = *state->tmp.out.trustdom_handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomainEx, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_CreateTrustedDomainEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_CreateTrustedDomainEx_state *state = tevent_req_data( + req, struct rpccli_lsa_CreateTrustedDomainEx_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_lsa_CreateTrustedDomainEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *policy_handle /* [in] [ref] */, @@ -2233,6 +8552,126 @@ NTSTATUS rpccli_lsa_CreateTrustedDomainEx(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_CloseTrustedDomainEx_state { + struct lsa_CloseTrustedDomainEx orig; + struct lsa_CloseTrustedDomainEx tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_CloseTrustedDomainEx_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_CloseTrustedDomainEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in,out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_CloseTrustedDomainEx_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_CloseTrustedDomainEx_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_CloseTrustedDomainEx, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_CloseTrustedDomainEx_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_lsarpc, + NDR_LSA_CLOSETRUSTEDDOMAINEX, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_CloseTrustedDomainEx_done, req); + return req; +} + +static void rpccli_lsa_CloseTrustedDomainEx_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_CloseTrustedDomainEx_state *state = tevent_req_data( + req, struct rpccli_lsa_CloseTrustedDomainEx_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_CloseTrustedDomainEx, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_CloseTrustedDomainEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_CloseTrustedDomainEx_state *state = tevent_req_data( + req, struct rpccli_lsa_CloseTrustedDomainEx_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_lsa_CloseTrustedDomainEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in,out] [ref] */) @@ -2272,6 +8711,129 @@ NTSTATUS rpccli_lsa_CloseTrustedDomainEx(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_QueryDomainInformationPolicy_state { + struct lsa_QueryDomainInformationPolicy orig; + struct lsa_QueryDomainInformationPolicy tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_QueryDomainInformationPolicy_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_QueryDomainInformationPolicy_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint16_t _level /* [in] */, + union lsa_DomainInformationPolicy **_info /* [out] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_lsa_QueryDomainInformationPolicy_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_QueryDomainInformationPolicy_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.level = _level; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_QueryDomainInformationPolicy, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_QueryDomainInformationPolicy_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_lsarpc, + NDR_LSA_QUERYDOMAININFORMATIONPOLICY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_QueryDomainInformationPolicy_done, req); + return req; +} + +static void rpccli_lsa_QueryDomainInformationPolicy_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_QueryDomainInformationPolicy_state *state = tevent_req_data( + req, struct rpccli_lsa_QueryDomainInformationPolicy_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(lsa_QueryDomainInformationPolicy, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_QueryDomainInformationPolicy_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_QueryDomainInformationPolicy_state *state = tevent_req_data( + req, struct rpccli_lsa_QueryDomainInformationPolicy_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_lsa_QueryDomainInformationPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -2314,6 +8876,122 @@ NTSTATUS rpccli_lsa_QueryDomainInformationPolicy(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_SetDomainInformationPolicy_state { + struct lsa_SetDomainInformationPolicy orig; + struct lsa_SetDomainInformationPolicy tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_SetDomainInformationPolicy_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_SetDomainInformationPolicy_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint16_t _level /* [in] */, + union lsa_DomainInformationPolicy *_info /* [in] [unique,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_lsa_SetDomainInformationPolicy_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_SetDomainInformationPolicy_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.level = _level; + state->orig.in.info = _info; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_SetDomainInformationPolicy, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_SETDOMAININFORMATIONPOLICY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_SetDomainInformationPolicy_done, req); + return req; +} + +static void rpccli_lsa_SetDomainInformationPolicy_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_SetDomainInformationPolicy_state *state = tevent_req_data( + req, struct rpccli_lsa_SetDomainInformationPolicy_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_SetDomainInformationPolicy, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_SetDomainInformationPolicy_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_SetDomainInformationPolicy_state *state = tevent_req_data( + req, struct rpccli_lsa_SetDomainInformationPolicy_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_lsa_SetDomainInformationPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -2356,6 +9034,131 @@ NTSTATUS rpccli_lsa_SetDomainInformationPolicy(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_OpenTrustedDomainByName_state { + struct lsa_OpenTrustedDomainByName orig; + struct lsa_OpenTrustedDomainByName tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_OpenTrustedDomainByName_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_OpenTrustedDomainByName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_String _name /* [in] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_trustdom_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_OpenTrustedDomainByName_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_OpenTrustedDomainByName_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.name = _name; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.trustdom_handle = _trustdom_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_OpenTrustedDomainByName, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_OpenTrustedDomainByName_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_lsarpc, + NDR_LSA_OPENTRUSTEDDOMAINBYNAME, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_OpenTrustedDomainByName_done, req); + return req; +} + +static void rpccli_lsa_OpenTrustedDomainByName_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_OpenTrustedDomainByName_state *state = tevent_req_data( + req, struct rpccli_lsa_OpenTrustedDomainByName_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.trustdom_handle = *state->tmp.out.trustdom_handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_OpenTrustedDomainByName, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_OpenTrustedDomainByName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_OpenTrustedDomainByName_state *state = tevent_req_data( + req, struct rpccli_lsa_OpenTrustedDomainByName_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_lsa_OpenTrustedDomainByName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -2400,6 +9203,116 @@ NTSTATUS rpccli_lsa_OpenTrustedDomainByName(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_TestCall_state { + struct lsa_TestCall orig; + struct lsa_TestCall tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_TestCall_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_TestCall_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_lsa_TestCall_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_TestCall_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_TestCall, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_TESTCALL, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_TestCall_done, req); + return req; +} + +static void rpccli_lsa_TestCall_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_TestCall_state *state = tevent_req_data( + req, struct rpccli_lsa_TestCall_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_TestCall, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_TestCall_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_TestCall_state *state = tevent_req_data( + req, struct rpccli_lsa_TestCall_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_lsa_TestCall(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -2436,6 +9349,143 @@ NTSTATUS rpccli_lsa_TestCall(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_LookupSids2_state { + struct lsa_LookupSids2 orig; + struct lsa_LookupSids2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_LookupSids2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_LookupSids2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_SidArray *_sids /* [in] [ref] */, + struct lsa_RefDomainList **_domains /* [out] [ref] */, + struct lsa_TransNameArray2 *_names /* [in,out] [ref] */, + uint16_t _level /* [in] */, + uint32_t *_count /* [in,out] [ref] */, + uint32_t _unknown1 /* [in] */, + uint32_t _unknown2 /* [in] */) +{ + struct tevent_req *req; + struct rpccli_lsa_LookupSids2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_LookupSids2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.sids = _sids; + state->orig.in.names = _names; + state->orig.in.level = _level; + state->orig.in.count = _count; + state->orig.in.unknown1 = _unknown1; + state->orig.in.unknown2 = _unknown2; + + /* Out parameters */ + state->orig.out.domains = _domains; + state->orig.out.names = _names; + state->orig.out.count = _count; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_LookupSids2, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_LookupSids2_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_lsarpc, + NDR_LSA_LOOKUPSIDS2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_LookupSids2_done, req); + return req; +} + +static void rpccli_lsa_LookupSids2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_LookupSids2_state *state = tevent_req_data( + req, struct rpccli_lsa_LookupSids2_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.domains = *state->tmp.out.domains; + *state->orig.out.names = *state->tmp.out.names; + *state->orig.out.count = *state->tmp.out.count; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_LookupSids2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_LookupSids2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_LookupSids2_state *state = tevent_req_data( + req, struct rpccli_lsa_LookupSids2_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_lsa_LookupSids2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -2490,6 +9540,145 @@ NTSTATUS rpccli_lsa_LookupSids2(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_LookupNames2_state { + struct lsa_LookupNames2 orig; + struct lsa_LookupNames2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_LookupNames2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_LookupNames2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _num_names /* [in] [range(0,1000)] */, + struct lsa_String *_names /* [in] [size_is(num_names)] */, + struct lsa_RefDomainList **_domains /* [out] [ref] */, + struct lsa_TransSidArray2 *_sids /* [in,out] [ref] */, + enum lsa_LookupNamesLevel _level /* [in] */, + uint32_t *_count /* [in,out] [ref] */, + uint32_t _lookup_options /* [in] */, + uint32_t _client_revision /* [in] */) +{ + struct tevent_req *req; + struct rpccli_lsa_LookupNames2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_LookupNames2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.num_names = _num_names; + state->orig.in.names = _names; + state->orig.in.sids = _sids; + state->orig.in.level = _level; + state->orig.in.count = _count; + state->orig.in.lookup_options = _lookup_options; + state->orig.in.client_revision = _client_revision; + + /* Out parameters */ + state->orig.out.domains = _domains; + state->orig.out.sids = _sids; + state->orig.out.count = _count; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_LookupNames2, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_LookupNames2_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_lsarpc, + NDR_LSA_LOOKUPNAMES2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_LookupNames2_done, req); + return req; +} + +static void rpccli_lsa_LookupNames2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_LookupNames2_state *state = tevent_req_data( + req, struct rpccli_lsa_LookupNames2_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.domains = *state->tmp.out.domains; + *state->orig.out.sids = *state->tmp.out.sids; + *state->orig.out.count = *state->tmp.out.count; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_LookupNames2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_LookupNames2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_LookupNames2_state *state = tevent_req_data( + req, struct rpccli_lsa_LookupNames2_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_lsa_LookupNames2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -2546,6 +9735,133 @@ NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_CreateTrustedDomainEx2_state { + struct lsa_CreateTrustedDomainEx2 orig; + struct lsa_CreateTrustedDomainEx2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_CreateTrustedDomainEx2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_CreateTrustedDomainEx2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_policy_handle /* [in] [ref] */, + struct lsa_TrustDomainInfoInfoEx *_info /* [in] [ref] */, + struct lsa_TrustDomainInfoAuthInfoInternal *_auth_info /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_trustdom_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_CreateTrustedDomainEx2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_CreateTrustedDomainEx2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.policy_handle = _policy_handle; + state->orig.in.info = _info; + state->orig.in.auth_info = _auth_info; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.trustdom_handle = _trustdom_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_CreateTrustedDomainEx2, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_CreateTrustedDomainEx2_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_lsarpc, + NDR_LSA_CREATETRUSTEDDOMAINEX2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_CreateTrustedDomainEx2_done, req); + return req; +} + +static void rpccli_lsa_CreateTrustedDomainEx2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_CreateTrustedDomainEx2_state *state = tevent_req_data( + req, struct rpccli_lsa_CreateTrustedDomainEx2_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.trustdom_handle = *state->tmp.out.trustdom_handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomainEx2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_CreateTrustedDomainEx2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_CreateTrustedDomainEx2_state *state = tevent_req_data( + req, struct rpccli_lsa_CreateTrustedDomainEx2_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_lsa_CreateTrustedDomainEx2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *policy_handle /* [in] [ref] */, @@ -2592,6 +9908,116 @@ NTSTATUS rpccli_lsa_CreateTrustedDomainEx2(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_CREDRWRITE_state { + struct lsa_CREDRWRITE orig; + struct lsa_CREDRWRITE tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_CREDRWRITE_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_CREDRWRITE_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_lsa_CREDRWRITE_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_CREDRWRITE_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_CREDRWRITE, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_CREDRWRITE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_CREDRWRITE_done, req); + return req; +} + +static void rpccli_lsa_CREDRWRITE_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_CREDRWRITE_state *state = tevent_req_data( + req, struct rpccli_lsa_CREDRWRITE_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_CREDRWRITE, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_CREDRWRITE_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_CREDRWRITE_state *state = tevent_req_data( + req, struct rpccli_lsa_CREDRWRITE_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_lsa_CREDRWRITE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -2628,6 +10054,116 @@ NTSTATUS rpccli_lsa_CREDRWRITE(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_CREDRREAD_state { + struct lsa_CREDRREAD orig; + struct lsa_CREDRREAD tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_CREDRREAD_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_CREDRREAD_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_lsa_CREDRREAD_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_CREDRREAD_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_CREDRREAD, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_CREDRREAD, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_CREDRREAD_done, req); + return req; +} + +static void rpccli_lsa_CREDRREAD_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_CREDRREAD_state *state = tevent_req_data( + req, struct rpccli_lsa_CREDRREAD_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_CREDRREAD, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_CREDRREAD_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_CREDRREAD_state *state = tevent_req_data( + req, struct rpccli_lsa_CREDRREAD_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_lsa_CREDRREAD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -2664,6 +10200,116 @@ NTSTATUS rpccli_lsa_CREDRREAD(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_CREDRENUMERATE_state { + struct lsa_CREDRENUMERATE orig; + struct lsa_CREDRENUMERATE tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_CREDRENUMERATE_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_CREDRENUMERATE_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_lsa_CREDRENUMERATE_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_CREDRENUMERATE_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_CREDRENUMERATE, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_CREDRENUMERATE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_CREDRENUMERATE_done, req); + return req; +} + +static void rpccli_lsa_CREDRENUMERATE_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_CREDRENUMERATE_state *state = tevent_req_data( + req, struct rpccli_lsa_CREDRENUMERATE_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_CREDRENUMERATE, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_CREDRENUMERATE_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_CREDRENUMERATE_state *state = tevent_req_data( + req, struct rpccli_lsa_CREDRENUMERATE_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_lsa_CREDRENUMERATE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -2700,6 +10346,116 @@ NTSTATUS rpccli_lsa_CREDRENUMERATE(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_state { + struct lsa_CREDRWRITEDOMAINCREDENTIALS orig; + struct lsa_CREDRWRITEDOMAINCREDENTIALS tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_CREDRWRITEDOMAINCREDENTIALS, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_CREDRWRITEDOMAINCREDENTIALS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_done, req); + return req; +} + +static void rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_state *state = tevent_req_data( + req, struct rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_CREDRWRITEDOMAINCREDENTIALS, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_state *state = tevent_req_data( + req, struct rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_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_lsa_CREDRWRITEDOMAINCREDENTIALS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -2736,6 +10492,116 @@ NTSTATUS rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_CREDRREADDOMAINCREDENTIALS_state { + struct lsa_CREDRREADDOMAINCREDENTIALS orig; + struct lsa_CREDRREADDOMAINCREDENTIALS tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_CREDRREADDOMAINCREDENTIALS_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_CREDRREADDOMAINCREDENTIALS_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_lsa_CREDRREADDOMAINCREDENTIALS_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_CREDRREADDOMAINCREDENTIALS_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_CREDRREADDOMAINCREDENTIALS, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_CREDRREADDOMAINCREDENTIALS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_CREDRREADDOMAINCREDENTIALS_done, req); + return req; +} + +static void rpccli_lsa_CREDRREADDOMAINCREDENTIALS_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_CREDRREADDOMAINCREDENTIALS_state *state = tevent_req_data( + req, struct rpccli_lsa_CREDRREADDOMAINCREDENTIALS_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_CREDRREADDOMAINCREDENTIALS, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_CREDRREADDOMAINCREDENTIALS_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_CREDRREADDOMAINCREDENTIALS_state *state = tevent_req_data( + req, struct rpccli_lsa_CREDRREADDOMAINCREDENTIALS_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_lsa_CREDRREADDOMAINCREDENTIALS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -2772,6 +10638,116 @@ NTSTATUS rpccli_lsa_CREDRREADDOMAINCREDENTIALS(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_CREDRDELETE_state { + struct lsa_CREDRDELETE orig; + struct lsa_CREDRDELETE tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_CREDRDELETE_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_CREDRDELETE_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_lsa_CREDRDELETE_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_CREDRDELETE_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_CREDRDELETE, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_CREDRDELETE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_CREDRDELETE_done, req); + return req; +} + +static void rpccli_lsa_CREDRDELETE_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_CREDRDELETE_state *state = tevent_req_data( + req, struct rpccli_lsa_CREDRDELETE_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_CREDRDELETE, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_CREDRDELETE_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_CREDRDELETE_state *state = tevent_req_data( + req, struct rpccli_lsa_CREDRDELETE_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_lsa_CREDRDELETE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -2808,6 +10784,116 @@ NTSTATUS rpccli_lsa_CREDRDELETE(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_CREDRGETTARGETINFO_state { + struct lsa_CREDRGETTARGETINFO orig; + struct lsa_CREDRGETTARGETINFO tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_CREDRGETTARGETINFO_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_CREDRGETTARGETINFO_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_lsa_CREDRGETTARGETINFO_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_CREDRGETTARGETINFO_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_CREDRGETTARGETINFO, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_CREDRGETTARGETINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_CREDRGETTARGETINFO_done, req); + return req; +} + +static void rpccli_lsa_CREDRGETTARGETINFO_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_CREDRGETTARGETINFO_state *state = tevent_req_data( + req, struct rpccli_lsa_CREDRGETTARGETINFO_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_CREDRGETTARGETINFO, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_CREDRGETTARGETINFO_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_CREDRGETTARGETINFO_state *state = tevent_req_data( + req, struct rpccli_lsa_CREDRGETTARGETINFO_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_lsa_CREDRGETTARGETINFO(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -2844,6 +10930,116 @@ NTSTATUS rpccli_lsa_CREDRGETTARGETINFO(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_CREDRPROFILELOADED_state { + struct lsa_CREDRPROFILELOADED orig; + struct lsa_CREDRPROFILELOADED tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_CREDRPROFILELOADED_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_CREDRPROFILELOADED_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_lsa_CREDRPROFILELOADED_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_CREDRPROFILELOADED_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_CREDRPROFILELOADED, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_CREDRPROFILELOADED, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_CREDRPROFILELOADED_done, req); + return req; +} + +static void rpccli_lsa_CREDRPROFILELOADED_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_CREDRPROFILELOADED_state *state = tevent_req_data( + req, struct rpccli_lsa_CREDRPROFILELOADED_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_CREDRPROFILELOADED, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_CREDRPROFILELOADED_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_CREDRPROFILELOADED_state *state = tevent_req_data( + req, struct rpccli_lsa_CREDRPROFILELOADED_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_lsa_CREDRPROFILELOADED(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -2880,6 +11076,145 @@ NTSTATUS rpccli_lsa_CREDRPROFILELOADED(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_LookupNames3_state { + struct lsa_LookupNames3 orig; + struct lsa_LookupNames3 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_LookupNames3_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_LookupNames3_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _num_names /* [in] [range(0,1000)] */, + struct lsa_String *_names /* [in] [size_is(num_names)] */, + struct lsa_RefDomainList **_domains /* [out] [ref] */, + struct lsa_TransSidArray3 *_sids /* [in,out] [ref] */, + enum lsa_LookupNamesLevel _level /* [in] */, + uint32_t *_count /* [in,out] [ref] */, + uint32_t _lookup_options /* [in] */, + uint32_t _client_revision /* [in] */) +{ + struct tevent_req *req; + struct rpccli_lsa_LookupNames3_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_LookupNames3_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.num_names = _num_names; + state->orig.in.names = _names; + state->orig.in.sids = _sids; + state->orig.in.level = _level; + state->orig.in.count = _count; + state->orig.in.lookup_options = _lookup_options; + state->orig.in.client_revision = _client_revision; + + /* Out parameters */ + state->orig.out.domains = _domains; + state->orig.out.sids = _sids; + state->orig.out.count = _count; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_LookupNames3, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_LookupNames3_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_lsarpc, + NDR_LSA_LOOKUPNAMES3, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_LookupNames3_done, req); + return req; +} + +static void rpccli_lsa_LookupNames3_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_LookupNames3_state *state = tevent_req_data( + req, struct rpccli_lsa_LookupNames3_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.domains = *state->tmp.out.domains; + *state->orig.out.sids = *state->tmp.out.sids; + *state->orig.out.count = *state->tmp.out.count; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_LookupNames3, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_LookupNames3_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_LookupNames3_state *state = tevent_req_data( + req, struct rpccli_lsa_LookupNames3_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_lsa_LookupNames3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -2936,6 +11271,116 @@ NTSTATUS rpccli_lsa_LookupNames3(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_CREDRGETSESSIONTYPES_state { + struct lsa_CREDRGETSESSIONTYPES orig; + struct lsa_CREDRGETSESSIONTYPES tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_CREDRGETSESSIONTYPES_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_CREDRGETSESSIONTYPES_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_lsa_CREDRGETSESSIONTYPES_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_CREDRGETSESSIONTYPES_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_CREDRGETSESSIONTYPES, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_CREDRGETSESSIONTYPES, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_CREDRGETSESSIONTYPES_done, req); + return req; +} + +static void rpccli_lsa_CREDRGETSESSIONTYPES_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_CREDRGETSESSIONTYPES_state *state = tevent_req_data( + req, struct rpccli_lsa_CREDRGETSESSIONTYPES_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_CREDRGETSESSIONTYPES, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_CREDRGETSESSIONTYPES_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_CREDRGETSESSIONTYPES_state *state = tevent_req_data( + req, struct rpccli_lsa_CREDRGETSESSIONTYPES_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_lsa_CREDRGETSESSIONTYPES(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -2972,6 +11417,116 @@ NTSTATUS rpccli_lsa_CREDRGETSESSIONTYPES(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_LSARREGISTERAUDITEVENT_state { + struct lsa_LSARREGISTERAUDITEVENT orig; + struct lsa_LSARREGISTERAUDITEVENT tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_LSARREGISTERAUDITEVENT_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_LSARREGISTERAUDITEVENT_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_lsa_LSARREGISTERAUDITEVENT_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_LSARREGISTERAUDITEVENT_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_LSARREGISTERAUDITEVENT, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_LSARREGISTERAUDITEVENT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_LSARREGISTERAUDITEVENT_done, req); + return req; +} + +static void rpccli_lsa_LSARREGISTERAUDITEVENT_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_LSARREGISTERAUDITEVENT_state *state = tevent_req_data( + req, struct rpccli_lsa_LSARREGISTERAUDITEVENT_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_LSARREGISTERAUDITEVENT, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_LSARREGISTERAUDITEVENT_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_LSARREGISTERAUDITEVENT_state *state = tevent_req_data( + req, struct rpccli_lsa_LSARREGISTERAUDITEVENT_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_lsa_LSARREGISTERAUDITEVENT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -3008,6 +11563,116 @@ NTSTATUS rpccli_lsa_LSARREGISTERAUDITEVENT(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_LSARGENAUDITEVENT_state { + struct lsa_LSARGENAUDITEVENT orig; + struct lsa_LSARGENAUDITEVENT tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_LSARGENAUDITEVENT_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_LSARGENAUDITEVENT_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_lsa_LSARGENAUDITEVENT_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_LSARGENAUDITEVENT_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_LSARGENAUDITEVENT, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_LSARGENAUDITEVENT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_LSARGENAUDITEVENT_done, req); + return req; +} + +static void rpccli_lsa_LSARGENAUDITEVENT_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_LSARGENAUDITEVENT_state *state = tevent_req_data( + req, struct rpccli_lsa_LSARGENAUDITEVENT_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_LSARGENAUDITEVENT, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_LSARGENAUDITEVENT_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_LSARGENAUDITEVENT_state *state = tevent_req_data( + req, struct rpccli_lsa_LSARGENAUDITEVENT_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_lsa_LSARGENAUDITEVENT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -3044,6 +11709,116 @@ NTSTATUS rpccli_lsa_LSARGENAUDITEVENT(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_LSARUNREGISTERAUDITEVENT_state { + struct lsa_LSARUNREGISTERAUDITEVENT orig; + struct lsa_LSARUNREGISTERAUDITEVENT tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_LSARUNREGISTERAUDITEVENT_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_LSARUNREGISTERAUDITEVENT_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_lsa_LSARUNREGISTERAUDITEVENT_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_LSARUNREGISTERAUDITEVENT_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_LSARUNREGISTERAUDITEVENT, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_LSARUNREGISTERAUDITEVENT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_LSARUNREGISTERAUDITEVENT_done, req); + return req; +} + +static void rpccli_lsa_LSARUNREGISTERAUDITEVENT_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_LSARUNREGISTERAUDITEVENT_state *state = tevent_req_data( + req, struct rpccli_lsa_LSARUNREGISTERAUDITEVENT_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_LSARUNREGISTERAUDITEVENT, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_LSARUNREGISTERAUDITEVENT_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_LSARUNREGISTERAUDITEVENT_state *state = tevent_req_data( + req, struct rpccli_lsa_LSARUNREGISTERAUDITEVENT_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_lsa_LSARUNREGISTERAUDITEVENT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -3080,6 +11855,131 @@ NTSTATUS rpccli_lsa_LSARUNREGISTERAUDITEVENT(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_lsaRQueryForestTrustInformation_state { + struct lsa_lsaRQueryForestTrustInformation orig; + struct lsa_lsaRQueryForestTrustInformation tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_lsaRQueryForestTrustInformation_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_lsaRQueryForestTrustInformation_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_String *_trusted_domain_name /* [in] [ref] */, + uint16_t _unknown /* [in] */, + struct lsa_ForestTrustInformation **_forest_trust_info /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_lsa_lsaRQueryForestTrustInformation_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_lsaRQueryForestTrustInformation_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.trusted_domain_name = _trusted_domain_name; + state->orig.in.unknown = _unknown; + + /* Out parameters */ + state->orig.out.forest_trust_info = _forest_trust_info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_lsaRQueryForestTrustInformation, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_lsaRQueryForestTrustInformation_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_lsarpc, + NDR_LSA_LSARQUERYFORESTTRUSTINFORMATION, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_lsaRQueryForestTrustInformation_done, req); + return req; +} + +static void rpccli_lsa_lsaRQueryForestTrustInformation_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_lsaRQueryForestTrustInformation_state *state = tevent_req_data( + req, struct rpccli_lsa_lsaRQueryForestTrustInformation_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.forest_trust_info = *state->tmp.out.forest_trust_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(lsa_lsaRQueryForestTrustInformation, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_lsaRQueryForestTrustInformation_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_lsaRQueryForestTrustInformation_state *state = tevent_req_data( + req, struct rpccli_lsa_lsaRQueryForestTrustInformation_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_lsa_lsaRQueryForestTrustInformation(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -3124,6 +12024,116 @@ NTSTATUS rpccli_lsa_lsaRQueryForestTrustInformation(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state { + struct lsa_LSARSETFORESTTRUSTINFORMATION orig; + struct lsa_LSARSETFORESTTRUSTINFORMATION tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_LSARSETFORESTTRUSTINFORMATION, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_LSARSETFORESTTRUSTINFORMATION, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_done, req); + return req; +} + +static void rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state *state = tevent_req_data( + req, struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_LSARSETFORESTTRUSTINFORMATION, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_state *state = tevent_req_data( + req, struct rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_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_lsa_LSARSETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -3160,6 +12170,116 @@ NTSTATUS rpccli_lsa_LSARSETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_CREDRRENAME_state { + struct lsa_CREDRRENAME orig; + struct lsa_CREDRRENAME tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_CREDRRENAME_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_CREDRRENAME_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_lsa_CREDRRENAME_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_CREDRRENAME_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_CREDRRENAME, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_CREDRRENAME, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_CREDRRENAME_done, req); + return req; +} + +static void rpccli_lsa_CREDRRENAME_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_CREDRRENAME_state *state = tevent_req_data( + req, struct rpccli_lsa_CREDRRENAME_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_CREDRRENAME, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_CREDRRENAME_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_CREDRRENAME_state *state = tevent_req_data( + req, struct rpccli_lsa_CREDRRENAME_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_lsa_CREDRRENAME(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -3196,6 +12316,141 @@ NTSTATUS rpccli_lsa_CREDRRENAME(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_LookupSids3_state { + struct lsa_LookupSids3 orig; + struct lsa_LookupSids3 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_LookupSids3_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_LookupSids3_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct lsa_SidArray *_sids /* [in] [ref] */, + struct lsa_RefDomainList **_domains /* [out] [ref] */, + struct lsa_TransNameArray2 *_names /* [in,out] [ref] */, + uint16_t _level /* [in] */, + uint32_t *_count /* [in,out] [ref] */, + uint32_t _unknown1 /* [in] */, + uint32_t _unknown2 /* [in] */) +{ + struct tevent_req *req; + struct rpccli_lsa_LookupSids3_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_LookupSids3_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.sids = _sids; + state->orig.in.names = _names; + state->orig.in.level = _level; + state->orig.in.count = _count; + state->orig.in.unknown1 = _unknown1; + state->orig.in.unknown2 = _unknown2; + + /* Out parameters */ + state->orig.out.domains = _domains; + state->orig.out.names = _names; + state->orig.out.count = _count; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_LookupSids3, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_LookupSids3_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_lsarpc, + NDR_LSA_LOOKUPSIDS3, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_LookupSids3_done, req); + return req; +} + +static void rpccli_lsa_LookupSids3_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_LookupSids3_state *state = tevent_req_data( + req, struct rpccli_lsa_LookupSids3_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.domains = *state->tmp.out.domains; + *state->orig.out.names = *state->tmp.out.names; + *state->orig.out.count = *state->tmp.out.count; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_LookupSids3, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_LookupSids3_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_LookupSids3_state *state = tevent_req_data( + req, struct rpccli_lsa_LookupSids3_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_lsa_LookupSids3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct lsa_SidArray *sids /* [in] [ref] */, @@ -3248,6 +12503,143 @@ NTSTATUS rpccli_lsa_LookupSids3(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_LookupNames4_state { + struct lsa_LookupNames4 orig; + struct lsa_LookupNames4 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_LookupNames4_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_LookupNames4_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint32_t _num_names /* [in] [range(0,1000)] */, + struct lsa_String *_names /* [in] [size_is(num_names)] */, + struct lsa_RefDomainList **_domains /* [out] [ref] */, + struct lsa_TransSidArray3 *_sids /* [in,out] [ref] */, + enum lsa_LookupNamesLevel _level /* [in] */, + uint32_t *_count /* [in,out] [ref] */, + uint32_t _lookup_options /* [in] */, + uint32_t _client_revision /* [in] */) +{ + struct tevent_req *req; + struct rpccli_lsa_LookupNames4_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_LookupNames4_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.num_names = _num_names; + state->orig.in.names = _names; + state->orig.in.sids = _sids; + state->orig.in.level = _level; + state->orig.in.count = _count; + state->orig.in.lookup_options = _lookup_options; + state->orig.in.client_revision = _client_revision; + + /* Out parameters */ + state->orig.out.domains = _domains; + state->orig.out.sids = _sids; + state->orig.out.count = _count; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_LookupNames4, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_lsa_LookupNames4_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_lsarpc, + NDR_LSA_LOOKUPNAMES4, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_LookupNames4_done, req); + return req; +} + +static void rpccli_lsa_LookupNames4_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_LookupNames4_state *state = tevent_req_data( + req, struct rpccli_lsa_LookupNames4_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.domains = *state->tmp.out.domains; + *state->orig.out.sids = *state->tmp.out.sids; + *state->orig.out.count = *state->tmp.out.count; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_LookupNames4, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_LookupNames4_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_LookupNames4_state *state = tevent_req_data( + req, struct rpccli_lsa_LookupNames4_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_lsa_LookupNames4(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t num_names /* [in] [range(0,1000)] */, @@ -3302,6 +12694,116 @@ NTSTATUS rpccli_lsa_LookupNames4(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_LSAROPENPOLICYSCE_state { + struct lsa_LSAROPENPOLICYSCE orig; + struct lsa_LSAROPENPOLICYSCE tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_LSAROPENPOLICYSCE_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_LSAROPENPOLICYSCE_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_lsa_LSAROPENPOLICYSCE_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_LSAROPENPOLICYSCE_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_LSAROPENPOLICYSCE, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_LSAROPENPOLICYSCE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_LSAROPENPOLICYSCE_done, req); + return req; +} + +static void rpccli_lsa_LSAROPENPOLICYSCE_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_LSAROPENPOLICYSCE_state *state = tevent_req_data( + req, struct rpccli_lsa_LSAROPENPOLICYSCE_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_LSAROPENPOLICYSCE, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_LSAROPENPOLICYSCE_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_LSAROPENPOLICYSCE_state *state = tevent_req_data( + req, struct rpccli_lsa_LSAROPENPOLICYSCE_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_lsa_LSAROPENPOLICYSCE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -3338,6 +12840,116 @@ NTSTATUS rpccli_lsa_LSAROPENPOLICYSCE(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_state { + struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE orig; + struct lsa_LSARADTREGISTERSECURITYEVENTSOURCE tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_LSARADTREGISTERSECURITYEVENTSOURCE, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_LSARADTREGISTERSECURITYEVENTSOURCE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_done, req); + return req; +} + +static void rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_state *state = tevent_req_data( + req, struct rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_LSARADTREGISTERSECURITYEVENTSOURCE, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_state *state = tevent_req_data( + req, struct rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_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_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -3374,6 +12986,116 @@ NTSTATUS rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct rpc_pipe_client *c return r.out.result; } +struct rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_state { + struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE orig; + struct lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_LSARADTUNREGISTERSECURITYEVENTSOURCE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_done, req); + return req; +} + +static void rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_state *state = tevent_req_data( + req, struct rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_state *state = tevent_req_data( + req, struct rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_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_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { @@ -3410,6 +13132,116 @@ NTSTATUS rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct rpc_pipe_client return r.out.result; } +struct rpccli_lsa_LSARADTREPORTSECURITYEVENT_state { + struct lsa_LSARADTREPORTSECURITYEVENT orig; + struct lsa_LSARADTREPORTSECURITYEVENT tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_lsa_LSARADTREPORTSECURITYEVENT_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_lsa_LSARADTREPORTSECURITYEVENT_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_lsa_LSARADTREPORTSECURITYEVENT_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_lsa_LSARADTREPORTSECURITYEVENT_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(lsa_LSARADTREPORTSECURITYEVENT, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_lsarpc, + NDR_LSA_LSARADTREPORTSECURITYEVENT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_lsa_LSARADTREPORTSECURITYEVENT_done, req); + return req; +} + +static void rpccli_lsa_LSARADTREPORTSECURITYEVENT_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_lsa_LSARADTREPORTSECURITYEVENT_state *state = tevent_req_data( + req, struct rpccli_lsa_LSARADTREPORTSECURITYEVENT_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(lsa_LSARADTREPORTSECURITYEVENT, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_lsa_LSARADTREPORTSECURITYEVENT_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_lsa_LSARADTREPORTSECURITYEVENT_state *state = tevent_req_data( + req, struct rpccli_lsa_LSARADTREPORTSECURITYEVENT_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_lsa_LSARADTREPORTSECURITYEVENT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) { diff --git a/librpc/gen_ndr/cli_lsa.h b/librpc/gen_ndr/cli_lsa.h index 10c408528f..d9a7362620 100644 --- a/librpc/gen_ndr/cli_lsa.h +++ b/librpc/gen_ndr/cli_lsa.h @@ -1,72 +1,207 @@ #include "../librpc/gen_ndr/ndr_lsa.h" #ifndef __CLI_LSARPC__ #define __CLI_LSARPC__ +struct tevent_req *rpccli_lsa_Close_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in,out] [ref] */); +NTSTATUS rpccli_lsa_Close_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_Close(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in,out] [ref] */); +struct tevent_req *rpccli_lsa_Delete_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */); +NTSTATUS rpccli_lsa_Delete_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_Delete(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */); +struct tevent_req *rpccli_lsa_EnumPrivs_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t *_resume_handle /* [in,out] [ref] */, + struct lsa_PrivArray *_privs /* [out] [ref] */, + uint32_t _max_count /* [in] */); +NTSTATUS rpccli_lsa_EnumPrivs_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_EnumPrivs(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t *resume_handle /* [in,out] [ref] */, struct lsa_PrivArray *privs /* [out] [ref] */, uint32_t max_count /* [in] */); +struct tevent_req *rpccli_lsa_QuerySecurity_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _sec_info /* [in] */, + struct sec_desc_buf **_sdbuf /* [out] [ref] */); +NTSTATUS rpccli_lsa_QuerySecurity_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_QuerySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t sec_info /* [in] */, struct sec_desc_buf **sdbuf /* [out] [ref] */); +struct tevent_req *rpccli_lsa_SetSecObj_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _sec_info /* [in] */, + struct sec_desc_buf *_sdbuf /* [in] [ref] */); +NTSTATUS rpccli_lsa_SetSecObj_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_SetSecObj(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t sec_info /* [in] */, struct sec_desc_buf *sdbuf /* [in] [ref] */); +struct tevent_req *rpccli_lsa_ChangePassword_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_lsa_ChangePassword_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_ChangePassword(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_lsa_OpenPolicy_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_system_name /* [in] [unique] */, + struct lsa_ObjectAttribute *_attr /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */); +NTSTATUS rpccli_lsa_OpenPolicy_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_OpenPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name /* [in] [unique] */, struct lsa_ObjectAttribute *attr /* [in] [ref] */, uint32_t access_mask /* [in] */, struct policy_handle *handle /* [out] [ref] */); +struct tevent_req *rpccli_lsa_QueryInfoPolicy_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + enum lsa_PolicyInfo _level /* [in] */, + union lsa_PolicyInformation **_info /* [out] [ref,switch_is(level)] */); +NTSTATUS rpccli_lsa_QueryInfoPolicy_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_QueryInfoPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, enum lsa_PolicyInfo level /* [in] */, union lsa_PolicyInformation **info /* [out] [ref,switch_is(level)] */); +struct tevent_req *rpccli_lsa_SetInfoPolicy_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + enum lsa_PolicyInfo _level /* [in] */, + union lsa_PolicyInformation *_info /* [in] [ref,switch_is(level)] */); +NTSTATUS rpccli_lsa_SetInfoPolicy_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_SetInfoPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, enum lsa_PolicyInfo level /* [in] */, union lsa_PolicyInformation *info /* [in] [ref,switch_is(level)] */); +struct tevent_req *rpccli_lsa_ClearAuditLog_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_lsa_ClearAuditLog_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_ClearAuditLog(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_lsa_CreateAccount_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct dom_sid2 *_sid /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_acct_handle /* [out] [ref] */); +NTSTATUS rpccli_lsa_CreateAccount_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_CreateAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct dom_sid2 *sid /* [in] [ref] */, uint32_t access_mask /* [in] */, struct policy_handle *acct_handle /* [out] [ref] */); +struct tevent_req *rpccli_lsa_EnumAccounts_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t *_resume_handle /* [in,out] [ref] */, + struct lsa_SidArray *_sids /* [out] [ref] */, + uint32_t _num_entries /* [in] [range(0,8192)] */); +NTSTATUS rpccli_lsa_EnumAccounts_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_EnumAccounts(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t *resume_handle /* [in,out] [ref] */, struct lsa_SidArray *sids /* [out] [ref] */, uint32_t num_entries /* [in] [range(0,8192)] */); +struct tevent_req *rpccli_lsa_CreateTrustedDomain_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_policy_handle /* [in] [ref] */, + struct lsa_DomainInfo *_info /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_trustdom_handle /* [out] [ref] */); +NTSTATUS rpccli_lsa_CreateTrustedDomain_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_CreateTrustedDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *policy_handle /* [in] [ref] */, struct lsa_DomainInfo *info /* [in] [ref] */, uint32_t access_mask /* [in] */, struct policy_handle *trustdom_handle /* [out] [ref] */); +struct tevent_req *rpccli_lsa_EnumTrustDom_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t *_resume_handle /* [in,out] [ref] */, + struct lsa_DomainList *_domains /* [out] [ref] */, + uint32_t _max_size /* [in] */); +NTSTATUS rpccli_lsa_EnumTrustDom_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_EnumTrustDom(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t *resume_handle /* [in,out] [ref] */, struct lsa_DomainList *domains /* [out] [ref] */, uint32_t max_size /* [in] */); +struct tevent_req *rpccli_lsa_LookupNames_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _num_names /* [in] [range(0,1000)] */, + struct lsa_String *_names /* [in] [size_is(num_names)] */, + struct lsa_RefDomainList **_domains /* [out] [ref] */, + struct lsa_TransSidArray *_sids /* [in,out] [ref] */, + enum lsa_LookupNamesLevel _level /* [in] */, + uint32_t *_count /* [in,out] [ref] */); +NTSTATUS rpccli_lsa_LookupNames_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_LookupNames(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -76,6 +211,18 @@ NTSTATUS rpccli_lsa_LookupNames(struct rpc_pipe_client *cli, struct lsa_TransSidArray *sids /* [in,out] [ref] */, enum lsa_LookupNamesLevel level /* [in] */, uint32_t *count /* [in,out] [ref] */); +struct tevent_req *rpccli_lsa_LookupSids_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_SidArray *_sids /* [in] [ref] */, + struct lsa_RefDomainList **_domains /* [out] [ref] */, + struct lsa_TransNameArray *_names /* [in,out] [ref] */, + uint16_t _level /* [in] */, + uint32_t *_count /* [in,out] [ref] */); +NTSTATUS rpccli_lsa_LookupSids_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_LookupSids(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -84,70 +231,201 @@ NTSTATUS rpccli_lsa_LookupSids(struct rpc_pipe_client *cli, struct lsa_TransNameArray *names /* [in,out] [ref] */, uint16_t level /* [in] */, uint32_t *count /* [in,out] [ref] */); +struct tevent_req *rpccli_lsa_CreateSecret_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_String _name /* [in] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_sec_handle /* [out] [ref] */); +NTSTATUS rpccli_lsa_CreateSecret_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_CreateSecret(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct lsa_String name /* [in] */, uint32_t access_mask /* [in] */, struct policy_handle *sec_handle /* [out] [ref] */); +struct tevent_req *rpccli_lsa_OpenAccount_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct dom_sid2 *_sid /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_acct_handle /* [out] [ref] */); +NTSTATUS rpccli_lsa_OpenAccount_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_OpenAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct dom_sid2 *sid /* [in] [ref] */, uint32_t access_mask /* [in] */, struct policy_handle *acct_handle /* [out] [ref] */); +struct tevent_req *rpccli_lsa_EnumPrivsAccount_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_PrivilegeSet **_privs /* [out] [ref] */); +NTSTATUS rpccli_lsa_EnumPrivsAccount_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_EnumPrivsAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct lsa_PrivilegeSet **privs /* [out] [ref] */); +struct tevent_req *rpccli_lsa_AddPrivilegesToAccount_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_PrivilegeSet *_privs /* [in] [ref] */); +NTSTATUS rpccli_lsa_AddPrivilegesToAccount_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_AddPrivilegesToAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct lsa_PrivilegeSet *privs /* [in] [ref] */); +struct tevent_req *rpccli_lsa_RemovePrivilegesFromAccount_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint8_t _remove_all /* [in] */, + struct lsa_PrivilegeSet *_privs /* [in] [unique] */); +NTSTATUS rpccli_lsa_RemovePrivilegesFromAccount_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_RemovePrivilegesFromAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint8_t remove_all /* [in] */, struct lsa_PrivilegeSet *privs /* [in] [unique] */); +struct tevent_req *rpccli_lsa_GetQuotasForAccount_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_lsa_GetQuotasForAccount_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_GetQuotasForAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_lsa_SetQuotasForAccount_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_lsa_SetQuotasForAccount_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_SetQuotasForAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_lsa_GetSystemAccessAccount_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t *_access_mask /* [out] [ref] */); +NTSTATUS rpccli_lsa_GetSystemAccessAccount_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_GetSystemAccessAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t *access_mask /* [out] [ref] */); +struct tevent_req *rpccli_lsa_SetSystemAccessAccount_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _access_mask /* [in] */); +NTSTATUS rpccli_lsa_SetSystemAccessAccount_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_SetSystemAccessAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t access_mask /* [in] */); +struct tevent_req *rpccli_lsa_OpenTrustedDomain_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct dom_sid2 *_sid /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_trustdom_handle /* [out] [ref] */); +NTSTATUS rpccli_lsa_OpenTrustedDomain_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_OpenTrustedDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct dom_sid2 *sid /* [in] [ref] */, uint32_t access_mask /* [in] */, struct policy_handle *trustdom_handle /* [out] [ref] */); +struct tevent_req *rpccli_lsa_QueryTrustedDomainInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_trustdom_handle /* [in] [ref] */, + enum lsa_TrustDomInfoEnum _level /* [in] */, + union lsa_TrustedDomainInfo **_info /* [out] [ref,switch_is(level)] */); +NTSTATUS rpccli_lsa_QueryTrustedDomainInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_QueryTrustedDomainInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *trustdom_handle /* [in] [ref] */, enum lsa_TrustDomInfoEnum level /* [in] */, union lsa_TrustedDomainInfo **info /* [out] [ref,switch_is(level)] */); +struct tevent_req *rpccli_lsa_SetInformationTrustedDomain_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_trustdom_handle /* [in] [ref] */, + enum lsa_TrustDomInfoEnum _level /* [in] */, + union lsa_TrustedDomainInfo *_info /* [in] [ref,switch_is(level)] */); +NTSTATUS rpccli_lsa_SetInformationTrustedDomain_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_SetInformationTrustedDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *trustdom_handle /* [in] [ref] */, enum lsa_TrustDomInfoEnum level /* [in] */, union lsa_TrustedDomainInfo *info /* [in] [ref,switch_is(level)] */); +struct tevent_req *rpccli_lsa_OpenSecret_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_String _name /* [in] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_sec_handle /* [out] [ref] */); +NTSTATUS rpccli_lsa_OpenSecret_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_OpenSecret(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct lsa_String name /* [in] */, uint32_t access_mask /* [in] */, struct policy_handle *sec_handle /* [out] [ref] */); +struct tevent_req *rpccli_lsa_SetSecret_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_sec_handle /* [in] [ref] */, + struct lsa_DATA_BUF *_new_val /* [in] [unique] */, + struct lsa_DATA_BUF *_old_val /* [in] [unique] */); +NTSTATUS rpccli_lsa_SetSecret_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_SetSecret(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *sec_handle /* [in] [ref] */, struct lsa_DATA_BUF *new_val /* [in] [unique] */, struct lsa_DATA_BUF *old_val /* [in] [unique] */); +struct tevent_req *rpccli_lsa_QuerySecret_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_sec_handle /* [in] [ref] */, + struct lsa_DATA_BUF_PTR *_new_val /* [in,out] [unique] */, + NTTIME *_new_mtime /* [in,out] [unique] */, + struct lsa_DATA_BUF_PTR *_old_val /* [in,out] [unique] */, + NTTIME *_old_mtime /* [in,out] [unique] */); +NTSTATUS rpccli_lsa_QuerySecret_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_QuerySecret(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *sec_handle /* [in] [ref] */, @@ -155,16 +433,46 @@ NTSTATUS rpccli_lsa_QuerySecret(struct rpc_pipe_client *cli, NTTIME *new_mtime /* [in,out] [unique] */, struct lsa_DATA_BUF_PTR *old_val /* [in,out] [unique] */, NTTIME *old_mtime /* [in,out] [unique] */); +struct tevent_req *rpccli_lsa_LookupPrivValue_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_String *_name /* [in] [ref] */, + struct lsa_LUID *_luid /* [out] [ref] */); +NTSTATUS rpccli_lsa_LookupPrivValue_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_LookupPrivValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct lsa_String *name /* [in] [ref] */, struct lsa_LUID *luid /* [out] [ref] */); +struct tevent_req *rpccli_lsa_LookupPrivName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_LUID *_luid /* [in] [ref] */, + struct lsa_StringLarge **_name /* [out] [ref] */); +NTSTATUS rpccli_lsa_LookupPrivName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_LookupPrivName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct lsa_LUID *luid /* [in] [ref] */, struct lsa_StringLarge **name /* [out] [ref] */); +struct tevent_req *rpccli_lsa_LookupPrivDisplayName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_String *_name /* [in] [ref] */, + uint16_t _language_id /* [in] */, + uint16_t _language_id_sys /* [in] */, + struct lsa_StringLarge **_disp_name /* [out] [ref] */, + uint16_t *_returned_language_id /* [out] [ref] */); +NTSTATUS rpccli_lsa_LookupPrivDisplayName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_LookupPrivDisplayName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -173,95 +481,263 @@ NTSTATUS rpccli_lsa_LookupPrivDisplayName(struct rpc_pipe_client *cli, uint16_t language_id_sys /* [in] */, struct lsa_StringLarge **disp_name /* [out] [ref] */, uint16_t *returned_language_id /* [out] [ref] */); +struct tevent_req *rpccli_lsa_DeleteObject_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in,out] [ref] */); +NTSTATUS rpccli_lsa_DeleteObject_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_DeleteObject(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in,out] [ref] */); +struct tevent_req *rpccli_lsa_EnumAccountsWithUserRight_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_String *_name /* [in] [unique] */, + struct lsa_SidArray *_sids /* [out] [ref] */); +NTSTATUS rpccli_lsa_EnumAccountsWithUserRight_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_EnumAccountsWithUserRight(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct lsa_String *name /* [in] [unique] */, struct lsa_SidArray *sids /* [out] [ref] */); +struct tevent_req *rpccli_lsa_EnumAccountRights_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct dom_sid2 *_sid /* [in] [ref] */, + struct lsa_RightSet *_rights /* [out] [ref] */); +NTSTATUS rpccli_lsa_EnumAccountRights_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_EnumAccountRights(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct dom_sid2 *sid /* [in] [ref] */, struct lsa_RightSet *rights /* [out] [ref] */); +struct tevent_req *rpccli_lsa_AddAccountRights_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct dom_sid2 *_sid /* [in] [ref] */, + struct lsa_RightSet *_rights /* [in] [ref] */); +NTSTATUS rpccli_lsa_AddAccountRights_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_AddAccountRights(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct dom_sid2 *sid /* [in] [ref] */, struct lsa_RightSet *rights /* [in] [ref] */); +struct tevent_req *rpccli_lsa_RemoveAccountRights_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct dom_sid2 *_sid /* [in] [ref] */, + uint8_t _remove_all /* [in] */, + struct lsa_RightSet *_rights /* [in] [ref] */); +NTSTATUS rpccli_lsa_RemoveAccountRights_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_RemoveAccountRights(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct dom_sid2 *sid /* [in] [ref] */, uint8_t remove_all /* [in] */, struct lsa_RightSet *rights /* [in] [ref] */); +struct tevent_req *rpccli_lsa_QueryTrustedDomainInfoBySid_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct dom_sid2 *_dom_sid /* [in] [ref] */, + enum lsa_TrustDomInfoEnum _level /* [in] */, + union lsa_TrustedDomainInfo **_info /* [out] [ref,switch_is(level)] */); +NTSTATUS rpccli_lsa_QueryTrustedDomainInfoBySid_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_QueryTrustedDomainInfoBySid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct dom_sid2 *dom_sid /* [in] [ref] */, enum lsa_TrustDomInfoEnum level /* [in] */, union lsa_TrustedDomainInfo **info /* [out] [ref,switch_is(level)] */); +struct tevent_req *rpccli_lsa_SetTrustedDomainInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct dom_sid2 *_dom_sid /* [in] [ref] */, + enum lsa_TrustDomInfoEnum _level /* [in] */, + union lsa_TrustedDomainInfo *_info /* [in] [ref,switch_is(level)] */); +NTSTATUS rpccli_lsa_SetTrustedDomainInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_SetTrustedDomainInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct dom_sid2 *dom_sid /* [in] [ref] */, enum lsa_TrustDomInfoEnum level /* [in] */, union lsa_TrustedDomainInfo *info /* [in] [ref,switch_is(level)] */); +struct tevent_req *rpccli_lsa_DeleteTrustedDomain_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct dom_sid2 *_dom_sid /* [in] [ref] */); +NTSTATUS rpccli_lsa_DeleteTrustedDomain_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_DeleteTrustedDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct dom_sid2 *dom_sid /* [in] [ref] */); +struct tevent_req *rpccli_lsa_StorePrivateData_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_String *_name /* [in] [ref] */, + struct lsa_DATA_BUF *_val /* [in] [unique] */); +NTSTATUS rpccli_lsa_StorePrivateData_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_StorePrivateData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct lsa_String *name /* [in] [ref] */, struct lsa_DATA_BUF *val /* [in] [unique] */); +struct tevent_req *rpccli_lsa_RetrievePrivateData_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_String *_name /* [in] [ref] */, + struct lsa_DATA_BUF **_val /* [in,out] [ref] */); +NTSTATUS rpccli_lsa_RetrievePrivateData_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_RetrievePrivateData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct lsa_String *name /* [in] [ref] */, struct lsa_DATA_BUF **val /* [in,out] [ref] */); +struct tevent_req *rpccli_lsa_OpenPolicy2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_system_name /* [in] [unique,charset(UTF16)] */, + struct lsa_ObjectAttribute *_attr /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */); +NTSTATUS rpccli_lsa_OpenPolicy2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_OpenPolicy2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *system_name /* [in] [unique,charset(UTF16)] */, struct lsa_ObjectAttribute *attr /* [in] [ref] */, uint32_t access_mask /* [in] */, struct policy_handle *handle /* [out] [ref] */); +struct tevent_req *rpccli_lsa_GetUserName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_system_name /* [in] [unique,charset(UTF16)] */, + struct lsa_String **_account_name /* [in,out] [ref] */, + struct lsa_String **_authority_name /* [in,out] [unique] */); +NTSTATUS rpccli_lsa_GetUserName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_GetUserName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *system_name /* [in] [unique,charset(UTF16)] */, struct lsa_String **account_name /* [in,out] [ref] */, struct lsa_String **authority_name /* [in,out] [unique] */); +struct tevent_req *rpccli_lsa_QueryInfoPolicy2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + enum lsa_PolicyInfo _level /* [in] */, + union lsa_PolicyInformation **_info /* [out] [ref,switch_is(level)] */); +NTSTATUS rpccli_lsa_QueryInfoPolicy2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_QueryInfoPolicy2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, enum lsa_PolicyInfo level /* [in] */, union lsa_PolicyInformation **info /* [out] [ref,switch_is(level)] */); +struct tevent_req *rpccli_lsa_SetInfoPolicy2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + enum lsa_PolicyInfo _level /* [in] */, + union lsa_PolicyInformation *_info /* [in] [ref,switch_is(level)] */); +NTSTATUS rpccli_lsa_SetInfoPolicy2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_SetInfoPolicy2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, enum lsa_PolicyInfo level /* [in] */, union lsa_PolicyInformation *info /* [in] [ref,switch_is(level)] */); +struct tevent_req *rpccli_lsa_QueryTrustedDomainInfoByName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_String *_trusted_domain /* [in] [ref] */, + enum lsa_TrustDomInfoEnum _level /* [in] */, + union lsa_TrustedDomainInfo **_info /* [out] [ref,switch_is(level)] */); +NTSTATUS rpccli_lsa_QueryTrustedDomainInfoByName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_QueryTrustedDomainInfoByName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct lsa_String *trusted_domain /* [in] [ref] */, enum lsa_TrustDomInfoEnum level /* [in] */, union lsa_TrustedDomainInfo **info /* [out] [ref,switch_is(level)] */); +struct tevent_req *rpccli_lsa_SetTrustedDomainInfoByName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_String _trusted_domain /* [in] */, + enum lsa_TrustDomInfoEnum _level /* [in] */, + union lsa_TrustedDomainInfo *_info /* [in] [unique,switch_is(level)] */); +NTSTATUS rpccli_lsa_SetTrustedDomainInfoByName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_SetTrustedDomainInfoByName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct lsa_String trusted_domain /* [in] */, enum lsa_TrustDomInfoEnum level /* [in] */, union lsa_TrustedDomainInfo *info /* [in] [unique,switch_is(level)] */); +struct tevent_req *rpccli_lsa_EnumTrustedDomainsEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t *_resume_handle /* [in,out] [ref] */, + struct lsa_DomainListEx *_domains /* [out] [ref] */, + uint32_t _max_size /* [in] */); +NTSTATUS rpccli_lsa_EnumTrustedDomainsEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_EnumTrustedDomainsEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t *resume_handle /* [in,out] [ref] */, struct lsa_DomainListEx *domains /* [out] [ref] */, uint32_t max_size /* [in] */); +struct tevent_req *rpccli_lsa_CreateTrustedDomainEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_policy_handle /* [in] [ref] */, + struct lsa_TrustDomainInfoInfoEx *_info /* [in] [ref] */, + struct lsa_TrustDomainInfoAuthInfoInternal *_auth_info /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_trustdom_handle /* [out] [ref] */); +NTSTATUS rpccli_lsa_CreateTrustedDomainEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_CreateTrustedDomainEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *policy_handle /* [in] [ref] */, @@ -269,27 +745,82 @@ NTSTATUS rpccli_lsa_CreateTrustedDomainEx(struct rpc_pipe_client *cli, struct lsa_TrustDomainInfoAuthInfoInternal *auth_info /* [in] [ref] */, uint32_t access_mask /* [in] */, struct policy_handle *trustdom_handle /* [out] [ref] */); +struct tevent_req *rpccli_lsa_CloseTrustedDomainEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in,out] [ref] */); +NTSTATUS rpccli_lsa_CloseTrustedDomainEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_CloseTrustedDomainEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in,out] [ref] */); +struct tevent_req *rpccli_lsa_QueryDomainInformationPolicy_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint16_t _level /* [in] */, + union lsa_DomainInformationPolicy **_info /* [out] [ref,switch_is(level)] */); +NTSTATUS rpccli_lsa_QueryDomainInformationPolicy_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_QueryDomainInformationPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint16_t level /* [in] */, union lsa_DomainInformationPolicy **info /* [out] [ref,switch_is(level)] */); +struct tevent_req *rpccli_lsa_SetDomainInformationPolicy_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint16_t _level /* [in] */, + union lsa_DomainInformationPolicy *_info /* [in] [unique,switch_is(level)] */); +NTSTATUS rpccli_lsa_SetDomainInformationPolicy_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_SetDomainInformationPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint16_t level /* [in] */, union lsa_DomainInformationPolicy *info /* [in] [unique,switch_is(level)] */); +struct tevent_req *rpccli_lsa_OpenTrustedDomainByName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_String _name /* [in] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_trustdom_handle /* [out] [ref] */); +NTSTATUS rpccli_lsa_OpenTrustedDomainByName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_OpenTrustedDomainByName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct lsa_String name /* [in] */, uint32_t access_mask /* [in] */, struct policy_handle *trustdom_handle /* [out] [ref] */); +struct tevent_req *rpccli_lsa_TestCall_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_lsa_TestCall_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_TestCall(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_lsa_LookupSids2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_SidArray *_sids /* [in] [ref] */, + struct lsa_RefDomainList **_domains /* [out] [ref] */, + struct lsa_TransNameArray2 *_names /* [in,out] [ref] */, + uint16_t _level /* [in] */, + uint32_t *_count /* [in,out] [ref] */, + uint32_t _unknown1 /* [in] */, + uint32_t _unknown2 /* [in] */); +NTSTATUS rpccli_lsa_LookupSids2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_LookupSids2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -300,6 +831,21 @@ NTSTATUS rpccli_lsa_LookupSids2(struct rpc_pipe_client *cli, uint32_t *count /* [in,out] [ref] */, uint32_t unknown1 /* [in] */, uint32_t unknown2 /* [in] */); +struct tevent_req *rpccli_lsa_LookupNames2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _num_names /* [in] [range(0,1000)] */, + struct lsa_String *_names /* [in] [size_is(num_names)] */, + struct lsa_RefDomainList **_domains /* [out] [ref] */, + struct lsa_TransSidArray2 *_sids /* [in,out] [ref] */, + enum lsa_LookupNamesLevel _level /* [in] */, + uint32_t *_count /* [in,out] [ref] */, + uint32_t _lookup_options /* [in] */, + uint32_t _client_revision /* [in] */); +NTSTATUS rpccli_lsa_LookupNames2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -311,6 +857,17 @@ NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli, uint32_t *count /* [in,out] [ref] */, uint32_t lookup_options /* [in] */, uint32_t client_revision /* [in] */); +struct tevent_req *rpccli_lsa_CreateTrustedDomainEx2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_policy_handle /* [in] [ref] */, + struct lsa_TrustDomainInfoInfoEx *_info /* [in] [ref] */, + struct lsa_TrustDomainInfoAuthInfoInternal *_auth_info /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_trustdom_handle /* [out] [ref] */); +NTSTATUS rpccli_lsa_CreateTrustedDomainEx2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_CreateTrustedDomainEx2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *policy_handle /* [in] [ref] */, @@ -318,22 +875,85 @@ NTSTATUS rpccli_lsa_CreateTrustedDomainEx2(struct rpc_pipe_client *cli, struct lsa_TrustDomainInfoAuthInfoInternal *auth_info /* [in] [ref] */, uint32_t access_mask /* [in] */, struct policy_handle *trustdom_handle /* [out] [ref] */); +struct tevent_req *rpccli_lsa_CREDRWRITE_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_lsa_CREDRWRITE_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_CREDRWRITE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_lsa_CREDRREAD_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_lsa_CREDRREAD_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_CREDRREAD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_lsa_CREDRENUMERATE_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_lsa_CREDRENUMERATE_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_CREDRENUMERATE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_lsa_CREDRREADDOMAINCREDENTIALS_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_lsa_CREDRREADDOMAINCREDENTIALS_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_CREDRREADDOMAINCREDENTIALS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_lsa_CREDRDELETE_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_lsa_CREDRDELETE_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_CREDRDELETE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_lsa_CREDRGETTARGETINFO_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_lsa_CREDRGETTARGETINFO_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_CREDRGETTARGETINFO(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_lsa_CREDRPROFILELOADED_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_lsa_CREDRPROFILELOADED_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_CREDRPROFILELOADED(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_lsa_LookupNames3_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _num_names /* [in] [range(0,1000)] */, + struct lsa_String *_names /* [in] [size_is(num_names)] */, + struct lsa_RefDomainList **_domains /* [out] [ref] */, + struct lsa_TransSidArray3 *_sids /* [in,out] [ref] */, + enum lsa_LookupNamesLevel _level /* [in] */, + uint32_t *_count /* [in,out] [ref] */, + uint32_t _lookup_options /* [in] */, + uint32_t _client_revision /* [in] */); +NTSTATUS rpccli_lsa_LookupNames3_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_LookupNames3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -345,24 +965,83 @@ NTSTATUS rpccli_lsa_LookupNames3(struct rpc_pipe_client *cli, uint32_t *count /* [in,out] [ref] */, uint32_t lookup_options /* [in] */, uint32_t client_revision /* [in] */); +struct tevent_req *rpccli_lsa_CREDRGETSESSIONTYPES_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_lsa_CREDRGETSESSIONTYPES_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_CREDRGETSESSIONTYPES(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_lsa_LSARREGISTERAUDITEVENT_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_lsa_LSARREGISTERAUDITEVENT_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_LSARREGISTERAUDITEVENT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_lsa_LSARGENAUDITEVENT_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_lsa_LSARGENAUDITEVENT_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_LSARGENAUDITEVENT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_lsa_LSARUNREGISTERAUDITEVENT_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_lsa_LSARUNREGISTERAUDITEVENT_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_LSARUNREGISTERAUDITEVENT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_lsa_lsaRQueryForestTrustInformation_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct lsa_String *_trusted_domain_name /* [in] [ref] */, + uint16_t _unknown /* [in] */, + struct lsa_ForestTrustInformation **_forest_trust_info /* [out] [ref] */); +NTSTATUS rpccli_lsa_lsaRQueryForestTrustInformation_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_lsaRQueryForestTrustInformation(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct lsa_String *trusted_domain_name /* [in] [ref] */, uint16_t unknown /* [in] */, struct lsa_ForestTrustInformation **forest_trust_info /* [out] [ref] */); +struct tevent_req *rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_lsa_LSARSETFORESTTRUSTINFORMATION_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_LSARSETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_lsa_CREDRRENAME_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_lsa_CREDRRENAME_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_CREDRRENAME(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_lsa_LookupSids3_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct lsa_SidArray *_sids /* [in] [ref] */, + struct lsa_RefDomainList **_domains /* [out] [ref] */, + struct lsa_TransNameArray2 *_names /* [in,out] [ref] */, + uint16_t _level /* [in] */, + uint32_t *_count /* [in,out] [ref] */, + uint32_t _unknown1 /* [in] */, + uint32_t _unknown2 /* [in] */); +NTSTATUS rpccli_lsa_LookupSids3_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_LookupSids3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct lsa_SidArray *sids /* [in] [ref] */, @@ -372,6 +1051,20 @@ NTSTATUS rpccli_lsa_LookupSids3(struct rpc_pipe_client *cli, uint32_t *count /* [in,out] [ref] */, uint32_t unknown1 /* [in] */, uint32_t unknown2 /* [in] */); +struct tevent_req *rpccli_lsa_LookupNames4_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint32_t _num_names /* [in] [range(0,1000)] */, + struct lsa_String *_names /* [in] [size_is(num_names)] */, + struct lsa_RefDomainList **_domains /* [out] [ref] */, + struct lsa_TransSidArray3 *_sids /* [in,out] [ref] */, + enum lsa_LookupNamesLevel _level /* [in] */, + uint32_t *_count /* [in,out] [ref] */, + uint32_t _lookup_options /* [in] */, + uint32_t _client_revision /* [in] */); +NTSTATUS rpccli_lsa_LookupNames4_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_LookupNames4(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t num_names /* [in] [range(0,1000)] */, @@ -382,12 +1075,36 @@ NTSTATUS rpccli_lsa_LookupNames4(struct rpc_pipe_client *cli, uint32_t *count /* [in,out] [ref] */, uint32_t lookup_options /* [in] */, uint32_t client_revision /* [in] */); +struct tevent_req *rpccli_lsa_LSAROPENPOLICYSCE_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_lsa_LSAROPENPOLICYSCE_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_LSAROPENPOLICYSCE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); +struct tevent_req *rpccli_lsa_LSARADTREPORTSECURITYEVENT_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_lsa_LSARADTREPORTSECURITYEVENT_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_lsa_LSARADTREPORTSECURITYEVENT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); #endif /* __CLI_LSARPC__ */ diff --git a/librpc/gen_ndr/cli_netlogon.c b/librpc/gen_ndr/cli_netlogon.c index d3efab6780..6d454ce9f2 100644 --- a/librpc/gen_ndr/cli_netlogon.c +++ b/librpc/gen_ndr/cli_netlogon.c @@ -6,6 +6,131 @@ #include "includes.h" #include "../librpc/gen_ndr/cli_netlogon.h" +struct rpccli_netr_LogonUasLogon_state { + struct netr_LogonUasLogon orig; + struct netr_LogonUasLogon tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_LogonUasLogon_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_LogonUasLogon_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_account_name /* [in] [charset(UTF16)] */, + const char *_workstation /* [in] [charset(UTF16)] */, + struct netr_UasInfo **_info /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_netr_LogonUasLogon_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_LogonUasLogon_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.account_name = _account_name; + state->orig.in.workstation = _workstation; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_LogonUasLogon, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_LogonUasLogon_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_netlogon, + NDR_NETR_LOGONUASLOGON, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_LogonUasLogon_done, req); + return req; +} + +static void rpccli_netr_LogonUasLogon_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_LogonUasLogon_state *state = tevent_req_data( + req, struct rpccli_netr_LogonUasLogon_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(netr_LogonUasLogon, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_LogonUasLogon_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_netr_LogonUasLogon_state *state = tevent_req_data( + req, struct rpccli_netr_LogonUasLogon_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_netr_LogonUasLogon(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -55,6 +180,131 @@ NTSTATUS rpccli_netr_LogonUasLogon(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_netr_LogonUasLogoff_state { + struct netr_LogonUasLogoff orig; + struct netr_LogonUasLogoff tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_LogonUasLogoff_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_LogonUasLogoff_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_account_name /* [in] [charset(UTF16)] */, + const char *_workstation /* [in] [charset(UTF16)] */, + struct netr_UasLogoffInfo *_info /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_netr_LogonUasLogoff_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_LogonUasLogoff_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.account_name = _account_name; + state->orig.in.workstation = _workstation; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_LogonUasLogoff, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_LogonUasLogoff_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_netlogon, + NDR_NETR_LOGONUASLOGOFF, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_LogonUasLogoff_done, req); + return req; +} + +static void rpccli_netr_LogonUasLogoff_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_LogonUasLogoff_state *state = tevent_req_data( + req, struct rpccli_netr_LogonUasLogoff_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(netr_LogonUasLogoff, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_LogonUasLogoff_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_netr_LogonUasLogoff_state *state = tevent_req_data( + req, struct rpccli_netr_LogonUasLogoff_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_netr_LogonUasLogoff(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -104,6 +354,146 @@ NTSTATUS rpccli_netr_LogonUasLogoff(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_netr_LogonSamLogon_state { + struct netr_LogonSamLogon orig; + struct netr_LogonSamLogon tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_LogonSamLogon_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_LogonSamLogon_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_computer_name /* [in] [unique,charset(UTF16)] */, + struct netr_Authenticator *_credential /* [in] [unique] */, + struct netr_Authenticator *_return_authenticator /* [in,out] [unique] */, + enum netr_LogonInfoClass _logon_level /* [in] */, + union netr_LogonLevel *_logon /* [in] [ref,switch_is(logon_level)] */, + uint16_t _validation_level /* [in] */, + union netr_Validation *_validation /* [out] [ref,switch_is(validation_level)] */, + uint8_t *_authoritative /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_netr_LogonSamLogon_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_LogonSamLogon_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.computer_name = _computer_name; + state->orig.in.credential = _credential; + state->orig.in.return_authenticator = _return_authenticator; + state->orig.in.logon_level = _logon_level; + state->orig.in.logon = _logon; + state->orig.in.validation_level = _validation_level; + + /* Out parameters */ + state->orig.out.return_authenticator = _return_authenticator; + state->orig.out.validation = _validation; + state->orig.out.authoritative = _authoritative; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_LogonSamLogon, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_LogonSamLogon_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_netlogon, + NDR_NETR_LOGONSAMLOGON, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_LogonSamLogon_done, req); + return req; +} + +static void rpccli_netr_LogonSamLogon_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_LogonSamLogon_state *state = tevent_req_data( + req, struct rpccli_netr_LogonSamLogon_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 */ + if (state->orig.out.return_authenticator && state->tmp.out.return_authenticator) { + *state->orig.out.return_authenticator = *state->tmp.out.return_authenticator; + } + *state->orig.out.validation = *state->tmp.out.validation; + *state->orig.out.authoritative = *state->tmp.out.authoritative; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_LogonSamLogon, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_LogonSamLogon_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_netr_LogonSamLogon_state *state = tevent_req_data( + req, struct rpccli_netr_LogonSamLogon_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_netr_LogonSamLogon(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -161,6 +551,138 @@ NTSTATUS rpccli_netr_LogonSamLogon(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_netr_LogonSamLogoff_state { + struct netr_LogonSamLogoff orig; + struct netr_LogonSamLogoff tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_LogonSamLogoff_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_LogonSamLogoff_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_computer_name /* [in] [unique,charset(UTF16)] */, + struct netr_Authenticator *_credential /* [in] [unique] */, + struct netr_Authenticator *_return_authenticator /* [in,out] [unique] */, + enum netr_LogonInfoClass _logon_level /* [in] */, + union netr_LogonLevel _logon /* [in] [switch_is(logon_level)] */) +{ + struct tevent_req *req; + struct rpccli_netr_LogonSamLogoff_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_LogonSamLogoff_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.computer_name = _computer_name; + state->orig.in.credential = _credential; + state->orig.in.return_authenticator = _return_authenticator; + state->orig.in.logon_level = _logon_level; + state->orig.in.logon = _logon; + + /* Out parameters */ + state->orig.out.return_authenticator = _return_authenticator; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_LogonSamLogoff, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_LogonSamLogoff_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_netlogon, + NDR_NETR_LOGONSAMLOGOFF, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_LogonSamLogoff_done, req); + return req; +} + +static void rpccli_netr_LogonSamLogoff_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_LogonSamLogoff_state *state = tevent_req_data( + req, struct rpccli_netr_LogonSamLogoff_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 */ + if (state->orig.out.return_authenticator && state->tmp.out.return_authenticator) { + *state->orig.out.return_authenticator = *state->tmp.out.return_authenticator; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_LogonSamLogoff, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_LogonSamLogoff_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_netr_LogonSamLogoff_state *state = tevent_req_data( + req, struct rpccli_netr_LogonSamLogoff_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_netr_LogonSamLogoff(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -212,6 +734,131 @@ NTSTATUS rpccli_netr_LogonSamLogoff(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_netr_ServerReqChallenge_state { + struct netr_ServerReqChallenge orig; + struct netr_ServerReqChallenge tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_ServerReqChallenge_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_ServerReqChallenge_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_computer_name /* [in] [charset(UTF16)] */, + struct netr_Credential *_credentials /* [in] [ref] */, + struct netr_Credential *_return_credentials /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_netr_ServerReqChallenge_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_ServerReqChallenge_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.computer_name = _computer_name; + state->orig.in.credentials = _credentials; + + /* Out parameters */ + state->orig.out.return_credentials = _return_credentials; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_ServerReqChallenge, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_ServerReqChallenge_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_netlogon, + NDR_NETR_SERVERREQCHALLENGE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_ServerReqChallenge_done, req); + return req; +} + +static void rpccli_netr_ServerReqChallenge_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_ServerReqChallenge_state *state = tevent_req_data( + req, struct rpccli_netr_ServerReqChallenge_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.return_credentials = *state->tmp.out.return_credentials; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_ServerReqChallenge, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_ServerReqChallenge_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_netr_ServerReqChallenge_state *state = tevent_req_data( + req, struct rpccli_netr_ServerReqChallenge_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_netr_ServerReqChallenge(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -256,6 +903,135 @@ NTSTATUS rpccli_netr_ServerReqChallenge(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_netr_ServerAuthenticate_state { + struct netr_ServerAuthenticate orig; + struct netr_ServerAuthenticate tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_ServerAuthenticate_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_ServerAuthenticate_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_account_name /* [in] [charset(UTF16)] */, + enum netr_SchannelType _secure_channel_type /* [in] */, + const char *_computer_name /* [in] [charset(UTF16)] */, + struct netr_Credential *_credentials /* [in] [ref] */, + struct netr_Credential *_return_credentials /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_netr_ServerAuthenticate_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_ServerAuthenticate_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.account_name = _account_name; + state->orig.in.secure_channel_type = _secure_channel_type; + state->orig.in.computer_name = _computer_name; + state->orig.in.credentials = _credentials; + + /* Out parameters */ + state->orig.out.return_credentials = _return_credentials; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_ServerAuthenticate, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_ServerAuthenticate_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_netlogon, + NDR_NETR_SERVERAUTHENTICATE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_ServerAuthenticate_done, req); + return req; +} + +static void rpccli_netr_ServerAuthenticate_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_ServerAuthenticate_state *state = tevent_req_data( + req, struct rpccli_netr_ServerAuthenticate_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.return_credentials = *state->tmp.out.return_credentials; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_ServerAuthenticate_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_netr_ServerAuthenticate_state *state = tevent_req_data( + req, struct rpccli_netr_ServerAuthenticate_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_netr_ServerAuthenticate(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -304,6 +1080,137 @@ NTSTATUS rpccli_netr_ServerAuthenticate(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_netr_ServerPasswordSet_state { + struct netr_ServerPasswordSet orig; + struct netr_ServerPasswordSet tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_ServerPasswordSet_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_ServerPasswordSet_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_account_name /* [in] [charset(UTF16)] */, + enum netr_SchannelType _secure_channel_type /* [in] */, + const char *_computer_name /* [in] [charset(UTF16)] */, + struct netr_Authenticator *_credential /* [in] [ref] */, + struct netr_Authenticator *_return_authenticator /* [out] [ref] */, + struct samr_Password *_new_password /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_netr_ServerPasswordSet_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_ServerPasswordSet_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.account_name = _account_name; + state->orig.in.secure_channel_type = _secure_channel_type; + state->orig.in.computer_name = _computer_name; + state->orig.in.credential = _credential; + state->orig.in.new_password = _new_password; + + /* Out parameters */ + state->orig.out.return_authenticator = _return_authenticator; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_ServerPasswordSet, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_ServerPasswordSet_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_netlogon, + NDR_NETR_SERVERPASSWORDSET, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_ServerPasswordSet_done, req); + return req; +} + +static void rpccli_netr_ServerPasswordSet_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_ServerPasswordSet_state *state = tevent_req_data( + req, struct rpccli_netr_ServerPasswordSet_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.return_authenticator = *state->tmp.out.return_authenticator; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_ServerPasswordSet, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_ServerPasswordSet_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_netr_ServerPasswordSet_state *state = tevent_req_data( + req, struct rpccli_netr_ServerPasswordSet_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_netr_ServerPasswordSet(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -354,6 +1261,143 @@ NTSTATUS rpccli_netr_ServerPasswordSet(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_netr_DatabaseDeltas_state { + struct netr_DatabaseDeltas orig; + struct netr_DatabaseDeltas tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_DatabaseDeltas_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_DatabaseDeltas_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_logon_server /* [in] [charset(UTF16)] */, + const char *_computername /* [in] [charset(UTF16)] */, + struct netr_Authenticator *_credential /* [in] [ref] */, + struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */, + enum netr_SamDatabaseID _database_id /* [in] */, + uint64_t *_sequence_num /* [in,out] [ref] */, + struct netr_DELTA_ENUM_ARRAY **_delta_enum_array /* [out] [ref] */, + uint32_t _preferredmaximumlength /* [in] */) +{ + struct tevent_req *req; + struct rpccli_netr_DatabaseDeltas_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_DatabaseDeltas_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.logon_server = _logon_server; + state->orig.in.computername = _computername; + state->orig.in.credential = _credential; + state->orig.in.return_authenticator = _return_authenticator; + state->orig.in.database_id = _database_id; + state->orig.in.sequence_num = _sequence_num; + state->orig.in.preferredmaximumlength = _preferredmaximumlength; + + /* Out parameters */ + state->orig.out.return_authenticator = _return_authenticator; + state->orig.out.sequence_num = _sequence_num; + state->orig.out.delta_enum_array = _delta_enum_array; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_DatabaseDeltas, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_DatabaseDeltas_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_netlogon, + NDR_NETR_DATABASEDELTAS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_DatabaseDeltas_done, req); + return req; +} + +static void rpccli_netr_DatabaseDeltas_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_DatabaseDeltas_state *state = tevent_req_data( + req, struct rpccli_netr_DatabaseDeltas_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.return_authenticator = *state->tmp.out.return_authenticator; + *state->orig.out.sequence_num = *state->tmp.out.sequence_num; + *state->orig.out.delta_enum_array = *state->tmp.out.delta_enum_array; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_DatabaseDeltas, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_DatabaseDeltas_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_netr_DatabaseDeltas_state *state = tevent_req_data( + req, struct rpccli_netr_DatabaseDeltas_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_netr_DatabaseDeltas(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server /* [in] [charset(UTF16)] */, @@ -408,6 +1452,143 @@ NTSTATUS rpccli_netr_DatabaseDeltas(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_netr_DatabaseSync_state { + struct netr_DatabaseSync orig; + struct netr_DatabaseSync tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_DatabaseSync_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_DatabaseSync_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_logon_server /* [in] [charset(UTF16)] */, + const char *_computername /* [in] [charset(UTF16)] */, + struct netr_Authenticator *_credential /* [in] [ref] */, + struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */, + enum netr_SamDatabaseID _database_id /* [in] */, + uint32_t *_sync_context /* [in,out] [ref] */, + struct netr_DELTA_ENUM_ARRAY **_delta_enum_array /* [out] [ref] */, + uint32_t _preferredmaximumlength /* [in] */) +{ + struct tevent_req *req; + struct rpccli_netr_DatabaseSync_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_DatabaseSync_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.logon_server = _logon_server; + state->orig.in.computername = _computername; + state->orig.in.credential = _credential; + state->orig.in.return_authenticator = _return_authenticator; + state->orig.in.database_id = _database_id; + state->orig.in.sync_context = _sync_context; + state->orig.in.preferredmaximumlength = _preferredmaximumlength; + + /* Out parameters */ + state->orig.out.return_authenticator = _return_authenticator; + state->orig.out.sync_context = _sync_context; + state->orig.out.delta_enum_array = _delta_enum_array; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_DatabaseSync, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_DatabaseSync_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_netlogon, + NDR_NETR_DATABASESYNC, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_DatabaseSync_done, req); + return req; +} + +static void rpccli_netr_DatabaseSync_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_DatabaseSync_state *state = tevent_req_data( + req, struct rpccli_netr_DatabaseSync_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.return_authenticator = *state->tmp.out.return_authenticator; + *state->orig.out.sync_context = *state->tmp.out.sync_context; + *state->orig.out.delta_enum_array = *state->tmp.out.delta_enum_array; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_DatabaseSync, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_DatabaseSync_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_netr_DatabaseSync_state *state = tevent_req_data( + req, struct rpccli_netr_DatabaseSync_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_netr_DatabaseSync(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server /* [in] [charset(UTF16)] */, @@ -462,6 +1643,152 @@ NTSTATUS rpccli_netr_DatabaseSync(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_netr_AccountDeltas_state { + struct netr_AccountDeltas orig; + struct netr_AccountDeltas tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_AccountDeltas_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_AccountDeltas_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_logon_server /* [in] [unique,charset(UTF16)] */, + const char *_computername /* [in] [charset(UTF16)] */, + struct netr_Authenticator _credential /* [in] */, + struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */, + struct netr_UAS_INFO_0 _uas /* [in] */, + uint32_t _count /* [in] */, + uint32_t _level /* [in] */, + uint32_t _buffersize /* [in] */, + struct netr_AccountBuffer *_buffer /* [out] [ref,subcontext(4)] */, + uint32_t *_count_returned /* [out] [ref] */, + uint32_t *_total_entries /* [out] [ref] */, + struct netr_UAS_INFO_0 *_recordid /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_netr_AccountDeltas_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_AccountDeltas_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.logon_server = _logon_server; + state->orig.in.computername = _computername; + state->orig.in.credential = _credential; + state->orig.in.return_authenticator = _return_authenticator; + state->orig.in.uas = _uas; + state->orig.in.count = _count; + state->orig.in.level = _level; + state->orig.in.buffersize = _buffersize; + + /* Out parameters */ + state->orig.out.return_authenticator = _return_authenticator; + state->orig.out.buffer = _buffer; + state->orig.out.count_returned = _count_returned; + state->orig.out.total_entries = _total_entries; + state->orig.out.recordid = _recordid; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_AccountDeltas, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_AccountDeltas_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_netlogon, + NDR_NETR_ACCOUNTDELTAS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_AccountDeltas_done, req); + return req; +} + +static void rpccli_netr_AccountDeltas_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_AccountDeltas_state *state = tevent_req_data( + req, struct rpccli_netr_AccountDeltas_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.return_authenticator = *state->tmp.out.return_authenticator; + *state->orig.out.buffer = *state->tmp.out.buffer; + *state->orig.out.count_returned = *state->tmp.out.count_returned; + *state->orig.out.total_entries = *state->tmp.out.total_entries; + *state->orig.out.recordid = *state->tmp.out.recordid; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_AccountDeltas, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_AccountDeltas_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_netr_AccountDeltas_state *state = tevent_req_data( + req, struct rpccli_netr_AccountDeltas_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_netr_AccountDeltas(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server /* [in] [unique,charset(UTF16)] */, @@ -523,6 +1850,154 @@ NTSTATUS rpccli_netr_AccountDeltas(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_netr_AccountSync_state { + struct netr_AccountSync orig; + struct netr_AccountSync tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_AccountSync_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_AccountSync_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_logon_server /* [in] [unique,charset(UTF16)] */, + const char *_computername /* [in] [charset(UTF16)] */, + struct netr_Authenticator _credential /* [in] */, + struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */, + uint32_t _reference /* [in] */, + uint32_t _level /* [in] */, + uint32_t _buffersize /* [in] */, + struct netr_AccountBuffer *_buffer /* [out] [ref,subcontext(4)] */, + uint32_t *_count_returned /* [out] [ref] */, + uint32_t *_total_entries /* [out] [ref] */, + uint32_t *_next_reference /* [out] [ref] */, + struct netr_UAS_INFO_0 *_recordid /* [in,out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_netr_AccountSync_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_AccountSync_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.logon_server = _logon_server; + state->orig.in.computername = _computername; + state->orig.in.credential = _credential; + state->orig.in.return_authenticator = _return_authenticator; + state->orig.in.reference = _reference; + state->orig.in.level = _level; + state->orig.in.buffersize = _buffersize; + state->orig.in.recordid = _recordid; + + /* Out parameters */ + state->orig.out.return_authenticator = _return_authenticator; + state->orig.out.buffer = _buffer; + state->orig.out.count_returned = _count_returned; + state->orig.out.total_entries = _total_entries; + state->orig.out.next_reference = _next_reference; + state->orig.out.recordid = _recordid; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_AccountSync, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_AccountSync_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_netlogon, + NDR_NETR_ACCOUNTSYNC, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_AccountSync_done, req); + return req; +} + +static void rpccli_netr_AccountSync_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_AccountSync_state *state = tevent_req_data( + req, struct rpccli_netr_AccountSync_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.return_authenticator = *state->tmp.out.return_authenticator; + *state->orig.out.buffer = *state->tmp.out.buffer; + *state->orig.out.count_returned = *state->tmp.out.count_returned; + *state->orig.out.total_entries = *state->tmp.out.total_entries; + *state->orig.out.next_reference = *state->tmp.out.next_reference; + *state->orig.out.recordid = *state->tmp.out.recordid; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_AccountSync, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_AccountSync_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_netr_AccountSync_state *state = tevent_req_data( + req, struct rpccli_netr_AccountSync_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_netr_AccountSync(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server /* [in] [unique,charset(UTF16)] */, @@ -585,6 +2060,129 @@ NTSTATUS rpccli_netr_AccountSync(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_netr_GetDcName_state { + struct netr_GetDcName orig; + struct netr_GetDcName tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_GetDcName_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_GetDcName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_logon_server /* [in] [charset(UTF16)] */, + const char *_domainname /* [in] [unique,charset(UTF16)] */, + const char **_dcname /* [out] [ref,charset(UTF16)] */) +{ + struct tevent_req *req; + struct rpccli_netr_GetDcName_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_GetDcName_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.logon_server = _logon_server; + state->orig.in.domainname = _domainname; + + /* Out parameters */ + state->orig.out.dcname = _dcname; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_GetDcName, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_GetDcName_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_netlogon, + NDR_NETR_GETDCNAME, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_GetDcName_done, req); + return req; +} + +static void rpccli_netr_GetDcName_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_GetDcName_state *state = tevent_req_data( + req, struct rpccli_netr_GetDcName_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.dcname = *state->tmp.out.dcname; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_GetDcName, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_GetDcName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_netr_GetDcName_state *state = tevent_req_data( + req, struct rpccli_netr_GetDcName_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_netr_GetDcName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server /* [in] [charset(UTF16)] */, @@ -632,6 +2230,131 @@ NTSTATUS rpccli_netr_GetDcName(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_netr_LogonControl_state { + struct netr_LogonControl orig; + struct netr_LogonControl tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_LogonControl_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_LogonControl_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_logon_server /* [in] [unique,charset(UTF16)] */, + enum netr_LogonControlCode _function_code /* [in] */, + uint32_t _level /* [in] */, + union netr_CONTROL_QUERY_INFORMATION *_query /* [out] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_netr_LogonControl_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_LogonControl_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.logon_server = _logon_server; + state->orig.in.function_code = _function_code; + state->orig.in.level = _level; + + /* Out parameters */ + state->orig.out.query = _query; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_LogonControl, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_LogonControl_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_netlogon, + NDR_NETR_LOGONCONTROL, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_LogonControl_done, req); + return req; +} + +static void rpccli_netr_LogonControl_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_LogonControl_state *state = tevent_req_data( + req, struct rpccli_netr_LogonControl_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.query = *state->tmp.out.query; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_LogonControl, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_LogonControl_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_netr_LogonControl_state *state = tevent_req_data( + req, struct rpccli_netr_LogonControl_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_netr_LogonControl(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server /* [in] [unique,charset(UTF16)] */, @@ -681,6 +2404,129 @@ NTSTATUS rpccli_netr_LogonControl(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_netr_GetAnyDCName_state { + struct netr_GetAnyDCName orig; + struct netr_GetAnyDCName tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_GetAnyDCName_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_GetAnyDCName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_logon_server /* [in] [unique,charset(UTF16)] */, + const char *_domainname /* [in] [unique,charset(UTF16)] */, + const char **_dcname /* [out] [ref,charset(UTF16)] */) +{ + struct tevent_req *req; + struct rpccli_netr_GetAnyDCName_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_GetAnyDCName_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.logon_server = _logon_server; + state->orig.in.domainname = _domainname; + + /* Out parameters */ + state->orig.out.dcname = _dcname; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_GetAnyDCName, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_GetAnyDCName_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_netlogon, + NDR_NETR_GETANYDCNAME, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_GetAnyDCName_done, req); + return req; +} + +static void rpccli_netr_GetAnyDCName_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_GetAnyDCName_state *state = tevent_req_data( + req, struct rpccli_netr_GetAnyDCName_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.dcname = *state->tmp.out.dcname; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_GetAnyDCName, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_GetAnyDCName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_netr_GetAnyDCName_state *state = tevent_req_data( + req, struct rpccli_netr_GetAnyDCName_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_netr_GetAnyDCName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server /* [in] [unique,charset(UTF16)] */, @@ -728,6 +2574,133 @@ NTSTATUS rpccli_netr_GetAnyDCName(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_netr_LogonControl2_state { + struct netr_LogonControl2 orig; + struct netr_LogonControl2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_LogonControl2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_LogonControl2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_logon_server /* [in] [unique,charset(UTF16)] */, + enum netr_LogonControlCode _function_code /* [in] */, + uint32_t _level /* [in] */, + union netr_CONTROL_DATA_INFORMATION *_data /* [in] [ref,switch_is(function_code)] */, + union netr_CONTROL_QUERY_INFORMATION *_query /* [out] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_netr_LogonControl2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_LogonControl2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.logon_server = _logon_server; + state->orig.in.function_code = _function_code; + state->orig.in.level = _level; + state->orig.in.data = _data; + + /* Out parameters */ + state->orig.out.query = _query; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_LogonControl2, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_LogonControl2_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_netlogon, + NDR_NETR_LOGONCONTROL2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_LogonControl2_done, req); + return req; +} + +static void rpccli_netr_LogonControl2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_LogonControl2_state *state = tevent_req_data( + req, struct rpccli_netr_LogonControl2_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.query = *state->tmp.out.query; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_LogonControl2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_LogonControl2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_netr_LogonControl2_state *state = tevent_req_data( + req, struct rpccli_netr_LogonControl2_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_netr_LogonControl2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server /* [in] [unique,charset(UTF16)] */, @@ -779,6 +2752,139 @@ NTSTATUS rpccli_netr_LogonControl2(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_netr_ServerAuthenticate2_state { + struct netr_ServerAuthenticate2 orig; + struct netr_ServerAuthenticate2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_ServerAuthenticate2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_ServerAuthenticate2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_account_name /* [in] [charset(UTF16)] */, + enum netr_SchannelType _secure_channel_type /* [in] */, + const char *_computer_name /* [in] [charset(UTF16)] */, + struct netr_Credential *_credentials /* [in] [ref] */, + struct netr_Credential *_return_credentials /* [out] [ref] */, + uint32_t *_negotiate_flags /* [in,out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_netr_ServerAuthenticate2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_ServerAuthenticate2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.account_name = _account_name; + state->orig.in.secure_channel_type = _secure_channel_type; + state->orig.in.computer_name = _computer_name; + state->orig.in.credentials = _credentials; + state->orig.in.negotiate_flags = _negotiate_flags; + + /* Out parameters */ + state->orig.out.return_credentials = _return_credentials; + state->orig.out.negotiate_flags = _negotiate_flags; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_ServerAuthenticate2, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_ServerAuthenticate2_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_netlogon, + NDR_NETR_SERVERAUTHENTICATE2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_ServerAuthenticate2_done, req); + return req; +} + +static void rpccli_netr_ServerAuthenticate2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_ServerAuthenticate2_state *state = tevent_req_data( + req, struct rpccli_netr_ServerAuthenticate2_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.return_credentials = *state->tmp.out.return_credentials; + *state->orig.out.negotiate_flags = *state->tmp.out.negotiate_flags; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_ServerAuthenticate2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_netr_ServerAuthenticate2_state *state = tevent_req_data( + req, struct rpccli_netr_ServerAuthenticate2_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_netr_ServerAuthenticate2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -830,6 +2936,145 @@ NTSTATUS rpccli_netr_ServerAuthenticate2(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_netr_DatabaseSync2_state { + struct netr_DatabaseSync2 orig; + struct netr_DatabaseSync2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_DatabaseSync2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_DatabaseSync2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_logon_server /* [in] [charset(UTF16)] */, + const char *_computername /* [in] [charset(UTF16)] */, + struct netr_Authenticator *_credential /* [in] [ref] */, + struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */, + enum netr_SamDatabaseID _database_id /* [in] */, + enum SyncStateEnum _restart_state /* [in] */, + uint32_t *_sync_context /* [in,out] [ref] */, + struct netr_DELTA_ENUM_ARRAY **_delta_enum_array /* [out] [ref] */, + uint32_t _preferredmaximumlength /* [in] */) +{ + struct tevent_req *req; + struct rpccli_netr_DatabaseSync2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_DatabaseSync2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.logon_server = _logon_server; + state->orig.in.computername = _computername; + state->orig.in.credential = _credential; + state->orig.in.return_authenticator = _return_authenticator; + state->orig.in.database_id = _database_id; + state->orig.in.restart_state = _restart_state; + state->orig.in.sync_context = _sync_context; + state->orig.in.preferredmaximumlength = _preferredmaximumlength; + + /* Out parameters */ + state->orig.out.return_authenticator = _return_authenticator; + state->orig.out.sync_context = _sync_context; + state->orig.out.delta_enum_array = _delta_enum_array; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_DatabaseSync2, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_DatabaseSync2_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_netlogon, + NDR_NETR_DATABASESYNC2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_DatabaseSync2_done, req); + return req; +} + +static void rpccli_netr_DatabaseSync2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_DatabaseSync2_state *state = tevent_req_data( + req, struct rpccli_netr_DatabaseSync2_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.return_authenticator = *state->tmp.out.return_authenticator; + *state->orig.out.sync_context = *state->tmp.out.sync_context; + *state->orig.out.delta_enum_array = *state->tmp.out.delta_enum_array; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_DatabaseSync2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_DatabaseSync2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_netr_DatabaseSync2_state *state = tevent_req_data( + req, struct rpccli_netr_DatabaseSync2_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_netr_DatabaseSync2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server /* [in] [charset(UTF16)] */, @@ -886,6 +3131,139 @@ NTSTATUS rpccli_netr_DatabaseSync2(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_netr_DatabaseRedo_state { + struct netr_DatabaseRedo orig; + struct netr_DatabaseRedo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_DatabaseRedo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_DatabaseRedo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_logon_server /* [in] [charset(UTF16)] */, + const char *_computername /* [in] [charset(UTF16)] */, + struct netr_Authenticator *_credential /* [in] [ref] */, + struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */, + struct netr_ChangeLogEntry _change_log_entry /* [in] [subcontext_size(change_log_entry_size),subcontext(4)] */, + uint32_t _change_log_entry_size /* [in] [value(ndr_size_netr_ChangeLogEntry(&change_log_entry,ndr->iconv_convenience,ndr->flags))] */, + struct netr_DELTA_ENUM_ARRAY **_delta_enum_array /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_netr_DatabaseRedo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_DatabaseRedo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.logon_server = _logon_server; + state->orig.in.computername = _computername; + state->orig.in.credential = _credential; + state->orig.in.return_authenticator = _return_authenticator; + state->orig.in.change_log_entry = _change_log_entry; + state->orig.in.change_log_entry_size = _change_log_entry_size; + + /* Out parameters */ + state->orig.out.return_authenticator = _return_authenticator; + state->orig.out.delta_enum_array = _delta_enum_array; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_DatabaseRedo, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_DatabaseRedo_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_netlogon, + NDR_NETR_DATABASEREDO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_DatabaseRedo_done, req); + return req; +} + +static void rpccli_netr_DatabaseRedo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_DatabaseRedo_state *state = tevent_req_data( + req, struct rpccli_netr_DatabaseRedo_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.return_authenticator = *state->tmp.out.return_authenticator; + *state->orig.out.delta_enum_array = *state->tmp.out.delta_enum_array; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_DatabaseRedo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_DatabaseRedo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_netr_DatabaseRedo_state *state = tevent_req_data( + req, struct rpccli_netr_DatabaseRedo_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_netr_DatabaseRedo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server /* [in] [charset(UTF16)] */, @@ -937,6 +3315,133 @@ NTSTATUS rpccli_netr_DatabaseRedo(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_netr_LogonControl2Ex_state { + struct netr_LogonControl2Ex orig; + struct netr_LogonControl2Ex tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_LogonControl2Ex_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_LogonControl2Ex_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_logon_server /* [in] [unique,charset(UTF16)] */, + enum netr_LogonControlCode _function_code /* [in] */, + uint32_t _level /* [in] */, + union netr_CONTROL_DATA_INFORMATION *_data /* [in] [ref,switch_is(function_code)] */, + union netr_CONTROL_QUERY_INFORMATION *_query /* [out] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_netr_LogonControl2Ex_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_LogonControl2Ex_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.logon_server = _logon_server; + state->orig.in.function_code = _function_code; + state->orig.in.level = _level; + state->orig.in.data = _data; + + /* Out parameters */ + state->orig.out.query = _query; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_LogonControl2Ex, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_LogonControl2Ex_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_netlogon, + NDR_NETR_LOGONCONTROL2EX, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_LogonControl2Ex_done, req); + return req; +} + +static void rpccli_netr_LogonControl2Ex_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_LogonControl2Ex_state *state = tevent_req_data( + req, struct rpccli_netr_LogonControl2Ex_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.query = *state->tmp.out.query; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_LogonControl2Ex, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_LogonControl2Ex_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_netr_LogonControl2Ex_state *state = tevent_req_data( + req, struct rpccli_netr_LogonControl2Ex_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_netr_LogonControl2Ex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server /* [in] [unique,charset(UTF16)] */, @@ -988,6 +3493,127 @@ NTSTATUS rpccli_netr_LogonControl2Ex(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_netr_NetrEnumerateTrustedDomains_state { + struct netr_NetrEnumerateTrustedDomains orig; + struct netr_NetrEnumerateTrustedDomains tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_NetrEnumerateTrustedDomains_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_NetrEnumerateTrustedDomains_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + struct netr_Blob *_trusted_domains_blob /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_netr_NetrEnumerateTrustedDomains_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_NetrEnumerateTrustedDomains_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + + /* Out parameters */ + state->orig.out.trusted_domains_blob = _trusted_domains_blob; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_NetrEnumerateTrustedDomains, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_NetrEnumerateTrustedDomains_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_netlogon, + NDR_NETR_NETRENUMERATETRUSTEDDOMAINS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_NetrEnumerateTrustedDomains_done, req); + return req; +} + +static void rpccli_netr_NetrEnumerateTrustedDomains_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_NetrEnumerateTrustedDomains_state *state = tevent_req_data( + req, struct rpccli_netr_NetrEnumerateTrustedDomains_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.trusted_domains_blob = *state->tmp.out.trusted_domains_blob; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_NetrEnumerateTrustedDomains, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_NetrEnumerateTrustedDomains_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_netr_NetrEnumerateTrustedDomains_state *state = tevent_req_data( + req, struct rpccli_netr_NetrEnumerateTrustedDomains_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_netr_NetrEnumerateTrustedDomains(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -1033,6 +3659,135 @@ NTSTATUS rpccli_netr_NetrEnumerateTrustedDomains(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_netr_DsRGetDCName_state { + struct netr_DsRGetDCName orig; + struct netr_DsRGetDCName tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_DsRGetDCName_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_DsRGetDCName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_domain_name /* [in] [unique,charset(UTF16)] */, + struct GUID *_domain_guid /* [in] [unique] */, + struct GUID *_site_guid /* [in] [unique] */, + uint32_t _flags /* [in] */, + struct netr_DsRGetDCNameInfo **_info /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_netr_DsRGetDCName_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_DsRGetDCName_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.domain_name = _domain_name; + state->orig.in.domain_guid = _domain_guid; + state->orig.in.site_guid = _site_guid; + state->orig.in.flags = _flags; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_DsRGetDCName, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_DsRGetDCName_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_netlogon, + NDR_NETR_DSRGETDCNAME, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_DsRGetDCName_done, req); + return req; +} + +static void rpccli_netr_DsRGetDCName_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_DsRGetDCName_state *state = tevent_req_data( + req, struct rpccli_netr_DsRGetDCName_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(netr_DsRGetDCName, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_DsRGetDCName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_netr_DsRGetDCName_state *state = tevent_req_data( + req, struct rpccli_netr_DsRGetDCName_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_netr_DsRGetDCName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -1086,6 +3841,137 @@ NTSTATUS rpccli_netr_DsRGetDCName(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_netr_LogonGetCapabilities_state { + struct netr_LogonGetCapabilities orig; + struct netr_LogonGetCapabilities tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_LogonGetCapabilities_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_LogonGetCapabilities_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [charset(UTF16)] */, + const char *_computer_name /* [in] [unique,charset(UTF16)] */, + struct netr_Authenticator *_credential /* [in] [ref] */, + struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */, + uint32_t _query_level /* [in] */, + union netr_Capabilities *_capabilities /* [out] [ref,switch_is(query_level)] */) +{ + struct tevent_req *req; + struct rpccli_netr_LogonGetCapabilities_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_LogonGetCapabilities_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.computer_name = _computer_name; + state->orig.in.credential = _credential; + state->orig.in.return_authenticator = _return_authenticator; + state->orig.in.query_level = _query_level; + + /* Out parameters */ + state->orig.out.return_authenticator = _return_authenticator; + state->orig.out.capabilities = _capabilities; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_LogonGetCapabilities, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_LogonGetCapabilities_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_netlogon, + NDR_NETR_LOGONGETCAPABILITIES, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_LogonGetCapabilities_done, req); + return req; +} + +static void rpccli_netr_LogonGetCapabilities_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_LogonGetCapabilities_state *state = tevent_req_data( + req, struct rpccli_netr_LogonGetCapabilities_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.return_authenticator = *state->tmp.out.return_authenticator; + *state->orig.out.capabilities = *state->tmp.out.capabilities; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_LogonGetCapabilities, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_LogonGetCapabilities_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_netr_LogonGetCapabilities_state *state = tevent_req_data( + req, struct rpccli_netr_LogonGetCapabilities_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_netr_LogonGetCapabilities(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [charset(UTF16)] */, @@ -1135,6 +4021,116 @@ NTSTATUS rpccli_netr_LogonGetCapabilities(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_netr_NETRLOGONSETSERVICEBITS_state { + struct netr_NETRLOGONSETSERVICEBITS orig; + struct netr_NETRLOGONSETSERVICEBITS tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_NETRLOGONSETSERVICEBITS_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_NETRLOGONSETSERVICEBITS_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_netr_NETRLOGONSETSERVICEBITS_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_NETRLOGONSETSERVICEBITS_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_NETRLOGONSETSERVICEBITS, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_netlogon, + NDR_NETR_NETRLOGONSETSERVICEBITS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_NETRLOGONSETSERVICEBITS_done, req); + return req; +} + +static void rpccli_netr_NETRLOGONSETSERVICEBITS_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_NETRLOGONSETSERVICEBITS_state *state = tevent_req_data( + req, struct rpccli_netr_NETRLOGONSETSERVICEBITS_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_NETRLOGONSETSERVICEBITS, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_NETRLOGONSETSERVICEBITS_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_netr_NETRLOGONSETSERVICEBITS_state *state = tevent_req_data( + req, struct rpccli_netr_NETRLOGONSETSERVICEBITS_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_netr_NETRLOGONSETSERVICEBITS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1176,6 +4172,129 @@ NTSTATUS rpccli_netr_NETRLOGONSETSERVICEBITS(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_netr_LogonGetTrustRid_state { + struct netr_LogonGetTrustRid orig; + struct netr_LogonGetTrustRid tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_LogonGetTrustRid_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_LogonGetTrustRid_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_domain_name /* [in] [unique,charset(UTF16)] */, + uint32_t *_rid /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_netr_LogonGetTrustRid_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_LogonGetTrustRid_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.domain_name = _domain_name; + + /* Out parameters */ + state->orig.out.rid = _rid; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_LogonGetTrustRid, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_LogonGetTrustRid_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_netlogon, + NDR_NETR_LOGONGETTRUSTRID, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_LogonGetTrustRid_done, req); + return req; +} + +static void rpccli_netr_LogonGetTrustRid_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_LogonGetTrustRid_state *state = tevent_req_data( + req, struct rpccli_netr_LogonGetTrustRid_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.rid = *state->tmp.out.rid; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_LogonGetTrustRid, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_LogonGetTrustRid_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_netr_LogonGetTrustRid_state *state = tevent_req_data( + req, struct rpccli_netr_LogonGetTrustRid_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_netr_LogonGetTrustRid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -1223,6 +4342,116 @@ NTSTATUS rpccli_netr_LogonGetTrustRid(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_netr_NETRLOGONCOMPUTESERVERDIGEST_state { + struct netr_NETRLOGONCOMPUTESERVERDIGEST orig; + struct netr_NETRLOGONCOMPUTESERVERDIGEST tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_NETRLOGONCOMPUTESERVERDIGEST_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_NETRLOGONCOMPUTESERVERDIGEST_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_netr_NETRLOGONCOMPUTESERVERDIGEST_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_NETRLOGONCOMPUTESERVERDIGEST_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_NETRLOGONCOMPUTESERVERDIGEST, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_netlogon, + NDR_NETR_NETRLOGONCOMPUTESERVERDIGEST, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_NETRLOGONCOMPUTESERVERDIGEST_done, req); + return req; +} + +static void rpccli_netr_NETRLOGONCOMPUTESERVERDIGEST_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_NETRLOGONCOMPUTESERVERDIGEST_state *state = tevent_req_data( + req, struct rpccli_netr_NETRLOGONCOMPUTESERVERDIGEST_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_NETRLOGONCOMPUTESERVERDIGEST, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_NETRLOGONCOMPUTESERVERDIGEST_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_netr_NETRLOGONCOMPUTESERVERDIGEST_state *state = tevent_req_data( + req, struct rpccli_netr_NETRLOGONCOMPUTESERVERDIGEST_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_netr_NETRLOGONCOMPUTESERVERDIGEST(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1264,6 +4493,116 @@ NTSTATUS rpccli_netr_NETRLOGONCOMPUTESERVERDIGEST(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_netr_NETRLOGONCOMPUTECLIENTDIGEST_state { + struct netr_NETRLOGONCOMPUTECLIENTDIGEST orig; + struct netr_NETRLOGONCOMPUTECLIENTDIGEST tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_NETRLOGONCOMPUTECLIENTDIGEST_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_NETRLOGONCOMPUTECLIENTDIGEST_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_netr_NETRLOGONCOMPUTECLIENTDIGEST_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_NETRLOGONCOMPUTECLIENTDIGEST_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_NETRLOGONCOMPUTECLIENTDIGEST, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_netlogon, + NDR_NETR_NETRLOGONCOMPUTECLIENTDIGEST, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_NETRLOGONCOMPUTECLIENTDIGEST_done, req); + return req; +} + +static void rpccli_netr_NETRLOGONCOMPUTECLIENTDIGEST_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_NETRLOGONCOMPUTECLIENTDIGEST_state *state = tevent_req_data( + req, struct rpccli_netr_NETRLOGONCOMPUTECLIENTDIGEST_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_NETRLOGONCOMPUTECLIENTDIGEST, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_NETRLOGONCOMPUTECLIENTDIGEST_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_netr_NETRLOGONCOMPUTECLIENTDIGEST_state *state = tevent_req_data( + req, struct rpccli_netr_NETRLOGONCOMPUTECLIENTDIGEST_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_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1305,6 +4644,142 @@ NTSTATUS rpccli_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_netr_ServerAuthenticate3_state { + struct netr_ServerAuthenticate3 orig; + struct netr_ServerAuthenticate3 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_ServerAuthenticate3_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_ServerAuthenticate3_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_account_name /* [in] [charset(UTF16)] */, + enum netr_SchannelType _secure_channel_type /* [in] */, + const char *_computer_name /* [in] [charset(UTF16)] */, + struct netr_Credential *_credentials /* [in] [ref] */, + struct netr_Credential *_return_credentials /* [out] [ref] */, + uint32_t *_negotiate_flags /* [in,out] [ref] */, + uint32_t *_rid /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_netr_ServerAuthenticate3_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_ServerAuthenticate3_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.account_name = _account_name; + state->orig.in.secure_channel_type = _secure_channel_type; + state->orig.in.computer_name = _computer_name; + state->orig.in.credentials = _credentials; + state->orig.in.negotiate_flags = _negotiate_flags; + + /* Out parameters */ + state->orig.out.return_credentials = _return_credentials; + state->orig.out.negotiate_flags = _negotiate_flags; + state->orig.out.rid = _rid; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_ServerAuthenticate3, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_ServerAuthenticate3_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_netlogon, + NDR_NETR_SERVERAUTHENTICATE3, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_ServerAuthenticate3_done, req); + return req; +} + +static void rpccli_netr_ServerAuthenticate3_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_ServerAuthenticate3_state *state = tevent_req_data( + req, struct rpccli_netr_ServerAuthenticate3_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.return_credentials = *state->tmp.out.return_credentials; + *state->orig.out.negotiate_flags = *state->tmp.out.negotiate_flags; + *state->orig.out.rid = *state->tmp.out.rid; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate3, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_ServerAuthenticate3_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_netr_ServerAuthenticate3_state *state = tevent_req_data( + req, struct rpccli_netr_ServerAuthenticate3_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_netr_ServerAuthenticate3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -1358,6 +4833,135 @@ NTSTATUS rpccli_netr_ServerAuthenticate3(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_netr_DsRGetDCNameEx_state { + struct netr_DsRGetDCNameEx orig; + struct netr_DsRGetDCNameEx tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_DsRGetDCNameEx_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_DsRGetDCNameEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_domain_name /* [in] [unique,charset(UTF16)] */, + struct GUID *_domain_guid /* [in] [unique] */, + const char *_site_name /* [in] [unique,charset(UTF16)] */, + uint32_t _flags /* [in] */, + struct netr_DsRGetDCNameInfo **_info /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_netr_DsRGetDCNameEx_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_DsRGetDCNameEx_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.domain_name = _domain_name; + state->orig.in.domain_guid = _domain_guid; + state->orig.in.site_name = _site_name; + state->orig.in.flags = _flags; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_DsRGetDCNameEx, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_DsRGetDCNameEx_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_netlogon, + NDR_NETR_DSRGETDCNAMEEX, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_DsRGetDCNameEx_done, req); + return req; +} + +static void rpccli_netr_DsRGetDCNameEx_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_DsRGetDCNameEx_state *state = tevent_req_data( + req, struct rpccli_netr_DsRGetDCNameEx_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(netr_DsRGetDCNameEx, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_DsRGetDCNameEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_netr_DsRGetDCNameEx_state *state = tevent_req_data( + req, struct rpccli_netr_DsRGetDCNameEx_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_netr_DsRGetDCNameEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -1411,6 +5015,127 @@ NTSTATUS rpccli_netr_DsRGetDCNameEx(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_netr_DsRGetSiteName_state { + struct netr_DsRGetSiteName orig; + struct netr_DsRGetSiteName tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_DsRGetSiteName_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_DsRGetSiteName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_computer_name /* [in] [unique,charset(UTF16)] */, + const char **_site /* [out] [ref,charset(UTF16)] */) +{ + struct tevent_req *req; + struct rpccli_netr_DsRGetSiteName_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_DsRGetSiteName_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.computer_name = _computer_name; + + /* Out parameters */ + state->orig.out.site = _site; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_DsRGetSiteName, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_DsRGetSiteName_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_netlogon, + NDR_NETR_DSRGETSITENAME, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_DsRGetSiteName_done, req); + return req; +} + +static void rpccli_netr_DsRGetSiteName_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_DsRGetSiteName_state *state = tevent_req_data( + req, struct rpccli_netr_DsRGetSiteName_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.site = *state->tmp.out.site; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_DsRGetSiteName, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_DsRGetSiteName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_netr_DsRGetSiteName_state *state = tevent_req_data( + req, struct rpccli_netr_DsRGetSiteName_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_netr_DsRGetSiteName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *computer_name /* [in] [unique,charset(UTF16)] */, @@ -1456,6 +5181,139 @@ NTSTATUS rpccli_netr_DsRGetSiteName(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_netr_LogonGetDomainInfo_state { + struct netr_LogonGetDomainInfo orig; + struct netr_LogonGetDomainInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_LogonGetDomainInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_LogonGetDomainInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [charset(UTF16)] */, + const char *_computer_name /* [in] [unique,charset(UTF16)] */, + struct netr_Authenticator *_credential /* [in] [ref] */, + struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */, + uint32_t _level /* [in] */, + union netr_DomainQuery _query /* [in] [switch_is(level)] */, + union netr_DomainInfo *_info /* [out] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_netr_LogonGetDomainInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_LogonGetDomainInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.computer_name = _computer_name; + state->orig.in.credential = _credential; + state->orig.in.return_authenticator = _return_authenticator; + state->orig.in.level = _level; + state->orig.in.query = _query; + + /* Out parameters */ + state->orig.out.return_authenticator = _return_authenticator; + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_LogonGetDomainInfo, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_LogonGetDomainInfo_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_netlogon, + NDR_NETR_LOGONGETDOMAININFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_LogonGetDomainInfo_done, req); + return req; +} + +static void rpccli_netr_LogonGetDomainInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_LogonGetDomainInfo_state *state = tevent_req_data( + req, struct rpccli_netr_LogonGetDomainInfo_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.return_authenticator = *state->tmp.out.return_authenticator; + *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(netr_LogonGetDomainInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_LogonGetDomainInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_netr_LogonGetDomainInfo_state *state = tevent_req_data( + req, struct rpccli_netr_LogonGetDomainInfo_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_netr_LogonGetDomainInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [charset(UTF16)] */, @@ -1507,6 +5365,137 @@ NTSTATUS rpccli_netr_LogonGetDomainInfo(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_netr_ServerPasswordSet2_state { + struct netr_ServerPasswordSet2 orig; + struct netr_ServerPasswordSet2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_ServerPasswordSet2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_ServerPasswordSet2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_account_name /* [in] [charset(UTF16)] */, + enum netr_SchannelType _secure_channel_type /* [in] */, + const char *_computer_name /* [in] [charset(UTF16)] */, + struct netr_Authenticator *_credential /* [in] [ref] */, + struct netr_Authenticator *_return_authenticator /* [out] [ref] */, + struct netr_CryptPassword *_new_password /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_netr_ServerPasswordSet2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_ServerPasswordSet2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.account_name = _account_name; + state->orig.in.secure_channel_type = _secure_channel_type; + state->orig.in.computer_name = _computer_name; + state->orig.in.credential = _credential; + state->orig.in.new_password = _new_password; + + /* Out parameters */ + state->orig.out.return_authenticator = _return_authenticator; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_ServerPasswordSet2, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_ServerPasswordSet2_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_netlogon, + NDR_NETR_SERVERPASSWORDSET2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_ServerPasswordSet2_done, req); + return req; +} + +static void rpccli_netr_ServerPasswordSet2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_ServerPasswordSet2_state *state = tevent_req_data( + req, struct rpccli_netr_ServerPasswordSet2_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.return_authenticator = *state->tmp.out.return_authenticator; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_ServerPasswordSet2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_ServerPasswordSet2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_netr_ServerPasswordSet2_state *state = tevent_req_data( + req, struct rpccli_netr_ServerPasswordSet2_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_netr_ServerPasswordSet2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -1557,6 +5546,138 @@ NTSTATUS rpccli_netr_ServerPasswordSet2(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_netr_ServerPasswordGet_state { + struct netr_ServerPasswordGet orig; + struct netr_ServerPasswordGet tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_ServerPasswordGet_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_ServerPasswordGet_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_account_name /* [in] [charset(UTF16)] */, + enum netr_SchannelType _secure_channel_type /* [in] */, + const char *_computer_name /* [in] [charset(UTF16)] */, + struct netr_Authenticator *_credential /* [in] [ref] */, + struct netr_Authenticator *_return_authenticator /* [out] [ref] */, + struct samr_Password *_password /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_netr_ServerPasswordGet_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_ServerPasswordGet_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.account_name = _account_name; + state->orig.in.secure_channel_type = _secure_channel_type; + state->orig.in.computer_name = _computer_name; + state->orig.in.credential = _credential; + + /* Out parameters */ + state->orig.out.return_authenticator = _return_authenticator; + state->orig.out.password = _password; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_ServerPasswordGet, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_ServerPasswordGet_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_netlogon, + NDR_NETR_SERVERPASSWORDGET, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_ServerPasswordGet_done, req); + return req; +} + +static void rpccli_netr_ServerPasswordGet_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_ServerPasswordGet_state *state = tevent_req_data( + req, struct rpccli_netr_ServerPasswordGet_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.return_authenticator = *state->tmp.out.return_authenticator; + *state->orig.out.password = *state->tmp.out.password; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_ServerPasswordGet, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_ServerPasswordGet_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_netr_ServerPasswordGet_state *state = tevent_req_data( + req, struct rpccli_netr_ServerPasswordGet_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_netr_ServerPasswordGet(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -1612,6 +5733,116 @@ NTSTATUS rpccli_netr_ServerPasswordGet(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_netr_NETRLOGONSENDTOSAM_state { + struct netr_NETRLOGONSENDTOSAM orig; + struct netr_NETRLOGONSENDTOSAM tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_NETRLOGONSENDTOSAM_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_NETRLOGONSENDTOSAM_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_netr_NETRLOGONSENDTOSAM_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_NETRLOGONSENDTOSAM_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_NETRLOGONSENDTOSAM, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_netlogon, + NDR_NETR_NETRLOGONSENDTOSAM, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_NETRLOGONSENDTOSAM_done, req); + return req; +} + +static void rpccli_netr_NETRLOGONSENDTOSAM_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_NETRLOGONSENDTOSAM_state *state = tevent_req_data( + req, struct rpccli_netr_NETRLOGONSENDTOSAM_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_NETRLOGONSENDTOSAM, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_NETRLOGONSENDTOSAM_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_netr_NETRLOGONSENDTOSAM_state *state = tevent_req_data( + req, struct rpccli_netr_NETRLOGONSENDTOSAM_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_netr_NETRLOGONSENDTOSAM(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1653,6 +5884,131 @@ NTSTATUS rpccli_netr_NETRLOGONSENDTOSAM(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_netr_DsRAddressToSitenamesW_state { + struct netr_DsRAddressToSitenamesW orig; + struct netr_DsRAddressToSitenamesW tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_DsRAddressToSitenamesW_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_DsRAddressToSitenamesW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + uint32_t _count /* [in] [range(0,32000)] */, + struct netr_DsRAddress *_addresses /* [in] [ref,size_is(count)] */, + struct netr_DsRAddressToSitenamesWCtr **_ctr /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_netr_DsRAddressToSitenamesW_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_DsRAddressToSitenamesW_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.count = _count; + state->orig.in.addresses = _addresses; + + /* Out parameters */ + state->orig.out.ctr = _ctr; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_DsRAddressToSitenamesW, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_DsRAddressToSitenamesW_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_netlogon, + NDR_NETR_DSRADDRESSTOSITENAMESW, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_DsRAddressToSitenamesW_done, req); + return req; +} + +static void rpccli_netr_DsRAddressToSitenamesW_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_DsRAddressToSitenamesW_state *state = tevent_req_data( + req, struct rpccli_netr_DsRAddressToSitenamesW_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.ctr = *state->tmp.out.ctr; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_DsRAddressToSitenamesW, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_DsRAddressToSitenamesW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_netr_DsRAddressToSitenamesW_state *state = tevent_req_data( + req, struct rpccli_netr_DsRAddressToSitenamesW_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_netr_DsRAddressToSitenamesW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -1702,6 +6058,139 @@ NTSTATUS rpccli_netr_DsRAddressToSitenamesW(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_netr_DsRGetDCNameEx2_state { + struct netr_DsRGetDCNameEx2 orig; + struct netr_DsRGetDCNameEx2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_DsRGetDCNameEx2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_DsRGetDCNameEx2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_client_account /* [in] [unique,charset(UTF16)] */, + uint32_t _mask /* [in] */, + const char *_domain_name /* [in] [unique,charset(UTF16)] */, + struct GUID *_domain_guid /* [in] [unique] */, + const char *_site_name /* [in] [unique,charset(UTF16)] */, + uint32_t _flags /* [in] */, + struct netr_DsRGetDCNameInfo **_info /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_netr_DsRGetDCNameEx2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_DsRGetDCNameEx2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.client_account = _client_account; + state->orig.in.mask = _mask; + state->orig.in.domain_name = _domain_name; + state->orig.in.domain_guid = _domain_guid; + state->orig.in.site_name = _site_name; + state->orig.in.flags = _flags; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_DsRGetDCNameEx2, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_DsRGetDCNameEx2_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_netlogon, + NDR_NETR_DSRGETDCNAMEEX2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_DsRGetDCNameEx2_done, req); + return req; +} + +static void rpccli_netr_DsRGetDCNameEx2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_DsRGetDCNameEx2_state *state = tevent_req_data( + req, struct rpccli_netr_DsRGetDCNameEx2_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(netr_DsRGetDCNameEx2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_DsRGetDCNameEx2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_netr_DsRGetDCNameEx2_state *state = tevent_req_data( + req, struct rpccli_netr_DsRGetDCNameEx2_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_netr_DsRGetDCNameEx2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -1759,6 +6248,116 @@ NTSTATUS rpccli_netr_DsRGetDCNameEx2(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN_state { + struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN orig; + struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_netlogon, + NDR_NETR_NETRLOGONGETTIMESERVICEPARENTDOMAIN, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN_done, req); + return req; +} + +static void rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN_state *state = tevent_req_data( + req, struct rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN_state *state = tevent_req_data( + req, struct rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN_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_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1800,6 +6399,127 @@ NTSTATUS rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct rpc_pipe_client return werror_to_ntstatus(r.out.result); } +struct rpccli_netr_NetrEnumerateTrustedDomainsEx_state { + struct netr_NetrEnumerateTrustedDomainsEx orig; + struct netr_NetrEnumerateTrustedDomainsEx tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_NetrEnumerateTrustedDomainsEx_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_NetrEnumerateTrustedDomainsEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + struct netr_DomainTrustList *_dom_trust_list /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_netr_NetrEnumerateTrustedDomainsEx_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_NetrEnumerateTrustedDomainsEx_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + + /* Out parameters */ + state->orig.out.dom_trust_list = _dom_trust_list; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_NetrEnumerateTrustedDomainsEx, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_NetrEnumerateTrustedDomainsEx_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_netlogon, + NDR_NETR_NETRENUMERATETRUSTEDDOMAINSEX, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_NetrEnumerateTrustedDomainsEx_done, req); + return req; +} + +static void rpccli_netr_NetrEnumerateTrustedDomainsEx_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_NetrEnumerateTrustedDomainsEx_state *state = tevent_req_data( + req, struct rpccli_netr_NetrEnumerateTrustedDomainsEx_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.dom_trust_list = *state->tmp.out.dom_trust_list; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_NetrEnumerateTrustedDomainsEx, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_NetrEnumerateTrustedDomainsEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_netr_NetrEnumerateTrustedDomainsEx_state *state = tevent_req_data( + req, struct rpccli_netr_NetrEnumerateTrustedDomainsEx_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_netr_NetrEnumerateTrustedDomainsEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -1845,6 +6565,131 @@ NTSTATUS rpccli_netr_NetrEnumerateTrustedDomainsEx(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_netr_DsRAddressToSitenamesExW_state { + struct netr_DsRAddressToSitenamesExW orig; + struct netr_DsRAddressToSitenamesExW tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_DsRAddressToSitenamesExW_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_DsRAddressToSitenamesExW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + uint32_t _count /* [in] [range(0,32000)] */, + struct netr_DsRAddress *_addresses /* [in] [ref,size_is(count)] */, + struct netr_DsRAddressToSitenamesExWCtr **_ctr /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_netr_DsRAddressToSitenamesExW_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_DsRAddressToSitenamesExW_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.count = _count; + state->orig.in.addresses = _addresses; + + /* Out parameters */ + state->orig.out.ctr = _ctr; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_DsRAddressToSitenamesExW, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_DsRAddressToSitenamesExW_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_netlogon, + NDR_NETR_DSRADDRESSTOSITENAMESEXW, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_DsRAddressToSitenamesExW_done, req); + return req; +} + +static void rpccli_netr_DsRAddressToSitenamesExW_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_DsRAddressToSitenamesExW_state *state = tevent_req_data( + req, struct rpccli_netr_DsRAddressToSitenamesExW_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.ctr = *state->tmp.out.ctr; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_DsRAddressToSitenamesExW, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_DsRAddressToSitenamesExW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_netr_DsRAddressToSitenamesExW_state *state = tevent_req_data( + req, struct rpccli_netr_DsRAddressToSitenamesExW_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_netr_DsRAddressToSitenamesExW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -1894,6 +6739,127 @@ NTSTATUS rpccli_netr_DsRAddressToSitenamesExW(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_netr_DsrGetDcSiteCoverageW_state { + struct netr_DsrGetDcSiteCoverageW orig; + struct netr_DsrGetDcSiteCoverageW tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_DsrGetDcSiteCoverageW_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_DsrGetDcSiteCoverageW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + struct DcSitesCtr **_ctr /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_netr_DsrGetDcSiteCoverageW_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_DsrGetDcSiteCoverageW_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + + /* Out parameters */ + state->orig.out.ctr = _ctr; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_DsrGetDcSiteCoverageW, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_DsrGetDcSiteCoverageW_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_netlogon, + NDR_NETR_DSRGETDCSITECOVERAGEW, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_DsrGetDcSiteCoverageW_done, req); + return req; +} + +static void rpccli_netr_DsrGetDcSiteCoverageW_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_DsrGetDcSiteCoverageW_state *state = tevent_req_data( + req, struct rpccli_netr_DsrGetDcSiteCoverageW_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.ctr = *state->tmp.out.ctr; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_DsrGetDcSiteCoverageW, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_DsrGetDcSiteCoverageW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_netr_DsrGetDcSiteCoverageW_state *state = tevent_req_data( + req, struct rpccli_netr_DsrGetDcSiteCoverageW_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_netr_DsrGetDcSiteCoverageW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -1939,6 +6905,142 @@ NTSTATUS rpccli_netr_DsrGetDcSiteCoverageW(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_netr_LogonSamLogonEx_state { + struct netr_LogonSamLogonEx orig; + struct netr_LogonSamLogonEx tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_LogonSamLogonEx_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_LogonSamLogonEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_computer_name /* [in] [unique,charset(UTF16)] */, + enum netr_LogonInfoClass _logon_level /* [in] */, + union netr_LogonLevel *_logon /* [in] [ref,switch_is(logon_level)] */, + uint16_t _validation_level /* [in] */, + union netr_Validation *_validation /* [out] [ref,switch_is(validation_level)] */, + uint8_t *_authoritative /* [out] [ref] */, + uint32_t *_flags /* [in,out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_netr_LogonSamLogonEx_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_LogonSamLogonEx_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.computer_name = _computer_name; + state->orig.in.logon_level = _logon_level; + state->orig.in.logon = _logon; + state->orig.in.validation_level = _validation_level; + state->orig.in.flags = _flags; + + /* Out parameters */ + state->orig.out.validation = _validation; + state->orig.out.authoritative = _authoritative; + state->orig.out.flags = _flags; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_LogonSamLogonEx, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_LogonSamLogonEx_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_netlogon, + NDR_NETR_LOGONSAMLOGONEX, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_LogonSamLogonEx_done, req); + return req; +} + +static void rpccli_netr_LogonSamLogonEx_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_LogonSamLogonEx_state *state = tevent_req_data( + req, struct rpccli_netr_LogonSamLogonEx_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.validation = *state->tmp.out.validation; + *state->orig.out.authoritative = *state->tmp.out.authoritative; + *state->orig.out.flags = *state->tmp.out.flags; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_LogonSamLogonEx, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_LogonSamLogonEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_netr_LogonSamLogonEx_state *state = tevent_req_data( + req, struct rpccli_netr_LogonSamLogonEx_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_netr_LogonSamLogonEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -1992,6 +7094,129 @@ NTSTATUS rpccli_netr_LogonSamLogonEx(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_netr_DsrEnumerateDomainTrusts_state { + struct netr_DsrEnumerateDomainTrusts orig; + struct netr_DsrEnumerateDomainTrusts tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_DsrEnumerateDomainTrusts_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_DsrEnumerateDomainTrusts_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + uint32_t _trust_flags /* [in] */, + struct netr_DomainTrustList *_trusts /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_netr_DsrEnumerateDomainTrusts_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_DsrEnumerateDomainTrusts_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.trust_flags = _trust_flags; + + /* Out parameters */ + state->orig.out.trusts = _trusts; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_DsrEnumerateDomainTrusts, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_DsrEnumerateDomainTrusts_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_netlogon, + NDR_NETR_DSRENUMERATEDOMAINTRUSTS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_DsrEnumerateDomainTrusts_done, req); + return req; +} + +static void rpccli_netr_DsrEnumerateDomainTrusts_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_DsrEnumerateDomainTrusts_state *state = tevent_req_data( + req, struct rpccli_netr_DsrEnumerateDomainTrusts_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.trusts = *state->tmp.out.trusts; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_DsrEnumerateDomainTrusts, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_DsrEnumerateDomainTrusts_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_netr_DsrEnumerateDomainTrusts_state *state = tevent_req_data( + req, struct rpccli_netr_DsrEnumerateDomainTrusts_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_netr_DsrEnumerateDomainTrusts(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -2039,6 +7264,126 @@ NTSTATUS rpccli_netr_DsrEnumerateDomainTrusts(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_netr_DsrDeregisterDNSHostRecords_state { + struct netr_DsrDeregisterDNSHostRecords orig; + struct netr_DsrDeregisterDNSHostRecords tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_DsrDeregisterDNSHostRecords_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_DsrDeregisterDNSHostRecords_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_domain /* [in] [unique,charset(UTF16)] */, + struct GUID *_domain_guid /* [in] [unique] */, + struct GUID *_dsa_guid /* [in] [unique] */, + const char *_dns_host /* [in] [ref,charset(UTF16)] */) +{ + struct tevent_req *req; + struct rpccli_netr_DsrDeregisterDNSHostRecords_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_DsrDeregisterDNSHostRecords_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.domain = _domain; + state->orig.in.domain_guid = _domain_guid; + state->orig.in.dsa_guid = _dsa_guid; + state->orig.in.dns_host = _dns_host; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_DsrDeregisterDNSHostRecords, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_netlogon, + NDR_NETR_DSRDEREGISTERDNSHOSTRECORDS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_DsrDeregisterDNSHostRecords_done, req); + return req; +} + +static void rpccli_netr_DsrDeregisterDNSHostRecords_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_DsrDeregisterDNSHostRecords_state *state = tevent_req_data( + req, struct rpccli_netr_DsrDeregisterDNSHostRecords_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_DsrDeregisterDNSHostRecords, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_DsrDeregisterDNSHostRecords_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_netr_DsrDeregisterDNSHostRecords_state *state = tevent_req_data( + req, struct rpccli_netr_DsrDeregisterDNSHostRecords_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_netr_DsrDeregisterDNSHostRecords(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -2090,6 +7435,141 @@ NTSTATUS rpccli_netr_DsrDeregisterDNSHostRecords(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_netr_ServerTrustPasswordsGet_state { + struct netr_ServerTrustPasswordsGet orig; + struct netr_ServerTrustPasswordsGet tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_ServerTrustPasswordsGet_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_ServerTrustPasswordsGet_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_account_name /* [in] [charset(UTF16)] */, + enum netr_SchannelType _secure_channel_type /* [in] */, + const char *_computer_name /* [in] [charset(UTF16)] */, + struct netr_Authenticator *_credential /* [in] [ref] */, + struct netr_Authenticator *_return_authenticator /* [out] [ref] */, + struct samr_Password *_password /* [out] [ref] */, + struct samr_Password *_password2 /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_netr_ServerTrustPasswordsGet_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_ServerTrustPasswordsGet_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.account_name = _account_name; + state->orig.in.secure_channel_type = _secure_channel_type; + state->orig.in.computer_name = _computer_name; + state->orig.in.credential = _credential; + + /* Out parameters */ + state->orig.out.return_authenticator = _return_authenticator; + state->orig.out.password = _password; + state->orig.out.password2 = _password2; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_ServerTrustPasswordsGet, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_ServerTrustPasswordsGet_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_netlogon, + NDR_NETR_SERVERTRUSTPASSWORDSGET, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_ServerTrustPasswordsGet_done, req); + return req; +} + +static void rpccli_netr_ServerTrustPasswordsGet_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_ServerTrustPasswordsGet_state *state = tevent_req_data( + req, struct rpccli_netr_ServerTrustPasswordsGet_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.return_authenticator = *state->tmp.out.return_authenticator; + *state->orig.out.password = *state->tmp.out.password; + *state->orig.out.password2 = *state->tmp.out.password2; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_ServerTrustPasswordsGet, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_ServerTrustPasswordsGet_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_netr_ServerTrustPasswordsGet_state *state = tevent_req_data( + req, struct rpccli_netr_ServerTrustPasswordsGet_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_netr_ServerTrustPasswordsGet(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -2142,6 +7622,131 @@ NTSTATUS rpccli_netr_ServerTrustPasswordsGet(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_netr_DsRGetForestTrustInformation_state { + struct netr_DsRGetForestTrustInformation orig; + struct netr_DsRGetForestTrustInformation tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_DsRGetForestTrustInformation_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_DsRGetForestTrustInformation_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_trusted_domain_name /* [in] [unique,charset(UTF16)] */, + uint32_t _flags /* [in] */, + struct lsa_ForestTrustInformation **_forest_trust_info /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_netr_DsRGetForestTrustInformation_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_DsRGetForestTrustInformation_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.trusted_domain_name = _trusted_domain_name; + state->orig.in.flags = _flags; + + /* Out parameters */ + state->orig.out.forest_trust_info = _forest_trust_info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_DsRGetForestTrustInformation, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_DsRGetForestTrustInformation_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_netlogon, + NDR_NETR_DSRGETFORESTTRUSTINFORMATION, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_DsRGetForestTrustInformation_done, req); + return req; +} + +static void rpccli_netr_DsRGetForestTrustInformation_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_DsRGetForestTrustInformation_state *state = tevent_req_data( + req, struct rpccli_netr_DsRGetForestTrustInformation_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.forest_trust_info = *state->tmp.out.forest_trust_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(netr_DsRGetForestTrustInformation, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_DsRGetForestTrustInformation_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_netr_DsRGetForestTrustInformation_state *state = tevent_req_data( + req, struct rpccli_netr_DsRGetForestTrustInformation_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_netr_DsRGetForestTrustInformation(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -2191,6 +7796,136 @@ NTSTATUS rpccli_netr_DsRGetForestTrustInformation(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_netr_GetForestTrustInformation_state { + struct netr_GetForestTrustInformation orig; + struct netr_GetForestTrustInformation tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_GetForestTrustInformation_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_GetForestTrustInformation_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_trusted_domain_name /* [in] [ref,charset(UTF16)] */, + struct netr_Authenticator *_credential /* [in] [ref] */, + struct netr_Authenticator *_return_authenticator /* [out] [ref] */, + uint32_t _flags /* [in] */, + struct lsa_ForestTrustInformation **_forest_trust_info /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_netr_GetForestTrustInformation_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_GetForestTrustInformation_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.trusted_domain_name = _trusted_domain_name; + state->orig.in.credential = _credential; + state->orig.in.flags = _flags; + + /* Out parameters */ + state->orig.out.return_authenticator = _return_authenticator; + state->orig.out.forest_trust_info = _forest_trust_info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_GetForestTrustInformation, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_GetForestTrustInformation_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_netlogon, + NDR_NETR_GETFORESTTRUSTINFORMATION, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_GetForestTrustInformation_done, req); + return req; +} + +static void rpccli_netr_GetForestTrustInformation_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_GetForestTrustInformation_state *state = tevent_req_data( + req, struct rpccli_netr_GetForestTrustInformation_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.return_authenticator = *state->tmp.out.return_authenticator; + *state->orig.out.forest_trust_info = *state->tmp.out.forest_trust_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(netr_GetForestTrustInformation, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_GetForestTrustInformation_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_netr_GetForestTrustInformation_state *state = tevent_req_data( + req, struct rpccli_netr_GetForestTrustInformation_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_netr_GetForestTrustInformation(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -2244,6 +7979,150 @@ NTSTATUS rpccli_netr_GetForestTrustInformation(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_netr_LogonSamLogonWithFlags_state { + struct netr_LogonSamLogonWithFlags orig; + struct netr_LogonSamLogonWithFlags tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_LogonSamLogonWithFlags_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_LogonSamLogonWithFlags_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_computer_name /* [in] [unique,charset(UTF16)] */, + struct netr_Authenticator *_credential /* [in] [unique] */, + struct netr_Authenticator *_return_authenticator /* [in,out] [unique] */, + enum netr_LogonInfoClass _logon_level /* [in] */, + union netr_LogonLevel *_logon /* [in] [ref,switch_is(logon_level)] */, + uint16_t _validation_level /* [in] */, + union netr_Validation *_validation /* [out] [ref,switch_is(validation_level)] */, + uint8_t *_authoritative /* [out] [ref] */, + uint32_t *_flags /* [in,out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_netr_LogonSamLogonWithFlags_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_LogonSamLogonWithFlags_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.computer_name = _computer_name; + state->orig.in.credential = _credential; + state->orig.in.return_authenticator = _return_authenticator; + state->orig.in.logon_level = _logon_level; + state->orig.in.logon = _logon; + state->orig.in.validation_level = _validation_level; + state->orig.in.flags = _flags; + + /* Out parameters */ + state->orig.out.return_authenticator = _return_authenticator; + state->orig.out.validation = _validation; + state->orig.out.authoritative = _authoritative; + state->orig.out.flags = _flags; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_LogonSamLogonWithFlags, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_LogonSamLogonWithFlags_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_netlogon, + NDR_NETR_LOGONSAMLOGONWITHFLAGS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_LogonSamLogonWithFlags_done, req); + return req; +} + +static void rpccli_netr_LogonSamLogonWithFlags_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_LogonSamLogonWithFlags_state *state = tevent_req_data( + req, struct rpccli_netr_LogonSamLogonWithFlags_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 */ + if (state->orig.out.return_authenticator && state->tmp.out.return_authenticator) { + *state->orig.out.return_authenticator = *state->tmp.out.return_authenticator; + } + *state->orig.out.validation = *state->tmp.out.validation; + *state->orig.out.authoritative = *state->tmp.out.authoritative; + *state->orig.out.flags = *state->tmp.out.flags; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(netr_LogonSamLogonWithFlags, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_LogonSamLogonWithFlags_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_netr_LogonSamLogonWithFlags_state *state = tevent_req_data( + req, struct rpccli_netr_LogonSamLogonWithFlags_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_netr_LogonSamLogonWithFlags(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -2304,6 +8183,144 @@ NTSTATUS rpccli_netr_LogonSamLogonWithFlags(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_netr_ServerGetTrustInfo_state { + struct netr_ServerGetTrustInfo orig; + struct netr_ServerGetTrustInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_netr_ServerGetTrustInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_netr_ServerGetTrustInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_account_name /* [in] [ref,charset(UTF16)] */, + enum netr_SchannelType _secure_channel_type /* [in] */, + const char *_computer_name /* [in] [ref,charset(UTF16)] */, + struct netr_Authenticator *_credential /* [in] [ref] */, + struct netr_Authenticator *_return_authenticator /* [out] [ref] */, + struct samr_Password *_new_owf_password /* [out] [ref] */, + struct samr_Password *_old_owf_password /* [out] [ref] */, + struct netr_TrustInfo **_trust_info /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_netr_ServerGetTrustInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_netr_ServerGetTrustInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.account_name = _account_name; + state->orig.in.secure_channel_type = _secure_channel_type; + state->orig.in.computer_name = _computer_name; + state->orig.in.credential = _credential; + + /* Out parameters */ + state->orig.out.return_authenticator = _return_authenticator; + state->orig.out.new_owf_password = _new_owf_password; + state->orig.out.old_owf_password = _old_owf_password; + state->orig.out.trust_info = _trust_info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(netr_ServerGetTrustInfo, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_netr_ServerGetTrustInfo_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_netlogon, + NDR_NETR_SERVERGETTRUSTINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_netr_ServerGetTrustInfo_done, req); + return req; +} + +static void rpccli_netr_ServerGetTrustInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_netr_ServerGetTrustInfo_state *state = tevent_req_data( + req, struct rpccli_netr_ServerGetTrustInfo_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.return_authenticator = *state->tmp.out.return_authenticator; + *state->orig.out.new_owf_password = *state->tmp.out.new_owf_password; + *state->orig.out.old_owf_password = *state->tmp.out.old_owf_password; + *state->orig.out.trust_info = *state->tmp.out.trust_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(netr_ServerGetTrustInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_netr_ServerGetTrustInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_netr_ServerGetTrustInfo_state *state = tevent_req_data( + req, struct rpccli_netr_ServerGetTrustInfo_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_netr_ServerGetTrustInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, diff --git a/librpc/gen_ndr/cli_netlogon.h b/librpc/gen_ndr/cli_netlogon.h index ffb877e21b..eb6b193327 100644 --- a/librpc/gen_ndr/cli_netlogon.h +++ b/librpc/gen_ndr/cli_netlogon.h @@ -1,6 +1,16 @@ #include "../librpc/gen_ndr/ndr_netlogon.h" #ifndef __CLI_NETLOGON__ #define __CLI_NETLOGON__ +struct tevent_req *rpccli_netr_LogonUasLogon_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_account_name /* [in] [charset(UTF16)] */, + const char *_workstation /* [in] [charset(UTF16)] */, + struct netr_UasInfo **_info /* [out] [ref] */); +NTSTATUS rpccli_netr_LogonUasLogon_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_netr_LogonUasLogon(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -8,6 +18,16 @@ NTSTATUS rpccli_netr_LogonUasLogon(struct rpc_pipe_client *cli, const char *workstation /* [in] [charset(UTF16)] */, struct netr_UasInfo **info /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_netr_LogonUasLogoff_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_account_name /* [in] [charset(UTF16)] */, + const char *_workstation /* [in] [charset(UTF16)] */, + struct netr_UasLogoffInfo *_info /* [out] [ref] */); +NTSTATUS rpccli_netr_LogonUasLogoff_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_netr_LogonUasLogoff(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -15,6 +35,21 @@ NTSTATUS rpccli_netr_LogonUasLogoff(struct rpc_pipe_client *cli, const char *workstation /* [in] [charset(UTF16)] */, struct netr_UasLogoffInfo *info /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_netr_LogonSamLogon_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_computer_name /* [in] [unique,charset(UTF16)] */, + struct netr_Authenticator *_credential /* [in] [unique] */, + struct netr_Authenticator *_return_authenticator /* [in,out] [unique] */, + enum netr_LogonInfoClass _logon_level /* [in] */, + union netr_LogonLevel *_logon /* [in] [ref,switch_is(logon_level)] */, + uint16_t _validation_level /* [in] */, + union netr_Validation *_validation /* [out] [ref,switch_is(validation_level)] */, + uint8_t *_authoritative /* [out] [ref] */); +NTSTATUS rpccli_netr_LogonSamLogon_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_netr_LogonSamLogon(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -26,6 +61,18 @@ NTSTATUS rpccli_netr_LogonSamLogon(struct rpc_pipe_client *cli, uint16_t validation_level /* [in] */, union netr_Validation *validation /* [out] [ref,switch_is(validation_level)] */, uint8_t *authoritative /* [out] [ref] */); +struct tevent_req *rpccli_netr_LogonSamLogoff_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_computer_name /* [in] [unique,charset(UTF16)] */, + struct netr_Authenticator *_credential /* [in] [unique] */, + struct netr_Authenticator *_return_authenticator /* [in,out] [unique] */, + enum netr_LogonInfoClass _logon_level /* [in] */, + union netr_LogonLevel _logon /* [in] [switch_is(logon_level)] */); +NTSTATUS rpccli_netr_LogonSamLogoff_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_netr_LogonSamLogoff(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -34,12 +81,34 @@ NTSTATUS rpccli_netr_LogonSamLogoff(struct rpc_pipe_client *cli, struct netr_Authenticator *return_authenticator /* [in,out] [unique] */, enum netr_LogonInfoClass logon_level /* [in] */, union netr_LogonLevel logon /* [in] [switch_is(logon_level)] */); +struct tevent_req *rpccli_netr_ServerReqChallenge_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_computer_name /* [in] [charset(UTF16)] */, + struct netr_Credential *_credentials /* [in] [ref] */, + struct netr_Credential *_return_credentials /* [out] [ref] */); +NTSTATUS rpccli_netr_ServerReqChallenge_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_netr_ServerReqChallenge(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, const char *computer_name /* [in] [charset(UTF16)] */, struct netr_Credential *credentials /* [in] [ref] */, struct netr_Credential *return_credentials /* [out] [ref] */); +struct tevent_req *rpccli_netr_ServerAuthenticate_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_account_name /* [in] [charset(UTF16)] */, + enum netr_SchannelType _secure_channel_type /* [in] */, + const char *_computer_name /* [in] [charset(UTF16)] */, + struct netr_Credential *_credentials /* [in] [ref] */, + struct netr_Credential *_return_credentials /* [out] [ref] */); +NTSTATUS rpccli_netr_ServerAuthenticate_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_netr_ServerAuthenticate(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -48,6 +117,19 @@ NTSTATUS rpccli_netr_ServerAuthenticate(struct rpc_pipe_client *cli, const char *computer_name /* [in] [charset(UTF16)] */, struct netr_Credential *credentials /* [in] [ref] */, struct netr_Credential *return_credentials /* [out] [ref] */); +struct tevent_req *rpccli_netr_ServerPasswordSet_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_account_name /* [in] [charset(UTF16)] */, + enum netr_SchannelType _secure_channel_type /* [in] */, + const char *_computer_name /* [in] [charset(UTF16)] */, + struct netr_Authenticator *_credential /* [in] [ref] */, + struct netr_Authenticator *_return_authenticator /* [out] [ref] */, + struct samr_Password *_new_password /* [in] [ref] */); +NTSTATUS rpccli_netr_ServerPasswordSet_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_netr_ServerPasswordSet(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -57,6 +139,20 @@ NTSTATUS rpccli_netr_ServerPasswordSet(struct rpc_pipe_client *cli, struct netr_Authenticator *credential /* [in] [ref] */, struct netr_Authenticator *return_authenticator /* [out] [ref] */, struct samr_Password *new_password /* [in] [ref] */); +struct tevent_req *rpccli_netr_DatabaseDeltas_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_logon_server /* [in] [charset(UTF16)] */, + const char *_computername /* [in] [charset(UTF16)] */, + struct netr_Authenticator *_credential /* [in] [ref] */, + struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */, + enum netr_SamDatabaseID _database_id /* [in] */, + uint64_t *_sequence_num /* [in,out] [ref] */, + struct netr_DELTA_ENUM_ARRAY **_delta_enum_array /* [out] [ref] */, + uint32_t _preferredmaximumlength /* [in] */); +NTSTATUS rpccli_netr_DatabaseDeltas_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_netr_DatabaseDeltas(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server /* [in] [charset(UTF16)] */, @@ -67,6 +163,20 @@ NTSTATUS rpccli_netr_DatabaseDeltas(struct rpc_pipe_client *cli, uint64_t *sequence_num /* [in,out] [ref] */, struct netr_DELTA_ENUM_ARRAY **delta_enum_array /* [out] [ref] */, uint32_t preferredmaximumlength /* [in] */); +struct tevent_req *rpccli_netr_DatabaseSync_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_logon_server /* [in] [charset(UTF16)] */, + const char *_computername /* [in] [charset(UTF16)] */, + struct netr_Authenticator *_credential /* [in] [ref] */, + struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */, + enum netr_SamDatabaseID _database_id /* [in] */, + uint32_t *_sync_context /* [in,out] [ref] */, + struct netr_DELTA_ENUM_ARRAY **_delta_enum_array /* [out] [ref] */, + uint32_t _preferredmaximumlength /* [in] */); +NTSTATUS rpccli_netr_DatabaseSync_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_netr_DatabaseSync(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server /* [in] [charset(UTF16)] */, @@ -77,6 +187,24 @@ NTSTATUS rpccli_netr_DatabaseSync(struct rpc_pipe_client *cli, uint32_t *sync_context /* [in,out] [ref] */, struct netr_DELTA_ENUM_ARRAY **delta_enum_array /* [out] [ref] */, uint32_t preferredmaximumlength /* [in] */); +struct tevent_req *rpccli_netr_AccountDeltas_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_logon_server /* [in] [unique,charset(UTF16)] */, + const char *_computername /* [in] [charset(UTF16)] */, + struct netr_Authenticator _credential /* [in] */, + struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */, + struct netr_UAS_INFO_0 _uas /* [in] */, + uint32_t _count /* [in] */, + uint32_t _level /* [in] */, + uint32_t _buffersize /* [in] */, + struct netr_AccountBuffer *_buffer /* [out] [ref,subcontext(4)] */, + uint32_t *_count_returned /* [out] [ref] */, + uint32_t *_total_entries /* [out] [ref] */, + struct netr_UAS_INFO_0 *_recordid /* [out] [ref] */); +NTSTATUS rpccli_netr_AccountDeltas_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_netr_AccountDeltas(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server /* [in] [unique,charset(UTF16)] */, @@ -91,6 +219,24 @@ NTSTATUS rpccli_netr_AccountDeltas(struct rpc_pipe_client *cli, uint32_t *count_returned /* [out] [ref] */, uint32_t *total_entries /* [out] [ref] */, struct netr_UAS_INFO_0 *recordid /* [out] [ref] */); +struct tevent_req *rpccli_netr_AccountSync_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_logon_server /* [in] [unique,charset(UTF16)] */, + const char *_computername /* [in] [charset(UTF16)] */, + struct netr_Authenticator _credential /* [in] */, + struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */, + uint32_t _reference /* [in] */, + uint32_t _level /* [in] */, + uint32_t _buffersize /* [in] */, + struct netr_AccountBuffer *_buffer /* [out] [ref,subcontext(4)] */, + uint32_t *_count_returned /* [out] [ref] */, + uint32_t *_total_entries /* [out] [ref] */, + uint32_t *_next_reference /* [out] [ref] */, + struct netr_UAS_INFO_0 *_recordid /* [in,out] [ref] */); +NTSTATUS rpccli_netr_AccountSync_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_netr_AccountSync(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server /* [in] [unique,charset(UTF16)] */, @@ -105,12 +251,31 @@ NTSTATUS rpccli_netr_AccountSync(struct rpc_pipe_client *cli, uint32_t *total_entries /* [out] [ref] */, uint32_t *next_reference /* [out] [ref] */, struct netr_UAS_INFO_0 *recordid /* [in,out] [ref] */); +struct tevent_req *rpccli_netr_GetDcName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_logon_server /* [in] [charset(UTF16)] */, + const char *_domainname /* [in] [unique,charset(UTF16)] */, + const char **_dcname /* [out] [ref,charset(UTF16)] */); +NTSTATUS rpccli_netr_GetDcName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_netr_GetDcName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server /* [in] [charset(UTF16)] */, const char *domainname /* [in] [unique,charset(UTF16)] */, const char **dcname /* [out] [ref,charset(UTF16)] */, WERROR *werror); +struct tevent_req *rpccli_netr_LogonControl_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_logon_server /* [in] [unique,charset(UTF16)] */, + enum netr_LogonControlCode _function_code /* [in] */, + uint32_t _level /* [in] */, + union netr_CONTROL_QUERY_INFORMATION *_query /* [out] [ref,switch_is(level)] */); +NTSTATUS rpccli_netr_LogonControl_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_netr_LogonControl(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server /* [in] [unique,charset(UTF16)] */, @@ -118,12 +283,32 @@ NTSTATUS rpccli_netr_LogonControl(struct rpc_pipe_client *cli, uint32_t level /* [in] */, union netr_CONTROL_QUERY_INFORMATION *query /* [out] [ref,switch_is(level)] */, WERROR *werror); +struct tevent_req *rpccli_netr_GetAnyDCName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_logon_server /* [in] [unique,charset(UTF16)] */, + const char *_domainname /* [in] [unique,charset(UTF16)] */, + const char **_dcname /* [out] [ref,charset(UTF16)] */); +NTSTATUS rpccli_netr_GetAnyDCName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_netr_GetAnyDCName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server /* [in] [unique,charset(UTF16)] */, const char *domainname /* [in] [unique,charset(UTF16)] */, const char **dcname /* [out] [ref,charset(UTF16)] */, WERROR *werror); +struct tevent_req *rpccli_netr_LogonControl2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_logon_server /* [in] [unique,charset(UTF16)] */, + enum netr_LogonControlCode _function_code /* [in] */, + uint32_t _level /* [in] */, + union netr_CONTROL_DATA_INFORMATION *_data /* [in] [ref,switch_is(function_code)] */, + union netr_CONTROL_QUERY_INFORMATION *_query /* [out] [ref,switch_is(level)] */); +NTSTATUS rpccli_netr_LogonControl2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_netr_LogonControl2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server /* [in] [unique,charset(UTF16)] */, @@ -132,6 +317,19 @@ NTSTATUS rpccli_netr_LogonControl2(struct rpc_pipe_client *cli, union netr_CONTROL_DATA_INFORMATION *data /* [in] [ref,switch_is(function_code)] */, union netr_CONTROL_QUERY_INFORMATION *query /* [out] [ref,switch_is(level)] */, WERROR *werror); +struct tevent_req *rpccli_netr_ServerAuthenticate2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_account_name /* [in] [charset(UTF16)] */, + enum netr_SchannelType _secure_channel_type /* [in] */, + const char *_computer_name /* [in] [charset(UTF16)] */, + struct netr_Credential *_credentials /* [in] [ref] */, + struct netr_Credential *_return_credentials /* [out] [ref] */, + uint32_t *_negotiate_flags /* [in,out] [ref] */); +NTSTATUS rpccli_netr_ServerAuthenticate2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_netr_ServerAuthenticate2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -141,6 +339,21 @@ NTSTATUS rpccli_netr_ServerAuthenticate2(struct rpc_pipe_client *cli, struct netr_Credential *credentials /* [in] [ref] */, struct netr_Credential *return_credentials /* [out] [ref] */, uint32_t *negotiate_flags /* [in,out] [ref] */); +struct tevent_req *rpccli_netr_DatabaseSync2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_logon_server /* [in] [charset(UTF16)] */, + const char *_computername /* [in] [charset(UTF16)] */, + struct netr_Authenticator *_credential /* [in] [ref] */, + struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */, + enum netr_SamDatabaseID _database_id /* [in] */, + enum SyncStateEnum _restart_state /* [in] */, + uint32_t *_sync_context /* [in,out] [ref] */, + struct netr_DELTA_ENUM_ARRAY **_delta_enum_array /* [out] [ref] */, + uint32_t _preferredmaximumlength /* [in] */); +NTSTATUS rpccli_netr_DatabaseSync2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_netr_DatabaseSync2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server /* [in] [charset(UTF16)] */, @@ -152,6 +365,19 @@ NTSTATUS rpccli_netr_DatabaseSync2(struct rpc_pipe_client *cli, uint32_t *sync_context /* [in,out] [ref] */, struct netr_DELTA_ENUM_ARRAY **delta_enum_array /* [out] [ref] */, uint32_t preferredmaximumlength /* [in] */); +struct tevent_req *rpccli_netr_DatabaseRedo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_logon_server /* [in] [charset(UTF16)] */, + const char *_computername /* [in] [charset(UTF16)] */, + struct netr_Authenticator *_credential /* [in] [ref] */, + struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */, + struct netr_ChangeLogEntry _change_log_entry /* [in] [subcontext_size(change_log_entry_size),subcontext(4)] */, + uint32_t _change_log_entry_size /* [in] [value(ndr_size_netr_ChangeLogEntry(&change_log_entry,ndr->iconv_convenience,ndr->flags))] */, + struct netr_DELTA_ENUM_ARRAY **_delta_enum_array /* [out] [ref] */); +NTSTATUS rpccli_netr_DatabaseRedo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_netr_DatabaseRedo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server /* [in] [charset(UTF16)] */, @@ -161,6 +387,17 @@ NTSTATUS rpccli_netr_DatabaseRedo(struct rpc_pipe_client *cli, struct netr_ChangeLogEntry change_log_entry /* [in] [subcontext_size(change_log_entry_size),subcontext(4)] */, uint32_t change_log_entry_size /* [in] [value(ndr_size_netr_ChangeLogEntry(&change_log_entry,ndr->iconv_convenience,ndr->flags))] */, struct netr_DELTA_ENUM_ARRAY **delta_enum_array /* [out] [ref] */); +struct tevent_req *rpccli_netr_LogonControl2Ex_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_logon_server /* [in] [unique,charset(UTF16)] */, + enum netr_LogonControlCode _function_code /* [in] */, + uint32_t _level /* [in] */, + union netr_CONTROL_DATA_INFORMATION *_data /* [in] [ref,switch_is(function_code)] */, + union netr_CONTROL_QUERY_INFORMATION *_query /* [out] [ref,switch_is(level)] */); +NTSTATUS rpccli_netr_LogonControl2Ex_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_netr_LogonControl2Ex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server /* [in] [unique,charset(UTF16)] */, @@ -169,11 +406,31 @@ NTSTATUS rpccli_netr_LogonControl2Ex(struct rpc_pipe_client *cli, union netr_CONTROL_DATA_INFORMATION *data /* [in] [ref,switch_is(function_code)] */, union netr_CONTROL_QUERY_INFORMATION *query /* [out] [ref,switch_is(level)] */, WERROR *werror); +struct tevent_req *rpccli_netr_NetrEnumerateTrustedDomains_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + struct netr_Blob *_trusted_domains_blob /* [out] [ref] */); +NTSTATUS rpccli_netr_NetrEnumerateTrustedDomains_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_netr_NetrEnumerateTrustedDomains(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, struct netr_Blob *trusted_domains_blob /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_netr_DsRGetDCName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_domain_name /* [in] [unique,charset(UTF16)] */, + struct GUID *_domain_guid /* [in] [unique] */, + struct GUID *_site_guid /* [in] [unique] */, + uint32_t _flags /* [in] */, + struct netr_DsRGetDCNameInfo **_info /* [out] [ref] */); +NTSTATUS rpccli_netr_DsRGetDCName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_netr_DsRGetDCName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -183,6 +440,18 @@ NTSTATUS rpccli_netr_DsRGetDCName(struct rpc_pipe_client *cli, uint32_t flags /* [in] */, struct netr_DsRGetDCNameInfo **info /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_netr_LogonGetCapabilities_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [charset(UTF16)] */, + const char *_computer_name /* [in] [unique,charset(UTF16)] */, + struct netr_Authenticator *_credential /* [in] [ref] */, + struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */, + uint32_t _query_level /* [in] */, + union netr_Capabilities *_capabilities /* [out] [ref,switch_is(query_level)] */); +NTSTATUS rpccli_netr_LogonGetCapabilities_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_netr_LogonGetCapabilities(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [charset(UTF16)] */, @@ -191,21 +460,62 @@ NTSTATUS rpccli_netr_LogonGetCapabilities(struct rpc_pipe_client *cli, struct netr_Authenticator *return_authenticator /* [in,out] [ref] */, uint32_t query_level /* [in] */, union netr_Capabilities *capabilities /* [out] [ref,switch_is(query_level)] */); +struct tevent_req *rpccli_netr_NETRLOGONSETSERVICEBITS_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_netr_NETRLOGONSETSERVICEBITS_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_netr_NETRLOGONSETSERVICEBITS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_netr_LogonGetTrustRid_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_domain_name /* [in] [unique,charset(UTF16)] */, + uint32_t *_rid /* [out] [ref] */); +NTSTATUS rpccli_netr_LogonGetTrustRid_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_netr_LogonGetTrustRid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, const char *domain_name /* [in] [unique,charset(UTF16)] */, uint32_t *rid /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_netr_NETRLOGONCOMPUTESERVERDIGEST_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_netr_NETRLOGONCOMPUTESERVERDIGEST_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_netr_NETRLOGONCOMPUTESERVERDIGEST(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_netr_NETRLOGONCOMPUTECLIENTDIGEST_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_netr_NETRLOGONCOMPUTECLIENTDIGEST_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_netr_ServerAuthenticate3_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_account_name /* [in] [charset(UTF16)] */, + enum netr_SchannelType _secure_channel_type /* [in] */, + const char *_computer_name /* [in] [charset(UTF16)] */, + struct netr_Credential *_credentials /* [in] [ref] */, + struct netr_Credential *_return_credentials /* [out] [ref] */, + uint32_t *_negotiate_flags /* [in,out] [ref] */, + uint32_t *_rid /* [out] [ref] */); +NTSTATUS rpccli_netr_ServerAuthenticate3_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_netr_ServerAuthenticate3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -216,6 +526,18 @@ NTSTATUS rpccli_netr_ServerAuthenticate3(struct rpc_pipe_client *cli, struct netr_Credential *return_credentials /* [out] [ref] */, uint32_t *negotiate_flags /* [in,out] [ref] */, uint32_t *rid /* [out] [ref] */); +struct tevent_req *rpccli_netr_DsRGetDCNameEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_domain_name /* [in] [unique,charset(UTF16)] */, + struct GUID *_domain_guid /* [in] [unique] */, + const char *_site_name /* [in] [unique,charset(UTF16)] */, + uint32_t _flags /* [in] */, + struct netr_DsRGetDCNameInfo **_info /* [out] [ref] */); +NTSTATUS rpccli_netr_DsRGetDCNameEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_netr_DsRGetDCNameEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -225,11 +547,32 @@ NTSTATUS rpccli_netr_DsRGetDCNameEx(struct rpc_pipe_client *cli, uint32_t flags /* [in] */, struct netr_DsRGetDCNameInfo **info /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_netr_DsRGetSiteName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_computer_name /* [in] [unique,charset(UTF16)] */, + const char **_site /* [out] [ref,charset(UTF16)] */); +NTSTATUS rpccli_netr_DsRGetSiteName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_netr_DsRGetSiteName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *computer_name /* [in] [unique,charset(UTF16)] */, const char **site /* [out] [ref,charset(UTF16)] */, WERROR *werror); +struct tevent_req *rpccli_netr_LogonGetDomainInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [charset(UTF16)] */, + const char *_computer_name /* [in] [unique,charset(UTF16)] */, + struct netr_Authenticator *_credential /* [in] [ref] */, + struct netr_Authenticator *_return_authenticator /* [in,out] [ref] */, + uint32_t _level /* [in] */, + union netr_DomainQuery _query /* [in] [switch_is(level)] */, + union netr_DomainInfo *_info /* [out] [ref,switch_is(level)] */); +NTSTATUS rpccli_netr_LogonGetDomainInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_netr_LogonGetDomainInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [charset(UTF16)] */, @@ -239,6 +582,19 @@ NTSTATUS rpccli_netr_LogonGetDomainInfo(struct rpc_pipe_client *cli, uint32_t level /* [in] */, union netr_DomainQuery query /* [in] [switch_is(level)] */, union netr_DomainInfo *info /* [out] [ref,switch_is(level)] */); +struct tevent_req *rpccli_netr_ServerPasswordSet2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_account_name /* [in] [charset(UTF16)] */, + enum netr_SchannelType _secure_channel_type /* [in] */, + const char *_computer_name /* [in] [charset(UTF16)] */, + struct netr_Authenticator *_credential /* [in] [ref] */, + struct netr_Authenticator *_return_authenticator /* [out] [ref] */, + struct netr_CryptPassword *_new_password /* [in] [ref] */); +NTSTATUS rpccli_netr_ServerPasswordSet2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_netr_ServerPasswordSet2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -248,6 +604,19 @@ NTSTATUS rpccli_netr_ServerPasswordSet2(struct rpc_pipe_client *cli, struct netr_Authenticator *credential /* [in] [ref] */, struct netr_Authenticator *return_authenticator /* [out] [ref] */, struct netr_CryptPassword *new_password /* [in] [ref] */); +struct tevent_req *rpccli_netr_ServerPasswordGet_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_account_name /* [in] [charset(UTF16)] */, + enum netr_SchannelType _secure_channel_type /* [in] */, + const char *_computer_name /* [in] [charset(UTF16)] */, + struct netr_Authenticator *_credential /* [in] [ref] */, + struct netr_Authenticator *_return_authenticator /* [out] [ref] */, + struct samr_Password *_password /* [out] [ref] */); +NTSTATUS rpccli_netr_ServerPasswordGet_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_netr_ServerPasswordGet(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -258,9 +627,25 @@ NTSTATUS rpccli_netr_ServerPasswordGet(struct rpc_pipe_client *cli, struct netr_Authenticator *return_authenticator /* [out] [ref] */, struct samr_Password *password /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_netr_NETRLOGONSENDTOSAM_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_netr_NETRLOGONSENDTOSAM_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_netr_NETRLOGONSENDTOSAM(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_netr_DsRAddressToSitenamesW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + uint32_t _count /* [in] [range(0,32000)] */, + struct netr_DsRAddress *_addresses /* [in] [ref,size_is(count)] */, + struct netr_DsRAddressToSitenamesWCtr **_ctr /* [out] [ref] */); +NTSTATUS rpccli_netr_DsRAddressToSitenamesW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_netr_DsRAddressToSitenamesW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -268,6 +653,20 @@ NTSTATUS rpccli_netr_DsRAddressToSitenamesW(struct rpc_pipe_client *cli, struct netr_DsRAddress *addresses /* [in] [ref,size_is(count)] */, struct netr_DsRAddressToSitenamesWCtr **ctr /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_netr_DsRGetDCNameEx2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_client_account /* [in] [unique,charset(UTF16)] */, + uint32_t _mask /* [in] */, + const char *_domain_name /* [in] [unique,charset(UTF16)] */, + struct GUID *_domain_guid /* [in] [unique] */, + const char *_site_name /* [in] [unique,charset(UTF16)] */, + uint32_t _flags /* [in] */, + struct netr_DsRGetDCNameInfo **_info /* [out] [ref] */); +NTSTATUS rpccli_netr_DsRGetDCNameEx2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_netr_DsRGetDCNameEx2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -279,14 +678,38 @@ NTSTATUS rpccli_netr_DsRGetDCNameEx2(struct rpc_pipe_client *cli, uint32_t flags /* [in] */, struct netr_DsRGetDCNameInfo **info /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_netr_NetrEnumerateTrustedDomainsEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + struct netr_DomainTrustList *_dom_trust_list /* [out] [ref] */); +NTSTATUS rpccli_netr_NetrEnumerateTrustedDomainsEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_netr_NetrEnumerateTrustedDomainsEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, struct netr_DomainTrustList *dom_trust_list /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_netr_DsRAddressToSitenamesExW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + uint32_t _count /* [in] [range(0,32000)] */, + struct netr_DsRAddress *_addresses /* [in] [ref,size_is(count)] */, + struct netr_DsRAddressToSitenamesExWCtr **_ctr /* [out] [ref] */); +NTSTATUS rpccli_netr_DsRAddressToSitenamesExW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_netr_DsRAddressToSitenamesExW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -294,11 +717,33 @@ NTSTATUS rpccli_netr_DsRAddressToSitenamesExW(struct rpc_pipe_client *cli, struct netr_DsRAddress *addresses /* [in] [ref,size_is(count)] */, struct netr_DsRAddressToSitenamesExWCtr **ctr /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_netr_DsrGetDcSiteCoverageW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + struct DcSitesCtr **_ctr /* [out] [ref] */); +NTSTATUS rpccli_netr_DsrGetDcSiteCoverageW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_netr_DsrGetDcSiteCoverageW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, struct DcSitesCtr **ctr /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_netr_LogonSamLogonEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_computer_name /* [in] [unique,charset(UTF16)] */, + enum netr_LogonInfoClass _logon_level /* [in] */, + union netr_LogonLevel *_logon /* [in] [ref,switch_is(logon_level)] */, + uint16_t _validation_level /* [in] */, + union netr_Validation *_validation /* [out] [ref,switch_is(validation_level)] */, + uint8_t *_authoritative /* [out] [ref] */, + uint32_t *_flags /* [in,out] [ref] */); +NTSTATUS rpccli_netr_LogonSamLogonEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_netr_LogonSamLogonEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -309,12 +754,32 @@ NTSTATUS rpccli_netr_LogonSamLogonEx(struct rpc_pipe_client *cli, union netr_Validation *validation /* [out] [ref,switch_is(validation_level)] */, uint8_t *authoritative /* [out] [ref] */, uint32_t *flags /* [in,out] [ref] */); +struct tevent_req *rpccli_netr_DsrEnumerateDomainTrusts_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + uint32_t _trust_flags /* [in] */, + struct netr_DomainTrustList *_trusts /* [out] [ref] */); +NTSTATUS rpccli_netr_DsrEnumerateDomainTrusts_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_netr_DsrEnumerateDomainTrusts(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, uint32_t trust_flags /* [in] */, struct netr_DomainTrustList *trusts /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_netr_DsrDeregisterDNSHostRecords_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_domain /* [in] [unique,charset(UTF16)] */, + struct GUID *_domain_guid /* [in] [unique] */, + struct GUID *_dsa_guid /* [in] [unique] */, + const char *_dns_host /* [in] [ref,charset(UTF16)] */); +NTSTATUS rpccli_netr_DsrDeregisterDNSHostRecords_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_netr_DsrDeregisterDNSHostRecords(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -323,6 +788,20 @@ NTSTATUS rpccli_netr_DsrDeregisterDNSHostRecords(struct rpc_pipe_client *cli, struct GUID *dsa_guid /* [in] [unique] */, const char *dns_host /* [in] [ref,charset(UTF16)] */, WERROR *werror); +struct tevent_req *rpccli_netr_ServerTrustPasswordsGet_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_account_name /* [in] [charset(UTF16)] */, + enum netr_SchannelType _secure_channel_type /* [in] */, + const char *_computer_name /* [in] [charset(UTF16)] */, + struct netr_Authenticator *_credential /* [in] [ref] */, + struct netr_Authenticator *_return_authenticator /* [out] [ref] */, + struct samr_Password *_password /* [out] [ref] */, + struct samr_Password *_password2 /* [out] [ref] */); +NTSTATUS rpccli_netr_ServerTrustPasswordsGet_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_netr_ServerTrustPasswordsGet(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -333,6 +812,16 @@ NTSTATUS rpccli_netr_ServerTrustPasswordsGet(struct rpc_pipe_client *cli, struct netr_Authenticator *return_authenticator /* [out] [ref] */, struct samr_Password *password /* [out] [ref] */, struct samr_Password *password2 /* [out] [ref] */); +struct tevent_req *rpccli_netr_DsRGetForestTrustInformation_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_trusted_domain_name /* [in] [unique,charset(UTF16)] */, + uint32_t _flags /* [in] */, + struct lsa_ForestTrustInformation **_forest_trust_info /* [out] [ref] */); +NTSTATUS rpccli_netr_DsRGetForestTrustInformation_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_netr_DsRGetForestTrustInformation(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -340,6 +829,18 @@ NTSTATUS rpccli_netr_DsRGetForestTrustInformation(struct rpc_pipe_client *cli, uint32_t flags /* [in] */, struct lsa_ForestTrustInformation **forest_trust_info /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_netr_GetForestTrustInformation_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_trusted_domain_name /* [in] [ref,charset(UTF16)] */, + struct netr_Authenticator *_credential /* [in] [ref] */, + struct netr_Authenticator *_return_authenticator /* [out] [ref] */, + uint32_t _flags /* [in] */, + struct lsa_ForestTrustInformation **_forest_trust_info /* [out] [ref] */); +NTSTATUS rpccli_netr_GetForestTrustInformation_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_netr_GetForestTrustInformation(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -349,6 +850,22 @@ NTSTATUS rpccli_netr_GetForestTrustInformation(struct rpc_pipe_client *cli, uint32_t flags /* [in] */, struct lsa_ForestTrustInformation **forest_trust_info /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_netr_LogonSamLogonWithFlags_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_computer_name /* [in] [unique,charset(UTF16)] */, + struct netr_Authenticator *_credential /* [in] [unique] */, + struct netr_Authenticator *_return_authenticator /* [in,out] [unique] */, + enum netr_LogonInfoClass _logon_level /* [in] */, + union netr_LogonLevel *_logon /* [in] [ref,switch_is(logon_level)] */, + uint16_t _validation_level /* [in] */, + union netr_Validation *_validation /* [out] [ref,switch_is(validation_level)] */, + uint8_t *_authoritative /* [out] [ref] */, + uint32_t *_flags /* [in,out] [ref] */); +NTSTATUS rpccli_netr_LogonSamLogonWithFlags_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_netr_LogonSamLogonWithFlags(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -361,6 +878,21 @@ NTSTATUS rpccli_netr_LogonSamLogonWithFlags(struct rpc_pipe_client *cli, union netr_Validation *validation /* [out] [ref,switch_is(validation_level)] */, uint8_t *authoritative /* [out] [ref] */, uint32_t *flags /* [in,out] [ref] */); +struct tevent_req *rpccli_netr_ServerGetTrustInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_account_name /* [in] [ref,charset(UTF16)] */, + enum netr_SchannelType _secure_channel_type /* [in] */, + const char *_computer_name /* [in] [ref,charset(UTF16)] */, + struct netr_Authenticator *_credential /* [in] [ref] */, + struct netr_Authenticator *_return_authenticator /* [out] [ref] */, + struct samr_Password *_new_owf_password /* [out] [ref] */, + struct samr_Password *_old_owf_password /* [out] [ref] */, + struct netr_TrustInfo **_trust_info /* [out] [ref] */); +NTSTATUS rpccli_netr_ServerGetTrustInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_netr_ServerGetTrustInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, diff --git a/librpc/gen_ndr/cli_ntsvcs.c b/librpc/gen_ndr/cli_ntsvcs.c index 179368de14..5096be9559 100644 --- a/librpc/gen_ndr/cli_ntsvcs.c +++ b/librpc/gen_ndr/cli_ntsvcs.c @@ -6,6 +6,116 @@ #include "includes.h" #include "../librpc/gen_ndr/cli_ntsvcs.h" +struct rpccli_PNP_Disconnect_state { + struct PNP_Disconnect orig; + struct PNP_Disconnect tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_Disconnect_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_Disconnect_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_Disconnect_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_Disconnect_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_Disconnect, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_DISCONNECT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_Disconnect_done, req); + return req; +} + +static void rpccli_PNP_Disconnect_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_Disconnect_state *state = tevent_req_data( + req, struct rpccli_PNP_Disconnect_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_Disconnect, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_Disconnect_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_Disconnect_state *state = tevent_req_data( + req, struct rpccli_PNP_Disconnect_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_PNP_Disconnect(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -47,6 +157,116 @@ NTSTATUS rpccli_PNP_Disconnect(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_Connect_state { + struct PNP_Connect orig; + struct PNP_Connect tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_Connect_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_Connect_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_Connect_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_Connect_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_Connect, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_CONNECT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_Connect_done, req); + return req; +} + +static void rpccli_PNP_Connect_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_Connect_state *state = tevent_req_data( + req, struct rpccli_PNP_Connect_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_Connect, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_Connect_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_Connect_state *state = tevent_req_data( + req, struct rpccli_PNP_Connect_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_PNP_Connect(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -88,6 +308,125 @@ NTSTATUS rpccli_PNP_Connect(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_GetVersion_state { + struct PNP_GetVersion orig; + struct PNP_GetVersion tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_GetVersion_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_GetVersion_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_version /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_PNP_GetVersion_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_GetVersion_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + state->orig.out.version = _version; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetVersion, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_PNP_GetVersion_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_ntsvcs, + NDR_PNP_GETVERSION, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_GetVersion_done, req); + return req; +} + +static void rpccli_PNP_GetVersion_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_GetVersion_state *state = tevent_req_data( + req, struct rpccli_PNP_GetVersion_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.version = *state->tmp.out.version; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetVersion, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_GetVersion_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_GetVersion_state *state = tevent_req_data( + req, struct rpccli_PNP_GetVersion_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_PNP_GetVersion(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *version /* [out] [ref] */, @@ -131,6 +470,116 @@ NTSTATUS rpccli_PNP_GetVersion(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_GetGlobalState_state { + struct PNP_GetGlobalState orig; + struct PNP_GetGlobalState tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_GetGlobalState_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_GetGlobalState_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_GetGlobalState_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_GetGlobalState_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetGlobalState, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_GETGLOBALSTATE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_GetGlobalState_done, req); + return req; +} + +static void rpccli_PNP_GetGlobalState_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_GetGlobalState_state *state = tevent_req_data( + req, struct rpccli_PNP_GetGlobalState_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetGlobalState, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_GetGlobalState_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_GetGlobalState_state *state = tevent_req_data( + req, struct rpccli_PNP_GetGlobalState_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_PNP_GetGlobalState(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -172,6 +621,116 @@ NTSTATUS rpccli_PNP_GetGlobalState(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_InitDetection_state { + struct PNP_InitDetection orig; + struct PNP_InitDetection tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_InitDetection_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_InitDetection_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_InitDetection_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_InitDetection_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_InitDetection, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_INITDETECTION, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_InitDetection_done, req); + return req; +} + +static void rpccli_PNP_InitDetection_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_InitDetection_state *state = tevent_req_data( + req, struct rpccli_PNP_InitDetection_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_InitDetection, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_InitDetection_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_InitDetection_state *state = tevent_req_data( + req, struct rpccli_PNP_InitDetection_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_PNP_InitDetection(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -213,6 +772,116 @@ NTSTATUS rpccli_PNP_InitDetection(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_ReportLogOn_state { + struct PNP_ReportLogOn orig; + struct PNP_ReportLogOn tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_ReportLogOn_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_ReportLogOn_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_ReportLogOn_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_ReportLogOn_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_ReportLogOn, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_REPORTLOGON, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_ReportLogOn_done, req); + return req; +} + +static void rpccli_PNP_ReportLogOn_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_ReportLogOn_state *state = tevent_req_data( + req, struct rpccli_PNP_ReportLogOn_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_ReportLogOn, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_ReportLogOn_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_ReportLogOn_state *state = tevent_req_data( + req, struct rpccli_PNP_ReportLogOn_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_PNP_ReportLogOn(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -254,6 +923,120 @@ NTSTATUS rpccli_PNP_ReportLogOn(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_ValidateDeviceInstance_state { + struct PNP_ValidateDeviceInstance orig; + struct PNP_ValidateDeviceInstance tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_ValidateDeviceInstance_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_ValidateDeviceInstance_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_devicepath /* [in] [ref,charset(UTF16)] */, + uint32_t _flags /* [in] */) +{ + struct tevent_req *req; + struct rpccli_PNP_ValidateDeviceInstance_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_ValidateDeviceInstance_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.devicepath = _devicepath; + state->orig.in.flags = _flags; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_ValidateDeviceInstance, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_VALIDATEDEVICEINSTANCE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_ValidateDeviceInstance_done, req); + return req; +} + +static void rpccli_PNP_ValidateDeviceInstance_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_ValidateDeviceInstance_state *state = tevent_req_data( + req, struct rpccli_PNP_ValidateDeviceInstance_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_ValidateDeviceInstance, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_ValidateDeviceInstance_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_ValidateDeviceInstance_state *state = tevent_req_data( + req, struct rpccli_PNP_ValidateDeviceInstance_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_PNP_ValidateDeviceInstance(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *devicepath /* [in] [ref,charset(UTF16)] */, @@ -299,6 +1082,116 @@ NTSTATUS rpccli_PNP_ValidateDeviceInstance(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_GetRootDeviceInstance_state { + struct PNP_GetRootDeviceInstance orig; + struct PNP_GetRootDeviceInstance tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_GetRootDeviceInstance_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_GetRootDeviceInstance_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_GetRootDeviceInstance_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_GetRootDeviceInstance_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetRootDeviceInstance, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_GETROOTDEVICEINSTANCE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_GetRootDeviceInstance_done, req); + return req; +} + +static void rpccli_PNP_GetRootDeviceInstance_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_GetRootDeviceInstance_state *state = tevent_req_data( + req, struct rpccli_PNP_GetRootDeviceInstance_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetRootDeviceInstance, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_GetRootDeviceInstance_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_GetRootDeviceInstance_state *state = tevent_req_data( + req, struct rpccli_PNP_GetRootDeviceInstance_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_PNP_GetRootDeviceInstance(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -340,6 +1233,116 @@ NTSTATUS rpccli_PNP_GetRootDeviceInstance(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_GetRelatedDeviceInstance_state { + struct PNP_GetRelatedDeviceInstance orig; + struct PNP_GetRelatedDeviceInstance tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_GetRelatedDeviceInstance_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_GetRelatedDeviceInstance_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_GetRelatedDeviceInstance_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_GetRelatedDeviceInstance_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetRelatedDeviceInstance, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_GETRELATEDDEVICEINSTANCE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_GetRelatedDeviceInstance_done, req); + return req; +} + +static void rpccli_PNP_GetRelatedDeviceInstance_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_GetRelatedDeviceInstance_state *state = tevent_req_data( + req, struct rpccli_PNP_GetRelatedDeviceInstance_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetRelatedDeviceInstance, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_GetRelatedDeviceInstance_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_GetRelatedDeviceInstance_state *state = tevent_req_data( + req, struct rpccli_PNP_GetRelatedDeviceInstance_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_PNP_GetRelatedDeviceInstance(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -381,6 +1384,116 @@ NTSTATUS rpccli_PNP_GetRelatedDeviceInstance(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_EnumerateSubKeys_state { + struct PNP_EnumerateSubKeys orig; + struct PNP_EnumerateSubKeys tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_EnumerateSubKeys_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_EnumerateSubKeys_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_EnumerateSubKeys_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_EnumerateSubKeys_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_EnumerateSubKeys, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_ENUMERATESUBKEYS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_EnumerateSubKeys_done, req); + return req; +} + +static void rpccli_PNP_EnumerateSubKeys_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_EnumerateSubKeys_state *state = tevent_req_data( + req, struct rpccli_PNP_EnumerateSubKeys_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_EnumerateSubKeys, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_EnumerateSubKeys_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_EnumerateSubKeys_state *state = tevent_req_data( + req, struct rpccli_PNP_EnumerateSubKeys_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_PNP_EnumerateSubKeys(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -422,6 +1535,133 @@ NTSTATUS rpccli_PNP_EnumerateSubKeys(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_GetDeviceList_state { + struct PNP_GetDeviceList orig; + struct PNP_GetDeviceList tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_GetDeviceList_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_GetDeviceList_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_filter /* [in] [unique,charset(UTF16)] */, + uint16_t *_buffer /* [out] [ref,length_is(*length),size_is(*length)] */, + uint32_t *_length /* [in,out] [ref] */, + uint32_t _flags /* [in] */) +{ + struct tevent_req *req; + struct rpccli_PNP_GetDeviceList_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_GetDeviceList_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.filter = _filter; + state->orig.in.length = _length; + state->orig.in.flags = _flags; + + /* Out parameters */ + state->orig.out.buffer = _buffer; + state->orig.out.length = _length; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetDeviceList, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_PNP_GetDeviceList_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_ntsvcs, + NDR_PNP_GETDEVICELIST, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_GetDeviceList_done, req); + return req; +} + +static void rpccli_PNP_GetDeviceList_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_GetDeviceList_state *state = tevent_req_data( + req, struct rpccli_PNP_GetDeviceList_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 */ + memcpy(state->orig.out.buffer, state->tmp.out.buffer, *state->tmp.in.length * sizeof(*state->orig.out.buffer)); + *state->orig.out.length = *state->tmp.out.length; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetDeviceList, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_GetDeviceList_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_GetDeviceList_state *state = tevent_req_data( + req, struct rpccli_PNP_GetDeviceList_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_PNP_GetDeviceList(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *filter /* [in] [unique,charset(UTF16)] */, @@ -472,6 +1712,129 @@ NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_GetDeviceListSize_state { + struct PNP_GetDeviceListSize orig; + struct PNP_GetDeviceListSize tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_GetDeviceListSize_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_GetDeviceListSize_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_devicename /* [in] [unique,charset(UTF16)] */, + uint32_t *_size /* [out] [ref] */, + uint32_t _flags /* [in] */) +{ + struct tevent_req *req; + struct rpccli_PNP_GetDeviceListSize_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_GetDeviceListSize_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.devicename = _devicename; + state->orig.in.flags = _flags; + + /* Out parameters */ + state->orig.out.size = _size; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetDeviceListSize, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_PNP_GetDeviceListSize_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_ntsvcs, + NDR_PNP_GETDEVICELISTSIZE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_GetDeviceListSize_done, req); + return req; +} + +static void rpccli_PNP_GetDeviceListSize_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_GetDeviceListSize_state *state = tevent_req_data( + req, struct rpccli_PNP_GetDeviceListSize_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.size = *state->tmp.out.size; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetDeviceListSize, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_GetDeviceListSize_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_GetDeviceListSize_state *state = tevent_req_data( + req, struct rpccli_PNP_GetDeviceListSize_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_PNP_GetDeviceListSize(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *devicename /* [in] [unique,charset(UTF16)] */, @@ -519,6 +1882,116 @@ NTSTATUS rpccli_PNP_GetDeviceListSize(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_GetDepth_state { + struct PNP_GetDepth orig; + struct PNP_GetDepth tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_GetDepth_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_GetDepth_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_GetDepth_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_GetDepth_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetDepth, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_GETDEPTH, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_GetDepth_done, req); + return req; +} + +static void rpccli_PNP_GetDepth_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_GetDepth_state *state = tevent_req_data( + req, struct rpccli_PNP_GetDepth_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetDepth, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_GetDepth_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_GetDepth_state *state = tevent_req_data( + req, struct rpccli_PNP_GetDepth_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_PNP_GetDepth(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -560,6 +2033,143 @@ NTSTATUS rpccli_PNP_GetDepth(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_GetDeviceRegProp_state { + struct PNP_GetDeviceRegProp orig; + struct PNP_GetDeviceRegProp tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_GetDeviceRegProp_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_GetDeviceRegProp_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_devicepath /* [in] [ref,charset(UTF16)] */, + uint32_t _property /* [in] */, + enum winreg_Type *_reg_data_type /* [in,out] [ref] */, + uint8_t *_buffer /* [out] [ref,length_is(*buffer_size),size_is(*buffer_size)] */, + uint32_t *_buffer_size /* [in,out] [ref] */, + uint32_t *_needed /* [in,out] [ref] */, + uint32_t _flags /* [in] */) +{ + struct tevent_req *req; + struct rpccli_PNP_GetDeviceRegProp_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_GetDeviceRegProp_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.devicepath = _devicepath; + state->orig.in.property = _property; + state->orig.in.reg_data_type = _reg_data_type; + state->orig.in.buffer_size = _buffer_size; + state->orig.in.needed = _needed; + state->orig.in.flags = _flags; + + /* Out parameters */ + state->orig.out.reg_data_type = _reg_data_type; + state->orig.out.buffer = _buffer; + state->orig.out.buffer_size = _buffer_size; + state->orig.out.needed = _needed; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetDeviceRegProp, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_PNP_GetDeviceRegProp_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_ntsvcs, + NDR_PNP_GETDEVICEREGPROP, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_GetDeviceRegProp_done, req); + return req; +} + +static void rpccli_PNP_GetDeviceRegProp_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_GetDeviceRegProp_state *state = tevent_req_data( + req, struct rpccli_PNP_GetDeviceRegProp_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.reg_data_type = *state->tmp.out.reg_data_type; + memcpy(state->orig.out.buffer, state->tmp.out.buffer, *state->tmp.in.buffer_size * sizeof(*state->orig.out.buffer)); + *state->orig.out.buffer_size = *state->tmp.out.buffer_size; + *state->orig.out.needed = *state->tmp.out.needed; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetDeviceRegProp, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_GetDeviceRegProp_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_GetDeviceRegProp_state *state = tevent_req_data( + req, struct rpccli_PNP_GetDeviceRegProp_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_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *devicepath /* [in] [ref,charset(UTF16)] */, @@ -618,6 +2228,116 @@ NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_SetDeviceRegProp_state { + struct PNP_SetDeviceRegProp orig; + struct PNP_SetDeviceRegProp tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_SetDeviceRegProp_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_SetDeviceRegProp_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_SetDeviceRegProp_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_SetDeviceRegProp_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_SetDeviceRegProp, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_SETDEVICEREGPROP, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_SetDeviceRegProp_done, req); + return req; +} + +static void rpccli_PNP_SetDeviceRegProp_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_SetDeviceRegProp_state *state = tevent_req_data( + req, struct rpccli_PNP_SetDeviceRegProp_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_SetDeviceRegProp, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_SetDeviceRegProp_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_SetDeviceRegProp_state *state = tevent_req_data( + req, struct rpccli_PNP_SetDeviceRegProp_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_PNP_SetDeviceRegProp(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -659,6 +2379,116 @@ NTSTATUS rpccli_PNP_SetDeviceRegProp(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_GetClassInstance_state { + struct PNP_GetClassInstance orig; + struct PNP_GetClassInstance tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_GetClassInstance_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_GetClassInstance_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_GetClassInstance_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_GetClassInstance_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetClassInstance, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_GETCLASSINSTANCE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_GetClassInstance_done, req); + return req; +} + +static void rpccli_PNP_GetClassInstance_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_GetClassInstance_state *state = tevent_req_data( + req, struct rpccli_PNP_GetClassInstance_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetClassInstance, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_GetClassInstance_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_GetClassInstance_state *state = tevent_req_data( + req, struct rpccli_PNP_GetClassInstance_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_PNP_GetClassInstance(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -700,6 +2530,116 @@ NTSTATUS rpccli_PNP_GetClassInstance(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_CreateKey_state { + struct PNP_CreateKey orig; + struct PNP_CreateKey tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_CreateKey_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_CreateKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_CreateKey_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_CreateKey_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_CreateKey, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_CREATEKEY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_CreateKey_done, req); + return req; +} + +static void rpccli_PNP_CreateKey_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_CreateKey_state *state = tevent_req_data( + req, struct rpccli_PNP_CreateKey_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_CreateKey, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_CreateKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_CreateKey_state *state = tevent_req_data( + req, struct rpccli_PNP_CreateKey_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_PNP_CreateKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -741,6 +2681,116 @@ NTSTATUS rpccli_PNP_CreateKey(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_DeleteRegistryKey_state { + struct PNP_DeleteRegistryKey orig; + struct PNP_DeleteRegistryKey tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_DeleteRegistryKey_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_DeleteRegistryKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_DeleteRegistryKey_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_DeleteRegistryKey_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_DeleteRegistryKey, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_DELETEREGISTRYKEY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_DeleteRegistryKey_done, req); + return req; +} + +static void rpccli_PNP_DeleteRegistryKey_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_DeleteRegistryKey_state *state = tevent_req_data( + req, struct rpccli_PNP_DeleteRegistryKey_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_DeleteRegistryKey, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_DeleteRegistryKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_DeleteRegistryKey_state *state = tevent_req_data( + req, struct rpccli_PNP_DeleteRegistryKey_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_PNP_DeleteRegistryKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -782,6 +2832,116 @@ NTSTATUS rpccli_PNP_DeleteRegistryKey(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_GetClassCount_state { + struct PNP_GetClassCount orig; + struct PNP_GetClassCount tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_GetClassCount_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_GetClassCount_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_GetClassCount_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_GetClassCount_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetClassCount, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_GETCLASSCOUNT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_GetClassCount_done, req); + return req; +} + +static void rpccli_PNP_GetClassCount_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_GetClassCount_state *state = tevent_req_data( + req, struct rpccli_PNP_GetClassCount_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetClassCount, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_GetClassCount_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_GetClassCount_state *state = tevent_req_data( + req, struct rpccli_PNP_GetClassCount_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_PNP_GetClassCount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -823,6 +2983,116 @@ NTSTATUS rpccli_PNP_GetClassCount(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_GetClassName_state { + struct PNP_GetClassName orig; + struct PNP_GetClassName tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_GetClassName_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_GetClassName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_GetClassName_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_GetClassName_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetClassName, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_GETCLASSNAME, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_GetClassName_done, req); + return req; +} + +static void rpccli_PNP_GetClassName_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_GetClassName_state *state = tevent_req_data( + req, struct rpccli_PNP_GetClassName_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetClassName, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_GetClassName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_GetClassName_state *state = tevent_req_data( + req, struct rpccli_PNP_GetClassName_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_PNP_GetClassName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -864,6 +3134,116 @@ NTSTATUS rpccli_PNP_GetClassName(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_DeleteClassKey_state { + struct PNP_DeleteClassKey orig; + struct PNP_DeleteClassKey tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_DeleteClassKey_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_DeleteClassKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_DeleteClassKey_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_DeleteClassKey_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_DeleteClassKey, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_DELETECLASSKEY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_DeleteClassKey_done, req); + return req; +} + +static void rpccli_PNP_DeleteClassKey_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_DeleteClassKey_state *state = tevent_req_data( + req, struct rpccli_PNP_DeleteClassKey_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_DeleteClassKey, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_DeleteClassKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_DeleteClassKey_state *state = tevent_req_data( + req, struct rpccli_PNP_DeleteClassKey_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_PNP_DeleteClassKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -905,6 +3285,116 @@ NTSTATUS rpccli_PNP_DeleteClassKey(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_GetInterfaceDeviceAlias_state { + struct PNP_GetInterfaceDeviceAlias orig; + struct PNP_GetInterfaceDeviceAlias tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_GetInterfaceDeviceAlias_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_GetInterfaceDeviceAlias_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_GetInterfaceDeviceAlias_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_GetInterfaceDeviceAlias_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceAlias, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_GETINTERFACEDEVICEALIAS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_GetInterfaceDeviceAlias_done, req); + return req; +} + +static void rpccli_PNP_GetInterfaceDeviceAlias_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_GetInterfaceDeviceAlias_state *state = tevent_req_data( + req, struct rpccli_PNP_GetInterfaceDeviceAlias_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceAlias, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_GetInterfaceDeviceAlias_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_GetInterfaceDeviceAlias_state *state = tevent_req_data( + req, struct rpccli_PNP_GetInterfaceDeviceAlias_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_PNP_GetInterfaceDeviceAlias(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -946,6 +3436,116 @@ NTSTATUS rpccli_PNP_GetInterfaceDeviceAlias(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_GetInterfaceDeviceList_state { + struct PNP_GetInterfaceDeviceList orig; + struct PNP_GetInterfaceDeviceList tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_GetInterfaceDeviceList_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_GetInterfaceDeviceList_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_GetInterfaceDeviceList_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_GetInterfaceDeviceList_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceList, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_GETINTERFACEDEVICELIST, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_GetInterfaceDeviceList_done, req); + return req; +} + +static void rpccli_PNP_GetInterfaceDeviceList_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_GetInterfaceDeviceList_state *state = tevent_req_data( + req, struct rpccli_PNP_GetInterfaceDeviceList_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceList, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_GetInterfaceDeviceList_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_GetInterfaceDeviceList_state *state = tevent_req_data( + req, struct rpccli_PNP_GetInterfaceDeviceList_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_PNP_GetInterfaceDeviceList(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -987,6 +3587,116 @@ NTSTATUS rpccli_PNP_GetInterfaceDeviceList(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_GetInterfaceDeviceListSize_state { + struct PNP_GetInterfaceDeviceListSize orig; + struct PNP_GetInterfaceDeviceListSize tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_GetInterfaceDeviceListSize_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_GetInterfaceDeviceListSize_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_GetInterfaceDeviceListSize_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_GetInterfaceDeviceListSize_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetInterfaceDeviceListSize, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_GETINTERFACEDEVICELISTSIZE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_GetInterfaceDeviceListSize_done, req); + return req; +} + +static void rpccli_PNP_GetInterfaceDeviceListSize_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_GetInterfaceDeviceListSize_state *state = tevent_req_data( + req, struct rpccli_PNP_GetInterfaceDeviceListSize_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetInterfaceDeviceListSize, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_GetInterfaceDeviceListSize_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_GetInterfaceDeviceListSize_state *state = tevent_req_data( + req, struct rpccli_PNP_GetInterfaceDeviceListSize_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_PNP_GetInterfaceDeviceListSize(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1028,6 +3738,116 @@ NTSTATUS rpccli_PNP_GetInterfaceDeviceListSize(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_RegisterDeviceClassAssociation_state { + struct PNP_RegisterDeviceClassAssociation orig; + struct PNP_RegisterDeviceClassAssociation tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_RegisterDeviceClassAssociation_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_RegisterDeviceClassAssociation_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_RegisterDeviceClassAssociation_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_RegisterDeviceClassAssociation_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_RegisterDeviceClassAssociation, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_REGISTERDEVICECLASSASSOCIATION, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_RegisterDeviceClassAssociation_done, req); + return req; +} + +static void rpccli_PNP_RegisterDeviceClassAssociation_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_RegisterDeviceClassAssociation_state *state = tevent_req_data( + req, struct rpccli_PNP_RegisterDeviceClassAssociation_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_RegisterDeviceClassAssociation, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_RegisterDeviceClassAssociation_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_RegisterDeviceClassAssociation_state *state = tevent_req_data( + req, struct rpccli_PNP_RegisterDeviceClassAssociation_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_PNP_RegisterDeviceClassAssociation(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1069,6 +3889,116 @@ NTSTATUS rpccli_PNP_RegisterDeviceClassAssociation(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_UnregisterDeviceClassAssociation_state { + struct PNP_UnregisterDeviceClassAssociation orig; + struct PNP_UnregisterDeviceClassAssociation tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_UnregisterDeviceClassAssociation_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_UnregisterDeviceClassAssociation_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_UnregisterDeviceClassAssociation_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_UnregisterDeviceClassAssociation_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_UnregisterDeviceClassAssociation, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_UNREGISTERDEVICECLASSASSOCIATION, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_UnregisterDeviceClassAssociation_done, req); + return req; +} + +static void rpccli_PNP_UnregisterDeviceClassAssociation_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_UnregisterDeviceClassAssociation_state *state = tevent_req_data( + req, struct rpccli_PNP_UnregisterDeviceClassAssociation_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_UnregisterDeviceClassAssociation, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_UnregisterDeviceClassAssociation_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_UnregisterDeviceClassAssociation_state *state = tevent_req_data( + req, struct rpccli_PNP_UnregisterDeviceClassAssociation_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_PNP_UnregisterDeviceClassAssociation(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1110,6 +4040,116 @@ NTSTATUS rpccli_PNP_UnregisterDeviceClassAssociation(struct rpc_pipe_client *cli return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_GetClassRegProp_state { + struct PNP_GetClassRegProp orig; + struct PNP_GetClassRegProp tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_GetClassRegProp_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_GetClassRegProp_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_GetClassRegProp_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_GetClassRegProp_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetClassRegProp, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_GETCLASSREGPROP, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_GetClassRegProp_done, req); + return req; +} + +static void rpccli_PNP_GetClassRegProp_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_GetClassRegProp_state *state = tevent_req_data( + req, struct rpccli_PNP_GetClassRegProp_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetClassRegProp, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_GetClassRegProp_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_GetClassRegProp_state *state = tevent_req_data( + req, struct rpccli_PNP_GetClassRegProp_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_PNP_GetClassRegProp(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1151,6 +4191,116 @@ NTSTATUS rpccli_PNP_GetClassRegProp(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_SetClassRegProp_state { + struct PNP_SetClassRegProp orig; + struct PNP_SetClassRegProp tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_SetClassRegProp_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_SetClassRegProp_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_SetClassRegProp_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_SetClassRegProp_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_SetClassRegProp, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_SETCLASSREGPROP, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_SetClassRegProp_done, req); + return req; +} + +static void rpccli_PNP_SetClassRegProp_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_SetClassRegProp_state *state = tevent_req_data( + req, struct rpccli_PNP_SetClassRegProp_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_SetClassRegProp, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_SetClassRegProp_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_SetClassRegProp_state *state = tevent_req_data( + req, struct rpccli_PNP_SetClassRegProp_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_PNP_SetClassRegProp(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1192,6 +4342,116 @@ NTSTATUS rpccli_PNP_SetClassRegProp(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_CreateDevInst_state { + struct PNP_CreateDevInst orig; + struct PNP_CreateDevInst tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_CreateDevInst_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_CreateDevInst_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_CreateDevInst_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_CreateDevInst_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_CreateDevInst, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_CREATEDEVINST, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_CreateDevInst_done, req); + return req; +} + +static void rpccli_PNP_CreateDevInst_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_CreateDevInst_state *state = tevent_req_data( + req, struct rpccli_PNP_CreateDevInst_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_CreateDevInst, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_CreateDevInst_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_CreateDevInst_state *state = tevent_req_data( + req, struct rpccli_PNP_CreateDevInst_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_PNP_CreateDevInst(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1233,6 +4493,116 @@ NTSTATUS rpccli_PNP_CreateDevInst(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_DeviceInstanceAction_state { + struct PNP_DeviceInstanceAction orig; + struct PNP_DeviceInstanceAction tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_DeviceInstanceAction_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_DeviceInstanceAction_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_DeviceInstanceAction_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_DeviceInstanceAction_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_DeviceInstanceAction, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_DEVICEINSTANCEACTION, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_DeviceInstanceAction_done, req); + return req; +} + +static void rpccli_PNP_DeviceInstanceAction_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_DeviceInstanceAction_state *state = tevent_req_data( + req, struct rpccli_PNP_DeviceInstanceAction_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_DeviceInstanceAction, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_DeviceInstanceAction_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_DeviceInstanceAction_state *state = tevent_req_data( + req, struct rpccli_PNP_DeviceInstanceAction_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_PNP_DeviceInstanceAction(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1274,6 +4644,116 @@ NTSTATUS rpccli_PNP_DeviceInstanceAction(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_GetDeviceStatus_state { + struct PNP_GetDeviceStatus orig; + struct PNP_GetDeviceStatus tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_GetDeviceStatus_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_GetDeviceStatus_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_GetDeviceStatus_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_GetDeviceStatus_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetDeviceStatus, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_GETDEVICESTATUS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_GetDeviceStatus_done, req); + return req; +} + +static void rpccli_PNP_GetDeviceStatus_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_GetDeviceStatus_state *state = tevent_req_data( + req, struct rpccli_PNP_GetDeviceStatus_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetDeviceStatus, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_GetDeviceStatus_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_GetDeviceStatus_state *state = tevent_req_data( + req, struct rpccli_PNP_GetDeviceStatus_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_PNP_GetDeviceStatus(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1315,6 +4795,116 @@ NTSTATUS rpccli_PNP_GetDeviceStatus(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_SetDeviceProblem_state { + struct PNP_SetDeviceProblem orig; + struct PNP_SetDeviceProblem tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_SetDeviceProblem_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_SetDeviceProblem_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_SetDeviceProblem_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_SetDeviceProblem_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_SetDeviceProblem, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_SETDEVICEPROBLEM, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_SetDeviceProblem_done, req); + return req; +} + +static void rpccli_PNP_SetDeviceProblem_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_SetDeviceProblem_state *state = tevent_req_data( + req, struct rpccli_PNP_SetDeviceProblem_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_SetDeviceProblem, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_SetDeviceProblem_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_SetDeviceProblem_state *state = tevent_req_data( + req, struct rpccli_PNP_SetDeviceProblem_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_PNP_SetDeviceProblem(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1356,6 +4946,116 @@ NTSTATUS rpccli_PNP_SetDeviceProblem(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_DisableDevInst_state { + struct PNP_DisableDevInst orig; + struct PNP_DisableDevInst tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_DisableDevInst_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_DisableDevInst_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_DisableDevInst_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_DisableDevInst_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_DisableDevInst, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_DISABLEDEVINST, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_DisableDevInst_done, req); + return req; +} + +static void rpccli_PNP_DisableDevInst_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_DisableDevInst_state *state = tevent_req_data( + req, struct rpccli_PNP_DisableDevInst_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_DisableDevInst, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_DisableDevInst_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_DisableDevInst_state *state = tevent_req_data( + req, struct rpccli_PNP_DisableDevInst_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_PNP_DisableDevInst(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1397,6 +5097,116 @@ NTSTATUS rpccli_PNP_DisableDevInst(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_UninstallDevInst_state { + struct PNP_UninstallDevInst orig; + struct PNP_UninstallDevInst tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_UninstallDevInst_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_UninstallDevInst_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_UninstallDevInst_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_UninstallDevInst_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_UninstallDevInst, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_UNINSTALLDEVINST, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_UninstallDevInst_done, req); + return req; +} + +static void rpccli_PNP_UninstallDevInst_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_UninstallDevInst_state *state = tevent_req_data( + req, struct rpccli_PNP_UninstallDevInst_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_UninstallDevInst, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_UninstallDevInst_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_UninstallDevInst_state *state = tevent_req_data( + req, struct rpccli_PNP_UninstallDevInst_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_PNP_UninstallDevInst(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1438,6 +5248,116 @@ NTSTATUS rpccli_PNP_UninstallDevInst(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_AddID_state { + struct PNP_AddID orig; + struct PNP_AddID tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_AddID_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_AddID_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_AddID_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_AddID_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_AddID, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_ADDID, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_AddID_done, req); + return req; +} + +static void rpccli_PNP_AddID_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_AddID_state *state = tevent_req_data( + req, struct rpccli_PNP_AddID_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_AddID, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_AddID_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_AddID_state *state = tevent_req_data( + req, struct rpccli_PNP_AddID_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_PNP_AddID(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1479,6 +5399,116 @@ NTSTATUS rpccli_PNP_AddID(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_RegisterDriver_state { + struct PNP_RegisterDriver orig; + struct PNP_RegisterDriver tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_RegisterDriver_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_RegisterDriver_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_RegisterDriver_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_RegisterDriver_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_RegisterDriver, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_REGISTERDRIVER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_RegisterDriver_done, req); + return req; +} + +static void rpccli_PNP_RegisterDriver_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_RegisterDriver_state *state = tevent_req_data( + req, struct rpccli_PNP_RegisterDriver_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_RegisterDriver, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_RegisterDriver_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_RegisterDriver_state *state = tevent_req_data( + req, struct rpccli_PNP_RegisterDriver_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_PNP_RegisterDriver(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1520,6 +5550,116 @@ NTSTATUS rpccli_PNP_RegisterDriver(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_QueryRemove_state { + struct PNP_QueryRemove orig; + struct PNP_QueryRemove tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_QueryRemove_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_QueryRemove_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_QueryRemove_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_QueryRemove_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_QueryRemove, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_QUERYREMOVE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_QueryRemove_done, req); + return req; +} + +static void rpccli_PNP_QueryRemove_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_QueryRemove_state *state = tevent_req_data( + req, struct rpccli_PNP_QueryRemove_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_QueryRemove, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_QueryRemove_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_QueryRemove_state *state = tevent_req_data( + req, struct rpccli_PNP_QueryRemove_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_PNP_QueryRemove(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1561,6 +5701,116 @@ NTSTATUS rpccli_PNP_QueryRemove(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_RequestDeviceEject_state { + struct PNP_RequestDeviceEject orig; + struct PNP_RequestDeviceEject tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_RequestDeviceEject_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_RequestDeviceEject_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_RequestDeviceEject_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_RequestDeviceEject_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_RequestDeviceEject, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_REQUESTDEVICEEJECT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_RequestDeviceEject_done, req); + return req; +} + +static void rpccli_PNP_RequestDeviceEject_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_RequestDeviceEject_state *state = tevent_req_data( + req, struct rpccli_PNP_RequestDeviceEject_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_RequestDeviceEject, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_RequestDeviceEject_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_RequestDeviceEject_state *state = tevent_req_data( + req, struct rpccli_PNP_RequestDeviceEject_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_PNP_RequestDeviceEject(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1602,6 +5852,116 @@ NTSTATUS rpccli_PNP_RequestDeviceEject(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_IsDockStationPresent_state { + struct PNP_IsDockStationPresent orig; + struct PNP_IsDockStationPresent tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_IsDockStationPresent_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_IsDockStationPresent_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_IsDockStationPresent_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_IsDockStationPresent_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_IsDockStationPresent, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_ISDOCKSTATIONPRESENT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_IsDockStationPresent_done, req); + return req; +} + +static void rpccli_PNP_IsDockStationPresent_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_IsDockStationPresent_state *state = tevent_req_data( + req, struct rpccli_PNP_IsDockStationPresent_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_IsDockStationPresent, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_IsDockStationPresent_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_IsDockStationPresent_state *state = tevent_req_data( + req, struct rpccli_PNP_IsDockStationPresent_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_PNP_IsDockStationPresent(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1643,6 +6003,116 @@ NTSTATUS rpccli_PNP_IsDockStationPresent(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_RequestEjectPC_state { + struct PNP_RequestEjectPC orig; + struct PNP_RequestEjectPC tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_RequestEjectPC_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_RequestEjectPC_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_RequestEjectPC_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_RequestEjectPC_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_RequestEjectPC, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_REQUESTEJECTPC, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_RequestEjectPC_done, req); + return req; +} + +static void rpccli_PNP_RequestEjectPC_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_RequestEjectPC_state *state = tevent_req_data( + req, struct rpccli_PNP_RequestEjectPC_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_RequestEjectPC, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_RequestEjectPC_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_RequestEjectPC_state *state = tevent_req_data( + req, struct rpccli_PNP_RequestEjectPC_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_PNP_RequestEjectPC(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1684,6 +6154,149 @@ NTSTATUS rpccli_PNP_RequestEjectPC(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_HwProfFlags_state { + struct PNP_HwProfFlags orig; + struct PNP_HwProfFlags tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_HwProfFlags_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_HwProfFlags_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint32_t _action /* [in] */, + const char *_devicepath /* [in] [ref,charset(UTF16)] */, + uint32_t _config /* [in] */, + uint32_t *_profile_flags /* [in,out] [ref] */, + uint16_t *_veto_type /* [in,out] [unique] */, + const char *_unknown5 /* [in] [unique,charset(UTF16)] */, + const char **_unknown5a /* [out] [unique,charset(UTF16)] */, + uint32_t _name_length /* [in] */, + uint32_t _flags /* [in] */) +{ + struct tevent_req *req; + struct rpccli_PNP_HwProfFlags_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_HwProfFlags_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.action = _action; + state->orig.in.devicepath = _devicepath; + state->orig.in.config = _config; + state->orig.in.profile_flags = _profile_flags; + state->orig.in.veto_type = _veto_type; + state->orig.in.unknown5 = _unknown5; + state->orig.in.name_length = _name_length; + state->orig.in.flags = _flags; + + /* Out parameters */ + state->orig.out.profile_flags = _profile_flags; + state->orig.out.veto_type = _veto_type; + state->orig.out.unknown5a = _unknown5a; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_HwProfFlags, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_PNP_HwProfFlags_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_ntsvcs, + NDR_PNP_HWPROFFLAGS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_HwProfFlags_done, req); + return req; +} + +static void rpccli_PNP_HwProfFlags_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_HwProfFlags_state *state = tevent_req_data( + req, struct rpccli_PNP_HwProfFlags_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.profile_flags = *state->tmp.out.profile_flags; + if (state->orig.out.veto_type && state->tmp.out.veto_type) { + *state->orig.out.veto_type = *state->tmp.out.veto_type; + } + if (state->orig.out.unknown5a && state->tmp.out.unknown5a) { + *state->orig.out.unknown5a = *state->tmp.out.unknown5a; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_HwProfFlags, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_HwProfFlags_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_HwProfFlags_state *state = tevent_req_data( + req, struct rpccli_PNP_HwProfFlags_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_PNP_HwProfFlags(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t action /* [in] */, @@ -1749,6 +6362,132 @@ NTSTATUS rpccli_PNP_HwProfFlags(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_GetHwProfInfo_state { + struct PNP_GetHwProfInfo orig; + struct PNP_GetHwProfInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_GetHwProfInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_GetHwProfInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint32_t _idx /* [in] */, + struct PNP_HwProfInfo *_info /* [in,out] [ref] */, + uint32_t _size /* [in] */, + uint32_t _flags /* [in] */) +{ + struct tevent_req *req; + struct rpccli_PNP_GetHwProfInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_GetHwProfInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.idx = _idx; + state->orig.in.info = _info; + state->orig.in.size = _size; + state->orig.in.flags = _flags; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetHwProfInfo, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_PNP_GetHwProfInfo_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_ntsvcs, + NDR_PNP_GETHWPROFINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_GetHwProfInfo_done, req); + return req; +} + +static void rpccli_PNP_GetHwProfInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_GetHwProfInfo_state *state = tevent_req_data( + req, struct rpccli_PNP_GetHwProfInfo_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(PNP_GetHwProfInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_GetHwProfInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_GetHwProfInfo_state *state = tevent_req_data( + req, struct rpccli_PNP_GetHwProfInfo_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_PNP_GetHwProfInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t idx /* [in] */, @@ -1799,6 +6538,116 @@ NTSTATUS rpccli_PNP_GetHwProfInfo(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_AddEmptyLogConf_state { + struct PNP_AddEmptyLogConf orig; + struct PNP_AddEmptyLogConf tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_AddEmptyLogConf_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_AddEmptyLogConf_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_AddEmptyLogConf_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_AddEmptyLogConf_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_AddEmptyLogConf, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_ADDEMPTYLOGCONF, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_AddEmptyLogConf_done, req); + return req; +} + +static void rpccli_PNP_AddEmptyLogConf_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_AddEmptyLogConf_state *state = tevent_req_data( + req, struct rpccli_PNP_AddEmptyLogConf_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_AddEmptyLogConf, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_AddEmptyLogConf_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_AddEmptyLogConf_state *state = tevent_req_data( + req, struct rpccli_PNP_AddEmptyLogConf_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_PNP_AddEmptyLogConf(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1840,6 +6689,116 @@ NTSTATUS rpccli_PNP_AddEmptyLogConf(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_FreeLogConf_state { + struct PNP_FreeLogConf orig; + struct PNP_FreeLogConf tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_FreeLogConf_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_FreeLogConf_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_FreeLogConf_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_FreeLogConf_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_FreeLogConf, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_FREELOGCONF, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_FreeLogConf_done, req); + return req; +} + +static void rpccli_PNP_FreeLogConf_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_FreeLogConf_state *state = tevent_req_data( + req, struct rpccli_PNP_FreeLogConf_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_FreeLogConf, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_FreeLogConf_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_FreeLogConf_state *state = tevent_req_data( + req, struct rpccli_PNP_FreeLogConf_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_PNP_FreeLogConf(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1881,6 +6840,116 @@ NTSTATUS rpccli_PNP_FreeLogConf(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_GetFirstLogConf_state { + struct PNP_GetFirstLogConf orig; + struct PNP_GetFirstLogConf tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_GetFirstLogConf_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_GetFirstLogConf_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_GetFirstLogConf_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_GetFirstLogConf_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetFirstLogConf, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_GETFIRSTLOGCONF, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_GetFirstLogConf_done, req); + return req; +} + +static void rpccli_PNP_GetFirstLogConf_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_GetFirstLogConf_state *state = tevent_req_data( + req, struct rpccli_PNP_GetFirstLogConf_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetFirstLogConf, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_GetFirstLogConf_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_GetFirstLogConf_state *state = tevent_req_data( + req, struct rpccli_PNP_GetFirstLogConf_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_PNP_GetFirstLogConf(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1922,6 +6991,116 @@ NTSTATUS rpccli_PNP_GetFirstLogConf(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_GetNextLogConf_state { + struct PNP_GetNextLogConf orig; + struct PNP_GetNextLogConf tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_GetNextLogConf_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_GetNextLogConf_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_GetNextLogConf_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_GetNextLogConf_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetNextLogConf, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_GETNEXTLOGCONF, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_GetNextLogConf_done, req); + return req; +} + +static void rpccli_PNP_GetNextLogConf_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_GetNextLogConf_state *state = tevent_req_data( + req, struct rpccli_PNP_GetNextLogConf_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetNextLogConf, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_GetNextLogConf_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_GetNextLogConf_state *state = tevent_req_data( + req, struct rpccli_PNP_GetNextLogConf_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_PNP_GetNextLogConf(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1963,6 +7142,116 @@ NTSTATUS rpccli_PNP_GetNextLogConf(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_GetLogConfPriority_state { + struct PNP_GetLogConfPriority orig; + struct PNP_GetLogConfPriority tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_GetLogConfPriority_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_GetLogConfPriority_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_GetLogConfPriority_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_GetLogConfPriority_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetLogConfPriority, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_GETLOGCONFPRIORITY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_GetLogConfPriority_done, req); + return req; +} + +static void rpccli_PNP_GetLogConfPriority_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_GetLogConfPriority_state *state = tevent_req_data( + req, struct rpccli_PNP_GetLogConfPriority_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetLogConfPriority, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_GetLogConfPriority_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_GetLogConfPriority_state *state = tevent_req_data( + req, struct rpccli_PNP_GetLogConfPriority_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_PNP_GetLogConfPriority(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2004,6 +7293,116 @@ NTSTATUS rpccli_PNP_GetLogConfPriority(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_AddResDes_state { + struct PNP_AddResDes orig; + struct PNP_AddResDes tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_AddResDes_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_AddResDes_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_AddResDes_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_AddResDes_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_AddResDes, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_ADDRESDES, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_AddResDes_done, req); + return req; +} + +static void rpccli_PNP_AddResDes_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_AddResDes_state *state = tevent_req_data( + req, struct rpccli_PNP_AddResDes_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_AddResDes, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_AddResDes_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_AddResDes_state *state = tevent_req_data( + req, struct rpccli_PNP_AddResDes_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_PNP_AddResDes(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2045,6 +7444,116 @@ NTSTATUS rpccli_PNP_AddResDes(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_FreeResDes_state { + struct PNP_FreeResDes orig; + struct PNP_FreeResDes tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_FreeResDes_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_FreeResDes_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_FreeResDes_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_FreeResDes_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_FreeResDes, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_FREERESDES, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_FreeResDes_done, req); + return req; +} + +static void rpccli_PNP_FreeResDes_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_FreeResDes_state *state = tevent_req_data( + req, struct rpccli_PNP_FreeResDes_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_FreeResDes, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_FreeResDes_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_FreeResDes_state *state = tevent_req_data( + req, struct rpccli_PNP_FreeResDes_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_PNP_FreeResDes(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2086,6 +7595,116 @@ NTSTATUS rpccli_PNP_FreeResDes(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_GetNextResDes_state { + struct PNP_GetNextResDes orig; + struct PNP_GetNextResDes tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_GetNextResDes_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_GetNextResDes_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_GetNextResDes_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_GetNextResDes_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetNextResDes, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_GETNEXTRESDES, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_GetNextResDes_done, req); + return req; +} + +static void rpccli_PNP_GetNextResDes_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_GetNextResDes_state *state = tevent_req_data( + req, struct rpccli_PNP_GetNextResDes_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetNextResDes, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_GetNextResDes_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_GetNextResDes_state *state = tevent_req_data( + req, struct rpccli_PNP_GetNextResDes_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_PNP_GetNextResDes(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2127,6 +7746,116 @@ NTSTATUS rpccli_PNP_GetNextResDes(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_GetResDesData_state { + struct PNP_GetResDesData orig; + struct PNP_GetResDesData tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_GetResDesData_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_GetResDesData_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_GetResDesData_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_GetResDesData_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetResDesData, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_GETRESDESDATA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_GetResDesData_done, req); + return req; +} + +static void rpccli_PNP_GetResDesData_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_GetResDesData_state *state = tevent_req_data( + req, struct rpccli_PNP_GetResDesData_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetResDesData, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_GetResDesData_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_GetResDesData_state *state = tevent_req_data( + req, struct rpccli_PNP_GetResDesData_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_PNP_GetResDesData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2168,6 +7897,116 @@ NTSTATUS rpccli_PNP_GetResDesData(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_GetResDesDataSize_state { + struct PNP_GetResDesDataSize orig; + struct PNP_GetResDesDataSize tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_GetResDesDataSize_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_GetResDesDataSize_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_GetResDesDataSize_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_GetResDesDataSize_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetResDesDataSize, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_GETRESDESDATASIZE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_GetResDesDataSize_done, req); + return req; +} + +static void rpccli_PNP_GetResDesDataSize_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_GetResDesDataSize_state *state = tevent_req_data( + req, struct rpccli_PNP_GetResDesDataSize_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetResDesDataSize, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_GetResDesDataSize_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_GetResDesDataSize_state *state = tevent_req_data( + req, struct rpccli_PNP_GetResDesDataSize_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_PNP_GetResDesDataSize(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2209,6 +8048,116 @@ NTSTATUS rpccli_PNP_GetResDesDataSize(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_ModifyResDes_state { + struct PNP_ModifyResDes orig; + struct PNP_ModifyResDes tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_ModifyResDes_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_ModifyResDes_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_ModifyResDes_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_ModifyResDes_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_ModifyResDes, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_MODIFYRESDES, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_ModifyResDes_done, req); + return req; +} + +static void rpccli_PNP_ModifyResDes_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_ModifyResDes_state *state = tevent_req_data( + req, struct rpccli_PNP_ModifyResDes_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_ModifyResDes, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_ModifyResDes_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_ModifyResDes_state *state = tevent_req_data( + req, struct rpccli_PNP_ModifyResDes_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_PNP_ModifyResDes(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2250,6 +8199,116 @@ NTSTATUS rpccli_PNP_ModifyResDes(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_DetectResourceLimit_state { + struct PNP_DetectResourceLimit orig; + struct PNP_DetectResourceLimit tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_DetectResourceLimit_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_DetectResourceLimit_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_DetectResourceLimit_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_DetectResourceLimit_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_DetectResourceLimit, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_DETECTRESOURCELIMIT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_DetectResourceLimit_done, req); + return req; +} + +static void rpccli_PNP_DetectResourceLimit_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_DetectResourceLimit_state *state = tevent_req_data( + req, struct rpccli_PNP_DetectResourceLimit_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_DetectResourceLimit, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_DetectResourceLimit_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_DetectResourceLimit_state *state = tevent_req_data( + req, struct rpccli_PNP_DetectResourceLimit_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_PNP_DetectResourceLimit(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2291,6 +8350,116 @@ NTSTATUS rpccli_PNP_DetectResourceLimit(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_QueryResConfList_state { + struct PNP_QueryResConfList orig; + struct PNP_QueryResConfList tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_QueryResConfList_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_QueryResConfList_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_QueryResConfList_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_QueryResConfList_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_QueryResConfList, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_QUERYRESCONFLIST, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_QueryResConfList_done, req); + return req; +} + +static void rpccli_PNP_QueryResConfList_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_QueryResConfList_state *state = tevent_req_data( + req, struct rpccli_PNP_QueryResConfList_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_QueryResConfList, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_QueryResConfList_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_QueryResConfList_state *state = tevent_req_data( + req, struct rpccli_PNP_QueryResConfList_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_PNP_QueryResConfList(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2332,6 +8501,116 @@ NTSTATUS rpccli_PNP_QueryResConfList(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_SetHwProf_state { + struct PNP_SetHwProf orig; + struct PNP_SetHwProf tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_SetHwProf_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_SetHwProf_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_SetHwProf_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_SetHwProf_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_SetHwProf, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_SETHWPROF, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_SetHwProf_done, req); + return req; +} + +static void rpccli_PNP_SetHwProf_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_SetHwProf_state *state = tevent_req_data( + req, struct rpccli_PNP_SetHwProf_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_SetHwProf, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_SetHwProf_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_SetHwProf_state *state = tevent_req_data( + req, struct rpccli_PNP_SetHwProf_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_PNP_SetHwProf(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2373,6 +8652,116 @@ NTSTATUS rpccli_PNP_SetHwProf(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_QueryArbitratorFreeData_state { + struct PNP_QueryArbitratorFreeData orig; + struct PNP_QueryArbitratorFreeData tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_QueryArbitratorFreeData_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_QueryArbitratorFreeData_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_QueryArbitratorFreeData_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_QueryArbitratorFreeData_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_QueryArbitratorFreeData, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_QUERYARBITRATORFREEDATA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_QueryArbitratorFreeData_done, req); + return req; +} + +static void rpccli_PNP_QueryArbitratorFreeData_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_QueryArbitratorFreeData_state *state = tevent_req_data( + req, struct rpccli_PNP_QueryArbitratorFreeData_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_QueryArbitratorFreeData, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_QueryArbitratorFreeData_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_QueryArbitratorFreeData_state *state = tevent_req_data( + req, struct rpccli_PNP_QueryArbitratorFreeData_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_PNP_QueryArbitratorFreeData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2414,6 +8803,116 @@ NTSTATUS rpccli_PNP_QueryArbitratorFreeData(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_QueryArbitratorFreeSize_state { + struct PNP_QueryArbitratorFreeSize orig; + struct PNP_QueryArbitratorFreeSize tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_QueryArbitratorFreeSize_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_QueryArbitratorFreeSize_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_QueryArbitratorFreeSize_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_QueryArbitratorFreeSize_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_QueryArbitratorFreeSize, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_QUERYARBITRATORFREESIZE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_QueryArbitratorFreeSize_done, req); + return req; +} + +static void rpccli_PNP_QueryArbitratorFreeSize_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_QueryArbitratorFreeSize_state *state = tevent_req_data( + req, struct rpccli_PNP_QueryArbitratorFreeSize_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_QueryArbitratorFreeSize, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_QueryArbitratorFreeSize_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_QueryArbitratorFreeSize_state *state = tevent_req_data( + req, struct rpccli_PNP_QueryArbitratorFreeSize_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_PNP_QueryArbitratorFreeSize(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2455,6 +8954,116 @@ NTSTATUS rpccli_PNP_QueryArbitratorFreeSize(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_RunDetection_state { + struct PNP_RunDetection orig; + struct PNP_RunDetection tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_RunDetection_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_RunDetection_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_RunDetection_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_RunDetection_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_RunDetection, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_RUNDETECTION, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_RunDetection_done, req); + return req; +} + +static void rpccli_PNP_RunDetection_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_RunDetection_state *state = tevent_req_data( + req, struct rpccli_PNP_RunDetection_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_RunDetection, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_RunDetection_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_RunDetection_state *state = tevent_req_data( + req, struct rpccli_PNP_RunDetection_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_PNP_RunDetection(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2496,6 +9105,116 @@ NTSTATUS rpccli_PNP_RunDetection(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_RegisterNotification_state { + struct PNP_RegisterNotification orig; + struct PNP_RegisterNotification tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_RegisterNotification_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_RegisterNotification_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_RegisterNotification_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_RegisterNotification_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_RegisterNotification, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_REGISTERNOTIFICATION, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_RegisterNotification_done, req); + return req; +} + +static void rpccli_PNP_RegisterNotification_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_RegisterNotification_state *state = tevent_req_data( + req, struct rpccli_PNP_RegisterNotification_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_RegisterNotification, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_RegisterNotification_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_RegisterNotification_state *state = tevent_req_data( + req, struct rpccli_PNP_RegisterNotification_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_PNP_RegisterNotification(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2537,6 +9256,116 @@ NTSTATUS rpccli_PNP_RegisterNotification(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_UnregisterNotification_state { + struct PNP_UnregisterNotification orig; + struct PNP_UnregisterNotification tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_UnregisterNotification_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_UnregisterNotification_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_UnregisterNotification_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_UnregisterNotification_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_UnregisterNotification, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_UNREGISTERNOTIFICATION, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_UnregisterNotification_done, req); + return req; +} + +static void rpccli_PNP_UnregisterNotification_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_UnregisterNotification_state *state = tevent_req_data( + req, struct rpccli_PNP_UnregisterNotification_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_UnregisterNotification, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_UnregisterNotification_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_UnregisterNotification_state *state = tevent_req_data( + req, struct rpccli_PNP_UnregisterNotification_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_PNP_UnregisterNotification(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2578,6 +9407,116 @@ NTSTATUS rpccli_PNP_UnregisterNotification(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_GetCustomDevProp_state { + struct PNP_GetCustomDevProp orig; + struct PNP_GetCustomDevProp tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_GetCustomDevProp_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_GetCustomDevProp_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_GetCustomDevProp_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_GetCustomDevProp_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetCustomDevProp, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_GETCUSTOMDEVPROP, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_GetCustomDevProp_done, req); + return req; +} + +static void rpccli_PNP_GetCustomDevProp_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_GetCustomDevProp_state *state = tevent_req_data( + req, struct rpccli_PNP_GetCustomDevProp_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetCustomDevProp, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_GetCustomDevProp_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_GetCustomDevProp_state *state = tevent_req_data( + req, struct rpccli_PNP_GetCustomDevProp_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_PNP_GetCustomDevProp(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2619,6 +9558,116 @@ NTSTATUS rpccli_PNP_GetCustomDevProp(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_GetVersionInternal_state { + struct PNP_GetVersionInternal orig; + struct PNP_GetVersionInternal tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_GetVersionInternal_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_GetVersionInternal_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_GetVersionInternal_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_GetVersionInternal_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetVersionInternal, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_GETVERSIONINTERNAL, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_GetVersionInternal_done, req); + return req; +} + +static void rpccli_PNP_GetVersionInternal_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_GetVersionInternal_state *state = tevent_req_data( + req, struct rpccli_PNP_GetVersionInternal_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetVersionInternal, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_GetVersionInternal_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_GetVersionInternal_state *state = tevent_req_data( + req, struct rpccli_PNP_GetVersionInternal_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_PNP_GetVersionInternal(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2660,6 +9709,116 @@ NTSTATUS rpccli_PNP_GetVersionInternal(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_GetBlockedDriverInfo_state { + struct PNP_GetBlockedDriverInfo orig; + struct PNP_GetBlockedDriverInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_GetBlockedDriverInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_GetBlockedDriverInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_GetBlockedDriverInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_GetBlockedDriverInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetBlockedDriverInfo, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_GETBLOCKEDDRIVERINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_GetBlockedDriverInfo_done, req); + return req; +} + +static void rpccli_PNP_GetBlockedDriverInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_GetBlockedDriverInfo_state *state = tevent_req_data( + req, struct rpccli_PNP_GetBlockedDriverInfo_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetBlockedDriverInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_GetBlockedDriverInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_GetBlockedDriverInfo_state *state = tevent_req_data( + req, struct rpccli_PNP_GetBlockedDriverInfo_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_PNP_GetBlockedDriverInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2701,6 +9860,116 @@ NTSTATUS rpccli_PNP_GetBlockedDriverInfo(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_PNP_GetServerSideDeviceInstallFlags_state { + struct PNP_GetServerSideDeviceInstallFlags orig; + struct PNP_GetServerSideDeviceInstallFlags tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_PNP_GetServerSideDeviceInstallFlags_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_PNP_GetServerSideDeviceInstallFlags_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_PNP_GetServerSideDeviceInstallFlags_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_PNP_GetServerSideDeviceInstallFlags_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(PNP_GetServerSideDeviceInstallFlags, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_ntsvcs, + NDR_PNP_GETSERVERSIDEDEVICEINSTALLFLAGS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_PNP_GetServerSideDeviceInstallFlags_done, req); + return req; +} + +static void rpccli_PNP_GetServerSideDeviceInstallFlags_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_PNP_GetServerSideDeviceInstallFlags_state *state = tevent_req_data( + req, struct rpccli_PNP_GetServerSideDeviceInstallFlags_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(PNP_GetServerSideDeviceInstallFlags, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_PNP_GetServerSideDeviceInstallFlags_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_PNP_GetServerSideDeviceInstallFlags_state *state = tevent_req_data( + req, struct rpccli_PNP_GetServerSideDeviceInstallFlags_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_PNP_GetServerSideDeviceInstallFlags(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) diff --git a/librpc/gen_ndr/cli_ntsvcs.h b/librpc/gen_ndr/cli_ntsvcs.h index c97ced8bf9..90a037d79d 100644 --- a/librpc/gen_ndr/cli_ntsvcs.h +++ b/librpc/gen_ndr/cli_ntsvcs.h @@ -1,39 +1,112 @@ #include "../librpc/gen_ndr/ndr_ntsvcs.h" #ifndef __CLI_NTSVCS__ #define __CLI_NTSVCS__ +struct tevent_req *rpccli_PNP_Disconnect_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_Disconnect_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_Disconnect(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_Connect_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_Connect_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_Connect(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_GetVersion_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_version /* [out] [ref] */); +NTSTATUS rpccli_PNP_GetVersion_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_GetVersion(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *version /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_PNP_GetGlobalState_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_GetGlobalState_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_GetGlobalState(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_InitDetection_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_InitDetection_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_InitDetection(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_ReportLogOn_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_ReportLogOn_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_ReportLogOn(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_ValidateDeviceInstance_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_devicepath /* [in] [ref,charset(UTF16)] */, + uint32_t _flags /* [in] */); +NTSTATUS rpccli_PNP_ValidateDeviceInstance_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_ValidateDeviceInstance(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *devicepath /* [in] [ref,charset(UTF16)] */, uint32_t flags /* [in] */, WERROR *werror); +struct tevent_req *rpccli_PNP_GetRootDeviceInstance_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_GetRootDeviceInstance_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_GetRootDeviceInstance(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_GetRelatedDeviceInstance_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_GetRelatedDeviceInstance_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_GetRelatedDeviceInstance(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_EnumerateSubKeys_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_EnumerateSubKeys_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_EnumerateSubKeys(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_GetDeviceList_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_filter /* [in] [unique,charset(UTF16)] */, + uint16_t *_buffer /* [out] [ref,length_is(*length),size_is(*length)] */, + uint32_t *_length /* [in,out] [ref] */, + uint32_t _flags /* [in] */); +NTSTATUS rpccli_PNP_GetDeviceList_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *filter /* [in] [unique,charset(UTF16)] */, @@ -41,15 +114,43 @@ NTSTATUS rpccli_PNP_GetDeviceList(struct rpc_pipe_client *cli, uint32_t *length /* [in,out] [ref] */, uint32_t flags /* [in] */, WERROR *werror); +struct tevent_req *rpccli_PNP_GetDeviceListSize_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_devicename /* [in] [unique,charset(UTF16)] */, + uint32_t *_size /* [out] [ref] */, + uint32_t _flags /* [in] */); +NTSTATUS rpccli_PNP_GetDeviceListSize_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_GetDeviceListSize(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *devicename /* [in] [unique,charset(UTF16)] */, uint32_t *size /* [out] [ref] */, uint32_t flags /* [in] */, WERROR *werror); +struct tevent_req *rpccli_PNP_GetDepth_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_GetDepth_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_GetDepth(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_GetDeviceRegProp_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_devicepath /* [in] [ref,charset(UTF16)] */, + uint32_t _property /* [in] */, + enum winreg_Type *_reg_data_type /* [in,out] [ref] */, + uint8_t *_buffer /* [out] [ref,length_is(*buffer_size),size_is(*buffer_size)] */, + uint32_t *_buffer_size /* [in,out] [ref] */, + uint32_t *_needed /* [in,out] [ref] */, + uint32_t _flags /* [in] */); +NTSTATUS rpccli_PNP_GetDeviceRegProp_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *devicepath /* [in] [ref,charset(UTF16)] */, @@ -60,84 +161,255 @@ NTSTATUS rpccli_PNP_GetDeviceRegProp(struct rpc_pipe_client *cli, uint32_t *needed /* [in,out] [ref] */, uint32_t flags /* [in] */, WERROR *werror); +struct tevent_req *rpccli_PNP_SetDeviceRegProp_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_SetDeviceRegProp_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_SetDeviceRegProp(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_GetClassInstance_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_GetClassInstance_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_GetClassInstance(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_CreateKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_CreateKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_CreateKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_DeleteRegistryKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_DeleteRegistryKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_DeleteRegistryKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_GetClassCount_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_GetClassCount_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_GetClassCount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_GetClassName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_GetClassName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_GetClassName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_DeleteClassKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_DeleteClassKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_DeleteClassKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_GetInterfaceDeviceAlias_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_GetInterfaceDeviceAlias_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_GetInterfaceDeviceAlias(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_GetInterfaceDeviceList_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_GetInterfaceDeviceList_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_GetInterfaceDeviceList(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_GetInterfaceDeviceListSize_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_GetInterfaceDeviceListSize_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_GetInterfaceDeviceListSize(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_RegisterDeviceClassAssociation_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_RegisterDeviceClassAssociation_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_RegisterDeviceClassAssociation(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_UnregisterDeviceClassAssociation_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_UnregisterDeviceClassAssociation_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_UnregisterDeviceClassAssociation(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_GetClassRegProp_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_GetClassRegProp_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_GetClassRegProp(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_SetClassRegProp_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_SetClassRegProp_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_SetClassRegProp(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_CreateDevInst_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_CreateDevInst_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_CreateDevInst(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_DeviceInstanceAction_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_DeviceInstanceAction_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_DeviceInstanceAction(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_GetDeviceStatus_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_GetDeviceStatus_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_GetDeviceStatus(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_SetDeviceProblem_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_SetDeviceProblem_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_SetDeviceProblem(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_DisableDevInst_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_DisableDevInst_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_DisableDevInst(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_UninstallDevInst_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_UninstallDevInst_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_UninstallDevInst(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_AddID_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_AddID_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_AddID(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_RegisterDriver_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_RegisterDriver_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_RegisterDriver(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_QueryRemove_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_QueryRemove_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_QueryRemove(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_RequestDeviceEject_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_RequestDeviceEject_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_RequestDeviceEject(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_IsDockStationPresent_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_IsDockStationPresent_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_IsDockStationPresent(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_RequestEjectPC_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_RequestEjectPC_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_RequestEjectPC(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_HwProfFlags_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint32_t _action /* [in] */, + const char *_devicepath /* [in] [ref,charset(UTF16)] */, + uint32_t _config /* [in] */, + uint32_t *_profile_flags /* [in,out] [ref] */, + uint16_t *_veto_type /* [in,out] [unique] */, + const char *_unknown5 /* [in] [unique,charset(UTF16)] */, + const char **_unknown5a /* [out] [unique,charset(UTF16)] */, + uint32_t _name_length /* [in] */, + uint32_t _flags /* [in] */); +NTSTATUS rpccli_PNP_HwProfFlags_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_HwProfFlags(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t action /* [in] */, @@ -150,6 +422,16 @@ NTSTATUS rpccli_PNP_HwProfFlags(struct rpc_pipe_client *cli, uint32_t name_length /* [in] */, uint32_t flags /* [in] */, WERROR *werror); +struct tevent_req *rpccli_PNP_GetHwProfInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint32_t _idx /* [in] */, + struct PNP_HwProfInfo *_info /* [in,out] [ref] */, + uint32_t _size /* [in] */, + uint32_t _flags /* [in] */); +NTSTATUS rpccli_PNP_GetHwProfInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_GetHwProfInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t idx /* [in] */, @@ -157,72 +439,210 @@ NTSTATUS rpccli_PNP_GetHwProfInfo(struct rpc_pipe_client *cli, uint32_t size /* [in] */, uint32_t flags /* [in] */, WERROR *werror); +struct tevent_req *rpccli_PNP_AddEmptyLogConf_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_AddEmptyLogConf_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_AddEmptyLogConf(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_FreeLogConf_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_FreeLogConf_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_FreeLogConf(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_GetFirstLogConf_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_GetFirstLogConf_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_GetFirstLogConf(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_GetNextLogConf_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_GetNextLogConf_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_GetNextLogConf(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_GetLogConfPriority_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_GetLogConfPriority_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_GetLogConfPriority(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_AddResDes_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_AddResDes_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_AddResDes(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_FreeResDes_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_FreeResDes_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_FreeResDes(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_GetNextResDes_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_GetNextResDes_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_GetNextResDes(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_GetResDesData_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_GetResDesData_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_GetResDesData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_GetResDesDataSize_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_GetResDesDataSize_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_GetResDesDataSize(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_ModifyResDes_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_ModifyResDes_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_ModifyResDes(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_DetectResourceLimit_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_DetectResourceLimit_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_DetectResourceLimit(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_QueryResConfList_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_QueryResConfList_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_QueryResConfList(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_SetHwProf_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_SetHwProf_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_SetHwProf(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_QueryArbitratorFreeData_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_QueryArbitratorFreeData_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_QueryArbitratorFreeData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_QueryArbitratorFreeSize_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_QueryArbitratorFreeSize_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_QueryArbitratorFreeSize(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_RunDetection_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_RunDetection_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_RunDetection(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_RegisterNotification_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_RegisterNotification_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_RegisterNotification(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_UnregisterNotification_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_UnregisterNotification_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_UnregisterNotification(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_GetCustomDevProp_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_GetCustomDevProp_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_GetCustomDevProp(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_GetVersionInternal_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_GetVersionInternal_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_GetVersionInternal(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_GetBlockedDriverInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_GetBlockedDriverInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_GetBlockedDriverInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_PNP_GetServerSideDeviceInstallFlags_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_PNP_GetServerSideDeviceInstallFlags_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_PNP_GetServerSideDeviceInstallFlags(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); diff --git a/librpc/gen_ndr/cli_samr.c b/librpc/gen_ndr/cli_samr.c index 4f1ca3651d..27119e53cc 100644 --- a/librpc/gen_ndr/cli_samr.c +++ b/librpc/gen_ndr/cli_samr.c @@ -6,6 +6,129 @@ #include "includes.h" #include "../librpc/gen_ndr/cli_samr.h" +struct rpccli_samr_Connect_state { + struct samr_Connect orig; + struct samr_Connect tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_Connect_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_Connect_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_system_name /* [in] [unique] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_connect_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_Connect_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_Connect_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.system_name = _system_name; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.connect_handle = _connect_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_Connect, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_Connect_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_samr, + NDR_SAMR_CONNECT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_Connect_done, req); + return req; +} + +static void rpccli_samr_Connect_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_Connect_state *state = tevent_req_data( + req, struct rpccli_samr_Connect_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.connect_handle = *state->tmp.out.connect_handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_Connect, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_Connect_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_Connect_state *state = tevent_req_data( + req, struct rpccli_samr_Connect_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_samr_Connect(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name /* [in] [unique] */, @@ -48,6 +171,126 @@ NTSTATUS rpccli_samr_Connect(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_Close_state { + struct samr_Close orig; + struct samr_Close tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_Close_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_Close_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in,out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_Close_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_Close_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_Close, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_Close_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_samr, + NDR_SAMR_CLOSE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_Close_done, req); + return req; +} + +static void rpccli_samr_Close_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_Close_state *state = tevent_req_data( + req, struct rpccli_samr_Close_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_Close, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_Close_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_Close_state *state = tevent_req_data( + req, struct rpccli_samr_Close_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_samr_Close(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in,out] [ref] */) @@ -87,6 +330,122 @@ NTSTATUS rpccli_samr_Close(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_SetSecurity_state { + struct samr_SetSecurity orig; + struct samr_SetSecurity tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_SetSecurity_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_SetSecurity_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _sec_info /* [in] */, + struct sec_desc_buf *_sdbuf /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_SetSecurity_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_SetSecurity_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.sec_info = _sec_info; + state->orig.in.sdbuf = _sdbuf; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_SetSecurity, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_samr, + NDR_SAMR_SETSECURITY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_SetSecurity_done, req); + return req; +} + +static void rpccli_samr_SetSecurity_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_SetSecurity_state *state = tevent_req_data( + req, struct rpccli_samr_SetSecurity_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_SetSecurity, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_SetSecurity_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_SetSecurity_state *state = tevent_req_data( + req, struct rpccli_samr_SetSecurity_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_samr_SetSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -129,6 +488,129 @@ NTSTATUS rpccli_samr_SetSecurity(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_QuerySecurity_state { + struct samr_QuerySecurity orig; + struct samr_QuerySecurity tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_QuerySecurity_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_QuerySecurity_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _sec_info /* [in] */, + struct sec_desc_buf **_sdbuf /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_QuerySecurity_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_QuerySecurity_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.sec_info = _sec_info; + + /* Out parameters */ + state->orig.out.sdbuf = _sdbuf; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QuerySecurity, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_QuerySecurity_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_samr, + NDR_SAMR_QUERYSECURITY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_QuerySecurity_done, req); + return req; +} + +static void rpccli_samr_QuerySecurity_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_QuerySecurity_state *state = tevent_req_data( + req, struct rpccli_samr_QuerySecurity_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.sdbuf = *state->tmp.out.sdbuf; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_QuerySecurity, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_QuerySecurity_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_QuerySecurity_state *state = tevent_req_data( + req, struct rpccli_samr_QuerySecurity_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_samr_QuerySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -171,6 +653,118 @@ NTSTATUS rpccli_samr_QuerySecurity(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_Shutdown_state { + struct samr_Shutdown orig; + struct samr_Shutdown tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_Shutdown_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_Shutdown_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_connect_handle /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_Shutdown_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_Shutdown_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.connect_handle = _connect_handle; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_Shutdown, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_samr, + NDR_SAMR_SHUTDOWN, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_Shutdown_done, req); + return req; +} + +static void rpccli_samr_Shutdown_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_Shutdown_state *state = tevent_req_data( + req, struct rpccli_samr_Shutdown_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_Shutdown, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_Shutdown_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_Shutdown_state *state = tevent_req_data( + req, struct rpccli_samr_Shutdown_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_samr_Shutdown(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *connect_handle /* [in] [ref] */) @@ -209,6 +803,129 @@ NTSTATUS rpccli_samr_Shutdown(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_LookupDomain_state { + struct samr_LookupDomain orig; + struct samr_LookupDomain tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_LookupDomain_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_LookupDomain_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_connect_handle /* [in] [ref] */, + struct lsa_String *_domain_name /* [in] [ref] */, + struct dom_sid2 **_sid /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_LookupDomain_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_LookupDomain_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.connect_handle = _connect_handle; + state->orig.in.domain_name = _domain_name; + + /* Out parameters */ + state->orig.out.sid = _sid; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_LookupDomain, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_LookupDomain_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_samr, + NDR_SAMR_LOOKUPDOMAIN, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_LookupDomain_done, req); + return req; +} + +static void rpccli_samr_LookupDomain_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_LookupDomain_state *state = tevent_req_data( + req, struct rpccli_samr_LookupDomain_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(samr_LookupDomain, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_LookupDomain_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_LookupDomain_state *state = tevent_req_data( + req, struct rpccli_samr_LookupDomain_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_samr_LookupDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *connect_handle /* [in] [ref] */, @@ -251,6 +968,136 @@ NTSTATUS rpccli_samr_LookupDomain(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_EnumDomains_state { + struct samr_EnumDomains orig; + struct samr_EnumDomains tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_EnumDomains_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_EnumDomains_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_connect_handle /* [in] [ref] */, + uint32_t *_resume_handle /* [in,out] [ref] */, + struct samr_SamArray **_sam /* [out] [ref] */, + uint32_t _buf_size /* [in] */, + uint32_t *_num_entries /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_EnumDomains_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_EnumDomains_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.connect_handle = _connect_handle; + state->orig.in.resume_handle = _resume_handle; + state->orig.in.buf_size = _buf_size; + + /* Out parameters */ + state->orig.out.resume_handle = _resume_handle; + state->orig.out.sam = _sam; + state->orig.out.num_entries = _num_entries; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_EnumDomains, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_EnumDomains_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_samr, + NDR_SAMR_ENUMDOMAINS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_EnumDomains_done, req); + return req; +} + +static void rpccli_samr_EnumDomains_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_EnumDomains_state *state = tevent_req_data( + req, struct rpccli_samr_EnumDomains_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.resume_handle = *state->tmp.out.resume_handle; + *state->orig.out.sam = *state->tmp.out.sam; + *state->orig.out.num_entries = *state->tmp.out.num_entries; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_EnumDomains, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_EnumDomains_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_EnumDomains_state *state = tevent_req_data( + req, struct rpccli_samr_EnumDomains_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_samr_EnumDomains(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *connect_handle /* [in] [ref] */, @@ -298,6 +1145,131 @@ NTSTATUS rpccli_samr_EnumDomains(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_OpenDomain_state { + struct samr_OpenDomain orig; + struct samr_OpenDomain tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_OpenDomain_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_OpenDomain_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_connect_handle /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + struct dom_sid2 *_sid /* [in] [ref] */, + struct policy_handle *_domain_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_OpenDomain_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_OpenDomain_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.connect_handle = _connect_handle; + state->orig.in.access_mask = _access_mask; + state->orig.in.sid = _sid; + + /* Out parameters */ + state->orig.out.domain_handle = _domain_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_OpenDomain, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_OpenDomain_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_samr, + NDR_SAMR_OPENDOMAIN, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_OpenDomain_done, req); + return req; +} + +static void rpccli_samr_OpenDomain_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_OpenDomain_state *state = tevent_req_data( + req, struct rpccli_samr_OpenDomain_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.domain_handle = *state->tmp.out.domain_handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_OpenDomain, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_OpenDomain_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_OpenDomain_state *state = tevent_req_data( + req, struct rpccli_samr_OpenDomain_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_samr_OpenDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *connect_handle /* [in] [ref] */, @@ -342,6 +1314,129 @@ NTSTATUS rpccli_samr_OpenDomain(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_QueryDomainInfo_state { + struct samr_QueryDomainInfo orig; + struct samr_QueryDomainInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_QueryDomainInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_QueryDomainInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + enum samr_DomainInfoClass _level /* [in] */, + union samr_DomainInfo **_info /* [out] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_samr_QueryDomainInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_QueryDomainInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.domain_handle = _domain_handle; + state->orig.in.level = _level; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QueryDomainInfo, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_QueryDomainInfo_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_samr, + NDR_SAMR_QUERYDOMAININFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_QueryDomainInfo_done, req); + return req; +} + +static void rpccli_samr_QueryDomainInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_QueryDomainInfo_state *state = tevent_req_data( + req, struct rpccli_samr_QueryDomainInfo_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(samr_QueryDomainInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_QueryDomainInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_QueryDomainInfo_state *state = tevent_req_data( + req, struct rpccli_samr_QueryDomainInfo_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_samr_QueryDomainInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -384,6 +1479,122 @@ NTSTATUS rpccli_samr_QueryDomainInfo(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_SetDomainInfo_state { + struct samr_SetDomainInfo orig; + struct samr_SetDomainInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_SetDomainInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_SetDomainInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + enum samr_DomainInfoClass _level /* [in] */, + union samr_DomainInfo *_info /* [in] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_samr_SetDomainInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_SetDomainInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.domain_handle = _domain_handle; + state->orig.in.level = _level; + state->orig.in.info = _info; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_SetDomainInfo, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_samr, + NDR_SAMR_SETDOMAININFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_SetDomainInfo_done, req); + return req; +} + +static void rpccli_samr_SetDomainInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_SetDomainInfo_state *state = tevent_req_data( + req, struct rpccli_samr_SetDomainInfo_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_SetDomainInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_SetDomainInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_SetDomainInfo_state *state = tevent_req_data( + req, struct rpccli_samr_SetDomainInfo_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_samr_SetDomainInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -426,6 +1637,134 @@ NTSTATUS rpccli_samr_SetDomainInfo(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_CreateDomainGroup_state { + struct samr_CreateDomainGroup orig; + struct samr_CreateDomainGroup tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_CreateDomainGroup_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_CreateDomainGroup_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + struct lsa_String *_name /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_group_handle /* [out] [ref] */, + uint32_t *_rid /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_CreateDomainGroup_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_CreateDomainGroup_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.domain_handle = _domain_handle; + state->orig.in.name = _name; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.group_handle = _group_handle; + state->orig.out.rid = _rid; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_CreateDomainGroup, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_CreateDomainGroup_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_samr, + NDR_SAMR_CREATEDOMAINGROUP, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_CreateDomainGroup_done, req); + return req; +} + +static void rpccli_samr_CreateDomainGroup_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_CreateDomainGroup_state *state = tevent_req_data( + req, struct rpccli_samr_CreateDomainGroup_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.group_handle = *state->tmp.out.group_handle; + *state->orig.out.rid = *state->tmp.out.rid; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_CreateDomainGroup, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_CreateDomainGroup_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_CreateDomainGroup_state *state = tevent_req_data( + req, struct rpccli_samr_CreateDomainGroup_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_samr_CreateDomainGroup(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -472,6 +1811,136 @@ NTSTATUS rpccli_samr_CreateDomainGroup(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_EnumDomainGroups_state { + struct samr_EnumDomainGroups orig; + struct samr_EnumDomainGroups tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_EnumDomainGroups_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_EnumDomainGroups_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + uint32_t *_resume_handle /* [in,out] [ref] */, + struct samr_SamArray **_sam /* [out] [ref] */, + uint32_t _max_size /* [in] */, + uint32_t *_num_entries /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_EnumDomainGroups_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_EnumDomainGroups_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.domain_handle = _domain_handle; + state->orig.in.resume_handle = _resume_handle; + state->orig.in.max_size = _max_size; + + /* Out parameters */ + state->orig.out.resume_handle = _resume_handle; + state->orig.out.sam = _sam; + state->orig.out.num_entries = _num_entries; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_EnumDomainGroups, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_EnumDomainGroups_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_samr, + NDR_SAMR_ENUMDOMAINGROUPS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_EnumDomainGroups_done, req); + return req; +} + +static void rpccli_samr_EnumDomainGroups_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_EnumDomainGroups_state *state = tevent_req_data( + req, struct rpccli_samr_EnumDomainGroups_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.resume_handle = *state->tmp.out.resume_handle; + *state->orig.out.sam = *state->tmp.out.sam; + *state->orig.out.num_entries = *state->tmp.out.num_entries; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_EnumDomainGroups, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_EnumDomainGroups_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_EnumDomainGroups_state *state = tevent_req_data( + req, struct rpccli_samr_EnumDomainGroups_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_samr_EnumDomainGroups(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -519,6 +1988,134 @@ NTSTATUS rpccli_samr_EnumDomainGroups(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_CreateUser_state { + struct samr_CreateUser orig; + struct samr_CreateUser tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_CreateUser_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_CreateUser_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + struct lsa_String *_account_name /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_user_handle /* [out] [ref] */, + uint32_t *_rid /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_CreateUser_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_CreateUser_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.domain_handle = _domain_handle; + state->orig.in.account_name = _account_name; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.user_handle = _user_handle; + state->orig.out.rid = _rid; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_CreateUser, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_CreateUser_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_samr, + NDR_SAMR_CREATEUSER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_CreateUser_done, req); + return req; +} + +static void rpccli_samr_CreateUser_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_CreateUser_state *state = tevent_req_data( + req, struct rpccli_samr_CreateUser_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.user_handle = *state->tmp.out.user_handle; + *state->orig.out.rid = *state->tmp.out.rid; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_CreateUser, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_CreateUser_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_CreateUser_state *state = tevent_req_data( + req, struct rpccli_samr_CreateUser_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_samr_CreateUser(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -565,6 +2162,138 @@ NTSTATUS rpccli_samr_CreateUser(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_EnumDomainUsers_state { + struct samr_EnumDomainUsers orig; + struct samr_EnumDomainUsers tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_EnumDomainUsers_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_EnumDomainUsers_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + uint32_t *_resume_handle /* [in,out] [ref] */, + uint32_t _acct_flags /* [in] */, + struct samr_SamArray **_sam /* [out] [ref] */, + uint32_t _max_size /* [in] */, + uint32_t *_num_entries /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_EnumDomainUsers_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_EnumDomainUsers_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.domain_handle = _domain_handle; + state->orig.in.resume_handle = _resume_handle; + state->orig.in.acct_flags = _acct_flags; + state->orig.in.max_size = _max_size; + + /* Out parameters */ + state->orig.out.resume_handle = _resume_handle; + state->orig.out.sam = _sam; + state->orig.out.num_entries = _num_entries; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_EnumDomainUsers, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_EnumDomainUsers_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_samr, + NDR_SAMR_ENUMDOMAINUSERS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_EnumDomainUsers_done, req); + return req; +} + +static void rpccli_samr_EnumDomainUsers_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_EnumDomainUsers_state *state = tevent_req_data( + req, struct rpccli_samr_EnumDomainUsers_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.resume_handle = *state->tmp.out.resume_handle; + *state->orig.out.sam = *state->tmp.out.sam; + *state->orig.out.num_entries = *state->tmp.out.num_entries; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_EnumDomainUsers, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_EnumDomainUsers_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_EnumDomainUsers_state *state = tevent_req_data( + req, struct rpccli_samr_EnumDomainUsers_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_samr_EnumDomainUsers(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -614,6 +2343,134 @@ NTSTATUS rpccli_samr_EnumDomainUsers(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_CreateDomAlias_state { + struct samr_CreateDomAlias orig; + struct samr_CreateDomAlias tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_CreateDomAlias_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_CreateDomAlias_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + struct lsa_String *_alias_name /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_alias_handle /* [out] [ref] */, + uint32_t *_rid /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_CreateDomAlias_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_CreateDomAlias_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.domain_handle = _domain_handle; + state->orig.in.alias_name = _alias_name; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.alias_handle = _alias_handle; + state->orig.out.rid = _rid; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_CreateDomAlias, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_CreateDomAlias_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_samr, + NDR_SAMR_CREATEDOMALIAS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_CreateDomAlias_done, req); + return req; +} + +static void rpccli_samr_CreateDomAlias_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_CreateDomAlias_state *state = tevent_req_data( + req, struct rpccli_samr_CreateDomAlias_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.alias_handle = *state->tmp.out.alias_handle; + *state->orig.out.rid = *state->tmp.out.rid; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_CreateDomAlias, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_CreateDomAlias_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_CreateDomAlias_state *state = tevent_req_data( + req, struct rpccli_samr_CreateDomAlias_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_samr_CreateDomAlias(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -660,6 +2517,136 @@ NTSTATUS rpccli_samr_CreateDomAlias(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_EnumDomainAliases_state { + struct samr_EnumDomainAliases orig; + struct samr_EnumDomainAliases tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_EnumDomainAliases_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_EnumDomainAliases_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + uint32_t *_resume_handle /* [in,out] [ref] */, + struct samr_SamArray **_sam /* [out] [ref] */, + uint32_t _max_size /* [in] */, + uint32_t *_num_entries /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_EnumDomainAliases_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_EnumDomainAliases_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.domain_handle = _domain_handle; + state->orig.in.resume_handle = _resume_handle; + state->orig.in.max_size = _max_size; + + /* Out parameters */ + state->orig.out.resume_handle = _resume_handle; + state->orig.out.sam = _sam; + state->orig.out.num_entries = _num_entries; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_EnumDomainAliases, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_EnumDomainAliases_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_samr, + NDR_SAMR_ENUMDOMAINALIASES, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_EnumDomainAliases_done, req); + return req; +} + +static void rpccli_samr_EnumDomainAliases_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_EnumDomainAliases_state *state = tevent_req_data( + req, struct rpccli_samr_EnumDomainAliases_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.resume_handle = *state->tmp.out.resume_handle; + *state->orig.out.sam = *state->tmp.out.sam; + *state->orig.out.num_entries = *state->tmp.out.num_entries; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_EnumDomainAliases, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_EnumDomainAliases_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_EnumDomainAliases_state *state = tevent_req_data( + req, struct rpccli_samr_EnumDomainAliases_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_samr_EnumDomainAliases(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -707,6 +2694,129 @@ NTSTATUS rpccli_samr_EnumDomainAliases(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_GetAliasMembership_state { + struct samr_GetAliasMembership orig; + struct samr_GetAliasMembership tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_GetAliasMembership_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_GetAliasMembership_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + struct lsa_SidArray *_sids /* [in] [ref] */, + struct samr_Ids *_rids /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_GetAliasMembership_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_GetAliasMembership_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.domain_handle = _domain_handle; + 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(samr_GetAliasMembership, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_GetAliasMembership_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_samr, + NDR_SAMR_GETALIASMEMBERSHIP, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_GetAliasMembership_done, req); + return req; +} + +static void rpccli_samr_GetAliasMembership_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_GetAliasMembership_state *state = tevent_req_data( + req, struct rpccli_samr_GetAliasMembership_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(samr_GetAliasMembership, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_GetAliasMembership_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_GetAliasMembership_state *state = tevent_req_data( + req, struct rpccli_samr_GetAliasMembership_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_samr_GetAliasMembership(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -749,6 +2859,134 @@ NTSTATUS rpccli_samr_GetAliasMembership(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_LookupNames_state { + struct samr_LookupNames orig; + struct samr_LookupNames tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_LookupNames_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_LookupNames_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + uint32_t _num_names /* [in] [range(0,1000)] */, + struct lsa_String *_names /* [in] [length_is(num_names),size_is(1000)] */, + struct samr_Ids *_rids /* [out] [ref] */, + struct samr_Ids *_types /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_LookupNames_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_LookupNames_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.domain_handle = _domain_handle; + state->orig.in.num_names = _num_names; + state->orig.in.names = _names; + + /* Out parameters */ + state->orig.out.rids = _rids; + state->orig.out.types = _types; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_LookupNames, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_LookupNames_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_samr, + NDR_SAMR_LOOKUPNAMES, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_LookupNames_done, req); + return req; +} + +static void rpccli_samr_LookupNames_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_LookupNames_state *state = tevent_req_data( + req, struct rpccli_samr_LookupNames_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; + *state->orig.out.types = *state->tmp.out.types; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_LookupNames, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_LookupNames_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_LookupNames_state *state = tevent_req_data( + req, struct rpccli_samr_LookupNames_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_samr_LookupNames(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -795,6 +3033,134 @@ NTSTATUS rpccli_samr_LookupNames(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_LookupRids_state { + struct samr_LookupRids orig; + struct samr_LookupRids tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_LookupRids_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_LookupRids_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + uint32_t _num_rids /* [in] [range(0,1000)] */, + uint32_t *_rids /* [in] [length_is(num_rids),size_is(1000)] */, + struct lsa_Strings *_names /* [out] [ref] */, + struct samr_Ids *_types /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_LookupRids_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_LookupRids_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.domain_handle = _domain_handle; + state->orig.in.num_rids = _num_rids; + state->orig.in.rids = _rids; + + /* Out parameters */ + state->orig.out.names = _names; + state->orig.out.types = _types; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_LookupRids, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_LookupRids_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_samr, + NDR_SAMR_LOOKUPRIDS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_LookupRids_done, req); + return req; +} + +static void rpccli_samr_LookupRids_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_LookupRids_state *state = tevent_req_data( + req, struct rpccli_samr_LookupRids_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.names = *state->tmp.out.names; + *state->orig.out.types = *state->tmp.out.types; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_LookupRids, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_LookupRids_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_LookupRids_state *state = tevent_req_data( + req, struct rpccli_samr_LookupRids_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_samr_LookupRids(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -841,6 +3207,131 @@ NTSTATUS rpccli_samr_LookupRids(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_OpenGroup_state { + struct samr_OpenGroup orig; + struct samr_OpenGroup tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_OpenGroup_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_OpenGroup_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + uint32_t _rid /* [in] */, + struct policy_handle *_group_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_OpenGroup_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_OpenGroup_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.domain_handle = _domain_handle; + state->orig.in.access_mask = _access_mask; + state->orig.in.rid = _rid; + + /* Out parameters */ + state->orig.out.group_handle = _group_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_OpenGroup, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_OpenGroup_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_samr, + NDR_SAMR_OPENGROUP, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_OpenGroup_done, req); + return req; +} + +static void rpccli_samr_OpenGroup_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_OpenGroup_state *state = tevent_req_data( + req, struct rpccli_samr_OpenGroup_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.group_handle = *state->tmp.out.group_handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_OpenGroup, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_OpenGroup_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_OpenGroup_state *state = tevent_req_data( + req, struct rpccli_samr_OpenGroup_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_samr_OpenGroup(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -885,6 +3376,129 @@ NTSTATUS rpccli_samr_OpenGroup(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_QueryGroupInfo_state { + struct samr_QueryGroupInfo orig; + struct samr_QueryGroupInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_QueryGroupInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_QueryGroupInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_group_handle /* [in] [ref] */, + enum samr_GroupInfoEnum _level /* [in] */, + union samr_GroupInfo **_info /* [out] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_samr_QueryGroupInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_QueryGroupInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.group_handle = _group_handle; + state->orig.in.level = _level; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QueryGroupInfo, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_QueryGroupInfo_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_samr, + NDR_SAMR_QUERYGROUPINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_QueryGroupInfo_done, req); + return req; +} + +static void rpccli_samr_QueryGroupInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_QueryGroupInfo_state *state = tevent_req_data( + req, struct rpccli_samr_QueryGroupInfo_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(samr_QueryGroupInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_QueryGroupInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_QueryGroupInfo_state *state = tevent_req_data( + req, struct rpccli_samr_QueryGroupInfo_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_samr_QueryGroupInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *group_handle /* [in] [ref] */, @@ -927,6 +3541,122 @@ NTSTATUS rpccli_samr_QueryGroupInfo(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_SetGroupInfo_state { + struct samr_SetGroupInfo orig; + struct samr_SetGroupInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_SetGroupInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_SetGroupInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_group_handle /* [in] [ref] */, + enum samr_GroupInfoEnum _level /* [in] */, + union samr_GroupInfo *_info /* [in] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_samr_SetGroupInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_SetGroupInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.group_handle = _group_handle; + state->orig.in.level = _level; + state->orig.in.info = _info; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_SetGroupInfo, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_samr, + NDR_SAMR_SETGROUPINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_SetGroupInfo_done, req); + return req; +} + +static void rpccli_samr_SetGroupInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_SetGroupInfo_state *state = tevent_req_data( + req, struct rpccli_samr_SetGroupInfo_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_SetGroupInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_SetGroupInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_SetGroupInfo_state *state = tevent_req_data( + req, struct rpccli_samr_SetGroupInfo_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_samr_SetGroupInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *group_handle /* [in] [ref] */, @@ -969,6 +3699,122 @@ NTSTATUS rpccli_samr_SetGroupInfo(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_AddGroupMember_state { + struct samr_AddGroupMember orig; + struct samr_AddGroupMember tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_AddGroupMember_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_AddGroupMember_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_group_handle /* [in] [ref] */, + uint32_t _rid /* [in] */, + uint32_t _flags /* [in] */) +{ + struct tevent_req *req; + struct rpccli_samr_AddGroupMember_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_AddGroupMember_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.group_handle = _group_handle; + state->orig.in.rid = _rid; + state->orig.in.flags = _flags; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_AddGroupMember, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_samr, + NDR_SAMR_ADDGROUPMEMBER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_AddGroupMember_done, req); + return req; +} + +static void rpccli_samr_AddGroupMember_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_AddGroupMember_state *state = tevent_req_data( + req, struct rpccli_samr_AddGroupMember_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_AddGroupMember, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_AddGroupMember_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_AddGroupMember_state *state = tevent_req_data( + req, struct rpccli_samr_AddGroupMember_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_samr_AddGroupMember(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *group_handle /* [in] [ref] */, @@ -1011,6 +3857,126 @@ NTSTATUS rpccli_samr_AddGroupMember(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_DeleteDomainGroup_state { + struct samr_DeleteDomainGroup orig; + struct samr_DeleteDomainGroup tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_DeleteDomainGroup_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_DeleteDomainGroup_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_group_handle /* [in,out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_DeleteDomainGroup_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_DeleteDomainGroup_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.group_handle = _group_handle; + + /* Out parameters */ + state->orig.out.group_handle = _group_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_DeleteDomainGroup, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_DeleteDomainGroup_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_samr, + NDR_SAMR_DELETEDOMAINGROUP, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_DeleteDomainGroup_done, req); + return req; +} + +static void rpccli_samr_DeleteDomainGroup_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_DeleteDomainGroup_state *state = tevent_req_data( + req, struct rpccli_samr_DeleteDomainGroup_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.group_handle = *state->tmp.out.group_handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_DeleteDomainGroup, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_DeleteDomainGroup_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_DeleteDomainGroup_state *state = tevent_req_data( + req, struct rpccli_samr_DeleteDomainGroup_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_samr_DeleteDomainGroup(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *group_handle /* [in,out] [ref] */) @@ -1050,6 +4016,120 @@ NTSTATUS rpccli_samr_DeleteDomainGroup(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_DeleteGroupMember_state { + struct samr_DeleteGroupMember orig; + struct samr_DeleteGroupMember tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_DeleteGroupMember_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_DeleteGroupMember_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_group_handle /* [in] [ref] */, + uint32_t _rid /* [in] */) +{ + struct tevent_req *req; + struct rpccli_samr_DeleteGroupMember_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_DeleteGroupMember_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.group_handle = _group_handle; + state->orig.in.rid = _rid; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_DeleteGroupMember, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_samr, + NDR_SAMR_DELETEGROUPMEMBER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_DeleteGroupMember_done, req); + return req; +} + +static void rpccli_samr_DeleteGroupMember_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_DeleteGroupMember_state *state = tevent_req_data( + req, struct rpccli_samr_DeleteGroupMember_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_DeleteGroupMember, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_DeleteGroupMember_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_DeleteGroupMember_state *state = tevent_req_data( + req, struct rpccli_samr_DeleteGroupMember_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_samr_DeleteGroupMember(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *group_handle /* [in] [ref] */, @@ -1090,6 +4170,127 @@ NTSTATUS rpccli_samr_DeleteGroupMember(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_QueryGroupMember_state { + struct samr_QueryGroupMember orig; + struct samr_QueryGroupMember tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_QueryGroupMember_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_QueryGroupMember_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_group_handle /* [in] [ref] */, + struct samr_RidTypeArray **_rids /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_QueryGroupMember_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_QueryGroupMember_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.group_handle = _group_handle; + + /* Out parameters */ + state->orig.out.rids = _rids; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QueryGroupMember, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_QueryGroupMember_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_samr, + NDR_SAMR_QUERYGROUPMEMBER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_QueryGroupMember_done, req); + return req; +} + +static void rpccli_samr_QueryGroupMember_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_QueryGroupMember_state *state = tevent_req_data( + req, struct rpccli_samr_QueryGroupMember_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(samr_QueryGroupMember, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_QueryGroupMember_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_QueryGroupMember_state *state = tevent_req_data( + req, struct rpccli_samr_QueryGroupMember_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_samr_QueryGroupMember(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *group_handle /* [in] [ref] */, @@ -1130,6 +4331,122 @@ NTSTATUS rpccli_samr_QueryGroupMember(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_SetMemberAttributesOfGroup_state { + struct samr_SetMemberAttributesOfGroup orig; + struct samr_SetMemberAttributesOfGroup tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_SetMemberAttributesOfGroup_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_SetMemberAttributesOfGroup_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_group_handle /* [in] [ref] */, + uint32_t _unknown1 /* [in] */, + uint32_t _unknown2 /* [in] */) +{ + struct tevent_req *req; + struct rpccli_samr_SetMemberAttributesOfGroup_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_SetMemberAttributesOfGroup_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.group_handle = _group_handle; + state->orig.in.unknown1 = _unknown1; + state->orig.in.unknown2 = _unknown2; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_SetMemberAttributesOfGroup, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_samr, + NDR_SAMR_SETMEMBERATTRIBUTESOFGROUP, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_SetMemberAttributesOfGroup_done, req); + return req; +} + +static void rpccli_samr_SetMemberAttributesOfGroup_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_SetMemberAttributesOfGroup_state *state = tevent_req_data( + req, struct rpccli_samr_SetMemberAttributesOfGroup_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_SetMemberAttributesOfGroup, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_SetMemberAttributesOfGroup_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_SetMemberAttributesOfGroup_state *state = tevent_req_data( + req, struct rpccli_samr_SetMemberAttributesOfGroup_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_samr_SetMemberAttributesOfGroup(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *group_handle /* [in] [ref] */, @@ -1172,6 +4489,131 @@ NTSTATUS rpccli_samr_SetMemberAttributesOfGroup(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_OpenAlias_state { + struct samr_OpenAlias orig; + struct samr_OpenAlias tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_OpenAlias_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_OpenAlias_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + uint32_t _rid /* [in] */, + struct policy_handle *_alias_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_OpenAlias_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_OpenAlias_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.domain_handle = _domain_handle; + state->orig.in.access_mask = _access_mask; + state->orig.in.rid = _rid; + + /* Out parameters */ + state->orig.out.alias_handle = _alias_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_OpenAlias, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_OpenAlias_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_samr, + NDR_SAMR_OPENALIAS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_OpenAlias_done, req); + return req; +} + +static void rpccli_samr_OpenAlias_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_OpenAlias_state *state = tevent_req_data( + req, struct rpccli_samr_OpenAlias_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.alias_handle = *state->tmp.out.alias_handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_OpenAlias, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_OpenAlias_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_OpenAlias_state *state = tevent_req_data( + req, struct rpccli_samr_OpenAlias_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_samr_OpenAlias(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -1216,6 +4658,129 @@ NTSTATUS rpccli_samr_OpenAlias(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_QueryAliasInfo_state { + struct samr_QueryAliasInfo orig; + struct samr_QueryAliasInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_QueryAliasInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_QueryAliasInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_alias_handle /* [in] [ref] */, + enum samr_AliasInfoEnum _level /* [in] */, + union samr_AliasInfo **_info /* [out] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_samr_QueryAliasInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_QueryAliasInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.alias_handle = _alias_handle; + state->orig.in.level = _level; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QueryAliasInfo, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_QueryAliasInfo_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_samr, + NDR_SAMR_QUERYALIASINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_QueryAliasInfo_done, req); + return req; +} + +static void rpccli_samr_QueryAliasInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_QueryAliasInfo_state *state = tevent_req_data( + req, struct rpccli_samr_QueryAliasInfo_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(samr_QueryAliasInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_QueryAliasInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_QueryAliasInfo_state *state = tevent_req_data( + req, struct rpccli_samr_QueryAliasInfo_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_samr_QueryAliasInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *alias_handle /* [in] [ref] */, @@ -1258,6 +4823,122 @@ NTSTATUS rpccli_samr_QueryAliasInfo(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_SetAliasInfo_state { + struct samr_SetAliasInfo orig; + struct samr_SetAliasInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_SetAliasInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_SetAliasInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_alias_handle /* [in] [ref] */, + enum samr_AliasInfoEnum _level /* [in] */, + union samr_AliasInfo *_info /* [in] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_samr_SetAliasInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_SetAliasInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.alias_handle = _alias_handle; + state->orig.in.level = _level; + state->orig.in.info = _info; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_SetAliasInfo, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_samr, + NDR_SAMR_SETALIASINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_SetAliasInfo_done, req); + return req; +} + +static void rpccli_samr_SetAliasInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_SetAliasInfo_state *state = tevent_req_data( + req, struct rpccli_samr_SetAliasInfo_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_SetAliasInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_SetAliasInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_SetAliasInfo_state *state = tevent_req_data( + req, struct rpccli_samr_SetAliasInfo_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_samr_SetAliasInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *alias_handle /* [in] [ref] */, @@ -1300,6 +4981,126 @@ NTSTATUS rpccli_samr_SetAliasInfo(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_DeleteDomAlias_state { + struct samr_DeleteDomAlias orig; + struct samr_DeleteDomAlias tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_DeleteDomAlias_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_DeleteDomAlias_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_alias_handle /* [in,out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_DeleteDomAlias_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_DeleteDomAlias_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.alias_handle = _alias_handle; + + /* Out parameters */ + state->orig.out.alias_handle = _alias_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_DeleteDomAlias, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_DeleteDomAlias_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_samr, + NDR_SAMR_DELETEDOMALIAS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_DeleteDomAlias_done, req); + return req; +} + +static void rpccli_samr_DeleteDomAlias_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_DeleteDomAlias_state *state = tevent_req_data( + req, struct rpccli_samr_DeleteDomAlias_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.alias_handle = *state->tmp.out.alias_handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_DeleteDomAlias, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_DeleteDomAlias_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_DeleteDomAlias_state *state = tevent_req_data( + req, struct rpccli_samr_DeleteDomAlias_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_samr_DeleteDomAlias(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *alias_handle /* [in,out] [ref] */) @@ -1339,6 +5140,120 @@ NTSTATUS rpccli_samr_DeleteDomAlias(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_AddAliasMember_state { + struct samr_AddAliasMember orig; + struct samr_AddAliasMember tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_AddAliasMember_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_AddAliasMember_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_alias_handle /* [in] [ref] */, + struct dom_sid2 *_sid /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_AddAliasMember_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_AddAliasMember_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.alias_handle = _alias_handle; + state->orig.in.sid = _sid; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_AddAliasMember, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_samr, + NDR_SAMR_ADDALIASMEMBER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_AddAliasMember_done, req); + return req; +} + +static void rpccli_samr_AddAliasMember_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_AddAliasMember_state *state = tevent_req_data( + req, struct rpccli_samr_AddAliasMember_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_AddAliasMember, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_AddAliasMember_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_AddAliasMember_state *state = tevent_req_data( + req, struct rpccli_samr_AddAliasMember_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_samr_AddAliasMember(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *alias_handle /* [in] [ref] */, @@ -1379,6 +5294,120 @@ NTSTATUS rpccli_samr_AddAliasMember(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_DeleteAliasMember_state { + struct samr_DeleteAliasMember orig; + struct samr_DeleteAliasMember tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_DeleteAliasMember_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_DeleteAliasMember_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_alias_handle /* [in] [ref] */, + struct dom_sid2 *_sid /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_DeleteAliasMember_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_DeleteAliasMember_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.alias_handle = _alias_handle; + state->orig.in.sid = _sid; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_DeleteAliasMember, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_samr, + NDR_SAMR_DELETEALIASMEMBER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_DeleteAliasMember_done, req); + return req; +} + +static void rpccli_samr_DeleteAliasMember_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_DeleteAliasMember_state *state = tevent_req_data( + req, struct rpccli_samr_DeleteAliasMember_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_DeleteAliasMember, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_DeleteAliasMember_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_DeleteAliasMember_state *state = tevent_req_data( + req, struct rpccli_samr_DeleteAliasMember_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_samr_DeleteAliasMember(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *alias_handle /* [in] [ref] */, @@ -1419,6 +5448,127 @@ NTSTATUS rpccli_samr_DeleteAliasMember(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_GetMembersInAlias_state { + struct samr_GetMembersInAlias orig; + struct samr_GetMembersInAlias tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_GetMembersInAlias_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_GetMembersInAlias_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_alias_handle /* [in] [ref] */, + struct lsa_SidArray *_sids /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_GetMembersInAlias_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_GetMembersInAlias_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.alias_handle = _alias_handle; + + /* Out parameters */ + state->orig.out.sids = _sids; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_GetMembersInAlias, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_GetMembersInAlias_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_samr, + NDR_SAMR_GETMEMBERSINALIAS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_GetMembersInAlias_done, req); + return req; +} + +static void rpccli_samr_GetMembersInAlias_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_GetMembersInAlias_state *state = tevent_req_data( + req, struct rpccli_samr_GetMembersInAlias_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(samr_GetMembersInAlias, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_GetMembersInAlias_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_GetMembersInAlias_state *state = tevent_req_data( + req, struct rpccli_samr_GetMembersInAlias_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_samr_GetMembersInAlias(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *alias_handle /* [in] [ref] */, @@ -1459,6 +5609,131 @@ NTSTATUS rpccli_samr_GetMembersInAlias(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_OpenUser_state { + struct samr_OpenUser orig; + struct samr_OpenUser tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_OpenUser_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_OpenUser_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + uint32_t _rid /* [in] */, + struct policy_handle *_user_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_OpenUser_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_OpenUser_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.domain_handle = _domain_handle; + state->orig.in.access_mask = _access_mask; + state->orig.in.rid = _rid; + + /* Out parameters */ + state->orig.out.user_handle = _user_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_OpenUser, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_OpenUser_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_samr, + NDR_SAMR_OPENUSER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_OpenUser_done, req); + return req; +} + +static void rpccli_samr_OpenUser_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_OpenUser_state *state = tevent_req_data( + req, struct rpccli_samr_OpenUser_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.user_handle = *state->tmp.out.user_handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_OpenUser, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_OpenUser_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_OpenUser_state *state = tevent_req_data( + req, struct rpccli_samr_OpenUser_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_samr_OpenUser(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -1503,6 +5778,126 @@ NTSTATUS rpccli_samr_OpenUser(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_DeleteUser_state { + struct samr_DeleteUser orig; + struct samr_DeleteUser tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_DeleteUser_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_DeleteUser_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_user_handle /* [in,out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_DeleteUser_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_DeleteUser_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.user_handle = _user_handle; + + /* Out parameters */ + state->orig.out.user_handle = _user_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_DeleteUser, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_DeleteUser_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_samr, + NDR_SAMR_DELETEUSER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_DeleteUser_done, req); + return req; +} + +static void rpccli_samr_DeleteUser_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_DeleteUser_state *state = tevent_req_data( + req, struct rpccli_samr_DeleteUser_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.user_handle = *state->tmp.out.user_handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_DeleteUser, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_DeleteUser_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_DeleteUser_state *state = tevent_req_data( + req, struct rpccli_samr_DeleteUser_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_samr_DeleteUser(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *user_handle /* [in,out] [ref] */) @@ -1542,6 +5937,129 @@ NTSTATUS rpccli_samr_DeleteUser(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_QueryUserInfo_state { + struct samr_QueryUserInfo orig; + struct samr_QueryUserInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_QueryUserInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_QueryUserInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_user_handle /* [in] [ref] */, + enum samr_UserInfoLevel _level /* [in] */, + union samr_UserInfo **_info /* [out] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_samr_QueryUserInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_QueryUserInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.user_handle = _user_handle; + state->orig.in.level = _level; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QueryUserInfo, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_QueryUserInfo_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_samr, + NDR_SAMR_QUERYUSERINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_QueryUserInfo_done, req); + return req; +} + +static void rpccli_samr_QueryUserInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_QueryUserInfo_state *state = tevent_req_data( + req, struct rpccli_samr_QueryUserInfo_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(samr_QueryUserInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_QueryUserInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_QueryUserInfo_state *state = tevent_req_data( + req, struct rpccli_samr_QueryUserInfo_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_samr_QueryUserInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *user_handle /* [in] [ref] */, @@ -1584,6 +6102,122 @@ NTSTATUS rpccli_samr_QueryUserInfo(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_SetUserInfo_state { + struct samr_SetUserInfo orig; + struct samr_SetUserInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_SetUserInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_SetUserInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_user_handle /* [in] [ref] */, + enum samr_UserInfoLevel _level /* [in] */, + union samr_UserInfo *_info /* [in] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_samr_SetUserInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_SetUserInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.user_handle = _user_handle; + state->orig.in.level = _level; + state->orig.in.info = _info; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_SetUserInfo, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_samr, + NDR_SAMR_SETUSERINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_SetUserInfo_done, req); + return req; +} + +static void rpccli_samr_SetUserInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_SetUserInfo_state *state = tevent_req_data( + req, struct rpccli_samr_SetUserInfo_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_SetUserInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_SetUserInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_SetUserInfo_state *state = tevent_req_data( + req, struct rpccli_samr_SetUserInfo_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_samr_SetUserInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *user_handle /* [in] [ref] */, @@ -1626,6 +6260,138 @@ NTSTATUS rpccli_samr_SetUserInfo(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_ChangePasswordUser_state { + struct samr_ChangePasswordUser orig; + struct samr_ChangePasswordUser tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_ChangePasswordUser_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_ChangePasswordUser_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_user_handle /* [in] [ref] */, + uint8_t _lm_present /* [in] */, + struct samr_Password *_old_lm_crypted /* [in] [unique] */, + struct samr_Password *_new_lm_crypted /* [in] [unique] */, + uint8_t _nt_present /* [in] */, + struct samr_Password *_old_nt_crypted /* [in] [unique] */, + struct samr_Password *_new_nt_crypted /* [in] [unique] */, + uint8_t _cross1_present /* [in] */, + struct samr_Password *_nt_cross /* [in] [unique] */, + uint8_t _cross2_present /* [in] */, + struct samr_Password *_lm_cross /* [in] [unique] */) +{ + struct tevent_req *req; + struct rpccli_samr_ChangePasswordUser_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_ChangePasswordUser_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.user_handle = _user_handle; + state->orig.in.lm_present = _lm_present; + state->orig.in.old_lm_crypted = _old_lm_crypted; + state->orig.in.new_lm_crypted = _new_lm_crypted; + state->orig.in.nt_present = _nt_present; + state->orig.in.old_nt_crypted = _old_nt_crypted; + state->orig.in.new_nt_crypted = _new_nt_crypted; + state->orig.in.cross1_present = _cross1_present; + state->orig.in.nt_cross = _nt_cross; + state->orig.in.cross2_present = _cross2_present; + state->orig.in.lm_cross = _lm_cross; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_ChangePasswordUser, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_samr, + NDR_SAMR_CHANGEPASSWORDUSER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_ChangePasswordUser_done, req); + return req; +} + +static void rpccli_samr_ChangePasswordUser_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_ChangePasswordUser_state *state = tevent_req_data( + req, struct rpccli_samr_ChangePasswordUser_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_ChangePasswordUser, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_ChangePasswordUser_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_ChangePasswordUser_state *state = tevent_req_data( + req, struct rpccli_samr_ChangePasswordUser_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_samr_ChangePasswordUser(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *user_handle /* [in] [ref] */, @@ -1684,6 +6450,127 @@ NTSTATUS rpccli_samr_ChangePasswordUser(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_GetGroupsForUser_state { + struct samr_GetGroupsForUser orig; + struct samr_GetGroupsForUser tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_GetGroupsForUser_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_GetGroupsForUser_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_user_handle /* [in] [ref] */, + struct samr_RidWithAttributeArray **_rids /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_GetGroupsForUser_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_GetGroupsForUser_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.user_handle = _user_handle; + + /* Out parameters */ + state->orig.out.rids = _rids; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_GetGroupsForUser, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_GetGroupsForUser_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_samr, + NDR_SAMR_GETGROUPSFORUSER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_GetGroupsForUser_done, req); + return req; +} + +static void rpccli_samr_GetGroupsForUser_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_GetGroupsForUser_state *state = tevent_req_data( + req, struct rpccli_samr_GetGroupsForUser_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(samr_GetGroupsForUser, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_GetGroupsForUser_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_GetGroupsForUser_state *state = tevent_req_data( + req, struct rpccli_samr_GetGroupsForUser_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_samr_GetGroupsForUser(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *user_handle /* [in] [ref] */, @@ -1724,6 +6611,141 @@ NTSTATUS rpccli_samr_GetGroupsForUser(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_QueryDisplayInfo_state { + struct samr_QueryDisplayInfo orig; + struct samr_QueryDisplayInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_QueryDisplayInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_QueryDisplayInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + uint16_t _level /* [in] */, + uint32_t _start_idx /* [in] */, + uint32_t _max_entries /* [in] */, + uint32_t _buf_size /* [in] */, + uint32_t *_total_size /* [out] [ref] */, + uint32_t *_returned_size /* [out] [ref] */, + union samr_DispInfo *_info /* [out] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_samr_QueryDisplayInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_QueryDisplayInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.domain_handle = _domain_handle; + state->orig.in.level = _level; + state->orig.in.start_idx = _start_idx; + state->orig.in.max_entries = _max_entries; + state->orig.in.buf_size = _buf_size; + + /* Out parameters */ + state->orig.out.total_size = _total_size; + state->orig.out.returned_size = _returned_size; + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QueryDisplayInfo, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_QueryDisplayInfo_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_samr, + NDR_SAMR_QUERYDISPLAYINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_QueryDisplayInfo_done, req); + return req; +} + +static void rpccli_samr_QueryDisplayInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_QueryDisplayInfo_state *state = tevent_req_data( + req, struct rpccli_samr_QueryDisplayInfo_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.total_size = *state->tmp.out.total_size; + *state->orig.out.returned_size = *state->tmp.out.returned_size; + *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(samr_QueryDisplayInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_QueryDisplayInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_QueryDisplayInfo_state *state = tevent_req_data( + req, struct rpccli_samr_QueryDisplayInfo_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_samr_QueryDisplayInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -1776,6 +6798,131 @@ NTSTATUS rpccli_samr_QueryDisplayInfo(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_GetDisplayEnumerationIndex_state { + struct samr_GetDisplayEnumerationIndex orig; + struct samr_GetDisplayEnumerationIndex tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_GetDisplayEnumerationIndex_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_GetDisplayEnumerationIndex_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + uint16_t _level /* [in] */, + struct lsa_String *_name /* [in] [ref] */, + uint32_t *_idx /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_GetDisplayEnumerationIndex_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_GetDisplayEnumerationIndex_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.domain_handle = _domain_handle; + state->orig.in.level = _level; + state->orig.in.name = _name; + + /* Out parameters */ + state->orig.out.idx = _idx; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_GetDisplayEnumerationIndex, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_GetDisplayEnumerationIndex_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_samr, + NDR_SAMR_GETDISPLAYENUMERATIONINDEX, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_GetDisplayEnumerationIndex_done, req); + return req; +} + +static void rpccli_samr_GetDisplayEnumerationIndex_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_GetDisplayEnumerationIndex_state *state = tevent_req_data( + req, struct rpccli_samr_GetDisplayEnumerationIndex_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.idx = *state->tmp.out.idx; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_GetDisplayEnumerationIndex, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_GetDisplayEnumerationIndex_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_GetDisplayEnumerationIndex_state *state = tevent_req_data( + req, struct rpccli_samr_GetDisplayEnumerationIndex_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_samr_GetDisplayEnumerationIndex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -1820,6 +6967,118 @@ NTSTATUS rpccli_samr_GetDisplayEnumerationIndex(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_TestPrivateFunctionsDomain_state { + struct samr_TestPrivateFunctionsDomain orig; + struct samr_TestPrivateFunctionsDomain tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_TestPrivateFunctionsDomain_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_TestPrivateFunctionsDomain_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_TestPrivateFunctionsDomain_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_TestPrivateFunctionsDomain_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.domain_handle = _domain_handle; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_TestPrivateFunctionsDomain, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_samr, + NDR_SAMR_TESTPRIVATEFUNCTIONSDOMAIN, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_TestPrivateFunctionsDomain_done, req); + return req; +} + +static void rpccli_samr_TestPrivateFunctionsDomain_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_TestPrivateFunctionsDomain_state *state = tevent_req_data( + req, struct rpccli_samr_TestPrivateFunctionsDomain_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_TestPrivateFunctionsDomain, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_TestPrivateFunctionsDomain_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_TestPrivateFunctionsDomain_state *state = tevent_req_data( + req, struct rpccli_samr_TestPrivateFunctionsDomain_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_samr_TestPrivateFunctionsDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */) @@ -1858,6 +7117,118 @@ NTSTATUS rpccli_samr_TestPrivateFunctionsDomain(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_TestPrivateFunctionsUser_state { + struct samr_TestPrivateFunctionsUser orig; + struct samr_TestPrivateFunctionsUser tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_TestPrivateFunctionsUser_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_TestPrivateFunctionsUser_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_user_handle /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_TestPrivateFunctionsUser_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_TestPrivateFunctionsUser_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.user_handle = _user_handle; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_TestPrivateFunctionsUser, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_samr, + NDR_SAMR_TESTPRIVATEFUNCTIONSUSER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_TestPrivateFunctionsUser_done, req); + return req; +} + +static void rpccli_samr_TestPrivateFunctionsUser_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_TestPrivateFunctionsUser_state *state = tevent_req_data( + req, struct rpccli_samr_TestPrivateFunctionsUser_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_TestPrivateFunctionsUser, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_TestPrivateFunctionsUser_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_TestPrivateFunctionsUser_state *state = tevent_req_data( + req, struct rpccli_samr_TestPrivateFunctionsUser_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_samr_TestPrivateFunctionsUser(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *user_handle /* [in] [ref] */) @@ -1896,6 +7267,127 @@ NTSTATUS rpccli_samr_TestPrivateFunctionsUser(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_GetUserPwInfo_state { + struct samr_GetUserPwInfo orig; + struct samr_GetUserPwInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_GetUserPwInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_GetUserPwInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_user_handle /* [in] [ref] */, + struct samr_PwInfo *_info /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_GetUserPwInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_GetUserPwInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.user_handle = _user_handle; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_GetUserPwInfo, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_GetUserPwInfo_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_samr, + NDR_SAMR_GETUSERPWINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_GetUserPwInfo_done, req); + return req; +} + +static void rpccli_samr_GetUserPwInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_GetUserPwInfo_state *state = tevent_req_data( + req, struct rpccli_samr_GetUserPwInfo_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(samr_GetUserPwInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_GetUserPwInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_GetUserPwInfo_state *state = tevent_req_data( + req, struct rpccli_samr_GetUserPwInfo_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_samr_GetUserPwInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *user_handle /* [in] [ref] */, @@ -1936,6 +7428,120 @@ NTSTATUS rpccli_samr_GetUserPwInfo(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_RemoveMemberFromForeignDomain_state { + struct samr_RemoveMemberFromForeignDomain orig; + struct samr_RemoveMemberFromForeignDomain tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_RemoveMemberFromForeignDomain_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_RemoveMemberFromForeignDomain_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + struct dom_sid2 *_sid /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_RemoveMemberFromForeignDomain_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_RemoveMemberFromForeignDomain_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.domain_handle = _domain_handle; + state->orig.in.sid = _sid; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_RemoveMemberFromForeignDomain, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_samr, + NDR_SAMR_REMOVEMEMBERFROMFOREIGNDOMAIN, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_RemoveMemberFromForeignDomain_done, req); + return req; +} + +static void rpccli_samr_RemoveMemberFromForeignDomain_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_RemoveMemberFromForeignDomain_state *state = tevent_req_data( + req, struct rpccli_samr_RemoveMemberFromForeignDomain_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_RemoveMemberFromForeignDomain, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_RemoveMemberFromForeignDomain_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_RemoveMemberFromForeignDomain_state *state = tevent_req_data( + req, struct rpccli_samr_RemoveMemberFromForeignDomain_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_samr_RemoveMemberFromForeignDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -1976,6 +7582,129 @@ NTSTATUS rpccli_samr_RemoveMemberFromForeignDomain(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_QueryDomainInfo2_state { + struct samr_QueryDomainInfo2 orig; + struct samr_QueryDomainInfo2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_QueryDomainInfo2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_QueryDomainInfo2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + enum samr_DomainInfoClass _level /* [in] */, + union samr_DomainInfo **_info /* [out] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_samr_QueryDomainInfo2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_QueryDomainInfo2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.domain_handle = _domain_handle; + state->orig.in.level = _level; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QueryDomainInfo2, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_QueryDomainInfo2_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_samr, + NDR_SAMR_QUERYDOMAININFO2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_QueryDomainInfo2_done, req); + return req; +} + +static void rpccli_samr_QueryDomainInfo2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_QueryDomainInfo2_state *state = tevent_req_data( + req, struct rpccli_samr_QueryDomainInfo2_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(samr_QueryDomainInfo2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_QueryDomainInfo2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_QueryDomainInfo2_state *state = tevent_req_data( + req, struct rpccli_samr_QueryDomainInfo2_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_samr_QueryDomainInfo2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -2018,6 +7747,129 @@ NTSTATUS rpccli_samr_QueryDomainInfo2(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_QueryUserInfo2_state { + struct samr_QueryUserInfo2 orig; + struct samr_QueryUserInfo2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_QueryUserInfo2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_QueryUserInfo2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_user_handle /* [in] [ref] */, + enum samr_UserInfoLevel _level /* [in] */, + union samr_UserInfo **_info /* [out] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_samr_QueryUserInfo2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_QueryUserInfo2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.user_handle = _user_handle; + state->orig.in.level = _level; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QueryUserInfo2, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_QueryUserInfo2_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_samr, + NDR_SAMR_QUERYUSERINFO2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_QueryUserInfo2_done, req); + return req; +} + +static void rpccli_samr_QueryUserInfo2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_QueryUserInfo2_state *state = tevent_req_data( + req, struct rpccli_samr_QueryUserInfo2_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(samr_QueryUserInfo2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_QueryUserInfo2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_QueryUserInfo2_state *state = tevent_req_data( + req, struct rpccli_samr_QueryUserInfo2_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_samr_QueryUserInfo2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *user_handle /* [in] [ref] */, @@ -2060,6 +7912,141 @@ NTSTATUS rpccli_samr_QueryUserInfo2(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_QueryDisplayInfo2_state { + struct samr_QueryDisplayInfo2 orig; + struct samr_QueryDisplayInfo2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_QueryDisplayInfo2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_QueryDisplayInfo2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + uint16_t _level /* [in] */, + uint32_t _start_idx /* [in] */, + uint32_t _max_entries /* [in] */, + uint32_t _buf_size /* [in] */, + uint32_t *_total_size /* [out] [ref] */, + uint32_t *_returned_size /* [out] [ref] */, + union samr_DispInfo *_info /* [out] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_samr_QueryDisplayInfo2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_QueryDisplayInfo2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.domain_handle = _domain_handle; + state->orig.in.level = _level; + state->orig.in.start_idx = _start_idx; + state->orig.in.max_entries = _max_entries; + state->orig.in.buf_size = _buf_size; + + /* Out parameters */ + state->orig.out.total_size = _total_size; + state->orig.out.returned_size = _returned_size; + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QueryDisplayInfo2, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_QueryDisplayInfo2_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_samr, + NDR_SAMR_QUERYDISPLAYINFO2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_QueryDisplayInfo2_done, req); + return req; +} + +static void rpccli_samr_QueryDisplayInfo2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_QueryDisplayInfo2_state *state = tevent_req_data( + req, struct rpccli_samr_QueryDisplayInfo2_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.total_size = *state->tmp.out.total_size; + *state->orig.out.returned_size = *state->tmp.out.returned_size; + *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(samr_QueryDisplayInfo2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_QueryDisplayInfo2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_QueryDisplayInfo2_state *state = tevent_req_data( + req, struct rpccli_samr_QueryDisplayInfo2_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_samr_QueryDisplayInfo2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -2112,6 +8099,131 @@ NTSTATUS rpccli_samr_QueryDisplayInfo2(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_GetDisplayEnumerationIndex2_state { + struct samr_GetDisplayEnumerationIndex2 orig; + struct samr_GetDisplayEnumerationIndex2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_GetDisplayEnumerationIndex2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_GetDisplayEnumerationIndex2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + uint16_t _level /* [in] */, + struct lsa_String *_name /* [in] [ref] */, + uint32_t *_idx /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_GetDisplayEnumerationIndex2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_GetDisplayEnumerationIndex2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.domain_handle = _domain_handle; + state->orig.in.level = _level; + state->orig.in.name = _name; + + /* Out parameters */ + state->orig.out.idx = _idx; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_GetDisplayEnumerationIndex2, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_GetDisplayEnumerationIndex2_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_samr, + NDR_SAMR_GETDISPLAYENUMERATIONINDEX2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_GetDisplayEnumerationIndex2_done, req); + return req; +} + +static void rpccli_samr_GetDisplayEnumerationIndex2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_GetDisplayEnumerationIndex2_state *state = tevent_req_data( + req, struct rpccli_samr_GetDisplayEnumerationIndex2_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.idx = *state->tmp.out.idx; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_GetDisplayEnumerationIndex2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_GetDisplayEnumerationIndex2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_GetDisplayEnumerationIndex2_state *state = tevent_req_data( + req, struct rpccli_samr_GetDisplayEnumerationIndex2_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_samr_GetDisplayEnumerationIndex2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -2156,6 +8268,139 @@ NTSTATUS rpccli_samr_GetDisplayEnumerationIndex2(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_CreateUser2_state { + struct samr_CreateUser2 orig; + struct samr_CreateUser2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_CreateUser2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_CreateUser2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + struct lsa_String *_account_name /* [in] [ref] */, + uint32_t _acct_flags /* [in] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_user_handle /* [out] [ref] */, + uint32_t *_access_granted /* [out] [ref] */, + uint32_t *_rid /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_CreateUser2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_CreateUser2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.domain_handle = _domain_handle; + state->orig.in.account_name = _account_name; + state->orig.in.acct_flags = _acct_flags; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.user_handle = _user_handle; + state->orig.out.access_granted = _access_granted; + state->orig.out.rid = _rid; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_CreateUser2, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_CreateUser2_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_samr, + NDR_SAMR_CREATEUSER2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_CreateUser2_done, req); + return req; +} + +static void rpccli_samr_CreateUser2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_CreateUser2_state *state = tevent_req_data( + req, struct rpccli_samr_CreateUser2_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.user_handle = *state->tmp.out.user_handle; + *state->orig.out.access_granted = *state->tmp.out.access_granted; + *state->orig.out.rid = *state->tmp.out.rid; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_CreateUser2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_CreateUser2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_CreateUser2_state *state = tevent_req_data( + req, struct rpccli_samr_CreateUser2_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_samr_CreateUser2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -2206,6 +8451,141 @@ NTSTATUS rpccli_samr_CreateUser2(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_QueryDisplayInfo3_state { + struct samr_QueryDisplayInfo3 orig; + struct samr_QueryDisplayInfo3 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_QueryDisplayInfo3_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_QueryDisplayInfo3_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + uint16_t _level /* [in] */, + uint32_t _start_idx /* [in] */, + uint32_t _max_entries /* [in] */, + uint32_t _buf_size /* [in] */, + uint32_t *_total_size /* [out] [ref] */, + uint32_t *_returned_size /* [out] [ref] */, + union samr_DispInfo *_info /* [out] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_samr_QueryDisplayInfo3_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_QueryDisplayInfo3_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.domain_handle = _domain_handle; + state->orig.in.level = _level; + state->orig.in.start_idx = _start_idx; + state->orig.in.max_entries = _max_entries; + state->orig.in.buf_size = _buf_size; + + /* Out parameters */ + state->orig.out.total_size = _total_size; + state->orig.out.returned_size = _returned_size; + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_QueryDisplayInfo3, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_QueryDisplayInfo3_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_samr, + NDR_SAMR_QUERYDISPLAYINFO3, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_QueryDisplayInfo3_done, req); + return req; +} + +static void rpccli_samr_QueryDisplayInfo3_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_QueryDisplayInfo3_state *state = tevent_req_data( + req, struct rpccli_samr_QueryDisplayInfo3_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.total_size = *state->tmp.out.total_size; + *state->orig.out.returned_size = *state->tmp.out.returned_size; + *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(samr_QueryDisplayInfo3, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_QueryDisplayInfo3_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_QueryDisplayInfo3_state *state = tevent_req_data( + req, struct rpccli_samr_QueryDisplayInfo3_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_samr_QueryDisplayInfo3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -2258,6 +8638,120 @@ NTSTATUS rpccli_samr_QueryDisplayInfo3(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_AddMultipleMembersToAlias_state { + struct samr_AddMultipleMembersToAlias orig; + struct samr_AddMultipleMembersToAlias tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_AddMultipleMembersToAlias_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_AddMultipleMembersToAlias_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_alias_handle /* [in] [ref] */, + struct lsa_SidArray *_sids /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_AddMultipleMembersToAlias_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_AddMultipleMembersToAlias_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.alias_handle = _alias_handle; + state->orig.in.sids = _sids; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_AddMultipleMembersToAlias, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_samr, + NDR_SAMR_ADDMULTIPLEMEMBERSTOALIAS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_AddMultipleMembersToAlias_done, req); + return req; +} + +static void rpccli_samr_AddMultipleMembersToAlias_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_AddMultipleMembersToAlias_state *state = tevent_req_data( + req, struct rpccli_samr_AddMultipleMembersToAlias_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_AddMultipleMembersToAlias, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_AddMultipleMembersToAlias_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_AddMultipleMembersToAlias_state *state = tevent_req_data( + req, struct rpccli_samr_AddMultipleMembersToAlias_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_samr_AddMultipleMembersToAlias(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *alias_handle /* [in] [ref] */, @@ -2298,6 +8792,120 @@ NTSTATUS rpccli_samr_AddMultipleMembersToAlias(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_RemoveMultipleMembersFromAlias_state { + struct samr_RemoveMultipleMembersFromAlias orig; + struct samr_RemoveMultipleMembersFromAlias tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_RemoveMultipleMembersFromAlias_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_RemoveMultipleMembersFromAlias_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_alias_handle /* [in] [ref] */, + struct lsa_SidArray *_sids /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_RemoveMultipleMembersFromAlias_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_RemoveMultipleMembersFromAlias_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.alias_handle = _alias_handle; + state->orig.in.sids = _sids; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_RemoveMultipleMembersFromAlias, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_samr, + NDR_SAMR_REMOVEMULTIPLEMEMBERSFROMALIAS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_RemoveMultipleMembersFromAlias_done, req); + return req; +} + +static void rpccli_samr_RemoveMultipleMembersFromAlias_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_RemoveMultipleMembersFromAlias_state *state = tevent_req_data( + req, struct rpccli_samr_RemoveMultipleMembersFromAlias_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_RemoveMultipleMembersFromAlias, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_RemoveMultipleMembersFromAlias_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_RemoveMultipleMembersFromAlias_state *state = tevent_req_data( + req, struct rpccli_samr_RemoveMultipleMembersFromAlias_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_samr_RemoveMultipleMembersFromAlias(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *alias_handle /* [in] [ref] */, @@ -2338,6 +8946,124 @@ NTSTATUS rpccli_samr_RemoveMultipleMembersFromAlias(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_OemChangePasswordUser2_state { + struct samr_OemChangePasswordUser2 orig; + struct samr_OemChangePasswordUser2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_OemChangePasswordUser2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_OemChangePasswordUser2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct lsa_AsciiString *_server /* [in] [unique] */, + struct lsa_AsciiString *_account /* [in] [ref] */, + struct samr_CryptPassword *_password /* [in] [unique] */, + struct samr_Password *_hash /* [in] [unique] */) +{ + struct tevent_req *req; + struct rpccli_samr_OemChangePasswordUser2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_OemChangePasswordUser2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server = _server; + state->orig.in.account = _account; + state->orig.in.password = _password; + state->orig.in.hash = _hash; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_OemChangePasswordUser2, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_samr, + NDR_SAMR_OEMCHANGEPASSWORDUSER2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_OemChangePasswordUser2_done, req); + return req; +} + +static void rpccli_samr_OemChangePasswordUser2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_OemChangePasswordUser2_state *state = tevent_req_data( + req, struct rpccli_samr_OemChangePasswordUser2_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_OemChangePasswordUser2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_OemChangePasswordUser2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_OemChangePasswordUser2_state *state = tevent_req_data( + req, struct rpccli_samr_OemChangePasswordUser2_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_samr_OemChangePasswordUser2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct lsa_AsciiString *server /* [in] [unique] */, @@ -2382,6 +9108,130 @@ NTSTATUS rpccli_samr_OemChangePasswordUser2(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_ChangePasswordUser2_state { + struct samr_ChangePasswordUser2 orig; + struct samr_ChangePasswordUser2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_ChangePasswordUser2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_ChangePasswordUser2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct lsa_String *_server /* [in] [unique] */, + struct lsa_String *_account /* [in] [ref] */, + struct samr_CryptPassword *_nt_password /* [in] [unique] */, + struct samr_Password *_nt_verifier /* [in] [unique] */, + uint8_t _lm_change /* [in] */, + struct samr_CryptPassword *_lm_password /* [in] [unique] */, + struct samr_Password *_lm_verifier /* [in] [unique] */) +{ + struct tevent_req *req; + struct rpccli_samr_ChangePasswordUser2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_ChangePasswordUser2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server = _server; + state->orig.in.account = _account; + state->orig.in.nt_password = _nt_password; + state->orig.in.nt_verifier = _nt_verifier; + state->orig.in.lm_change = _lm_change; + state->orig.in.lm_password = _lm_password; + state->orig.in.lm_verifier = _lm_verifier; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_ChangePasswordUser2, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_samr, + NDR_SAMR_CHANGEPASSWORDUSER2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_ChangePasswordUser2_done, req); + return req; +} + +static void rpccli_samr_ChangePasswordUser2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_ChangePasswordUser2_state *state = tevent_req_data( + req, struct rpccli_samr_ChangePasswordUser2_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_ChangePasswordUser2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_ChangePasswordUser2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_ChangePasswordUser2_state *state = tevent_req_data( + req, struct rpccli_samr_ChangePasswordUser2_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_samr_ChangePasswordUser2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct lsa_String *server /* [in] [unique] */, @@ -2432,6 +9282,127 @@ NTSTATUS rpccli_samr_ChangePasswordUser2(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_GetDomPwInfo_state { + struct samr_GetDomPwInfo orig; + struct samr_GetDomPwInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_GetDomPwInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_GetDomPwInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct lsa_String *_domain_name /* [in] [unique] */, + struct samr_PwInfo *_info /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_GetDomPwInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_GetDomPwInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.domain_name = _domain_name; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_GetDomPwInfo, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_GetDomPwInfo_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_samr, + NDR_SAMR_GETDOMPWINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_GetDomPwInfo_done, req); + return req; +} + +static void rpccli_samr_GetDomPwInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_GetDomPwInfo_state *state = tevent_req_data( + req, struct rpccli_samr_GetDomPwInfo_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(samr_GetDomPwInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_GetDomPwInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_GetDomPwInfo_state *state = tevent_req_data( + req, struct rpccli_samr_GetDomPwInfo_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_samr_GetDomPwInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct lsa_String *domain_name /* [in] [unique] */, @@ -2472,6 +9443,129 @@ NTSTATUS rpccli_samr_GetDomPwInfo(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_Connect2_state { + struct samr_Connect2 orig; + struct samr_Connect2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_Connect2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_Connect2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_system_name /* [in] [unique,charset(UTF16)] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_connect_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_Connect2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_Connect2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.system_name = _system_name; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.connect_handle = _connect_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_Connect2, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_Connect2_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_samr, + NDR_SAMR_CONNECT2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_Connect2_done, req); + return req; +} + +static void rpccli_samr_Connect2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_Connect2_state *state = tevent_req_data( + req, struct rpccli_samr_Connect2_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.connect_handle = *state->tmp.out.connect_handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_Connect2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_Connect2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_Connect2_state *state = tevent_req_data( + req, struct rpccli_samr_Connect2_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_samr_Connect2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *system_name /* [in] [unique,charset(UTF16)] */, @@ -2514,6 +9608,122 @@ NTSTATUS rpccli_samr_Connect2(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_SetUserInfo2_state { + struct samr_SetUserInfo2 orig; + struct samr_SetUserInfo2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_SetUserInfo2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_SetUserInfo2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_user_handle /* [in] [ref] */, + enum samr_UserInfoLevel _level /* [in] */, + union samr_UserInfo *_info /* [in] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_samr_SetUserInfo2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_SetUserInfo2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.user_handle = _user_handle; + state->orig.in.level = _level; + state->orig.in.info = _info; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_SetUserInfo2, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_samr, + NDR_SAMR_SETUSERINFO2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_SetUserInfo2_done, req); + return req; +} + +static void rpccli_samr_SetUserInfo2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_SetUserInfo2_state *state = tevent_req_data( + req, struct rpccli_samr_SetUserInfo2_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_SetUserInfo2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_SetUserInfo2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_SetUserInfo2_state *state = tevent_req_data( + req, struct rpccli_samr_SetUserInfo2_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_samr_SetUserInfo2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *user_handle /* [in] [ref] */, @@ -2556,6 +9766,124 @@ NTSTATUS rpccli_samr_SetUserInfo2(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_SetBootKeyInformation_state { + struct samr_SetBootKeyInformation orig; + struct samr_SetBootKeyInformation tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_SetBootKeyInformation_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_SetBootKeyInformation_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_connect_handle /* [in] [ref] */, + uint32_t _unknown1 /* [in] */, + uint32_t _unknown2 /* [in] */, + uint32_t _unknown3 /* [in] */) +{ + struct tevent_req *req; + struct rpccli_samr_SetBootKeyInformation_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_SetBootKeyInformation_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.connect_handle = _connect_handle; + state->orig.in.unknown1 = _unknown1; + state->orig.in.unknown2 = _unknown2; + state->orig.in.unknown3 = _unknown3; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_SetBootKeyInformation, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_samr, + NDR_SAMR_SETBOOTKEYINFORMATION, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_SetBootKeyInformation_done, req); + return req; +} + +static void rpccli_samr_SetBootKeyInformation_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_SetBootKeyInformation_state *state = tevent_req_data( + req, struct rpccli_samr_SetBootKeyInformation_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_SetBootKeyInformation, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_SetBootKeyInformation_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_SetBootKeyInformation_state *state = tevent_req_data( + req, struct rpccli_samr_SetBootKeyInformation_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_samr_SetBootKeyInformation(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *connect_handle /* [in] [ref] */, @@ -2600,6 +9928,127 @@ NTSTATUS rpccli_samr_SetBootKeyInformation(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_GetBootKeyInformation_state { + struct samr_GetBootKeyInformation orig; + struct samr_GetBootKeyInformation tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_GetBootKeyInformation_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_GetBootKeyInformation_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + uint32_t *_unknown /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_GetBootKeyInformation_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_GetBootKeyInformation_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.domain_handle = _domain_handle; + + /* Out parameters */ + state->orig.out.unknown = _unknown; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_GetBootKeyInformation, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_GetBootKeyInformation_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_samr, + NDR_SAMR_GETBOOTKEYINFORMATION, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_GetBootKeyInformation_done, req); + return req; +} + +static void rpccli_samr_GetBootKeyInformation_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_GetBootKeyInformation_state *state = tevent_req_data( + req, struct rpccli_samr_GetBootKeyInformation_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.unknown = *state->tmp.out.unknown; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_GetBootKeyInformation, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_GetBootKeyInformation_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_GetBootKeyInformation_state *state = tevent_req_data( + req, struct rpccli_samr_GetBootKeyInformation_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_samr_GetBootKeyInformation(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -2640,6 +10089,131 @@ NTSTATUS rpccli_samr_GetBootKeyInformation(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_Connect3_state { + struct samr_Connect3 orig; + struct samr_Connect3 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_Connect3_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_Connect3_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_system_name /* [in] [unique,charset(UTF16)] */, + uint32_t _unknown /* [in] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_connect_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_Connect3_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_Connect3_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.system_name = _system_name; + state->orig.in.unknown = _unknown; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.connect_handle = _connect_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_Connect3, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_Connect3_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_samr, + NDR_SAMR_CONNECT3, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_Connect3_done, req); + return req; +} + +static void rpccli_samr_Connect3_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_Connect3_state *state = tevent_req_data( + req, struct rpccli_samr_Connect3_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.connect_handle = *state->tmp.out.connect_handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_Connect3, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_Connect3_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_Connect3_state *state = tevent_req_data( + req, struct rpccli_samr_Connect3_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_samr_Connect3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *system_name /* [in] [unique,charset(UTF16)] */, @@ -2684,6 +10258,131 @@ NTSTATUS rpccli_samr_Connect3(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_Connect4_state { + struct samr_Connect4 orig; + struct samr_Connect4 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_Connect4_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_Connect4_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_system_name /* [in] [unique,charset(UTF16)] */, + enum samr_ConnectVersion _client_version /* [in] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_connect_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_Connect4_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_Connect4_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.system_name = _system_name; + state->orig.in.client_version = _client_version; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.connect_handle = _connect_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_Connect4, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_Connect4_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_samr, + NDR_SAMR_CONNECT4, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_Connect4_done, req); + return req; +} + +static void rpccli_samr_Connect4_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_Connect4_state *state = tevent_req_data( + req, struct rpccli_samr_Connect4_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.connect_handle = *state->tmp.out.connect_handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_Connect4, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_Connect4_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_Connect4_state *state = tevent_req_data( + req, struct rpccli_samr_Connect4_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_samr_Connect4(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *system_name /* [in] [unique,charset(UTF16)] */, @@ -2728,6 +10427,144 @@ NTSTATUS rpccli_samr_Connect4(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_ChangePasswordUser3_state { + struct samr_ChangePasswordUser3 orig; + struct samr_ChangePasswordUser3 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_ChangePasswordUser3_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_ChangePasswordUser3_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct lsa_String *_server /* [in] [unique] */, + struct lsa_String *_account /* [in] [ref] */, + struct samr_CryptPassword *_nt_password /* [in] [unique] */, + struct samr_Password *_nt_verifier /* [in] [unique] */, + uint8_t _lm_change /* [in] */, + struct samr_CryptPassword *_lm_password /* [in] [unique] */, + struct samr_Password *_lm_verifier /* [in] [unique] */, + struct samr_CryptPassword *_password3 /* [in] [unique] */, + struct samr_DomInfo1 **_dominfo /* [out] [ref] */, + struct samr_ChangeReject **_reject /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_ChangePasswordUser3_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_ChangePasswordUser3_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server = _server; + state->orig.in.account = _account; + state->orig.in.nt_password = _nt_password; + state->orig.in.nt_verifier = _nt_verifier; + state->orig.in.lm_change = _lm_change; + state->orig.in.lm_password = _lm_password; + state->orig.in.lm_verifier = _lm_verifier; + state->orig.in.password3 = _password3; + + /* Out parameters */ + state->orig.out.dominfo = _dominfo; + state->orig.out.reject = _reject; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_ChangePasswordUser3, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_ChangePasswordUser3_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_samr, + NDR_SAMR_CHANGEPASSWORDUSER3, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_ChangePasswordUser3_done, req); + return req; +} + +static void rpccli_samr_ChangePasswordUser3_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_ChangePasswordUser3_state *state = tevent_req_data( + req, struct rpccli_samr_ChangePasswordUser3_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.dominfo = *state->tmp.out.dominfo; + *state->orig.out.reject = *state->tmp.out.reject; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_ChangePasswordUser3, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_ChangePasswordUser3_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_ChangePasswordUser3_state *state = tevent_req_data( + req, struct rpccli_samr_ChangePasswordUser3_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_samr_ChangePasswordUser3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct lsa_String *server /* [in] [unique] */, @@ -2784,6 +10621,139 @@ NTSTATUS rpccli_samr_ChangePasswordUser3(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_Connect5_state { + struct samr_Connect5 orig; + struct samr_Connect5 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_Connect5_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_Connect5_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_system_name /* [in] [unique,charset(UTF16)] */, + uint32_t _access_mask /* [in] */, + uint32_t _level_in /* [in] */, + union samr_ConnectInfo *_info_in /* [in] [ref,switch_is(level_in)] */, + uint32_t *_level_out /* [out] [ref] */, + union samr_ConnectInfo *_info_out /* [out] [ref,switch_is(*level_out)] */, + struct policy_handle *_connect_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_Connect5_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_Connect5_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.system_name = _system_name; + state->orig.in.access_mask = _access_mask; + state->orig.in.level_in = _level_in; + state->orig.in.info_in = _info_in; + + /* Out parameters */ + state->orig.out.level_out = _level_out; + state->orig.out.info_out = _info_out; + state->orig.out.connect_handle = _connect_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_Connect5, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_Connect5_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_samr, + NDR_SAMR_CONNECT5, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_Connect5_done, req); + return req; +} + +static void rpccli_samr_Connect5_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_Connect5_state *state = tevent_req_data( + req, struct rpccli_samr_Connect5_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.level_out = *state->tmp.out.level_out; + *state->orig.out.info_out = *state->tmp.out.info_out; + *state->orig.out.connect_handle = *state->tmp.out.connect_handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_Connect5, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_Connect5_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_Connect5_state *state = tevent_req_data( + req, struct rpccli_samr_Connect5_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_samr_Connect5(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *system_name /* [in] [unique,charset(UTF16)] */, @@ -2834,6 +10804,129 @@ NTSTATUS rpccli_samr_Connect5(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_RidToSid_state { + struct samr_RidToSid orig; + struct samr_RidToSid tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_RidToSid_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_RidToSid_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + uint32_t _rid /* [in] */, + struct dom_sid2 **_sid /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_samr_RidToSid_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_RidToSid_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.domain_handle = _domain_handle; + state->orig.in.rid = _rid; + + /* Out parameters */ + state->orig.out.sid = _sid; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_RidToSid, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_RidToSid_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_samr, + NDR_SAMR_RIDTOSID, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_RidToSid_done, req); + return req; +} + +static void rpccli_samr_RidToSid_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_RidToSid_state *state = tevent_req_data( + req, struct rpccli_samr_RidToSid_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(samr_RidToSid, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_RidToSid_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_RidToSid_state *state = tevent_req_data( + req, struct rpccli_samr_RidToSid_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_samr_RidToSid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -2876,6 +10969,122 @@ NTSTATUS rpccli_samr_RidToSid(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_SetDsrmPassword_state { + struct samr_SetDsrmPassword orig; + struct samr_SetDsrmPassword tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_SetDsrmPassword_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_SetDsrmPassword_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct lsa_String *_name /* [in] [unique] */, + uint32_t _unknown /* [in] */, + struct samr_Password *_hash /* [in] [unique] */) +{ + struct tevent_req *req; + struct rpccli_samr_SetDsrmPassword_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_SetDsrmPassword_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.name = _name; + state->orig.in.unknown = _unknown; + state->orig.in.hash = _hash; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_SetDsrmPassword, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_samr, + NDR_SAMR_SETDSRMPASSWORD, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_SetDsrmPassword_done, req); + return req; +} + +static void rpccli_samr_SetDsrmPassword_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_SetDsrmPassword_state *state = tevent_req_data( + req, struct rpccli_samr_SetDsrmPassword_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_SetDsrmPassword, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_SetDsrmPassword_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_SetDsrmPassword_state *state = tevent_req_data( + req, struct rpccli_samr_SetDsrmPassword_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_samr_SetDsrmPassword(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct lsa_String *name /* [in] [unique] */, @@ -2918,6 +11127,129 @@ NTSTATUS rpccli_samr_SetDsrmPassword(struct rpc_pipe_client *cli, return r.out.result; } +struct rpccli_samr_ValidatePassword_state { + struct samr_ValidatePassword orig; + struct samr_ValidatePassword tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_samr_ValidatePassword_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_samr_ValidatePassword_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + enum samr_ValidatePasswordLevel _level /* [in] */, + union samr_ValidatePasswordReq *_req /* [in] [ref,switch_is(level)] */, + union samr_ValidatePasswordRep **_rep /* [out] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_samr_ValidatePassword_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_samr_ValidatePassword_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.level = _level; + state->orig.in.req = _req; + + /* Out parameters */ + state->orig.out.rep = _rep; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(samr_ValidatePassword, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_samr_ValidatePassword_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_samr, + NDR_SAMR_VALIDATEPASSWORD, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_samr_ValidatePassword_done, req); + return req; +} + +static void rpccli_samr_ValidatePassword_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_samr_ValidatePassword_state *state = tevent_req_data( + req, struct rpccli_samr_ValidatePassword_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.rep = *state->tmp.out.rep; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(samr_ValidatePassword, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_samr_ValidatePassword_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result) +{ + struct rpccli_samr_ValidatePassword_state *state = tevent_req_data( + req, struct rpccli_samr_ValidatePassword_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_samr_ValidatePassword(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, enum samr_ValidatePasswordLevel level /* [in] */, diff --git a/librpc/gen_ndr/cli_samr.h b/librpc/gen_ndr/cli_samr.h index 7e351ddb93..ed2baa9aba 100644 --- a/librpc/gen_ndr/cli_samr.h +++ b/librpc/gen_ndr/cli_samr.h @@ -1,32 +1,93 @@ #include "../librpc/gen_ndr/ndr_samr.h" #ifndef __CLI_SAMR__ #define __CLI_SAMR__ +struct tevent_req *rpccli_samr_Connect_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_system_name /* [in] [unique] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_connect_handle /* [out] [ref] */); +NTSTATUS rpccli_samr_Connect_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_Connect(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name /* [in] [unique] */, uint32_t access_mask /* [in] */, struct policy_handle *connect_handle /* [out] [ref] */); +struct tevent_req *rpccli_samr_Close_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in,out] [ref] */); +NTSTATUS rpccli_samr_Close_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_Close(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in,out] [ref] */); +struct tevent_req *rpccli_samr_SetSecurity_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _sec_info /* [in] */, + struct sec_desc_buf *_sdbuf /* [in] [ref] */); +NTSTATUS rpccli_samr_SetSecurity_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_SetSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t sec_info /* [in] */, struct sec_desc_buf *sdbuf /* [in] [ref] */); +struct tevent_req *rpccli_samr_QuerySecurity_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _sec_info /* [in] */, + struct sec_desc_buf **_sdbuf /* [out] [ref] */); +NTSTATUS rpccli_samr_QuerySecurity_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_QuerySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t sec_info /* [in] */, struct sec_desc_buf **sdbuf /* [out] [ref] */); +struct tevent_req *rpccli_samr_Shutdown_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_connect_handle /* [in] [ref] */); +NTSTATUS rpccli_samr_Shutdown_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_Shutdown(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *connect_handle /* [in] [ref] */); +struct tevent_req *rpccli_samr_LookupDomain_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_connect_handle /* [in] [ref] */, + struct lsa_String *_domain_name /* [in] [ref] */, + struct dom_sid2 **_sid /* [out] [ref] */); +NTSTATUS rpccli_samr_LookupDomain_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_LookupDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *connect_handle /* [in] [ref] */, struct lsa_String *domain_name /* [in] [ref] */, struct dom_sid2 **sid /* [out] [ref] */); +struct tevent_req *rpccli_samr_EnumDomains_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_connect_handle /* [in] [ref] */, + uint32_t *_resume_handle /* [in,out] [ref] */, + struct samr_SamArray **_sam /* [out] [ref] */, + uint32_t _buf_size /* [in] */, + uint32_t *_num_entries /* [out] [ref] */); +NTSTATUS rpccli_samr_EnumDomains_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_EnumDomains(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *connect_handle /* [in] [ref] */, @@ -34,22 +95,61 @@ NTSTATUS rpccli_samr_EnumDomains(struct rpc_pipe_client *cli, struct samr_SamArray **sam /* [out] [ref] */, uint32_t buf_size /* [in] */, uint32_t *num_entries /* [out] [ref] */); +struct tevent_req *rpccli_samr_OpenDomain_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_connect_handle /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + struct dom_sid2 *_sid /* [in] [ref] */, + struct policy_handle *_domain_handle /* [out] [ref] */); +NTSTATUS rpccli_samr_OpenDomain_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_OpenDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *connect_handle /* [in] [ref] */, uint32_t access_mask /* [in] */, struct dom_sid2 *sid /* [in] [ref] */, struct policy_handle *domain_handle /* [out] [ref] */); +struct tevent_req *rpccli_samr_QueryDomainInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + enum samr_DomainInfoClass _level /* [in] */, + union samr_DomainInfo **_info /* [out] [ref,switch_is(level)] */); +NTSTATUS rpccli_samr_QueryDomainInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_QueryDomainInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, enum samr_DomainInfoClass level /* [in] */, union samr_DomainInfo **info /* [out] [ref,switch_is(level)] */); +struct tevent_req *rpccli_samr_SetDomainInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + enum samr_DomainInfoClass _level /* [in] */, + union samr_DomainInfo *_info /* [in] [ref,switch_is(level)] */); +NTSTATUS rpccli_samr_SetDomainInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_SetDomainInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, enum samr_DomainInfoClass level /* [in] */, union samr_DomainInfo *info /* [in] [ref,switch_is(level)] */); +struct tevent_req *rpccli_samr_CreateDomainGroup_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + struct lsa_String *_name /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_group_handle /* [out] [ref] */, + uint32_t *_rid /* [out] [ref] */); +NTSTATUS rpccli_samr_CreateDomainGroup_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_CreateDomainGroup(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -57,6 +157,17 @@ NTSTATUS rpccli_samr_CreateDomainGroup(struct rpc_pipe_client *cli, uint32_t access_mask /* [in] */, struct policy_handle *group_handle /* [out] [ref] */, uint32_t *rid /* [out] [ref] */); +struct tevent_req *rpccli_samr_EnumDomainGroups_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + uint32_t *_resume_handle /* [in,out] [ref] */, + struct samr_SamArray **_sam /* [out] [ref] */, + uint32_t _max_size /* [in] */, + uint32_t *_num_entries /* [out] [ref] */); +NTSTATUS rpccli_samr_EnumDomainGroups_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_EnumDomainGroups(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -64,6 +175,17 @@ NTSTATUS rpccli_samr_EnumDomainGroups(struct rpc_pipe_client *cli, struct samr_SamArray **sam /* [out] [ref] */, uint32_t max_size /* [in] */, uint32_t *num_entries /* [out] [ref] */); +struct tevent_req *rpccli_samr_CreateUser_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + struct lsa_String *_account_name /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_user_handle /* [out] [ref] */, + uint32_t *_rid /* [out] [ref] */); +NTSTATUS rpccli_samr_CreateUser_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_CreateUser(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -71,6 +193,18 @@ NTSTATUS rpccli_samr_CreateUser(struct rpc_pipe_client *cli, uint32_t access_mask /* [in] */, struct policy_handle *user_handle /* [out] [ref] */, uint32_t *rid /* [out] [ref] */); +struct tevent_req *rpccli_samr_EnumDomainUsers_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + uint32_t *_resume_handle /* [in,out] [ref] */, + uint32_t _acct_flags /* [in] */, + struct samr_SamArray **_sam /* [out] [ref] */, + uint32_t _max_size /* [in] */, + uint32_t *_num_entries /* [out] [ref] */); +NTSTATUS rpccli_samr_EnumDomainUsers_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_EnumDomainUsers(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -79,6 +213,17 @@ NTSTATUS rpccli_samr_EnumDomainUsers(struct rpc_pipe_client *cli, struct samr_SamArray **sam /* [out] [ref] */, uint32_t max_size /* [in] */, uint32_t *num_entries /* [out] [ref] */); +struct tevent_req *rpccli_samr_CreateDomAlias_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + struct lsa_String *_alias_name /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_alias_handle /* [out] [ref] */, + uint32_t *_rid /* [out] [ref] */); +NTSTATUS rpccli_samr_CreateDomAlias_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_CreateDomAlias(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -86,6 +231,17 @@ NTSTATUS rpccli_samr_CreateDomAlias(struct rpc_pipe_client *cli, uint32_t access_mask /* [in] */, struct policy_handle *alias_handle /* [out] [ref] */, uint32_t *rid /* [out] [ref] */); +struct tevent_req *rpccli_samr_EnumDomainAliases_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + uint32_t *_resume_handle /* [in,out] [ref] */, + struct samr_SamArray **_sam /* [out] [ref] */, + uint32_t _max_size /* [in] */, + uint32_t *_num_entries /* [out] [ref] */); +NTSTATUS rpccli_samr_EnumDomainAliases_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_EnumDomainAliases(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -93,11 +249,31 @@ NTSTATUS rpccli_samr_EnumDomainAliases(struct rpc_pipe_client *cli, struct samr_SamArray **sam /* [out] [ref] */, uint32_t max_size /* [in] */, uint32_t *num_entries /* [out] [ref] */); +struct tevent_req *rpccli_samr_GetAliasMembership_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + struct lsa_SidArray *_sids /* [in] [ref] */, + struct samr_Ids *_rids /* [out] [ref] */); +NTSTATUS rpccli_samr_GetAliasMembership_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_GetAliasMembership(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, struct lsa_SidArray *sids /* [in] [ref] */, struct samr_Ids *rids /* [out] [ref] */); +struct tevent_req *rpccli_samr_LookupNames_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + uint32_t _num_names /* [in] [range(0,1000)] */, + struct lsa_String *_names /* [in] [length_is(num_names),size_is(1000)] */, + struct samr_Ids *_rids /* [out] [ref] */, + struct samr_Ids *_types /* [out] [ref] */); +NTSTATUS rpccli_samr_LookupNames_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_LookupNames(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -105,6 +281,17 @@ NTSTATUS rpccli_samr_LookupNames(struct rpc_pipe_client *cli, struct lsa_String *names /* [in] [length_is(num_names),size_is(1000)] */, struct samr_Ids *rids /* [out] [ref] */, struct samr_Ids *types /* [out] [ref] */); +struct tevent_req *rpccli_samr_LookupRids_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + uint32_t _num_rids /* [in] [range(0,1000)] */, + uint32_t *_rids /* [in] [length_is(num_rids),size_is(1000)] */, + struct lsa_Strings *_names /* [out] [ref] */, + struct samr_Ids *_types /* [out] [ref] */); +NTSTATUS rpccli_samr_LookupRids_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_LookupRids(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -112,93 +299,273 @@ NTSTATUS rpccli_samr_LookupRids(struct rpc_pipe_client *cli, uint32_t *rids /* [in] [length_is(num_rids),size_is(1000)] */, struct lsa_Strings *names /* [out] [ref] */, struct samr_Ids *types /* [out] [ref] */); +struct tevent_req *rpccli_samr_OpenGroup_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + uint32_t _rid /* [in] */, + struct policy_handle *_group_handle /* [out] [ref] */); +NTSTATUS rpccli_samr_OpenGroup_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_OpenGroup(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, uint32_t access_mask /* [in] */, uint32_t rid /* [in] */, struct policy_handle *group_handle /* [out] [ref] */); +struct tevent_req *rpccli_samr_QueryGroupInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_group_handle /* [in] [ref] */, + enum samr_GroupInfoEnum _level /* [in] */, + union samr_GroupInfo **_info /* [out] [ref,switch_is(level)] */); +NTSTATUS rpccli_samr_QueryGroupInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_QueryGroupInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *group_handle /* [in] [ref] */, enum samr_GroupInfoEnum level /* [in] */, union samr_GroupInfo **info /* [out] [ref,switch_is(level)] */); +struct tevent_req *rpccli_samr_SetGroupInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_group_handle /* [in] [ref] */, + enum samr_GroupInfoEnum _level /* [in] */, + union samr_GroupInfo *_info /* [in] [ref,switch_is(level)] */); +NTSTATUS rpccli_samr_SetGroupInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_SetGroupInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *group_handle /* [in] [ref] */, enum samr_GroupInfoEnum level /* [in] */, union samr_GroupInfo *info /* [in] [ref,switch_is(level)] */); +struct tevent_req *rpccli_samr_AddGroupMember_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_group_handle /* [in] [ref] */, + uint32_t _rid /* [in] */, + uint32_t _flags /* [in] */); +NTSTATUS rpccli_samr_AddGroupMember_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_AddGroupMember(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *group_handle /* [in] [ref] */, uint32_t rid /* [in] */, uint32_t flags /* [in] */); +struct tevent_req *rpccli_samr_DeleteDomainGroup_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_group_handle /* [in,out] [ref] */); +NTSTATUS rpccli_samr_DeleteDomainGroup_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_DeleteDomainGroup(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *group_handle /* [in,out] [ref] */); +struct tevent_req *rpccli_samr_DeleteGroupMember_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_group_handle /* [in] [ref] */, + uint32_t _rid /* [in] */); +NTSTATUS rpccli_samr_DeleteGroupMember_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_DeleteGroupMember(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *group_handle /* [in] [ref] */, uint32_t rid /* [in] */); +struct tevent_req *rpccli_samr_QueryGroupMember_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_group_handle /* [in] [ref] */, + struct samr_RidTypeArray **_rids /* [out] [ref] */); +NTSTATUS rpccli_samr_QueryGroupMember_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_QueryGroupMember(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *group_handle /* [in] [ref] */, struct samr_RidTypeArray **rids /* [out] [ref] */); +struct tevent_req *rpccli_samr_SetMemberAttributesOfGroup_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_group_handle /* [in] [ref] */, + uint32_t _unknown1 /* [in] */, + uint32_t _unknown2 /* [in] */); +NTSTATUS rpccli_samr_SetMemberAttributesOfGroup_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_SetMemberAttributesOfGroup(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *group_handle /* [in] [ref] */, uint32_t unknown1 /* [in] */, uint32_t unknown2 /* [in] */); +struct tevent_req *rpccli_samr_OpenAlias_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + uint32_t _rid /* [in] */, + struct policy_handle *_alias_handle /* [out] [ref] */); +NTSTATUS rpccli_samr_OpenAlias_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_OpenAlias(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, uint32_t access_mask /* [in] */, uint32_t rid /* [in] */, struct policy_handle *alias_handle /* [out] [ref] */); +struct tevent_req *rpccli_samr_QueryAliasInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_alias_handle /* [in] [ref] */, + enum samr_AliasInfoEnum _level /* [in] */, + union samr_AliasInfo **_info /* [out] [ref,switch_is(level)] */); +NTSTATUS rpccli_samr_QueryAliasInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_QueryAliasInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *alias_handle /* [in] [ref] */, enum samr_AliasInfoEnum level /* [in] */, union samr_AliasInfo **info /* [out] [ref,switch_is(level)] */); +struct tevent_req *rpccli_samr_SetAliasInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_alias_handle /* [in] [ref] */, + enum samr_AliasInfoEnum _level /* [in] */, + union samr_AliasInfo *_info /* [in] [ref,switch_is(level)] */); +NTSTATUS rpccli_samr_SetAliasInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_SetAliasInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *alias_handle /* [in] [ref] */, enum samr_AliasInfoEnum level /* [in] */, union samr_AliasInfo *info /* [in] [ref,switch_is(level)] */); +struct tevent_req *rpccli_samr_DeleteDomAlias_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_alias_handle /* [in,out] [ref] */); +NTSTATUS rpccli_samr_DeleteDomAlias_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_DeleteDomAlias(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *alias_handle /* [in,out] [ref] */); +struct tevent_req *rpccli_samr_AddAliasMember_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_alias_handle /* [in] [ref] */, + struct dom_sid2 *_sid /* [in] [ref] */); +NTSTATUS rpccli_samr_AddAliasMember_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_AddAliasMember(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *alias_handle /* [in] [ref] */, struct dom_sid2 *sid /* [in] [ref] */); +struct tevent_req *rpccli_samr_DeleteAliasMember_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_alias_handle /* [in] [ref] */, + struct dom_sid2 *_sid /* [in] [ref] */); +NTSTATUS rpccli_samr_DeleteAliasMember_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_DeleteAliasMember(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *alias_handle /* [in] [ref] */, struct dom_sid2 *sid /* [in] [ref] */); +struct tevent_req *rpccli_samr_GetMembersInAlias_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_alias_handle /* [in] [ref] */, + struct lsa_SidArray *_sids /* [out] [ref] */); +NTSTATUS rpccli_samr_GetMembersInAlias_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_GetMembersInAlias(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *alias_handle /* [in] [ref] */, struct lsa_SidArray *sids /* [out] [ref] */); +struct tevent_req *rpccli_samr_OpenUser_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + uint32_t _access_mask /* [in] */, + uint32_t _rid /* [in] */, + struct policy_handle *_user_handle /* [out] [ref] */); +NTSTATUS rpccli_samr_OpenUser_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_OpenUser(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, uint32_t access_mask /* [in] */, uint32_t rid /* [in] */, struct policy_handle *user_handle /* [out] [ref] */); +struct tevent_req *rpccli_samr_DeleteUser_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_user_handle /* [in,out] [ref] */); +NTSTATUS rpccli_samr_DeleteUser_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_DeleteUser(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *user_handle /* [in,out] [ref] */); +struct tevent_req *rpccli_samr_QueryUserInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_user_handle /* [in] [ref] */, + enum samr_UserInfoLevel _level /* [in] */, + union samr_UserInfo **_info /* [out] [ref,switch_is(level)] */); +NTSTATUS rpccli_samr_QueryUserInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_QueryUserInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *user_handle /* [in] [ref] */, enum samr_UserInfoLevel level /* [in] */, union samr_UserInfo **info /* [out] [ref,switch_is(level)] */); +struct tevent_req *rpccli_samr_SetUserInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_user_handle /* [in] [ref] */, + enum samr_UserInfoLevel _level /* [in] */, + union samr_UserInfo *_info /* [in] [ref,switch_is(level)] */); +NTSTATUS rpccli_samr_SetUserInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_SetUserInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *user_handle /* [in] [ref] */, enum samr_UserInfoLevel level /* [in] */, union samr_UserInfo *info /* [in] [ref,switch_is(level)] */); +struct tevent_req *rpccli_samr_ChangePasswordUser_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_user_handle /* [in] [ref] */, + uint8_t _lm_present /* [in] */, + struct samr_Password *_old_lm_crypted /* [in] [unique] */, + struct samr_Password *_new_lm_crypted /* [in] [unique] */, + uint8_t _nt_present /* [in] */, + struct samr_Password *_old_nt_crypted /* [in] [unique] */, + struct samr_Password *_new_nt_crypted /* [in] [unique] */, + uint8_t _cross1_present /* [in] */, + struct samr_Password *_nt_cross /* [in] [unique] */, + uint8_t _cross2_present /* [in] */, + struct samr_Password *_lm_cross /* [in] [unique] */); +NTSTATUS rpccli_samr_ChangePasswordUser_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_ChangePasswordUser(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *user_handle /* [in] [ref] */, @@ -212,10 +579,32 @@ NTSTATUS rpccli_samr_ChangePasswordUser(struct rpc_pipe_client *cli, struct samr_Password *nt_cross /* [in] [unique] */, uint8_t cross2_present /* [in] */, struct samr_Password *lm_cross /* [in] [unique] */); +struct tevent_req *rpccli_samr_GetGroupsForUser_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_user_handle /* [in] [ref] */, + struct samr_RidWithAttributeArray **_rids /* [out] [ref] */); +NTSTATUS rpccli_samr_GetGroupsForUser_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_GetGroupsForUser(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *user_handle /* [in] [ref] */, struct samr_RidWithAttributeArray **rids /* [out] [ref] */); +struct tevent_req *rpccli_samr_QueryDisplayInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + uint16_t _level /* [in] */, + uint32_t _start_idx /* [in] */, + uint32_t _max_entries /* [in] */, + uint32_t _buf_size /* [in] */, + uint32_t *_total_size /* [out] [ref] */, + uint32_t *_returned_size /* [out] [ref] */, + union samr_DispInfo *_info /* [out] [ref,switch_is(level)] */); +NTSTATUS rpccli_samr_QueryDisplayInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_QueryDisplayInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -226,36 +615,108 @@ NTSTATUS rpccli_samr_QueryDisplayInfo(struct rpc_pipe_client *cli, uint32_t *total_size /* [out] [ref] */, uint32_t *returned_size /* [out] [ref] */, union samr_DispInfo *info /* [out] [ref,switch_is(level)] */); +struct tevent_req *rpccli_samr_GetDisplayEnumerationIndex_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + uint16_t _level /* [in] */, + struct lsa_String *_name /* [in] [ref] */, + uint32_t *_idx /* [out] [ref] */); +NTSTATUS rpccli_samr_GetDisplayEnumerationIndex_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_GetDisplayEnumerationIndex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, uint16_t level /* [in] */, struct lsa_String *name /* [in] [ref] */, uint32_t *idx /* [out] [ref] */); +struct tevent_req *rpccli_samr_TestPrivateFunctionsDomain_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */); +NTSTATUS rpccli_samr_TestPrivateFunctionsDomain_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_TestPrivateFunctionsDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */); +struct tevent_req *rpccli_samr_TestPrivateFunctionsUser_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_user_handle /* [in] [ref] */); +NTSTATUS rpccli_samr_TestPrivateFunctionsUser_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_TestPrivateFunctionsUser(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *user_handle /* [in] [ref] */); +struct tevent_req *rpccli_samr_GetUserPwInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_user_handle /* [in] [ref] */, + struct samr_PwInfo *_info /* [out] [ref] */); +NTSTATUS rpccli_samr_GetUserPwInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_GetUserPwInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *user_handle /* [in] [ref] */, struct samr_PwInfo *info /* [out] [ref] */); +struct tevent_req *rpccli_samr_RemoveMemberFromForeignDomain_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + struct dom_sid2 *_sid /* [in] [ref] */); +NTSTATUS rpccli_samr_RemoveMemberFromForeignDomain_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_RemoveMemberFromForeignDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, struct dom_sid2 *sid /* [in] [ref] */); +struct tevent_req *rpccli_samr_QueryDomainInfo2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + enum samr_DomainInfoClass _level /* [in] */, + union samr_DomainInfo **_info /* [out] [ref,switch_is(level)] */); +NTSTATUS rpccli_samr_QueryDomainInfo2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_QueryDomainInfo2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, enum samr_DomainInfoClass level /* [in] */, union samr_DomainInfo **info /* [out] [ref,switch_is(level)] */); +struct tevent_req *rpccli_samr_QueryUserInfo2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_user_handle /* [in] [ref] */, + enum samr_UserInfoLevel _level /* [in] */, + union samr_UserInfo **_info /* [out] [ref,switch_is(level)] */); +NTSTATUS rpccli_samr_QueryUserInfo2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_QueryUserInfo2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *user_handle /* [in] [ref] */, enum samr_UserInfoLevel level /* [in] */, union samr_UserInfo **info /* [out] [ref,switch_is(level)] */); +struct tevent_req *rpccli_samr_QueryDisplayInfo2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + uint16_t _level /* [in] */, + uint32_t _start_idx /* [in] */, + uint32_t _max_entries /* [in] */, + uint32_t _buf_size /* [in] */, + uint32_t *_total_size /* [out] [ref] */, + uint32_t *_returned_size /* [out] [ref] */, + union samr_DispInfo *_info /* [out] [ref,switch_is(level)] */); +NTSTATUS rpccli_samr_QueryDisplayInfo2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_QueryDisplayInfo2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -266,12 +727,35 @@ NTSTATUS rpccli_samr_QueryDisplayInfo2(struct rpc_pipe_client *cli, uint32_t *total_size /* [out] [ref] */, uint32_t *returned_size /* [out] [ref] */, union samr_DispInfo *info /* [out] [ref,switch_is(level)] */); +struct tevent_req *rpccli_samr_GetDisplayEnumerationIndex2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + uint16_t _level /* [in] */, + struct lsa_String *_name /* [in] [ref] */, + uint32_t *_idx /* [out] [ref] */); +NTSTATUS rpccli_samr_GetDisplayEnumerationIndex2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_GetDisplayEnumerationIndex2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, uint16_t level /* [in] */, struct lsa_String *name /* [in] [ref] */, uint32_t *idx /* [out] [ref] */); +struct tevent_req *rpccli_samr_CreateUser2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + struct lsa_String *_account_name /* [in] [ref] */, + uint32_t _acct_flags /* [in] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_user_handle /* [out] [ref] */, + uint32_t *_access_granted /* [out] [ref] */, + uint32_t *_rid /* [out] [ref] */); +NTSTATUS rpccli_samr_CreateUser2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_CreateUser2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -281,6 +765,20 @@ NTSTATUS rpccli_samr_CreateUser2(struct rpc_pipe_client *cli, struct policy_handle *user_handle /* [out] [ref] */, uint32_t *access_granted /* [out] [ref] */, uint32_t *rid /* [out] [ref] */); +struct tevent_req *rpccli_samr_QueryDisplayInfo3_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + uint16_t _level /* [in] */, + uint32_t _start_idx /* [in] */, + uint32_t _max_entries /* [in] */, + uint32_t _buf_size /* [in] */, + uint32_t *_total_size /* [out] [ref] */, + uint32_t *_returned_size /* [out] [ref] */, + union samr_DispInfo *_info /* [out] [ref,switch_is(level)] */); +NTSTATUS rpccli_samr_QueryDisplayInfo3_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_QueryDisplayInfo3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, @@ -291,20 +789,59 @@ NTSTATUS rpccli_samr_QueryDisplayInfo3(struct rpc_pipe_client *cli, uint32_t *total_size /* [out] [ref] */, uint32_t *returned_size /* [out] [ref] */, union samr_DispInfo *info /* [out] [ref,switch_is(level)] */); +struct tevent_req *rpccli_samr_AddMultipleMembersToAlias_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_alias_handle /* [in] [ref] */, + struct lsa_SidArray *_sids /* [in] [ref] */); +NTSTATUS rpccli_samr_AddMultipleMembersToAlias_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_AddMultipleMembersToAlias(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *alias_handle /* [in] [ref] */, struct lsa_SidArray *sids /* [in] [ref] */); +struct tevent_req *rpccli_samr_RemoveMultipleMembersFromAlias_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_alias_handle /* [in] [ref] */, + struct lsa_SidArray *_sids /* [in] [ref] */); +NTSTATUS rpccli_samr_RemoveMultipleMembersFromAlias_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_RemoveMultipleMembersFromAlias(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *alias_handle /* [in] [ref] */, struct lsa_SidArray *sids /* [in] [ref] */); +struct tevent_req *rpccli_samr_OemChangePasswordUser2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct lsa_AsciiString *_server /* [in] [unique] */, + struct lsa_AsciiString *_account /* [in] [ref] */, + struct samr_CryptPassword *_password /* [in] [unique] */, + struct samr_Password *_hash /* [in] [unique] */); +NTSTATUS rpccli_samr_OemChangePasswordUser2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_OemChangePasswordUser2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct lsa_AsciiString *server /* [in] [unique] */, struct lsa_AsciiString *account /* [in] [ref] */, struct samr_CryptPassword *password /* [in] [unique] */, struct samr_Password *hash /* [in] [unique] */); +struct tevent_req *rpccli_samr_ChangePasswordUser2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct lsa_String *_server /* [in] [unique] */, + struct lsa_String *_account /* [in] [ref] */, + struct samr_CryptPassword *_nt_password /* [in] [unique] */, + struct samr_Password *_nt_verifier /* [in] [unique] */, + uint8_t _lm_change /* [in] */, + struct samr_CryptPassword *_lm_password /* [in] [unique] */, + struct samr_Password *_lm_verifier /* [in] [unique] */); +NTSTATUS rpccli_samr_ChangePasswordUser2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_ChangePasswordUser2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct lsa_String *server /* [in] [unique] */, @@ -314,42 +851,122 @@ NTSTATUS rpccli_samr_ChangePasswordUser2(struct rpc_pipe_client *cli, uint8_t lm_change /* [in] */, struct samr_CryptPassword *lm_password /* [in] [unique] */, struct samr_Password *lm_verifier /* [in] [unique] */); +struct tevent_req *rpccli_samr_GetDomPwInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct lsa_String *_domain_name /* [in] [unique] */, + struct samr_PwInfo *_info /* [out] [ref] */); +NTSTATUS rpccli_samr_GetDomPwInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_GetDomPwInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct lsa_String *domain_name /* [in] [unique] */, struct samr_PwInfo *info /* [out] [ref] */); +struct tevent_req *rpccli_samr_Connect2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_system_name /* [in] [unique,charset(UTF16)] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_connect_handle /* [out] [ref] */); +NTSTATUS rpccli_samr_Connect2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_Connect2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *system_name /* [in] [unique,charset(UTF16)] */, uint32_t access_mask /* [in] */, struct policy_handle *connect_handle /* [out] [ref] */); +struct tevent_req *rpccli_samr_SetUserInfo2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_user_handle /* [in] [ref] */, + enum samr_UserInfoLevel _level /* [in] */, + union samr_UserInfo *_info /* [in] [ref,switch_is(level)] */); +NTSTATUS rpccli_samr_SetUserInfo2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_SetUserInfo2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *user_handle /* [in] [ref] */, enum samr_UserInfoLevel level /* [in] */, union samr_UserInfo *info /* [in] [ref,switch_is(level)] */); +struct tevent_req *rpccli_samr_SetBootKeyInformation_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_connect_handle /* [in] [ref] */, + uint32_t _unknown1 /* [in] */, + uint32_t _unknown2 /* [in] */, + uint32_t _unknown3 /* [in] */); +NTSTATUS rpccli_samr_SetBootKeyInformation_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_SetBootKeyInformation(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *connect_handle /* [in] [ref] */, uint32_t unknown1 /* [in] */, uint32_t unknown2 /* [in] */, uint32_t unknown3 /* [in] */); +struct tevent_req *rpccli_samr_GetBootKeyInformation_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + uint32_t *_unknown /* [out] [ref] */); +NTSTATUS rpccli_samr_GetBootKeyInformation_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_GetBootKeyInformation(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, uint32_t *unknown /* [out] [ref] */); +struct tevent_req *rpccli_samr_Connect3_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_system_name /* [in] [unique,charset(UTF16)] */, + uint32_t _unknown /* [in] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_connect_handle /* [out] [ref] */); +NTSTATUS rpccli_samr_Connect3_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_Connect3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *system_name /* [in] [unique,charset(UTF16)] */, uint32_t unknown /* [in] */, uint32_t access_mask /* [in] */, struct policy_handle *connect_handle /* [out] [ref] */); +struct tevent_req *rpccli_samr_Connect4_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_system_name /* [in] [unique,charset(UTF16)] */, + enum samr_ConnectVersion _client_version /* [in] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_connect_handle /* [out] [ref] */); +NTSTATUS rpccli_samr_Connect4_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_Connect4(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *system_name /* [in] [unique,charset(UTF16)] */, enum samr_ConnectVersion client_version /* [in] */, uint32_t access_mask /* [in] */, struct policy_handle *connect_handle /* [out] [ref] */); +struct tevent_req *rpccli_samr_ChangePasswordUser3_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct lsa_String *_server /* [in] [unique] */, + struct lsa_String *_account /* [in] [ref] */, + struct samr_CryptPassword *_nt_password /* [in] [unique] */, + struct samr_Password *_nt_verifier /* [in] [unique] */, + uint8_t _lm_change /* [in] */, + struct samr_CryptPassword *_lm_password /* [in] [unique] */, + struct samr_Password *_lm_verifier /* [in] [unique] */, + struct samr_CryptPassword *_password3 /* [in] [unique] */, + struct samr_DomInfo1 **_dominfo /* [out] [ref] */, + struct samr_ChangeReject **_reject /* [out] [ref] */); +NTSTATUS rpccli_samr_ChangePasswordUser3_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_ChangePasswordUser3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct lsa_String *server /* [in] [unique] */, @@ -362,6 +979,19 @@ NTSTATUS rpccli_samr_ChangePasswordUser3(struct rpc_pipe_client *cli, struct samr_CryptPassword *password3 /* [in] [unique] */, struct samr_DomInfo1 **dominfo /* [out] [ref] */, struct samr_ChangeReject **reject /* [out] [ref] */); +struct tevent_req *rpccli_samr_Connect5_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_system_name /* [in] [unique,charset(UTF16)] */, + uint32_t _access_mask /* [in] */, + uint32_t _level_in /* [in] */, + union samr_ConnectInfo *_info_in /* [in] [ref,switch_is(level_in)] */, + uint32_t *_level_out /* [out] [ref] */, + union samr_ConnectInfo *_info_out /* [out] [ref,switch_is(*level_out)] */, + struct policy_handle *_connect_handle /* [out] [ref] */); +NTSTATUS rpccli_samr_Connect5_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_Connect5(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *system_name /* [in] [unique,charset(UTF16)] */, @@ -371,16 +1001,43 @@ NTSTATUS rpccli_samr_Connect5(struct rpc_pipe_client *cli, uint32_t *level_out /* [out] [ref] */, union samr_ConnectInfo *info_out /* [out] [ref,switch_is(*level_out)] */, struct policy_handle *connect_handle /* [out] [ref] */); +struct tevent_req *rpccli_samr_RidToSid_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_domain_handle /* [in] [ref] */, + uint32_t _rid /* [in] */, + struct dom_sid2 **_sid /* [out] [ref] */); +NTSTATUS rpccli_samr_RidToSid_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_RidToSid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *domain_handle /* [in] [ref] */, uint32_t rid /* [in] */, struct dom_sid2 **sid /* [out] [ref] */); +struct tevent_req *rpccli_samr_SetDsrmPassword_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct lsa_String *_name /* [in] [unique] */, + uint32_t _unknown /* [in] */, + struct samr_Password *_hash /* [in] [unique] */); +NTSTATUS rpccli_samr_SetDsrmPassword_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_SetDsrmPassword(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct lsa_String *name /* [in] [unique] */, uint32_t unknown /* [in] */, struct samr_Password *hash /* [in] [unique] */); +struct tevent_req *rpccli_samr_ValidatePassword_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + enum samr_ValidatePasswordLevel _level /* [in] */, + union samr_ValidatePasswordReq *_req /* [in] [ref,switch_is(level)] */, + union samr_ValidatePasswordRep **_rep /* [out] [ref,switch_is(level)] */); +NTSTATUS rpccli_samr_ValidatePassword_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + NTSTATUS *result); NTSTATUS rpccli_samr_ValidatePassword(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, enum samr_ValidatePasswordLevel level /* [in] */, diff --git a/librpc/gen_ndr/cli_spoolss.c b/librpc/gen_ndr/cli_spoolss.c index 38031b615d..21a7236c31 100644 --- a/librpc/gen_ndr/cli_spoolss.c +++ b/librpc/gen_ndr/cli_spoolss.c @@ -6,6 +6,141 @@ #include "includes.h" #include "../librpc/gen_ndr/cli_spoolss.h" +struct rpccli_spoolss_EnumPrinters_state { + struct spoolss_EnumPrinters orig; + struct spoolss_EnumPrinters tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_EnumPrinters_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_EnumPrinters_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint32_t _flags /* [in] */, + const char *_server /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + DATA_BLOB *_buffer /* [in] [unique] */, + uint32_t _offered /* [in] */, + uint32_t *_count /* [out] [ref] */, + union spoolss_PrinterInfo **_info /* [out] [ref,switch_is(level),size_is(,*count)] */, + uint32_t *_needed /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_EnumPrinters_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_EnumPrinters_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.flags = _flags; + state->orig.in.server = _server; + state->orig.in.level = _level; + state->orig.in.buffer = _buffer; + state->orig.in.offered = _offered; + + /* Out parameters */ + state->orig.out.count = _count; + state->orig.out.info = _info; + state->orig.out.needed = _needed; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_EnumPrinters, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_EnumPrinters_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_spoolss, + NDR_SPOOLSS_ENUMPRINTERS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_EnumPrinters_done, req); + return req; +} + +static void rpccli_spoolss_EnumPrinters_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_EnumPrinters_state *state = tevent_req_data( + req, struct rpccli_spoolss_EnumPrinters_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.count = *state->tmp.out.count; + *state->orig.out.info = *state->tmp.out.info; + *state->orig.out.needed = *state->tmp.out.needed; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinters, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_EnumPrinters_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_EnumPrinters_state *state = tevent_req_data( + req, struct rpccli_spoolss_EnumPrinters_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_spoolss_EnumPrinters(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t flags /* [in] */, @@ -63,6 +198,133 @@ NTSTATUS rpccli_spoolss_EnumPrinters(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_OpenPrinter_state { + struct spoolss_OpenPrinter orig; + struct spoolss_OpenPrinter tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_OpenPrinter_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_OpenPrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_printername /* [in] [unique,charset(UTF16)] */, + const char *_datatype /* [in] [unique,charset(UTF16)] */, + struct spoolss_DevmodeContainer _devmode_ctr /* [in] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_OpenPrinter_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_OpenPrinter_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.printername = _printername; + state->orig.in.datatype = _datatype; + state->orig.in.devmode_ctr = _devmode_ctr; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_OpenPrinter, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_OpenPrinter_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_spoolss, + NDR_SPOOLSS_OPENPRINTER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_OpenPrinter_done, req); + return req; +} + +static void rpccli_spoolss_OpenPrinter_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_OpenPrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_OpenPrinter_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_OpenPrinter, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_OpenPrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_OpenPrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_OpenPrinter_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_spoolss_OpenPrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *printername /* [in] [unique,charset(UTF16)] */, @@ -114,6 +376,124 @@ NTSTATUS rpccli_spoolss_OpenPrinter(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_SetJob_state { + struct spoolss_SetJob orig; + struct spoolss_SetJob tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_SetJob_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_SetJob_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _job_id /* [in] */, + struct spoolss_JobInfoContainer *_ctr /* [in] [unique] */, + enum spoolss_JobControl _command /* [in] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_SetJob_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_SetJob_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.job_id = _job_id; + state->orig.in.ctr = _ctr; + state->orig.in.command = _command; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_SetJob, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_SETJOB, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_SetJob_done, req); + return req; +} + +static void rpccli_spoolss_SetJob_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_SetJob_state *state = tevent_req_data( + req, struct rpccli_spoolss_SetJob_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_SetJob, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_SetJob_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_SetJob_state *state = tevent_req_data( + req, struct rpccli_spoolss_SetJob_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_spoolss_SetJob(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -163,6 +543,140 @@ NTSTATUS rpccli_spoolss_SetJob(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_GetJob_state { + struct spoolss_GetJob orig; + struct spoolss_GetJob tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_GetJob_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_GetJob_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _job_id /* [in] */, + uint32_t _level /* [in] */, + DATA_BLOB *_buffer /* [in] [unique] */, + uint32_t _offered /* [in] */, + union spoolss_JobInfo *_info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */, + uint32_t *_needed /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_GetJob_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_GetJob_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.job_id = _job_id; + state->orig.in.level = _level; + state->orig.in.buffer = _buffer; + state->orig.in.offered = _offered; + + /* Out parameters */ + state->orig.out.info = _info; + state->orig.out.needed = _needed; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_GetJob, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_GetJob_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_spoolss, + NDR_SPOOLSS_GETJOB, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_GetJob_done, req); + return req; +} + +static void rpccli_spoolss_GetJob_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_GetJob_state *state = tevent_req_data( + req, struct rpccli_spoolss_GetJob_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 */ + if (state->orig.out.info && state->tmp.out.info) { + *state->orig.out.info = *state->tmp.out.info; + } + *state->orig.out.needed = *state->tmp.out.needed; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_GetJob, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_GetJob_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_GetJob_state *state = tevent_req_data( + req, struct rpccli_spoolss_GetJob_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_spoolss_GetJob(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -220,6 +734,143 @@ NTSTATUS rpccli_spoolss_GetJob(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_EnumJobs_state { + struct spoolss_EnumJobs orig; + struct spoolss_EnumJobs tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_EnumJobs_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_EnumJobs_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _firstjob /* [in] */, + uint32_t _numjobs /* [in] */, + uint32_t _level /* [in] */, + DATA_BLOB *_buffer /* [in] [unique] */, + uint32_t _offered /* [in] */, + uint32_t *_count /* [out] [ref] */, + union spoolss_JobInfo **_info /* [out] [ref,switch_is(level),size_is(,*count)] */, + uint32_t *_needed /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_EnumJobs_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_EnumJobs_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.firstjob = _firstjob; + state->orig.in.numjobs = _numjobs; + state->orig.in.level = _level; + state->orig.in.buffer = _buffer; + state->orig.in.offered = _offered; + + /* Out parameters */ + state->orig.out.count = _count; + state->orig.out.info = _info; + state->orig.out.needed = _needed; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_EnumJobs, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_EnumJobs_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_spoolss, + NDR_SPOOLSS_ENUMJOBS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_EnumJobs_done, req); + return req; +} + +static void rpccli_spoolss_EnumJobs_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_EnumJobs_state *state = tevent_req_data( + req, struct rpccli_spoolss_EnumJobs_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.count = *state->tmp.out.count; + *state->orig.out.info = *state->tmp.out.info; + *state->orig.out.needed = *state->tmp.out.needed; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_EnumJobs, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_EnumJobs_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_EnumJobs_state *state = tevent_req_data( + req, struct rpccli_spoolss_EnumJobs_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_spoolss_EnumJobs(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -279,6 +930,133 @@ NTSTATUS rpccli_spoolss_EnumJobs(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_AddPrinter_state { + struct spoolss_AddPrinter orig; + struct spoolss_AddPrinter tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_AddPrinter_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_AddPrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server /* [in] [unique,charset(UTF16)] */, + struct spoolss_SetPrinterInfoCtr *_info_ctr /* [in] [ref] */, + struct spoolss_DevmodeContainer *_devmode_ctr /* [in] [ref] */, + struct sec_desc_buf *_secdesc_ctr /* [in] [ref] */, + struct policy_handle *_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_AddPrinter_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_AddPrinter_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server = _server; + state->orig.in.info_ctr = _info_ctr; + state->orig.in.devmode_ctr = _devmode_ctr; + state->orig.in.secdesc_ctr = _secdesc_ctr; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_AddPrinter, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_AddPrinter_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_spoolss, + NDR_SPOOLSS_ADDPRINTER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_AddPrinter_done, req); + return req; +} + +static void rpccli_spoolss_AddPrinter_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_AddPrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_AddPrinter_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_AddPrinter, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_AddPrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_AddPrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_AddPrinter_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_spoolss_AddPrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server /* [in] [unique,charset(UTF16)] */, @@ -330,6 +1108,118 @@ NTSTATUS rpccli_spoolss_AddPrinter(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_DeletePrinter_state { + struct spoolss_DeletePrinter orig; + struct spoolss_DeletePrinter tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_DeletePrinter_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_DeletePrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_DeletePrinter_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_DeletePrinter_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_DeletePrinter, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_DELETEPRINTER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_DeletePrinter_done, req); + return req; +} + +static void rpccli_spoolss_DeletePrinter_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_DeletePrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_DeletePrinter_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinter, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_DeletePrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_DeletePrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_DeletePrinter_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_spoolss_DeletePrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -373,6 +1263,126 @@ NTSTATUS rpccli_spoolss_DeletePrinter(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_SetPrinter_state { + struct spoolss_SetPrinter orig; + struct spoolss_SetPrinter tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_SetPrinter_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_SetPrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct spoolss_SetPrinterInfoCtr *_info_ctr /* [in] [ref] */, + struct spoolss_DevmodeContainer *_devmode_ctr /* [in] [ref] */, + struct sec_desc_buf *_secdesc_ctr /* [in] [ref] */, + enum spoolss_PrinterControl _command /* [in] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_SetPrinter_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_SetPrinter_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.info_ctr = _info_ctr; + state->orig.in.devmode_ctr = _devmode_ctr; + state->orig.in.secdesc_ctr = _secdesc_ctr; + state->orig.in.command = _command; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_SetPrinter, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_SETPRINTER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_SetPrinter_done, req); + return req; +} + +static void rpccli_spoolss_SetPrinter_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_SetPrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_SetPrinter_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_SetPrinter, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_SetPrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_SetPrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_SetPrinter_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_spoolss_SetPrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -424,6 +1434,138 @@ NTSTATUS rpccli_spoolss_SetPrinter(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_GetPrinter_state { + struct spoolss_GetPrinter orig; + struct spoolss_GetPrinter tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_GetPrinter_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_GetPrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _level /* [in] */, + DATA_BLOB *_buffer /* [in] [unique] */, + uint32_t _offered /* [in] */, + union spoolss_PrinterInfo *_info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */, + uint32_t *_needed /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_GetPrinter_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_GetPrinter_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.level = _level; + state->orig.in.buffer = _buffer; + state->orig.in.offered = _offered; + + /* Out parameters */ + state->orig.out.info = _info; + state->orig.out.needed = _needed; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_GetPrinter, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_GetPrinter_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_spoolss, + NDR_SPOOLSS_GETPRINTER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_GetPrinter_done, req); + return req; +} + +static void rpccli_spoolss_GetPrinter_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_GetPrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_GetPrinter_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 */ + if (state->orig.out.info && state->tmp.out.info) { + *state->orig.out.info = *state->tmp.out.info; + } + *state->orig.out.needed = *state->tmp.out.needed; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_GetPrinter, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_GetPrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_GetPrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_GetPrinter_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_spoolss_GetPrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -479,6 +1621,120 @@ NTSTATUS rpccli_spoolss_GetPrinter(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_AddPrinterDriver_state { + struct spoolss_AddPrinterDriver orig; + struct spoolss_AddPrinterDriver tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_AddPrinterDriver_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_AddPrinterDriver_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_servername /* [in] [unique,charset(UTF16)] */, + struct spoolss_AddDriverInfoCtr *_info_ctr /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_AddPrinterDriver_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_AddPrinterDriver_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.servername = _servername; + state->orig.in.info_ctr = _info_ctr; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriver, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_ADDPRINTERDRIVER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_AddPrinterDriver_done, req); + return req; +} + +static void rpccli_spoolss_AddPrinterDriver_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_AddPrinterDriver_state *state = tevent_req_data( + req, struct rpccli_spoolss_AddPrinterDriver_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriver, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_AddPrinterDriver_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_AddPrinterDriver_state *state = tevent_req_data( + req, struct rpccli_spoolss_AddPrinterDriver_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_spoolss_AddPrinterDriver(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername /* [in] [unique,charset(UTF16)] */, @@ -524,6 +1780,141 @@ NTSTATUS rpccli_spoolss_AddPrinterDriver(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_EnumPrinterDrivers_state { + struct spoolss_EnumPrinterDrivers orig; + struct spoolss_EnumPrinterDrivers tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_EnumPrinterDrivers_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_EnumPrinterDrivers_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server /* [in] [unique,charset(UTF16)] */, + const char *_environment /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + DATA_BLOB *_buffer /* [in] [unique] */, + uint32_t _offered /* [in] */, + uint32_t *_count /* [out] [ref] */, + union spoolss_DriverInfo **_info /* [out] [ref,switch_is(level),size_is(,*count)] */, + uint32_t *_needed /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_EnumPrinterDrivers_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_EnumPrinterDrivers_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server = _server; + state->orig.in.environment = _environment; + state->orig.in.level = _level; + state->orig.in.buffer = _buffer; + state->orig.in.offered = _offered; + + /* Out parameters */ + state->orig.out.count = _count; + state->orig.out.info = _info; + state->orig.out.needed = _needed; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDrivers, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_EnumPrinterDrivers_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_spoolss, + NDR_SPOOLSS_ENUMPRINTERDRIVERS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_EnumPrinterDrivers_done, req); + return req; +} + +static void rpccli_spoolss_EnumPrinterDrivers_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_EnumPrinterDrivers_state *state = tevent_req_data( + req, struct rpccli_spoolss_EnumPrinterDrivers_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.count = *state->tmp.out.count; + *state->orig.out.info = *state->tmp.out.info; + *state->orig.out.needed = *state->tmp.out.needed; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDrivers, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_EnumPrinterDrivers_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_EnumPrinterDrivers_state *state = tevent_req_data( + req, struct rpccli_spoolss_EnumPrinterDrivers_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_spoolss_EnumPrinterDrivers(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server /* [in] [unique,charset(UTF16)] */, @@ -581,6 +1972,140 @@ NTSTATUS rpccli_spoolss_EnumPrinterDrivers(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_GetPrinterDriver_state { + struct spoolss_GetPrinterDriver orig; + struct spoolss_GetPrinterDriver tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_GetPrinterDriver_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_GetPrinterDriver_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_architecture /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + DATA_BLOB *_buffer /* [in] [unique] */, + uint32_t _offered /* [in] */, + union spoolss_DriverInfo *_info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */, + uint32_t *_needed /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_GetPrinterDriver_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_GetPrinterDriver_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.architecture = _architecture; + state->orig.in.level = _level; + state->orig.in.buffer = _buffer; + state->orig.in.offered = _offered; + + /* Out parameters */ + state->orig.out.info = _info; + state->orig.out.needed = _needed; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_GetPrinterDriver_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_spoolss, + NDR_SPOOLSS_GETPRINTERDRIVER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_GetPrinterDriver_done, req); + return req; +} + +static void rpccli_spoolss_GetPrinterDriver_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_GetPrinterDriver_state *state = tevent_req_data( + req, struct rpccli_spoolss_GetPrinterDriver_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 */ + if (state->orig.out.info && state->tmp.out.info) { + *state->orig.out.info = *state->tmp.out.info; + } + *state->orig.out.needed = *state->tmp.out.needed; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_GetPrinterDriver_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_GetPrinterDriver_state *state = tevent_req_data( + req, struct rpccli_spoolss_GetPrinterDriver_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_spoolss_GetPrinterDriver(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -638,6 +2163,140 @@ NTSTATUS rpccli_spoolss_GetPrinterDriver(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_GetPrinterDriverDirectory_state { + struct spoolss_GetPrinterDriverDirectory orig; + struct spoolss_GetPrinterDriverDirectory tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_GetPrinterDriverDirectory_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_GetPrinterDriverDirectory_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server /* [in] [unique,charset(UTF16)] */, + const char *_environment /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + DATA_BLOB *_buffer /* [in] [unique] */, + uint32_t _offered /* [in] */, + union spoolss_DriverDirectoryInfo *_info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */, + uint32_t *_needed /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_GetPrinterDriverDirectory_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_GetPrinterDriverDirectory_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server = _server; + state->orig.in.environment = _environment; + state->orig.in.level = _level; + state->orig.in.buffer = _buffer; + state->orig.in.offered = _offered; + + /* Out parameters */ + state->orig.out.info = _info; + state->orig.out.needed = _needed; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriverDirectory, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_GetPrinterDriverDirectory_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_spoolss, + NDR_SPOOLSS_GETPRINTERDRIVERDIRECTORY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_GetPrinterDriverDirectory_done, req); + return req; +} + +static void rpccli_spoolss_GetPrinterDriverDirectory_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_GetPrinterDriverDirectory_state *state = tevent_req_data( + req, struct rpccli_spoolss_GetPrinterDriverDirectory_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 */ + if (state->orig.out.info && state->tmp.out.info) { + *state->orig.out.info = *state->tmp.out.info; + } + *state->orig.out.needed = *state->tmp.out.needed; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriverDirectory, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_GetPrinterDriverDirectory_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_GetPrinterDriverDirectory_state *state = tevent_req_data( + req, struct rpccli_spoolss_GetPrinterDriverDirectory_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_spoolss_GetPrinterDriverDirectory(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server /* [in] [unique,charset(UTF16)] */, @@ -695,6 +2354,122 @@ NTSTATUS rpccli_spoolss_GetPrinterDriverDirectory(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_DeletePrinterDriver_state { + struct spoolss_DeletePrinterDriver orig; + struct spoolss_DeletePrinterDriver tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_DeletePrinterDriver_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_DeletePrinterDriver_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server /* [in] [unique,charset(UTF16)] */, + const char *_architecture /* [in] [charset(UTF16)] */, + const char *_driver /* [in] [charset(UTF16)] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_DeletePrinterDriver_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_DeletePrinterDriver_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server = _server; + state->orig.in.architecture = _architecture; + state->orig.in.driver = _driver; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriver, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_DELETEPRINTERDRIVER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_DeletePrinterDriver_done, req); + return req; +} + +static void rpccli_spoolss_DeletePrinterDriver_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_DeletePrinterDriver_state *state = tevent_req_data( + req, struct rpccli_spoolss_DeletePrinterDriver_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriver, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_DeletePrinterDriver_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_DeletePrinterDriver_state *state = tevent_req_data( + req, struct rpccli_spoolss_DeletePrinterDriver_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_spoolss_DeletePrinterDriver(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server /* [in] [unique,charset(UTF16)] */, @@ -742,6 +2517,124 @@ NTSTATUS rpccli_spoolss_DeletePrinterDriver(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_AddPrintProcessor_state { + struct spoolss_AddPrintProcessor orig; + struct spoolss_AddPrintProcessor tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_AddPrintProcessor_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_AddPrintProcessor_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server /* [in] [unique,charset(UTF16)] */, + const char *_architecture /* [in] [charset(UTF16)] */, + const char *_path_name /* [in] [charset(UTF16)] */, + const char *_print_processor_name /* [in] [charset(UTF16)] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_AddPrintProcessor_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_AddPrintProcessor_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server = _server; + state->orig.in.architecture = _architecture; + state->orig.in.path_name = _path_name; + state->orig.in.print_processor_name = _print_processor_name; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_AddPrintProcessor, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_ADDPRINTPROCESSOR, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_AddPrintProcessor_done, req); + return req; +} + +static void rpccli_spoolss_AddPrintProcessor_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_AddPrintProcessor_state *state = tevent_req_data( + req, struct rpccli_spoolss_AddPrintProcessor_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProcessor, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_AddPrintProcessor_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_AddPrintProcessor_state *state = tevent_req_data( + req, struct rpccli_spoolss_AddPrintProcessor_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_spoolss_AddPrintProcessor(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server /* [in] [unique,charset(UTF16)] */, @@ -791,6 +2684,141 @@ NTSTATUS rpccli_spoolss_AddPrintProcessor(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_EnumPrintProcessors_state { + struct spoolss_EnumPrintProcessors orig; + struct spoolss_EnumPrintProcessors tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_EnumPrintProcessors_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_EnumPrintProcessors_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_servername /* [in] [unique,charset(UTF16)] */, + const char *_environment /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + DATA_BLOB *_buffer /* [in] [unique] */, + uint32_t _offered /* [in] */, + uint32_t *_count /* [out] [ref] */, + union spoolss_PrintProcessorInfo **_info /* [out] [ref,switch_is(level),size_is(,*count)] */, + uint32_t *_needed /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_EnumPrintProcessors_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_EnumPrintProcessors_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.servername = _servername; + state->orig.in.environment = _environment; + state->orig.in.level = _level; + state->orig.in.buffer = _buffer; + state->orig.in.offered = _offered; + + /* Out parameters */ + state->orig.out.count = _count; + state->orig.out.info = _info; + state->orig.out.needed = _needed; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcessors, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_EnumPrintProcessors_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_spoolss, + NDR_SPOOLSS_ENUMPRINTPROCESSORS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_EnumPrintProcessors_done, req); + return req; +} + +static void rpccli_spoolss_EnumPrintProcessors_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_EnumPrintProcessors_state *state = tevent_req_data( + req, struct rpccli_spoolss_EnumPrintProcessors_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.count = *state->tmp.out.count; + *state->orig.out.info = *state->tmp.out.info; + *state->orig.out.needed = *state->tmp.out.needed; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcessors, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_EnumPrintProcessors_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_EnumPrintProcessors_state *state = tevent_req_data( + req, struct rpccli_spoolss_EnumPrintProcessors_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_spoolss_EnumPrintProcessors(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername /* [in] [unique,charset(UTF16)] */, @@ -848,6 +2876,140 @@ NTSTATUS rpccli_spoolss_EnumPrintProcessors(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_GetPrintProcessorDirectory_state { + struct spoolss_GetPrintProcessorDirectory orig; + struct spoolss_GetPrintProcessorDirectory tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_GetPrintProcessorDirectory_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_GetPrintProcessorDirectory_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server /* [in] [unique,charset(UTF16)] */, + const char *_environment /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + DATA_BLOB *_buffer /* [in] [unique] */, + uint32_t _offered /* [in] */, + union spoolss_PrintProcessorDirectoryInfo *_info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */, + uint32_t *_needed /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_GetPrintProcessorDirectory_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_GetPrintProcessorDirectory_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server = _server; + state->orig.in.environment = _environment; + state->orig.in.level = _level; + state->orig.in.buffer = _buffer; + state->orig.in.offered = _offered; + + /* Out parameters */ + state->orig.out.info = _info; + state->orig.out.needed = _needed; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_GetPrintProcessorDirectory, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_GetPrintProcessorDirectory_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_spoolss, + NDR_SPOOLSS_GETPRINTPROCESSORDIRECTORY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_GetPrintProcessorDirectory_done, req); + return req; +} + +static void rpccli_spoolss_GetPrintProcessorDirectory_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_GetPrintProcessorDirectory_state *state = tevent_req_data( + req, struct rpccli_spoolss_GetPrintProcessorDirectory_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 */ + if (state->orig.out.info && state->tmp.out.info) { + *state->orig.out.info = *state->tmp.out.info; + } + *state->orig.out.needed = *state->tmp.out.needed; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_GetPrintProcessorDirectory, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_GetPrintProcessorDirectory_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_GetPrintProcessorDirectory_state *state = tevent_req_data( + req, struct rpccli_spoolss_GetPrintProcessorDirectory_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_spoolss_GetPrintProcessorDirectory(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server /* [in] [unique,charset(UTF16)] */, @@ -905,6 +3067,131 @@ NTSTATUS rpccli_spoolss_GetPrintProcessorDirectory(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_StartDocPrinter_state { + struct spoolss_StartDocPrinter orig; + struct spoolss_StartDocPrinter tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_StartDocPrinter_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_StartDocPrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _level /* [in] */, + union spoolss_DocumentInfo _info /* [in] [switch_is(level)] */, + uint32_t *_job_id /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_StartDocPrinter_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_StartDocPrinter_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.level = _level; + state->orig.in.info = _info; + + /* Out parameters */ + state->orig.out.job_id = _job_id; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_StartDocPrinter, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_StartDocPrinter_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_spoolss, + NDR_SPOOLSS_STARTDOCPRINTER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_StartDocPrinter_done, req); + return req; +} + +static void rpccli_spoolss_StartDocPrinter_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_StartDocPrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_StartDocPrinter_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.job_id = *state->tmp.out.job_id; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_StartDocPrinter, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_StartDocPrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_StartDocPrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_StartDocPrinter_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_spoolss_StartDocPrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -954,6 +3241,118 @@ NTSTATUS rpccli_spoolss_StartDocPrinter(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_StartPagePrinter_state { + struct spoolss_StartPagePrinter orig; + struct spoolss_StartPagePrinter tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_StartPagePrinter_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_StartPagePrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_StartPagePrinter_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_StartPagePrinter_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_StartPagePrinter, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_STARTPAGEPRINTER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_StartPagePrinter_done, req); + return req; +} + +static void rpccli_spoolss_StartPagePrinter_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_StartPagePrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_StartPagePrinter_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_StartPagePrinter, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_StartPagePrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_StartPagePrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_StartPagePrinter_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_spoolss_StartPagePrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -997,6 +3396,131 @@ NTSTATUS rpccli_spoolss_StartPagePrinter(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_WritePrinter_state { + struct spoolss_WritePrinter orig; + struct spoolss_WritePrinter tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_WritePrinter_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_WritePrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + DATA_BLOB _data /* [in] */, + uint32_t __data_size /* [in] [value(r->in.data.length)] */, + uint32_t *_num_written /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_WritePrinter_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_WritePrinter_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.data = _data; + state->orig.in._data_size = __data_size; + + /* Out parameters */ + state->orig.out.num_written = _num_written; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_WritePrinter, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_WritePrinter_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_spoolss, + NDR_SPOOLSS_WRITEPRINTER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_WritePrinter_done, req); + return req; +} + +static void rpccli_spoolss_WritePrinter_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_WritePrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_WritePrinter_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.num_written = *state->tmp.out.num_written; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_WritePrinter, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_WritePrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_WritePrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_WritePrinter_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_spoolss_WritePrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1046,6 +3570,118 @@ NTSTATUS rpccli_spoolss_WritePrinter(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_EndPagePrinter_state { + struct spoolss_EndPagePrinter orig; + struct spoolss_EndPagePrinter tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_EndPagePrinter_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_EndPagePrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_EndPagePrinter_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_EndPagePrinter_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_EndPagePrinter, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_ENDPAGEPRINTER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_EndPagePrinter_done, req); + return req; +} + +static void rpccli_spoolss_EndPagePrinter_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_EndPagePrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_EndPagePrinter_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_EndPagePrinter, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_EndPagePrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_EndPagePrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_EndPagePrinter_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_spoolss_EndPagePrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1089,6 +3725,118 @@ NTSTATUS rpccli_spoolss_EndPagePrinter(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_AbortPrinter_state { + struct spoolss_AbortPrinter orig; + struct spoolss_AbortPrinter tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_AbortPrinter_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_AbortPrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_AbortPrinter_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_AbortPrinter_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_AbortPrinter, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_ABORTPRINTER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_AbortPrinter_done, req); + return req; +} + +static void rpccli_spoolss_AbortPrinter_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_AbortPrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_AbortPrinter_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_AbortPrinter, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_AbortPrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_AbortPrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_AbortPrinter_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_spoolss_AbortPrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1132,6 +3880,132 @@ NTSTATUS rpccli_spoolss_AbortPrinter(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_ReadPrinter_state { + struct spoolss_ReadPrinter orig; + struct spoolss_ReadPrinter tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_ReadPrinter_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_ReadPrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint8_t *_data /* [out] [ref,size_is(data_size)] */, + uint32_t _data_size /* [in] */, + uint32_t *__data_size /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_ReadPrinter_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_ReadPrinter_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.data_size = _data_size; + + /* Out parameters */ + state->orig.out.data = _data; + state->orig.out._data_size = __data_size; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_ReadPrinter, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_ReadPrinter_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_spoolss, + NDR_SPOOLSS_READPRINTER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_ReadPrinter_done, req); + return req; +} + +static void rpccli_spoolss_ReadPrinter_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_ReadPrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_ReadPrinter_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 */ + memcpy(state->orig.out.data, state->tmp.out.data, state->tmp.in.data_size * sizeof(*state->orig.out.data)); + *state->orig.out._data_size = *state->tmp.out._data_size; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_ReadPrinter, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_ReadPrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_ReadPrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_ReadPrinter_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_spoolss_ReadPrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1181,6 +4055,118 @@ NTSTATUS rpccli_spoolss_ReadPrinter(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_EndDocPrinter_state { + struct spoolss_EndDocPrinter orig; + struct spoolss_EndDocPrinter tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_EndDocPrinter_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_EndDocPrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_EndDocPrinter_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_EndDocPrinter_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_EndDocPrinter, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_ENDDOCPRINTER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_EndDocPrinter_done, req); + return req; +} + +static void rpccli_spoolss_EndDocPrinter_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_EndDocPrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_EndDocPrinter_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_EndDocPrinter, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_EndDocPrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_EndDocPrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_EndDocPrinter_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_spoolss_EndDocPrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1224,6 +4210,137 @@ NTSTATUS rpccli_spoolss_EndDocPrinter(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_AddJob_state { + struct spoolss_AddJob orig; + struct spoolss_AddJob tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_AddJob_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_AddJob_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _level /* [in] */, + uint8_t *_buffer /* [in,out] [unique,size_is(offered)] */, + uint32_t _offered /* [in] */, + uint32_t *_needed /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_AddJob_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_AddJob_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.level = _level; + state->orig.in.buffer = _buffer; + state->orig.in.offered = _offered; + + /* Out parameters */ + state->orig.out.buffer = _buffer; + state->orig.out.needed = _needed; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_AddJob, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_AddJob_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_spoolss, + NDR_SPOOLSS_ADDJOB, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_AddJob_done, req); + return req; +} + +static void rpccli_spoolss_AddJob_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_AddJob_state *state = tevent_req_data( + req, struct rpccli_spoolss_AddJob_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 */ + if (state->orig.out.buffer && state->tmp.out.buffer) { + memcpy(state->orig.out.buffer, state->tmp.out.buffer, state->tmp.in.offered * sizeof(*state->orig.out.buffer)); + } + *state->orig.out.needed = *state->tmp.out.needed; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_AddJob, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_AddJob_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_AddJob_state *state = tevent_req_data( + req, struct rpccli_spoolss_AddJob_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_spoolss_AddJob(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1278,6 +4395,120 @@ NTSTATUS rpccli_spoolss_AddJob(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_ScheduleJob_state { + struct spoolss_ScheduleJob orig; + struct spoolss_ScheduleJob tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_ScheduleJob_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_ScheduleJob_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _jobid /* [in] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_ScheduleJob_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_ScheduleJob_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.jobid = _jobid; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_ScheduleJob, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_SCHEDULEJOB, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_ScheduleJob_done, req); + return req; +} + +static void rpccli_spoolss_ScheduleJob_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_ScheduleJob_state *state = tevent_req_data( + req, struct rpccli_spoolss_ScheduleJob_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_ScheduleJob, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_ScheduleJob_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_ScheduleJob_state *state = tevent_req_data( + req, struct rpccli_spoolss_ScheduleJob_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_spoolss_ScheduleJob(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1323,6 +4554,137 @@ NTSTATUS rpccli_spoolss_ScheduleJob(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_GetPrinterData_state { + struct spoolss_GetPrinterData orig; + struct spoolss_GetPrinterData tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_GetPrinterData_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_GetPrinterData_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_value_name /* [in] [charset(UTF16)] */, + uint32_t _offered /* [in] */, + enum winreg_Type *_type /* [out] [ref] */, + union spoolss_PrinterData *_data /* [out] [subcontext_size(offered),ref,subcontext(4),switch_is(*type)] */, + uint32_t *_needed /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_GetPrinterData_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_GetPrinterData_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.value_name = _value_name; + state->orig.in.offered = _offered; + + /* Out parameters */ + state->orig.out.type = _type; + state->orig.out.data = _data; + state->orig.out.needed = _needed; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_GetPrinterData, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_GetPrinterData_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_spoolss, + NDR_SPOOLSS_GETPRINTERDATA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_GetPrinterData_done, req); + return req; +} + +static void rpccli_spoolss_GetPrinterData_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_GetPrinterData_state *state = tevent_req_data( + req, struct rpccli_spoolss_GetPrinterData_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.data = *state->tmp.out.data; + *state->orig.out.needed = *state->tmp.out.needed; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterData, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_GetPrinterData_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_GetPrinterData_state *state = tevent_req_data( + req, struct rpccli_spoolss_GetPrinterData_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_spoolss_GetPrinterData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1376,6 +4738,126 @@ NTSTATUS rpccli_spoolss_GetPrinterData(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_SetPrinterData_state { + struct spoolss_SetPrinterData orig; + struct spoolss_SetPrinterData tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_SetPrinterData_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_SetPrinterData_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_value_name /* [in] [charset(UTF16)] */, + enum winreg_Type _type /* [in] */, + union spoolss_PrinterData _data /* [in] [subcontext(4),switch_is(type)] */, + uint32_t __offered /* [in] [value(ndr_size_spoolss_PrinterData(&data,type,ndr->iconv_convenience,flags))] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_SetPrinterData_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_SetPrinterData_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.value_name = _value_name; + state->orig.in.type = _type; + state->orig.in.data = _data; + state->orig.in._offered = __offered; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_SetPrinterData, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_SETPRINTERDATA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_SetPrinterData_done, req); + return req; +} + +static void rpccli_spoolss_SetPrinterData_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_SetPrinterData_state *state = tevent_req_data( + req, struct rpccli_spoolss_SetPrinterData_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterData, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_SetPrinterData_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_SetPrinterData_state *state = tevent_req_data( + req, struct rpccli_spoolss_SetPrinterData_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_spoolss_SetPrinterData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1427,6 +4909,116 @@ NTSTATUS rpccli_spoolss_SetPrinterData(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_WaitForPrinterChange_state { + struct spoolss_WaitForPrinterChange orig; + struct spoolss_WaitForPrinterChange tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_WaitForPrinterChange_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_WaitForPrinterChange_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_WaitForPrinterChange_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_WaitForPrinterChange_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_WaitForPrinterChange, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_WAITFORPRINTERCHANGE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_WaitForPrinterChange_done, req); + return req; +} + +static void rpccli_spoolss_WaitForPrinterChange_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_WaitForPrinterChange_state *state = tevent_req_data( + req, struct rpccli_spoolss_WaitForPrinterChange_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_WaitForPrinterChange, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_WaitForPrinterChange_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_WaitForPrinterChange_state *state = tevent_req_data( + req, struct rpccli_spoolss_WaitForPrinterChange_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_spoolss_WaitForPrinterChange(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1468,6 +5060,126 @@ NTSTATUS rpccli_spoolss_WaitForPrinterChange(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_ClosePrinter_state { + struct spoolss_ClosePrinter orig; + struct spoolss_ClosePrinter tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_ClosePrinter_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_ClosePrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in,out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_ClosePrinter_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_ClosePrinter_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_ClosePrinter, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_ClosePrinter_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_spoolss, + NDR_SPOOLSS_CLOSEPRINTER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_ClosePrinter_done, req); + return req; +} + +static void rpccli_spoolss_ClosePrinter_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_ClosePrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_ClosePrinter_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_ClosePrinter, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_ClosePrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_ClosePrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_ClosePrinter_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_spoolss_ClosePrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in,out] [ref] */, @@ -1512,6 +5224,122 @@ NTSTATUS rpccli_spoolss_ClosePrinter(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_AddForm_state { + struct spoolss_AddForm orig; + struct spoolss_AddForm tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_AddForm_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_AddForm_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _level /* [in] */, + union spoolss_AddFormInfo _info /* [in] [switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_AddForm_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_AddForm_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.level = _level; + state->orig.in.info = _info; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_AddForm, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_ADDFORM, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_AddForm_done, req); + return req; +} + +static void rpccli_spoolss_AddForm_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_AddForm_state *state = tevent_req_data( + req, struct rpccli_spoolss_AddForm_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_AddForm, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_AddForm_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_AddForm_state *state = tevent_req_data( + req, struct rpccli_spoolss_AddForm_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_spoolss_AddForm(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1559,6 +5387,120 @@ NTSTATUS rpccli_spoolss_AddForm(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_DeleteForm_state { + struct spoolss_DeleteForm orig; + struct spoolss_DeleteForm tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_DeleteForm_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_DeleteForm_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_form_name /* [in] [charset(UTF16)] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_DeleteForm_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_DeleteForm_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.form_name = _form_name; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_DeleteForm, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_DELETEFORM, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_DeleteForm_done, req); + return req; +} + +static void rpccli_spoolss_DeleteForm_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_DeleteForm_state *state = tevent_req_data( + req, struct rpccli_spoolss_DeleteForm_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_DeleteForm, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_DeleteForm_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_DeleteForm_state *state = tevent_req_data( + req, struct rpccli_spoolss_DeleteForm_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_spoolss_DeleteForm(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1604,6 +5546,140 @@ NTSTATUS rpccli_spoolss_DeleteForm(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_GetForm_state { + struct spoolss_GetForm orig; + struct spoolss_GetForm tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_GetForm_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_GetForm_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_form_name /* [in] [charset(UTF16)] */, + uint32_t _level /* [in] */, + DATA_BLOB *_buffer /* [in] [unique] */, + uint32_t _offered /* [in] */, + union spoolss_FormInfo *_info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */, + uint32_t *_needed /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_GetForm_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_GetForm_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.form_name = _form_name; + state->orig.in.level = _level; + state->orig.in.buffer = _buffer; + state->orig.in.offered = _offered; + + /* Out parameters */ + state->orig.out.info = _info; + state->orig.out.needed = _needed; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_GetForm, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_GetForm_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_spoolss, + NDR_SPOOLSS_GETFORM, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_GetForm_done, req); + return req; +} + +static void rpccli_spoolss_GetForm_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_GetForm_state *state = tevent_req_data( + req, struct rpccli_spoolss_GetForm_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 */ + if (state->orig.out.info && state->tmp.out.info) { + *state->orig.out.info = *state->tmp.out.info; + } + *state->orig.out.needed = *state->tmp.out.needed; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_GetForm, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_GetForm_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_GetForm_state *state = tevent_req_data( + req, struct rpccli_spoolss_GetForm_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_spoolss_GetForm(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1661,6 +5737,124 @@ NTSTATUS rpccli_spoolss_GetForm(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_SetForm_state { + struct spoolss_SetForm orig; + struct spoolss_SetForm tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_SetForm_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_SetForm_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_form_name /* [in] [charset(UTF16)] */, + uint32_t _level /* [in] */, + union spoolss_AddFormInfo _info /* [in] [switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_SetForm_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_SetForm_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.form_name = _form_name; + state->orig.in.level = _level; + state->orig.in.info = _info; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_SetForm, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_SETFORM, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_SetForm_done, req); + return req; +} + +static void rpccli_spoolss_SetForm_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_SetForm_state *state = tevent_req_data( + req, struct rpccli_spoolss_SetForm_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_SetForm, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_SetForm_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_SetForm_state *state = tevent_req_data( + req, struct rpccli_spoolss_SetForm_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_spoolss_SetForm(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1710,6 +5904,139 @@ NTSTATUS rpccli_spoolss_SetForm(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_EnumForms_state { + struct spoolss_EnumForms orig; + struct spoolss_EnumForms tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_EnumForms_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_EnumForms_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _level /* [in] */, + DATA_BLOB *_buffer /* [in] [unique] */, + uint32_t _offered /* [in] */, + uint32_t *_count /* [out] [ref] */, + union spoolss_FormInfo **_info /* [out] [ref,switch_is(level),size_is(,*count)] */, + uint32_t *_needed /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_EnumForms_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_EnumForms_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.level = _level; + state->orig.in.buffer = _buffer; + state->orig.in.offered = _offered; + + /* Out parameters */ + state->orig.out.count = _count; + state->orig.out.info = _info; + state->orig.out.needed = _needed; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_EnumForms, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_EnumForms_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_spoolss, + NDR_SPOOLSS_ENUMFORMS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_EnumForms_done, req); + return req; +} + +static void rpccli_spoolss_EnumForms_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_EnumForms_state *state = tevent_req_data( + req, struct rpccli_spoolss_EnumForms_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.count = *state->tmp.out.count; + *state->orig.out.info = *state->tmp.out.info; + *state->orig.out.needed = *state->tmp.out.needed; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_EnumForms, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_EnumForms_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_EnumForms_state *state = tevent_req_data( + req, struct rpccli_spoolss_EnumForms_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_spoolss_EnumForms(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1765,6 +6092,139 @@ NTSTATUS rpccli_spoolss_EnumForms(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_EnumPorts_state { + struct spoolss_EnumPorts orig; + struct spoolss_EnumPorts tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_EnumPorts_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_EnumPorts_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_servername /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + DATA_BLOB *_buffer /* [in] [unique] */, + uint32_t _offered /* [in] */, + uint32_t *_count /* [out] [ref] */, + union spoolss_PortInfo **_info /* [out] [ref,switch_is(level),size_is(,*count)] */, + uint32_t *_needed /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_EnumPorts_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_EnumPorts_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.servername = _servername; + state->orig.in.level = _level; + state->orig.in.buffer = _buffer; + state->orig.in.offered = _offered; + + /* Out parameters */ + state->orig.out.count = _count; + state->orig.out.info = _info; + state->orig.out.needed = _needed; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_EnumPorts, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_EnumPorts_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_spoolss, + NDR_SPOOLSS_ENUMPORTS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_EnumPorts_done, req); + return req; +} + +static void rpccli_spoolss_EnumPorts_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_EnumPorts_state *state = tevent_req_data( + req, struct rpccli_spoolss_EnumPorts_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.count = *state->tmp.out.count; + *state->orig.out.info = *state->tmp.out.info; + *state->orig.out.needed = *state->tmp.out.needed; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_EnumPorts, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_EnumPorts_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_EnumPorts_state *state = tevent_req_data( + req, struct rpccli_spoolss_EnumPorts_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_spoolss_EnumPorts(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername /* [in] [unique,charset(UTF16)] */, @@ -1820,6 +6280,139 @@ NTSTATUS rpccli_spoolss_EnumPorts(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_EnumMonitors_state { + struct spoolss_EnumMonitors orig; + struct spoolss_EnumMonitors tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_EnumMonitors_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_EnumMonitors_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_servername /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + DATA_BLOB *_buffer /* [in] [unique] */, + uint32_t _offered /* [in] */, + uint32_t *_count /* [out] [ref] */, + union spoolss_MonitorInfo **_info /* [out] [ref,switch_is(level),size_is(,*count)] */, + uint32_t *_needed /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_EnumMonitors_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_EnumMonitors_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.servername = _servername; + state->orig.in.level = _level; + state->orig.in.buffer = _buffer; + state->orig.in.offered = _offered; + + /* Out parameters */ + state->orig.out.count = _count; + state->orig.out.info = _info; + state->orig.out.needed = _needed; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_EnumMonitors, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_EnumMonitors_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_spoolss, + NDR_SPOOLSS_ENUMMONITORS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_EnumMonitors_done, req); + return req; +} + +static void rpccli_spoolss_EnumMonitors_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_EnumMonitors_state *state = tevent_req_data( + req, struct rpccli_spoolss_EnumMonitors_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.count = *state->tmp.out.count; + *state->orig.out.info = *state->tmp.out.info; + *state->orig.out.needed = *state->tmp.out.needed; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_EnumMonitors, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_EnumMonitors_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_EnumMonitors_state *state = tevent_req_data( + req, struct rpccli_spoolss_EnumMonitors_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_spoolss_EnumMonitors(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername /* [in] [unique,charset(UTF16)] */, @@ -1875,6 +6468,122 @@ NTSTATUS rpccli_spoolss_EnumMonitors(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_AddPort_state { + struct spoolss_AddPort orig; + struct spoolss_AddPort tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_AddPort_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_AddPort_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + uint32_t _unknown /* [in] */, + const char *_monitor_name /* [in] [charset(UTF16)] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_AddPort_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_AddPort_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.unknown = _unknown; + state->orig.in.monitor_name = _monitor_name; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_AddPort, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_ADDPORT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_AddPort_done, req); + return req; +} + +static void rpccli_spoolss_AddPort_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_AddPort_state *state = tevent_req_data( + req, struct rpccli_spoolss_AddPort_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_AddPort, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_AddPort_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_AddPort_state *state = tevent_req_data( + req, struct rpccli_spoolss_AddPort_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_spoolss_AddPort(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -1922,6 +6631,116 @@ NTSTATUS rpccli_spoolss_AddPort(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_ConfigurePort_state { + struct spoolss_ConfigurePort orig; + struct spoolss_ConfigurePort tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_ConfigurePort_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_ConfigurePort_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_ConfigurePort_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_ConfigurePort_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_ConfigurePort, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_CONFIGUREPORT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_ConfigurePort_done, req); + return req; +} + +static void rpccli_spoolss_ConfigurePort_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_ConfigurePort_state *state = tevent_req_data( + req, struct rpccli_spoolss_ConfigurePort_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_ConfigurePort, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_ConfigurePort_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_ConfigurePort_state *state = tevent_req_data( + req, struct rpccli_spoolss_ConfigurePort_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_spoolss_ConfigurePort(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1963,6 +6782,116 @@ NTSTATUS rpccli_spoolss_ConfigurePort(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_DeletePort_state { + struct spoolss_DeletePort orig; + struct spoolss_DeletePort tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_DeletePort_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_DeletePort_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_DeletePort_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_DeletePort_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_DeletePort, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_DELETEPORT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_DeletePort_done, req); + return req; +} + +static void rpccli_spoolss_DeletePort_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_DeletePort_state *state = tevent_req_data( + req, struct rpccli_spoolss_DeletePort_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_DeletePort, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_DeletePort_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_DeletePort_state *state = tevent_req_data( + req, struct rpccli_spoolss_DeletePort_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_spoolss_DeletePort(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2004,6 +6933,129 @@ NTSTATUS rpccli_spoolss_DeletePort(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_CreatePrinterIC_state { + struct spoolss_CreatePrinterIC orig; + struct spoolss_CreatePrinterIC tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_CreatePrinterIC_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_CreatePrinterIC_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct policy_handle *_gdi_handle /* [out] [ref] */, + struct spoolss_DevmodeContainer *_devmode_ctr /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_CreatePrinterIC_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_CreatePrinterIC_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.devmode_ctr = _devmode_ctr; + + /* Out parameters */ + state->orig.out.gdi_handle = _gdi_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_CreatePrinterIC, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_CreatePrinterIC_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_spoolss, + NDR_SPOOLSS_CREATEPRINTERIC, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_CreatePrinterIC_done, req); + return req; +} + +static void rpccli_spoolss_CreatePrinterIC_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_CreatePrinterIC_state *state = tevent_req_data( + req, struct rpccli_spoolss_CreatePrinterIC_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.gdi_handle = *state->tmp.out.gdi_handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_CreatePrinterIC, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_CreatePrinterIC_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_CreatePrinterIC_state *state = tevent_req_data( + req, struct rpccli_spoolss_CreatePrinterIC_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_spoolss_CreatePrinterIC(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -2051,6 +7103,116 @@ NTSTATUS rpccli_spoolss_CreatePrinterIC(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_PlayGDIScriptOnPrinterIC_state { + struct spoolss_PlayGDIScriptOnPrinterIC orig; + struct spoolss_PlayGDIScriptOnPrinterIC tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_PlayGDIScriptOnPrinterIC_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_PlayGDIScriptOnPrinterIC_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_PlayGDIScriptOnPrinterIC_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_PlayGDIScriptOnPrinterIC_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_PlayGDIScriptOnPrinterIC, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_PLAYGDISCRIPTONPRINTERIC, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_PlayGDIScriptOnPrinterIC_done, req); + return req; +} + +static void rpccli_spoolss_PlayGDIScriptOnPrinterIC_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_PlayGDIScriptOnPrinterIC_state *state = tevent_req_data( + req, struct rpccli_spoolss_PlayGDIScriptOnPrinterIC_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_PlayGDIScriptOnPrinterIC, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_PlayGDIScriptOnPrinterIC_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_PlayGDIScriptOnPrinterIC_state *state = tevent_req_data( + req, struct rpccli_spoolss_PlayGDIScriptOnPrinterIC_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_spoolss_PlayGDIScriptOnPrinterIC(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2092,6 +7254,126 @@ NTSTATUS rpccli_spoolss_PlayGDIScriptOnPrinterIC(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_DeletePrinterIC_state { + struct spoolss_DeletePrinterIC orig; + struct spoolss_DeletePrinterIC tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_DeletePrinterIC_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_DeletePrinterIC_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_gdi_handle /* [in,out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_DeletePrinterIC_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_DeletePrinterIC_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.gdi_handle = _gdi_handle; + + /* Out parameters */ + state->orig.out.gdi_handle = _gdi_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterIC, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_DeletePrinterIC_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_spoolss, + NDR_SPOOLSS_DELETEPRINTERIC, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_DeletePrinterIC_done, req); + return req; +} + +static void rpccli_spoolss_DeletePrinterIC_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_DeletePrinterIC_state *state = tevent_req_data( + req, struct rpccli_spoolss_DeletePrinterIC_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.gdi_handle = *state->tmp.out.gdi_handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterIC, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_DeletePrinterIC_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_DeletePrinterIC_state *state = tevent_req_data( + req, struct rpccli_spoolss_DeletePrinterIC_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_spoolss_DeletePrinterIC(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *gdi_handle /* [in,out] [ref] */, @@ -2136,6 +7418,116 @@ NTSTATUS rpccli_spoolss_DeletePrinterIC(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_AddPrinterConnection_state { + struct spoolss_AddPrinterConnection orig; + struct spoolss_AddPrinterConnection tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_AddPrinterConnection_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_AddPrinterConnection_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_AddPrinterConnection_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_AddPrinterConnection_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_AddPrinterConnection, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_ADDPRINTERCONNECTION, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_AddPrinterConnection_done, req); + return req; +} + +static void rpccli_spoolss_AddPrinterConnection_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_AddPrinterConnection_state *state = tevent_req_data( + req, struct rpccli_spoolss_AddPrinterConnection_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterConnection, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_AddPrinterConnection_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_AddPrinterConnection_state *state = tevent_req_data( + req, struct rpccli_spoolss_AddPrinterConnection_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_spoolss_AddPrinterConnection(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2177,6 +7569,116 @@ NTSTATUS rpccli_spoolss_AddPrinterConnection(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_DeletePrinterConnection_state { + struct spoolss_DeletePrinterConnection orig; + struct spoolss_DeletePrinterConnection tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_DeletePrinterConnection_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_DeletePrinterConnection_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_DeletePrinterConnection_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_DeletePrinterConnection_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterConnection, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_DELETEPRINTERCONNECTION, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_DeletePrinterConnection_done, req); + return req; +} + +static void rpccli_spoolss_DeletePrinterConnection_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_DeletePrinterConnection_state *state = tevent_req_data( + req, struct rpccli_spoolss_DeletePrinterConnection_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterConnection, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_DeletePrinterConnection_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_DeletePrinterConnection_state *state = tevent_req_data( + req, struct rpccli_spoolss_DeletePrinterConnection_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_spoolss_DeletePrinterConnection(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2218,6 +7720,116 @@ NTSTATUS rpccli_spoolss_DeletePrinterConnection(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_PrinterMessageBox_state { + struct spoolss_PrinterMessageBox orig; + struct spoolss_PrinterMessageBox tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_PrinterMessageBox_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_PrinterMessageBox_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_PrinterMessageBox_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_PrinterMessageBox_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_PrinterMessageBox, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_PRINTERMESSAGEBOX, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_PrinterMessageBox_done, req); + return req; +} + +static void rpccli_spoolss_PrinterMessageBox_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_PrinterMessageBox_state *state = tevent_req_data( + req, struct rpccli_spoolss_PrinterMessageBox_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_PrinterMessageBox, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_PrinterMessageBox_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_PrinterMessageBox_state *state = tevent_req_data( + req, struct rpccli_spoolss_PrinterMessageBox_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_spoolss_PrinterMessageBox(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2259,6 +7871,116 @@ NTSTATUS rpccli_spoolss_PrinterMessageBox(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_AddMonitor_state { + struct spoolss_AddMonitor orig; + struct spoolss_AddMonitor tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_AddMonitor_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_AddMonitor_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_AddMonitor_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_AddMonitor_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_AddMonitor, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_ADDMONITOR, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_AddMonitor_done, req); + return req; +} + +static void rpccli_spoolss_AddMonitor_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_AddMonitor_state *state = tevent_req_data( + req, struct rpccli_spoolss_AddMonitor_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_AddMonitor, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_AddMonitor_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_AddMonitor_state *state = tevent_req_data( + req, struct rpccli_spoolss_AddMonitor_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_spoolss_AddMonitor(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2300,6 +8022,116 @@ NTSTATUS rpccli_spoolss_AddMonitor(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_DeleteMonitor_state { + struct spoolss_DeleteMonitor orig; + struct spoolss_DeleteMonitor tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_DeleteMonitor_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_DeleteMonitor_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_DeleteMonitor_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_DeleteMonitor_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_DeleteMonitor, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_DELETEMONITOR, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_DeleteMonitor_done, req); + return req; +} + +static void rpccli_spoolss_DeleteMonitor_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_DeleteMonitor_state *state = tevent_req_data( + req, struct rpccli_spoolss_DeleteMonitor_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_DeleteMonitor, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_DeleteMonitor_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_DeleteMonitor_state *state = tevent_req_data( + req, struct rpccli_spoolss_DeleteMonitor_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_spoolss_DeleteMonitor(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2341,6 +8173,116 @@ NTSTATUS rpccli_spoolss_DeleteMonitor(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_DeletePrintProcessor_state { + struct spoolss_DeletePrintProcessor orig; + struct spoolss_DeletePrintProcessor tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_DeletePrintProcessor_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_DeletePrintProcessor_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_DeletePrintProcessor_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_DeletePrintProcessor_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProcessor, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_DELETEPRINTPROCESSOR, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_DeletePrintProcessor_done, req); + return req; +} + +static void rpccli_spoolss_DeletePrintProcessor_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_DeletePrintProcessor_state *state = tevent_req_data( + req, struct rpccli_spoolss_DeletePrintProcessor_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProcessor, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_DeletePrintProcessor_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_DeletePrintProcessor_state *state = tevent_req_data( + req, struct rpccli_spoolss_DeletePrintProcessor_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_spoolss_DeletePrintProcessor(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2382,6 +8324,116 @@ NTSTATUS rpccli_spoolss_DeletePrintProcessor(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_AddPrintProvidor_state { + struct spoolss_AddPrintProvidor orig; + struct spoolss_AddPrintProvidor tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_AddPrintProvidor_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_AddPrintProvidor_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_AddPrintProvidor_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_AddPrintProvidor_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_AddPrintProvidor, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_ADDPRINTPROVIDOR, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_AddPrintProvidor_done, req); + return req; +} + +static void rpccli_spoolss_AddPrintProvidor_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_AddPrintProvidor_state *state = tevent_req_data( + req, struct rpccli_spoolss_AddPrintProvidor_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_AddPrintProvidor, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_AddPrintProvidor_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_AddPrintProvidor_state *state = tevent_req_data( + req, struct rpccli_spoolss_AddPrintProvidor_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_spoolss_AddPrintProvidor(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2423,6 +8475,116 @@ NTSTATUS rpccli_spoolss_AddPrintProvidor(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_DeletePrintProvidor_state { + struct spoolss_DeletePrintProvidor orig; + struct spoolss_DeletePrintProvidor tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_DeletePrintProvidor_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_DeletePrintProvidor_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_DeletePrintProvidor_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_DeletePrintProvidor_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_DeletePrintProvidor, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_DELETEPRINTPROVIDOR, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_DeletePrintProvidor_done, req); + return req; +} + +static void rpccli_spoolss_DeletePrintProvidor_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_DeletePrintProvidor_state *state = tevent_req_data( + req, struct rpccli_spoolss_DeletePrintProvidor_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_DeletePrintProvidor, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_DeletePrintProvidor_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_DeletePrintProvidor_state *state = tevent_req_data( + req, struct rpccli_spoolss_DeletePrintProvidor_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_spoolss_DeletePrintProvidor(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2464,6 +8626,141 @@ NTSTATUS rpccli_spoolss_DeletePrintProvidor(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_EnumPrintProcDataTypes_state { + struct spoolss_EnumPrintProcDataTypes orig; + struct spoolss_EnumPrintProcDataTypes tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_EnumPrintProcDataTypes_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_EnumPrintProcDataTypes_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_servername /* [in] [unique,charset(UTF16)] */, + const char *_print_processor_name /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + DATA_BLOB *_buffer /* [in] [unique] */, + uint32_t _offered /* [in] */, + uint32_t *_count /* [out] [ref] */, + union spoolss_PrintProcDataTypesInfo **_info /* [out] [ref,switch_is(level),size_is(,*count)] */, + uint32_t *_needed /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_EnumPrintProcDataTypes_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_EnumPrintProcDataTypes_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.servername = _servername; + state->orig.in.print_processor_name = _print_processor_name; + state->orig.in.level = _level; + state->orig.in.buffer = _buffer; + state->orig.in.offered = _offered; + + /* Out parameters */ + state->orig.out.count = _count; + state->orig.out.info = _info; + state->orig.out.needed = _needed; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_EnumPrintProcDataTypes, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_EnumPrintProcDataTypes_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_spoolss, + NDR_SPOOLSS_ENUMPRINTPROCDATATYPES, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_EnumPrintProcDataTypes_done, req); + return req; +} + +static void rpccli_spoolss_EnumPrintProcDataTypes_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_EnumPrintProcDataTypes_state *state = tevent_req_data( + req, struct rpccli_spoolss_EnumPrintProcDataTypes_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.count = *state->tmp.out.count; + *state->orig.out.info = *state->tmp.out.info; + *state->orig.out.needed = *state->tmp.out.needed; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_EnumPrintProcDataTypes, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_EnumPrintProcDataTypes_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_EnumPrintProcDataTypes_state *state = tevent_req_data( + req, struct rpccli_spoolss_EnumPrintProcDataTypes_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_spoolss_EnumPrintProcDataTypes(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername /* [in] [unique,charset(UTF16)] */, @@ -2521,6 +8818,122 @@ NTSTATUS rpccli_spoolss_EnumPrintProcDataTypes(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_ResetPrinter_state { + struct spoolss_ResetPrinter orig; + struct spoolss_ResetPrinter tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_ResetPrinter_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_ResetPrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_data_type /* [in] [unique,charset(UTF16)] */, + struct spoolss_DevmodeContainer *_devmode_ctr /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_ResetPrinter_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_ResetPrinter_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.data_type = _data_type; + state->orig.in.devmode_ctr = _devmode_ctr; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_ResetPrinter, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_RESETPRINTER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_ResetPrinter_done, req); + return req; +} + +static void rpccli_spoolss_ResetPrinter_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_ResetPrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_ResetPrinter_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinter, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_ResetPrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_ResetPrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_ResetPrinter_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_spoolss_ResetPrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -2568,6 +8981,150 @@ NTSTATUS rpccli_spoolss_ResetPrinter(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_GetPrinterDriver2_state { + struct spoolss_GetPrinterDriver2 orig; + struct spoolss_GetPrinterDriver2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_GetPrinterDriver2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_GetPrinterDriver2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_architecture /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + DATA_BLOB *_buffer /* [in] [unique] */, + uint32_t _offered /* [in] */, + uint32_t _client_major_version /* [in] */, + uint32_t _client_minor_version /* [in] */, + union spoolss_DriverInfo *_info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */, + uint32_t *_needed /* [out] [ref] */, + uint32_t *_server_major_version /* [out] [ref] */, + uint32_t *_server_minor_version /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_GetPrinterDriver2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_GetPrinterDriver2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.architecture = _architecture; + state->orig.in.level = _level; + state->orig.in.buffer = _buffer; + state->orig.in.offered = _offered; + state->orig.in.client_major_version = _client_major_version; + state->orig.in.client_minor_version = _client_minor_version; + + /* Out parameters */ + state->orig.out.info = _info; + state->orig.out.needed = _needed; + state->orig.out.server_major_version = _server_major_version; + state->orig.out.server_minor_version = _server_minor_version; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDriver2, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_GetPrinterDriver2_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_spoolss, + NDR_SPOOLSS_GETPRINTERDRIVER2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_GetPrinterDriver2_done, req); + return req; +} + +static void rpccli_spoolss_GetPrinterDriver2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_GetPrinterDriver2_state *state = tevent_req_data( + req, struct rpccli_spoolss_GetPrinterDriver2_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 */ + if (state->orig.out.info && state->tmp.out.info) { + *state->orig.out.info = *state->tmp.out.info; + } + *state->orig.out.needed = *state->tmp.out.needed; + *state->orig.out.server_major_version = *state->tmp.out.server_major_version; + *state->orig.out.server_minor_version = *state->tmp.out.server_minor_version; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDriver2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_GetPrinterDriver2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_GetPrinterDriver2_state *state = tevent_req_data( + req, struct rpccli_spoolss_GetPrinterDriver2_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_spoolss_GetPrinterDriver2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -2633,6 +9190,116 @@ NTSTATUS rpccli_spoolss_GetPrinterDriver2(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_FindFirstPrinterChangeNotification_state { + struct spoolss_FindFirstPrinterChangeNotification orig; + struct spoolss_FindFirstPrinterChangeNotification tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_FindFirstPrinterChangeNotification_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_FindFirstPrinterChangeNotification_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_FindFirstPrinterChangeNotification_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_FindFirstPrinterChangeNotification_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_FindFirstPrinterChangeNotification, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_FINDFIRSTPRINTERCHANGENOTIFICATION, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_FindFirstPrinterChangeNotification_done, req); + return req; +} + +static void rpccli_spoolss_FindFirstPrinterChangeNotification_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_FindFirstPrinterChangeNotification_state *state = tevent_req_data( + req, struct rpccli_spoolss_FindFirstPrinterChangeNotification_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_FindFirstPrinterChangeNotification, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_FindFirstPrinterChangeNotification_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_FindFirstPrinterChangeNotification_state *state = tevent_req_data( + req, struct rpccli_spoolss_FindFirstPrinterChangeNotification_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_spoolss_FindFirstPrinterChangeNotification(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2674,6 +9341,116 @@ NTSTATUS rpccli_spoolss_FindFirstPrinterChangeNotification(struct rpc_pipe_clien return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_FindNextPrinterChangeNotification_state { + struct spoolss_FindNextPrinterChangeNotification orig; + struct spoolss_FindNextPrinterChangeNotification tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_FindNextPrinterChangeNotification_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_FindNextPrinterChangeNotification_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_FindNextPrinterChangeNotification_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_FindNextPrinterChangeNotification_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_FindNextPrinterChangeNotification, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_FINDNEXTPRINTERCHANGENOTIFICATION, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_FindNextPrinterChangeNotification_done, req); + return req; +} + +static void rpccli_spoolss_FindNextPrinterChangeNotification_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_FindNextPrinterChangeNotification_state *state = tevent_req_data( + req, struct rpccli_spoolss_FindNextPrinterChangeNotification_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_FindNextPrinterChangeNotification, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_FindNextPrinterChangeNotification_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_FindNextPrinterChangeNotification_state *state = tevent_req_data( + req, struct rpccli_spoolss_FindNextPrinterChangeNotification_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_spoolss_FindNextPrinterChangeNotification(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2715,6 +9492,118 @@ NTSTATUS rpccli_spoolss_FindNextPrinterChangeNotification(struct rpc_pipe_client return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_FindClosePrinterNotify_state { + struct spoolss_FindClosePrinterNotify orig; + struct spoolss_FindClosePrinterNotify tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_FindClosePrinterNotify_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_FindClosePrinterNotify_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_FindClosePrinterNotify_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_FindClosePrinterNotify_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_FindClosePrinterNotify, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_FINDCLOSEPRINTERNOTIFY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_FindClosePrinterNotify_done, req); + return req; +} + +static void rpccli_spoolss_FindClosePrinterNotify_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_FindClosePrinterNotify_state *state = tevent_req_data( + req, struct rpccli_spoolss_FindClosePrinterNotify_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_FindClosePrinterNotify, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_FindClosePrinterNotify_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_FindClosePrinterNotify_state *state = tevent_req_data( + req, struct rpccli_spoolss_FindClosePrinterNotify_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_spoolss_FindClosePrinterNotify(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -2758,6 +9647,116 @@ NTSTATUS rpccli_spoolss_FindClosePrinterNotify(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_RouterFindFirstPrinterChangeNotificationOld_state { + struct spoolss_RouterFindFirstPrinterChangeNotificationOld orig; + struct spoolss_RouterFindFirstPrinterChangeNotificationOld tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_RouterFindFirstPrinterChangeNotificationOld_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_RouterFindFirstPrinterChangeNotificationOld_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_RouterFindFirstPrinterChangeNotificationOld_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_RouterFindFirstPrinterChangeNotificationOld_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATIONOLD, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_RouterFindFirstPrinterChangeNotificationOld_done, req); + return req; +} + +static void rpccli_spoolss_RouterFindFirstPrinterChangeNotificationOld_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_RouterFindFirstPrinterChangeNotificationOld_state *state = tevent_req_data( + req, struct rpccli_spoolss_RouterFindFirstPrinterChangeNotificationOld_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotificationOld, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_RouterFindFirstPrinterChangeNotificationOld_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_RouterFindFirstPrinterChangeNotificationOld_state *state = tevent_req_data( + req, struct rpccli_spoolss_RouterFindFirstPrinterChangeNotificationOld_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_spoolss_RouterFindFirstPrinterChangeNotificationOld(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2799,6 +9798,135 @@ NTSTATUS rpccli_spoolss_RouterFindFirstPrinterChangeNotificationOld(struct rpc_p return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_ReplyOpenPrinter_state { + struct spoolss_ReplyOpenPrinter orig; + struct spoolss_ReplyOpenPrinter tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_ReplyOpenPrinter_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_ReplyOpenPrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [charset(UTF16)] */, + uint32_t _printer_local /* [in] */, + enum winreg_Type _type /* [in] */, + uint32_t _bufsize /* [in] [range(0,512)] */, + uint8_t *_buffer /* [in] [unique,size_is(bufsize)] */, + struct policy_handle *_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_ReplyOpenPrinter_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_ReplyOpenPrinter_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.printer_local = _printer_local; + state->orig.in.type = _type; + state->orig.in.bufsize = _bufsize; + state->orig.in.buffer = _buffer; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_ReplyOpenPrinter, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_ReplyOpenPrinter_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_spoolss, + NDR_SPOOLSS_REPLYOPENPRINTER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_ReplyOpenPrinter_done, req); + return req; +} + +static void rpccli_spoolss_ReplyOpenPrinter_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_ReplyOpenPrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_ReplyOpenPrinter_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_ReplyOpenPrinter, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_ReplyOpenPrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_ReplyOpenPrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_ReplyOpenPrinter_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_spoolss_ReplyOpenPrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [charset(UTF16)] */, @@ -2852,6 +9980,124 @@ NTSTATUS rpccli_spoolss_ReplyOpenPrinter(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_RouterReplyPrinter_state { + struct spoolss_RouterReplyPrinter orig; + struct spoolss_RouterReplyPrinter tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_RouterReplyPrinter_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_RouterReplyPrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _flags /* [in] */, + uint32_t _bufsize /* [in] [range(0,512)] */, + uint8_t *_buffer /* [in] [unique,size_is(bufsize)] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_RouterReplyPrinter_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_RouterReplyPrinter_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.flags = _flags; + state->orig.in.bufsize = _bufsize; + state->orig.in.buffer = _buffer; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinter, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_ROUTERREPLYPRINTER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_RouterReplyPrinter_done, req); + return req; +} + +static void rpccli_spoolss_RouterReplyPrinter_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_RouterReplyPrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_RouterReplyPrinter_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinter, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_RouterReplyPrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_RouterReplyPrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_RouterReplyPrinter_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_spoolss_RouterReplyPrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -2901,6 +10147,126 @@ NTSTATUS rpccli_spoolss_RouterReplyPrinter(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_ReplyClosePrinter_state { + struct spoolss_ReplyClosePrinter orig; + struct spoolss_ReplyClosePrinter tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_ReplyClosePrinter_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_ReplyClosePrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in,out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_ReplyClosePrinter_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_ReplyClosePrinter_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_ReplyClosePrinter, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_ReplyClosePrinter_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_spoolss, + NDR_SPOOLSS_REPLYCLOSEPRINTER, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_ReplyClosePrinter_done, req); + return req; +} + +static void rpccli_spoolss_ReplyClosePrinter_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_ReplyClosePrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_ReplyClosePrinter_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_ReplyClosePrinter, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_ReplyClosePrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_ReplyClosePrinter_state *state = tevent_req_data( + req, struct rpccli_spoolss_ReplyClosePrinter_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_spoolss_ReplyClosePrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in,out] [ref] */, @@ -2945,6 +10311,116 @@ NTSTATUS rpccli_spoolss_ReplyClosePrinter(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_AddPortEx_state { + struct spoolss_AddPortEx orig; + struct spoolss_AddPortEx tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_AddPortEx_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_AddPortEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_AddPortEx_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_AddPortEx_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_AddPortEx, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_ADDPORTEX, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_AddPortEx_done, req); + return req; +} + +static void rpccli_spoolss_AddPortEx_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_AddPortEx_state *state = tevent_req_data( + req, struct rpccli_spoolss_AddPortEx_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_AddPortEx, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_AddPortEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_AddPortEx_state *state = tevent_req_data( + req, struct rpccli_spoolss_AddPortEx_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_spoolss_AddPortEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2986,6 +10462,116 @@ NTSTATUS rpccli_spoolss_AddPortEx(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_RouterFindFirstPrinterChangeNotification_state { + struct spoolss_RouterFindFirstPrinterChangeNotification orig; + struct spoolss_RouterFindFirstPrinterChangeNotification tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_RouterFindFirstPrinterChangeNotification_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_RouterFindFirstPrinterChangeNotification_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_RouterFindFirstPrinterChangeNotification_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_RouterFindFirstPrinterChangeNotification_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_ROUTERFINDFIRSTPRINTERCHANGENOTIFICATION, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_RouterFindFirstPrinterChangeNotification_done, req); + return req; +} + +static void rpccli_spoolss_RouterFindFirstPrinterChangeNotification_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_RouterFindFirstPrinterChangeNotification_state *state = tevent_req_data( + req, struct rpccli_spoolss_RouterFindFirstPrinterChangeNotification_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_RouterFindFirstPrinterChangeNotification, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_RouterFindFirstPrinterChangeNotification_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_RouterFindFirstPrinterChangeNotification_state *state = tevent_req_data( + req, struct rpccli_spoolss_RouterFindFirstPrinterChangeNotification_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_spoolss_RouterFindFirstPrinterChangeNotification(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -3027,6 +10613,116 @@ NTSTATUS rpccli_spoolss_RouterFindFirstPrinterChangeNotification(struct rpc_pipe return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_SpoolerInit_state { + struct spoolss_SpoolerInit orig; + struct spoolss_SpoolerInit tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_SpoolerInit_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_SpoolerInit_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_SpoolerInit_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_SpoolerInit_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_SpoolerInit, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_SPOOLERINIT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_SpoolerInit_done, req); + return req; +} + +static void rpccli_spoolss_SpoolerInit_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_SpoolerInit_state *state = tevent_req_data( + req, struct rpccli_spoolss_SpoolerInit_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_SpoolerInit, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_SpoolerInit_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_SpoolerInit_state *state = tevent_req_data( + req, struct rpccli_spoolss_SpoolerInit_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_spoolss_SpoolerInit(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -3068,6 +10764,116 @@ NTSTATUS rpccli_spoolss_SpoolerInit(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_ResetPrinterEx_state { + struct spoolss_ResetPrinterEx orig; + struct spoolss_ResetPrinterEx tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_ResetPrinterEx_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_ResetPrinterEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_ResetPrinterEx_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_ResetPrinterEx_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_ResetPrinterEx, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_RESETPRINTEREX, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_ResetPrinterEx_done, req); + return req; +} + +static void rpccli_spoolss_ResetPrinterEx_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_ResetPrinterEx_state *state = tevent_req_data( + req, struct rpccli_spoolss_ResetPrinterEx_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_ResetPrinterEx, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_ResetPrinterEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_ResetPrinterEx_state *state = tevent_req_data( + req, struct rpccli_spoolss_ResetPrinterEx_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_spoolss_ResetPrinterEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -3109,6 +10915,128 @@ NTSTATUS rpccli_spoolss_ResetPrinterEx(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx_state { + struct spoolss_RemoteFindFirstPrinterChangeNotifyEx orig; + struct spoolss_RemoteFindFirstPrinterChangeNotifyEx tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _flags /* [in] */, + uint32_t _options /* [in] */, + const char *_local_machine /* [in] [unique,charset(UTF16)] */, + uint32_t _printer_local /* [in] */, + struct spoolss_NotifyOption *_notify_options /* [in] [unique] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.flags = _flags; + state->orig.in.options = _options; + state->orig.in.local_machine = _local_machine; + state->orig.in.printer_local = _printer_local; + state->orig.in.notify_options = _notify_options; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_REMOTEFINDFIRSTPRINTERCHANGENOTIFYEX, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx_done, req); + return req; +} + +static void rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx_state *state = tevent_req_data( + req, struct rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_RemoteFindFirstPrinterChangeNotifyEx, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx_state *state = tevent_req_data( + req, struct rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx_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_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -3162,6 +11090,135 @@ NTSTATUS rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct rpc_pipe_cli return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_RouterReplyPrinterEx_state { + struct spoolss_RouterReplyPrinterEx orig; + struct spoolss_RouterReplyPrinterEx tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_RouterReplyPrinterEx_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_RouterReplyPrinterEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _color /* [in] */, + uint32_t _flags /* [in] */, + uint32_t *_reply_result /* [out] [ref] */, + uint32_t _reply_type /* [in] */, + union spoolss_ReplyPrinterInfo _info /* [in] [switch_is(reply_type)] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_RouterReplyPrinterEx_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_RouterReplyPrinterEx_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.color = _color; + state->orig.in.flags = _flags; + state->orig.in.reply_type = _reply_type; + state->orig.in.info = _info; + + /* Out parameters */ + state->orig.out.reply_result = _reply_result; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_RouterReplyPrinterEx, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_RouterReplyPrinterEx_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_spoolss, + NDR_SPOOLSS_ROUTERREPLYPRINTEREX, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_RouterReplyPrinterEx_done, req); + return req; +} + +static void rpccli_spoolss_RouterReplyPrinterEx_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_RouterReplyPrinterEx_state *state = tevent_req_data( + req, struct rpccli_spoolss_RouterReplyPrinterEx_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.reply_result = *state->tmp.out.reply_result; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_RouterReplyPrinterEx, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_RouterReplyPrinterEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_RouterReplyPrinterEx_state *state = tevent_req_data( + req, struct rpccli_spoolss_RouterReplyPrinterEx_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_spoolss_RouterReplyPrinterEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -3215,6 +11272,131 @@ NTSTATUS rpccli_spoolss_RouterReplyPrinterEx(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_RouterRefreshPrinterChangeNotify_state { + struct spoolss_RouterRefreshPrinterChangeNotify orig; + struct spoolss_RouterRefreshPrinterChangeNotify tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_RouterRefreshPrinterChangeNotify_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_RouterRefreshPrinterChangeNotify_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _change_low /* [in] */, + struct spoolss_NotifyOption *_options /* [in] [unique] */, + struct spoolss_NotifyInfo **_info /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_RouterRefreshPrinterChangeNotify_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_RouterRefreshPrinterChangeNotify_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.change_low = _change_low; + state->orig.in.options = _options; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_RouterRefreshPrinterChangeNotify, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_RouterRefreshPrinterChangeNotify_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_spoolss, + NDR_SPOOLSS_ROUTERREFRESHPRINTERCHANGENOTIFY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_RouterRefreshPrinterChangeNotify_done, req); + return req; +} + +static void rpccli_spoolss_RouterRefreshPrinterChangeNotify_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_RouterRefreshPrinterChangeNotify_state *state = tevent_req_data( + req, struct rpccli_spoolss_RouterRefreshPrinterChangeNotify_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(spoolss_RouterRefreshPrinterChangeNotify, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_RouterRefreshPrinterChangeNotify_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_RouterRefreshPrinterChangeNotify_state *state = tevent_req_data( + req, struct rpccli_spoolss_RouterRefreshPrinterChangeNotify_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_spoolss_RouterRefreshPrinterChangeNotify(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -3264,6 +11446,116 @@ NTSTATUS rpccli_spoolss_RouterRefreshPrinterChangeNotify(struct rpc_pipe_client return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_44_state { + struct spoolss_44 orig; + struct spoolss_44 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_44_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_44_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_44_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_44_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_44, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_44, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_44_done, req); + return req; +} + +static void rpccli_spoolss_44_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_44_state *state = tevent_req_data( + req, struct rpccli_spoolss_44_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_44, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_44_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_44_state *state = tevent_req_data( + req, struct rpccli_spoolss_44_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_spoolss_44(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -3305,6 +11597,137 @@ NTSTATUS rpccli_spoolss_44(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_OpenPrinterEx_state { + struct spoolss_OpenPrinterEx orig; + struct spoolss_OpenPrinterEx tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_OpenPrinterEx_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_OpenPrinterEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_printername /* [in] [unique,charset(UTF16)] */, + const char *_datatype /* [in] [unique,charset(UTF16)] */, + struct spoolss_DevmodeContainer _devmode_ctr /* [in] */, + uint32_t _access_mask /* [in] */, + uint32_t _level /* [in] */, + union spoolss_UserLevel _userlevel /* [in] [switch_is(level)] */, + struct policy_handle *_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_OpenPrinterEx_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_OpenPrinterEx_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.printername = _printername; + state->orig.in.datatype = _datatype; + state->orig.in.devmode_ctr = _devmode_ctr; + state->orig.in.access_mask = _access_mask; + state->orig.in.level = _level; + state->orig.in.userlevel = _userlevel; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_OpenPrinterEx, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_OpenPrinterEx_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_spoolss, + NDR_SPOOLSS_OPENPRINTEREX, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_OpenPrinterEx_done, req); + return req; +} + +static void rpccli_spoolss_OpenPrinterEx_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_OpenPrinterEx_state *state = tevent_req_data( + req, struct rpccli_spoolss_OpenPrinterEx_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_OpenPrinterEx, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_OpenPrinterEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_OpenPrinterEx_state *state = tevent_req_data( + req, struct rpccli_spoolss_OpenPrinterEx_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_spoolss_OpenPrinterEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *printername /* [in] [unique,charset(UTF16)] */, @@ -3360,6 +11783,135 @@ NTSTATUS rpccli_spoolss_OpenPrinterEx(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_AddPrinterEx_state { + struct spoolss_AddPrinterEx orig; + struct spoolss_AddPrinterEx tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_AddPrinterEx_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_AddPrinterEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server /* [in] [unique,charset(UTF16)] */, + struct spoolss_SetPrinterInfoCtr *_info_ctr /* [in] [ref] */, + struct spoolss_DevmodeContainer *_devmode_ctr /* [in] [ref] */, + struct sec_desc_buf *_secdesc_ctr /* [in] [ref] */, + struct spoolss_UserLevelCtr *_userlevel_ctr /* [in] [ref] */, + struct policy_handle *_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_AddPrinterEx_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_AddPrinterEx_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server = _server; + state->orig.in.info_ctr = _info_ctr; + state->orig.in.devmode_ctr = _devmode_ctr; + state->orig.in.secdesc_ctr = _secdesc_ctr; + state->orig.in.userlevel_ctr = _userlevel_ctr; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_AddPrinterEx, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_AddPrinterEx_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_spoolss, + NDR_SPOOLSS_ADDPRINTEREX, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_AddPrinterEx_done, req); + return req; +} + +static void rpccli_spoolss_AddPrinterEx_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_AddPrinterEx_state *state = tevent_req_data( + req, struct rpccli_spoolss_AddPrinterEx_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterEx, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_AddPrinterEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_AddPrinterEx_state *state = tevent_req_data( + req, struct rpccli_spoolss_AddPrinterEx_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_spoolss_AddPrinterEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server /* [in] [unique,charset(UTF16)] */, @@ -3413,6 +11965,116 @@ NTSTATUS rpccli_spoolss_AddPrinterEx(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_47_state { + struct spoolss_47 orig; + struct spoolss_47 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_47_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_47_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_47_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_47_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_47, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_47, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_47_done, req); + return req; +} + +static void rpccli_spoolss_47_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_47_state *state = tevent_req_data( + req, struct rpccli_spoolss_47_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_47, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_47_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_47_state *state = tevent_req_data( + req, struct rpccli_spoolss_47_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_spoolss_47(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -3454,6 +12116,145 @@ NTSTATUS rpccli_spoolss_47(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_EnumPrinterData_state { + struct spoolss_EnumPrinterData orig; + struct spoolss_EnumPrinterData tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_EnumPrinterData_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_EnumPrinterData_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _enum_index /* [in] */, + const char *_value_name /* [out] [charset(UTF16),size_is(value_offered/2)] */, + uint32_t _value_offered /* [in] */, + uint32_t *_value_needed /* [out] [ref] */, + enum winreg_Type *_type /* [out] [ref] */, + uint8_t *_data /* [out] [ref,flag(LIBNDR_PRINT_ARRAY_HEX),size_is(data_offered)] */, + uint32_t _data_offered /* [in] */, + uint32_t *_data_needed /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_EnumPrinterData_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_EnumPrinterData_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.enum_index = _enum_index; + state->orig.in.value_offered = _value_offered; + state->orig.in.data_offered = _data_offered; + + /* Out parameters */ + state->orig.out.value_name = _value_name; + state->orig.out.value_needed = _value_needed; + state->orig.out.type = _type; + state->orig.out.data = _data; + state->orig.out.data_needed = _data_needed; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterData, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_EnumPrinterData_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_spoolss, + NDR_SPOOLSS_ENUMPRINTERDATA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_EnumPrinterData_done, req); + return req; +} + +static void rpccli_spoolss_EnumPrinterData_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_EnumPrinterData_state *state = tevent_req_data( + req, struct rpccli_spoolss_EnumPrinterData_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 */ + memcpy(CONST_DISCARD(char *, state->orig.out.value_name), state->tmp.out.value_name, state->tmp.in.value_offered / 2 * sizeof(*state->orig.out.value_name)); + *state->orig.out.value_needed = *state->tmp.out.value_needed; + *state->orig.out.type = *state->tmp.out.type; + memcpy(state->orig.out.data, state->tmp.out.data, state->tmp.in.data_offered * sizeof(*state->orig.out.data)); + *state->orig.out.data_needed = *state->tmp.out.data_needed; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterData, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_EnumPrinterData_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_EnumPrinterData_state *state = tevent_req_data( + req, struct rpccli_spoolss_EnumPrinterData_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_spoolss_EnumPrinterData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -3513,6 +12314,120 @@ NTSTATUS rpccli_spoolss_EnumPrinterData(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_DeletePrinterData_state { + struct spoolss_DeletePrinterData orig; + struct spoolss_DeletePrinterData tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_DeletePrinterData_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_DeletePrinterData_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_value_name /* [in] [charset(UTF16)] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_DeletePrinterData_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_DeletePrinterData_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.value_name = _value_name; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterData, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_DELETEPRINTERDATA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_DeletePrinterData_done, req); + return req; +} + +static void rpccli_spoolss_DeletePrinterData_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_DeletePrinterData_state *state = tevent_req_data( + req, struct rpccli_spoolss_DeletePrinterData_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterData, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_DeletePrinterData_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_DeletePrinterData_state *state = tevent_req_data( + req, struct rpccli_spoolss_DeletePrinterData_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_spoolss_DeletePrinterData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -3558,6 +12473,116 @@ NTSTATUS rpccli_spoolss_DeletePrinterData(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_4a_state { + struct spoolss_4a orig; + struct spoolss_4a tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_4a_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_4a_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_4a_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_4a_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_4a, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_4A, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_4a_done, req); + return req; +} + +static void rpccli_spoolss_4a_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_4a_state *state = tevent_req_data( + req, struct rpccli_spoolss_4a_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_4a, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_4a_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_4a_state *state = tevent_req_data( + req, struct rpccli_spoolss_4a_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_spoolss_4a(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -3599,6 +12624,116 @@ NTSTATUS rpccli_spoolss_4a(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_4b_state { + struct spoolss_4b orig; + struct spoolss_4b tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_4b_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_4b_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_4b_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_4b_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_4b, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_4B, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_4b_done, req); + return req; +} + +static void rpccli_spoolss_4b_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_4b_state *state = tevent_req_data( + req, struct rpccli_spoolss_4b_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_4b, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_4b_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_4b_state *state = tevent_req_data( + req, struct rpccli_spoolss_4b_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_spoolss_4b(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -3640,6 +12775,116 @@ NTSTATUS rpccli_spoolss_4b(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_4c_state { + struct spoolss_4c orig; + struct spoolss_4c tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_4c_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_4c_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_4c_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_4c_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_4c, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_4C, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_4c_done, req); + return req; +} + +static void rpccli_spoolss_4c_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_4c_state *state = tevent_req_data( + req, struct rpccli_spoolss_4c_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_4c, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_4c_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_4c_state *state = tevent_req_data( + req, struct rpccli_spoolss_4c_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_spoolss_4c(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -3681,6 +12926,128 @@ NTSTATUS rpccli_spoolss_4c(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_SetPrinterDataEx_state { + struct spoolss_SetPrinterDataEx orig; + struct spoolss_SetPrinterDataEx tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_SetPrinterDataEx_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_SetPrinterDataEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_key_name /* [in] [charset(UTF16)] */, + const char *_value_name /* [in] [charset(UTF16)] */, + enum winreg_Type _type /* [in] */, + uint8_t *_buffer /* [in] [ref,size_is(offered)] */, + uint32_t _offered /* [in] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_SetPrinterDataEx_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_SetPrinterDataEx_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.key_name = _key_name; + state->orig.in.value_name = _value_name; + state->orig.in.type = _type; + state->orig.in.buffer = _buffer; + state->orig.in.offered = _offered; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_SetPrinterDataEx, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_SETPRINTERDATAEX, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_SetPrinterDataEx_done, req); + return req; +} + +static void rpccli_spoolss_SetPrinterDataEx_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_SetPrinterDataEx_state *state = tevent_req_data( + req, struct rpccli_spoolss_SetPrinterDataEx_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_SetPrinterDataEx, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_SetPrinterDataEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_SetPrinterDataEx_state *state = tevent_req_data( + req, struct rpccli_spoolss_SetPrinterDataEx_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_spoolss_SetPrinterDataEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -3734,6 +13101,139 @@ NTSTATUS rpccli_spoolss_SetPrinterDataEx(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_GetPrinterDataEx_state { + struct spoolss_GetPrinterDataEx orig; + struct spoolss_GetPrinterDataEx tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_GetPrinterDataEx_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_GetPrinterDataEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_key_name /* [in] [charset(UTF16)] */, + const char *_value_name /* [in] [charset(UTF16)] */, + enum winreg_Type *_type /* [out] [ref] */, + uint8_t *_buffer /* [out] [ref,size_is(offered)] */, + uint32_t _offered /* [in] */, + uint32_t *_needed /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_GetPrinterDataEx_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_GetPrinterDataEx_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.key_name = _key_name; + state->orig.in.value_name = _value_name; + state->orig.in.offered = _offered; + + /* Out parameters */ + state->orig.out.type = _type; + state->orig.out.buffer = _buffer; + state->orig.out.needed = _needed; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_GetPrinterDataEx, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_GetPrinterDataEx_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_spoolss, + NDR_SPOOLSS_GETPRINTERDATAEX, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_GetPrinterDataEx_done, req); + return req; +} + +static void rpccli_spoolss_GetPrinterDataEx_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_GetPrinterDataEx_state *state = tevent_req_data( + req, struct rpccli_spoolss_GetPrinterDataEx_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; + memcpy(state->orig.out.buffer, state->tmp.out.buffer, state->tmp.in.offered * sizeof(*state->orig.out.buffer)); + *state->orig.out.needed = *state->tmp.out.needed; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_GetPrinterDataEx, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_GetPrinterDataEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_GetPrinterDataEx_state *state = tevent_req_data( + req, struct rpccli_spoolss_GetPrinterDataEx_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_spoolss_GetPrinterDataEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -3789,6 +13289,137 @@ NTSTATUS rpccli_spoolss_GetPrinterDataEx(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_EnumPrinterDataEx_state { + struct spoolss_EnumPrinterDataEx orig; + struct spoolss_EnumPrinterDataEx tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_EnumPrinterDataEx_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_EnumPrinterDataEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_key_name /* [in] [charset(UTF16)] */, + uint32_t _offered /* [in] */, + uint32_t *_count /* [out] [ref] */, + struct spoolss_PrinterEnumValues **_info /* [out] [ref,size_is(,*count)] */, + uint32_t *_needed /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_EnumPrinterDataEx_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_EnumPrinterDataEx_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.key_name = _key_name; + state->orig.in.offered = _offered; + + /* Out parameters */ + state->orig.out.count = _count; + state->orig.out.info = _info; + state->orig.out.needed = _needed; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterDataEx, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_EnumPrinterDataEx_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_spoolss, + NDR_SPOOLSS_ENUMPRINTERDATAEX, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_EnumPrinterDataEx_done, req); + return req; +} + +static void rpccli_spoolss_EnumPrinterDataEx_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_EnumPrinterDataEx_state *state = tevent_req_data( + req, struct rpccli_spoolss_EnumPrinterDataEx_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.count = *state->tmp.out.count; + *state->orig.out.info = *state->tmp.out.info; + *state->orig.out.needed = *state->tmp.out.needed; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterDataEx, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_EnumPrinterDataEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_EnumPrinterDataEx_state *state = tevent_req_data( + req, struct rpccli_spoolss_EnumPrinterDataEx_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_spoolss_EnumPrinterDataEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -3842,6 +13473,134 @@ NTSTATUS rpccli_spoolss_EnumPrinterDataEx(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_EnumPrinterKey_state { + struct spoolss_EnumPrinterKey orig; + struct spoolss_EnumPrinterKey tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_EnumPrinterKey_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_EnumPrinterKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_key_name /* [in] [charset(UTF16)] */, + const char ** *_key_buffer /* [out] [subcontext_size(offered),ref,subcontext(0),flag(LIBNDR_FLAG_STR_NULLTERM)] */, + uint32_t _offered /* [in] */, + uint32_t *_needed /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_EnumPrinterKey_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_EnumPrinterKey_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.key_name = _key_name; + state->orig.in.offered = _offered; + + /* Out parameters */ + state->orig.out.key_buffer = _key_buffer; + state->orig.out.needed = _needed; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_EnumPrinterKey, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_EnumPrinterKey_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_spoolss, + NDR_SPOOLSS_ENUMPRINTERKEY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_EnumPrinterKey_done, req); + return req; +} + +static void rpccli_spoolss_EnumPrinterKey_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_EnumPrinterKey_state *state = tevent_req_data( + req, struct rpccli_spoolss_EnumPrinterKey_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.key_buffer = *state->tmp.out.key_buffer; + *state->orig.out.needed = *state->tmp.out.needed; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_EnumPrinterKey, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_EnumPrinterKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_EnumPrinterKey_state *state = tevent_req_data( + req, struct rpccli_spoolss_EnumPrinterKey_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_spoolss_EnumPrinterKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -3893,6 +13652,122 @@ NTSTATUS rpccli_spoolss_EnumPrinterKey(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_DeletePrinterDataEx_state { + struct spoolss_DeletePrinterDataEx orig; + struct spoolss_DeletePrinterDataEx tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_DeletePrinterDataEx_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_DeletePrinterDataEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_key_name /* [in] [charset(UTF16)] */, + const char *_value_name /* [in] [charset(UTF16)] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_DeletePrinterDataEx_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_DeletePrinterDataEx_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.key_name = _key_name; + state->orig.in.value_name = _value_name; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDataEx, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_DELETEPRINTERDATAEX, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_DeletePrinterDataEx_done, req); + return req; +} + +static void rpccli_spoolss_DeletePrinterDataEx_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_DeletePrinterDataEx_state *state = tevent_req_data( + req, struct rpccli_spoolss_DeletePrinterDataEx_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDataEx, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_DeletePrinterDataEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_DeletePrinterDataEx_state *state = tevent_req_data( + req, struct rpccli_spoolss_DeletePrinterDataEx_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_spoolss_DeletePrinterDataEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -3940,6 +13815,120 @@ NTSTATUS rpccli_spoolss_DeletePrinterDataEx(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_DeletePrinterKey_state { + struct spoolss_DeletePrinterKey orig; + struct spoolss_DeletePrinterKey tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_DeletePrinterKey_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_DeletePrinterKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_key_name /* [in] [charset(UTF16)] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_DeletePrinterKey_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_DeletePrinterKey_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.key_name = _key_name; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterKey, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_DELETEPRINTERKEY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_DeletePrinterKey_done, req); + return req; +} + +static void rpccli_spoolss_DeletePrinterKey_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_DeletePrinterKey_state *state = tevent_req_data( + req, struct rpccli_spoolss_DeletePrinterKey_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterKey, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_DeletePrinterKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_DeletePrinterKey_state *state = tevent_req_data( + req, struct rpccli_spoolss_DeletePrinterKey_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_spoolss_DeletePrinterKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -3985,6 +13974,116 @@ NTSTATUS rpccli_spoolss_DeletePrinterKey(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_53_state { + struct spoolss_53 orig; + struct spoolss_53 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_53_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_53_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_53_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_53_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_53, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_53, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_53_done, req); + return req; +} + +static void rpccli_spoolss_53_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_53_state *state = tevent_req_data( + req, struct rpccli_spoolss_53_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_53, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_53_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_53_state *state = tevent_req_data( + req, struct rpccli_spoolss_53_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_spoolss_53(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -4026,6 +14125,126 @@ NTSTATUS rpccli_spoolss_53(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_DeletePrinterDriverEx_state { + struct spoolss_DeletePrinterDriverEx orig; + struct spoolss_DeletePrinterDriverEx tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_DeletePrinterDriverEx_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_DeletePrinterDriverEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server /* [in] [unique,charset(UTF16)] */, + const char *_architecture /* [in] [charset(UTF16)] */, + const char *_driver /* [in] [charset(UTF16)] */, + uint32_t _delete_flags /* [in] */, + uint32_t _version /* [in] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_DeletePrinterDriverEx_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_DeletePrinterDriverEx_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server = _server; + state->orig.in.architecture = _architecture; + state->orig.in.driver = _driver; + state->orig.in.delete_flags = _delete_flags; + state->orig.in.version = _version; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_DeletePrinterDriverEx, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_DELETEPRINTERDRIVEREX, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_DeletePrinterDriverEx_done, req); + return req; +} + +static void rpccli_spoolss_DeletePrinterDriverEx_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_DeletePrinterDriverEx_state *state = tevent_req_data( + req, struct rpccli_spoolss_DeletePrinterDriverEx_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_DeletePrinterDriverEx, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_DeletePrinterDriverEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_DeletePrinterDriverEx_state *state = tevent_req_data( + req, struct rpccli_spoolss_DeletePrinterDriverEx_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_spoolss_DeletePrinterDriverEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server /* [in] [unique,charset(UTF16)] */, @@ -4077,6 +14296,116 @@ NTSTATUS rpccli_spoolss_DeletePrinterDriverEx(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_55_state { + struct spoolss_55 orig; + struct spoolss_55 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_55_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_55_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_55_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_55_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_55, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_55, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_55_done, req); + return req; +} + +static void rpccli_spoolss_55_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_55_state *state = tevent_req_data( + req, struct rpccli_spoolss_55_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_55, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_55_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_55_state *state = tevent_req_data( + req, struct rpccli_spoolss_55_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_spoolss_55(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -4118,6 +14447,116 @@ NTSTATUS rpccli_spoolss_55(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_56_state { + struct spoolss_56 orig; + struct spoolss_56 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_56_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_56_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_56_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_56_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_56, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_56, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_56_done, req); + return req; +} + +static void rpccli_spoolss_56_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_56_state *state = tevent_req_data( + req, struct rpccli_spoolss_56_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_56, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_56_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_56_state *state = tevent_req_data( + req, struct rpccli_spoolss_56_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_spoolss_56(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -4159,6 +14598,116 @@ NTSTATUS rpccli_spoolss_56(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_57_state { + struct spoolss_57 orig; + struct spoolss_57 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_57_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_57_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_57_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_57_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_57, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_57, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_57_done, req); + return req; +} + +static void rpccli_spoolss_57_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_57_state *state = tevent_req_data( + req, struct rpccli_spoolss_57_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_57, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_57_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_57_state *state = tevent_req_data( + req, struct rpccli_spoolss_57_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_spoolss_57(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -4200,6 +14749,142 @@ NTSTATUS rpccli_spoolss_57(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_XcvData_state { + struct spoolss_XcvData orig; + struct spoolss_XcvData tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_XcvData_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_XcvData_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_function_name /* [in] [charset(UTF16)] */, + DATA_BLOB _in_data /* [in] */, + uint32_t __in_data_length /* [in] [value(r->in.in_data.length)] */, + uint8_t *_out_data /* [out] [ref,size_is(out_data_size)] */, + uint32_t _out_data_size /* [in] */, + uint32_t *_needed /* [out] [ref] */, + uint32_t *_status_code /* [in,out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_XcvData_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_XcvData_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.function_name = _function_name; + state->orig.in.in_data = _in_data; + state->orig.in._in_data_length = __in_data_length; + state->orig.in.out_data_size = _out_data_size; + state->orig.in.status_code = _status_code; + + /* Out parameters */ + state->orig.out.out_data = _out_data; + state->orig.out.needed = _needed; + state->orig.out.status_code = _status_code; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_XcvData, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_spoolss_XcvData_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_spoolss, + NDR_SPOOLSS_XCVDATA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_XcvData_done, req); + return req; +} + +static void rpccli_spoolss_XcvData_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_XcvData_state *state = tevent_req_data( + req, struct rpccli_spoolss_XcvData_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 */ + memcpy(state->orig.out.out_data, state->tmp.out.out_data, state->tmp.in.out_data_size * sizeof(*state->orig.out.out_data)); + *state->orig.out.needed = *state->tmp.out.needed; + *state->orig.out.status_code = *state->tmp.out.status_code; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_XcvData, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_XcvData_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_XcvData_state *state = tevent_req_data( + req, struct rpccli_spoolss_XcvData_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_spoolss_XcvData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -4258,6 +14943,122 @@ NTSTATUS rpccli_spoolss_XcvData(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_AddPrinterDriverEx_state { + struct spoolss_AddPrinterDriverEx orig; + struct spoolss_AddPrinterDriverEx tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_AddPrinterDriverEx_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_AddPrinterDriverEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_servername /* [in] [unique,charset(UTF16)] */, + struct spoolss_AddDriverInfoCtr *_info_ctr /* [in] [ref] */, + uint32_t _flags /* [in] */) +{ + struct tevent_req *req; + struct rpccli_spoolss_AddPrinterDriverEx_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_AddPrinterDriverEx_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.servername = _servername; + state->orig.in.info_ctr = _info_ctr; + state->orig.in.flags = _flags; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_AddPrinterDriverEx, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_ADDPRINTERDRIVEREX, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_AddPrinterDriverEx_done, req); + return req; +} + +static void rpccli_spoolss_AddPrinterDriverEx_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_AddPrinterDriverEx_state *state = tevent_req_data( + req, struct rpccli_spoolss_AddPrinterDriverEx_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_AddPrinterDriverEx, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_AddPrinterDriverEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_AddPrinterDriverEx_state *state = tevent_req_data( + req, struct rpccli_spoolss_AddPrinterDriverEx_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_spoolss_AddPrinterDriverEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername /* [in] [unique,charset(UTF16)] */, @@ -4305,6 +15106,116 @@ NTSTATUS rpccli_spoolss_AddPrinterDriverEx(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_5a_state { + struct spoolss_5a orig; + struct spoolss_5a tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_5a_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_5a_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_5a_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_5a_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_5a, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_5A, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_5a_done, req); + return req; +} + +static void rpccli_spoolss_5a_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_5a_state *state = tevent_req_data( + req, struct rpccli_spoolss_5a_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_5a, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_5a_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_5a_state *state = tevent_req_data( + req, struct rpccli_spoolss_5a_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_spoolss_5a(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -4346,6 +15257,116 @@ NTSTATUS rpccli_spoolss_5a(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_5b_state { + struct spoolss_5b orig; + struct spoolss_5b tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_5b_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_5b_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_5b_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_5b_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_5b, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_5B, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_5b_done, req); + return req; +} + +static void rpccli_spoolss_5b_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_5b_state *state = tevent_req_data( + req, struct rpccli_spoolss_5b_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_5b, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_5b_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_5b_state *state = tevent_req_data( + req, struct rpccli_spoolss_5b_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_spoolss_5b(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -4387,6 +15408,116 @@ NTSTATUS rpccli_spoolss_5b(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_5c_state { + struct spoolss_5c orig; + struct spoolss_5c tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_5c_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_5c_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_5c_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_5c_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_5c, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_5C, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_5c_done, req); + return req; +} + +static void rpccli_spoolss_5c_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_5c_state *state = tevent_req_data( + req, struct rpccli_spoolss_5c_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_5c, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_5c_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_5c_state *state = tevent_req_data( + req, struct rpccli_spoolss_5c_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_spoolss_5c(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -4428,6 +15559,116 @@ NTSTATUS rpccli_spoolss_5c(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_5d_state { + struct spoolss_5d orig; + struct spoolss_5d tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_5d_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_5d_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_5d_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_5d_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_5d, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_5D, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_5d_done, req); + return req; +} + +static void rpccli_spoolss_5d_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_5d_state *state = tevent_req_data( + req, struct rpccli_spoolss_5d_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_5d, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_5d_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_5d_state *state = tevent_req_data( + req, struct rpccli_spoolss_5d_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_spoolss_5d(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -4469,6 +15710,116 @@ NTSTATUS rpccli_spoolss_5d(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_5e_state { + struct spoolss_5e orig; + struct spoolss_5e tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_5e_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_5e_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_5e_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_5e_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_5e, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_5E, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_5e_done, req); + return req; +} + +static void rpccli_spoolss_5e_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_5e_state *state = tevent_req_data( + req, struct rpccli_spoolss_5e_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_5e, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_5e_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_5e_state *state = tevent_req_data( + req, struct rpccli_spoolss_5e_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_spoolss_5e(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -4510,6 +15861,116 @@ NTSTATUS rpccli_spoolss_5e(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_spoolss_5f_state { + struct spoolss_5f orig; + struct spoolss_5f tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_spoolss_5f_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_spoolss_5f_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_spoolss_5f_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_spoolss_5f_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(spoolss_5f, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_spoolss, + NDR_SPOOLSS_5F, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_spoolss_5f_done, req); + return req; +} + +static void rpccli_spoolss_5f_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_spoolss_5f_state *state = tevent_req_data( + req, struct rpccli_spoolss_5f_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(spoolss_5f, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_spoolss_5f_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_spoolss_5f_state *state = tevent_req_data( + req, struct rpccli_spoolss_5f_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_spoolss_5f(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) diff --git a/librpc/gen_ndr/cli_spoolss.h b/librpc/gen_ndr/cli_spoolss.h index b171c69fbd..abecaef56b 100644 --- a/librpc/gen_ndr/cli_spoolss.h +++ b/librpc/gen_ndr/cli_spoolss.h @@ -1,6 +1,20 @@ #include "../librpc/gen_ndr/ndr_spoolss.h" #ifndef __CLI_SPOOLSS__ #define __CLI_SPOOLSS__ +struct tevent_req *rpccli_spoolss_EnumPrinters_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint32_t _flags /* [in] */, + const char *_server /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + DATA_BLOB *_buffer /* [in] [unique] */, + uint32_t _offered /* [in] */, + uint32_t *_count /* [out] [ref] */, + union spoolss_PrinterInfo **_info /* [out] [ref,switch_is(level),size_is(,*count)] */, + uint32_t *_needed /* [out] [ref] */); +NTSTATUS rpccli_spoolss_EnumPrinters_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_EnumPrinters(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t flags /* [in] */, @@ -12,6 +26,17 @@ NTSTATUS rpccli_spoolss_EnumPrinters(struct rpc_pipe_client *cli, union spoolss_PrinterInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_OpenPrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_printername /* [in] [unique,charset(UTF16)] */, + const char *_datatype /* [in] [unique,charset(UTF16)] */, + struct spoolss_DevmodeContainer _devmode_ctr /* [in] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */); +NTSTATUS rpccli_spoolss_OpenPrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_OpenPrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *printername /* [in] [unique,charset(UTF16)] */, @@ -20,6 +45,16 @@ NTSTATUS rpccli_spoolss_OpenPrinter(struct rpc_pipe_client *cli, uint32_t access_mask /* [in] */, struct policy_handle *handle /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_SetJob_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _job_id /* [in] */, + struct spoolss_JobInfoContainer *_ctr /* [in] [unique] */, + enum spoolss_JobControl _command /* [in] */); +NTSTATUS rpccli_spoolss_SetJob_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_SetJob(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -27,6 +62,19 @@ NTSTATUS rpccli_spoolss_SetJob(struct rpc_pipe_client *cli, struct spoolss_JobInfoContainer *ctr /* [in] [unique] */, enum spoolss_JobControl command /* [in] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_GetJob_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _job_id /* [in] */, + uint32_t _level /* [in] */, + DATA_BLOB *_buffer /* [in] [unique] */, + uint32_t _offered /* [in] */, + union spoolss_JobInfo *_info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */, + uint32_t *_needed /* [out] [ref] */); +NTSTATUS rpccli_spoolss_GetJob_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_GetJob(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -37,6 +85,21 @@ NTSTATUS rpccli_spoolss_GetJob(struct rpc_pipe_client *cli, union spoolss_JobInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_EnumJobs_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _firstjob /* [in] */, + uint32_t _numjobs /* [in] */, + uint32_t _level /* [in] */, + DATA_BLOB *_buffer /* [in] [unique] */, + uint32_t _offered /* [in] */, + uint32_t *_count /* [out] [ref] */, + union spoolss_JobInfo **_info /* [out] [ref,switch_is(level),size_is(,*count)] */, + uint32_t *_needed /* [out] [ref] */); +NTSTATUS rpccli_spoolss_EnumJobs_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_EnumJobs(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -49,6 +112,17 @@ NTSTATUS rpccli_spoolss_EnumJobs(struct rpc_pipe_client *cli, union spoolss_JobInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_AddPrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server /* [in] [unique,charset(UTF16)] */, + struct spoolss_SetPrinterInfoCtr *_info_ctr /* [in] [ref] */, + struct spoolss_DevmodeContainer *_devmode_ctr /* [in] [ref] */, + struct sec_desc_buf *_secdesc_ctr /* [in] [ref] */, + struct policy_handle *_handle /* [out] [ref] */); +NTSTATUS rpccli_spoolss_AddPrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_AddPrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server /* [in] [unique,charset(UTF16)] */, @@ -57,10 +131,28 @@ NTSTATUS rpccli_spoolss_AddPrinter(struct rpc_pipe_client *cli, struct sec_desc_buf *secdesc_ctr /* [in] [ref] */, struct policy_handle *handle /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_DeletePrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */); +NTSTATUS rpccli_spoolss_DeletePrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_DeletePrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_SetPrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct spoolss_SetPrinterInfoCtr *_info_ctr /* [in] [ref] */, + struct spoolss_DevmodeContainer *_devmode_ctr /* [in] [ref] */, + struct sec_desc_buf *_secdesc_ctr /* [in] [ref] */, + enum spoolss_PrinterControl _command /* [in] */); +NTSTATUS rpccli_spoolss_SetPrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_SetPrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -69,6 +161,18 @@ NTSTATUS rpccli_spoolss_SetPrinter(struct rpc_pipe_client *cli, struct sec_desc_buf *secdesc_ctr /* [in] [ref] */, enum spoolss_PrinterControl command /* [in] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_GetPrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _level /* [in] */, + DATA_BLOB *_buffer /* [in] [unique] */, + uint32_t _offered /* [in] */, + union spoolss_PrinterInfo *_info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */, + uint32_t *_needed /* [out] [ref] */); +NTSTATUS rpccli_spoolss_GetPrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_GetPrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -78,11 +182,33 @@ NTSTATUS rpccli_spoolss_GetPrinter(struct rpc_pipe_client *cli, union spoolss_PrinterInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_AddPrinterDriver_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_servername /* [in] [unique,charset(UTF16)] */, + struct spoolss_AddDriverInfoCtr *_info_ctr /* [in] [ref] */); +NTSTATUS rpccli_spoolss_AddPrinterDriver_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_AddPrinterDriver(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername /* [in] [unique,charset(UTF16)] */, struct spoolss_AddDriverInfoCtr *info_ctr /* [in] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_EnumPrinterDrivers_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server /* [in] [unique,charset(UTF16)] */, + const char *_environment /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + DATA_BLOB *_buffer /* [in] [unique] */, + uint32_t _offered /* [in] */, + uint32_t *_count /* [out] [ref] */, + union spoolss_DriverInfo **_info /* [out] [ref,switch_is(level),size_is(,*count)] */, + uint32_t *_needed /* [out] [ref] */); +NTSTATUS rpccli_spoolss_EnumPrinterDrivers_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_EnumPrinterDrivers(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server /* [in] [unique,charset(UTF16)] */, @@ -94,6 +220,19 @@ NTSTATUS rpccli_spoolss_EnumPrinterDrivers(struct rpc_pipe_client *cli, union spoolss_DriverInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_GetPrinterDriver_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_architecture /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + DATA_BLOB *_buffer /* [in] [unique] */, + uint32_t _offered /* [in] */, + union spoolss_DriverInfo *_info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */, + uint32_t *_needed /* [out] [ref] */); +NTSTATUS rpccli_spoolss_GetPrinterDriver_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_GetPrinterDriver(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -104,6 +243,19 @@ NTSTATUS rpccli_spoolss_GetPrinterDriver(struct rpc_pipe_client *cli, union spoolss_DriverInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_GetPrinterDriverDirectory_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server /* [in] [unique,charset(UTF16)] */, + const char *_environment /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + DATA_BLOB *_buffer /* [in] [unique] */, + uint32_t _offered /* [in] */, + union spoolss_DriverDirectoryInfo *_info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */, + uint32_t *_needed /* [out] [ref] */); +NTSTATUS rpccli_spoolss_GetPrinterDriverDirectory_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_GetPrinterDriverDirectory(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server /* [in] [unique,charset(UTF16)] */, @@ -114,12 +266,31 @@ NTSTATUS rpccli_spoolss_GetPrinterDriverDirectory(struct rpc_pipe_client *cli, union spoolss_DriverDirectoryInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_DeletePrinterDriver_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server /* [in] [unique,charset(UTF16)] */, + const char *_architecture /* [in] [charset(UTF16)] */, + const char *_driver /* [in] [charset(UTF16)] */); +NTSTATUS rpccli_spoolss_DeletePrinterDriver_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_DeletePrinterDriver(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server /* [in] [unique,charset(UTF16)] */, const char *architecture /* [in] [charset(UTF16)] */, const char *driver /* [in] [charset(UTF16)] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_AddPrintProcessor_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server /* [in] [unique,charset(UTF16)] */, + const char *_architecture /* [in] [charset(UTF16)] */, + const char *_path_name /* [in] [charset(UTF16)] */, + const char *_print_processor_name /* [in] [charset(UTF16)] */); +NTSTATUS rpccli_spoolss_AddPrintProcessor_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_AddPrintProcessor(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server /* [in] [unique,charset(UTF16)] */, @@ -127,6 +298,20 @@ NTSTATUS rpccli_spoolss_AddPrintProcessor(struct rpc_pipe_client *cli, const char *path_name /* [in] [charset(UTF16)] */, const char *print_processor_name /* [in] [charset(UTF16)] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_EnumPrintProcessors_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_servername /* [in] [unique,charset(UTF16)] */, + const char *_environment /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + DATA_BLOB *_buffer /* [in] [unique] */, + uint32_t _offered /* [in] */, + uint32_t *_count /* [out] [ref] */, + union spoolss_PrintProcessorInfo **_info /* [out] [ref,switch_is(level),size_is(,*count)] */, + uint32_t *_needed /* [out] [ref] */); +NTSTATUS rpccli_spoolss_EnumPrintProcessors_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_EnumPrintProcessors(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername /* [in] [unique,charset(UTF16)] */, @@ -138,6 +323,19 @@ NTSTATUS rpccli_spoolss_EnumPrintProcessors(struct rpc_pipe_client *cli, union spoolss_PrintProcessorInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_GetPrintProcessorDirectory_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server /* [in] [unique,charset(UTF16)] */, + const char *_environment /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + DATA_BLOB *_buffer /* [in] [unique] */, + uint32_t _offered /* [in] */, + union spoolss_PrintProcessorDirectoryInfo *_info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */, + uint32_t *_needed /* [out] [ref] */); +NTSTATUS rpccli_spoolss_GetPrintProcessorDirectory_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_GetPrintProcessorDirectory(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server /* [in] [unique,charset(UTF16)] */, @@ -148,6 +346,16 @@ NTSTATUS rpccli_spoolss_GetPrintProcessorDirectory(struct rpc_pipe_client *cli, union spoolss_PrintProcessorDirectoryInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_StartDocPrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _level /* [in] */, + union spoolss_DocumentInfo _info /* [in] [switch_is(level)] */, + uint32_t *_job_id /* [out] [ref] */); +NTSTATUS rpccli_spoolss_StartDocPrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_StartDocPrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -155,10 +363,27 @@ NTSTATUS rpccli_spoolss_StartDocPrinter(struct rpc_pipe_client *cli, union spoolss_DocumentInfo info /* [in] [switch_is(level)] */, uint32_t *job_id /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_StartPagePrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */); +NTSTATUS rpccli_spoolss_StartPagePrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_StartPagePrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_WritePrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + DATA_BLOB _data /* [in] */, + uint32_t __data_size /* [in] [value(r->in.data.length)] */, + uint32_t *_num_written /* [out] [ref] */); +NTSTATUS rpccli_spoolss_WritePrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_WritePrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -166,14 +391,38 @@ NTSTATUS rpccli_spoolss_WritePrinter(struct rpc_pipe_client *cli, uint32_t _data_size /* [in] [value(r->in.data.length)] */, uint32_t *num_written /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_EndPagePrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */); +NTSTATUS rpccli_spoolss_EndPagePrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_EndPagePrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_AbortPrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */); +NTSTATUS rpccli_spoolss_AbortPrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_AbortPrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_ReadPrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint8_t *_data /* [out] [ref,size_is(data_size)] */, + uint32_t _data_size /* [in] */, + uint32_t *__data_size /* [out] [ref] */); +NTSTATUS rpccli_spoolss_ReadPrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_ReadPrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -181,10 +430,28 @@ NTSTATUS rpccli_spoolss_ReadPrinter(struct rpc_pipe_client *cli, uint32_t data_size /* [in] */, uint32_t *_data_size /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_EndDocPrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */); +NTSTATUS rpccli_spoolss_EndDocPrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_EndDocPrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_AddJob_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _level /* [in] */, + uint8_t *_buffer /* [in,out] [unique,size_is(offered)] */, + uint32_t _offered /* [in] */, + uint32_t *_needed /* [out] [ref] */); +NTSTATUS rpccli_spoolss_AddJob_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_AddJob(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -193,11 +460,31 @@ NTSTATUS rpccli_spoolss_AddJob(struct rpc_pipe_client *cli, uint32_t offered /* [in] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_ScheduleJob_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _jobid /* [in] */); +NTSTATUS rpccli_spoolss_ScheduleJob_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_ScheduleJob(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t jobid /* [in] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_GetPrinterData_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_value_name /* [in] [charset(UTF16)] */, + uint32_t _offered /* [in] */, + enum winreg_Type *_type /* [out] [ref] */, + union spoolss_PrinterData *_data /* [out] [subcontext_size(offered),ref,subcontext(4),switch_is(*type)] */, + uint32_t *_needed /* [out] [ref] */); +NTSTATUS rpccli_spoolss_GetPrinterData_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_GetPrinterData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -207,6 +494,17 @@ NTSTATUS rpccli_spoolss_GetPrinterData(struct rpc_pipe_client *cli, union spoolss_PrinterData *data /* [out] [subcontext_size(offered),ref,subcontext(4),switch_is(*type)] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_SetPrinterData_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_value_name /* [in] [charset(UTF16)] */, + enum winreg_Type _type /* [in] */, + union spoolss_PrinterData _data /* [in] [subcontext(4),switch_is(type)] */, + uint32_t __offered /* [in] [value(ndr_size_spoolss_PrinterData(&data,type,ndr->iconv_convenience,flags))] */); +NTSTATUS rpccli_spoolss_SetPrinterData_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_SetPrinterData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -215,24 +513,67 @@ NTSTATUS rpccli_spoolss_SetPrinterData(struct rpc_pipe_client *cli, union spoolss_PrinterData data /* [in] [subcontext(4),switch_is(type)] */, uint32_t _offered /* [in] [value(ndr_size_spoolss_PrinterData(&data,type,ndr->iconv_convenience,flags))] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_WaitForPrinterChange_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_WaitForPrinterChange_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_WaitForPrinterChange(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_ClosePrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in,out] [ref] */); +NTSTATUS rpccli_spoolss_ClosePrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_ClosePrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in,out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_AddForm_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _level /* [in] */, + union spoolss_AddFormInfo _info /* [in] [switch_is(level)] */); +NTSTATUS rpccli_spoolss_AddForm_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_AddForm(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t level /* [in] */, union spoolss_AddFormInfo info /* [in] [switch_is(level)] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_DeleteForm_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_form_name /* [in] [charset(UTF16)] */); +NTSTATUS rpccli_spoolss_DeleteForm_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_DeleteForm(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, const char *form_name /* [in] [charset(UTF16)] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_GetForm_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_form_name /* [in] [charset(UTF16)] */, + uint32_t _level /* [in] */, + DATA_BLOB *_buffer /* [in] [unique] */, + uint32_t _offered /* [in] */, + union spoolss_FormInfo *_info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */, + uint32_t *_needed /* [out] [ref] */); +NTSTATUS rpccli_spoolss_GetForm_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_GetForm(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -243,6 +584,16 @@ NTSTATUS rpccli_spoolss_GetForm(struct rpc_pipe_client *cli, union spoolss_FormInfo *info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_SetForm_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_form_name /* [in] [charset(UTF16)] */, + uint32_t _level /* [in] */, + union spoolss_AddFormInfo _info /* [in] [switch_is(level)] */); +NTSTATUS rpccli_spoolss_SetForm_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_SetForm(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -250,6 +601,19 @@ NTSTATUS rpccli_spoolss_SetForm(struct rpc_pipe_client *cli, uint32_t level /* [in] */, union spoolss_AddFormInfo info /* [in] [switch_is(level)] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_EnumForms_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _level /* [in] */, + DATA_BLOB *_buffer /* [in] [unique] */, + uint32_t _offered /* [in] */, + uint32_t *_count /* [out] [ref] */, + union spoolss_FormInfo **_info /* [out] [ref,switch_is(level),size_is(,*count)] */, + uint32_t *_needed /* [out] [ref] */); +NTSTATUS rpccli_spoolss_EnumForms_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_EnumForms(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -260,6 +624,19 @@ NTSTATUS rpccli_spoolss_EnumForms(struct rpc_pipe_client *cli, union spoolss_FormInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_EnumPorts_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_servername /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + DATA_BLOB *_buffer /* [in] [unique] */, + uint32_t _offered /* [in] */, + uint32_t *_count /* [out] [ref] */, + union spoolss_PortInfo **_info /* [out] [ref,switch_is(level),size_is(,*count)] */, + uint32_t *_needed /* [out] [ref] */); +NTSTATUS rpccli_spoolss_EnumPorts_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_EnumPorts(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername /* [in] [unique,charset(UTF16)] */, @@ -270,6 +647,19 @@ NTSTATUS rpccli_spoolss_EnumPorts(struct rpc_pipe_client *cli, union spoolss_PortInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_EnumMonitors_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_servername /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + DATA_BLOB *_buffer /* [in] [unique] */, + uint32_t _offered /* [in] */, + uint32_t *_count /* [out] [ref] */, + union spoolss_MonitorInfo **_info /* [out] [ref,switch_is(level),size_is(,*count)] */, + uint32_t *_needed /* [out] [ref] */); +NTSTATUS rpccli_spoolss_EnumMonitors_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_EnumMonitors(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername /* [in] [unique,charset(UTF16)] */, @@ -280,55 +670,160 @@ NTSTATUS rpccli_spoolss_EnumMonitors(struct rpc_pipe_client *cli, union spoolss_MonitorInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_AddPort_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + uint32_t _unknown /* [in] */, + const char *_monitor_name /* [in] [charset(UTF16)] */); +NTSTATUS rpccli_spoolss_AddPort_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_AddPort(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, uint32_t unknown /* [in] */, const char *monitor_name /* [in] [charset(UTF16)] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_ConfigurePort_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_ConfigurePort_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_ConfigurePort(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_DeletePort_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_DeletePort_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_DeletePort(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_CreatePrinterIC_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct policy_handle *_gdi_handle /* [out] [ref] */, + struct spoolss_DevmodeContainer *_devmode_ctr /* [in] [ref] */); +NTSTATUS rpccli_spoolss_CreatePrinterIC_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_CreatePrinterIC(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct policy_handle *gdi_handle /* [out] [ref] */, struct spoolss_DevmodeContainer *devmode_ctr /* [in] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_PlayGDIScriptOnPrinterIC_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_PlayGDIScriptOnPrinterIC_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_PlayGDIScriptOnPrinterIC(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_DeletePrinterIC_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_gdi_handle /* [in,out] [ref] */); +NTSTATUS rpccli_spoolss_DeletePrinterIC_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_DeletePrinterIC(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *gdi_handle /* [in,out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_AddPrinterConnection_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_AddPrinterConnection_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_AddPrinterConnection(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_DeletePrinterConnection_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_DeletePrinterConnection_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_DeletePrinterConnection(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_PrinterMessageBox_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_PrinterMessageBox_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_PrinterMessageBox(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_AddMonitor_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_AddMonitor_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_AddMonitor(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_DeleteMonitor_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_DeleteMonitor_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_DeleteMonitor(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_DeletePrintProcessor_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_DeletePrintProcessor_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_DeletePrintProcessor(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_AddPrintProvidor_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_AddPrintProvidor_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_AddPrintProvidor(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_DeletePrintProvidor_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_DeletePrintProvidor_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_DeletePrintProvidor(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_EnumPrintProcDataTypes_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_servername /* [in] [unique,charset(UTF16)] */, + const char *_print_processor_name /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + DATA_BLOB *_buffer /* [in] [unique] */, + uint32_t _offered /* [in] */, + uint32_t *_count /* [out] [ref] */, + union spoolss_PrintProcDataTypesInfo **_info /* [out] [ref,switch_is(level),size_is(,*count)] */, + uint32_t *_needed /* [out] [ref] */); +NTSTATUS rpccli_spoolss_EnumPrintProcDataTypes_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_EnumPrintProcDataTypes(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername /* [in] [unique,charset(UTF16)] */, @@ -340,12 +835,38 @@ NTSTATUS rpccli_spoolss_EnumPrintProcDataTypes(struct rpc_pipe_client *cli, union spoolss_PrintProcDataTypesInfo **info /* [out] [ref,switch_is(level),size_is(,*count)] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_ResetPrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_data_type /* [in] [unique,charset(UTF16)] */, + struct spoolss_DevmodeContainer *_devmode_ctr /* [in] [ref] */); +NTSTATUS rpccli_spoolss_ResetPrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_ResetPrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, const char *data_type /* [in] [unique,charset(UTF16)] */, struct spoolss_DevmodeContainer *devmode_ctr /* [in] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_GetPrinterDriver2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_architecture /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + DATA_BLOB *_buffer /* [in] [unique] */, + uint32_t _offered /* [in] */, + uint32_t _client_major_version /* [in] */, + uint32_t _client_minor_version /* [in] */, + union spoolss_DriverInfo *_info /* [out] [unique,subcontext_size(offered),subcontext(4),switch_is(level)] */, + uint32_t *_needed /* [out] [ref] */, + uint32_t *_server_major_version /* [out] [ref] */, + uint32_t *_server_minor_version /* [out] [ref] */); +NTSTATUS rpccli_spoolss_GetPrinterDriver2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_GetPrinterDriver2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -360,19 +881,56 @@ NTSTATUS rpccli_spoolss_GetPrinterDriver2(struct rpc_pipe_client *cli, uint32_t *server_major_version /* [out] [ref] */, uint32_t *server_minor_version /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_FindFirstPrinterChangeNotification_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_FindFirstPrinterChangeNotification_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_FindFirstPrinterChangeNotification(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_FindNextPrinterChangeNotification_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_FindNextPrinterChangeNotification_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_FindNextPrinterChangeNotification(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_FindClosePrinterNotify_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */); +NTSTATUS rpccli_spoolss_FindClosePrinterNotify_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_FindClosePrinterNotify(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_RouterFindFirstPrinterChangeNotificationOld_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_RouterFindFirstPrinterChangeNotificationOld_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_RouterFindFirstPrinterChangeNotificationOld(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_ReplyOpenPrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [charset(UTF16)] */, + uint32_t _printer_local /* [in] */, + enum winreg_Type _type /* [in] */, + uint32_t _bufsize /* [in] [range(0,512)] */, + uint8_t *_buffer /* [in] [unique,size_is(bufsize)] */, + struct policy_handle *_handle /* [out] [ref] */); +NTSTATUS rpccli_spoolss_ReplyOpenPrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_ReplyOpenPrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [charset(UTF16)] */, @@ -382,6 +940,16 @@ NTSTATUS rpccli_spoolss_ReplyOpenPrinter(struct rpc_pipe_client *cli, uint8_t *buffer /* [in] [unique,size_is(bufsize)] */, struct policy_handle *handle /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_RouterReplyPrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _flags /* [in] */, + uint32_t _bufsize /* [in] [range(0,512)] */, + uint8_t *_buffer /* [in] [unique,size_is(bufsize)] */); +NTSTATUS rpccli_spoolss_RouterReplyPrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_RouterReplyPrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -389,22 +957,65 @@ NTSTATUS rpccli_spoolss_RouterReplyPrinter(struct rpc_pipe_client *cli, uint32_t bufsize /* [in] [range(0,512)] */, uint8_t *buffer /* [in] [unique,size_is(bufsize)] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_ReplyClosePrinter_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in,out] [ref] */); +NTSTATUS rpccli_spoolss_ReplyClosePrinter_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_ReplyClosePrinter(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in,out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_AddPortEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_AddPortEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_AddPortEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_RouterFindFirstPrinterChangeNotification_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_RouterFindFirstPrinterChangeNotification_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_RouterFindFirstPrinterChangeNotification(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_SpoolerInit_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_SpoolerInit_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_SpoolerInit(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_ResetPrinterEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_ResetPrinterEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_ResetPrinterEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _flags /* [in] */, + uint32_t _options /* [in] */, + const char *_local_machine /* [in] [unique,charset(UTF16)] */, + uint32_t _printer_local /* [in] */, + struct spoolss_NotifyOption *_notify_options /* [in] [unique] */); +NTSTATUS rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -414,6 +1025,18 @@ NTSTATUS rpccli_spoolss_RemoteFindFirstPrinterChangeNotifyEx(struct rpc_pipe_cli uint32_t printer_local /* [in] */, struct spoolss_NotifyOption *notify_options /* [in] [unique] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_RouterReplyPrinterEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _color /* [in] */, + uint32_t _flags /* [in] */, + uint32_t *_reply_result /* [out] [ref] */, + uint32_t _reply_type /* [in] */, + union spoolss_ReplyPrinterInfo _info /* [in] [switch_is(reply_type)] */); +NTSTATUS rpccli_spoolss_RouterReplyPrinterEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_RouterReplyPrinterEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -423,6 +1046,16 @@ NTSTATUS rpccli_spoolss_RouterReplyPrinterEx(struct rpc_pipe_client *cli, uint32_t reply_type /* [in] */, union spoolss_ReplyPrinterInfo info /* [in] [switch_is(reply_type)] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_RouterRefreshPrinterChangeNotify_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _change_low /* [in] */, + struct spoolss_NotifyOption *_options /* [in] [unique] */, + struct spoolss_NotifyInfo **_info /* [out] [ref] */); +NTSTATUS rpccli_spoolss_RouterRefreshPrinterChangeNotify_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_RouterRefreshPrinterChangeNotify(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -430,9 +1063,28 @@ NTSTATUS rpccli_spoolss_RouterRefreshPrinterChangeNotify(struct rpc_pipe_client struct spoolss_NotifyOption *options /* [in] [unique] */, struct spoolss_NotifyInfo **info /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_44_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_44_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_44(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_OpenPrinterEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_printername /* [in] [unique,charset(UTF16)] */, + const char *_datatype /* [in] [unique,charset(UTF16)] */, + struct spoolss_DevmodeContainer _devmode_ctr /* [in] */, + uint32_t _access_mask /* [in] */, + uint32_t _level /* [in] */, + union spoolss_UserLevel _userlevel /* [in] [switch_is(level)] */, + struct policy_handle *_handle /* [out] [ref] */); +NTSTATUS rpccli_spoolss_OpenPrinterEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_OpenPrinterEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *printername /* [in] [unique,charset(UTF16)] */, @@ -443,6 +1095,18 @@ NTSTATUS rpccli_spoolss_OpenPrinterEx(struct rpc_pipe_client *cli, union spoolss_UserLevel userlevel /* [in] [switch_is(level)] */, struct policy_handle *handle /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_AddPrinterEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server /* [in] [unique,charset(UTF16)] */, + struct spoolss_SetPrinterInfoCtr *_info_ctr /* [in] [ref] */, + struct spoolss_DevmodeContainer *_devmode_ctr /* [in] [ref] */, + struct sec_desc_buf *_secdesc_ctr /* [in] [ref] */, + struct spoolss_UserLevelCtr *_userlevel_ctr /* [in] [ref] */, + struct policy_handle *_handle /* [out] [ref] */); +NTSTATUS rpccli_spoolss_AddPrinterEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_AddPrinterEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server /* [in] [unique,charset(UTF16)] */, @@ -452,9 +1116,30 @@ NTSTATUS rpccli_spoolss_AddPrinterEx(struct rpc_pipe_client *cli, struct spoolss_UserLevelCtr *userlevel_ctr /* [in] [ref] */, struct policy_handle *handle /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_47_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_47_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_47(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_EnumPrinterData_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _enum_index /* [in] */, + const char *_value_name /* [out] [charset(UTF16),size_is(value_offered/2)] */, + uint32_t _value_offered /* [in] */, + uint32_t *_value_needed /* [out] [ref] */, + enum winreg_Type *_type /* [out] [ref] */, + uint8_t *_data /* [out] [ref,flag(LIBNDR_PRINT_ARRAY_HEX),size_is(data_offered)] */, + uint32_t _data_offered /* [in] */, + uint32_t *_data_needed /* [out] [ref] */); +NTSTATUS rpccli_spoolss_EnumPrinterData_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_EnumPrinterData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -467,20 +1152,58 @@ NTSTATUS rpccli_spoolss_EnumPrinterData(struct rpc_pipe_client *cli, uint32_t data_offered /* [in] */, uint32_t *data_needed /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_DeletePrinterData_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_value_name /* [in] [charset(UTF16)] */); +NTSTATUS rpccli_spoolss_DeletePrinterData_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_DeletePrinterData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, const char *value_name /* [in] [charset(UTF16)] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_4a_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_4a_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_4a(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_4b_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_4b_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_4b(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_4c_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_4c_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_4c(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_SetPrinterDataEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_key_name /* [in] [charset(UTF16)] */, + const char *_value_name /* [in] [charset(UTF16)] */, + enum winreg_Type _type /* [in] */, + uint8_t *_buffer /* [in] [ref,size_is(offered)] */, + uint32_t _offered /* [in] */); +NTSTATUS rpccli_spoolss_SetPrinterDataEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_SetPrinterDataEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -490,6 +1213,19 @@ NTSTATUS rpccli_spoolss_SetPrinterDataEx(struct rpc_pipe_client *cli, uint8_t *buffer /* [in] [ref,size_is(offered)] */, uint32_t offered /* [in] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_GetPrinterDataEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_key_name /* [in] [charset(UTF16)] */, + const char *_value_name /* [in] [charset(UTF16)] */, + enum winreg_Type *_type /* [out] [ref] */, + uint8_t *_buffer /* [out] [ref,size_is(offered)] */, + uint32_t _offered /* [in] */, + uint32_t *_needed /* [out] [ref] */); +NTSTATUS rpccli_spoolss_GetPrinterDataEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_GetPrinterDataEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -500,6 +1236,18 @@ NTSTATUS rpccli_spoolss_GetPrinterDataEx(struct rpc_pipe_client *cli, uint32_t offered /* [in] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_EnumPrinterDataEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_key_name /* [in] [charset(UTF16)] */, + uint32_t _offered /* [in] */, + uint32_t *_count /* [out] [ref] */, + struct spoolss_PrinterEnumValues **_info /* [out] [ref,size_is(,*count)] */, + uint32_t *_needed /* [out] [ref] */); +NTSTATUS rpccli_spoolss_EnumPrinterDataEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_EnumPrinterDataEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -509,6 +1257,17 @@ NTSTATUS rpccli_spoolss_EnumPrinterDataEx(struct rpc_pipe_client *cli, struct spoolss_PrinterEnumValues **info /* [out] [ref,size_is(,*count)] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_EnumPrinterKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_key_name /* [in] [charset(UTF16)] */, + const char ** *_key_buffer /* [out] [subcontext_size(offered),ref,subcontext(0),flag(LIBNDR_FLAG_STR_NULLTERM)] */, + uint32_t _offered /* [in] */, + uint32_t *_needed /* [out] [ref] */); +NTSTATUS rpccli_spoolss_EnumPrinterKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_EnumPrinterKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -517,20 +1276,54 @@ NTSTATUS rpccli_spoolss_EnumPrinterKey(struct rpc_pipe_client *cli, uint32_t offered /* [in] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_DeletePrinterDataEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_key_name /* [in] [charset(UTF16)] */, + const char *_value_name /* [in] [charset(UTF16)] */); +NTSTATUS rpccli_spoolss_DeletePrinterDataEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_DeletePrinterDataEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, const char *key_name /* [in] [charset(UTF16)] */, const char *value_name /* [in] [charset(UTF16)] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_DeletePrinterKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_key_name /* [in] [charset(UTF16)] */); +NTSTATUS rpccli_spoolss_DeletePrinterKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_DeletePrinterKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, const char *key_name /* [in] [charset(UTF16)] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_53_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_53_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_53(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_DeletePrinterDriverEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server /* [in] [unique,charset(UTF16)] */, + const char *_architecture /* [in] [charset(UTF16)] */, + const char *_driver /* [in] [charset(UTF16)] */, + uint32_t _delete_flags /* [in] */, + uint32_t _version /* [in] */); +NTSTATUS rpccli_spoolss_DeletePrinterDriverEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_DeletePrinterDriverEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server /* [in] [unique,charset(UTF16)] */, @@ -539,15 +1332,47 @@ NTSTATUS rpccli_spoolss_DeletePrinterDriverEx(struct rpc_pipe_client *cli, uint32_t delete_flags /* [in] */, uint32_t version /* [in] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_55_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_55_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_55(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_56_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_56_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_56(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_57_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_57_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_57(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_XcvData_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_function_name /* [in] [charset(UTF16)] */, + DATA_BLOB _in_data /* [in] */, + uint32_t __in_data_length /* [in] [value(r->in.in_data.length)] */, + uint8_t *_out_data /* [out] [ref,size_is(out_data_size)] */, + uint32_t _out_data_size /* [in] */, + uint32_t *_needed /* [out] [ref] */, + uint32_t *_status_code /* [in,out] [ref] */); +NTSTATUS rpccli_spoolss_XcvData_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_XcvData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -559,27 +1384,72 @@ NTSTATUS rpccli_spoolss_XcvData(struct rpc_pipe_client *cli, uint32_t *needed /* [out] [ref] */, uint32_t *status_code /* [in,out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_AddPrinterDriverEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_servername /* [in] [unique,charset(UTF16)] */, + struct spoolss_AddDriverInfoCtr *_info_ctr /* [in] [ref] */, + uint32_t _flags /* [in] */); +NTSTATUS rpccli_spoolss_AddPrinterDriverEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_AddPrinterDriverEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername /* [in] [unique,charset(UTF16)] */, struct spoolss_AddDriverInfoCtr *info_ctr /* [in] [ref] */, uint32_t flags /* [in] */, WERROR *werror); +struct tevent_req *rpccli_spoolss_5a_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_5a_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_5a(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_5b_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_5b_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_5b(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_5c_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_5c_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_5c(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_5d_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_5d_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_5d(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_5e_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_5e_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_5e(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_spoolss_5f_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_spoolss_5f_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_spoolss_5f(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); diff --git a/librpc/gen_ndr/cli_srvsvc.c b/librpc/gen_ndr/cli_srvsvc.c index d372510135..652fd9e0ec 100644 --- a/librpc/gen_ndr/cli_srvsvc.c +++ b/librpc/gen_ndr/cli_srvsvc.c @@ -6,6 +6,139 @@ #include "includes.h" #include "../librpc/gen_ndr/cli_srvsvc.h" +struct rpccli_srvsvc_NetCharDevEnum_state { + struct srvsvc_NetCharDevEnum orig; + struct srvsvc_NetCharDevEnum tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetCharDevEnum_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetCharDevEnum_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + struct srvsvc_NetCharDevInfoCtr *_info_ctr /* [in,out] [ref] */, + uint32_t _max_buffer /* [in] */, + uint32_t *_totalentries /* [out] [ref] */, + uint32_t *_resume_handle /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetCharDevEnum_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetCharDevEnum_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.info_ctr = _info_ctr; + state->orig.in.max_buffer = _max_buffer; + state->orig.in.resume_handle = _resume_handle; + + /* Out parameters */ + state->orig.out.info_ctr = _info_ctr; + state->orig.out.totalentries = _totalentries; + state->orig.out.resume_handle = _resume_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevEnum, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_srvsvc_NetCharDevEnum_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_srvsvc, + NDR_SRVSVC_NETCHARDEVENUM, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetCharDevEnum_done, req); + return req; +} + +static void rpccli_srvsvc_NetCharDevEnum_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetCharDevEnum_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetCharDevEnum_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_ctr = *state->tmp.out.info_ctr; + *state->orig.out.totalentries = *state->tmp.out.totalentries; + if (state->orig.out.resume_handle && state->tmp.out.resume_handle) { + *state->orig.out.resume_handle = *state->tmp.out.resume_handle; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevEnum, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetCharDevEnum_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetCharDevEnum_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetCharDevEnum_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_srvsvc_NetCharDevEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -61,6 +194,131 @@ NTSTATUS rpccli_srvsvc_NetCharDevEnum(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetCharDevGetInfo_state { + struct srvsvc_NetCharDevGetInfo orig; + struct srvsvc_NetCharDevGetInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetCharDevGetInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetCharDevGetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_device_name /* [in] [charset(UTF16)] */, + uint32_t _level /* [in] */, + union srvsvc_NetCharDevInfo *_info /* [out] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetCharDevGetInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetCharDevGetInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.device_name = _device_name; + state->orig.in.level = _level; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevGetInfo, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_srvsvc_NetCharDevGetInfo_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_srvsvc, + NDR_SRVSVC_NETCHARDEVGETINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetCharDevGetInfo_done, req); + return req; +} + +static void rpccli_srvsvc_NetCharDevGetInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetCharDevGetInfo_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetCharDevGetInfo_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(srvsvc_NetCharDevGetInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetCharDevGetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetCharDevGetInfo_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetCharDevGetInfo_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_srvsvc_NetCharDevGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -110,6 +368,122 @@ NTSTATUS rpccli_srvsvc_NetCharDevGetInfo(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetCharDevControl_state { + struct srvsvc_NetCharDevControl orig; + struct srvsvc_NetCharDevControl tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetCharDevControl_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetCharDevControl_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_device_name /* [in] [charset(UTF16)] */, + uint32_t _opcode /* [in] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetCharDevControl_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetCharDevControl_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.device_name = _device_name; + state->orig.in.opcode = _opcode; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevControl, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_srvsvc, + NDR_SRVSVC_NETCHARDEVCONTROL, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetCharDevControl_done, req); + return req; +} + +static void rpccli_srvsvc_NetCharDevControl_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetCharDevControl_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetCharDevControl_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevControl, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetCharDevControl_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetCharDevControl_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetCharDevControl_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_srvsvc_NetCharDevControl(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -157,6 +531,141 @@ NTSTATUS rpccli_srvsvc_NetCharDevControl(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetCharDevQEnum_state { + struct srvsvc_NetCharDevQEnum orig; + struct srvsvc_NetCharDevQEnum tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetCharDevQEnum_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetCharDevQEnum_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_user /* [in] [unique,charset(UTF16)] */, + struct srvsvc_NetCharDevQInfoCtr *_info_ctr /* [in,out] [ref] */, + uint32_t _max_buffer /* [in] */, + uint32_t *_totalentries /* [out] [ref] */, + uint32_t *_resume_handle /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetCharDevQEnum_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetCharDevQEnum_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.user = _user; + state->orig.in.info_ctr = _info_ctr; + state->orig.in.max_buffer = _max_buffer; + state->orig.in.resume_handle = _resume_handle; + + /* Out parameters */ + state->orig.out.info_ctr = _info_ctr; + state->orig.out.totalentries = _totalentries; + state->orig.out.resume_handle = _resume_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQEnum, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_srvsvc_NetCharDevQEnum_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_srvsvc, + NDR_SRVSVC_NETCHARDEVQENUM, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetCharDevQEnum_done, req); + return req; +} + +static void rpccli_srvsvc_NetCharDevQEnum_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetCharDevQEnum_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetCharDevQEnum_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_ctr = *state->tmp.out.info_ctr; + *state->orig.out.totalentries = *state->tmp.out.totalentries; + if (state->orig.out.resume_handle && state->tmp.out.resume_handle) { + *state->orig.out.resume_handle = *state->tmp.out.resume_handle; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQEnum, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetCharDevQEnum_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetCharDevQEnum_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetCharDevQEnum_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_srvsvc_NetCharDevQEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -214,6 +723,133 @@ NTSTATUS rpccli_srvsvc_NetCharDevQEnum(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetCharDevQGetInfo_state { + struct srvsvc_NetCharDevQGetInfo orig; + struct srvsvc_NetCharDevQGetInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetCharDevQGetInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetCharDevQGetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_queue_name /* [in] [charset(UTF16)] */, + const char *_user /* [in] [charset(UTF16)] */, + uint32_t _level /* [in] */, + union srvsvc_NetCharDevQInfo *_info /* [out] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetCharDevQGetInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetCharDevQGetInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.queue_name = _queue_name; + state->orig.in.user = _user; + state->orig.in.level = _level; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQGetInfo, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_srvsvc_NetCharDevQGetInfo_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_srvsvc, + NDR_SRVSVC_NETCHARDEVQGETINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetCharDevQGetInfo_done, req); + return req; +} + +static void rpccli_srvsvc_NetCharDevQGetInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetCharDevQGetInfo_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetCharDevQGetInfo_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(srvsvc_NetCharDevQGetInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetCharDevQGetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetCharDevQGetInfo_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetCharDevQGetInfo_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_srvsvc_NetCharDevQGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -265,6 +901,136 @@ NTSTATUS rpccli_srvsvc_NetCharDevQGetInfo(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetCharDevQSetInfo_state { + struct srvsvc_NetCharDevQSetInfo orig; + struct srvsvc_NetCharDevQSetInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetCharDevQSetInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetCharDevQSetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_queue_name /* [in] [charset(UTF16)] */, + uint32_t _level /* [in] */, + union srvsvc_NetCharDevQInfo _info /* [in] [switch_is(level)] */, + uint32_t *_parm_error /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetCharDevQSetInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetCharDevQSetInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.queue_name = _queue_name; + state->orig.in.level = _level; + state->orig.in.info = _info; + state->orig.in.parm_error = _parm_error; + + /* Out parameters */ + state->orig.out.parm_error = _parm_error; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQSetInfo, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_srvsvc_NetCharDevQSetInfo_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_srvsvc, + NDR_SRVSVC_NETCHARDEVQSETINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetCharDevQSetInfo_done, req); + return req; +} + +static void rpccli_srvsvc_NetCharDevQSetInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetCharDevQSetInfo_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetCharDevQSetInfo_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 */ + if (state->orig.out.parm_error && state->tmp.out.parm_error) { + *state->orig.out.parm_error = *state->tmp.out.parm_error; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQSetInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetCharDevQSetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetCharDevQSetInfo_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetCharDevQSetInfo_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_srvsvc_NetCharDevQSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -319,6 +1085,120 @@ NTSTATUS rpccli_srvsvc_NetCharDevQSetInfo(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetCharDevQPurge_state { + struct srvsvc_NetCharDevQPurge orig; + struct srvsvc_NetCharDevQPurge tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetCharDevQPurge_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetCharDevQPurge_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_queue_name /* [in] [charset(UTF16)] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetCharDevQPurge_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetCharDevQPurge_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.queue_name = _queue_name; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQPurge, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_srvsvc, + NDR_SRVSVC_NETCHARDEVQPURGE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetCharDevQPurge_done, req); + return req; +} + +static void rpccli_srvsvc_NetCharDevQPurge_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetCharDevQPurge_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetCharDevQPurge_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQPurge, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetCharDevQPurge_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetCharDevQPurge_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetCharDevQPurge_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_srvsvc_NetCharDevQPurge(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -364,6 +1244,122 @@ NTSTATUS rpccli_srvsvc_NetCharDevQPurge(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetCharDevQPurgeSelf_state { + struct srvsvc_NetCharDevQPurgeSelf orig; + struct srvsvc_NetCharDevQPurgeSelf tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetCharDevQPurgeSelf_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetCharDevQPurgeSelf_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_queue_name /* [in] [charset(UTF16)] */, + const char *_computer_name /* [in] [charset(UTF16)] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetCharDevQPurgeSelf_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetCharDevQPurgeSelf_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.queue_name = _queue_name; + state->orig.in.computer_name = _computer_name; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetCharDevQPurgeSelf, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_srvsvc, + NDR_SRVSVC_NETCHARDEVQPURGESELF, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetCharDevQPurgeSelf_done, req); + return req; +} + +static void rpccli_srvsvc_NetCharDevQPurgeSelf_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetCharDevQPurgeSelf_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetCharDevQPurgeSelf_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQPurgeSelf, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetCharDevQPurgeSelf_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetCharDevQPurgeSelf_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetCharDevQPurgeSelf_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_srvsvc_NetCharDevQPurgeSelf(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -411,6 +1407,141 @@ NTSTATUS rpccli_srvsvc_NetCharDevQPurgeSelf(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetConnEnum_state { + struct srvsvc_NetConnEnum orig; + struct srvsvc_NetConnEnum tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetConnEnum_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetConnEnum_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_path /* [in] [unique,charset(UTF16)] */, + struct srvsvc_NetConnInfoCtr *_info_ctr /* [in,out] [ref] */, + uint32_t _max_buffer /* [in] */, + uint32_t *_totalentries /* [out] [ref] */, + uint32_t *_resume_handle /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetConnEnum_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetConnEnum_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.path = _path; + state->orig.in.info_ctr = _info_ctr; + state->orig.in.max_buffer = _max_buffer; + state->orig.in.resume_handle = _resume_handle; + + /* Out parameters */ + state->orig.out.info_ctr = _info_ctr; + state->orig.out.totalentries = _totalentries; + state->orig.out.resume_handle = _resume_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetConnEnum, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_srvsvc_NetConnEnum_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_srvsvc, + NDR_SRVSVC_NETCONNENUM, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetConnEnum_done, req); + return req; +} + +static void rpccli_srvsvc_NetConnEnum_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetConnEnum_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetConnEnum_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_ctr = *state->tmp.out.info_ctr; + *state->orig.out.totalentries = *state->tmp.out.totalentries; + if (state->orig.out.resume_handle && state->tmp.out.resume_handle) { + *state->orig.out.resume_handle = *state->tmp.out.resume_handle; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetConnEnum, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetConnEnum_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetConnEnum_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetConnEnum_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_srvsvc_NetConnEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -468,6 +1599,143 @@ NTSTATUS rpccli_srvsvc_NetConnEnum(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetFileEnum_state { + struct srvsvc_NetFileEnum orig; + struct srvsvc_NetFileEnum tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetFileEnum_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetFileEnum_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_path /* [in] [unique,charset(UTF16)] */, + const char *_user /* [in] [unique,charset(UTF16)] */, + struct srvsvc_NetFileInfoCtr *_info_ctr /* [in,out] [ref] */, + uint32_t _max_buffer /* [in] */, + uint32_t *_totalentries /* [out] [ref] */, + uint32_t *_resume_handle /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetFileEnum_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetFileEnum_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.path = _path; + state->orig.in.user = _user; + state->orig.in.info_ctr = _info_ctr; + state->orig.in.max_buffer = _max_buffer; + state->orig.in.resume_handle = _resume_handle; + + /* Out parameters */ + state->orig.out.info_ctr = _info_ctr; + state->orig.out.totalentries = _totalentries; + state->orig.out.resume_handle = _resume_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetFileEnum, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_srvsvc_NetFileEnum_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_srvsvc, + NDR_SRVSVC_NETFILEENUM, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetFileEnum_done, req); + return req; +} + +static void rpccli_srvsvc_NetFileEnum_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetFileEnum_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetFileEnum_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_ctr = *state->tmp.out.info_ctr; + *state->orig.out.totalentries = *state->tmp.out.totalentries; + if (state->orig.out.resume_handle && state->tmp.out.resume_handle) { + *state->orig.out.resume_handle = *state->tmp.out.resume_handle; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetFileEnum, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetFileEnum_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetFileEnum_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetFileEnum_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_srvsvc_NetFileEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -527,6 +1795,131 @@ NTSTATUS rpccli_srvsvc_NetFileEnum(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetFileGetInfo_state { + struct srvsvc_NetFileGetInfo orig; + struct srvsvc_NetFileGetInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetFileGetInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetFileGetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + uint32_t _fid /* [in] */, + uint32_t _level /* [in] */, + union srvsvc_NetFileInfo *_info /* [out] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetFileGetInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetFileGetInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.fid = _fid; + state->orig.in.level = _level; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetFileGetInfo, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_srvsvc_NetFileGetInfo_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_srvsvc, + NDR_SRVSVC_NETFILEGETINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetFileGetInfo_done, req); + return req; +} + +static void rpccli_srvsvc_NetFileGetInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetFileGetInfo_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetFileGetInfo_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(srvsvc_NetFileGetInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetFileGetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetFileGetInfo_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetFileGetInfo_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_srvsvc_NetFileGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -576,6 +1969,120 @@ NTSTATUS rpccli_srvsvc_NetFileGetInfo(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetFileClose_state { + struct srvsvc_NetFileClose orig; + struct srvsvc_NetFileClose tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetFileClose_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetFileClose_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + uint32_t _fid /* [in] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetFileClose_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetFileClose_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.fid = _fid; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetFileClose, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_srvsvc, + NDR_SRVSVC_NETFILECLOSE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetFileClose_done, req); + return req; +} + +static void rpccli_srvsvc_NetFileClose_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetFileClose_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetFileClose_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetFileClose, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetFileClose_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetFileClose_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetFileClose_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_srvsvc_NetFileClose(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -621,6 +2128,143 @@ NTSTATUS rpccli_srvsvc_NetFileClose(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetSessEnum_state { + struct srvsvc_NetSessEnum orig; + struct srvsvc_NetSessEnum tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetSessEnum_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetSessEnum_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_client /* [in] [unique,charset(UTF16)] */, + const char *_user /* [in] [unique,charset(UTF16)] */, + struct srvsvc_NetSessInfoCtr *_info_ctr /* [in,out] [ref] */, + uint32_t _max_buffer /* [in] */, + uint32_t *_totalentries /* [out] [ref] */, + uint32_t *_resume_handle /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetSessEnum_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetSessEnum_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.client = _client; + state->orig.in.user = _user; + state->orig.in.info_ctr = _info_ctr; + state->orig.in.max_buffer = _max_buffer; + state->orig.in.resume_handle = _resume_handle; + + /* Out parameters */ + state->orig.out.info_ctr = _info_ctr; + state->orig.out.totalentries = _totalentries; + state->orig.out.resume_handle = _resume_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetSessEnum, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_srvsvc_NetSessEnum_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_srvsvc, + NDR_SRVSVC_NETSESSENUM, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetSessEnum_done, req); + return req; +} + +static void rpccli_srvsvc_NetSessEnum_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetSessEnum_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetSessEnum_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_ctr = *state->tmp.out.info_ctr; + *state->orig.out.totalentries = *state->tmp.out.totalentries; + if (state->orig.out.resume_handle && state->tmp.out.resume_handle) { + *state->orig.out.resume_handle = *state->tmp.out.resume_handle; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetSessEnum, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetSessEnum_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetSessEnum_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetSessEnum_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_srvsvc_NetSessEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -680,6 +2324,122 @@ NTSTATUS rpccli_srvsvc_NetSessEnum(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetSessDel_state { + struct srvsvc_NetSessDel orig; + struct srvsvc_NetSessDel tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetSessDel_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetSessDel_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_client /* [in] [unique,charset(UTF16)] */, + const char *_user /* [in] [unique,charset(UTF16)] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetSessDel_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetSessDel_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.client = _client; + state->orig.in.user = _user; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetSessDel, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_srvsvc, + NDR_SRVSVC_NETSESSDEL, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetSessDel_done, req); + return req; +} + +static void rpccli_srvsvc_NetSessDel_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetSessDel_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetSessDel_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetSessDel, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetSessDel_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetSessDel_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetSessDel_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_srvsvc_NetSessDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -727,6 +2487,134 @@ NTSTATUS rpccli_srvsvc_NetSessDel(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetShareAdd_state { + struct srvsvc_NetShareAdd orig; + struct srvsvc_NetShareAdd tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetShareAdd_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetShareAdd_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + union srvsvc_NetShareInfo *_info /* [in] [ref,switch_is(level)] */, + uint32_t *_parm_error /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetShareAdd_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetShareAdd_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.level = _level; + state->orig.in.info = _info; + state->orig.in.parm_error = _parm_error; + + /* Out parameters */ + state->orig.out.parm_error = _parm_error; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetShareAdd, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_srvsvc_NetShareAdd_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_srvsvc, + NDR_SRVSVC_NETSHAREADD, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetShareAdd_done, req); + return req; +} + +static void rpccli_srvsvc_NetShareAdd_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetShareAdd_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetShareAdd_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 */ + if (state->orig.out.parm_error && state->tmp.out.parm_error) { + *state->orig.out.parm_error = *state->tmp.out.parm_error; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetShareAdd, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetShareAdd_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetShareAdd_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetShareAdd_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_srvsvc_NetShareAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -779,6 +2667,139 @@ NTSTATUS rpccli_srvsvc_NetShareAdd(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetShareEnumAll_state { + struct srvsvc_NetShareEnumAll orig; + struct srvsvc_NetShareEnumAll tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetShareEnumAll_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetShareEnumAll_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + struct srvsvc_NetShareInfoCtr *_info_ctr /* [in,out] [ref] */, + uint32_t _max_buffer /* [in] */, + uint32_t *_totalentries /* [out] [ref] */, + uint32_t *_resume_handle /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetShareEnumAll_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetShareEnumAll_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.info_ctr = _info_ctr; + state->orig.in.max_buffer = _max_buffer; + state->orig.in.resume_handle = _resume_handle; + + /* Out parameters */ + state->orig.out.info_ctr = _info_ctr; + state->orig.out.totalentries = _totalentries; + state->orig.out.resume_handle = _resume_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetShareEnumAll, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_srvsvc_NetShareEnumAll_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_srvsvc, + NDR_SRVSVC_NETSHAREENUMALL, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetShareEnumAll_done, req); + return req; +} + +static void rpccli_srvsvc_NetShareEnumAll_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetShareEnumAll_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetShareEnumAll_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_ctr = *state->tmp.out.info_ctr; + *state->orig.out.totalentries = *state->tmp.out.totalentries; + if (state->orig.out.resume_handle && state->tmp.out.resume_handle) { + *state->orig.out.resume_handle = *state->tmp.out.resume_handle; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetShareEnumAll, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetShareEnumAll_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetShareEnumAll_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetShareEnumAll_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_srvsvc_NetShareEnumAll(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -834,6 +2855,131 @@ NTSTATUS rpccli_srvsvc_NetShareEnumAll(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetShareGetInfo_state { + struct srvsvc_NetShareGetInfo orig; + struct srvsvc_NetShareGetInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetShareGetInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetShareGetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_share_name /* [in] [charset(UTF16)] */, + uint32_t _level /* [in] */, + union srvsvc_NetShareInfo *_info /* [out] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetShareGetInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetShareGetInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.share_name = _share_name; + state->orig.in.level = _level; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetShareGetInfo, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_srvsvc_NetShareGetInfo_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_srvsvc, + NDR_SRVSVC_NETSHAREGETINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetShareGetInfo_done, req); + return req; +} + +static void rpccli_srvsvc_NetShareGetInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetShareGetInfo_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetShareGetInfo_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(srvsvc_NetShareGetInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetShareGetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetShareGetInfo_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetShareGetInfo_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_srvsvc_NetShareGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -883,6 +3029,136 @@ NTSTATUS rpccli_srvsvc_NetShareGetInfo(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetShareSetInfo_state { + struct srvsvc_NetShareSetInfo orig; + struct srvsvc_NetShareSetInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetShareSetInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetShareSetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_share_name /* [in] [charset(UTF16)] */, + uint32_t _level /* [in] */, + union srvsvc_NetShareInfo *_info /* [in] [ref,switch_is(level)] */, + uint32_t *_parm_error /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetShareSetInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetShareSetInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.share_name = _share_name; + state->orig.in.level = _level; + state->orig.in.info = _info; + state->orig.in.parm_error = _parm_error; + + /* Out parameters */ + state->orig.out.parm_error = _parm_error; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetShareSetInfo, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_srvsvc_NetShareSetInfo_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_srvsvc, + NDR_SRVSVC_NETSHARESETINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetShareSetInfo_done, req); + return req; +} + +static void rpccli_srvsvc_NetShareSetInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetShareSetInfo_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetShareSetInfo_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 */ + if (state->orig.out.parm_error && state->tmp.out.parm_error) { + *state->orig.out.parm_error = *state->tmp.out.parm_error; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetShareSetInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetShareSetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetShareSetInfo_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetShareSetInfo_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_srvsvc_NetShareSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -937,6 +3213,122 @@ NTSTATUS rpccli_srvsvc_NetShareSetInfo(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetShareDel_state { + struct srvsvc_NetShareDel orig; + struct srvsvc_NetShareDel tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetShareDel_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetShareDel_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_share_name /* [in] [charset(UTF16)] */, + uint32_t _reserved /* [in] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetShareDel_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetShareDel_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.share_name = _share_name; + state->orig.in.reserved = _reserved; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetShareDel, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_srvsvc, + NDR_SRVSVC_NETSHAREDEL, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetShareDel_done, req); + return req; +} + +static void rpccli_srvsvc_NetShareDel_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetShareDel_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetShareDel_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDel, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetShareDel_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetShareDel_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetShareDel_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_srvsvc_NetShareDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -984,6 +3376,122 @@ NTSTATUS rpccli_srvsvc_NetShareDel(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetShareDelSticky_state { + struct srvsvc_NetShareDelSticky orig; + struct srvsvc_NetShareDelSticky tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetShareDelSticky_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetShareDelSticky_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_share_name /* [in] [charset(UTF16)] */, + uint32_t _reserved /* [in] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetShareDelSticky_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetShareDelSticky_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.share_name = _share_name; + state->orig.in.reserved = _reserved; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetShareDelSticky, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_srvsvc, + NDR_SRVSVC_NETSHAREDELSTICKY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetShareDelSticky_done, req); + return req; +} + +static void rpccli_srvsvc_NetShareDelSticky_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetShareDelSticky_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetShareDelSticky_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelSticky, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetShareDelSticky_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetShareDelSticky_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetShareDelSticky_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_srvsvc_NetShareDelSticky(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -1031,6 +3539,129 @@ NTSTATUS rpccli_srvsvc_NetShareDelSticky(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetShareCheck_state { + struct srvsvc_NetShareCheck orig; + struct srvsvc_NetShareCheck tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetShareCheck_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetShareCheck_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_device_name /* [in] [charset(UTF16)] */, + enum srvsvc_ShareType *_type /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetShareCheck_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetShareCheck_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.device_name = _device_name; + + /* Out parameters */ + state->orig.out.type = _type; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetShareCheck, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_srvsvc_NetShareCheck_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_srvsvc, + NDR_SRVSVC_NETSHARECHECK, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetShareCheck_done, req); + return req; +} + +static void rpccli_srvsvc_NetShareCheck_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetShareCheck_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetShareCheck_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; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetShareCheck, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetShareCheck_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetShareCheck_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetShareCheck_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_srvsvc_NetShareCheck(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -1078,6 +3709,129 @@ NTSTATUS rpccli_srvsvc_NetShareCheck(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetSrvGetInfo_state { + struct srvsvc_NetSrvGetInfo orig; + struct srvsvc_NetSrvGetInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetSrvGetInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetSrvGetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + union srvsvc_NetSrvInfo *_info /* [out] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetSrvGetInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetSrvGetInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.level = _level; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetSrvGetInfo, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_srvsvc_NetSrvGetInfo_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_srvsvc, + NDR_SRVSVC_NETSRVGETINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetSrvGetInfo_done, req); + return req; +} + +static void rpccli_srvsvc_NetSrvGetInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetSrvGetInfo_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetSrvGetInfo_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(srvsvc_NetSrvGetInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetSrvGetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetSrvGetInfo_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetSrvGetInfo_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_srvsvc_NetSrvGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -1125,6 +3879,134 @@ NTSTATUS rpccli_srvsvc_NetSrvGetInfo(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetSrvSetInfo_state { + struct srvsvc_NetSrvSetInfo orig; + struct srvsvc_NetSrvSetInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetSrvSetInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetSrvSetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + union srvsvc_NetSrvInfo *_info /* [in] [ref,switch_is(level)] */, + uint32_t *_parm_error /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetSrvSetInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetSrvSetInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.level = _level; + state->orig.in.info = _info; + state->orig.in.parm_error = _parm_error; + + /* Out parameters */ + state->orig.out.parm_error = _parm_error; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetSrvSetInfo, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_srvsvc_NetSrvSetInfo_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_srvsvc, + NDR_SRVSVC_NETSRVSETINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetSrvSetInfo_done, req); + return req; +} + +static void rpccli_srvsvc_NetSrvSetInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetSrvSetInfo_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetSrvSetInfo_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 */ + if (state->orig.out.parm_error && state->tmp.out.parm_error) { + *state->orig.out.parm_error = *state->tmp.out.parm_error; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetSrvSetInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetSrvSetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetSrvSetInfo_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetSrvSetInfo_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_srvsvc_NetSrvSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -1177,6 +4059,141 @@ NTSTATUS rpccli_srvsvc_NetSrvSetInfo(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetDiskEnum_state { + struct srvsvc_NetDiskEnum orig; + struct srvsvc_NetDiskEnum tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetDiskEnum_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetDiskEnum_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + struct srvsvc_NetDiskInfo *_info /* [in,out] [ref] */, + uint32_t _maxlen /* [in] */, + uint32_t *_totalentries /* [out] [ref] */, + uint32_t *_resume_handle /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetDiskEnum_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetDiskEnum_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.level = _level; + state->orig.in.info = _info; + state->orig.in.maxlen = _maxlen; + state->orig.in.resume_handle = _resume_handle; + + /* Out parameters */ + state->orig.out.info = _info; + state->orig.out.totalentries = _totalentries; + state->orig.out.resume_handle = _resume_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetDiskEnum, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_srvsvc_NetDiskEnum_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_srvsvc, + NDR_SRVSVC_NETDISKENUM, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetDiskEnum_done, req); + return req; +} + +static void rpccli_srvsvc_NetDiskEnum_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetDiskEnum_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetDiskEnum_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; + *state->orig.out.totalentries = *state->tmp.out.totalentries; + if (state->orig.out.resume_handle && state->tmp.out.resume_handle) { + *state->orig.out.resume_handle = *state->tmp.out.resume_handle; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetDiskEnum, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetDiskEnum_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetDiskEnum_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetDiskEnum_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_srvsvc_NetDiskEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -1234,6 +4251,133 @@ NTSTATUS rpccli_srvsvc_NetDiskEnum(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetServerStatisticsGet_state { + struct srvsvc_NetServerStatisticsGet orig; + struct srvsvc_NetServerStatisticsGet tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetServerStatisticsGet_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetServerStatisticsGet_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_service /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + uint32_t _options /* [in] */, + struct srvsvc_Statistics **_stats /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetServerStatisticsGet_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetServerStatisticsGet_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.service = _service; + state->orig.in.level = _level; + state->orig.in.options = _options; + + /* Out parameters */ + state->orig.out.stats = _stats; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetServerStatisticsGet, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_srvsvc_NetServerStatisticsGet_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_srvsvc, + NDR_SRVSVC_NETSERVERSTATISTICSGET, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetServerStatisticsGet_done, req); + return req; +} + +static void rpccli_srvsvc_NetServerStatisticsGet_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetServerStatisticsGet_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetServerStatisticsGet_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.stats = *state->tmp.out.stats; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetServerStatisticsGet, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetServerStatisticsGet_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetServerStatisticsGet_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetServerStatisticsGet_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_srvsvc_NetServerStatisticsGet(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -1285,6 +4429,122 @@ NTSTATUS rpccli_srvsvc_NetServerStatisticsGet(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetTransportAdd_state { + struct srvsvc_NetTransportAdd orig; + struct srvsvc_NetTransportAdd tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetTransportAdd_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetTransportAdd_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + union srvsvc_NetTransportInfo _info /* [in] [switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetTransportAdd_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetTransportAdd_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.level = _level; + state->orig.in.info = _info; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetTransportAdd, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_srvsvc, + NDR_SRVSVC_NETTRANSPORTADD, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetTransportAdd_done, req); + return req; +} + +static void rpccli_srvsvc_NetTransportAdd_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetTransportAdd_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetTransportAdd_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportAdd, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetTransportAdd_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetTransportAdd_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetTransportAdd_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_srvsvc_NetTransportAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -1332,6 +4592,139 @@ NTSTATUS rpccli_srvsvc_NetTransportAdd(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetTransportEnum_state { + struct srvsvc_NetTransportEnum orig; + struct srvsvc_NetTransportEnum tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetTransportEnum_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetTransportEnum_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + struct srvsvc_NetTransportInfoCtr *_transports /* [in,out] [ref] */, + uint32_t _max_buffer /* [in] */, + uint32_t *_totalentries /* [out] [ref] */, + uint32_t *_resume_handle /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetTransportEnum_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetTransportEnum_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.transports = _transports; + state->orig.in.max_buffer = _max_buffer; + state->orig.in.resume_handle = _resume_handle; + + /* Out parameters */ + state->orig.out.transports = _transports; + state->orig.out.totalentries = _totalentries; + state->orig.out.resume_handle = _resume_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetTransportEnum, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_srvsvc_NetTransportEnum_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_srvsvc, + NDR_SRVSVC_NETTRANSPORTENUM, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetTransportEnum_done, req); + return req; +} + +static void rpccli_srvsvc_NetTransportEnum_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetTransportEnum_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetTransportEnum_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.transports = *state->tmp.out.transports; + *state->orig.out.totalentries = *state->tmp.out.totalentries; + if (state->orig.out.resume_handle && state->tmp.out.resume_handle) { + *state->orig.out.resume_handle = *state->tmp.out.resume_handle; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportEnum, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetTransportEnum_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetTransportEnum_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetTransportEnum_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_srvsvc_NetTransportEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -1387,6 +4780,122 @@ NTSTATUS rpccli_srvsvc_NetTransportEnum(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetTransportDel_state { + struct srvsvc_NetTransportDel orig; + struct srvsvc_NetTransportDel tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetTransportDel_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetTransportDel_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + struct srvsvc_NetTransportInfo0 *_info0 /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetTransportDel_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetTransportDel_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.level = _level; + state->orig.in.info0 = _info0; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetTransportDel, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_srvsvc, + NDR_SRVSVC_NETTRANSPORTDEL, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetTransportDel_done, req); + return req; +} + +static void rpccli_srvsvc_NetTransportDel_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetTransportDel_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetTransportDel_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportDel, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetTransportDel_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetTransportDel_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetTransportDel_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_srvsvc_NetTransportDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -1434,6 +4943,127 @@ NTSTATUS rpccli_srvsvc_NetTransportDel(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetRemoteTOD_state { + struct srvsvc_NetRemoteTOD orig; + struct srvsvc_NetRemoteTOD tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetRemoteTOD_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetRemoteTOD_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + struct srvsvc_NetRemoteTODInfo **_info /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetRemoteTOD_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetRemoteTOD_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetRemoteTOD, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_srvsvc_NetRemoteTOD_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_srvsvc, + NDR_SRVSVC_NETREMOTETOD, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetRemoteTOD_done, req); + return req; +} + +static void rpccli_srvsvc_NetRemoteTOD_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetRemoteTOD_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetRemoteTOD_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(srvsvc_NetRemoteTOD, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetRemoteTOD_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetRemoteTOD_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetRemoteTOD_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_srvsvc_NetRemoteTOD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -1479,6 +5109,124 @@ NTSTATUS rpccli_srvsvc_NetRemoteTOD(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetSetServiceBits_state { + struct srvsvc_NetSetServiceBits orig; + struct srvsvc_NetSetServiceBits tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetSetServiceBits_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetSetServiceBits_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_transport /* [in] [unique,charset(UTF16)] */, + uint32_t _servicebits /* [in] */, + uint32_t _updateimmediately /* [in] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetSetServiceBits_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetSetServiceBits_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.transport = _transport; + state->orig.in.servicebits = _servicebits; + state->orig.in.updateimmediately = _updateimmediately; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetSetServiceBits, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_srvsvc, + NDR_SRVSVC_NETSETSERVICEBITS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetSetServiceBits_done, req); + return req; +} + +static void rpccli_srvsvc_NetSetServiceBits_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetSetServiceBits_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetSetServiceBits_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetSetServiceBits, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetSetServiceBits_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetSetServiceBits_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetSetServiceBits_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_srvsvc_NetSetServiceBits(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -1528,6 +5276,131 @@ NTSTATUS rpccli_srvsvc_NetSetServiceBits(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetPathType_state { + struct srvsvc_NetPathType orig; + struct srvsvc_NetPathType tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetPathType_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetPathType_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_path /* [in] [charset(UTF16)] */, + uint32_t _pathflags /* [in] */, + uint32_t *_pathtype /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetPathType_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetPathType_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.path = _path; + state->orig.in.pathflags = _pathflags; + + /* Out parameters */ + state->orig.out.pathtype = _pathtype; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetPathType, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_srvsvc_NetPathType_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_srvsvc, + NDR_SRVSVC_NETPATHTYPE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetPathType_done, req); + return req; +} + +static void rpccli_srvsvc_NetPathType_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetPathType_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetPathType_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.pathtype = *state->tmp.out.pathtype; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetPathType, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetPathType_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetPathType_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetPathType_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_srvsvc_NetPathType(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -1577,6 +5450,139 @@ NTSTATUS rpccli_srvsvc_NetPathType(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetPathCanonicalize_state { + struct srvsvc_NetPathCanonicalize orig; + struct srvsvc_NetPathCanonicalize tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetPathCanonicalize_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetPathCanonicalize_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_path /* [in] [charset(UTF16)] */, + uint8_t *_can_path /* [out] [size_is(maxbuf)] */, + uint32_t _maxbuf /* [in] */, + const char *_prefix /* [in] [charset(UTF16)] */, + uint32_t *_pathtype /* [in,out] [ref] */, + uint32_t _pathflags /* [in] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetPathCanonicalize_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetPathCanonicalize_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.path = _path; + state->orig.in.maxbuf = _maxbuf; + state->orig.in.prefix = _prefix; + state->orig.in.pathtype = _pathtype; + state->orig.in.pathflags = _pathflags; + + /* Out parameters */ + state->orig.out.can_path = _can_path; + state->orig.out.pathtype = _pathtype; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetPathCanonicalize, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_srvsvc_NetPathCanonicalize_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_srvsvc, + NDR_SRVSVC_NETPATHCANONICALIZE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetPathCanonicalize_done, req); + return req; +} + +static void rpccli_srvsvc_NetPathCanonicalize_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetPathCanonicalize_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetPathCanonicalize_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 */ + memcpy(state->orig.out.can_path, state->tmp.out.can_path, state->tmp.in.maxbuf * sizeof(*state->orig.out.can_path)); + *state->orig.out.pathtype = *state->tmp.out.pathtype; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetPathCanonicalize, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetPathCanonicalize_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetPathCanonicalize_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetPathCanonicalize_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_srvsvc_NetPathCanonicalize(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -1633,6 +5639,126 @@ NTSTATUS rpccli_srvsvc_NetPathCanonicalize(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetPathCompare_state { + struct srvsvc_NetPathCompare orig; + struct srvsvc_NetPathCompare tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetPathCompare_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetPathCompare_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_path1 /* [in] [charset(UTF16)] */, + const char *_path2 /* [in] [charset(UTF16)] */, + uint32_t _pathtype /* [in] */, + uint32_t _pathflags /* [in] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetPathCompare_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetPathCompare_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.path1 = _path1; + state->orig.in.path2 = _path2; + state->orig.in.pathtype = _pathtype; + state->orig.in.pathflags = _pathflags; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetPathCompare, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_srvsvc, + NDR_SRVSVC_NETPATHCOMPARE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetPathCompare_done, req); + return req; +} + +static void rpccli_srvsvc_NetPathCompare_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetPathCompare_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetPathCompare_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetPathCompare, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetPathCompare_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetPathCompare_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetPathCompare_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_srvsvc_NetPathCompare(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -1684,6 +5810,124 @@ NTSTATUS rpccli_srvsvc_NetPathCompare(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetNameValidate_state { + struct srvsvc_NetNameValidate orig; + struct srvsvc_NetNameValidate tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetNameValidate_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetNameValidate_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_name /* [in] [charset(UTF16)] */, + uint32_t _name_type /* [in] */, + uint32_t _flags /* [in] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetNameValidate_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetNameValidate_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.name = _name; + state->orig.in.name_type = _name_type; + state->orig.in.flags = _flags; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetNameValidate, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_srvsvc, + NDR_SRVSVC_NETNAMEVALIDATE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetNameValidate_done, req); + return req; +} + +static void rpccli_srvsvc_NetNameValidate_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetNameValidate_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetNameValidate_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetNameValidate, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetNameValidate_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetNameValidate_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetNameValidate_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_srvsvc_NetNameValidate(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -1733,6 +5977,116 @@ NTSTATUS rpccli_srvsvc_NetNameValidate(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NETRPRNAMECANONICALIZE_state { + struct srvsvc_NETRPRNAMECANONICALIZE orig; + struct srvsvc_NETRPRNAMECANONICALIZE tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NETRPRNAMECANONICALIZE_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NETRPRNAMECANONICALIZE_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NETRPRNAMECANONICALIZE_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NETRPRNAMECANONICALIZE_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NETRPRNAMECANONICALIZE, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_srvsvc, + NDR_SRVSVC_NETRPRNAMECANONICALIZE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NETRPRNAMECANONICALIZE_done, req); + return req; +} + +static void rpccli_srvsvc_NETRPRNAMECANONICALIZE_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NETRPRNAMECANONICALIZE_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NETRPRNAMECANONICALIZE_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NETRPRNAMECANONICALIZE, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NETRPRNAMECANONICALIZE_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NETRPRNAMECANONICALIZE_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NETRPRNAMECANONICALIZE_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_srvsvc_NETRPRNAMECANONICALIZE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1774,6 +6128,126 @@ NTSTATUS rpccli_srvsvc_NETRPRNAMECANONICALIZE(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetPRNameCompare_state { + struct srvsvc_NetPRNameCompare orig; + struct srvsvc_NetPRNameCompare tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetPRNameCompare_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetPRNameCompare_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_name1 /* [in] [charset(UTF16)] */, + const char *_name2 /* [in] [charset(UTF16)] */, + uint32_t _name_type /* [in] */, + uint32_t _flags /* [in] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetPRNameCompare_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetPRNameCompare_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.name1 = _name1; + state->orig.in.name2 = _name2; + state->orig.in.name_type = _name_type; + state->orig.in.flags = _flags; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetPRNameCompare, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_srvsvc, + NDR_SRVSVC_NETPRNAMECOMPARE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetPRNameCompare_done, req); + return req; +} + +static void rpccli_srvsvc_NetPRNameCompare_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetPRNameCompare_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetPRNameCompare_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetPRNameCompare, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetPRNameCompare_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetPRNameCompare_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetPRNameCompare_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_srvsvc_NetPRNameCompare(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -1825,6 +6299,139 @@ NTSTATUS rpccli_srvsvc_NetPRNameCompare(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetShareEnum_state { + struct srvsvc_NetShareEnum orig; + struct srvsvc_NetShareEnum tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetShareEnum_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetShareEnum_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + struct srvsvc_NetShareInfoCtr *_info_ctr /* [in,out] [ref] */, + uint32_t _max_buffer /* [in] */, + uint32_t *_totalentries /* [out] [ref] */, + uint32_t *_resume_handle /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetShareEnum_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetShareEnum_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.info_ctr = _info_ctr; + state->orig.in.max_buffer = _max_buffer; + state->orig.in.resume_handle = _resume_handle; + + /* Out parameters */ + state->orig.out.info_ctr = _info_ctr; + state->orig.out.totalentries = _totalentries; + state->orig.out.resume_handle = _resume_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetShareEnum, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_srvsvc_NetShareEnum_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_srvsvc, + NDR_SRVSVC_NETSHAREENUM, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetShareEnum_done, req); + return req; +} + +static void rpccli_srvsvc_NetShareEnum_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetShareEnum_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetShareEnum_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_ctr = *state->tmp.out.info_ctr; + *state->orig.out.totalentries = *state->tmp.out.totalentries; + if (state->orig.out.resume_handle && state->tmp.out.resume_handle) { + *state->orig.out.resume_handle = *state->tmp.out.resume_handle; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetShareEnum, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetShareEnum_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetShareEnum_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetShareEnum_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_srvsvc_NetShareEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -1880,6 +6487,133 @@ NTSTATUS rpccli_srvsvc_NetShareEnum(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetShareDelStart_state { + struct srvsvc_NetShareDelStart orig; + struct srvsvc_NetShareDelStart tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetShareDelStart_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetShareDelStart_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_share /* [in] [charset(UTF16)] */, + uint32_t _reserved /* [in] */, + struct policy_handle *_hnd /* [out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetShareDelStart_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetShareDelStart_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.share = _share; + state->orig.in.reserved = _reserved; + + /* Out parameters */ + state->orig.out.hnd = _hnd; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetShareDelStart, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_srvsvc_NetShareDelStart_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_srvsvc, + NDR_SRVSVC_NETSHAREDELSTART, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetShareDelStart_done, req); + return req; +} + +static void rpccli_srvsvc_NetShareDelStart_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetShareDelStart_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetShareDelStart_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 */ + if (state->orig.out.hnd && state->tmp.out.hnd) { + *state->orig.out.hnd = *state->tmp.out.hnd; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelStart, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetShareDelStart_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetShareDelStart_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetShareDelStart_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_srvsvc_NetShareDelStart(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -1931,6 +6665,128 @@ NTSTATUS rpccli_srvsvc_NetShareDelStart(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetShareDelCommit_state { + struct srvsvc_NetShareDelCommit orig; + struct srvsvc_NetShareDelCommit tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetShareDelCommit_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetShareDelCommit_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_hnd /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetShareDelCommit_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetShareDelCommit_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.hnd = _hnd; + + /* Out parameters */ + state->orig.out.hnd = _hnd; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetShareDelCommit, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_srvsvc_NetShareDelCommit_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_srvsvc, + NDR_SRVSVC_NETSHAREDELCOMMIT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetShareDelCommit_done, req); + return req; +} + +static void rpccli_srvsvc_NetShareDelCommit_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetShareDelCommit_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetShareDelCommit_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 */ + if (state->orig.out.hnd && state->tmp.out.hnd) { + *state->orig.out.hnd = *state->tmp.out.hnd; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelCommit, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetShareDelCommit_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetShareDelCommit_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetShareDelCommit_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_srvsvc_NetShareDelCommit(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *hnd /* [in,out] [unique] */, @@ -1977,6 +6833,133 @@ NTSTATUS rpccli_srvsvc_NetShareDelCommit(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetGetFileSecurity_state { + struct srvsvc_NetGetFileSecurity orig; + struct srvsvc_NetGetFileSecurity tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetGetFileSecurity_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetGetFileSecurity_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_share /* [in] [unique,charset(UTF16)] */, + const char *_file /* [in] [charset(UTF16)] */, + uint32_t _securityinformation /* [in] */, + struct sec_desc_buf **_sd_buf /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetGetFileSecurity_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetGetFileSecurity_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.share = _share; + state->orig.in.file = _file; + state->orig.in.securityinformation = _securityinformation; + + /* Out parameters */ + state->orig.out.sd_buf = _sd_buf; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetGetFileSecurity, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_srvsvc_NetGetFileSecurity_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_srvsvc, + NDR_SRVSVC_NETGETFILESECURITY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetGetFileSecurity_done, req); + return req; +} + +static void rpccli_srvsvc_NetGetFileSecurity_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetGetFileSecurity_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetGetFileSecurity_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.sd_buf = *state->tmp.out.sd_buf; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetGetFileSecurity, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetGetFileSecurity_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetGetFileSecurity_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetGetFileSecurity_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_srvsvc_NetGetFileSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -2028,6 +7011,126 @@ NTSTATUS rpccli_srvsvc_NetGetFileSecurity(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetSetFileSecurity_state { + struct srvsvc_NetSetFileSecurity orig; + struct srvsvc_NetSetFileSecurity tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetSetFileSecurity_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetSetFileSecurity_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_share /* [in] [unique,charset(UTF16)] */, + const char *_file /* [in] [charset(UTF16)] */, + uint32_t _securityinformation /* [in] */, + struct sec_desc_buf *_sd_buf /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetSetFileSecurity_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetSetFileSecurity_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.share = _share; + state->orig.in.file = _file; + state->orig.in.securityinformation = _securityinformation; + state->orig.in.sd_buf = _sd_buf; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetSetFileSecurity, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_srvsvc, + NDR_SRVSVC_NETSETFILESECURITY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetSetFileSecurity_done, req); + return req; +} + +static void rpccli_srvsvc_NetSetFileSecurity_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetSetFileSecurity_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetSetFileSecurity_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetSetFileSecurity, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetSetFileSecurity_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetSetFileSecurity_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetSetFileSecurity_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_srvsvc_NetSetFileSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -2079,6 +7182,122 @@ NTSTATUS rpccli_srvsvc_NetSetFileSecurity(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetServerTransportAddEx_state { + struct srvsvc_NetServerTransportAddEx orig; + struct srvsvc_NetServerTransportAddEx tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetServerTransportAddEx_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetServerTransportAddEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + union srvsvc_NetTransportInfo _info /* [in] [switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetServerTransportAddEx_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetServerTransportAddEx_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.level = _level; + state->orig.in.info = _info; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetServerTransportAddEx, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_srvsvc, + NDR_SRVSVC_NETSERVERTRANSPORTADDEX, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetServerTransportAddEx_done, req); + return req; +} + +static void rpccli_srvsvc_NetServerTransportAddEx_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetServerTransportAddEx_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetServerTransportAddEx_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetServerTransportAddEx, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetServerTransportAddEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetServerTransportAddEx_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetServerTransportAddEx_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_srvsvc_NetServerTransportAddEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -2126,6 +7345,128 @@ NTSTATUS rpccli_srvsvc_NetServerTransportAddEx(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NetServerSetServiceBitsEx_state { + struct srvsvc_NetServerSetServiceBitsEx orig; + struct srvsvc_NetServerSetServiceBitsEx tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NetServerSetServiceBitsEx_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NetServerSetServiceBitsEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_emulated_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_transport /* [in] [unique,charset(UTF16)] */, + uint32_t _servicebitsofinterest /* [in] */, + uint32_t _servicebits /* [in] */, + uint32_t _updateimmediately /* [in] */) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NetServerSetServiceBitsEx_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NetServerSetServiceBitsEx_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_unc = _server_unc; + state->orig.in.emulated_server_unc = _emulated_server_unc; + state->orig.in.transport = _transport; + state->orig.in.servicebitsofinterest = _servicebitsofinterest; + state->orig.in.servicebits = _servicebits; + state->orig.in.updateimmediately = _updateimmediately; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NetServerSetServiceBitsEx, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_srvsvc, + NDR_SRVSVC_NETSERVERSETSERVICEBITSEX, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NetServerSetServiceBitsEx_done, req); + return req; +} + +static void rpccli_srvsvc_NetServerSetServiceBitsEx_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NetServerSetServiceBitsEx_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetServerSetServiceBitsEx_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NetServerSetServiceBitsEx, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NetServerSetServiceBitsEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NetServerSetServiceBitsEx_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NetServerSetServiceBitsEx_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_srvsvc_NetServerSetServiceBitsEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -2179,6 +7520,116 @@ NTSTATUS rpccli_srvsvc_NetServerSetServiceBitsEx(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NETRDFSGETVERSION_state { + struct srvsvc_NETRDFSGETVERSION orig; + struct srvsvc_NETRDFSGETVERSION tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NETRDFSGETVERSION_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NETRDFSGETVERSION_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NETRDFSGETVERSION_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NETRDFSGETVERSION_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSGETVERSION, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_srvsvc, + NDR_SRVSVC_NETRDFSGETVERSION, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NETRDFSGETVERSION_done, req); + return req; +} + +static void rpccli_srvsvc_NETRDFSGETVERSION_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NETRDFSGETVERSION_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NETRDFSGETVERSION_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSGETVERSION, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NETRDFSGETVERSION_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NETRDFSGETVERSION_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NETRDFSGETVERSION_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_srvsvc_NETRDFSGETVERSION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2220,6 +7671,116 @@ NTSTATUS rpccli_srvsvc_NETRDFSGETVERSION(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_state { + struct srvsvc_NETRDFSCREATELOCALPARTITION orig; + struct srvsvc_NETRDFSCREATELOCALPARTITION tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSCREATELOCALPARTITION, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_srvsvc, + NDR_SRVSVC_NETRDFSCREATELOCALPARTITION, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_done, req); + return req; +} + +static void rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSCREATELOCALPARTITION, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_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_srvsvc_NETRDFSCREATELOCALPARTITION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2261,6 +7822,116 @@ NTSTATUS rpccli_srvsvc_NETRDFSCREATELOCALPARTITION(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_state { + struct srvsvc_NETRDFSDELETELOCALPARTITION orig; + struct srvsvc_NETRDFSDELETELOCALPARTITION tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSDELETELOCALPARTITION, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_srvsvc, + NDR_SRVSVC_NETRDFSDELETELOCALPARTITION, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_done, req); + return req; +} + +static void rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSDELETELOCALPARTITION, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_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_srvsvc_NETRDFSDELETELOCALPARTITION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2302,6 +7973,116 @@ NTSTATUS rpccli_srvsvc_NETRDFSDELETELOCALPARTITION(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_state { + struct srvsvc_NETRDFSSETLOCALVOLUMESTATE orig; + struct srvsvc_NETRDFSSETLOCALVOLUMESTATE tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSSETLOCALVOLUMESTATE, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_srvsvc, + NDR_SRVSVC_NETRDFSSETLOCALVOLUMESTATE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_done, req); + return req; +} + +static void rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSSETLOCALVOLUMESTATE, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_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_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2343,6 +8124,116 @@ NTSTATUS rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NETRDFSSETSERVERINFO_state { + struct srvsvc_NETRDFSSETSERVERINFO orig; + struct srvsvc_NETRDFSSETSERVERINFO tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NETRDFSSETSERVERINFO_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NETRDFSSETSERVERINFO_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NETRDFSSETSERVERINFO_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NETRDFSSETSERVERINFO_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSSETSERVERINFO, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_srvsvc, + NDR_SRVSVC_NETRDFSSETSERVERINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NETRDFSSETSERVERINFO_done, req); + return req; +} + +static void rpccli_srvsvc_NETRDFSSETSERVERINFO_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NETRDFSSETSERVERINFO_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NETRDFSSETSERVERINFO_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSSETSERVERINFO, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NETRDFSSETSERVERINFO_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NETRDFSSETSERVERINFO_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NETRDFSSETSERVERINFO_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_srvsvc_NETRDFSSETSERVERINFO(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2384,6 +8275,116 @@ NTSTATUS rpccli_srvsvc_NETRDFSSETSERVERINFO(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NETRDFSCREATEEXITPOINT_state { + struct srvsvc_NETRDFSCREATEEXITPOINT orig; + struct srvsvc_NETRDFSCREATEEXITPOINT tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NETRDFSCREATEEXITPOINT_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NETRDFSCREATEEXITPOINT_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NETRDFSCREATEEXITPOINT_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NETRDFSCREATEEXITPOINT_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSCREATEEXITPOINT, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_srvsvc, + NDR_SRVSVC_NETRDFSCREATEEXITPOINT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NETRDFSCREATEEXITPOINT_done, req); + return req; +} + +static void rpccli_srvsvc_NETRDFSCREATEEXITPOINT_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NETRDFSCREATEEXITPOINT_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NETRDFSCREATEEXITPOINT_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSCREATEEXITPOINT, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NETRDFSCREATEEXITPOINT_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NETRDFSCREATEEXITPOINT_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NETRDFSCREATEEXITPOINT_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_srvsvc_NETRDFSCREATEEXITPOINT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2425,6 +8426,116 @@ NTSTATUS rpccli_srvsvc_NETRDFSCREATEEXITPOINT(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NETRDFSDELETEEXITPOINT_state { + struct srvsvc_NETRDFSDELETEEXITPOINT orig; + struct srvsvc_NETRDFSDELETEEXITPOINT tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NETRDFSDELETEEXITPOINT_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NETRDFSDELETEEXITPOINT_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NETRDFSDELETEEXITPOINT_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NETRDFSDELETEEXITPOINT_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSDELETEEXITPOINT, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_srvsvc, + NDR_SRVSVC_NETRDFSDELETEEXITPOINT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NETRDFSDELETEEXITPOINT_done, req); + return req; +} + +static void rpccli_srvsvc_NETRDFSDELETEEXITPOINT_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NETRDFSDELETEEXITPOINT_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NETRDFSDELETEEXITPOINT_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSDELETEEXITPOINT, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NETRDFSDELETEEXITPOINT_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NETRDFSDELETEEXITPOINT_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NETRDFSDELETEEXITPOINT_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_srvsvc_NETRDFSDELETEEXITPOINT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2466,6 +8577,116 @@ NTSTATUS rpccli_srvsvc_NETRDFSDELETEEXITPOINT(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NETRDFSMODIFYPREFIX_state { + struct srvsvc_NETRDFSMODIFYPREFIX orig; + struct srvsvc_NETRDFSMODIFYPREFIX tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NETRDFSMODIFYPREFIX_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NETRDFSMODIFYPREFIX_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NETRDFSMODIFYPREFIX_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NETRDFSMODIFYPREFIX_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSMODIFYPREFIX, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_srvsvc, + NDR_SRVSVC_NETRDFSMODIFYPREFIX, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NETRDFSMODIFYPREFIX_done, req); + return req; +} + +static void rpccli_srvsvc_NETRDFSMODIFYPREFIX_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NETRDFSMODIFYPREFIX_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NETRDFSMODIFYPREFIX_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSMODIFYPREFIX, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NETRDFSMODIFYPREFIX_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NETRDFSMODIFYPREFIX_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NETRDFSMODIFYPREFIX_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_srvsvc_NETRDFSMODIFYPREFIX(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2507,6 +8728,116 @@ NTSTATUS rpccli_srvsvc_NETRDFSMODIFYPREFIX(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_state { + struct srvsvc_NETRDFSFIXLOCALVOLUME orig; + struct srvsvc_NETRDFSFIXLOCALVOLUME tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSFIXLOCALVOLUME, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_srvsvc, + NDR_SRVSVC_NETRDFSFIXLOCALVOLUME, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_done, req); + return req; +} + +static void rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSFIXLOCALVOLUME, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_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_srvsvc_NETRDFSFIXLOCALVOLUME(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2548,6 +8879,116 @@ NTSTATUS rpccli_srvsvc_NETRDFSFIXLOCALVOLUME(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_state { + struct srvsvc_NETRDFSMANAGERREPORTSITEINFO orig; + struct srvsvc_NETRDFSMANAGERREPORTSITEINFO tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NETRDFSMANAGERREPORTSITEINFO, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_srvsvc, + NDR_SRVSVC_NETRDFSMANAGERREPORTSITEINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_done, req); + return req; +} + +static void rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSMANAGERREPORTSITEINFO, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_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_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -2589,6 +9030,116 @@ NTSTATUS rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_state { + struct srvsvc_NETRSERVERTRANSPORTDELEX orig; + struct srvsvc_NETRSERVERTRANSPORTDELEX tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(srvsvc_NETRSERVERTRANSPORTDELEX, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_srvsvc, + NDR_SRVSVC_NETRSERVERTRANSPORTDELEX, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_done, req); + return req; +} + +static void rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(srvsvc_NETRSERVERTRANSPORTDELEX, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_state *state = tevent_req_data( + req, struct rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_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_srvsvc_NETRSERVERTRANSPORTDELEX(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) diff --git a/librpc/gen_ndr/cli_srvsvc.h b/librpc/gen_ndr/cli_srvsvc.h index f57bf5d378..d55fca55a5 100644 --- a/librpc/gen_ndr/cli_srvsvc.h +++ b/librpc/gen_ndr/cli_srvsvc.h @@ -1,6 +1,17 @@ #include "../librpc/gen_ndr/ndr_srvsvc.h" #ifndef __CLI_SRVSVC__ #define __CLI_SRVSVC__ +struct tevent_req *rpccli_srvsvc_NetCharDevEnum_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + struct srvsvc_NetCharDevInfoCtr *_info_ctr /* [in,out] [ref] */, + uint32_t _max_buffer /* [in] */, + uint32_t *_totalentries /* [out] [ref] */, + uint32_t *_resume_handle /* [in,out] [unique] */); +NTSTATUS rpccli_srvsvc_NetCharDevEnum_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetCharDevEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -9,6 +20,16 @@ NTSTATUS rpccli_srvsvc_NetCharDevEnum(struct rpc_pipe_client *cli, uint32_t *totalentries /* [out] [ref] */, uint32_t *resume_handle /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetCharDevGetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_device_name /* [in] [charset(UTF16)] */, + uint32_t _level /* [in] */, + union srvsvc_NetCharDevInfo *_info /* [out] [ref,switch_is(level)] */); +NTSTATUS rpccli_srvsvc_NetCharDevGetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetCharDevGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -16,12 +37,33 @@ NTSTATUS rpccli_srvsvc_NetCharDevGetInfo(struct rpc_pipe_client *cli, uint32_t level /* [in] */, union srvsvc_NetCharDevInfo *info /* [out] [ref,switch_is(level)] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetCharDevControl_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_device_name /* [in] [charset(UTF16)] */, + uint32_t _opcode /* [in] */); +NTSTATUS rpccli_srvsvc_NetCharDevControl_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetCharDevControl(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, const char *device_name /* [in] [charset(UTF16)] */, uint32_t opcode /* [in] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetCharDevQEnum_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_user /* [in] [unique,charset(UTF16)] */, + struct srvsvc_NetCharDevQInfoCtr *_info_ctr /* [in,out] [ref] */, + uint32_t _max_buffer /* [in] */, + uint32_t *_totalentries /* [out] [ref] */, + uint32_t *_resume_handle /* [in,out] [unique] */); +NTSTATUS rpccli_srvsvc_NetCharDevQEnum_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetCharDevQEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -31,6 +73,17 @@ NTSTATUS rpccli_srvsvc_NetCharDevQEnum(struct rpc_pipe_client *cli, uint32_t *totalentries /* [out] [ref] */, uint32_t *resume_handle /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetCharDevQGetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_queue_name /* [in] [charset(UTF16)] */, + const char *_user /* [in] [charset(UTF16)] */, + uint32_t _level /* [in] */, + union srvsvc_NetCharDevQInfo *_info /* [out] [ref,switch_is(level)] */); +NTSTATUS rpccli_srvsvc_NetCharDevQGetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetCharDevQGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -39,6 +92,17 @@ NTSTATUS rpccli_srvsvc_NetCharDevQGetInfo(struct rpc_pipe_client *cli, uint32_t level /* [in] */, union srvsvc_NetCharDevQInfo *info /* [out] [ref,switch_is(level)] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetCharDevQSetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_queue_name /* [in] [charset(UTF16)] */, + uint32_t _level /* [in] */, + union srvsvc_NetCharDevQInfo _info /* [in] [switch_is(level)] */, + uint32_t *_parm_error /* [in,out] [unique] */); +NTSTATUS rpccli_srvsvc_NetCharDevQSetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetCharDevQSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -47,17 +111,46 @@ NTSTATUS rpccli_srvsvc_NetCharDevQSetInfo(struct rpc_pipe_client *cli, union srvsvc_NetCharDevQInfo info /* [in] [switch_is(level)] */, uint32_t *parm_error /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetCharDevQPurge_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_queue_name /* [in] [charset(UTF16)] */); +NTSTATUS rpccli_srvsvc_NetCharDevQPurge_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetCharDevQPurge(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, const char *queue_name /* [in] [charset(UTF16)] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetCharDevQPurgeSelf_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_queue_name /* [in] [charset(UTF16)] */, + const char *_computer_name /* [in] [charset(UTF16)] */); +NTSTATUS rpccli_srvsvc_NetCharDevQPurgeSelf_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetCharDevQPurgeSelf(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, const char *queue_name /* [in] [charset(UTF16)] */, const char *computer_name /* [in] [charset(UTF16)] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetConnEnum_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_path /* [in] [unique,charset(UTF16)] */, + struct srvsvc_NetConnInfoCtr *_info_ctr /* [in,out] [ref] */, + uint32_t _max_buffer /* [in] */, + uint32_t *_totalentries /* [out] [ref] */, + uint32_t *_resume_handle /* [in,out] [unique] */); +NTSTATUS rpccli_srvsvc_NetConnEnum_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetConnEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -67,6 +160,19 @@ NTSTATUS rpccli_srvsvc_NetConnEnum(struct rpc_pipe_client *cli, uint32_t *totalentries /* [out] [ref] */, uint32_t *resume_handle /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetFileEnum_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_path /* [in] [unique,charset(UTF16)] */, + const char *_user /* [in] [unique,charset(UTF16)] */, + struct srvsvc_NetFileInfoCtr *_info_ctr /* [in,out] [ref] */, + uint32_t _max_buffer /* [in] */, + uint32_t *_totalentries /* [out] [ref] */, + uint32_t *_resume_handle /* [in,out] [unique] */); +NTSTATUS rpccli_srvsvc_NetFileEnum_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetFileEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -77,6 +183,16 @@ NTSTATUS rpccli_srvsvc_NetFileEnum(struct rpc_pipe_client *cli, uint32_t *totalentries /* [out] [ref] */, uint32_t *resume_handle /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetFileGetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + uint32_t _fid /* [in] */, + uint32_t _level /* [in] */, + union srvsvc_NetFileInfo *_info /* [out] [ref,switch_is(level)] */); +NTSTATUS rpccli_srvsvc_NetFileGetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetFileGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -84,11 +200,32 @@ NTSTATUS rpccli_srvsvc_NetFileGetInfo(struct rpc_pipe_client *cli, uint32_t level /* [in] */, union srvsvc_NetFileInfo *info /* [out] [ref,switch_is(level)] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetFileClose_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + uint32_t _fid /* [in] */); +NTSTATUS rpccli_srvsvc_NetFileClose_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetFileClose(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, uint32_t fid /* [in] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetSessEnum_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_client /* [in] [unique,charset(UTF16)] */, + const char *_user /* [in] [unique,charset(UTF16)] */, + struct srvsvc_NetSessInfoCtr *_info_ctr /* [in,out] [ref] */, + uint32_t _max_buffer /* [in] */, + uint32_t *_totalentries /* [out] [ref] */, + uint32_t *_resume_handle /* [in,out] [unique] */); +NTSTATUS rpccli_srvsvc_NetSessEnum_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetSessEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -99,12 +236,31 @@ NTSTATUS rpccli_srvsvc_NetSessEnum(struct rpc_pipe_client *cli, uint32_t *totalentries /* [out] [ref] */, uint32_t *resume_handle /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetSessDel_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_client /* [in] [unique,charset(UTF16)] */, + const char *_user /* [in] [unique,charset(UTF16)] */); +NTSTATUS rpccli_srvsvc_NetSessDel_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetSessDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, const char *client /* [in] [unique,charset(UTF16)] */, const char *user /* [in] [unique,charset(UTF16)] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetShareAdd_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + union srvsvc_NetShareInfo *_info /* [in] [ref,switch_is(level)] */, + uint32_t *_parm_error /* [in,out] [unique] */); +NTSTATUS rpccli_srvsvc_NetShareAdd_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetShareAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -112,6 +268,17 @@ NTSTATUS rpccli_srvsvc_NetShareAdd(struct rpc_pipe_client *cli, union srvsvc_NetShareInfo *info /* [in] [ref,switch_is(level)] */, uint32_t *parm_error /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetShareEnumAll_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + struct srvsvc_NetShareInfoCtr *_info_ctr /* [in,out] [ref] */, + uint32_t _max_buffer /* [in] */, + uint32_t *_totalentries /* [out] [ref] */, + uint32_t *_resume_handle /* [in,out] [unique] */); +NTSTATUS rpccli_srvsvc_NetShareEnumAll_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetShareEnumAll(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -120,6 +287,16 @@ NTSTATUS rpccli_srvsvc_NetShareEnumAll(struct rpc_pipe_client *cli, uint32_t *totalentries /* [out] [ref] */, uint32_t *resume_handle /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetShareGetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_share_name /* [in] [charset(UTF16)] */, + uint32_t _level /* [in] */, + union srvsvc_NetShareInfo *_info /* [out] [ref,switch_is(level)] */); +NTSTATUS rpccli_srvsvc_NetShareGetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetShareGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -127,6 +304,17 @@ NTSTATUS rpccli_srvsvc_NetShareGetInfo(struct rpc_pipe_client *cli, uint32_t level /* [in] */, union srvsvc_NetShareInfo *info /* [out] [ref,switch_is(level)] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetShareSetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_share_name /* [in] [charset(UTF16)] */, + uint32_t _level /* [in] */, + union srvsvc_NetShareInfo *_info /* [in] [ref,switch_is(level)] */, + uint32_t *_parm_error /* [in,out] [unique] */); +NTSTATUS rpccli_srvsvc_NetShareSetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetShareSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -135,30 +323,76 @@ NTSTATUS rpccli_srvsvc_NetShareSetInfo(struct rpc_pipe_client *cli, union srvsvc_NetShareInfo *info /* [in] [ref,switch_is(level)] */, uint32_t *parm_error /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetShareDel_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_share_name /* [in] [charset(UTF16)] */, + uint32_t _reserved /* [in] */); +NTSTATUS rpccli_srvsvc_NetShareDel_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetShareDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, const char *share_name /* [in] [charset(UTF16)] */, uint32_t reserved /* [in] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetShareDelSticky_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_share_name /* [in] [charset(UTF16)] */, + uint32_t _reserved /* [in] */); +NTSTATUS rpccli_srvsvc_NetShareDelSticky_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetShareDelSticky(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, const char *share_name /* [in] [charset(UTF16)] */, uint32_t reserved /* [in] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetShareCheck_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_device_name /* [in] [charset(UTF16)] */, + enum srvsvc_ShareType *_type /* [out] [ref] */); +NTSTATUS rpccli_srvsvc_NetShareCheck_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetShareCheck(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, const char *device_name /* [in] [charset(UTF16)] */, enum srvsvc_ShareType *type /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetSrvGetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + union srvsvc_NetSrvInfo *_info /* [out] [ref,switch_is(level)] */); +NTSTATUS rpccli_srvsvc_NetSrvGetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetSrvGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, uint32_t level /* [in] */, union srvsvc_NetSrvInfo *info /* [out] [ref,switch_is(level)] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetSrvSetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + union srvsvc_NetSrvInfo *_info /* [in] [ref,switch_is(level)] */, + uint32_t *_parm_error /* [in,out] [unique] */); +NTSTATUS rpccli_srvsvc_NetSrvSetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetSrvSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -166,6 +400,18 @@ NTSTATUS rpccli_srvsvc_NetSrvSetInfo(struct rpc_pipe_client *cli, union srvsvc_NetSrvInfo *info /* [in] [ref,switch_is(level)] */, uint32_t *parm_error /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetDiskEnum_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + struct srvsvc_NetDiskInfo *_info /* [in,out] [ref] */, + uint32_t _maxlen /* [in] */, + uint32_t *_totalentries /* [out] [ref] */, + uint32_t *_resume_handle /* [in,out] [unique] */); +NTSTATUS rpccli_srvsvc_NetDiskEnum_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetDiskEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -175,6 +421,17 @@ NTSTATUS rpccli_srvsvc_NetDiskEnum(struct rpc_pipe_client *cli, uint32_t *totalentries /* [out] [ref] */, uint32_t *resume_handle /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetServerStatisticsGet_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_service /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + uint32_t _options /* [in] */, + struct srvsvc_Statistics **_stats /* [out] [ref] */); +NTSTATUS rpccli_srvsvc_NetServerStatisticsGet_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetServerStatisticsGet(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -183,12 +440,32 @@ NTSTATUS rpccli_srvsvc_NetServerStatisticsGet(struct rpc_pipe_client *cli, uint32_t options /* [in] */, struct srvsvc_Statistics **stats /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetTransportAdd_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + union srvsvc_NetTransportInfo _info /* [in] [switch_is(level)] */); +NTSTATUS rpccli_srvsvc_NetTransportAdd_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetTransportAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, uint32_t level /* [in] */, union srvsvc_NetTransportInfo info /* [in] [switch_is(level)] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetTransportEnum_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + struct srvsvc_NetTransportInfoCtr *_transports /* [in,out] [ref] */, + uint32_t _max_buffer /* [in] */, + uint32_t *_totalentries /* [out] [ref] */, + uint32_t *_resume_handle /* [in,out] [unique] */); +NTSTATUS rpccli_srvsvc_NetTransportEnum_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetTransportEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -197,17 +474,44 @@ NTSTATUS rpccli_srvsvc_NetTransportEnum(struct rpc_pipe_client *cli, uint32_t *totalentries /* [out] [ref] */, uint32_t *resume_handle /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetTransportDel_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + struct srvsvc_NetTransportInfo0 *_info0 /* [in] [ref] */); +NTSTATUS rpccli_srvsvc_NetTransportDel_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetTransportDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, uint32_t level /* [in] */, struct srvsvc_NetTransportInfo0 *info0 /* [in] [ref] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetRemoteTOD_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + struct srvsvc_NetRemoteTODInfo **_info /* [out] [ref] */); +NTSTATUS rpccli_srvsvc_NetRemoteTOD_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetRemoteTOD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, struct srvsvc_NetRemoteTODInfo **info /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetSetServiceBits_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_transport /* [in] [unique,charset(UTF16)] */, + uint32_t _servicebits /* [in] */, + uint32_t _updateimmediately /* [in] */); +NTSTATUS rpccli_srvsvc_NetSetServiceBits_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetSetServiceBits(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -215,6 +519,16 @@ NTSTATUS rpccli_srvsvc_NetSetServiceBits(struct rpc_pipe_client *cli, uint32_t servicebits /* [in] */, uint32_t updateimmediately /* [in] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetPathType_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_path /* [in] [charset(UTF16)] */, + uint32_t _pathflags /* [in] */, + uint32_t *_pathtype /* [out] [ref] */); +NTSTATUS rpccli_srvsvc_NetPathType_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetPathType(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -222,6 +536,19 @@ NTSTATUS rpccli_srvsvc_NetPathType(struct rpc_pipe_client *cli, uint32_t pathflags /* [in] */, uint32_t *pathtype /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetPathCanonicalize_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_path /* [in] [charset(UTF16)] */, + uint8_t *_can_path /* [out] [size_is(maxbuf)] */, + uint32_t _maxbuf /* [in] */, + const char *_prefix /* [in] [charset(UTF16)] */, + uint32_t *_pathtype /* [in,out] [ref] */, + uint32_t _pathflags /* [in] */); +NTSTATUS rpccli_srvsvc_NetPathCanonicalize_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetPathCanonicalize(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -232,6 +559,17 @@ NTSTATUS rpccli_srvsvc_NetPathCanonicalize(struct rpc_pipe_client *cli, uint32_t *pathtype /* [in,out] [ref] */, uint32_t pathflags /* [in] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetPathCompare_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_path1 /* [in] [charset(UTF16)] */, + const char *_path2 /* [in] [charset(UTF16)] */, + uint32_t _pathtype /* [in] */, + uint32_t _pathflags /* [in] */); +NTSTATUS rpccli_srvsvc_NetPathCompare_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetPathCompare(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -240,6 +578,16 @@ NTSTATUS rpccli_srvsvc_NetPathCompare(struct rpc_pipe_client *cli, uint32_t pathtype /* [in] */, uint32_t pathflags /* [in] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetNameValidate_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_name /* [in] [charset(UTF16)] */, + uint32_t _name_type /* [in] */, + uint32_t _flags /* [in] */); +NTSTATUS rpccli_srvsvc_NetNameValidate_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetNameValidate(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -247,9 +595,26 @@ NTSTATUS rpccli_srvsvc_NetNameValidate(struct rpc_pipe_client *cli, uint32_t name_type /* [in] */, uint32_t flags /* [in] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NETRPRNAMECANONICALIZE_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_srvsvc_NETRPRNAMECANONICALIZE_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NETRPRNAMECANONICALIZE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetPRNameCompare_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_name1 /* [in] [charset(UTF16)] */, + const char *_name2 /* [in] [charset(UTF16)] */, + uint32_t _name_type /* [in] */, + uint32_t _flags /* [in] */); +NTSTATUS rpccli_srvsvc_NetPRNameCompare_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetPRNameCompare(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -258,6 +623,17 @@ NTSTATUS rpccli_srvsvc_NetPRNameCompare(struct rpc_pipe_client *cli, uint32_t name_type /* [in] */, uint32_t flags /* [in] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetShareEnum_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + struct srvsvc_NetShareInfoCtr *_info_ctr /* [in,out] [ref] */, + uint32_t _max_buffer /* [in] */, + uint32_t *_totalentries /* [out] [ref] */, + uint32_t *_resume_handle /* [in,out] [unique] */); +NTSTATUS rpccli_srvsvc_NetShareEnum_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetShareEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -266,6 +642,16 @@ NTSTATUS rpccli_srvsvc_NetShareEnum(struct rpc_pipe_client *cli, uint32_t *totalentries /* [out] [ref] */, uint32_t *resume_handle /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetShareDelStart_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_share /* [in] [charset(UTF16)] */, + uint32_t _reserved /* [in] */, + struct policy_handle *_hnd /* [out] [unique] */); +NTSTATUS rpccli_srvsvc_NetShareDelStart_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetShareDelStart(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -273,10 +659,28 @@ NTSTATUS rpccli_srvsvc_NetShareDelStart(struct rpc_pipe_client *cli, uint32_t reserved /* [in] */, struct policy_handle *hnd /* [out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetShareDelCommit_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_hnd /* [in,out] [unique] */); +NTSTATUS rpccli_srvsvc_NetShareDelCommit_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetShareDelCommit(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *hnd /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetGetFileSecurity_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_share /* [in] [unique,charset(UTF16)] */, + const char *_file /* [in] [charset(UTF16)] */, + uint32_t _securityinformation /* [in] */, + struct sec_desc_buf **_sd_buf /* [out] [ref] */); +NTSTATUS rpccli_srvsvc_NetGetFileSecurity_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetGetFileSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -285,6 +689,17 @@ NTSTATUS rpccli_srvsvc_NetGetFileSecurity(struct rpc_pipe_client *cli, uint32_t securityinformation /* [in] */, struct sec_desc_buf **sd_buf /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetSetFileSecurity_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_share /* [in] [unique,charset(UTF16)] */, + const char *_file /* [in] [charset(UTF16)] */, + uint32_t _securityinformation /* [in] */, + struct sec_desc_buf *_sd_buf /* [in] [ref] */); +NTSTATUS rpccli_srvsvc_NetSetFileSecurity_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetSetFileSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -293,12 +708,33 @@ NTSTATUS rpccli_srvsvc_NetSetFileSecurity(struct rpc_pipe_client *cli, uint32_t securityinformation /* [in] */, struct sec_desc_buf *sd_buf /* [in] [ref] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetServerTransportAddEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + union srvsvc_NetTransportInfo _info /* [in] [switch_is(level)] */); +NTSTATUS rpccli_srvsvc_NetServerTransportAddEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetServerTransportAddEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, uint32_t level /* [in] */, union srvsvc_NetTransportInfo info /* [in] [switch_is(level)] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NetServerSetServiceBitsEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_emulated_server_unc /* [in] [unique,charset(UTF16)] */, + const char *_transport /* [in] [unique,charset(UTF16)] */, + uint32_t _servicebitsofinterest /* [in] */, + uint32_t _servicebits /* [in] */, + uint32_t _updateimmediately /* [in] */); +NTSTATUS rpccli_srvsvc_NetServerSetServiceBitsEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NetServerSetServiceBitsEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc /* [in] [unique,charset(UTF16)] */, @@ -308,36 +744,102 @@ NTSTATUS rpccli_srvsvc_NetServerSetServiceBitsEx(struct rpc_pipe_client *cli, uint32_t servicebits /* [in] */, uint32_t updateimmediately /* [in] */, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NETRDFSGETVERSION_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_srvsvc_NETRDFSGETVERSION_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NETRDFSGETVERSION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_srvsvc_NETRDFSCREATELOCALPARTITION_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NETRDFSCREATELOCALPARTITION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_srvsvc_NETRDFSDELETELOCALPARTITION_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NETRDFSDELETELOCALPARTITION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NETRDFSSETSERVERINFO_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_srvsvc_NETRDFSSETSERVERINFO_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NETRDFSSETSERVERINFO(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NETRDFSCREATEEXITPOINT_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_srvsvc_NETRDFSCREATEEXITPOINT_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NETRDFSCREATEEXITPOINT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NETRDFSDELETEEXITPOINT_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_srvsvc_NETRDFSDELETEEXITPOINT_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NETRDFSDELETEEXITPOINT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NETRDFSMODIFYPREFIX_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_srvsvc_NETRDFSMODIFYPREFIX_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NETRDFSMODIFYPREFIX(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_srvsvc_NETRDFSFIXLOCALVOLUME_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NETRDFSFIXLOCALVOLUME(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_srvsvc_NETRSERVERTRANSPORTDELEX_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_srvsvc_NETRSERVERTRANSPORTDELEX(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); diff --git a/librpc/gen_ndr/cli_svcctl.c b/librpc/gen_ndr/cli_svcctl.c index a95a4e72f7..1f814736d9 100644 --- a/librpc/gen_ndr/cli_svcctl.c +++ b/librpc/gen_ndr/cli_svcctl.c @@ -6,6 +6,126 @@ #include "includes.h" #include "../librpc/gen_ndr/cli_svcctl.h" +struct rpccli_svcctl_CloseServiceHandle_state { + struct svcctl_CloseServiceHandle orig; + struct svcctl_CloseServiceHandle tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_CloseServiceHandle_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_CloseServiceHandle_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in,out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_CloseServiceHandle_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_CloseServiceHandle_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_CloseServiceHandle, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_svcctl_CloseServiceHandle_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_svcctl, + NDR_SVCCTL_CLOSESERVICEHANDLE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_CloseServiceHandle_done, req); + return req; +} + +static void rpccli_svcctl_CloseServiceHandle_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_CloseServiceHandle_state *state = tevent_req_data( + req, struct rpccli_svcctl_CloseServiceHandle_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_CloseServiceHandle, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_CloseServiceHandle_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_CloseServiceHandle_state *state = tevent_req_data( + req, struct rpccli_svcctl_CloseServiceHandle_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_svcctl_CloseServiceHandle(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in,out] [ref] */, @@ -50,6 +170,129 @@ NTSTATUS rpccli_svcctl_CloseServiceHandle(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_ControlService_state { + struct svcctl_ControlService orig; + struct svcctl_ControlService tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_ControlService_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_ControlService_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + enum SERVICE_CONTROL _control /* [in] */, + struct SERVICE_STATUS *_service_status /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_ControlService_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_ControlService_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.control = _control; + + /* Out parameters */ + state->orig.out.service_status = _service_status; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_ControlService, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_svcctl_ControlService_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_svcctl, + NDR_SVCCTL_CONTROLSERVICE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_ControlService_done, req); + return req; +} + +static void rpccli_svcctl_ControlService_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_ControlService_state *state = tevent_req_data( + req, struct rpccli_svcctl_ControlService_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.service_status = *state->tmp.out.service_status; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_ControlService, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_ControlService_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_ControlService_state *state = tevent_req_data( + req, struct rpccli_svcctl_ControlService_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_svcctl_ControlService(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -97,6 +340,118 @@ NTSTATUS rpccli_svcctl_ControlService(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_DeleteService_state { + struct svcctl_DeleteService orig; + struct svcctl_DeleteService tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_DeleteService_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_DeleteService_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_DeleteService_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_DeleteService_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_DeleteService, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_svcctl, + NDR_SVCCTL_DELETESERVICE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_DeleteService_done, req); + return req; +} + +static void rpccli_svcctl_DeleteService_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_DeleteService_state *state = tevent_req_data( + req, struct rpccli_svcctl_DeleteService_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_DeleteService, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_DeleteService_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_DeleteService_state *state = tevent_req_data( + req, struct rpccli_svcctl_DeleteService_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_svcctl_DeleteService(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -140,6 +495,127 @@ NTSTATUS rpccli_svcctl_DeleteService(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_LockServiceDatabase_state { + struct svcctl_LockServiceDatabase orig; + struct svcctl_LockServiceDatabase tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_LockServiceDatabase_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_LockServiceDatabase_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct policy_handle *_lock /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_LockServiceDatabase_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_LockServiceDatabase_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + + /* Out parameters */ + state->orig.out.lock = _lock; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_LockServiceDatabase, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_svcctl_LockServiceDatabase_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_svcctl, + NDR_SVCCTL_LOCKSERVICEDATABASE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_LockServiceDatabase_done, req); + return req; +} + +static void rpccli_svcctl_LockServiceDatabase_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_LockServiceDatabase_state *state = tevent_req_data( + req, struct rpccli_svcctl_LockServiceDatabase_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.lock = *state->tmp.out.lock; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_LockServiceDatabase, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_LockServiceDatabase_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_LockServiceDatabase_state *state = tevent_req_data( + req, struct rpccli_svcctl_LockServiceDatabase_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_svcctl_LockServiceDatabase(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -185,6 +661,134 @@ NTSTATUS rpccli_svcctl_LockServiceDatabase(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_QueryServiceObjectSecurity_state { + struct svcctl_QueryServiceObjectSecurity orig; + struct svcctl_QueryServiceObjectSecurity tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_QueryServiceObjectSecurity_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_QueryServiceObjectSecurity_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _security_flags /* [in] */, + uint8_t *_buffer /* [out] [ref,size_is(offered)] */, + uint32_t _offered /* [in] [range(0,0x40000)] */, + uint32_t *_needed /* [out] [ref,range(0,0x40000)] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_QueryServiceObjectSecurity_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_QueryServiceObjectSecurity_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.security_flags = _security_flags; + state->orig.in.offered = _offered; + + /* Out parameters */ + state->orig.out.buffer = _buffer; + state->orig.out.needed = _needed; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_QueryServiceObjectSecurity, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_svcctl_QueryServiceObjectSecurity_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_svcctl, + NDR_SVCCTL_QUERYSERVICEOBJECTSECURITY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_QueryServiceObjectSecurity_done, req); + return req; +} + +static void rpccli_svcctl_QueryServiceObjectSecurity_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_QueryServiceObjectSecurity_state *state = tevent_req_data( + req, struct rpccli_svcctl_QueryServiceObjectSecurity_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 */ + memcpy(state->orig.out.buffer, state->tmp.out.buffer, state->tmp.in.offered * sizeof(*state->orig.out.buffer)); + *state->orig.out.needed = *state->tmp.out.needed; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceObjectSecurity, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_QueryServiceObjectSecurity_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_QueryServiceObjectSecurity_state *state = tevent_req_data( + req, struct rpccli_svcctl_QueryServiceObjectSecurity_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_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -236,6 +840,124 @@ NTSTATUS rpccli_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_SetServiceObjectSecurity_state { + struct svcctl_SetServiceObjectSecurity orig; + struct svcctl_SetServiceObjectSecurity tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_SetServiceObjectSecurity_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_SetServiceObjectSecurity_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _security_flags /* [in] */, + uint8_t *_buffer /* [in] [ref,size_is(offered)] */, + uint32_t _offered /* [in] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_SetServiceObjectSecurity_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_SetServiceObjectSecurity_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.security_flags = _security_flags; + state->orig.in.buffer = _buffer; + state->orig.in.offered = _offered; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_SetServiceObjectSecurity, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_svcctl, + NDR_SVCCTL_SETSERVICEOBJECTSECURITY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_SetServiceObjectSecurity_done, req); + return req; +} + +static void rpccli_svcctl_SetServiceObjectSecurity_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_SetServiceObjectSecurity_state *state = tevent_req_data( + req, struct rpccli_svcctl_SetServiceObjectSecurity_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_SetServiceObjectSecurity, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_SetServiceObjectSecurity_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_SetServiceObjectSecurity_state *state = tevent_req_data( + req, struct rpccli_svcctl_SetServiceObjectSecurity_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_svcctl_SetServiceObjectSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -285,6 +1007,127 @@ NTSTATUS rpccli_svcctl_SetServiceObjectSecurity(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_QueryServiceStatus_state { + struct svcctl_QueryServiceStatus orig; + struct svcctl_QueryServiceStatus tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_QueryServiceStatus_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_QueryServiceStatus_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct SERVICE_STATUS *_service_status /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_QueryServiceStatus_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_QueryServiceStatus_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + + /* Out parameters */ + state->orig.out.service_status = _service_status; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatus, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_svcctl_QueryServiceStatus_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_svcctl, + NDR_SVCCTL_QUERYSERVICESTATUS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_QueryServiceStatus_done, req); + return req; +} + +static void rpccli_svcctl_QueryServiceStatus_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_QueryServiceStatus_state *state = tevent_req_data( + req, struct rpccli_svcctl_QueryServiceStatus_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.service_status = *state->tmp.out.service_status; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatus, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_QueryServiceStatus_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_QueryServiceStatus_state *state = tevent_req_data( + req, struct rpccli_svcctl_QueryServiceStatus_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_svcctl_QueryServiceStatus(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -330,6 +1173,116 @@ NTSTATUS rpccli_svcctl_QueryServiceStatus(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_SetServiceStatus_state { + struct svcctl_SetServiceStatus orig; + struct svcctl_SetServiceStatus tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_SetServiceStatus_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_SetServiceStatus_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_svcctl_SetServiceStatus_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_SetServiceStatus_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_SetServiceStatus, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_svcctl, + NDR_SVCCTL_SETSERVICESTATUS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_SetServiceStatus_done, req); + return req; +} + +static void rpccli_svcctl_SetServiceStatus_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_SetServiceStatus_state *state = tevent_req_data( + req, struct rpccli_svcctl_SetServiceStatus_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_SetServiceStatus, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_SetServiceStatus_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_SetServiceStatus_state *state = tevent_req_data( + req, struct rpccli_svcctl_SetServiceStatus_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_svcctl_SetServiceStatus(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -371,6 +1324,126 @@ NTSTATUS rpccli_svcctl_SetServiceStatus(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_UnlockServiceDatabase_state { + struct svcctl_UnlockServiceDatabase orig; + struct svcctl_UnlockServiceDatabase tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_UnlockServiceDatabase_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_UnlockServiceDatabase_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_lock /* [in,out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_UnlockServiceDatabase_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_UnlockServiceDatabase_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.lock = _lock; + + /* Out parameters */ + state->orig.out.lock = _lock; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_UnlockServiceDatabase, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_svcctl_UnlockServiceDatabase_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_svcctl, + NDR_SVCCTL_UNLOCKSERVICEDATABASE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_UnlockServiceDatabase_done, req); + return req; +} + +static void rpccli_svcctl_UnlockServiceDatabase_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_UnlockServiceDatabase_state *state = tevent_req_data( + req, struct rpccli_svcctl_UnlockServiceDatabase_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.lock = *state->tmp.out.lock; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_UnlockServiceDatabase, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_UnlockServiceDatabase_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_UnlockServiceDatabase_state *state = tevent_req_data( + req, struct rpccli_svcctl_UnlockServiceDatabase_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_svcctl_UnlockServiceDatabase(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *lock /* [in,out] [ref] */, @@ -415,6 +1488,116 @@ NTSTATUS rpccli_svcctl_UnlockServiceDatabase(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_NotifyBootConfigStatus_state { + struct svcctl_NotifyBootConfigStatus orig; + struct svcctl_NotifyBootConfigStatus tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_NotifyBootConfigStatus_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_NotifyBootConfigStatus_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_svcctl_NotifyBootConfigStatus_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_NotifyBootConfigStatus_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_NotifyBootConfigStatus, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_svcctl, + NDR_SVCCTL_NOTIFYBOOTCONFIGSTATUS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_NotifyBootConfigStatus_done, req); + return req; +} + +static void rpccli_svcctl_NotifyBootConfigStatus_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_NotifyBootConfigStatus_state *state = tevent_req_data( + req, struct rpccli_svcctl_NotifyBootConfigStatus_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_NotifyBootConfigStatus, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_NotifyBootConfigStatus_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_NotifyBootConfigStatus_state *state = tevent_req_data( + req, struct rpccli_svcctl_NotifyBootConfigStatus_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_svcctl_NotifyBootConfigStatus(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -456,6 +1639,124 @@ NTSTATUS rpccli_svcctl_NotifyBootConfigStatus(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_SCSetServiceBitsW_state { + struct svcctl_SCSetServiceBitsW orig; + struct svcctl_SCSetServiceBitsW tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_SCSetServiceBitsW_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_SCSetServiceBitsW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _bits /* [in] */, + uint32_t _bitson /* [in] */, + uint32_t _immediate /* [in] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_SCSetServiceBitsW_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_SCSetServiceBitsW_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.bits = _bits; + state->orig.in.bitson = _bitson; + state->orig.in.immediate = _immediate; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_SCSetServiceBitsW, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_svcctl, + NDR_SVCCTL_SCSETSERVICEBITSW, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_SCSetServiceBitsW_done, req); + return req; +} + +static void rpccli_svcctl_SCSetServiceBitsW_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_SCSetServiceBitsW_state *state = tevent_req_data( + req, struct rpccli_svcctl_SCSetServiceBitsW_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsW, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_SCSetServiceBitsW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_SCSetServiceBitsW_state *state = tevent_req_data( + req, struct rpccli_svcctl_SCSetServiceBitsW_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_svcctl_SCSetServiceBitsW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -505,6 +1806,145 @@ NTSTATUS rpccli_svcctl_SCSetServiceBitsW(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_ChangeServiceConfigW_state { + struct svcctl_ChangeServiceConfigW orig; + struct svcctl_ChangeServiceConfigW tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_ChangeServiceConfigW_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_ChangeServiceConfigW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _type /* [in] */, + enum svcctl_StartType _start_type /* [in] */, + enum svcctl_ErrorControl _error_control /* [in] */, + const char *_binary_path /* [in] [unique,charset(UTF16)] */, + const char *_load_order_group /* [in] [unique,charset(UTF16)] */, + uint32_t *_tag_id /* [out] [ref] */, + const char *_dependencies /* [in] [unique,charset(UTF16)] */, + const char *_service_start_name /* [in] [unique,charset(UTF16)] */, + const char *_password /* [in] [unique,charset(UTF16)] */, + const char *_display_name /* [in] [unique,charset(UTF16)] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_ChangeServiceConfigW_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_ChangeServiceConfigW_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.type = _type; + state->orig.in.start_type = _start_type; + state->orig.in.error_control = _error_control; + state->orig.in.binary_path = _binary_path; + state->orig.in.load_order_group = _load_order_group; + state->orig.in.dependencies = _dependencies; + state->orig.in.service_start_name = _service_start_name; + state->orig.in.password = _password; + state->orig.in.display_name = _display_name; + + /* Out parameters */ + state->orig.out.tag_id = _tag_id; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigW, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_svcctl_ChangeServiceConfigW_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_svcctl, + NDR_SVCCTL_CHANGESERVICECONFIGW, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_ChangeServiceConfigW_done, req); + return req; +} + +static void rpccli_svcctl_ChangeServiceConfigW_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_ChangeServiceConfigW_state *state = tevent_req_data( + req, struct rpccli_svcctl_ChangeServiceConfigW_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.tag_id = *state->tmp.out.tag_id; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigW, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_ChangeServiceConfigW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_ChangeServiceConfigW_state *state = tevent_req_data( + req, struct rpccli_svcctl_ChangeServiceConfigW_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_svcctl_ChangeServiceConfigW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -568,6 +2008,159 @@ NTSTATUS rpccli_svcctl_ChangeServiceConfigW(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_CreateServiceW_state { + struct svcctl_CreateServiceW orig; + struct svcctl_CreateServiceW tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_CreateServiceW_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_CreateServiceW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_scmanager_handle /* [in] [ref] */, + const char *_ServiceName /* [in] [charset(UTF16)] */, + const char *_DisplayName /* [in] [unique,charset(UTF16)] */, + uint32_t _desired_access /* [in] */, + uint32_t _type /* [in] */, + enum svcctl_StartType _start_type /* [in] */, + enum svcctl_ErrorControl _error_control /* [in] */, + const char *_binary_path /* [in] [charset(UTF16)] */, + const char *_LoadOrderGroupKey /* [in] [unique,charset(UTF16)] */, + uint32_t *_TagId /* [in,out] [unique] */, + uint8_t *_dependencies /* [in] [unique,size_is(dependencies_size)] */, + uint32_t _dependencies_size /* [in] */, + const char *_service_start_name /* [in] [unique,charset(UTF16)] */, + uint8_t *_password /* [in] [unique,size_is(password_size)] */, + uint32_t _password_size /* [in] */, + struct policy_handle *_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_CreateServiceW_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_CreateServiceW_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.scmanager_handle = _scmanager_handle; + state->orig.in.ServiceName = _ServiceName; + state->orig.in.DisplayName = _DisplayName; + state->orig.in.desired_access = _desired_access; + state->orig.in.type = _type; + state->orig.in.start_type = _start_type; + state->orig.in.error_control = _error_control; + state->orig.in.binary_path = _binary_path; + state->orig.in.LoadOrderGroupKey = _LoadOrderGroupKey; + state->orig.in.TagId = _TagId; + state->orig.in.dependencies = _dependencies; + state->orig.in.dependencies_size = _dependencies_size; + state->orig.in.service_start_name = _service_start_name; + state->orig.in.password = _password; + state->orig.in.password_size = _password_size; + + /* Out parameters */ + state->orig.out.TagId = _TagId; + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_CreateServiceW, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_svcctl_CreateServiceW_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_svcctl, + NDR_SVCCTL_CREATESERVICEW, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_CreateServiceW_done, req); + return req; +} + +static void rpccli_svcctl_CreateServiceW_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_CreateServiceW_state *state = tevent_req_data( + req, struct rpccli_svcctl_CreateServiceW_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 */ + if (state->orig.out.TagId && state->tmp.out.TagId) { + *state->orig.out.TagId = *state->tmp.out.TagId; + } + *state->orig.out.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceW, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_CreateServiceW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_CreateServiceW_state *state = tevent_req_data( + req, struct rpccli_svcctl_CreateServiceW_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_svcctl_CreateServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager_handle /* [in] [ref] */, @@ -644,6 +2237,137 @@ NTSTATUS rpccli_svcctl_CreateServiceW(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_EnumDependentServicesW_state { + struct svcctl_EnumDependentServicesW orig; + struct svcctl_EnumDependentServicesW tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_EnumDependentServicesW_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_EnumDependentServicesW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_service /* [in] [ref] */, + enum svcctl_ServiceState _state /* [in] */, + uint8_t *_service_status /* [out] [ref,size_is(offered)] */, + uint32_t _offered /* [in] [range(0,0x40000)] */, + uint32_t *_needed /* [out] [ref,range(0,0x40000)] */, + uint32_t *_services_returned /* [out] [ref,range(0,0x40000)] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_EnumDependentServicesW_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_EnumDependentServicesW_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.service = _service; + state->orig.in.state = _state; + state->orig.in.offered = _offered; + + /* Out parameters */ + state->orig.out.service_status = _service_status; + state->orig.out.needed = _needed; + state->orig.out.services_returned = _services_returned; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesW, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_svcctl_EnumDependentServicesW_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_svcctl, + NDR_SVCCTL_ENUMDEPENDENTSERVICESW, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_EnumDependentServicesW_done, req); + return req; +} + +static void rpccli_svcctl_EnumDependentServicesW_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_EnumDependentServicesW_state *state = tevent_req_data( + req, struct rpccli_svcctl_EnumDependentServicesW_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 */ + memcpy(state->orig.out.service_status, state->tmp.out.service_status, state->tmp.in.offered * sizeof(*state->orig.out.service_status)); + *state->orig.out.needed = *state->tmp.out.needed; + *state->orig.out.services_returned = *state->tmp.out.services_returned; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesW, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_EnumDependentServicesW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_EnumDependentServicesW_state *state = tevent_req_data( + req, struct rpccli_svcctl_EnumDependentServicesW_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_svcctl_EnumDependentServicesW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *service /* [in] [ref] */, @@ -697,6 +2421,145 @@ NTSTATUS rpccli_svcctl_EnumDependentServicesW(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_EnumServicesStatusW_state { + struct svcctl_EnumServicesStatusW orig; + struct svcctl_EnumServicesStatusW tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_EnumServicesStatusW_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_EnumServicesStatusW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _type /* [in] */, + enum svcctl_ServiceState _state /* [in] */, + uint8_t *_service /* [out] [ref,size_is(offered)] */, + uint32_t _offered /* [in] [range(0,0x40000)] */, + uint32_t *_needed /* [out] [ref,range(0,0x40000)] */, + uint32_t *_services_returned /* [out] [ref,range(0,0x40000)] */, + uint32_t *_resume_handle /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_EnumServicesStatusW_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_EnumServicesStatusW_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.type = _type; + state->orig.in.state = _state; + state->orig.in.offered = _offered; + state->orig.in.resume_handle = _resume_handle; + + /* Out parameters */ + state->orig.out.service = _service; + state->orig.out.needed = _needed; + state->orig.out.services_returned = _services_returned; + state->orig.out.resume_handle = _resume_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusW, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_svcctl_EnumServicesStatusW_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_svcctl, + NDR_SVCCTL_ENUMSERVICESSTATUSW, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_EnumServicesStatusW_done, req); + return req; +} + +static void rpccli_svcctl_EnumServicesStatusW_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_EnumServicesStatusW_state *state = tevent_req_data( + req, struct rpccli_svcctl_EnumServicesStatusW_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 */ + memcpy(state->orig.out.service, state->tmp.out.service, state->tmp.in.offered * sizeof(*state->orig.out.service)); + *state->orig.out.needed = *state->tmp.out.needed; + *state->orig.out.services_returned = *state->tmp.out.services_returned; + if (state->orig.out.resume_handle && state->tmp.out.resume_handle) { + *state->orig.out.resume_handle = *state->tmp.out.resume_handle; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusW, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_EnumServicesStatusW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_EnumServicesStatusW_state *state = tevent_req_data( + req, struct rpccli_svcctl_EnumServicesStatusW_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_svcctl_EnumServicesStatusW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -757,6 +2620,131 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_OpenSCManagerW_state { + struct svcctl_OpenSCManagerW orig; + struct svcctl_OpenSCManagerW tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_OpenSCManagerW_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_OpenSCManagerW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_MachineName /* [in] [unique,charset(UTF16)] */, + const char *_DatabaseName /* [in] [unique,charset(UTF16)] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_OpenSCManagerW_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_OpenSCManagerW_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.MachineName = _MachineName; + state->orig.in.DatabaseName = _DatabaseName; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerW, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_svcctl_OpenSCManagerW_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_svcctl, + NDR_SVCCTL_OPENSCMANAGERW, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_OpenSCManagerW_done, req); + return req; +} + +static void rpccli_svcctl_OpenSCManagerW_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_OpenSCManagerW_state *state = tevent_req_data( + req, struct rpccli_svcctl_OpenSCManagerW_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerW, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_OpenSCManagerW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_OpenSCManagerW_state *state = tevent_req_data( + req, struct rpccli_svcctl_OpenSCManagerW_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_svcctl_OpenSCManagerW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *MachineName /* [in] [unique,charset(UTF16)] */, @@ -806,6 +2794,131 @@ NTSTATUS rpccli_svcctl_OpenSCManagerW(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_OpenServiceW_state { + struct svcctl_OpenServiceW orig; + struct svcctl_OpenServiceW tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_OpenServiceW_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_OpenServiceW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_scmanager_handle /* [in] [ref] */, + const char *_ServiceName /* [in] [charset(UTF16)] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_OpenServiceW_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_OpenServiceW_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.scmanager_handle = _scmanager_handle; + state->orig.in.ServiceName = _ServiceName; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_OpenServiceW, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_svcctl_OpenServiceW_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_svcctl, + NDR_SVCCTL_OPENSERVICEW, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_OpenServiceW_done, req); + return req; +} + +static void rpccli_svcctl_OpenServiceW_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_OpenServiceW_state *state = tevent_req_data( + req, struct rpccli_svcctl_OpenServiceW_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceW, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_OpenServiceW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_OpenServiceW_state *state = tevent_req_data( + req, struct rpccli_svcctl_OpenServiceW_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_svcctl_OpenServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager_handle /* [in] [ref] */, @@ -855,6 +2968,132 @@ NTSTATUS rpccli_svcctl_OpenServiceW(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_QueryServiceConfigW_state { + struct svcctl_QueryServiceConfigW orig; + struct svcctl_QueryServiceConfigW tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_QueryServiceConfigW_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_QueryServiceConfigW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct QUERY_SERVICE_CONFIG *_query /* [out] [ref] */, + uint32_t _offered /* [in] [range(0,8192)] */, + uint32_t *_needed /* [out] [ref,range(0,8192)] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_QueryServiceConfigW_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_QueryServiceConfigW_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.offered = _offered; + + /* Out parameters */ + state->orig.out.query = _query; + state->orig.out.needed = _needed; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigW, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_svcctl_QueryServiceConfigW_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_svcctl, + NDR_SVCCTL_QUERYSERVICECONFIGW, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_QueryServiceConfigW_done, req); + return req; +} + +static void rpccli_svcctl_QueryServiceConfigW_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_QueryServiceConfigW_state *state = tevent_req_data( + req, struct rpccli_svcctl_QueryServiceConfigW_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.query = *state->tmp.out.query; + *state->orig.out.needed = *state->tmp.out.needed; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigW, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_QueryServiceConfigW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_QueryServiceConfigW_state *state = tevent_req_data( + req, struct rpccli_svcctl_QueryServiceConfigW_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_svcctl_QueryServiceConfigW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -904,6 +3143,132 @@ NTSTATUS rpccli_svcctl_QueryServiceConfigW(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_QueryServiceLockStatusW_state { + struct svcctl_QueryServiceLockStatusW orig; + struct svcctl_QueryServiceLockStatusW tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_QueryServiceLockStatusW_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_QueryServiceLockStatusW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _offered /* [in] */, + struct SERVICE_LOCK_STATUS *_lock_status /* [out] [ref] */, + uint32_t *_needed /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_QueryServiceLockStatusW_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_QueryServiceLockStatusW_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.offered = _offered; + + /* Out parameters */ + state->orig.out.lock_status = _lock_status; + state->orig.out.needed = _needed; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusW, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_svcctl_QueryServiceLockStatusW_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_svcctl, + NDR_SVCCTL_QUERYSERVICELOCKSTATUSW, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_QueryServiceLockStatusW_done, req); + return req; +} + +static void rpccli_svcctl_QueryServiceLockStatusW_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_QueryServiceLockStatusW_state *state = tevent_req_data( + req, struct rpccli_svcctl_QueryServiceLockStatusW_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.lock_status = *state->tmp.out.lock_status; + *state->orig.out.needed = *state->tmp.out.needed; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusW, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_QueryServiceLockStatusW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_QueryServiceLockStatusW_state *state = tevent_req_data( + req, struct rpccli_svcctl_QueryServiceLockStatusW_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_svcctl_QueryServiceLockStatusW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -953,6 +3318,122 @@ NTSTATUS rpccli_svcctl_QueryServiceLockStatusW(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_StartServiceW_state { + struct svcctl_StartServiceW orig; + struct svcctl_StartServiceW tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_StartServiceW_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_StartServiceW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _NumArgs /* [in] [range(0,SC_MAX_ARGUMENTS)] */, + struct svcctl_ArgumentString *_Arguments /* [in] [unique,size_is(NumArgs)] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_StartServiceW_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_StartServiceW_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.NumArgs = _NumArgs; + state->orig.in.Arguments = _Arguments; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_StartServiceW, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_svcctl, + NDR_SVCCTL_STARTSERVICEW, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_StartServiceW_done, req); + return req; +} + +static void rpccli_svcctl_StartServiceW_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_StartServiceW_state *state = tevent_req_data( + req, struct rpccli_svcctl_StartServiceW_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_StartServiceW, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_StartServiceW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_StartServiceW_state *state = tevent_req_data( + req, struct rpccli_svcctl_StartServiceW_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_svcctl_StartServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1000,6 +3481,135 @@ NTSTATUS rpccli_svcctl_StartServiceW(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_GetServiceDisplayNameW_state { + struct svcctl_GetServiceDisplayNameW orig; + struct svcctl_GetServiceDisplayNameW tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_GetServiceDisplayNameW_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_GetServiceDisplayNameW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_service_name /* [in] [unique,charset(UTF16)] */, + const char **_display_name /* [out] [ref,charset(UTF16)] */, + uint32_t *_display_name_length /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_GetServiceDisplayNameW_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_GetServiceDisplayNameW_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.service_name = _service_name; + state->orig.in.display_name_length = _display_name_length; + + /* Out parameters */ + state->orig.out.display_name = _display_name; + state->orig.out.display_name_length = _display_name_length; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameW, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_svcctl_GetServiceDisplayNameW_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_svcctl, + NDR_SVCCTL_GETSERVICEDISPLAYNAMEW, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_GetServiceDisplayNameW_done, req); + return req; +} + +static void rpccli_svcctl_GetServiceDisplayNameW_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_GetServiceDisplayNameW_state *state = tevent_req_data( + req, struct rpccli_svcctl_GetServiceDisplayNameW_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.display_name = *state->tmp.out.display_name; + if (state->orig.out.display_name_length && state->tmp.out.display_name_length) { + *state->orig.out.display_name_length = *state->tmp.out.display_name_length; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameW, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_GetServiceDisplayNameW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_GetServiceDisplayNameW_state *state = tevent_req_data( + req, struct rpccli_svcctl_GetServiceDisplayNameW_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_svcctl_GetServiceDisplayNameW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1052,6 +3662,135 @@ NTSTATUS rpccli_svcctl_GetServiceDisplayNameW(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_GetServiceKeyNameW_state { + struct svcctl_GetServiceKeyNameW orig; + struct svcctl_GetServiceKeyNameW tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_GetServiceKeyNameW_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_GetServiceKeyNameW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_service_name /* [in] [unique,charset(UTF16)] */, + const char **_key_name /* [out] [ref,charset(UTF16)] */, + uint32_t *_display_name_length /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_GetServiceKeyNameW_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_GetServiceKeyNameW_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.service_name = _service_name; + state->orig.in.display_name_length = _display_name_length; + + /* Out parameters */ + state->orig.out.key_name = _key_name; + state->orig.out.display_name_length = _display_name_length; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameW, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_svcctl_GetServiceKeyNameW_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_svcctl, + NDR_SVCCTL_GETSERVICEKEYNAMEW, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_GetServiceKeyNameW_done, req); + return req; +} + +static void rpccli_svcctl_GetServiceKeyNameW_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_GetServiceKeyNameW_state *state = tevent_req_data( + req, struct rpccli_svcctl_GetServiceKeyNameW_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.key_name = *state->tmp.out.key_name; + if (state->orig.out.display_name_length && state->tmp.out.display_name_length) { + *state->orig.out.display_name_length = *state->tmp.out.display_name_length; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameW, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_GetServiceKeyNameW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_GetServiceKeyNameW_state *state = tevent_req_data( + req, struct rpccli_svcctl_GetServiceKeyNameW_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_svcctl_GetServiceKeyNameW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1104,6 +3843,124 @@ NTSTATUS rpccli_svcctl_GetServiceKeyNameW(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_SCSetServiceBitsA_state { + struct svcctl_SCSetServiceBitsA orig; + struct svcctl_SCSetServiceBitsA tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_SCSetServiceBitsA_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_SCSetServiceBitsA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _bits /* [in] */, + uint32_t _bitson /* [in] */, + uint32_t _immediate /* [in] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_SCSetServiceBitsA_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_SCSetServiceBitsA_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.bits = _bits; + state->orig.in.bitson = _bitson; + state->orig.in.immediate = _immediate; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_SCSetServiceBitsA, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_svcctl, + NDR_SVCCTL_SCSETSERVICEBITSA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_SCSetServiceBitsA_done, req); + return req; +} + +static void rpccli_svcctl_SCSetServiceBitsA_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_SCSetServiceBitsA_state *state = tevent_req_data( + req, struct rpccli_svcctl_SCSetServiceBitsA_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsA, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_SCSetServiceBitsA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_SCSetServiceBitsA_state *state = tevent_req_data( + req, struct rpccli_svcctl_SCSetServiceBitsA_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_svcctl_SCSetServiceBitsA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1153,6 +4010,145 @@ NTSTATUS rpccli_svcctl_SCSetServiceBitsA(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_ChangeServiceConfigA_state { + struct svcctl_ChangeServiceConfigA orig; + struct svcctl_ChangeServiceConfigA tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_ChangeServiceConfigA_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_ChangeServiceConfigA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _type /* [in] */, + enum svcctl_StartType _start_type /* [in] */, + enum svcctl_ErrorControl _error_control /* [in] */, + const char *_binary_path /* [in] [unique,charset(UTF16)] */, + const char *_load_order_group /* [in] [unique,charset(UTF16)] */, + uint32_t *_tag_id /* [out] [ref] */, + const char *_dependencies /* [in] [unique,charset(UTF16)] */, + const char *_service_start_name /* [in] [unique,charset(UTF16)] */, + const char *_password /* [in] [unique,charset(UTF16)] */, + const char *_display_name /* [in] [unique,charset(UTF16)] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_ChangeServiceConfigA_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_ChangeServiceConfigA_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.type = _type; + state->orig.in.start_type = _start_type; + state->orig.in.error_control = _error_control; + state->orig.in.binary_path = _binary_path; + state->orig.in.load_order_group = _load_order_group; + state->orig.in.dependencies = _dependencies; + state->orig.in.service_start_name = _service_start_name; + state->orig.in.password = _password; + state->orig.in.display_name = _display_name; + + /* Out parameters */ + state->orig.out.tag_id = _tag_id; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfigA, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_svcctl_ChangeServiceConfigA_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_svcctl, + NDR_SVCCTL_CHANGESERVICECONFIGA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_ChangeServiceConfigA_done, req); + return req; +} + +static void rpccli_svcctl_ChangeServiceConfigA_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_ChangeServiceConfigA_state *state = tevent_req_data( + req, struct rpccli_svcctl_ChangeServiceConfigA_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.tag_id = *state->tmp.out.tag_id; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigA, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_ChangeServiceConfigA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_ChangeServiceConfigA_state *state = tevent_req_data( + req, struct rpccli_svcctl_ChangeServiceConfigA_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_svcctl_ChangeServiceConfigA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1216,6 +4212,151 @@ NTSTATUS rpccli_svcctl_ChangeServiceConfigA(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_CreateServiceA_state { + struct svcctl_CreateServiceA orig; + struct svcctl_CreateServiceA tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_CreateServiceA_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_CreateServiceA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_ServiceName /* [in] [unique,charset(UTF16)] */, + const char *_DisplayName /* [in] [unique,charset(UTF16)] */, + uint32_t _desired_access /* [in] */, + uint32_t _type /* [in] */, + enum svcctl_StartType _start_type /* [in] */, + enum svcctl_ErrorControl _error_control /* [in] */, + const char *_binary_path /* [in] [unique,charset(UTF16)] */, + const char *_LoadOrderGroupKey /* [in] [unique,charset(UTF16)] */, + uint32_t *_TagId /* [out] [unique] */, + const char *_dependencies /* [in] [unique,charset(UTF16)] */, + const char *_service_start_name /* [in] [unique,charset(UTF16)] */, + const char *_password /* [in] [unique,charset(UTF16)] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_CreateServiceA_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_CreateServiceA_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.ServiceName = _ServiceName; + state->orig.in.DisplayName = _DisplayName; + state->orig.in.desired_access = _desired_access; + state->orig.in.type = _type; + state->orig.in.start_type = _start_type; + state->orig.in.error_control = _error_control; + state->orig.in.binary_path = _binary_path; + state->orig.in.LoadOrderGroupKey = _LoadOrderGroupKey; + state->orig.in.dependencies = _dependencies; + state->orig.in.service_start_name = _service_start_name; + state->orig.in.password = _password; + + /* Out parameters */ + state->orig.out.TagId = _TagId; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_CreateServiceA, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_svcctl_CreateServiceA_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_svcctl, + NDR_SVCCTL_CREATESERVICEA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_CreateServiceA_done, req); + return req; +} + +static void rpccli_svcctl_CreateServiceA_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_CreateServiceA_state *state = tevent_req_data( + req, struct rpccli_svcctl_CreateServiceA_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 */ + if (state->orig.out.TagId && state->tmp.out.TagId) { + *state->orig.out.TagId = *state->tmp.out.TagId; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceA, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_CreateServiceA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_CreateServiceA_state *state = tevent_req_data( + req, struct rpccli_svcctl_CreateServiceA_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_svcctl_CreateServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1285,6 +4426,139 @@ NTSTATUS rpccli_svcctl_CreateServiceA(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_EnumDependentServicesA_state { + struct svcctl_EnumDependentServicesA orig; + struct svcctl_EnumDependentServicesA tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_EnumDependentServicesA_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_EnumDependentServicesA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_service /* [in] [ref] */, + enum svcctl_ServiceState _state /* [in] */, + struct ENUM_SERVICE_STATUSA *_service_status /* [out] [unique] */, + uint32_t _offered /* [in] */, + uint32_t *_needed /* [out] [ref] */, + uint32_t *_services_returned /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_EnumDependentServicesA_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_EnumDependentServicesA_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.service = _service; + state->orig.in.state = _state; + state->orig.in.offered = _offered; + + /* Out parameters */ + state->orig.out.service_status = _service_status; + state->orig.out.needed = _needed; + state->orig.out.services_returned = _services_returned; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_EnumDependentServicesA, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_svcctl_EnumDependentServicesA_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_svcctl, + NDR_SVCCTL_ENUMDEPENDENTSERVICESA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_EnumDependentServicesA_done, req); + return req; +} + +static void rpccli_svcctl_EnumDependentServicesA_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_EnumDependentServicesA_state *state = tevent_req_data( + req, struct rpccli_svcctl_EnumDependentServicesA_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 */ + if (state->orig.out.service_status && state->tmp.out.service_status) { + *state->orig.out.service_status = *state->tmp.out.service_status; + } + *state->orig.out.needed = *state->tmp.out.needed; + *state->orig.out.services_returned = *state->tmp.out.services_returned; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesA, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_EnumDependentServicesA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_EnumDependentServicesA_state *state = tevent_req_data( + req, struct rpccli_svcctl_EnumDependentServicesA_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_svcctl_EnumDependentServicesA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *service /* [in] [ref] */, @@ -1340,6 +4614,145 @@ NTSTATUS rpccli_svcctl_EnumDependentServicesA(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_EnumServicesStatusA_state { + struct svcctl_EnumServicesStatusA orig; + struct svcctl_EnumServicesStatusA tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_EnumServicesStatusA_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_EnumServicesStatusA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _type /* [in] */, + enum svcctl_ServiceState _state /* [in] */, + uint32_t _offered /* [in] */, + uint8_t *_service /* [out] [size_is(offered)] */, + uint32_t *_needed /* [out] [ref] */, + uint32_t *_services_returned /* [out] [ref] */, + uint32_t *_resume_handle /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_EnumServicesStatusA_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_EnumServicesStatusA_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.type = _type; + state->orig.in.state = _state; + state->orig.in.offered = _offered; + state->orig.in.resume_handle = _resume_handle; + + /* Out parameters */ + state->orig.out.service = _service; + state->orig.out.needed = _needed; + state->orig.out.services_returned = _services_returned; + state->orig.out.resume_handle = _resume_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_EnumServicesStatusA, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_svcctl_EnumServicesStatusA_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_svcctl, + NDR_SVCCTL_ENUMSERVICESSTATUSA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_EnumServicesStatusA_done, req); + return req; +} + +static void rpccli_svcctl_EnumServicesStatusA_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_EnumServicesStatusA_state *state = tevent_req_data( + req, struct rpccli_svcctl_EnumServicesStatusA_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 */ + memcpy(state->orig.out.service, state->tmp.out.service, state->tmp.in.offered * sizeof(*state->orig.out.service)); + *state->orig.out.needed = *state->tmp.out.needed; + *state->orig.out.services_returned = *state->tmp.out.services_returned; + if (state->orig.out.resume_handle && state->tmp.out.resume_handle) { + *state->orig.out.resume_handle = *state->tmp.out.resume_handle; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusA, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_EnumServicesStatusA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_EnumServicesStatusA_state *state = tevent_req_data( + req, struct rpccli_svcctl_EnumServicesStatusA_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_svcctl_EnumServicesStatusA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1400,6 +4813,131 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusA(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_OpenSCManagerA_state { + struct svcctl_OpenSCManagerA orig; + struct svcctl_OpenSCManagerA tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_OpenSCManagerA_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_OpenSCManagerA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_MachineName /* [in] [unique,charset(UTF16)] */, + const char *_DatabaseName /* [in] [unique,charset(UTF16)] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_OpenSCManagerA_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_OpenSCManagerA_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.MachineName = _MachineName; + state->orig.in.DatabaseName = _DatabaseName; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_OpenSCManagerA, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_svcctl_OpenSCManagerA_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_svcctl, + NDR_SVCCTL_OPENSCMANAGERA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_OpenSCManagerA_done, req); + return req; +} + +static void rpccli_svcctl_OpenSCManagerA_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_OpenSCManagerA_state *state = tevent_req_data( + req, struct rpccli_svcctl_OpenSCManagerA_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerA, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_OpenSCManagerA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_OpenSCManagerA_state *state = tevent_req_data( + req, struct rpccli_svcctl_OpenSCManagerA_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_svcctl_OpenSCManagerA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *MachineName /* [in] [unique,charset(UTF16)] */, @@ -1449,6 +4987,122 @@ NTSTATUS rpccli_svcctl_OpenSCManagerA(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_OpenServiceA_state { + struct svcctl_OpenServiceA orig; + struct svcctl_OpenServiceA tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_OpenServiceA_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_OpenServiceA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_scmanager_handle /* [in] [ref] */, + const char *_ServiceName /* [in] [unique,charset(UTF16)] */, + uint32_t _access_mask /* [in] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_OpenServiceA_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_OpenServiceA_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.scmanager_handle = _scmanager_handle; + state->orig.in.ServiceName = _ServiceName; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_OpenServiceA, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_svcctl, + NDR_SVCCTL_OPENSERVICEA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_OpenServiceA_done, req); + return req; +} + +static void rpccli_svcctl_OpenServiceA_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_OpenServiceA_state *state = tevent_req_data( + req, struct rpccli_svcctl_OpenServiceA_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceA, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_OpenServiceA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_OpenServiceA_state *state = tevent_req_data( + req, struct rpccli_svcctl_OpenServiceA_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_svcctl_OpenServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager_handle /* [in] [ref] */, @@ -1496,6 +5150,132 @@ NTSTATUS rpccli_svcctl_OpenServiceA(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_QueryServiceConfigA_state { + struct svcctl_QueryServiceConfigA orig; + struct svcctl_QueryServiceConfigA tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_QueryServiceConfigA_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_QueryServiceConfigA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint8_t *_query /* [out] */, + uint32_t _offered /* [in] */, + uint32_t *_needed /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_QueryServiceConfigA_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_QueryServiceConfigA_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.offered = _offered; + + /* Out parameters */ + state->orig.out.query = _query; + state->orig.out.needed = _needed; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfigA, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_svcctl_QueryServiceConfigA_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_svcctl, + NDR_SVCCTL_QUERYSERVICECONFIGA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_QueryServiceConfigA_done, req); + return req; +} + +static void rpccli_svcctl_QueryServiceConfigA_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_QueryServiceConfigA_state *state = tevent_req_data( + req, struct rpccli_svcctl_QueryServiceConfigA_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 */ + memcpy(state->orig.out.query, state->tmp.out.query, state->tmp.in.offered * sizeof(*state->orig.out.query)); + *state->orig.out.needed = *state->tmp.out.needed; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigA, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_QueryServiceConfigA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_QueryServiceConfigA_state *state = tevent_req_data( + req, struct rpccli_svcctl_QueryServiceConfigA_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_svcctl_QueryServiceConfigA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1545,6 +5325,132 @@ NTSTATUS rpccli_svcctl_QueryServiceConfigA(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_QueryServiceLockStatusA_state { + struct svcctl_QueryServiceLockStatusA orig; + struct svcctl_QueryServiceLockStatusA tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_QueryServiceLockStatusA_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_QueryServiceLockStatusA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _offered /* [in] */, + struct SERVICE_LOCK_STATUS *_lock_status /* [out] [ref] */, + uint32_t *_needed /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_QueryServiceLockStatusA_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_QueryServiceLockStatusA_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.offered = _offered; + + /* Out parameters */ + state->orig.out.lock_status = _lock_status; + state->orig.out.needed = _needed; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_QueryServiceLockStatusA, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_svcctl_QueryServiceLockStatusA_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_svcctl, + NDR_SVCCTL_QUERYSERVICELOCKSTATUSA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_QueryServiceLockStatusA_done, req); + return req; +} + +static void rpccli_svcctl_QueryServiceLockStatusA_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_QueryServiceLockStatusA_state *state = tevent_req_data( + req, struct rpccli_svcctl_QueryServiceLockStatusA_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.lock_status = *state->tmp.out.lock_status; + *state->orig.out.needed = *state->tmp.out.needed; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusA, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_QueryServiceLockStatusA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_QueryServiceLockStatusA_state *state = tevent_req_data( + req, struct rpccli_svcctl_QueryServiceLockStatusA_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_svcctl_QueryServiceLockStatusA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1594,6 +5500,122 @@ NTSTATUS rpccli_svcctl_QueryServiceLockStatusA(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_StartServiceA_state { + struct svcctl_StartServiceA orig; + struct svcctl_StartServiceA tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_StartServiceA_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_StartServiceA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _NumArgs /* [in] */, + const char *_Arguments /* [in] [unique,charset(UTF16)] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_StartServiceA_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_StartServiceA_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.NumArgs = _NumArgs; + state->orig.in.Arguments = _Arguments; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_StartServiceA, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_svcctl, + NDR_SVCCTL_STARTSERVICEA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_StartServiceA_done, req); + return req; +} + +static void rpccli_svcctl_StartServiceA_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_StartServiceA_state *state = tevent_req_data( + req, struct rpccli_svcctl_StartServiceA_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_StartServiceA, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_StartServiceA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_StartServiceA_state *state = tevent_req_data( + req, struct rpccli_svcctl_StartServiceA_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_svcctl_StartServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1641,6 +5663,135 @@ NTSTATUS rpccli_svcctl_StartServiceA(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_GetServiceDisplayNameA_state { + struct svcctl_GetServiceDisplayNameA orig; + struct svcctl_GetServiceDisplayNameA tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_GetServiceDisplayNameA_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_GetServiceDisplayNameA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_service_name /* [in] [unique,charset(UTF16)] */, + const char **_display_name /* [out] [ref,charset(UTF16)] */, + uint32_t *_display_name_length /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_GetServiceDisplayNameA_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_GetServiceDisplayNameA_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.service_name = _service_name; + state->orig.in.display_name_length = _display_name_length; + + /* Out parameters */ + state->orig.out.display_name = _display_name; + state->orig.out.display_name_length = _display_name_length; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_GetServiceDisplayNameA, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_svcctl_GetServiceDisplayNameA_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_svcctl, + NDR_SVCCTL_GETSERVICEDISPLAYNAMEA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_GetServiceDisplayNameA_done, req); + return req; +} + +static void rpccli_svcctl_GetServiceDisplayNameA_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_GetServiceDisplayNameA_state *state = tevent_req_data( + req, struct rpccli_svcctl_GetServiceDisplayNameA_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.display_name = *state->tmp.out.display_name; + if (state->orig.out.display_name_length && state->tmp.out.display_name_length) { + *state->orig.out.display_name_length = *state->tmp.out.display_name_length; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameA, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_GetServiceDisplayNameA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_GetServiceDisplayNameA_state *state = tevent_req_data( + req, struct rpccli_svcctl_GetServiceDisplayNameA_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_svcctl_GetServiceDisplayNameA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1693,6 +5844,135 @@ NTSTATUS rpccli_svcctl_GetServiceDisplayNameA(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_GetServiceKeyNameA_state { + struct svcctl_GetServiceKeyNameA orig; + struct svcctl_GetServiceKeyNameA tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_GetServiceKeyNameA_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_GetServiceKeyNameA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_service_name /* [in] [unique,charset(UTF16)] */, + const char **_key_name /* [out] [ref,charset(UTF16)] */, + uint32_t *_display_name_length /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_GetServiceKeyNameA_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_GetServiceKeyNameA_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.service_name = _service_name; + state->orig.in.display_name_length = _display_name_length; + + /* Out parameters */ + state->orig.out.key_name = _key_name; + state->orig.out.display_name_length = _display_name_length; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_GetServiceKeyNameA, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_svcctl_GetServiceKeyNameA_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_svcctl, + NDR_SVCCTL_GETSERVICEKEYNAMEA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_GetServiceKeyNameA_done, req); + return req; +} + +static void rpccli_svcctl_GetServiceKeyNameA_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_GetServiceKeyNameA_state *state = tevent_req_data( + req, struct rpccli_svcctl_GetServiceKeyNameA_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.key_name = *state->tmp.out.key_name; + if (state->orig.out.display_name_length && state->tmp.out.display_name_length) { + *state->orig.out.display_name_length = *state->tmp.out.display_name_length; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameA, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_GetServiceKeyNameA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_GetServiceKeyNameA_state *state = tevent_req_data( + req, struct rpccli_svcctl_GetServiceKeyNameA_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_svcctl_GetServiceKeyNameA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1745,6 +6025,116 @@ NTSTATUS rpccli_svcctl_GetServiceKeyNameA(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_GetCurrentGroupeStateW_state { + struct svcctl_GetCurrentGroupeStateW orig; + struct svcctl_GetCurrentGroupeStateW tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_GetCurrentGroupeStateW_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_GetCurrentGroupeStateW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_svcctl_GetCurrentGroupeStateW_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_GetCurrentGroupeStateW_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_GetCurrentGroupeStateW, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_svcctl, + NDR_SVCCTL_GETCURRENTGROUPESTATEW, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_GetCurrentGroupeStateW_done, req); + return req; +} + +static void rpccli_svcctl_GetCurrentGroupeStateW_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_GetCurrentGroupeStateW_state *state = tevent_req_data( + req, struct rpccli_svcctl_GetCurrentGroupeStateW_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_GetCurrentGroupeStateW, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_GetCurrentGroupeStateW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_GetCurrentGroupeStateW_state *state = tevent_req_data( + req, struct rpccli_svcctl_GetCurrentGroupeStateW_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_svcctl_GetCurrentGroupeStateW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1786,6 +6176,116 @@ NTSTATUS rpccli_svcctl_GetCurrentGroupeStateW(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_EnumServiceGroupW_state { + struct svcctl_EnumServiceGroupW orig; + struct svcctl_EnumServiceGroupW tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_EnumServiceGroupW_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_EnumServiceGroupW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_svcctl_EnumServiceGroupW_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_EnumServiceGroupW_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_EnumServiceGroupW, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_svcctl, + NDR_SVCCTL_ENUMSERVICEGROUPW, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_EnumServiceGroupW_done, req); + return req; +} + +static void rpccli_svcctl_EnumServiceGroupW_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_EnumServiceGroupW_state *state = tevent_req_data( + req, struct rpccli_svcctl_EnumServiceGroupW_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_EnumServiceGroupW, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_EnumServiceGroupW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_EnumServiceGroupW_state *state = tevent_req_data( + req, struct rpccli_svcctl_EnumServiceGroupW_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_svcctl_EnumServiceGroupW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1827,6 +6327,122 @@ NTSTATUS rpccli_svcctl_EnumServiceGroupW(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_ChangeServiceConfig2A_state { + struct svcctl_ChangeServiceConfig2A orig; + struct svcctl_ChangeServiceConfig2A tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_ChangeServiceConfig2A_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_ChangeServiceConfig2A_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _info_level /* [in] */, + uint8_t *_info /* [in] [unique] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_ChangeServiceConfig2A_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_ChangeServiceConfig2A_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.info_level = _info_level; + state->orig.in.info = _info; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfig2A, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_svcctl, + NDR_SVCCTL_CHANGESERVICECONFIG2A, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_ChangeServiceConfig2A_done, req); + return req; +} + +static void rpccli_svcctl_ChangeServiceConfig2A_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_ChangeServiceConfig2A_state *state = tevent_req_data( + req, struct rpccli_svcctl_ChangeServiceConfig2A_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2A, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_ChangeServiceConfig2A_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_ChangeServiceConfig2A_state *state = tevent_req_data( + req, struct rpccli_svcctl_ChangeServiceConfig2A_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_svcctl_ChangeServiceConfig2A(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1874,6 +6490,122 @@ NTSTATUS rpccli_svcctl_ChangeServiceConfig2A(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_ChangeServiceConfig2W_state { + struct svcctl_ChangeServiceConfig2W orig; + struct svcctl_ChangeServiceConfig2W tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_ChangeServiceConfig2W_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_ChangeServiceConfig2W_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _info_level /* [in] */, + uint8_t *_info /* [in] [unique] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_ChangeServiceConfig2W_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_ChangeServiceConfig2W_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.info_level = _info_level; + state->orig.in.info = _info; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_ChangeServiceConfig2W, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_svcctl, + NDR_SVCCTL_CHANGESERVICECONFIG2W, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_ChangeServiceConfig2W_done, req); + return req; +} + +static void rpccli_svcctl_ChangeServiceConfig2W_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_ChangeServiceConfig2W_state *state = tevent_req_data( + req, struct rpccli_svcctl_ChangeServiceConfig2W_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2W, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_ChangeServiceConfig2W_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_ChangeServiceConfig2W_state *state = tevent_req_data( + req, struct rpccli_svcctl_ChangeServiceConfig2W_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_svcctl_ChangeServiceConfig2W(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1921,6 +6653,134 @@ NTSTATUS rpccli_svcctl_ChangeServiceConfig2W(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_QueryServiceConfig2A_state { + struct svcctl_QueryServiceConfig2A orig; + struct svcctl_QueryServiceConfig2A tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_QueryServiceConfig2A_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_QueryServiceConfig2A_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + enum svcctl_ConfigLevel _info_level /* [in] */, + uint8_t *_buffer /* [out] */, + uint32_t _offered /* [in] */, + uint32_t *_needed /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_QueryServiceConfig2A_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_QueryServiceConfig2A_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.info_level = _info_level; + state->orig.in.offered = _offered; + + /* Out parameters */ + state->orig.out.buffer = _buffer; + state->orig.out.needed = _needed; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2A, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_svcctl_QueryServiceConfig2A_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_svcctl, + NDR_SVCCTL_QUERYSERVICECONFIG2A, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_QueryServiceConfig2A_done, req); + return req; +} + +static void rpccli_svcctl_QueryServiceConfig2A_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_QueryServiceConfig2A_state *state = tevent_req_data( + req, struct rpccli_svcctl_QueryServiceConfig2A_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 */ + memcpy(state->orig.out.buffer, state->tmp.out.buffer, state->tmp.in.offered * sizeof(*state->orig.out.buffer)); + *state->orig.out.needed = *state->tmp.out.needed; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2A, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_QueryServiceConfig2A_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_QueryServiceConfig2A_state *state = tevent_req_data( + req, struct rpccli_svcctl_QueryServiceConfig2A_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_svcctl_QueryServiceConfig2A(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1972,6 +6832,134 @@ NTSTATUS rpccli_svcctl_QueryServiceConfig2A(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_QueryServiceConfig2W_state { + struct svcctl_QueryServiceConfig2W orig; + struct svcctl_QueryServiceConfig2W tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_QueryServiceConfig2W_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_QueryServiceConfig2W_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + enum svcctl_ConfigLevel _info_level /* [in] */, + uint8_t *_buffer /* [out] [ref,size_is(offered)] */, + uint32_t _offered /* [in] [range(0,8192)] */, + uint32_t *_needed /* [out] [ref,range(0,8192)] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_QueryServiceConfig2W_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_QueryServiceConfig2W_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.info_level = _info_level; + state->orig.in.offered = _offered; + + /* Out parameters */ + state->orig.out.buffer = _buffer; + state->orig.out.needed = _needed; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_QueryServiceConfig2W, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_svcctl_QueryServiceConfig2W_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_svcctl, + NDR_SVCCTL_QUERYSERVICECONFIG2W, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_QueryServiceConfig2W_done, req); + return req; +} + +static void rpccli_svcctl_QueryServiceConfig2W_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_QueryServiceConfig2W_state *state = tevent_req_data( + req, struct rpccli_svcctl_QueryServiceConfig2W_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 */ + memcpy(state->orig.out.buffer, state->tmp.out.buffer, state->tmp.in.offered * sizeof(*state->orig.out.buffer)); + *state->orig.out.needed = *state->tmp.out.needed; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2W, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_QueryServiceConfig2W_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_QueryServiceConfig2W_state *state = tevent_req_data( + req, struct rpccli_svcctl_QueryServiceConfig2W_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_svcctl_QueryServiceConfig2W(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -2023,6 +7011,134 @@ NTSTATUS rpccli_svcctl_QueryServiceConfig2W(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_QueryServiceStatusEx_state { + struct svcctl_QueryServiceStatusEx orig; + struct svcctl_QueryServiceStatusEx tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_QueryServiceStatusEx_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_QueryServiceStatusEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + enum svcctl_StatusLevel _info_level /* [in] */, + uint8_t *_buffer /* [out] [ref,size_is(offered)] */, + uint32_t _offered /* [in] [range(0,8192)] */, + uint32_t *_needed /* [out] [ref,range(0,8192)] */) +{ + struct tevent_req *req; + struct rpccli_svcctl_QueryServiceStatusEx_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_QueryServiceStatusEx_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.info_level = _info_level; + state->orig.in.offered = _offered; + + /* Out parameters */ + state->orig.out.buffer = _buffer; + state->orig.out.needed = _needed; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_QueryServiceStatusEx, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_svcctl_QueryServiceStatusEx_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_svcctl, + NDR_SVCCTL_QUERYSERVICESTATUSEX, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_QueryServiceStatusEx_done, req); + return req; +} + +static void rpccli_svcctl_QueryServiceStatusEx_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_QueryServiceStatusEx_state *state = tevent_req_data( + req, struct rpccli_svcctl_QueryServiceStatusEx_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 */ + memcpy(state->orig.out.buffer, state->tmp.out.buffer, state->tmp.in.offered * sizeof(*state->orig.out.buffer)); + *state->orig.out.needed = *state->tmp.out.needed; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatusEx, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_QueryServiceStatusEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_QueryServiceStatusEx_state *state = tevent_req_data( + req, struct rpccli_svcctl_QueryServiceStatusEx_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_svcctl_QueryServiceStatusEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -2074,6 +7190,150 @@ NTSTATUS rpccli_svcctl_QueryServiceStatusEx(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_EnumServicesStatusExA_state { + struct EnumServicesStatusExA orig; + struct EnumServicesStatusExA tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_EnumServicesStatusExA_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_EnumServicesStatusExA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_scmanager /* [in] [ref] */, + uint32_t _info_level /* [in] */, + uint32_t _type /* [in] */, + enum svcctl_ServiceState _state /* [in] */, + uint8_t *_services /* [out] */, + uint32_t _offered /* [in] */, + uint32_t *_needed /* [out] [ref] */, + uint32_t *_service_returned /* [out] [ref] */, + uint32_t *_resume_handle /* [in,out] [unique] */, + const char **_group_name /* [out] [ref,charset(UTF16)] */) +{ + struct tevent_req *req; + struct rpccli_EnumServicesStatusExA_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_EnumServicesStatusExA_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.scmanager = _scmanager; + state->orig.in.info_level = _info_level; + state->orig.in.type = _type; + state->orig.in.state = _state; + state->orig.in.offered = _offered; + state->orig.in.resume_handle = _resume_handle; + + /* Out parameters */ + state->orig.out.services = _services; + state->orig.out.needed = _needed; + state->orig.out.service_returned = _service_returned; + state->orig.out.resume_handle = _resume_handle; + state->orig.out.group_name = _group_name; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(EnumServicesStatusExA, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_EnumServicesStatusExA_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_svcctl, + NDR_ENUMSERVICESSTATUSEXA, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_EnumServicesStatusExA_done, req); + return req; +} + +static void rpccli_EnumServicesStatusExA_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_EnumServicesStatusExA_state *state = tevent_req_data( + req, struct rpccli_EnumServicesStatusExA_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 */ + memcpy(state->orig.out.services, state->tmp.out.services, state->tmp.in.offered * sizeof(*state->orig.out.services)); + *state->orig.out.needed = *state->tmp.out.needed; + *state->orig.out.service_returned = *state->tmp.out.service_returned; + if (state->orig.out.resume_handle && state->tmp.out.resume_handle) { + *state->orig.out.resume_handle = *state->tmp.out.resume_handle; + } + *state->orig.out.group_name = *state->tmp.out.group_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(EnumServicesStatusExA, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_EnumServicesStatusExA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_EnumServicesStatusExA_state *state = tevent_req_data( + req, struct rpccli_EnumServicesStatusExA_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_EnumServicesStatusExA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager /* [in] [ref] */, @@ -2138,6 +7398,149 @@ NTSTATUS rpccli_EnumServicesStatusExA(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_EnumServicesStatusExW_state { + struct EnumServicesStatusExW orig; + struct EnumServicesStatusExW tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_EnumServicesStatusExW_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_EnumServicesStatusExW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_scmanager /* [in] [ref] */, + uint32_t _info_level /* [in] */, + uint32_t _type /* [in] */, + enum svcctl_ServiceState _state /* [in] */, + uint8_t *_services /* [out] [ref,size_is(offered)] */, + uint32_t _offered /* [in] [range(0,0x40000)] */, + uint32_t *_needed /* [out] [ref,range(0,0x40000)] */, + uint32_t *_service_returned /* [out] [ref,range(0,0x40000)] */, + uint32_t *_resume_handle /* [in,out] [unique,range(0,0x40000)] */, + const char *_group_name /* [in] [unique,charset(UTF16)] */) +{ + struct tevent_req *req; + struct rpccli_EnumServicesStatusExW_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_EnumServicesStatusExW_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.scmanager = _scmanager; + state->orig.in.info_level = _info_level; + state->orig.in.type = _type; + state->orig.in.state = _state; + state->orig.in.offered = _offered; + state->orig.in.resume_handle = _resume_handle; + state->orig.in.group_name = _group_name; + + /* Out parameters */ + state->orig.out.services = _services; + state->orig.out.needed = _needed; + state->orig.out.service_returned = _service_returned; + state->orig.out.resume_handle = _resume_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(EnumServicesStatusExW, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_EnumServicesStatusExW_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_svcctl, + NDR_ENUMSERVICESSTATUSEXW, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_EnumServicesStatusExW_done, req); + return req; +} + +static void rpccli_EnumServicesStatusExW_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_EnumServicesStatusExW_state *state = tevent_req_data( + req, struct rpccli_EnumServicesStatusExW_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 */ + memcpy(state->orig.out.services, state->tmp.out.services, state->tmp.in.offered * sizeof(*state->orig.out.services)); + *state->orig.out.needed = *state->tmp.out.needed; + *state->orig.out.service_returned = *state->tmp.out.service_returned; + if (state->orig.out.resume_handle && state->tmp.out.resume_handle) { + *state->orig.out.resume_handle = *state->tmp.out.resume_handle; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(EnumServicesStatusExW, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_EnumServicesStatusExW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_EnumServicesStatusExW_state *state = tevent_req_data( + req, struct rpccli_EnumServicesStatusExW_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_EnumServicesStatusExW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager /* [in] [ref] */, @@ -2202,6 +7605,116 @@ NTSTATUS rpccli_EnumServicesStatusExW(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_svcctl_SCSendTSMessage_state { + struct svcctl_SCSendTSMessage orig; + struct svcctl_SCSendTSMessage tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_svcctl_SCSendTSMessage_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_svcctl_SCSendTSMessage_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_svcctl_SCSendTSMessage_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_svcctl_SCSendTSMessage_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(svcctl_SCSendTSMessage, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_svcctl, + NDR_SVCCTL_SCSENDTSMESSAGE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_svcctl_SCSendTSMessage_done, req); + return req; +} + +static void rpccli_svcctl_SCSendTSMessage_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_svcctl_SCSendTSMessage_state *state = tevent_req_data( + req, struct rpccli_svcctl_SCSendTSMessage_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(svcctl_SCSendTSMessage, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_svcctl_SCSendTSMessage_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_svcctl_SCSendTSMessage_state *state = tevent_req_data( + req, struct rpccli_svcctl_SCSendTSMessage_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_svcctl_SCSendTSMessage(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) diff --git a/librpc/gen_ndr/cli_svcctl.h b/librpc/gen_ndr/cli_svcctl.h index fcfb219d38..40a37f10ee 100644 --- a/librpc/gen_ndr/cli_svcctl.h +++ b/librpc/gen_ndr/cli_svcctl.h @@ -1,25 +1,67 @@ #include "../librpc/gen_ndr/ndr_svcctl.h" #ifndef __CLI_SVCCTL__ #define __CLI_SVCCTL__ +struct tevent_req *rpccli_svcctl_CloseServiceHandle_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in,out] [ref] */); +NTSTATUS rpccli_svcctl_CloseServiceHandle_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_CloseServiceHandle(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in,out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_ControlService_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + enum SERVICE_CONTROL _control /* [in] */, + struct SERVICE_STATUS *_service_status /* [out] [ref] */); +NTSTATUS rpccli_svcctl_ControlService_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_ControlService(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, enum SERVICE_CONTROL control /* [in] */, struct SERVICE_STATUS *service_status /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_DeleteService_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */); +NTSTATUS rpccli_svcctl_DeleteService_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_DeleteService(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_LockServiceDatabase_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct policy_handle *_lock /* [out] [ref] */); +NTSTATUS rpccli_svcctl_LockServiceDatabase_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_LockServiceDatabase(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct policy_handle *lock /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_QueryServiceObjectSecurity_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _security_flags /* [in] */, + uint8_t *_buffer /* [out] [ref,size_is(offered)] */, + uint32_t _offered /* [in] [range(0,0x40000)] */, + uint32_t *_needed /* [out] [ref,range(0,0x40000)] */); +NTSTATUS rpccli_svcctl_QueryServiceObjectSecurity_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -28,6 +70,16 @@ NTSTATUS rpccli_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client *cli, uint32_t offered /* [in] [range(0,0x40000)] */, uint32_t *needed /* [out] [ref,range(0,0x40000)] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_SetServiceObjectSecurity_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _security_flags /* [in] */, + uint8_t *_buffer /* [in] [ref,size_is(offered)] */, + uint32_t _offered /* [in] */); +NTSTATUS rpccli_svcctl_SetServiceObjectSecurity_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_SetServiceObjectSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -35,21 +87,58 @@ NTSTATUS rpccli_svcctl_SetServiceObjectSecurity(struct rpc_pipe_client *cli, uint8_t *buffer /* [in] [ref,size_is(offered)] */, uint32_t offered /* [in] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_QueryServiceStatus_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct SERVICE_STATUS *_service_status /* [out] [ref] */); +NTSTATUS rpccli_svcctl_QueryServiceStatus_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_QueryServiceStatus(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct SERVICE_STATUS *service_status /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_SetServiceStatus_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_svcctl_SetServiceStatus_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_SetServiceStatus(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_svcctl_UnlockServiceDatabase_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_lock /* [in,out] [ref] */); +NTSTATUS rpccli_svcctl_UnlockServiceDatabase_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_UnlockServiceDatabase(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *lock /* [in,out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_NotifyBootConfigStatus_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_svcctl_NotifyBootConfigStatus_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_NotifyBootConfigStatus(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_svcctl_SCSetServiceBitsW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _bits /* [in] */, + uint32_t _bitson /* [in] */, + uint32_t _immediate /* [in] */); +NTSTATUS rpccli_svcctl_SCSetServiceBitsW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_SCSetServiceBitsW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -57,6 +146,23 @@ NTSTATUS rpccli_svcctl_SCSetServiceBitsW(struct rpc_pipe_client *cli, uint32_t bitson /* [in] */, uint32_t immediate /* [in] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_ChangeServiceConfigW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _type /* [in] */, + enum svcctl_StartType _start_type /* [in] */, + enum svcctl_ErrorControl _error_control /* [in] */, + const char *_binary_path /* [in] [unique,charset(UTF16)] */, + const char *_load_order_group /* [in] [unique,charset(UTF16)] */, + uint32_t *_tag_id /* [out] [ref] */, + const char *_dependencies /* [in] [unique,charset(UTF16)] */, + const char *_service_start_name /* [in] [unique,charset(UTF16)] */, + const char *_password /* [in] [unique,charset(UTF16)] */, + const char *_display_name /* [in] [unique,charset(UTF16)] */); +NTSTATUS rpccli_svcctl_ChangeServiceConfigW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_ChangeServiceConfigW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -71,6 +177,28 @@ NTSTATUS rpccli_svcctl_ChangeServiceConfigW(struct rpc_pipe_client *cli, const char *password /* [in] [unique,charset(UTF16)] */, const char *display_name /* [in] [unique,charset(UTF16)] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_CreateServiceW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_scmanager_handle /* [in] [ref] */, + const char *_ServiceName /* [in] [charset(UTF16)] */, + const char *_DisplayName /* [in] [unique,charset(UTF16)] */, + uint32_t _desired_access /* [in] */, + uint32_t _type /* [in] */, + enum svcctl_StartType _start_type /* [in] */, + enum svcctl_ErrorControl _error_control /* [in] */, + const char *_binary_path /* [in] [charset(UTF16)] */, + const char *_LoadOrderGroupKey /* [in] [unique,charset(UTF16)] */, + uint32_t *_TagId /* [in,out] [unique] */, + uint8_t *_dependencies /* [in] [unique,size_is(dependencies_size)] */, + uint32_t _dependencies_size /* [in] */, + const char *_service_start_name /* [in] [unique,charset(UTF16)] */, + uint8_t *_password /* [in] [unique,size_is(password_size)] */, + uint32_t _password_size /* [in] */, + struct policy_handle *_handle /* [out] [ref] */); +NTSTATUS rpccli_svcctl_CreateServiceW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_CreateServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager_handle /* [in] [ref] */, @@ -90,6 +218,18 @@ NTSTATUS rpccli_svcctl_CreateServiceW(struct rpc_pipe_client *cli, uint32_t password_size /* [in] */, struct policy_handle *handle /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_EnumDependentServicesW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_service /* [in] [ref] */, + enum svcctl_ServiceState _state /* [in] */, + uint8_t *_service_status /* [out] [ref,size_is(offered)] */, + uint32_t _offered /* [in] [range(0,0x40000)] */, + uint32_t *_needed /* [out] [ref,range(0,0x40000)] */, + uint32_t *_services_returned /* [out] [ref,range(0,0x40000)] */); +NTSTATUS rpccli_svcctl_EnumDependentServicesW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_EnumDependentServicesW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *service /* [in] [ref] */, @@ -99,6 +239,20 @@ NTSTATUS rpccli_svcctl_EnumDependentServicesW(struct rpc_pipe_client *cli, uint32_t *needed /* [out] [ref,range(0,0x40000)] */, uint32_t *services_returned /* [out] [ref,range(0,0x40000)] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_EnumServicesStatusW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _type /* [in] */, + enum svcctl_ServiceState _state /* [in] */, + uint8_t *_service /* [out] [ref,size_is(offered)] */, + uint32_t _offered /* [in] [range(0,0x40000)] */, + uint32_t *_needed /* [out] [ref,range(0,0x40000)] */, + uint32_t *_services_returned /* [out] [ref,range(0,0x40000)] */, + uint32_t *_resume_handle /* [in,out] [unique] */); +NTSTATUS rpccli_svcctl_EnumServicesStatusW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -110,6 +264,16 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client *cli, uint32_t *services_returned /* [out] [ref,range(0,0x40000)] */, uint32_t *resume_handle /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_OpenSCManagerW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_MachineName /* [in] [unique,charset(UTF16)] */, + const char *_DatabaseName /* [in] [unique,charset(UTF16)] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */); +NTSTATUS rpccli_svcctl_OpenSCManagerW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_OpenSCManagerW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *MachineName /* [in] [unique,charset(UTF16)] */, @@ -117,6 +281,16 @@ NTSTATUS rpccli_svcctl_OpenSCManagerW(struct rpc_pipe_client *cli, uint32_t access_mask /* [in] */, struct policy_handle *handle /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_OpenServiceW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_scmanager_handle /* [in] [ref] */, + const char *_ServiceName /* [in] [charset(UTF16)] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */); +NTSTATUS rpccli_svcctl_OpenServiceW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_OpenServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager_handle /* [in] [ref] */, @@ -124,6 +298,16 @@ NTSTATUS rpccli_svcctl_OpenServiceW(struct rpc_pipe_client *cli, uint32_t access_mask /* [in] */, struct policy_handle *handle /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_QueryServiceConfigW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct QUERY_SERVICE_CONFIG *_query /* [out] [ref] */, + uint32_t _offered /* [in] [range(0,8192)] */, + uint32_t *_needed /* [out] [ref,range(0,8192)] */); +NTSTATUS rpccli_svcctl_QueryServiceConfigW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_QueryServiceConfigW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -131,6 +315,16 @@ NTSTATUS rpccli_svcctl_QueryServiceConfigW(struct rpc_pipe_client *cli, uint32_t offered /* [in] [range(0,8192)] */, uint32_t *needed /* [out] [ref,range(0,8192)] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_QueryServiceLockStatusW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _offered /* [in] */, + struct SERVICE_LOCK_STATUS *_lock_status /* [out] [ref] */, + uint32_t *_needed /* [out] [ref] */); +NTSTATUS rpccli_svcctl_QueryServiceLockStatusW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_QueryServiceLockStatusW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -138,12 +332,31 @@ NTSTATUS rpccli_svcctl_QueryServiceLockStatusW(struct rpc_pipe_client *cli, struct SERVICE_LOCK_STATUS *lock_status /* [out] [ref] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_StartServiceW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _NumArgs /* [in] [range(0,SC_MAX_ARGUMENTS)] */, + struct svcctl_ArgumentString *_Arguments /* [in] [unique,size_is(NumArgs)] */); +NTSTATUS rpccli_svcctl_StartServiceW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_StartServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t NumArgs /* [in] [range(0,SC_MAX_ARGUMENTS)] */, struct svcctl_ArgumentString *Arguments /* [in] [unique,size_is(NumArgs)] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_GetServiceDisplayNameW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_service_name /* [in] [unique,charset(UTF16)] */, + const char **_display_name /* [out] [ref,charset(UTF16)] */, + uint32_t *_display_name_length /* [in,out] [unique] */); +NTSTATUS rpccli_svcctl_GetServiceDisplayNameW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_GetServiceDisplayNameW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -151,6 +364,16 @@ NTSTATUS rpccli_svcctl_GetServiceDisplayNameW(struct rpc_pipe_client *cli, const char **display_name /* [out] [ref,charset(UTF16)] */, uint32_t *display_name_length /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_GetServiceKeyNameW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_service_name /* [in] [unique,charset(UTF16)] */, + const char **_key_name /* [out] [ref,charset(UTF16)] */, + uint32_t *_display_name_length /* [in,out] [unique] */); +NTSTATUS rpccli_svcctl_GetServiceKeyNameW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_GetServiceKeyNameW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -158,6 +381,16 @@ NTSTATUS rpccli_svcctl_GetServiceKeyNameW(struct rpc_pipe_client *cli, const char **key_name /* [out] [ref,charset(UTF16)] */, uint32_t *display_name_length /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_SCSetServiceBitsA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _bits /* [in] */, + uint32_t _bitson /* [in] */, + uint32_t _immediate /* [in] */); +NTSTATUS rpccli_svcctl_SCSetServiceBitsA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_SCSetServiceBitsA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -165,6 +398,23 @@ NTSTATUS rpccli_svcctl_SCSetServiceBitsA(struct rpc_pipe_client *cli, uint32_t bitson /* [in] */, uint32_t immediate /* [in] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_ChangeServiceConfigA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _type /* [in] */, + enum svcctl_StartType _start_type /* [in] */, + enum svcctl_ErrorControl _error_control /* [in] */, + const char *_binary_path /* [in] [unique,charset(UTF16)] */, + const char *_load_order_group /* [in] [unique,charset(UTF16)] */, + uint32_t *_tag_id /* [out] [ref] */, + const char *_dependencies /* [in] [unique,charset(UTF16)] */, + const char *_service_start_name /* [in] [unique,charset(UTF16)] */, + const char *_password /* [in] [unique,charset(UTF16)] */, + const char *_display_name /* [in] [unique,charset(UTF16)] */); +NTSTATUS rpccli_svcctl_ChangeServiceConfigA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_ChangeServiceConfigA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -179,6 +429,25 @@ NTSTATUS rpccli_svcctl_ChangeServiceConfigA(struct rpc_pipe_client *cli, const char *password /* [in] [unique,charset(UTF16)] */, const char *display_name /* [in] [unique,charset(UTF16)] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_CreateServiceA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_ServiceName /* [in] [unique,charset(UTF16)] */, + const char *_DisplayName /* [in] [unique,charset(UTF16)] */, + uint32_t _desired_access /* [in] */, + uint32_t _type /* [in] */, + enum svcctl_StartType _start_type /* [in] */, + enum svcctl_ErrorControl _error_control /* [in] */, + const char *_binary_path /* [in] [unique,charset(UTF16)] */, + const char *_LoadOrderGroupKey /* [in] [unique,charset(UTF16)] */, + uint32_t *_TagId /* [out] [unique] */, + const char *_dependencies /* [in] [unique,charset(UTF16)] */, + const char *_service_start_name /* [in] [unique,charset(UTF16)] */, + const char *_password /* [in] [unique,charset(UTF16)] */); +NTSTATUS rpccli_svcctl_CreateServiceA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_CreateServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -195,6 +464,18 @@ NTSTATUS rpccli_svcctl_CreateServiceA(struct rpc_pipe_client *cli, const char *service_start_name /* [in] [unique,charset(UTF16)] */, const char *password /* [in] [unique,charset(UTF16)] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_EnumDependentServicesA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_service /* [in] [ref] */, + enum svcctl_ServiceState _state /* [in] */, + struct ENUM_SERVICE_STATUSA *_service_status /* [out] [unique] */, + uint32_t _offered /* [in] */, + uint32_t *_needed /* [out] [ref] */, + uint32_t *_services_returned /* [out] [ref] */); +NTSTATUS rpccli_svcctl_EnumDependentServicesA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_EnumDependentServicesA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *service /* [in] [ref] */, @@ -204,6 +485,20 @@ NTSTATUS rpccli_svcctl_EnumDependentServicesA(struct rpc_pipe_client *cli, uint32_t *needed /* [out] [ref] */, uint32_t *services_returned /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_EnumServicesStatusA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _type /* [in] */, + enum svcctl_ServiceState _state /* [in] */, + uint32_t _offered /* [in] */, + uint8_t *_service /* [out] [size_is(offered)] */, + uint32_t *_needed /* [out] [ref] */, + uint32_t *_services_returned /* [out] [ref] */, + uint32_t *_resume_handle /* [in,out] [unique] */); +NTSTATUS rpccli_svcctl_EnumServicesStatusA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_EnumServicesStatusA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -215,6 +510,16 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusA(struct rpc_pipe_client *cli, uint32_t *services_returned /* [out] [ref] */, uint32_t *resume_handle /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_OpenSCManagerA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_MachineName /* [in] [unique,charset(UTF16)] */, + const char *_DatabaseName /* [in] [unique,charset(UTF16)] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */); +NTSTATUS rpccli_svcctl_OpenSCManagerA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_OpenSCManagerA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *MachineName /* [in] [unique,charset(UTF16)] */, @@ -222,12 +527,31 @@ NTSTATUS rpccli_svcctl_OpenSCManagerA(struct rpc_pipe_client *cli, uint32_t access_mask /* [in] */, struct policy_handle *handle /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_OpenServiceA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_scmanager_handle /* [in] [ref] */, + const char *_ServiceName /* [in] [unique,charset(UTF16)] */, + uint32_t _access_mask /* [in] */); +NTSTATUS rpccli_svcctl_OpenServiceA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_OpenServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager_handle /* [in] [ref] */, const char *ServiceName /* [in] [unique,charset(UTF16)] */, uint32_t access_mask /* [in] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_QueryServiceConfigA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint8_t *_query /* [out] */, + uint32_t _offered /* [in] */, + uint32_t *_needed /* [out] [ref] */); +NTSTATUS rpccli_svcctl_QueryServiceConfigA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_QueryServiceConfigA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -235,6 +559,16 @@ NTSTATUS rpccli_svcctl_QueryServiceConfigA(struct rpc_pipe_client *cli, uint32_t offered /* [in] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_QueryServiceLockStatusA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _offered /* [in] */, + struct SERVICE_LOCK_STATUS *_lock_status /* [out] [ref] */, + uint32_t *_needed /* [out] [ref] */); +NTSTATUS rpccli_svcctl_QueryServiceLockStatusA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_QueryServiceLockStatusA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -242,12 +576,31 @@ NTSTATUS rpccli_svcctl_QueryServiceLockStatusA(struct rpc_pipe_client *cli, struct SERVICE_LOCK_STATUS *lock_status /* [out] [ref] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_StartServiceA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _NumArgs /* [in] */, + const char *_Arguments /* [in] [unique,charset(UTF16)] */); +NTSTATUS rpccli_svcctl_StartServiceA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_StartServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t NumArgs /* [in] */, const char *Arguments /* [in] [unique,charset(UTF16)] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_GetServiceDisplayNameA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_service_name /* [in] [unique,charset(UTF16)] */, + const char **_display_name /* [out] [ref,charset(UTF16)] */, + uint32_t *_display_name_length /* [in,out] [unique] */); +NTSTATUS rpccli_svcctl_GetServiceDisplayNameA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_GetServiceDisplayNameA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -255,6 +608,16 @@ NTSTATUS rpccli_svcctl_GetServiceDisplayNameA(struct rpc_pipe_client *cli, const char **display_name /* [out] [ref,charset(UTF16)] */, uint32_t *display_name_length /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_GetServiceKeyNameA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + const char *_service_name /* [in] [unique,charset(UTF16)] */, + const char **_key_name /* [out] [ref,charset(UTF16)] */, + uint32_t *_display_name_length /* [in,out] [unique] */); +NTSTATUS rpccli_svcctl_GetServiceKeyNameA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_GetServiceKeyNameA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -262,24 +625,65 @@ NTSTATUS rpccli_svcctl_GetServiceKeyNameA(struct rpc_pipe_client *cli, const char **key_name /* [out] [ref,charset(UTF16)] */, uint32_t *display_name_length /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_GetCurrentGroupeStateW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_svcctl_GetCurrentGroupeStateW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_GetCurrentGroupeStateW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_svcctl_EnumServiceGroupW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_svcctl_EnumServiceGroupW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_EnumServiceGroupW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_svcctl_ChangeServiceConfig2A_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _info_level /* [in] */, + uint8_t *_info /* [in] [unique] */); +NTSTATUS rpccli_svcctl_ChangeServiceConfig2A_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_ChangeServiceConfig2A(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t info_level /* [in] */, uint8_t *info /* [in] [unique] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_ChangeServiceConfig2W_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _info_level /* [in] */, + uint8_t *_info /* [in] [unique] */); +NTSTATUS rpccli_svcctl_ChangeServiceConfig2W_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_ChangeServiceConfig2W(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t info_level /* [in] */, uint8_t *info /* [in] [unique] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_QueryServiceConfig2A_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + enum svcctl_ConfigLevel _info_level /* [in] */, + uint8_t *_buffer /* [out] */, + uint32_t _offered /* [in] */, + uint32_t *_needed /* [out] [ref] */); +NTSTATUS rpccli_svcctl_QueryServiceConfig2A_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_QueryServiceConfig2A(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -288,6 +692,17 @@ NTSTATUS rpccli_svcctl_QueryServiceConfig2A(struct rpc_pipe_client *cli, uint32_t offered /* [in] */, uint32_t *needed /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_QueryServiceConfig2W_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + enum svcctl_ConfigLevel _info_level /* [in] */, + uint8_t *_buffer /* [out] [ref,size_is(offered)] */, + uint32_t _offered /* [in] [range(0,8192)] */, + uint32_t *_needed /* [out] [ref,range(0,8192)] */); +NTSTATUS rpccli_svcctl_QueryServiceConfig2W_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_QueryServiceConfig2W(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -296,6 +711,17 @@ NTSTATUS rpccli_svcctl_QueryServiceConfig2W(struct rpc_pipe_client *cli, uint32_t offered /* [in] [range(0,8192)] */, uint32_t *needed /* [out] [ref,range(0,8192)] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_QueryServiceStatusEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + enum svcctl_StatusLevel _info_level /* [in] */, + uint8_t *_buffer /* [out] [ref,size_is(offered)] */, + uint32_t _offered /* [in] [range(0,8192)] */, + uint32_t *_needed /* [out] [ref,range(0,8192)] */); +NTSTATUS rpccli_svcctl_QueryServiceStatusEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_QueryServiceStatusEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -304,6 +730,22 @@ NTSTATUS rpccli_svcctl_QueryServiceStatusEx(struct rpc_pipe_client *cli, uint32_t offered /* [in] [range(0,8192)] */, uint32_t *needed /* [out] [ref,range(0,8192)] */, WERROR *werror); +struct tevent_req *rpccli_EnumServicesStatusExA_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_scmanager /* [in] [ref] */, + uint32_t _info_level /* [in] */, + uint32_t _type /* [in] */, + enum svcctl_ServiceState _state /* [in] */, + uint8_t *_services /* [out] */, + uint32_t _offered /* [in] */, + uint32_t *_needed /* [out] [ref] */, + uint32_t *_service_returned /* [out] [ref] */, + uint32_t *_resume_handle /* [in,out] [unique] */, + const char **_group_name /* [out] [ref,charset(UTF16)] */); +NTSTATUS rpccli_EnumServicesStatusExA_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_EnumServicesStatusExA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager /* [in] [ref] */, @@ -317,6 +759,22 @@ NTSTATUS rpccli_EnumServicesStatusExA(struct rpc_pipe_client *cli, uint32_t *resume_handle /* [in,out] [unique] */, const char **group_name /* [out] [ref,charset(UTF16)] */, WERROR *werror); +struct tevent_req *rpccli_EnumServicesStatusExW_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_scmanager /* [in] [ref] */, + uint32_t _info_level /* [in] */, + uint32_t _type /* [in] */, + enum svcctl_ServiceState _state /* [in] */, + uint8_t *_services /* [out] [ref,size_is(offered)] */, + uint32_t _offered /* [in] [range(0,0x40000)] */, + uint32_t *_needed /* [out] [ref,range(0,0x40000)] */, + uint32_t *_service_returned /* [out] [ref,range(0,0x40000)] */, + uint32_t *_resume_handle /* [in,out] [unique,range(0,0x40000)] */, + const char *_group_name /* [in] [unique,charset(UTF16)] */); +NTSTATUS rpccli_EnumServicesStatusExW_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_EnumServicesStatusExW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager /* [in] [ref] */, @@ -330,6 +788,12 @@ NTSTATUS rpccli_EnumServicesStatusExW(struct rpc_pipe_client *cli, uint32_t *resume_handle /* [in,out] [unique,range(0,0x40000)] */, const char *group_name /* [in] [unique,charset(UTF16)] */, WERROR *werror); +struct tevent_req *rpccli_svcctl_SCSendTSMessage_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_svcctl_SCSendTSMessage_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_svcctl_SCSendTSMessage(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); diff --git a/librpc/gen_ndr/cli_winreg.c b/librpc/gen_ndr/cli_winreg.c index b18554e63e..d0936028a4 100644 --- a/librpc/gen_ndr/cli_winreg.c +++ b/librpc/gen_ndr/cli_winreg.c @@ -6,6 +6,129 @@ #include "includes.h" #include "../librpc/gen_ndr/cli_winreg.h" +struct rpccli_winreg_OpenHKCR_state { + struct winreg_OpenHKCR orig; + struct winreg_OpenHKCR tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_OpenHKCR_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_OpenHKCR_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_system_name /* [in] [unique] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_winreg_OpenHKCR_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_OpenHKCR_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.system_name = _system_name; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_OpenHKCR, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_winreg_OpenHKCR_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_winreg, + NDR_WINREG_OPENHKCR, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_OpenHKCR_done, req); + return req; +} + +static void rpccli_winreg_OpenHKCR_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_OpenHKCR_state *state = tevent_req_data( + req, struct rpccli_winreg_OpenHKCR_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_OpenHKCR, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_OpenHKCR_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_OpenHKCR_state *state = tevent_req_data( + req, struct rpccli_winreg_OpenHKCR_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_winreg_OpenHKCR(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name /* [in] [unique] */, @@ -53,6 +176,129 @@ NTSTATUS rpccli_winreg_OpenHKCR(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_OpenHKCU_state { + struct winreg_OpenHKCU orig; + struct winreg_OpenHKCU tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_OpenHKCU_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_OpenHKCU_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_system_name /* [in] [unique] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_winreg_OpenHKCU_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_OpenHKCU_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.system_name = _system_name; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_OpenHKCU, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_winreg_OpenHKCU_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_winreg, + NDR_WINREG_OPENHKCU, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_OpenHKCU_done, req); + return req; +} + +static void rpccli_winreg_OpenHKCU_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_OpenHKCU_state *state = tevent_req_data( + req, struct rpccli_winreg_OpenHKCU_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_OpenHKCU, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_OpenHKCU_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_OpenHKCU_state *state = tevent_req_data( + req, struct rpccli_winreg_OpenHKCU_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_winreg_OpenHKCU(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name /* [in] [unique] */, @@ -100,6 +346,129 @@ NTSTATUS rpccli_winreg_OpenHKCU(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_OpenHKLM_state { + struct winreg_OpenHKLM orig; + struct winreg_OpenHKLM tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_OpenHKLM_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_OpenHKLM_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_system_name /* [in] [unique] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_winreg_OpenHKLM_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_OpenHKLM_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.system_name = _system_name; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_OpenHKLM, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_winreg_OpenHKLM_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_winreg, + NDR_WINREG_OPENHKLM, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_OpenHKLM_done, req); + return req; +} + +static void rpccli_winreg_OpenHKLM_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_OpenHKLM_state *state = tevent_req_data( + req, struct rpccli_winreg_OpenHKLM_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_OpenHKLM, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_OpenHKLM_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_OpenHKLM_state *state = tevent_req_data( + req, struct rpccli_winreg_OpenHKLM_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_winreg_OpenHKLM(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name /* [in] [unique] */, @@ -147,6 +516,129 @@ NTSTATUS rpccli_winreg_OpenHKLM(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_OpenHKPD_state { + struct winreg_OpenHKPD orig; + struct winreg_OpenHKPD tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_OpenHKPD_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_OpenHKPD_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_system_name /* [in] [unique] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_winreg_OpenHKPD_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_OpenHKPD_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.system_name = _system_name; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_OpenHKPD, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_winreg_OpenHKPD_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_winreg, + NDR_WINREG_OPENHKPD, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_OpenHKPD_done, req); + return req; +} + +static void rpccli_winreg_OpenHKPD_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_OpenHKPD_state *state = tevent_req_data( + req, struct rpccli_winreg_OpenHKPD_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_OpenHKPD, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_OpenHKPD_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_OpenHKPD_state *state = tevent_req_data( + req, struct rpccli_winreg_OpenHKPD_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_winreg_OpenHKPD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name /* [in] [unique] */, @@ -194,6 +686,129 @@ NTSTATUS rpccli_winreg_OpenHKPD(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_OpenHKU_state { + struct winreg_OpenHKU orig; + struct winreg_OpenHKU tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_OpenHKU_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_OpenHKU_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_system_name /* [in] [unique] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_winreg_OpenHKU_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_OpenHKU_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.system_name = _system_name; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_OpenHKU, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_winreg_OpenHKU_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_winreg, + NDR_WINREG_OPENHKU, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_OpenHKU_done, req); + return req; +} + +static void rpccli_winreg_OpenHKU_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_OpenHKU_state *state = tevent_req_data( + req, struct rpccli_winreg_OpenHKU_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_OpenHKU, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_OpenHKU_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_OpenHKU_state *state = tevent_req_data( + req, struct rpccli_winreg_OpenHKU_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_winreg_OpenHKU(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name /* [in] [unique] */, @@ -241,6 +856,126 @@ NTSTATUS rpccli_winreg_OpenHKU(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_CloseKey_state { + struct winreg_CloseKey orig; + struct winreg_CloseKey tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_CloseKey_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_CloseKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in,out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_winreg_CloseKey_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_CloseKey_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_CloseKey, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_winreg_CloseKey_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_winreg, + NDR_WINREG_CLOSEKEY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_CloseKey_done, req); + return req; +} + +static void rpccli_winreg_CloseKey_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_CloseKey_state *state = tevent_req_data( + req, struct rpccli_winreg_CloseKey_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_CloseKey, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_CloseKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_CloseKey_state *state = tevent_req_data( + req, struct rpccli_winreg_CloseKey_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_winreg_CloseKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in,out] [ref] */, @@ -285,6 +1020,143 @@ NTSTATUS rpccli_winreg_CloseKey(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_CreateKey_state { + struct winreg_CreateKey orig; + struct winreg_CreateKey tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_CreateKey_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_CreateKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct winreg_String _name /* [in] */, + struct winreg_String _keyclass /* [in] */, + uint32_t _options /* [in] */, + uint32_t _access_mask /* [in] */, + struct winreg_SecBuf *_secdesc /* [in] [unique] */, + struct policy_handle *_new_handle /* [out] [ref] */, + enum winreg_CreateAction *_action_taken /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_winreg_CreateKey_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_CreateKey_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.name = _name; + state->orig.in.keyclass = _keyclass; + state->orig.in.options = _options; + state->orig.in.access_mask = _access_mask; + state->orig.in.secdesc = _secdesc; + state->orig.in.action_taken = _action_taken; + + /* Out parameters */ + state->orig.out.new_handle = _new_handle; + state->orig.out.action_taken = _action_taken; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_CreateKey, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_winreg_CreateKey_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_winreg, + NDR_WINREG_CREATEKEY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_CreateKey_done, req); + return req; +} + +static void rpccli_winreg_CreateKey_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_CreateKey_state *state = tevent_req_data( + req, struct rpccli_winreg_CreateKey_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.new_handle = *state->tmp.out.new_handle; + if (state->orig.out.action_taken && state->tmp.out.action_taken) { + *state->orig.out.action_taken = *state->tmp.out.action_taken; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_CreateKey, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_CreateKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_CreateKey_state *state = tevent_req_data( + req, struct rpccli_winreg_CreateKey_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_winreg_CreateKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -345,6 +1217,120 @@ NTSTATUS rpccli_winreg_CreateKey(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_DeleteKey_state { + struct winreg_DeleteKey orig; + struct winreg_DeleteKey tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_DeleteKey_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_DeleteKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct winreg_String _key /* [in] */) +{ + struct tevent_req *req; + struct rpccli_winreg_DeleteKey_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_DeleteKey_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.key = _key; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_DeleteKey, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_winreg, + NDR_WINREG_DELETEKEY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_DeleteKey_done, req); + return req; +} + +static void rpccli_winreg_DeleteKey_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_DeleteKey_state *state = tevent_req_data( + req, struct rpccli_winreg_DeleteKey_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_DeleteKey, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_DeleteKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_DeleteKey_state *state = tevent_req_data( + req, struct rpccli_winreg_DeleteKey_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_winreg_DeleteKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -390,6 +1376,120 @@ NTSTATUS rpccli_winreg_DeleteKey(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_DeleteValue_state { + struct winreg_DeleteValue orig; + struct winreg_DeleteValue tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_DeleteValue_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_DeleteValue_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct winreg_String _value /* [in] */) +{ + struct tevent_req *req; + struct rpccli_winreg_DeleteValue_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_DeleteValue_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.value = _value; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_DeleteValue, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_winreg, + NDR_WINREG_DELETEVALUE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_DeleteValue_done, req); + return req; +} + +static void rpccli_winreg_DeleteValue_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_DeleteValue_state *state = tevent_req_data( + req, struct rpccli_winreg_DeleteValue_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_DeleteValue, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_DeleteValue_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_DeleteValue_state *state = tevent_req_data( + req, struct rpccli_winreg_DeleteValue_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_winreg_DeleteValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -435,6 +1535,142 @@ NTSTATUS rpccli_winreg_DeleteValue(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_EnumKey_state { + struct winreg_EnumKey orig; + struct winreg_EnumKey tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_EnumKey_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_EnumKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _enum_index /* [in] */, + struct winreg_StringBuf *_name /* [in,out] [ref] */, + struct winreg_StringBuf *_keyclass /* [in,out] [unique] */, + NTTIME *_last_changed_time /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_winreg_EnumKey_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_EnumKey_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.enum_index = _enum_index; + state->orig.in.name = _name; + state->orig.in.keyclass = _keyclass; + state->orig.in.last_changed_time = _last_changed_time; + + /* Out parameters */ + state->orig.out.name = _name; + state->orig.out.keyclass = _keyclass; + state->orig.out.last_changed_time = _last_changed_time; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_EnumKey, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_winreg_EnumKey_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_winreg, + NDR_WINREG_ENUMKEY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_EnumKey_done, req); + return req; +} + +static void rpccli_winreg_EnumKey_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_EnumKey_state *state = tevent_req_data( + req, struct rpccli_winreg_EnumKey_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.name = *state->tmp.out.name; + if (state->orig.out.keyclass && state->tmp.out.keyclass) { + *state->orig.out.keyclass = *state->tmp.out.keyclass; + } + if (state->orig.out.last_changed_time && state->tmp.out.last_changed_time) { + *state->orig.out.last_changed_time = *state->tmp.out.last_changed_time; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_EnumKey, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_EnumKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_EnumKey_state *state = tevent_req_data( + req, struct rpccli_winreg_EnumKey_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_winreg_EnumKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -493,6 +1729,154 @@ NTSTATUS rpccli_winreg_EnumKey(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_EnumValue_state { + struct winreg_EnumValue orig; + struct winreg_EnumValue tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_EnumValue_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_EnumValue_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _enum_index /* [in] */, + struct winreg_ValNameBuf *_name /* [in,out] [ref] */, + enum winreg_Type *_type /* [in,out] [unique] */, + uint8_t *_value /* [in,out] [unique,length_is(*length),size_is(*size)] */, + uint32_t *_size /* [in,out] [unique] */, + uint32_t *_length /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_winreg_EnumValue_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_EnumValue_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.enum_index = _enum_index; + state->orig.in.name = _name; + state->orig.in.type = _type; + state->orig.in.value = _value; + state->orig.in.size = _size; + state->orig.in.length = _length; + + /* Out parameters */ + state->orig.out.name = _name; + state->orig.out.type = _type; + state->orig.out.value = _value; + state->orig.out.size = _size; + state->orig.out.length = _length; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_EnumValue, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_winreg_EnumValue_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_winreg, + NDR_WINREG_ENUMVALUE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_EnumValue_done, req); + return req; +} + +static void rpccli_winreg_EnumValue_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_EnumValue_state *state = tevent_req_data( + req, struct rpccli_winreg_EnumValue_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.name = *state->tmp.out.name; + if (state->orig.out.type && state->tmp.out.type) { + *state->orig.out.type = *state->tmp.out.type; + } + if (state->orig.out.value && state->tmp.out.value) { + memcpy(state->orig.out.value, state->tmp.out.value, *state->tmp.in.size * sizeof(*state->orig.out.value)); + } + if (state->orig.out.size && state->tmp.out.size) { + *state->orig.out.size = *state->tmp.out.size; + } + if (state->orig.out.length && state->tmp.out.length) { + *state->orig.out.length = *state->tmp.out.length; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_EnumValue, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_EnumValue_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_EnumValue_state *state = tevent_req_data( + req, struct rpccli_winreg_EnumValue_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_winreg_EnumValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -561,6 +1945,118 @@ NTSTATUS rpccli_winreg_EnumValue(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_FlushKey_state { + struct winreg_FlushKey orig; + struct winreg_FlushKey tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_FlushKey_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_FlushKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_winreg_FlushKey_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_FlushKey_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_FlushKey, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_winreg, + NDR_WINREG_FLUSHKEY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_FlushKey_done, req); + return req; +} + +static void rpccli_winreg_FlushKey_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_FlushKey_state *state = tevent_req_data( + req, struct rpccli_winreg_FlushKey_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_FlushKey, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_FlushKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_FlushKey_state *state = tevent_req_data( + req, struct rpccli_winreg_FlushKey_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_winreg_FlushKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -604,6 +2100,130 @@ NTSTATUS rpccli_winreg_FlushKey(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_GetKeySecurity_state { + struct winreg_GetKeySecurity orig; + struct winreg_GetKeySecurity tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_GetKeySecurity_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_GetKeySecurity_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _sec_info /* [in] */, + struct KeySecurityData *_sd /* [in,out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_winreg_GetKeySecurity_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_GetKeySecurity_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.sec_info = _sec_info; + state->orig.in.sd = _sd; + + /* Out parameters */ + state->orig.out.sd = _sd; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_GetKeySecurity, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_winreg_GetKeySecurity_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_winreg, + NDR_WINREG_GETKEYSECURITY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_GetKeySecurity_done, req); + return req; +} + +static void rpccli_winreg_GetKeySecurity_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_GetKeySecurity_state *state = tevent_req_data( + req, struct rpccli_winreg_GetKeySecurity_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.sd = *state->tmp.out.sd; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_GetKeySecurity, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_GetKeySecurity_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_GetKeySecurity_state *state = tevent_req_data( + req, struct rpccli_winreg_GetKeySecurity_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_winreg_GetKeySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -652,6 +2272,122 @@ NTSTATUS rpccli_winreg_GetKeySecurity(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_LoadKey_state { + struct winreg_LoadKey orig; + struct winreg_LoadKey tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_LoadKey_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_LoadKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct winreg_String *_keyname /* [in] [unique] */, + struct winreg_String *_filename /* [in] [unique] */) +{ + struct tevent_req *req; + struct rpccli_winreg_LoadKey_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_LoadKey_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.keyname = _keyname; + state->orig.in.filename = _filename; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_LoadKey, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_winreg, + NDR_WINREG_LOADKEY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_LoadKey_done, req); + return req; +} + +static void rpccli_winreg_LoadKey_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_LoadKey_state *state = tevent_req_data( + req, struct rpccli_winreg_LoadKey_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_LoadKey, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_LoadKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_LoadKey_state *state = tevent_req_data( + req, struct rpccli_winreg_LoadKey_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_winreg_LoadKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -699,6 +2435,130 @@ NTSTATUS rpccli_winreg_LoadKey(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_NotifyChangeKeyValue_state { + struct winreg_NotifyChangeKeyValue orig; + struct winreg_NotifyChangeKeyValue tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_NotifyChangeKeyValue_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_NotifyChangeKeyValue_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint8_t _watch_subtree /* [in] */, + uint32_t _notify_filter /* [in] */, + uint32_t _unknown /* [in] */, + struct winreg_String _string1 /* [in] */, + struct winreg_String _string2 /* [in] */, + uint32_t _unknown2 /* [in] */) +{ + struct tevent_req *req; + struct rpccli_winreg_NotifyChangeKeyValue_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_NotifyChangeKeyValue_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.watch_subtree = _watch_subtree; + state->orig.in.notify_filter = _notify_filter; + state->orig.in.unknown = _unknown; + state->orig.in.string1 = _string1; + state->orig.in.string2 = _string2; + state->orig.in.unknown2 = _unknown2; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_NotifyChangeKeyValue, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_winreg, + NDR_WINREG_NOTIFYCHANGEKEYVALUE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_NotifyChangeKeyValue_done, req); + return req; +} + +static void rpccli_winreg_NotifyChangeKeyValue_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_NotifyChangeKeyValue_state *state = tevent_req_data( + req, struct rpccli_winreg_NotifyChangeKeyValue_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_NotifyChangeKeyValue, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_NotifyChangeKeyValue_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_NotifyChangeKeyValue_state *state = tevent_req_data( + req, struct rpccli_winreg_NotifyChangeKeyValue_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_winreg_NotifyChangeKeyValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -754,6 +2614,133 @@ NTSTATUS rpccli_winreg_NotifyChangeKeyValue(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_OpenKey_state { + struct winreg_OpenKey orig; + struct winreg_OpenKey tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_OpenKey_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_OpenKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_parent_handle /* [in] [ref] */, + struct winreg_String _keyname /* [in] */, + uint32_t _unknown /* [in] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_winreg_OpenKey_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_OpenKey_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.parent_handle = _parent_handle; + state->orig.in.keyname = _keyname; + state->orig.in.unknown = _unknown; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_OpenKey, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_winreg_OpenKey_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_winreg, + NDR_WINREG_OPENKEY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_OpenKey_done, req); + return req; +} + +static void rpccli_winreg_OpenKey_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_OpenKey_state *state = tevent_req_data( + req, struct rpccli_winreg_OpenKey_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_OpenKey, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_OpenKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_OpenKey_state *state = tevent_req_data( + req, struct rpccli_winreg_OpenKey_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_winreg_OpenKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *parent_handle /* [in] [ref] */, @@ -805,6 +2792,152 @@ NTSTATUS rpccli_winreg_OpenKey(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_QueryInfoKey_state { + struct winreg_QueryInfoKey orig; + struct winreg_QueryInfoKey tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_QueryInfoKey_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_QueryInfoKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct winreg_String *_classname /* [in,out] [ref] */, + uint32_t *_num_subkeys /* [out] [ref] */, + uint32_t *_max_subkeylen /* [out] [ref] */, + uint32_t *_max_classlen /* [out] [ref] */, + uint32_t *_num_values /* [out] [ref] */, + uint32_t *_max_valnamelen /* [out] [ref] */, + uint32_t *_max_valbufsize /* [out] [ref] */, + uint32_t *_secdescsize /* [out] [ref] */, + NTTIME *_last_changed_time /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_winreg_QueryInfoKey_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_QueryInfoKey_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.classname = _classname; + + /* Out parameters */ + state->orig.out.classname = _classname; + state->orig.out.num_subkeys = _num_subkeys; + state->orig.out.max_subkeylen = _max_subkeylen; + state->orig.out.max_classlen = _max_classlen; + state->orig.out.num_values = _num_values; + state->orig.out.max_valnamelen = _max_valnamelen; + state->orig.out.max_valbufsize = _max_valbufsize; + state->orig.out.secdescsize = _secdescsize; + state->orig.out.last_changed_time = _last_changed_time; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_QueryInfoKey, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_winreg_QueryInfoKey_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_winreg, + NDR_WINREG_QUERYINFOKEY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_QueryInfoKey_done, req); + return req; +} + +static void rpccli_winreg_QueryInfoKey_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_QueryInfoKey_state *state = tevent_req_data( + req, struct rpccli_winreg_QueryInfoKey_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.classname = *state->tmp.out.classname; + *state->orig.out.num_subkeys = *state->tmp.out.num_subkeys; + *state->orig.out.max_subkeylen = *state->tmp.out.max_subkeylen; + *state->orig.out.max_classlen = *state->tmp.out.max_classlen; + *state->orig.out.num_values = *state->tmp.out.num_values; + *state->orig.out.max_valnamelen = *state->tmp.out.max_valnamelen; + *state->orig.out.max_valbufsize = *state->tmp.out.max_valbufsize; + *state->orig.out.secdescsize = *state->tmp.out.secdescsize; + *state->orig.out.last_changed_time = *state->tmp.out.last_changed_time; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_QueryInfoKey, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_QueryInfoKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_QueryInfoKey_state *state = tevent_req_data( + req, struct rpccli_winreg_QueryInfoKey_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_winreg_QueryInfoKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -867,6 +3000,150 @@ NTSTATUS rpccli_winreg_QueryInfoKey(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_QueryValue_state { + struct winreg_QueryValue orig; + struct winreg_QueryValue tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_QueryValue_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_QueryValue_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct winreg_String *_value_name /* [in] [ref] */, + enum winreg_Type *_type /* [in,out] [unique] */, + uint8_t *_data /* [in,out] [unique,length_is(*data_length),size_is(*data_size)] */, + uint32_t *_data_size /* [in,out] [unique] */, + uint32_t *_data_length /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_winreg_QueryValue_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_QueryValue_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.value_name = _value_name; + state->orig.in.type = _type; + state->orig.in.data = _data; + state->orig.in.data_size = _data_size; + state->orig.in.data_length = _data_length; + + /* Out parameters */ + state->orig.out.type = _type; + state->orig.out.data = _data; + state->orig.out.data_size = _data_size; + state->orig.out.data_length = _data_length; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_QueryValue, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_winreg_QueryValue_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_winreg, + NDR_WINREG_QUERYVALUE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_QueryValue_done, req); + return req; +} + +static void rpccli_winreg_QueryValue_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_QueryValue_state *state = tevent_req_data( + req, struct rpccli_winreg_QueryValue_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 */ + if (state->orig.out.type && state->tmp.out.type) { + *state->orig.out.type = *state->tmp.out.type; + } + if (state->orig.out.data && state->tmp.out.data) { + memcpy(state->orig.out.data, state->tmp.out.data, *state->tmp.in.data_size * sizeof(*state->orig.out.data)); + } + if (state->orig.out.data_size && state->tmp.out.data_size) { + *state->orig.out.data_size = *state->tmp.out.data_size; + } + if (state->orig.out.data_length && state->tmp.out.data_length) { + *state->orig.out.data_length = *state->tmp.out.data_length; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_QueryValue, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_QueryValue_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_QueryValue_state *state = tevent_req_data( + req, struct rpccli_winreg_QueryValue_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_winreg_QueryValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -932,6 +3209,116 @@ NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_ReplaceKey_state { + struct winreg_ReplaceKey orig; + struct winreg_ReplaceKey tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_ReplaceKey_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_ReplaceKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_winreg_ReplaceKey_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_ReplaceKey_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_ReplaceKey, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_winreg, + NDR_WINREG_REPLACEKEY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_ReplaceKey_done, req); + return req; +} + +static void rpccli_winreg_ReplaceKey_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_ReplaceKey_state *state = tevent_req_data( + req, struct rpccli_winreg_ReplaceKey_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_ReplaceKey, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_ReplaceKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_ReplaceKey_state *state = tevent_req_data( + req, struct rpccli_winreg_ReplaceKey_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_winreg_ReplaceKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -973,6 +3360,122 @@ NTSTATUS rpccli_winreg_ReplaceKey(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_RestoreKey_state { + struct winreg_RestoreKey orig; + struct winreg_RestoreKey tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_RestoreKey_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_RestoreKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct winreg_String *_filename /* [in] [ref] */, + uint32_t _flags /* [in] */) +{ + struct tevent_req *req; + struct rpccli_winreg_RestoreKey_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_RestoreKey_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.filename = _filename; + state->orig.in.flags = _flags; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_RestoreKey, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_winreg, + NDR_WINREG_RESTOREKEY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_RestoreKey_done, req); + return req; +} + +static void rpccli_winreg_RestoreKey_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_RestoreKey_state *state = tevent_req_data( + req, struct rpccli_winreg_RestoreKey_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_RestoreKey, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_RestoreKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_RestoreKey_state *state = tevent_req_data( + req, struct rpccli_winreg_RestoreKey_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_winreg_RestoreKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1020,6 +3523,122 @@ NTSTATUS rpccli_winreg_RestoreKey(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_SaveKey_state { + struct winreg_SaveKey orig; + struct winreg_SaveKey tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_SaveKey_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_SaveKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct winreg_String *_filename /* [in] [ref] */, + struct KeySecurityAttribute *_sec_attrib /* [in] [unique] */) +{ + struct tevent_req *req; + struct rpccli_winreg_SaveKey_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_SaveKey_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.filename = _filename; + state->orig.in.sec_attrib = _sec_attrib; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_SaveKey, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_winreg, + NDR_WINREG_SAVEKEY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_SaveKey_done, req); + return req; +} + +static void rpccli_winreg_SaveKey_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_SaveKey_state *state = tevent_req_data( + req, struct rpccli_winreg_SaveKey_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_SaveKey, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_SaveKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_SaveKey_state *state = tevent_req_data( + req, struct rpccli_winreg_SaveKey_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_winreg_SaveKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1067,6 +3686,122 @@ NTSTATUS rpccli_winreg_SaveKey(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_SetKeySecurity_state { + struct winreg_SetKeySecurity orig; + struct winreg_SetKeySecurity tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_SetKeySecurity_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_SetKeySecurity_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _sec_info /* [in] */, + struct KeySecurityData *_sd /* [in] [ref] */) +{ + struct tevent_req *req; + struct rpccli_winreg_SetKeySecurity_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_SetKeySecurity_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.sec_info = _sec_info; + state->orig.in.sd = _sd; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_SetKeySecurity, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_winreg, + NDR_WINREG_SETKEYSECURITY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_SetKeySecurity_done, req); + return req; +} + +static void rpccli_winreg_SetKeySecurity_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_SetKeySecurity_state *state = tevent_req_data( + req, struct rpccli_winreg_SetKeySecurity_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_SetKeySecurity, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_SetKeySecurity_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_SetKeySecurity_state *state = tevent_req_data( + req, struct rpccli_winreg_SetKeySecurity_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_winreg_SetKeySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1114,6 +3849,126 @@ NTSTATUS rpccli_winreg_SetKeySecurity(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_SetValue_state { + struct winreg_SetValue orig; + struct winreg_SetValue tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_SetValue_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_SetValue_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct winreg_String _name /* [in] */, + enum winreg_Type _type /* [in] */, + uint8_t *_data /* [in] [ref,size_is(size)] */, + uint32_t _size /* [in] */) +{ + struct tevent_req *req; + struct rpccli_winreg_SetValue_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_SetValue_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + state->orig.in.name = _name; + state->orig.in.type = _type; + state->orig.in.data = _data; + state->orig.in.size = _size; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_SetValue, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_winreg, + NDR_WINREG_SETVALUE, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_SetValue_done, req); + return req; +} + +static void rpccli_winreg_SetValue_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_SetValue_state *state = tevent_req_data( + req, struct rpccli_winreg_SetValue_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_SetValue, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_SetValue_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_SetValue_state *state = tevent_req_data( + req, struct rpccli_winreg_SetValue_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_winreg_SetValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1165,6 +4020,116 @@ NTSTATUS rpccli_winreg_SetValue(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_UnLoadKey_state { + struct winreg_UnLoadKey orig; + struct winreg_UnLoadKey tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_UnLoadKey_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_UnLoadKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_winreg_UnLoadKey_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_UnLoadKey_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_UnLoadKey, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_winreg, + NDR_WINREG_UNLOADKEY, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_UnLoadKey_done, req); + return req; +} + +static void rpccli_winreg_UnLoadKey_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_UnLoadKey_state *state = tevent_req_data( + req, struct rpccli_winreg_UnLoadKey_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_UnLoadKey, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_UnLoadKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_UnLoadKey_state *state = tevent_req_data( + req, struct rpccli_winreg_UnLoadKey_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_winreg_UnLoadKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1206,6 +4171,126 @@ NTSTATUS rpccli_winreg_UnLoadKey(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_InitiateSystemShutdown_state { + struct winreg_InitiateSystemShutdown orig; + struct winreg_InitiateSystemShutdown tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_InitiateSystemShutdown_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_InitiateSystemShutdown_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_hostname /* [in] [unique] */, + struct lsa_StringLarge *_message /* [in] [unique] */, + uint32_t _timeout /* [in] */, + uint8_t _force_apps /* [in] */, + uint8_t _do_reboot /* [in] */) +{ + struct tevent_req *req; + struct rpccli_winreg_InitiateSystemShutdown_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_InitiateSystemShutdown_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.hostname = _hostname; + state->orig.in.message = _message; + state->orig.in.timeout = _timeout; + state->orig.in.force_apps = _force_apps; + state->orig.in.do_reboot = _do_reboot; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_InitiateSystemShutdown, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_winreg, + NDR_WINREG_INITIATESYSTEMSHUTDOWN, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_InitiateSystemShutdown_done, req); + return req; +} + +static void rpccli_winreg_InitiateSystemShutdown_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_InitiateSystemShutdown_state *state = tevent_req_data( + req, struct rpccli_winreg_InitiateSystemShutdown_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_InitiateSystemShutdown, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_InitiateSystemShutdown_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_InitiateSystemShutdown_state *state = tevent_req_data( + req, struct rpccli_winreg_InitiateSystemShutdown_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_winreg_InitiateSystemShutdown(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *hostname /* [in] [unique] */, @@ -1257,6 +4342,118 @@ NTSTATUS rpccli_winreg_InitiateSystemShutdown(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_AbortSystemShutdown_state { + struct winreg_AbortSystemShutdown orig; + struct winreg_AbortSystemShutdown tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_AbortSystemShutdown_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_AbortSystemShutdown_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_server /* [in] [unique] */) +{ + struct tevent_req *req; + struct rpccli_winreg_AbortSystemShutdown_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_AbortSystemShutdown_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server = _server; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_AbortSystemShutdown, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_winreg, + NDR_WINREG_ABORTSYSTEMSHUTDOWN, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_AbortSystemShutdown_done, req); + return req; +} + +static void rpccli_winreg_AbortSystemShutdown_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_AbortSystemShutdown_state *state = tevent_req_data( + req, struct rpccli_winreg_AbortSystemShutdown_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_AbortSystemShutdown, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_AbortSystemShutdown_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_AbortSystemShutdown_state *state = tevent_req_data( + req, struct rpccli_winreg_AbortSystemShutdown_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_winreg_AbortSystemShutdown(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *server /* [in] [unique] */, @@ -1300,6 +4497,127 @@ NTSTATUS rpccli_winreg_AbortSystemShutdown(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_GetVersion_state { + struct winreg_GetVersion orig; + struct winreg_GetVersion tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_GetVersion_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_GetVersion_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t *_version /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_winreg_GetVersion_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_GetVersion_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.handle = _handle; + + /* Out parameters */ + state->orig.out.version = _version; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_GetVersion, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_winreg_GetVersion_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_winreg, + NDR_WINREG_GETVERSION, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_GetVersion_done, req); + return req; +} + +static void rpccli_winreg_GetVersion_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_GetVersion_state *state = tevent_req_data( + req, struct rpccli_winreg_GetVersion_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.version = *state->tmp.out.version; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_GetVersion, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_GetVersion_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_GetVersion_state *state = tevent_req_data( + req, struct rpccli_winreg_GetVersion_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_winreg_GetVersion(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -1345,6 +4663,129 @@ NTSTATUS rpccli_winreg_GetVersion(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_OpenHKCC_state { + struct winreg_OpenHKCC orig; + struct winreg_OpenHKCC tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_OpenHKCC_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_OpenHKCC_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_system_name /* [in] [unique] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_winreg_OpenHKCC_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_OpenHKCC_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.system_name = _system_name; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_OpenHKCC, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_winreg_OpenHKCC_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_winreg, + NDR_WINREG_OPENHKCC, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_OpenHKCC_done, req); + return req; +} + +static void rpccli_winreg_OpenHKCC_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_OpenHKCC_state *state = tevent_req_data( + req, struct rpccli_winreg_OpenHKCC_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_OpenHKCC, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_OpenHKCC_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_OpenHKCC_state *state = tevent_req_data( + req, struct rpccli_winreg_OpenHKCC_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_winreg_OpenHKCC(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name /* [in] [unique] */, @@ -1392,6 +4833,129 @@ NTSTATUS rpccli_winreg_OpenHKCC(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_OpenHKDD_state { + struct winreg_OpenHKDD orig; + struct winreg_OpenHKDD tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_OpenHKDD_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_OpenHKDD_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_system_name /* [in] [unique] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_winreg_OpenHKDD_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_OpenHKDD_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.system_name = _system_name; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_OpenHKDD, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_winreg_OpenHKDD_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_winreg, + NDR_WINREG_OPENHKDD, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_OpenHKDD_done, req); + return req; +} + +static void rpccli_winreg_OpenHKDD_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_OpenHKDD_state *state = tevent_req_data( + req, struct rpccli_winreg_OpenHKDD_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_OpenHKDD, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_OpenHKDD_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_OpenHKDD_state *state = tevent_req_data( + req, struct rpccli_winreg_OpenHKDD_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_winreg_OpenHKDD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name /* [in] [unique] */, @@ -1439,6 +5003,140 @@ NTSTATUS rpccli_winreg_OpenHKDD(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_QueryMultipleValues_state { + struct winreg_QueryMultipleValues orig; + struct winreg_QueryMultipleValues tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_QueryMultipleValues_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_QueryMultipleValues_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_key_handle /* [in] [ref] */, + struct QueryMultipleValue *_values /* [in,out] [ref,length_is(num_values),size_is(num_values)] */, + uint32_t _num_values /* [in] */, + uint8_t *_buffer /* [in,out] [unique,length_is(*buffer_size),size_is(*buffer_size)] */, + uint32_t *_buffer_size /* [in,out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_winreg_QueryMultipleValues_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_QueryMultipleValues_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.key_handle = _key_handle; + state->orig.in.values = _values; + state->orig.in.num_values = _num_values; + state->orig.in.buffer = _buffer; + state->orig.in.buffer_size = _buffer_size; + + /* Out parameters */ + state->orig.out.values = _values; + state->orig.out.buffer = _buffer; + state->orig.out.buffer_size = _buffer_size; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_QueryMultipleValues, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_winreg_QueryMultipleValues_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_winreg, + NDR_WINREG_QUERYMULTIPLEVALUES, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_QueryMultipleValues_done, req); + return req; +} + +static void rpccli_winreg_QueryMultipleValues_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_QueryMultipleValues_state *state = tevent_req_data( + req, struct rpccli_winreg_QueryMultipleValues_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 */ + memcpy(state->orig.out.values, state->tmp.out.values, state->tmp.in.num_values * sizeof(*state->orig.out.values)); + if (state->orig.out.buffer && state->tmp.out.buffer) { + memcpy(state->orig.out.buffer, state->tmp.out.buffer, *state->tmp.in.buffer_size * sizeof(*state->orig.out.buffer)); + } + *state->orig.out.buffer_size = *state->tmp.out.buffer_size; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_QueryMultipleValues, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_QueryMultipleValues_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_QueryMultipleValues_state *state = tevent_req_data( + req, struct rpccli_winreg_QueryMultipleValues_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_winreg_QueryMultipleValues(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *key_handle /* [in] [ref] */, @@ -1495,6 +5193,128 @@ NTSTATUS rpccli_winreg_QueryMultipleValues(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_InitiateSystemShutdownEx_state { + struct winreg_InitiateSystemShutdownEx orig; + struct winreg_InitiateSystemShutdownEx tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_InitiateSystemShutdownEx_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_InitiateSystemShutdownEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_hostname /* [in] [unique] */, + struct lsa_StringLarge *_message /* [in] [unique] */, + uint32_t _timeout /* [in] */, + uint8_t _force_apps /* [in] */, + uint8_t _do_reboot /* [in] */, + uint32_t _reason /* [in] */) +{ + struct tevent_req *req; + struct rpccli_winreg_InitiateSystemShutdownEx_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_InitiateSystemShutdownEx_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.hostname = _hostname; + state->orig.in.message = _message; + state->orig.in.timeout = _timeout; + state->orig.in.force_apps = _force_apps; + state->orig.in.do_reboot = _do_reboot; + state->orig.in.reason = _reason; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_InitiateSystemShutdownEx, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_winreg, + NDR_WINREG_INITIATESYSTEMSHUTDOWNEX, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_InitiateSystemShutdownEx_done, req); + return req; +} + +static void rpccli_winreg_InitiateSystemShutdownEx_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_InitiateSystemShutdownEx_state *state = tevent_req_data( + req, struct rpccli_winreg_InitiateSystemShutdownEx_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_InitiateSystemShutdownEx, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_InitiateSystemShutdownEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_InitiateSystemShutdownEx_state *state = tevent_req_data( + req, struct rpccli_winreg_InitiateSystemShutdownEx_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_winreg_InitiateSystemShutdownEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *hostname /* [in] [unique] */, @@ -1548,6 +5368,116 @@ NTSTATUS rpccli_winreg_InitiateSystemShutdownEx(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_SaveKeyEx_state { + struct winreg_SaveKeyEx orig; + struct winreg_SaveKeyEx tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_SaveKeyEx_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_SaveKeyEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_winreg_SaveKeyEx_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_SaveKeyEx_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_SaveKeyEx, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_winreg, + NDR_WINREG_SAVEKEYEX, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_SaveKeyEx_done, req); + return req; +} + +static void rpccli_winreg_SaveKeyEx_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_SaveKeyEx_state *state = tevent_req_data( + req, struct rpccli_winreg_SaveKeyEx_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_SaveKeyEx, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_SaveKeyEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_SaveKeyEx_state *state = tevent_req_data( + req, struct rpccli_winreg_SaveKeyEx_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_winreg_SaveKeyEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) @@ -1589,6 +5519,129 @@ NTSTATUS rpccli_winreg_SaveKeyEx(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_OpenHKPT_state { + struct winreg_OpenHKPT orig; + struct winreg_OpenHKPT tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_OpenHKPT_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_OpenHKPT_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_system_name /* [in] [unique] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_winreg_OpenHKPT_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_OpenHKPT_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.system_name = _system_name; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_OpenHKPT, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_winreg_OpenHKPT_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_winreg, + NDR_WINREG_OPENHKPT, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_OpenHKPT_done, req); + return req; +} + +static void rpccli_winreg_OpenHKPT_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_OpenHKPT_state *state = tevent_req_data( + req, struct rpccli_winreg_OpenHKPT_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_OpenHKPT, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_OpenHKPT_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_OpenHKPT_state *state = tevent_req_data( + req, struct rpccli_winreg_OpenHKPT_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_winreg_OpenHKPT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name /* [in] [unique] */, @@ -1636,6 +5689,129 @@ NTSTATUS rpccli_winreg_OpenHKPT(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_OpenHKPN_state { + struct winreg_OpenHKPN orig; + struct winreg_OpenHKPN tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_OpenHKPN_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_OpenHKPN_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_system_name /* [in] [unique] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_winreg_OpenHKPN_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_OpenHKPN_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.system_name = _system_name; + state->orig.in.access_mask = _access_mask; + + /* Out parameters */ + state->orig.out.handle = _handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_OpenHKPN, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_winreg_OpenHKPN_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_winreg, + NDR_WINREG_OPENHKPN, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_OpenHKPN_done, req); + return req; +} + +static void rpccli_winreg_OpenHKPN_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_OpenHKPN_state *state = tevent_req_data( + req, struct rpccli_winreg_OpenHKPN_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.handle = *state->tmp.out.handle; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_OpenHKPN, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_OpenHKPN_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_OpenHKPN_state *state = tevent_req_data( + req, struct rpccli_winreg_OpenHKPN_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_winreg_OpenHKPN(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name /* [in] [unique] */, @@ -1683,6 +5859,116 @@ NTSTATUS rpccli_winreg_OpenHKPN(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_winreg_QueryMultipleValues2_state { + struct winreg_QueryMultipleValues2 orig; + struct winreg_QueryMultipleValues2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_winreg_QueryMultipleValues2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_winreg_QueryMultipleValues2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli) +{ + struct tevent_req *req; + struct rpccli_winreg_QueryMultipleValues2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_winreg_QueryMultipleValues2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(winreg_QueryMultipleValues2, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_winreg, + NDR_WINREG_QUERYMULTIPLEVALUES2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_winreg_QueryMultipleValues2_done, req); + return req; +} + +static void rpccli_winreg_QueryMultipleValues2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_winreg_QueryMultipleValues2_state *state = tevent_req_data( + req, struct rpccli_winreg_QueryMultipleValues2_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(winreg_QueryMultipleValues2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_winreg_QueryMultipleValues2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_winreg_QueryMultipleValues2_state *state = tevent_req_data( + req, struct rpccli_winreg_QueryMultipleValues2_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_winreg_QueryMultipleValues2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) diff --git a/librpc/gen_ndr/cli_winreg.h b/librpc/gen_ndr/cli_winreg.h index 20d2a755ce..2d7ac0c658 100644 --- a/librpc/gen_ndr/cli_winreg.h +++ b/librpc/gen_ndr/cli_winreg.h @@ -1,40 +1,106 @@ #include "../librpc/gen_ndr/ndr_winreg.h" #ifndef __CLI_WINREG__ #define __CLI_WINREG__ +struct tevent_req *rpccli_winreg_OpenHKCR_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_system_name /* [in] [unique] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */); +NTSTATUS rpccli_winreg_OpenHKCR_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_OpenHKCR(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name /* [in] [unique] */, uint32_t access_mask /* [in] */, struct policy_handle *handle /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_winreg_OpenHKCU_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_system_name /* [in] [unique] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */); +NTSTATUS rpccli_winreg_OpenHKCU_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_OpenHKCU(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name /* [in] [unique] */, uint32_t access_mask /* [in] */, struct policy_handle *handle /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_winreg_OpenHKLM_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_system_name /* [in] [unique] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */); +NTSTATUS rpccli_winreg_OpenHKLM_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_OpenHKLM(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name /* [in] [unique] */, uint32_t access_mask /* [in] */, struct policy_handle *handle /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_winreg_OpenHKPD_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_system_name /* [in] [unique] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */); +NTSTATUS rpccli_winreg_OpenHKPD_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_OpenHKPD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name /* [in] [unique] */, uint32_t access_mask /* [in] */, struct policy_handle *handle /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_winreg_OpenHKU_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_system_name /* [in] [unique] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */); +NTSTATUS rpccli_winreg_OpenHKU_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_OpenHKU(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name /* [in] [unique] */, uint32_t access_mask /* [in] */, struct policy_handle *handle /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_winreg_CloseKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in,out] [ref] */); +NTSTATUS rpccli_winreg_CloseKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_CloseKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in,out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_winreg_CreateKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct winreg_String _name /* [in] */, + struct winreg_String _keyclass /* [in] */, + uint32_t _options /* [in] */, + uint32_t _access_mask /* [in] */, + struct winreg_SecBuf *_secdesc /* [in] [unique] */, + struct policy_handle *_new_handle /* [out] [ref] */, + enum winreg_CreateAction *_action_taken /* [in,out] [unique] */); +NTSTATUS rpccli_winreg_CreateKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_CreateKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -46,16 +112,43 @@ NTSTATUS rpccli_winreg_CreateKey(struct rpc_pipe_client *cli, struct policy_handle *new_handle /* [out] [ref] */, enum winreg_CreateAction *action_taken /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_winreg_DeleteKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct winreg_String _key /* [in] */); +NTSTATUS rpccli_winreg_DeleteKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_DeleteKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct winreg_String key /* [in] */, WERROR *werror); +struct tevent_req *rpccli_winreg_DeleteValue_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct winreg_String _value /* [in] */); +NTSTATUS rpccli_winreg_DeleteValue_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_DeleteValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct winreg_String value /* [in] */, WERROR *werror); +struct tevent_req *rpccli_winreg_EnumKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _enum_index /* [in] */, + struct winreg_StringBuf *_name /* [in,out] [ref] */, + struct winreg_StringBuf *_keyclass /* [in,out] [unique] */, + NTTIME *_last_changed_time /* [in,out] [unique] */); +NTSTATUS rpccli_winreg_EnumKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_EnumKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -64,6 +157,19 @@ NTSTATUS rpccli_winreg_EnumKey(struct rpc_pipe_client *cli, struct winreg_StringBuf *keyclass /* [in,out] [unique] */, NTTIME *last_changed_time /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_winreg_EnumValue_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _enum_index /* [in] */, + struct winreg_ValNameBuf *_name /* [in,out] [ref] */, + enum winreg_Type *_type /* [in,out] [unique] */, + uint8_t *_value /* [in,out] [unique,length_is(*length),size_is(*size)] */, + uint32_t *_size /* [in,out] [unique] */, + uint32_t *_length /* [in,out] [unique] */); +NTSTATUS rpccli_winreg_EnumValue_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_EnumValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -74,22 +180,60 @@ NTSTATUS rpccli_winreg_EnumValue(struct rpc_pipe_client *cli, uint32_t *size /* [in,out] [unique] */, uint32_t *length /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_winreg_FlushKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */); +NTSTATUS rpccli_winreg_FlushKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_FlushKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, WERROR *werror); +struct tevent_req *rpccli_winreg_GetKeySecurity_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _sec_info /* [in] */, + struct KeySecurityData *_sd /* [in,out] [ref] */); +NTSTATUS rpccli_winreg_GetKeySecurity_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_GetKeySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t sec_info /* [in] */, struct KeySecurityData *sd /* [in,out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_winreg_LoadKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct winreg_String *_keyname /* [in] [unique] */, + struct winreg_String *_filename /* [in] [unique] */); +NTSTATUS rpccli_winreg_LoadKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_LoadKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct winreg_String *keyname /* [in] [unique] */, struct winreg_String *filename /* [in] [unique] */, WERROR *werror); +struct tevent_req *rpccli_winreg_NotifyChangeKeyValue_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint8_t _watch_subtree /* [in] */, + uint32_t _notify_filter /* [in] */, + uint32_t _unknown /* [in] */, + struct winreg_String _string1 /* [in] */, + struct winreg_String _string2 /* [in] */, + uint32_t _unknown2 /* [in] */); +NTSTATUS rpccli_winreg_NotifyChangeKeyValue_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_NotifyChangeKeyValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -100,6 +244,17 @@ NTSTATUS rpccli_winreg_NotifyChangeKeyValue(struct rpc_pipe_client *cli, struct winreg_String string2 /* [in] */, uint32_t unknown2 /* [in] */, WERROR *werror); +struct tevent_req *rpccli_winreg_OpenKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_parent_handle /* [in] [ref] */, + struct winreg_String _keyname /* [in] */, + uint32_t _unknown /* [in] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */); +NTSTATUS rpccli_winreg_OpenKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_OpenKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *parent_handle /* [in] [ref] */, @@ -108,6 +263,22 @@ NTSTATUS rpccli_winreg_OpenKey(struct rpc_pipe_client *cli, uint32_t access_mask /* [in] */, struct policy_handle *handle /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_winreg_QueryInfoKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct winreg_String *_classname /* [in,out] [ref] */, + uint32_t *_num_subkeys /* [out] [ref] */, + uint32_t *_max_subkeylen /* [out] [ref] */, + uint32_t *_max_classlen /* [out] [ref] */, + uint32_t *_num_values /* [out] [ref] */, + uint32_t *_max_valnamelen /* [out] [ref] */, + uint32_t *_max_valbufsize /* [out] [ref] */, + uint32_t *_secdescsize /* [out] [ref] */, + NTTIME *_last_changed_time /* [out] [ref] */); +NTSTATUS rpccli_winreg_QueryInfoKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_QueryInfoKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -121,6 +292,18 @@ NTSTATUS rpccli_winreg_QueryInfoKey(struct rpc_pipe_client *cli, uint32_t *secdescsize /* [out] [ref] */, NTTIME *last_changed_time /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_winreg_QueryValue_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct winreg_String *_value_name /* [in] [ref] */, + enum winreg_Type *_type /* [in,out] [unique] */, + uint8_t *_data /* [in,out] [unique,length_is(*data_length),size_is(*data_size)] */, + uint32_t *_data_size /* [in,out] [unique] */, + uint32_t *_data_length /* [in,out] [unique] */); +NTSTATUS rpccli_winreg_QueryValue_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -130,27 +313,71 @@ NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli, uint32_t *data_size /* [in,out] [unique] */, uint32_t *data_length /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_winreg_ReplaceKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_winreg_ReplaceKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_ReplaceKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_winreg_RestoreKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct winreg_String *_filename /* [in] [ref] */, + uint32_t _flags /* [in] */); +NTSTATUS rpccli_winreg_RestoreKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_RestoreKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct winreg_String *filename /* [in] [ref] */, uint32_t flags /* [in] */, WERROR *werror); +struct tevent_req *rpccli_winreg_SaveKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct winreg_String *_filename /* [in] [ref] */, + struct KeySecurityAttribute *_sec_attrib /* [in] [unique] */); +NTSTATUS rpccli_winreg_SaveKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_SaveKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, struct winreg_String *filename /* [in] [ref] */, struct KeySecurityAttribute *sec_attrib /* [in] [unique] */, WERROR *werror); +struct tevent_req *rpccli_winreg_SetKeySecurity_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t _sec_info /* [in] */, + struct KeySecurityData *_sd /* [in] [ref] */); +NTSTATUS rpccli_winreg_SetKeySecurity_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_SetKeySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t sec_info /* [in] */, struct KeySecurityData *sd /* [in] [ref] */, WERROR *werror); +struct tevent_req *rpccli_winreg_SetValue_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + struct winreg_String _name /* [in] */, + enum winreg_Type _type /* [in] */, + uint8_t *_data /* [in] [ref,size_is(size)] */, + uint32_t _size /* [in] */); +NTSTATUS rpccli_winreg_SetValue_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_SetValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, @@ -159,9 +386,26 @@ NTSTATUS rpccli_winreg_SetValue(struct rpc_pipe_client *cli, uint8_t *data /* [in] [ref,size_is(size)] */, uint32_t size /* [in] */, WERROR *werror); +struct tevent_req *rpccli_winreg_UnLoadKey_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_winreg_UnLoadKey_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_UnLoadKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_winreg_InitiateSystemShutdown_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_hostname /* [in] [unique] */, + struct lsa_StringLarge *_message /* [in] [unique] */, + uint32_t _timeout /* [in] */, + uint8_t _force_apps /* [in] */, + uint8_t _do_reboot /* [in] */); +NTSTATUS rpccli_winreg_InitiateSystemShutdown_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_InitiateSystemShutdown(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *hostname /* [in] [unique] */, @@ -170,27 +414,71 @@ NTSTATUS rpccli_winreg_InitiateSystemShutdown(struct rpc_pipe_client *cli, uint8_t force_apps /* [in] */, uint8_t do_reboot /* [in] */, WERROR *werror); +struct tevent_req *rpccli_winreg_AbortSystemShutdown_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_server /* [in] [unique] */); +NTSTATUS rpccli_winreg_AbortSystemShutdown_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_AbortSystemShutdown(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *server /* [in] [unique] */, WERROR *werror); +struct tevent_req *rpccli_winreg_GetVersion_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_handle /* [in] [ref] */, + uint32_t *_version /* [out] [ref] */); +NTSTATUS rpccli_winreg_GetVersion_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_GetVersion(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle /* [in] [ref] */, uint32_t *version /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_winreg_OpenHKCC_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_system_name /* [in] [unique] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */); +NTSTATUS rpccli_winreg_OpenHKCC_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_OpenHKCC(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name /* [in] [unique] */, uint32_t access_mask /* [in] */, struct policy_handle *handle /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_winreg_OpenHKDD_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_system_name /* [in] [unique] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */); +NTSTATUS rpccli_winreg_OpenHKDD_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_OpenHKDD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name /* [in] [unique] */, uint32_t access_mask /* [in] */, struct policy_handle *handle /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_winreg_QueryMultipleValues_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + struct policy_handle *_key_handle /* [in] [ref] */, + struct QueryMultipleValue *_values /* [in,out] [ref,length_is(num_values),size_is(num_values)] */, + uint32_t _num_values /* [in] */, + uint8_t *_buffer /* [in,out] [unique,length_is(*buffer_size),size_is(*buffer_size)] */, + uint32_t *_buffer_size /* [in,out] [ref] */); +NTSTATUS rpccli_winreg_QueryMultipleValues_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_QueryMultipleValues(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *key_handle /* [in] [ref] */, @@ -199,6 +487,18 @@ NTSTATUS rpccli_winreg_QueryMultipleValues(struct rpc_pipe_client *cli, uint8_t *buffer /* [in,out] [unique,length_is(*buffer_size),size_is(*buffer_size)] */, uint32_t *buffer_size /* [in,out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_winreg_InitiateSystemShutdownEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_hostname /* [in] [unique] */, + struct lsa_StringLarge *_message /* [in] [unique] */, + uint32_t _timeout /* [in] */, + uint8_t _force_apps /* [in] */, + uint8_t _do_reboot /* [in] */, + uint32_t _reason /* [in] */); +NTSTATUS rpccli_winreg_InitiateSystemShutdownEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_InitiateSystemShutdownEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *hostname /* [in] [unique] */, @@ -208,21 +508,51 @@ NTSTATUS rpccli_winreg_InitiateSystemShutdownEx(struct rpc_pipe_client *cli, uint8_t do_reboot /* [in] */, uint32_t reason /* [in] */, WERROR *werror); +struct tevent_req *rpccli_winreg_SaveKeyEx_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_winreg_SaveKeyEx_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_SaveKeyEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); +struct tevent_req *rpccli_winreg_OpenHKPT_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_system_name /* [in] [unique] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */); +NTSTATUS rpccli_winreg_OpenHKPT_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_OpenHKPT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name /* [in] [unique] */, uint32_t access_mask /* [in] */, struct policy_handle *handle /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_winreg_OpenHKPN_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + uint16_t *_system_name /* [in] [unique] */, + uint32_t _access_mask /* [in] */, + struct policy_handle *_handle /* [out] [ref] */); +NTSTATUS rpccli_winreg_OpenHKPN_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_OpenHKPN(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name /* [in] [unique] */, uint32_t access_mask /* [in] */, struct policy_handle *handle /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_winreg_QueryMultipleValues2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli); +NTSTATUS rpccli_winreg_QueryMultipleValues2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_winreg_QueryMultipleValues2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror); diff --git a/librpc/gen_ndr/cli_wkssvc.c b/librpc/gen_ndr/cli_wkssvc.c index c143058942..f40238af54 100644 --- a/librpc/gen_ndr/cli_wkssvc.c +++ b/librpc/gen_ndr/cli_wkssvc.c @@ -6,6 +6,129 @@ #include "includes.h" #include "../librpc/gen_ndr/cli_wkssvc.h" +struct rpccli_wkssvc_NetWkstaGetInfo_state { + struct wkssvc_NetWkstaGetInfo orig; + struct wkssvc_NetWkstaGetInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetWkstaGetInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetWkstaGetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + union wkssvc_NetWkstaInfo *_info /* [out] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetWkstaGetInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetWkstaGetInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.level = _level; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaGetInfo, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_wkssvc_NetWkstaGetInfo_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_wkssvc, + NDR_WKSSVC_NETWKSTAGETINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetWkstaGetInfo_done, req); + return req; +} + +static void rpccli_wkssvc_NetWkstaGetInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetWkstaGetInfo_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetWkstaGetInfo_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(wkssvc_NetWkstaGetInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetWkstaGetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetWkstaGetInfo_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetWkstaGetInfo_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_wkssvc_NetWkstaGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -53,6 +176,132 @@ NTSTATUS rpccli_wkssvc_NetWkstaGetInfo(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_wkssvc_NetWkstaSetInfo_state { + struct wkssvc_NetWkstaSetInfo orig; + struct wkssvc_NetWkstaSetInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetWkstaSetInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetWkstaSetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + union wkssvc_NetWkstaInfo *_info /* [in] [ref,switch_is(level)] */, + uint32_t *_parm_error /* [in,out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetWkstaSetInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetWkstaSetInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.level = _level; + state->orig.in.info = _info; + state->orig.in.parm_error = _parm_error; + + /* Out parameters */ + state->orig.out.parm_error = _parm_error; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaSetInfo, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_wkssvc_NetWkstaSetInfo_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_wkssvc, + NDR_WKSSVC_NETWKSTASETINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetWkstaSetInfo_done, req); + return req; +} + +static void rpccli_wkssvc_NetWkstaSetInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetWkstaSetInfo_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetWkstaSetInfo_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.parm_error = *state->tmp.out.parm_error; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaSetInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetWkstaSetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetWkstaSetInfo_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetWkstaSetInfo_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_wkssvc_NetWkstaSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -103,6 +352,139 @@ NTSTATUS rpccli_wkssvc_NetWkstaSetInfo(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_wkssvc_NetWkstaEnumUsers_state { + struct wkssvc_NetWkstaEnumUsers orig; + struct wkssvc_NetWkstaEnumUsers tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetWkstaEnumUsers_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetWkstaEnumUsers_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + struct wkssvc_NetWkstaEnumUsersInfo *_info /* [in,out] [ref] */, + uint32_t _prefmaxlen /* [in] */, + uint32_t *_entries_read /* [out] [ref] */, + uint32_t *_resume_handle /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetWkstaEnumUsers_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetWkstaEnumUsers_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.info = _info; + state->orig.in.prefmaxlen = _prefmaxlen; + state->orig.in.resume_handle = _resume_handle; + + /* Out parameters */ + state->orig.out.info = _info; + state->orig.out.entries_read = _entries_read; + state->orig.out.resume_handle = _resume_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaEnumUsers, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_wkssvc_NetWkstaEnumUsers_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_wkssvc, + NDR_WKSSVC_NETWKSTAENUMUSERS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetWkstaEnumUsers_done, req); + return req; +} + +static void rpccli_wkssvc_NetWkstaEnumUsers_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetWkstaEnumUsers_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetWkstaEnumUsers_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; + *state->orig.out.entries_read = *state->tmp.out.entries_read; + if (state->orig.out.resume_handle && state->tmp.out.resume_handle) { + *state->orig.out.resume_handle = *state->tmp.out.resume_handle; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaEnumUsers, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetWkstaEnumUsers_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetWkstaEnumUsers_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetWkstaEnumUsers_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_wkssvc_NetWkstaEnumUsers(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -158,6 +540,129 @@ NTSTATUS rpccli_wkssvc_NetWkstaEnumUsers(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_wkssvc_NetrWkstaUserGetInfo_state { + struct wkssvc_NetrWkstaUserGetInfo orig; + struct wkssvc_NetrWkstaUserGetInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetrWkstaUserGetInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetrWkstaUserGetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_unknown /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + union wkssvc_NetrWkstaUserInfo *_info /* [out] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetrWkstaUserGetInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetrWkstaUserGetInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.unknown = _unknown; + state->orig.in.level = _level; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetrWkstaUserGetInfo, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_wkssvc_NetrWkstaUserGetInfo_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_wkssvc, + NDR_WKSSVC_NETRWKSTAUSERGETINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetrWkstaUserGetInfo_done, req); + return req; +} + +static void rpccli_wkssvc_NetrWkstaUserGetInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetrWkstaUserGetInfo_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrWkstaUserGetInfo_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(wkssvc_NetrWkstaUserGetInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetrWkstaUserGetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetrWkstaUserGetInfo_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrWkstaUserGetInfo_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_wkssvc_NetrWkstaUserGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *unknown /* [in] [unique,charset(UTF16)] */, @@ -205,6 +710,134 @@ NTSTATUS rpccli_wkssvc_NetrWkstaUserGetInfo(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_wkssvc_NetrWkstaUserSetInfo_state { + struct wkssvc_NetrWkstaUserSetInfo orig; + struct wkssvc_NetrWkstaUserSetInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetrWkstaUserSetInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetrWkstaUserSetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_unknown /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + union wkssvc_NetrWkstaUserInfo *_info /* [in] [ref,switch_is(level)] */, + uint32_t *_parm_err /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetrWkstaUserSetInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetrWkstaUserSetInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.unknown = _unknown; + state->orig.in.level = _level; + state->orig.in.info = _info; + state->orig.in.parm_err = _parm_err; + + /* Out parameters */ + state->orig.out.parm_err = _parm_err; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetrWkstaUserSetInfo, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_wkssvc_NetrWkstaUserSetInfo_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_wkssvc, + NDR_WKSSVC_NETRWKSTAUSERSETINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetrWkstaUserSetInfo_done, req); + return req; +} + +static void rpccli_wkssvc_NetrWkstaUserSetInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetrWkstaUserSetInfo_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrWkstaUserSetInfo_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 */ + if (state->orig.out.parm_err && state->tmp.out.parm_err) { + *state->orig.out.parm_err = *state->tmp.out.parm_err; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaUserSetInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetrWkstaUserSetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetrWkstaUserSetInfo_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrWkstaUserSetInfo_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_wkssvc_NetrWkstaUserSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *unknown /* [in] [unique,charset(UTF16)] */, @@ -257,6 +890,139 @@ NTSTATUS rpccli_wkssvc_NetrWkstaUserSetInfo(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_wkssvc_NetWkstaTransportEnum_state { + struct wkssvc_NetWkstaTransportEnum orig; + struct wkssvc_NetWkstaTransportEnum tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetWkstaTransportEnum_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetWkstaTransportEnum_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + struct wkssvc_NetWkstaTransportInfo *_info /* [in,out] [ref] */, + uint32_t _max_buffer /* [in] */, + uint32_t *_total_entries /* [out] [ref] */, + uint32_t *_resume_handle /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetWkstaTransportEnum_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetWkstaTransportEnum_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.info = _info; + state->orig.in.max_buffer = _max_buffer; + state->orig.in.resume_handle = _resume_handle; + + /* Out parameters */ + state->orig.out.info = _info; + state->orig.out.total_entries = _total_entries; + state->orig.out.resume_handle = _resume_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaTransportEnum, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_wkssvc_NetWkstaTransportEnum_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_wkssvc, + NDR_WKSSVC_NETWKSTATRANSPORTENUM, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetWkstaTransportEnum_done, req); + return req; +} + +static void rpccli_wkssvc_NetWkstaTransportEnum_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetWkstaTransportEnum_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetWkstaTransportEnum_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; + *state->orig.out.total_entries = *state->tmp.out.total_entries; + if (state->orig.out.resume_handle && state->tmp.out.resume_handle) { + *state->orig.out.resume_handle = *state->tmp.out.resume_handle; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaTransportEnum, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetWkstaTransportEnum_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetWkstaTransportEnum_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetWkstaTransportEnum_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_wkssvc_NetWkstaTransportEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -312,6 +1078,134 @@ NTSTATUS rpccli_wkssvc_NetWkstaTransportEnum(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_wkssvc_NetrWkstaTransportAdd_state { + struct wkssvc_NetrWkstaTransportAdd orig; + struct wkssvc_NetrWkstaTransportAdd tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetrWkstaTransportAdd_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetrWkstaTransportAdd_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + struct wkssvc_NetWkstaTransportInfo0 *_info0 /* [in] [ref] */, + uint32_t *_parm_err /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetrWkstaTransportAdd_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetrWkstaTransportAdd_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.level = _level; + state->orig.in.info0 = _info0; + state->orig.in.parm_err = _parm_err; + + /* Out parameters */ + state->orig.out.parm_err = _parm_err; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetrWkstaTransportAdd, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_wkssvc_NetrWkstaTransportAdd_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_wkssvc, + NDR_WKSSVC_NETRWKSTATRANSPORTADD, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetrWkstaTransportAdd_done, req); + return req; +} + +static void rpccli_wkssvc_NetrWkstaTransportAdd_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetrWkstaTransportAdd_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrWkstaTransportAdd_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 */ + if (state->orig.out.parm_err && state->tmp.out.parm_err) { + *state->orig.out.parm_err = *state->tmp.out.parm_err; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaTransportAdd, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetrWkstaTransportAdd_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetrWkstaTransportAdd_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrWkstaTransportAdd_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_wkssvc_NetrWkstaTransportAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -364,6 +1258,122 @@ NTSTATUS rpccli_wkssvc_NetrWkstaTransportAdd(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_wkssvc_NetrWkstaTransportDel_state { + struct wkssvc_NetrWkstaTransportDel orig; + struct wkssvc_NetrWkstaTransportDel tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetrWkstaTransportDel_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetrWkstaTransportDel_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_transport_name /* [in] [unique,charset(UTF16)] */, + uint32_t _unknown3 /* [in] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetrWkstaTransportDel_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetrWkstaTransportDel_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.transport_name = _transport_name; + state->orig.in.unknown3 = _unknown3; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetrWkstaTransportDel, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_wkssvc, + NDR_WKSSVC_NETRWKSTATRANSPORTDEL, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetrWkstaTransportDel_done, req); + return req; +} + +static void rpccli_wkssvc_NetrWkstaTransportDel_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetrWkstaTransportDel_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrWkstaTransportDel_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaTransportDel, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetrWkstaTransportDel_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetrWkstaTransportDel_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrWkstaTransportDel_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_wkssvc_NetrWkstaTransportDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -411,6 +1421,134 @@ NTSTATUS rpccli_wkssvc_NetrWkstaTransportDel(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_wkssvc_NetrUseAdd_state { + struct wkssvc_NetrUseAdd orig; + struct wkssvc_NetrUseAdd tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetrUseAdd_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetrUseAdd_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + union wkssvc_NetrUseGetInfoCtr *_ctr /* [in] [ref,switch_is(level)] */, + uint32_t *_parm_err /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetrUseAdd_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetrUseAdd_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.level = _level; + state->orig.in.ctr = _ctr; + state->orig.in.parm_err = _parm_err; + + /* Out parameters */ + state->orig.out.parm_err = _parm_err; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetrUseAdd, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_wkssvc_NetrUseAdd_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_wkssvc, + NDR_WKSSVC_NETRUSEADD, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetrUseAdd_done, req); + return req; +} + +static void rpccli_wkssvc_NetrUseAdd_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetrUseAdd_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrUseAdd_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 */ + if (state->orig.out.parm_err && state->tmp.out.parm_err) { + *state->orig.out.parm_err = *state->tmp.out.parm_err; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseAdd, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetrUseAdd_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetrUseAdd_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrUseAdd_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_wkssvc_NetrUseAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -463,6 +1601,131 @@ NTSTATUS rpccli_wkssvc_NetrUseAdd(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_wkssvc_NetrUseGetInfo_state { + struct wkssvc_NetrUseGetInfo orig; + struct wkssvc_NetrUseGetInfo tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetrUseGetInfo_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetrUseGetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_use_name /* [in] [ref,charset(UTF16)] */, + uint32_t _level /* [in] */, + union wkssvc_NetrUseGetInfoCtr *_ctr /* [out] [ref,switch_is(level)] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetrUseGetInfo_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetrUseGetInfo_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.use_name = _use_name; + state->orig.in.level = _level; + + /* Out parameters */ + state->orig.out.ctr = _ctr; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetrUseGetInfo, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_wkssvc_NetrUseGetInfo_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_wkssvc, + NDR_WKSSVC_NETRUSEGETINFO, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetrUseGetInfo_done, req); + return req; +} + +static void rpccli_wkssvc_NetrUseGetInfo_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetrUseGetInfo_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrUseGetInfo_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.ctr = *state->tmp.out.ctr; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseGetInfo, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetrUseGetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetrUseGetInfo_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrUseGetInfo_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_wkssvc_NetrUseGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -512,6 +1775,122 @@ NTSTATUS rpccli_wkssvc_NetrUseGetInfo(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_wkssvc_NetrUseDel_state { + struct wkssvc_NetrUseDel orig; + struct wkssvc_NetrUseDel tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetrUseDel_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetrUseDel_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_use_name /* [in] [ref,charset(UTF16)] */, + uint32_t _force_cond /* [in] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetrUseDel_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetrUseDel_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.use_name = _use_name; + state->orig.in.force_cond = _force_cond; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetrUseDel, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_wkssvc, + NDR_WKSSVC_NETRUSEDEL, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetrUseDel_done, req); + return req; +} + +static void rpccli_wkssvc_NetrUseDel_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetrUseDel_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrUseDel_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseDel, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetrUseDel_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetrUseDel_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrUseDel_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_wkssvc_NetrUseDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -559,6 +1938,139 @@ NTSTATUS rpccli_wkssvc_NetrUseDel(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_wkssvc_NetrUseEnum_state { + struct wkssvc_NetrUseEnum orig; + struct wkssvc_NetrUseEnum tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetrUseEnum_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetrUseEnum_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + struct wkssvc_NetrUseEnumInfo *_info /* [in,out] [ref] */, + uint32_t _prefmaxlen /* [in] */, + uint32_t *_entries_read /* [out] [ref] */, + uint32_t *_resume_handle /* [in,out] [unique] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetrUseEnum_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetrUseEnum_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.info = _info; + state->orig.in.prefmaxlen = _prefmaxlen; + state->orig.in.resume_handle = _resume_handle; + + /* Out parameters */ + state->orig.out.info = _info; + state->orig.out.entries_read = _entries_read; + state->orig.out.resume_handle = _resume_handle; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetrUseEnum, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_wkssvc_NetrUseEnum_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_wkssvc, + NDR_WKSSVC_NETRUSEENUM, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetrUseEnum_done, req); + return req; +} + +static void rpccli_wkssvc_NetrUseEnum_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetrUseEnum_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrUseEnum_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; + *state->orig.out.entries_read = *state->tmp.out.entries_read; + if (state->orig.out.resume_handle && state->tmp.out.resume_handle) { + *state->orig.out.resume_handle = *state->tmp.out.resume_handle; + } + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseEnum, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetrUseEnum_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetrUseEnum_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrUseEnum_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_wkssvc_NetrUseEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -614,6 +2126,126 @@ NTSTATUS rpccli_wkssvc_NetrUseEnum(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_wkssvc_NetrMessageBufferSend_state { + struct wkssvc_NetrMessageBufferSend orig; + struct wkssvc_NetrMessageBufferSend tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetrMessageBufferSend_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetrMessageBufferSend_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_message_name /* [in] [ref,charset(UTF16)] */, + const char *_message_sender_name /* [in] [unique,charset(UTF16)] */, + uint8_t *_message_buffer /* [in] [ref,size_is(message_size)] */, + uint32_t _message_size /* [in] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetrMessageBufferSend_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetrMessageBufferSend_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.message_name = _message_name; + state->orig.in.message_sender_name = _message_sender_name; + state->orig.in.message_buffer = _message_buffer; + state->orig.in.message_size = _message_size; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetrMessageBufferSend, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_wkssvc, + NDR_WKSSVC_NETRMESSAGEBUFFERSEND, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetrMessageBufferSend_done, req); + return req; +} + +static void rpccli_wkssvc_NetrMessageBufferSend_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetrMessageBufferSend_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrMessageBufferSend_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wkssvc_NetrMessageBufferSend, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetrMessageBufferSend_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetrMessageBufferSend_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrMessageBufferSend_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_wkssvc_NetrMessageBufferSend(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -665,6 +2297,133 @@ NTSTATUS rpccli_wkssvc_NetrMessageBufferSend(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_wkssvc_NetrWorkstationStatisticsGet_state { + struct wkssvc_NetrWorkstationStatisticsGet orig; + struct wkssvc_NetrWorkstationStatisticsGet tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetrWorkstationStatisticsGet_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetrWorkstationStatisticsGet_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_unknown2 /* [in] [unique,charset(UTF16)] */, + uint32_t _unknown3 /* [in] */, + uint32_t _unknown4 /* [in] */, + struct wkssvc_NetrWorkstationStatistics **_info /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetrWorkstationStatisticsGet_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetrWorkstationStatisticsGet_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.unknown2 = _unknown2; + state->orig.in.unknown3 = _unknown3; + state->orig.in.unknown4 = _unknown4; + + /* Out parameters */ + state->orig.out.info = _info; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetrWorkstationStatisticsGet, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_wkssvc_NetrWorkstationStatisticsGet_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_wkssvc, + NDR_WKSSVC_NETRWORKSTATIONSTATISTICSGET, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetrWorkstationStatisticsGet_done, req); + return req; +} + +static void rpccli_wkssvc_NetrWorkstationStatisticsGet_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetrWorkstationStatisticsGet_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrWorkstationStatisticsGet_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(wkssvc_NetrWorkstationStatisticsGet, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetrWorkstationStatisticsGet_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetrWorkstationStatisticsGet_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrWorkstationStatisticsGet_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_wkssvc_NetrWorkstationStatisticsGet(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -716,6 +2475,118 @@ NTSTATUS rpccli_wkssvc_NetrWorkstationStatisticsGet(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_wkssvc_NetrLogonDomainNameAdd_state { + struct wkssvc_NetrLogonDomainNameAdd orig; + struct wkssvc_NetrLogonDomainNameAdd tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetrLogonDomainNameAdd_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetrLogonDomainNameAdd_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_domain_name /* [in] [ref,charset(UTF16)] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetrLogonDomainNameAdd_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetrLogonDomainNameAdd_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.domain_name = _domain_name; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetrLogonDomainNameAdd, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_wkssvc, + NDR_WKSSVC_NETRLOGONDOMAINNAMEADD, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetrLogonDomainNameAdd_done, req); + return req; +} + +static void rpccli_wkssvc_NetrLogonDomainNameAdd_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetrLogonDomainNameAdd_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrLogonDomainNameAdd_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wkssvc_NetrLogonDomainNameAdd, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetrLogonDomainNameAdd_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetrLogonDomainNameAdd_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrLogonDomainNameAdd_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_wkssvc_NetrLogonDomainNameAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *domain_name /* [in] [ref,charset(UTF16)] */, @@ -759,6 +2630,118 @@ NTSTATUS rpccli_wkssvc_NetrLogonDomainNameAdd(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_wkssvc_NetrLogonDomainNameDel_state { + struct wkssvc_NetrLogonDomainNameDel orig; + struct wkssvc_NetrLogonDomainNameDel tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetrLogonDomainNameDel_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetrLogonDomainNameDel_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_domain_name /* [in] [ref,charset(UTF16)] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetrLogonDomainNameDel_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetrLogonDomainNameDel_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.domain_name = _domain_name; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetrLogonDomainNameDel, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_wkssvc, + NDR_WKSSVC_NETRLOGONDOMAINNAMEDEL, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetrLogonDomainNameDel_done, req); + return req; +} + +static void rpccli_wkssvc_NetrLogonDomainNameDel_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetrLogonDomainNameDel_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrLogonDomainNameDel_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wkssvc_NetrLogonDomainNameDel, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetrLogonDomainNameDel_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetrLogonDomainNameDel_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrLogonDomainNameDel_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_wkssvc_NetrLogonDomainNameDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *domain_name /* [in] [ref,charset(UTF16)] */, @@ -802,6 +2785,128 @@ NTSTATUS rpccli_wkssvc_NetrLogonDomainNameDel(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_wkssvc_NetrJoinDomain_state { + struct wkssvc_NetrJoinDomain orig; + struct wkssvc_NetrJoinDomain tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetrJoinDomain_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetrJoinDomain_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_domain_name /* [in] [ref,charset(UTF16)] */, + const char *_account_ou /* [in] [unique,charset(UTF16)] */, + const char *_Account /* [in] [unique,charset(UTF16)] */, + const char *_password /* [in] [unique,charset(UTF16)] */, + uint32_t _join_flags /* [in] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetrJoinDomain_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetrJoinDomain_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.domain_name = _domain_name; + state->orig.in.account_ou = _account_ou; + state->orig.in.Account = _Account; + state->orig.in.password = _password; + state->orig.in.join_flags = _join_flags; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetrJoinDomain, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_wkssvc, + NDR_WKSSVC_NETRJOINDOMAIN, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetrJoinDomain_done, req); + return req; +} + +static void rpccli_wkssvc_NetrJoinDomain_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetrJoinDomain_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrJoinDomain_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wkssvc_NetrJoinDomain, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetrJoinDomain_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetrJoinDomain_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrJoinDomain_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_wkssvc_NetrJoinDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -855,6 +2960,124 @@ NTSTATUS rpccli_wkssvc_NetrJoinDomain(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_wkssvc_NetrUnjoinDomain_state { + struct wkssvc_NetrUnjoinDomain orig; + struct wkssvc_NetrUnjoinDomain tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetrUnjoinDomain_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetrUnjoinDomain_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_Account /* [in] [unique,charset(UTF16)] */, + const char *_password /* [in] [unique,charset(UTF16)] */, + uint32_t _unjoin_flags /* [in] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetrUnjoinDomain_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetrUnjoinDomain_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.Account = _Account; + state->orig.in.password = _password; + state->orig.in.unjoin_flags = _unjoin_flags; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetrUnjoinDomain, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_wkssvc, + NDR_WKSSVC_NETRUNJOINDOMAIN, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetrUnjoinDomain_done, req); + return req; +} + +static void rpccli_wkssvc_NetrUnjoinDomain_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetrUnjoinDomain_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrUnjoinDomain_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wkssvc_NetrUnjoinDomain, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetrUnjoinDomain_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetrUnjoinDomain_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrUnjoinDomain_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_wkssvc_NetrUnjoinDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -904,6 +3127,126 @@ NTSTATUS rpccli_wkssvc_NetrUnjoinDomain(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_wkssvc_NetrRenameMachineInDomain_state { + struct wkssvc_NetrRenameMachineInDomain orig; + struct wkssvc_NetrRenameMachineInDomain tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetrRenameMachineInDomain_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetrRenameMachineInDomain_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_NewMachineName /* [in] [unique,charset(UTF16)] */, + const char *_Account /* [in] [unique,charset(UTF16)] */, + const char *_password /* [in] [unique,charset(UTF16)] */, + uint32_t _RenameOptions /* [in] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetrRenameMachineInDomain_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetrRenameMachineInDomain_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.NewMachineName = _NewMachineName; + state->orig.in.Account = _Account; + state->orig.in.password = _password; + state->orig.in.RenameOptions = _RenameOptions; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetrRenameMachineInDomain, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_wkssvc, + NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetrRenameMachineInDomain_done, req); + return req; +} + +static void rpccli_wkssvc_NetrRenameMachineInDomain_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetrRenameMachineInDomain_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrRenameMachineInDomain_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wkssvc_NetrRenameMachineInDomain, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetrRenameMachineInDomain_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetrRenameMachineInDomain_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrRenameMachineInDomain_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_wkssvc_NetrRenameMachineInDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -955,6 +3298,126 @@ NTSTATUS rpccli_wkssvc_NetrRenameMachineInDomain(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_wkssvc_NetrValidateName_state { + struct wkssvc_NetrValidateName orig; + struct wkssvc_NetrValidateName tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetrValidateName_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetrValidateName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_name /* [in] [ref,charset(UTF16)] */, + const char *_Account /* [in] [unique,charset(UTF16)] */, + const char *_Password /* [in] [unique,charset(UTF16)] */, + enum wkssvc_NetValidateNameType _name_type /* [in] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetrValidateName_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetrValidateName_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.name = _name; + state->orig.in.Account = _Account; + state->orig.in.Password = _Password; + state->orig.in.name_type = _name_type; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetrValidateName, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_wkssvc, + NDR_WKSSVC_NETRVALIDATENAME, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetrValidateName_done, req); + return req; +} + +static void rpccli_wkssvc_NetrValidateName_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetrValidateName_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrValidateName_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wkssvc_NetrValidateName, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetrValidateName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetrValidateName_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrValidateName_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_wkssvc_NetrValidateName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -1006,6 +3469,131 @@ NTSTATUS rpccli_wkssvc_NetrValidateName(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_wkssvc_NetrGetJoinInformation_state { + struct wkssvc_NetrGetJoinInformation orig; + struct wkssvc_NetrGetJoinInformation tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetrGetJoinInformation_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetrGetJoinInformation_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char **_name_buffer /* [in,out] [ref,charset(UTF16)] */, + enum wkssvc_NetJoinStatus *_name_type /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetrGetJoinInformation_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetrGetJoinInformation_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.name_buffer = _name_buffer; + + /* Out parameters */ + state->orig.out.name_buffer = _name_buffer; + state->orig.out.name_type = _name_type; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetrGetJoinInformation, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_wkssvc_NetrGetJoinInformation_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_wkssvc, + NDR_WKSSVC_NETRGETJOININFORMATION, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetrGetJoinInformation_done, req); + return req; +} + +static void rpccli_wkssvc_NetrGetJoinInformation_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetrGetJoinInformation_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrGetJoinInformation_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.name_buffer = *state->tmp.out.name_buffer; + *state->orig.out.name_type = *state->tmp.out.name_type; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wkssvc_NetrGetJoinInformation, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetrGetJoinInformation_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetrGetJoinInformation_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrGetJoinInformation_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_wkssvc_NetrGetJoinInformation(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -1054,6 +3642,137 @@ NTSTATUS rpccli_wkssvc_NetrGetJoinInformation(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_wkssvc_NetrGetJoinableOus_state { + struct wkssvc_NetrGetJoinableOus orig; + struct wkssvc_NetrGetJoinableOus tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetrGetJoinableOus_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetrGetJoinableOus_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_domain_name /* [in] [ref,charset(UTF16)] */, + const char *_Account /* [in] [unique,charset(UTF16)] */, + const char *_unknown /* [in] [unique,charset(UTF16)] */, + uint32_t *_num_ous /* [in,out] [ref] */, + const char ***_ous /* [out] [ref,charset(UTF16),size_is(,*num_ous)] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetrGetJoinableOus_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetrGetJoinableOus_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.domain_name = _domain_name; + state->orig.in.Account = _Account; + state->orig.in.unknown = _unknown; + state->orig.in.num_ous = _num_ous; + + /* Out parameters */ + state->orig.out.num_ous = _num_ous; + state->orig.out.ous = _ous; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetrGetJoinableOus, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_wkssvc_NetrGetJoinableOus_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_wkssvc, + NDR_WKSSVC_NETRGETJOINABLEOUS, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetrGetJoinableOus_done, req); + return req; +} + +static void rpccli_wkssvc_NetrGetJoinableOus_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetrGetJoinableOus_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrGetJoinableOus_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.num_ous = *state->tmp.out.num_ous; + *state->orig.out.ous = *state->tmp.out.ous; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wkssvc_NetrGetJoinableOus, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetrGetJoinableOus_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetrGetJoinableOus_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrGetJoinableOus_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_wkssvc_NetrGetJoinableOus(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -1108,6 +3827,128 @@ NTSTATUS rpccli_wkssvc_NetrGetJoinableOus(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_wkssvc_NetrJoinDomain2_state { + struct wkssvc_NetrJoinDomain2 orig; + struct wkssvc_NetrJoinDomain2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetrJoinDomain2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetrJoinDomain2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_domain_name /* [in] [ref,charset(UTF16)] */, + const char *_account_ou /* [in] [unique,charset(UTF16)] */, + const char *_admin_account /* [in] [unique,charset(UTF16)] */, + struct wkssvc_PasswordBuffer *_encrypted_password /* [in] [unique] */, + uint32_t _join_flags /* [in] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetrJoinDomain2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetrJoinDomain2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.domain_name = _domain_name; + state->orig.in.account_ou = _account_ou; + state->orig.in.admin_account = _admin_account; + state->orig.in.encrypted_password = _encrypted_password; + state->orig.in.join_flags = _join_flags; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetrJoinDomain2, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_wkssvc, + NDR_WKSSVC_NETRJOINDOMAIN2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetrJoinDomain2_done, req); + return req; +} + +static void rpccli_wkssvc_NetrJoinDomain2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetrJoinDomain2_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrJoinDomain2_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wkssvc_NetrJoinDomain2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetrJoinDomain2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetrJoinDomain2_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrJoinDomain2_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_wkssvc_NetrJoinDomain2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -1161,6 +4002,124 @@ NTSTATUS rpccli_wkssvc_NetrJoinDomain2(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_wkssvc_NetrUnjoinDomain2_state { + struct wkssvc_NetrUnjoinDomain2 orig; + struct wkssvc_NetrUnjoinDomain2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetrUnjoinDomain2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetrUnjoinDomain2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_account /* [in] [unique,charset(UTF16)] */, + struct wkssvc_PasswordBuffer *_encrypted_password /* [in] [unique] */, + uint32_t _unjoin_flags /* [in] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetrUnjoinDomain2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetrUnjoinDomain2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.account = _account; + state->orig.in.encrypted_password = _encrypted_password; + state->orig.in.unjoin_flags = _unjoin_flags; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetrUnjoinDomain2, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_wkssvc, + NDR_WKSSVC_NETRUNJOINDOMAIN2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetrUnjoinDomain2_done, req); + return req; +} + +static void rpccli_wkssvc_NetrUnjoinDomain2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetrUnjoinDomain2_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrUnjoinDomain2_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wkssvc_NetrUnjoinDomain2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetrUnjoinDomain2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetrUnjoinDomain2_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrUnjoinDomain2_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_wkssvc_NetrUnjoinDomain2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -1210,6 +4169,126 @@ NTSTATUS rpccli_wkssvc_NetrUnjoinDomain2(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_wkssvc_NetrRenameMachineInDomain2_state { + struct wkssvc_NetrRenameMachineInDomain2 orig; + struct wkssvc_NetrRenameMachineInDomain2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetrRenameMachineInDomain2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetrRenameMachineInDomain2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_NewMachineName /* [in] [unique,charset(UTF16)] */, + const char *_Account /* [in] [unique,charset(UTF16)] */, + struct wkssvc_PasswordBuffer *_EncryptedPassword /* [in] [unique] */, + uint32_t _RenameOptions /* [in] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetrRenameMachineInDomain2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetrRenameMachineInDomain2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.NewMachineName = _NewMachineName; + state->orig.in.Account = _Account; + state->orig.in.EncryptedPassword = _EncryptedPassword; + state->orig.in.RenameOptions = _RenameOptions; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetrRenameMachineInDomain2, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_wkssvc, + NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetrRenameMachineInDomain2_done, req); + return req; +} + +static void rpccli_wkssvc_NetrRenameMachineInDomain2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetrRenameMachineInDomain2_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrRenameMachineInDomain2_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wkssvc_NetrRenameMachineInDomain2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetrRenameMachineInDomain2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetrRenameMachineInDomain2_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrRenameMachineInDomain2_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_wkssvc_NetrRenameMachineInDomain2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -1261,6 +4340,126 @@ NTSTATUS rpccli_wkssvc_NetrRenameMachineInDomain2(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_wkssvc_NetrValidateName2_state { + struct wkssvc_NetrValidateName2 orig; + struct wkssvc_NetrValidateName2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetrValidateName2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetrValidateName2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_name /* [in] [ref,charset(UTF16)] */, + const char *_Account /* [in] [unique,charset(UTF16)] */, + struct wkssvc_PasswordBuffer *_EncryptedPassword /* [in] [unique] */, + enum wkssvc_NetValidateNameType _name_type /* [in] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetrValidateName2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetrValidateName2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.name = _name; + state->orig.in.Account = _Account; + state->orig.in.EncryptedPassword = _EncryptedPassword; + state->orig.in.name_type = _name_type; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetrValidateName2, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_wkssvc, + NDR_WKSSVC_NETRVALIDATENAME2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetrValidateName2_done, req); + return req; +} + +static void rpccli_wkssvc_NetrValidateName2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetrValidateName2_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrValidateName2_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wkssvc_NetrValidateName2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetrValidateName2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetrValidateName2_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrValidateName2_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_wkssvc_NetrValidateName2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -1312,6 +4511,137 @@ NTSTATUS rpccli_wkssvc_NetrValidateName2(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_wkssvc_NetrGetJoinableOus2_state { + struct wkssvc_NetrGetJoinableOus2 orig; + struct wkssvc_NetrGetJoinableOus2 tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetrGetJoinableOus2_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetrGetJoinableOus2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_domain_name /* [in] [ref,charset(UTF16)] */, + const char *_Account /* [in] [unique,charset(UTF16)] */, + struct wkssvc_PasswordBuffer *_EncryptedPassword /* [in] [unique] */, + uint32_t *_num_ous /* [in,out] [ref] */, + const char ***_ous /* [out] [ref,charset(UTF16),size_is(,*num_ous)] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetrGetJoinableOus2_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetrGetJoinableOus2_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.domain_name = _domain_name; + state->orig.in.Account = _Account; + state->orig.in.EncryptedPassword = _EncryptedPassword; + state->orig.in.num_ous = _num_ous; + + /* Out parameters */ + state->orig.out.num_ous = _num_ous; + state->orig.out.ous = _ous; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetrGetJoinableOus2, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_wkssvc_NetrGetJoinableOus2_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_wkssvc, + NDR_WKSSVC_NETRGETJOINABLEOUS2, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetrGetJoinableOus2_done, req); + return req; +} + +static void rpccli_wkssvc_NetrGetJoinableOus2_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetrGetJoinableOus2_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrGetJoinableOus2_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.num_ous = *state->tmp.out.num_ous; + *state->orig.out.ous = *state->tmp.out.ous; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wkssvc_NetrGetJoinableOus2, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetrGetJoinableOus2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetrGetJoinableOus2_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrGetJoinableOus2_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_wkssvc_NetrGetJoinableOus2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -1366,6 +4696,126 @@ NTSTATUS rpccli_wkssvc_NetrGetJoinableOus2(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_wkssvc_NetrAddAlternateComputerName_state { + struct wkssvc_NetrAddAlternateComputerName orig; + struct wkssvc_NetrAddAlternateComputerName tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetrAddAlternateComputerName_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetrAddAlternateComputerName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_NewAlternateMachineName /* [in] [unique,charset(UTF16)] */, + const char *_Account /* [in] [unique,charset(UTF16)] */, + struct wkssvc_PasswordBuffer *_EncryptedPassword /* [in] [unique] */, + uint32_t _Reserved /* [in] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetrAddAlternateComputerName_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetrAddAlternateComputerName_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.NewAlternateMachineName = _NewAlternateMachineName; + state->orig.in.Account = _Account; + state->orig.in.EncryptedPassword = _EncryptedPassword; + state->orig.in.Reserved = _Reserved; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetrAddAlternateComputerName, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_wkssvc, + NDR_WKSSVC_NETRADDALTERNATECOMPUTERNAME, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetrAddAlternateComputerName_done, req); + return req; +} + +static void rpccli_wkssvc_NetrAddAlternateComputerName_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetrAddAlternateComputerName_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrAddAlternateComputerName_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wkssvc_NetrAddAlternateComputerName, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetrAddAlternateComputerName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetrAddAlternateComputerName_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrAddAlternateComputerName_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_wkssvc_NetrAddAlternateComputerName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -1417,6 +4867,126 @@ NTSTATUS rpccli_wkssvc_NetrAddAlternateComputerName(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_wkssvc_NetrRemoveAlternateComputerName_state { + struct wkssvc_NetrRemoveAlternateComputerName orig; + struct wkssvc_NetrRemoveAlternateComputerName tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetrRemoveAlternateComputerName_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetrRemoveAlternateComputerName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_AlternateMachineNameToRemove /* [in] [unique,charset(UTF16)] */, + const char *_Account /* [in] [unique,charset(UTF16)] */, + struct wkssvc_PasswordBuffer *_EncryptedPassword /* [in] [unique] */, + uint32_t _Reserved /* [in] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetrRemoveAlternateComputerName_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetrRemoveAlternateComputerName_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.AlternateMachineNameToRemove = _AlternateMachineNameToRemove; + state->orig.in.Account = _Account; + state->orig.in.EncryptedPassword = _EncryptedPassword; + state->orig.in.Reserved = _Reserved; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetrRemoveAlternateComputerName, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_wkssvc, + NDR_WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetrRemoveAlternateComputerName_done, req); + return req; +} + +static void rpccli_wkssvc_NetrRemoveAlternateComputerName_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetrRemoveAlternateComputerName_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrRemoveAlternateComputerName_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wkssvc_NetrRemoveAlternateComputerName, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetrRemoveAlternateComputerName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetrRemoveAlternateComputerName_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrRemoveAlternateComputerName_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_wkssvc_NetrRemoveAlternateComputerName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -1468,6 +5038,126 @@ NTSTATUS rpccli_wkssvc_NetrRemoveAlternateComputerName(struct rpc_pipe_client *c return werror_to_ntstatus(r.out.result); } +struct rpccli_wkssvc_NetrSetPrimaryComputername_state { + struct wkssvc_NetrSetPrimaryComputername orig; + struct wkssvc_NetrSetPrimaryComputername tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetrSetPrimaryComputername_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetrSetPrimaryComputername_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_primary_name /* [in] [unique,charset(UTF16)] */, + const char *_Account /* [in] [unique,charset(UTF16)] */, + struct wkssvc_PasswordBuffer *_EncryptedPassword /* [in] [unique] */, + uint32_t _Reserved /* [in] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetrSetPrimaryComputername_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetrSetPrimaryComputername_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.primary_name = _primary_name; + state->orig.in.Account = _Account; + state->orig.in.EncryptedPassword = _EncryptedPassword; + state->orig.in.Reserved = _Reserved; + + /* Out parameters */ + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetrSetPrimaryComputername, &state->orig); + } + + /* make a temporary copy, that we pass to the dispatch function */ + state->tmp = state->orig; + + subreq = cli->dispatch_send(state, ev, cli, + &ndr_table_wkssvc, + NDR_WKSSVC_NETRSETPRIMARYCOMPUTERNAME, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetrSetPrimaryComputername_done, req); + return req; +} + +static void rpccli_wkssvc_NetrSetPrimaryComputername_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetrSetPrimaryComputername_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrSetPrimaryComputername_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 */ + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wkssvc_NetrSetPrimaryComputername, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetrSetPrimaryComputername_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetrSetPrimaryComputername_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrSetPrimaryComputername_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_wkssvc_NetrSetPrimaryComputername(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -1519,6 +5209,131 @@ NTSTATUS rpccli_wkssvc_NetrSetPrimaryComputername(struct rpc_pipe_client *cli, return werror_to_ntstatus(r.out.result); } +struct rpccli_wkssvc_NetrEnumerateComputerNames_state { + struct wkssvc_NetrEnumerateComputerNames orig; + struct wkssvc_NetrEnumerateComputerNames tmp; + TALLOC_CTX *out_mem_ctx; + NTSTATUS (*dispatch_recv)(struct tevent_req *req, TALLOC_CTX *mem_ctx); +}; + +static void rpccli_wkssvc_NetrEnumerateComputerNames_done(struct tevent_req *subreq); + +struct tevent_req *rpccli_wkssvc_NetrEnumerateComputerNames_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + enum wkssvc_ComputerNameType _name_type /* [in] */, + uint32_t _Reserved /* [in] */, + struct wkssvc_ComputerNamesCtr **_ctr /* [out] [ref] */) +{ + struct tevent_req *req; + struct rpccli_wkssvc_NetrEnumerateComputerNames_state *state; + struct tevent_req *subreq; + + req = tevent_req_create(mem_ctx, &state, + struct rpccli_wkssvc_NetrEnumerateComputerNames_state); + if (req == NULL) { + return NULL; + } + state->out_mem_ctx = NULL; + state->dispatch_recv = cli->dispatch_recv; + + /* In parameters */ + state->orig.in.server_name = _server_name; + state->orig.in.name_type = _name_type; + state->orig.in.Reserved = _Reserved; + + /* Out parameters */ + state->orig.out.ctr = _ctr; + + /* Result */ + ZERO_STRUCT(state->orig.out.result); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_IN_DEBUG(wkssvc_NetrEnumerateComputerNames, &state->orig); + } + + state->out_mem_ctx = talloc_named_const(state, 0, + "rpccli_wkssvc_NetrEnumerateComputerNames_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_wkssvc, + NDR_WKSSVC_NETRENUMERATECOMPUTERNAMES, + &state->tmp); + if (tevent_req_nomem(subreq, req)) { + return tevent_req_post(req, ev); + } + tevent_req_set_callback(subreq, rpccli_wkssvc_NetrEnumerateComputerNames_done, req); + return req; +} + +static void rpccli_wkssvc_NetrEnumerateComputerNames_done(struct tevent_req *subreq) +{ + struct tevent_req *req = tevent_req_callback_data( + subreq, struct tevent_req); + struct rpccli_wkssvc_NetrEnumerateComputerNames_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrEnumerateComputerNames_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.ctr = *state->tmp.out.ctr; + + /* Copy result */ + state->orig.out.result = state->tmp.out.result; + + /* Reset temporary structure */ + ZERO_STRUCT(state->tmp); + + if (DEBUGLEVEL >= 10) { + NDR_PRINT_OUT_DEBUG(wkssvc_NetrEnumerateComputerNames, &state->orig); + } + + tevent_req_done(req); +} + +NTSTATUS rpccli_wkssvc_NetrEnumerateComputerNames_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result) +{ + struct rpccli_wkssvc_NetrEnumerateComputerNames_state *state = tevent_req_data( + req, struct rpccli_wkssvc_NetrEnumerateComputerNames_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_wkssvc_NetrEnumerateComputerNames(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, diff --git a/librpc/gen_ndr/cli_wkssvc.h b/librpc/gen_ndr/cli_wkssvc.h index 2427099f0e..1d3165f439 100644 --- a/librpc/gen_ndr/cli_wkssvc.h +++ b/librpc/gen_ndr/cli_wkssvc.h @@ -1,12 +1,31 @@ #include "../librpc/gen_ndr/ndr_wkssvc.h" #ifndef __CLI_WKSSVC__ #define __CLI_WKSSVC__ +struct tevent_req *rpccli_wkssvc_NetWkstaGetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + union wkssvc_NetWkstaInfo *_info /* [out] [ref,switch_is(level)] */); +NTSTATUS rpccli_wkssvc_NetWkstaGetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetWkstaGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, uint32_t level /* [in] */, union wkssvc_NetWkstaInfo *info /* [out] [ref,switch_is(level)] */, WERROR *werror); +struct tevent_req *rpccli_wkssvc_NetWkstaSetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + union wkssvc_NetWkstaInfo *_info /* [in] [ref,switch_is(level)] */, + uint32_t *_parm_error /* [in,out] [ref] */); +NTSTATUS rpccli_wkssvc_NetWkstaSetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetWkstaSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -14,6 +33,17 @@ NTSTATUS rpccli_wkssvc_NetWkstaSetInfo(struct rpc_pipe_client *cli, union wkssvc_NetWkstaInfo *info /* [in] [ref,switch_is(level)] */, uint32_t *parm_error /* [in,out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_wkssvc_NetWkstaEnumUsers_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + struct wkssvc_NetWkstaEnumUsersInfo *_info /* [in,out] [ref] */, + uint32_t _prefmaxlen /* [in] */, + uint32_t *_entries_read /* [out] [ref] */, + uint32_t *_resume_handle /* [in,out] [unique] */); +NTSTATUS rpccli_wkssvc_NetWkstaEnumUsers_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetWkstaEnumUsers(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -22,12 +52,31 @@ NTSTATUS rpccli_wkssvc_NetWkstaEnumUsers(struct rpc_pipe_client *cli, uint32_t *entries_read /* [out] [ref] */, uint32_t *resume_handle /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_wkssvc_NetrWkstaUserGetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_unknown /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + union wkssvc_NetrWkstaUserInfo *_info /* [out] [ref,switch_is(level)] */); +NTSTATUS rpccli_wkssvc_NetrWkstaUserGetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetrWkstaUserGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *unknown /* [in] [unique,charset(UTF16)] */, uint32_t level /* [in] */, union wkssvc_NetrWkstaUserInfo *info /* [out] [ref,switch_is(level)] */, WERROR *werror); +struct tevent_req *rpccli_wkssvc_NetrWkstaUserSetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_unknown /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + union wkssvc_NetrWkstaUserInfo *_info /* [in] [ref,switch_is(level)] */, + uint32_t *_parm_err /* [in,out] [unique] */); +NTSTATUS rpccli_wkssvc_NetrWkstaUserSetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetrWkstaUserSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *unknown /* [in] [unique,charset(UTF16)] */, @@ -35,6 +84,17 @@ NTSTATUS rpccli_wkssvc_NetrWkstaUserSetInfo(struct rpc_pipe_client *cli, union wkssvc_NetrWkstaUserInfo *info /* [in] [ref,switch_is(level)] */, uint32_t *parm_err /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_wkssvc_NetWkstaTransportEnum_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + struct wkssvc_NetWkstaTransportInfo *_info /* [in,out] [ref] */, + uint32_t _max_buffer /* [in] */, + uint32_t *_total_entries /* [out] [ref] */, + uint32_t *_resume_handle /* [in,out] [unique] */); +NTSTATUS rpccli_wkssvc_NetWkstaTransportEnum_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetWkstaTransportEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -43,6 +103,16 @@ NTSTATUS rpccli_wkssvc_NetWkstaTransportEnum(struct rpc_pipe_client *cli, uint32_t *total_entries /* [out] [ref] */, uint32_t *resume_handle /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_wkssvc_NetrWkstaTransportAdd_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + struct wkssvc_NetWkstaTransportInfo0 *_info0 /* [in] [ref] */, + uint32_t *_parm_err /* [in,out] [unique] */); +NTSTATUS rpccli_wkssvc_NetrWkstaTransportAdd_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetrWkstaTransportAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -50,12 +120,31 @@ NTSTATUS rpccli_wkssvc_NetrWkstaTransportAdd(struct rpc_pipe_client *cli, struct wkssvc_NetWkstaTransportInfo0 *info0 /* [in] [ref] */, uint32_t *parm_err /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_wkssvc_NetrWkstaTransportDel_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_transport_name /* [in] [unique,charset(UTF16)] */, + uint32_t _unknown3 /* [in] */); +NTSTATUS rpccli_wkssvc_NetrWkstaTransportDel_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetrWkstaTransportDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, const char *transport_name /* [in] [unique,charset(UTF16)] */, uint32_t unknown3 /* [in] */, WERROR *werror); +struct tevent_req *rpccli_wkssvc_NetrUseAdd_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + uint32_t _level /* [in] */, + union wkssvc_NetrUseGetInfoCtr *_ctr /* [in] [ref,switch_is(level)] */, + uint32_t *_parm_err /* [in,out] [unique] */); +NTSTATUS rpccli_wkssvc_NetrUseAdd_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetrUseAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -63,6 +152,16 @@ NTSTATUS rpccli_wkssvc_NetrUseAdd(struct rpc_pipe_client *cli, union wkssvc_NetrUseGetInfoCtr *ctr /* [in] [ref,switch_is(level)] */, uint32_t *parm_err /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_wkssvc_NetrUseGetInfo_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_use_name /* [in] [ref,charset(UTF16)] */, + uint32_t _level /* [in] */, + union wkssvc_NetrUseGetInfoCtr *_ctr /* [out] [ref,switch_is(level)] */); +NTSTATUS rpccli_wkssvc_NetrUseGetInfo_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetrUseGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -70,12 +169,32 @@ NTSTATUS rpccli_wkssvc_NetrUseGetInfo(struct rpc_pipe_client *cli, uint32_t level /* [in] */, union wkssvc_NetrUseGetInfoCtr *ctr /* [out] [ref,switch_is(level)] */, WERROR *werror); +struct tevent_req *rpccli_wkssvc_NetrUseDel_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_use_name /* [in] [ref,charset(UTF16)] */, + uint32_t _force_cond /* [in] */); +NTSTATUS rpccli_wkssvc_NetrUseDel_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetrUseDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, const char *use_name /* [in] [ref,charset(UTF16)] */, uint32_t force_cond /* [in] */, WERROR *werror); +struct tevent_req *rpccli_wkssvc_NetrUseEnum_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + struct wkssvc_NetrUseEnumInfo *_info /* [in,out] [ref] */, + uint32_t _prefmaxlen /* [in] */, + uint32_t *_entries_read /* [out] [ref] */, + uint32_t *_resume_handle /* [in,out] [unique] */); +NTSTATUS rpccli_wkssvc_NetrUseEnum_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetrUseEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -84,6 +203,17 @@ NTSTATUS rpccli_wkssvc_NetrUseEnum(struct rpc_pipe_client *cli, uint32_t *entries_read /* [out] [ref] */, uint32_t *resume_handle /* [in,out] [unique] */, WERROR *werror); +struct tevent_req *rpccli_wkssvc_NetrMessageBufferSend_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_message_name /* [in] [ref,charset(UTF16)] */, + const char *_message_sender_name /* [in] [unique,charset(UTF16)] */, + uint8_t *_message_buffer /* [in] [ref,size_is(message_size)] */, + uint32_t _message_size /* [in] */); +NTSTATUS rpccli_wkssvc_NetrMessageBufferSend_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetrMessageBufferSend(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -92,6 +222,17 @@ NTSTATUS rpccli_wkssvc_NetrMessageBufferSend(struct rpc_pipe_client *cli, uint8_t *message_buffer /* [in] [ref,size_is(message_size)] */, uint32_t message_size /* [in] */, WERROR *werror); +struct tevent_req *rpccli_wkssvc_NetrWorkstationStatisticsGet_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_unknown2 /* [in] [unique,charset(UTF16)] */, + uint32_t _unknown3 /* [in] */, + uint32_t _unknown4 /* [in] */, + struct wkssvc_NetrWorkstationStatistics **_info /* [out] [ref] */); +NTSTATUS rpccli_wkssvc_NetrWorkstationStatisticsGet_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetrWorkstationStatisticsGet(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -100,14 +241,40 @@ NTSTATUS rpccli_wkssvc_NetrWorkstationStatisticsGet(struct rpc_pipe_client *cli, uint32_t unknown4 /* [in] */, struct wkssvc_NetrWorkstationStatistics **info /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_wkssvc_NetrLogonDomainNameAdd_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_domain_name /* [in] [ref,charset(UTF16)] */); +NTSTATUS rpccli_wkssvc_NetrLogonDomainNameAdd_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetrLogonDomainNameAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *domain_name /* [in] [ref,charset(UTF16)] */, WERROR *werror); +struct tevent_req *rpccli_wkssvc_NetrLogonDomainNameDel_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_domain_name /* [in] [ref,charset(UTF16)] */); +NTSTATUS rpccli_wkssvc_NetrLogonDomainNameDel_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetrLogonDomainNameDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *domain_name /* [in] [ref,charset(UTF16)] */, WERROR *werror); +struct tevent_req *rpccli_wkssvc_NetrJoinDomain_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_domain_name /* [in] [ref,charset(UTF16)] */, + const char *_account_ou /* [in] [unique,charset(UTF16)] */, + const char *_Account /* [in] [unique,charset(UTF16)] */, + const char *_password /* [in] [unique,charset(UTF16)] */, + uint32_t _join_flags /* [in] */); +NTSTATUS rpccli_wkssvc_NetrJoinDomain_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetrJoinDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -117,6 +284,16 @@ NTSTATUS rpccli_wkssvc_NetrJoinDomain(struct rpc_pipe_client *cli, const char *password /* [in] [unique,charset(UTF16)] */, uint32_t join_flags /* [in] */, WERROR *werror); +struct tevent_req *rpccli_wkssvc_NetrUnjoinDomain_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_Account /* [in] [unique,charset(UTF16)] */, + const char *_password /* [in] [unique,charset(UTF16)] */, + uint32_t _unjoin_flags /* [in] */); +NTSTATUS rpccli_wkssvc_NetrUnjoinDomain_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetrUnjoinDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -124,6 +301,17 @@ NTSTATUS rpccli_wkssvc_NetrUnjoinDomain(struct rpc_pipe_client *cli, const char *password /* [in] [unique,charset(UTF16)] */, uint32_t unjoin_flags /* [in] */, WERROR *werror); +struct tevent_req *rpccli_wkssvc_NetrRenameMachineInDomain_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_NewMachineName /* [in] [unique,charset(UTF16)] */, + const char *_Account /* [in] [unique,charset(UTF16)] */, + const char *_password /* [in] [unique,charset(UTF16)] */, + uint32_t _RenameOptions /* [in] */); +NTSTATUS rpccli_wkssvc_NetrRenameMachineInDomain_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetrRenameMachineInDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -132,6 +320,17 @@ NTSTATUS rpccli_wkssvc_NetrRenameMachineInDomain(struct rpc_pipe_client *cli, const char *password /* [in] [unique,charset(UTF16)] */, uint32_t RenameOptions /* [in] */, WERROR *werror); +struct tevent_req *rpccli_wkssvc_NetrValidateName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_name /* [in] [ref,charset(UTF16)] */, + const char *_Account /* [in] [unique,charset(UTF16)] */, + const char *_Password /* [in] [unique,charset(UTF16)] */, + enum wkssvc_NetValidateNameType _name_type /* [in] */); +NTSTATUS rpccli_wkssvc_NetrValidateName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetrValidateName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -140,12 +339,33 @@ NTSTATUS rpccli_wkssvc_NetrValidateName(struct rpc_pipe_client *cli, const char *Password /* [in] [unique,charset(UTF16)] */, enum wkssvc_NetValidateNameType name_type /* [in] */, WERROR *werror); +struct tevent_req *rpccli_wkssvc_NetrGetJoinInformation_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char **_name_buffer /* [in,out] [ref,charset(UTF16)] */, + enum wkssvc_NetJoinStatus *_name_type /* [out] [ref] */); +NTSTATUS rpccli_wkssvc_NetrGetJoinInformation_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetrGetJoinInformation(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, const char **name_buffer /* [in,out] [ref,charset(UTF16)] */, enum wkssvc_NetJoinStatus *name_type /* [out] [ref] */, WERROR *werror); +struct tevent_req *rpccli_wkssvc_NetrGetJoinableOus_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_domain_name /* [in] [ref,charset(UTF16)] */, + const char *_Account /* [in] [unique,charset(UTF16)] */, + const char *_unknown /* [in] [unique,charset(UTF16)] */, + uint32_t *_num_ous /* [in,out] [ref] */, + const char ***_ous /* [out] [ref,charset(UTF16),size_is(,*num_ous)] */); +NTSTATUS rpccli_wkssvc_NetrGetJoinableOus_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetrGetJoinableOus(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -155,6 +375,18 @@ NTSTATUS rpccli_wkssvc_NetrGetJoinableOus(struct rpc_pipe_client *cli, uint32_t *num_ous /* [in,out] [ref] */, const char ***ous /* [out] [ref,charset(UTF16),size_is(,*num_ous)] */, WERROR *werror); +struct tevent_req *rpccli_wkssvc_NetrJoinDomain2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_domain_name /* [in] [ref,charset(UTF16)] */, + const char *_account_ou /* [in] [unique,charset(UTF16)] */, + const char *_admin_account /* [in] [unique,charset(UTF16)] */, + struct wkssvc_PasswordBuffer *_encrypted_password /* [in] [unique] */, + uint32_t _join_flags /* [in] */); +NTSTATUS rpccli_wkssvc_NetrJoinDomain2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetrJoinDomain2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -164,6 +396,16 @@ NTSTATUS rpccli_wkssvc_NetrJoinDomain2(struct rpc_pipe_client *cli, struct wkssvc_PasswordBuffer *encrypted_password /* [in] [unique] */, uint32_t join_flags /* [in] */, WERROR *werror); +struct tevent_req *rpccli_wkssvc_NetrUnjoinDomain2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_account /* [in] [unique,charset(UTF16)] */, + struct wkssvc_PasswordBuffer *_encrypted_password /* [in] [unique] */, + uint32_t _unjoin_flags /* [in] */); +NTSTATUS rpccli_wkssvc_NetrUnjoinDomain2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetrUnjoinDomain2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -171,6 +413,17 @@ NTSTATUS rpccli_wkssvc_NetrUnjoinDomain2(struct rpc_pipe_client *cli, struct wkssvc_PasswordBuffer *encrypted_password /* [in] [unique] */, uint32_t unjoin_flags /* [in] */, WERROR *werror); +struct tevent_req *rpccli_wkssvc_NetrRenameMachineInDomain2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_NewMachineName /* [in] [unique,charset(UTF16)] */, + const char *_Account /* [in] [unique,charset(UTF16)] */, + struct wkssvc_PasswordBuffer *_EncryptedPassword /* [in] [unique] */, + uint32_t _RenameOptions /* [in] */); +NTSTATUS rpccli_wkssvc_NetrRenameMachineInDomain2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetrRenameMachineInDomain2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -179,6 +432,17 @@ NTSTATUS rpccli_wkssvc_NetrRenameMachineInDomain2(struct rpc_pipe_client *cli, struct wkssvc_PasswordBuffer *EncryptedPassword /* [in] [unique] */, uint32_t RenameOptions /* [in] */, WERROR *werror); +struct tevent_req *rpccli_wkssvc_NetrValidateName2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_name /* [in] [ref,charset(UTF16)] */, + const char *_Account /* [in] [unique,charset(UTF16)] */, + struct wkssvc_PasswordBuffer *_EncryptedPassword /* [in] [unique] */, + enum wkssvc_NetValidateNameType _name_type /* [in] */); +NTSTATUS rpccli_wkssvc_NetrValidateName2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetrValidateName2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -187,6 +451,18 @@ NTSTATUS rpccli_wkssvc_NetrValidateName2(struct rpc_pipe_client *cli, struct wkssvc_PasswordBuffer *EncryptedPassword /* [in] [unique] */, enum wkssvc_NetValidateNameType name_type /* [in] */, WERROR *werror); +struct tevent_req *rpccli_wkssvc_NetrGetJoinableOus2_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_domain_name /* [in] [ref,charset(UTF16)] */, + const char *_Account /* [in] [unique,charset(UTF16)] */, + struct wkssvc_PasswordBuffer *_EncryptedPassword /* [in] [unique] */, + uint32_t *_num_ous /* [in,out] [ref] */, + const char ***_ous /* [out] [ref,charset(UTF16),size_is(,*num_ous)] */); +NTSTATUS rpccli_wkssvc_NetrGetJoinableOus2_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetrGetJoinableOus2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -196,6 +472,17 @@ NTSTATUS rpccli_wkssvc_NetrGetJoinableOus2(struct rpc_pipe_client *cli, uint32_t *num_ous /* [in,out] [ref] */, const char ***ous /* [out] [ref,charset(UTF16),size_is(,*num_ous)] */, WERROR *werror); +struct tevent_req *rpccli_wkssvc_NetrAddAlternateComputerName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_NewAlternateMachineName /* [in] [unique,charset(UTF16)] */, + const char *_Account /* [in] [unique,charset(UTF16)] */, + struct wkssvc_PasswordBuffer *_EncryptedPassword /* [in] [unique] */, + uint32_t _Reserved /* [in] */); +NTSTATUS rpccli_wkssvc_NetrAddAlternateComputerName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetrAddAlternateComputerName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -204,6 +491,17 @@ NTSTATUS rpccli_wkssvc_NetrAddAlternateComputerName(struct rpc_pipe_client *cli, struct wkssvc_PasswordBuffer *EncryptedPassword /* [in] [unique] */, uint32_t Reserved /* [in] */, WERROR *werror); +struct tevent_req *rpccli_wkssvc_NetrRemoveAlternateComputerName_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_AlternateMachineNameToRemove /* [in] [unique,charset(UTF16)] */, + const char *_Account /* [in] [unique,charset(UTF16)] */, + struct wkssvc_PasswordBuffer *_EncryptedPassword /* [in] [unique] */, + uint32_t _Reserved /* [in] */); +NTSTATUS rpccli_wkssvc_NetrRemoveAlternateComputerName_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetrRemoveAlternateComputerName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -212,6 +510,17 @@ NTSTATUS rpccli_wkssvc_NetrRemoveAlternateComputerName(struct rpc_pipe_client *c struct wkssvc_PasswordBuffer *EncryptedPassword /* [in] [unique] */, uint32_t Reserved /* [in] */, WERROR *werror); +struct tevent_req *rpccli_wkssvc_NetrSetPrimaryComputername_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + const char *_primary_name /* [in] [unique,charset(UTF16)] */, + const char *_Account /* [in] [unique,charset(UTF16)] */, + struct wkssvc_PasswordBuffer *_EncryptedPassword /* [in] [unique] */, + uint32_t _Reserved /* [in] */); +NTSTATUS rpccli_wkssvc_NetrSetPrimaryComputername_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetrSetPrimaryComputername(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, @@ -220,6 +529,16 @@ NTSTATUS rpccli_wkssvc_NetrSetPrimaryComputername(struct rpc_pipe_client *cli, struct wkssvc_PasswordBuffer *EncryptedPassword /* [in] [unique] */, uint32_t Reserved /* [in] */, WERROR *werror); +struct tevent_req *rpccli_wkssvc_NetrEnumerateComputerNames_send(TALLOC_CTX *mem_ctx, + struct tevent_context *ev, + struct rpc_pipe_client *cli, + const char *_server_name /* [in] [unique,charset(UTF16)] */, + enum wkssvc_ComputerNameType _name_type /* [in] */, + uint32_t _Reserved /* [in] */, + struct wkssvc_ComputerNamesCtr **_ctr /* [out] [ref] */); +NTSTATUS rpccli_wkssvc_NetrEnumerateComputerNames_recv(struct tevent_req *req, + TALLOC_CTX *mem_ctx, + WERROR *result); NTSTATUS rpccli_wkssvc_NetrEnumerateComputerNames(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name /* [in] [unique,charset(UTF16)] */, |