diff options
author | Günther Deschner <gd@samba.org> | 2007-12-03 18:19:20 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2007-12-03 18:43:19 +0100 |
commit | 59e9d5b449c8c5b91aa1bd621f41213feba775d0 (patch) | |
tree | 3995e096cd9d1b9a42e506140f2c8fef663c7b0f /source3/librpc | |
parent | 66887ddfbad5fde60ea7495fad33a5eb77c88b49 (diff) | |
download | samba-59e9d5b449c8c5b91aa1bd621f41213feba775d0.tar.gz samba-59e9d5b449c8c5b91aa1bd621f41213feba775d0.tar.bz2 samba-59e9d5b449c8c5b91aa1bd621f41213feba775d0.zip |
Regenerate pidl rpc client calls that are WERROR based.
Guenther
(This used to be commit 298b0ce951f02705c5660a4171f7cc208de7a1db)
Diffstat (limited to 'source3/librpc')
-rw-r--r-- | source3/librpc/gen_ndr/cli_dfs.c | 132 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/cli_initshutdown.c | 18 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/cli_netlogon.c | 174 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/cli_srvsvc.c | 324 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/cli_svcctl.c | 264 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/cli_winreg.c | 210 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/cli_wkssvc.c | 186 |
7 files changed, 1090 insertions, 218 deletions
diff --git a/source3/librpc/gen_ndr/cli_dfs.c b/source3/librpc/gen_ndr/cli_dfs.c index 154ceff067..fda04608d3 100644 --- a/source3/librpc/gen_ndr/cli_dfs.c +++ b/source3/librpc/gen_ndr/cli_dfs.c @@ -36,7 +36,7 @@ NTSTATUS rpccli_dfs_GetManagerVersion(struct rpc_pipe_client *cli, TALLOC_CTX *m return NT_STATUS_OK; } -NTSTATUS rpccli_dfs_Add(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *path, const char *server, const char *share, const char *comment, uint32_t flags) +NTSTATUS rpccli_dfs_Add(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *path, const char *server, const char *share, const char *comment, uint32_t flags, WERROR *werror) { struct dfs_Add r; NTSTATUS status; @@ -67,10 +67,14 @@ NTSTATUS rpccli_dfs_Add(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_dfs_Remove(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *dfs_entry_path, const char *servername, const char *sharename) +NTSTATUS rpccli_dfs_Remove(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *dfs_entry_path, const char *servername, const char *sharename, WERROR *werror) { struct dfs_Remove r; NTSTATUS status; @@ -99,10 +103,14 @@ NTSTATUS rpccli_dfs_Remove(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, con /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_dfs_SetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *dfs_entry_path, const char *servername, const char *sharename, uint32_t level, union dfs_Info *info) +NTSTATUS rpccli_dfs_SetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *dfs_entry_path, const char *servername, const char *sharename, uint32_t level, union dfs_Info *info, WERROR *werror) { struct dfs_SetInfo r; NTSTATUS status; @@ -133,10 +141,14 @@ NTSTATUS rpccli_dfs_SetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, co /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_dfs_GetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *dfs_entry_path, const char *servername, const char *sharename, uint32_t level, union dfs_Info *info) +NTSTATUS rpccli_dfs_GetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *dfs_entry_path, const char *servername, const char *sharename, uint32_t level, union dfs_Info *info, WERROR *werror) { struct dfs_GetInfo r; NTSTATUS status; @@ -167,10 +179,14 @@ NTSTATUS rpccli_dfs_GetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, co *info = *r.out.info; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_dfs_Enum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t level, uint32_t bufsize, struct dfs_EnumStruct *info, uint32_t *total) +NTSTATUS rpccli_dfs_Enum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint32_t level, uint32_t bufsize, struct dfs_EnumStruct *info, uint32_t *total, WERROR *werror) { struct dfs_Enum r; NTSTATUS status; @@ -206,10 +222,14 @@ NTSTATUS rpccli_dfs_Enum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint3 } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_dfs_Rename(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_dfs_Rename(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct dfs_Rename r; NTSTATUS status; @@ -235,10 +255,14 @@ NTSTATUS rpccli_dfs_Rename(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_dfs_Move(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_dfs_Move(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct dfs_Move r; NTSTATUS status; @@ -264,10 +288,14 @@ NTSTATUS rpccli_dfs_Move(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_dfs_ManagerGetConfigInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_dfs_ManagerGetConfigInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct dfs_ManagerGetConfigInfo r; NTSTATUS status; @@ -293,10 +321,14 @@ NTSTATUS rpccli_dfs_ManagerGetConfigInfo(struct rpc_pipe_client *cli, TALLOC_CTX /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_dfs_ManagerSendSiteInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_dfs_ManagerSendSiteInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct dfs_ManagerSendSiteInfo r; NTSTATUS status; @@ -322,10 +354,14 @@ NTSTATUS rpccli_dfs_ManagerSendSiteInfo(struct rpc_pipe_client *cli, TALLOC_CTX /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_dfs_AddFtRoot(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername, const char *dns_servername, const char *dfsname, const char *rootshare, const char *comment, const char *dfs_config_dn, uint8_t unknown1, uint32_t flags, struct dfs_UnknownStruct **unknown2) +NTSTATUS rpccli_dfs_AddFtRoot(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername, const char *dns_servername, const char *dfsname, const char *rootshare, const char *comment, const char *dfs_config_dn, uint8_t unknown1, uint32_t flags, struct dfs_UnknownStruct **unknown2, WERROR *werror) { struct dfs_AddFtRoot r; NTSTATUS status; @@ -363,10 +399,14 @@ NTSTATUS rpccli_dfs_AddFtRoot(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_dfs_RemoveFtRoot(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername, const char *dns_servername, const char *dfsname, const char *rootshare, uint32_t flags, struct dfs_UnknownStruct **unknown) +NTSTATUS rpccli_dfs_RemoveFtRoot(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername, const char *dns_servername, const char *dfsname, const char *rootshare, uint32_t flags, struct dfs_UnknownStruct **unknown, WERROR *werror) { struct dfs_RemoveFtRoot r; NTSTATUS status; @@ -401,10 +441,14 @@ NTSTATUS rpccli_dfs_RemoveFtRoot(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_dfs_AddStdRoot(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername, const char *rootshare, const char *comment, uint32_t flags) +NTSTATUS rpccli_dfs_AddStdRoot(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername, const char *rootshare, const char *comment, uint32_t flags, WERROR *werror) { struct dfs_AddStdRoot r; NTSTATUS status; @@ -434,10 +478,14 @@ NTSTATUS rpccli_dfs_AddStdRoot(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_dfs_RemoveStdRoot(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername, const char *rootshare, uint32_t flags) +NTSTATUS rpccli_dfs_RemoveStdRoot(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername, const char *rootshare, uint32_t flags, WERROR *werror) { struct dfs_RemoveStdRoot r; NTSTATUS status; @@ -466,10 +514,14 @@ NTSTATUS rpccli_dfs_RemoveStdRoot(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_dfs_ManagerInitialize(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername, uint32_t flags) +NTSTATUS rpccli_dfs_ManagerInitialize(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername, uint32_t flags, WERROR *werror) { struct dfs_ManagerInitialize r; NTSTATUS status; @@ -497,10 +549,14 @@ NTSTATUS rpccli_dfs_ManagerInitialize(struct rpc_pipe_client *cli, TALLOC_CTX *m /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_dfs_AddStdRootForced(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername, const char *rootshare, const char *comment, const char *store) +NTSTATUS rpccli_dfs_AddStdRootForced(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername, const char *rootshare, const char *comment, const char *store, WERROR *werror) { struct dfs_AddStdRootForced r; NTSTATUS status; @@ -530,10 +586,14 @@ NTSTATUS rpccli_dfs_AddStdRootForced(struct rpc_pipe_client *cli, TALLOC_CTX *me /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_dfs_GetDcAddress(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_dfs_GetDcAddress(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct dfs_GetDcAddress r; NTSTATUS status; @@ -559,10 +619,14 @@ NTSTATUS rpccli_dfs_GetDcAddress(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_dfs_SetDcAddress(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_dfs_SetDcAddress(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct dfs_SetDcAddress r; NTSTATUS status; @@ -588,10 +652,14 @@ NTSTATUS rpccli_dfs_SetDcAddress(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_dfs_FlushFtTable(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername, const char *rootshare) +NTSTATUS rpccli_dfs_FlushFtTable(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *servername, const char *rootshare, WERROR *werror) { struct dfs_FlushFtTable r; NTSTATUS status; @@ -619,10 +687,14 @@ NTSTATUS rpccli_dfs_FlushFtTable(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_dfs_Add2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_dfs_Add2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct dfs_Add2 r; NTSTATUS status; @@ -648,10 +720,14 @@ NTSTATUS rpccli_dfs_Add2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_dfs_Remove2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_dfs_Remove2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct dfs_Remove2 r; NTSTATUS status; @@ -677,10 +753,14 @@ NTSTATUS rpccli_dfs_Remove2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_dfs_EnumEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *dfs_name, uint32_t level, uint32_t bufsize, struct dfs_EnumStruct *info, uint32_t *total) +NTSTATUS rpccli_dfs_EnumEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *dfs_name, uint32_t level, uint32_t bufsize, struct dfs_EnumStruct *info, uint32_t *total, WERROR *werror) { struct dfs_EnumEx r; NTSTATUS status; @@ -717,10 +797,14 @@ NTSTATUS rpccli_dfs_EnumEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, con } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_dfs_SetInfo2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_dfs_SetInfo2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct dfs_SetInfo2 r; NTSTATUS status; @@ -746,6 +830,10 @@ NTSTATUS rpccli_dfs_SetInfo2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } diff --git a/source3/librpc/gen_ndr/cli_initshutdown.c b/source3/librpc/gen_ndr/cli_initshutdown.c index 4e6647dac5..57c5e60226 100644 --- a/source3/librpc/gen_ndr/cli_initshutdown.c +++ b/source3/librpc/gen_ndr/cli_initshutdown.c @@ -6,7 +6,7 @@ #include "includes.h" #include "librpc/gen_ndr/cli_initshutdown.h" -NTSTATUS rpccli_initshutdown_Init(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *hostname, struct initshutdown_String *message, uint32_t timeout, uint8_t force_apps, uint8_t reboot) +NTSTATUS rpccli_initshutdown_Init(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *hostname, struct initshutdown_String *message, uint32_t timeout, uint8_t force_apps, uint8_t reboot, WERROR *werror) { struct initshutdown_Init r; NTSTATUS status; @@ -37,10 +37,14 @@ NTSTATUS rpccli_initshutdown_Init(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_initshutdown_Abort(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *server) +NTSTATUS rpccli_initshutdown_Abort(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *server, WERROR *werror) { struct initshutdown_Abort r; NTSTATUS status; @@ -67,10 +71,14 @@ NTSTATUS rpccli_initshutdown_Abort(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_initshutdown_InitEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *hostname, struct initshutdown_String *message, uint32_t timeout, uint8_t force_apps, uint8_t reboot, uint32_t reason) +NTSTATUS rpccli_initshutdown_InitEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *hostname, struct initshutdown_String *message, uint32_t timeout, uint8_t force_apps, uint8_t reboot, uint32_t reason, WERROR *werror) { struct initshutdown_InitEx r; NTSTATUS status; @@ -102,6 +110,10 @@ NTSTATUS rpccli_initshutdown_InitEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } diff --git a/source3/librpc/gen_ndr/cli_netlogon.c b/source3/librpc/gen_ndr/cli_netlogon.c index 20c5f2d2e5..e53254efa5 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.c +++ b/source3/librpc/gen_ndr/cli_netlogon.c @@ -6,7 +6,7 @@ #include "includes.h" #include "librpc/gen_ndr/cli_netlogon.h" -NTSTATUS rpccli_netr_LogonUasLogon(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *account_name, const char *workstation, struct netr_UasInfo *info) +NTSTATUS rpccli_netr_LogonUasLogon(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *account_name, const char *workstation, struct netr_UasInfo *info, WERROR *werror) { struct netr_LogonUasLogon r; NTSTATUS status; @@ -38,10 +38,14 @@ NTSTATUS rpccli_netr_LogonUasLogon(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_LogonUasLogoff(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *account_name, const char *workstation, struct netr_UasLogoffInfo *info) +NTSTATUS rpccli_netr_LogonUasLogoff(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *account_name, const char *workstation, struct netr_UasLogoffInfo *info, WERROR *werror) { struct netr_LogonUasLogoff r; NTSTATUS status; @@ -71,6 +75,10 @@ NTSTATUS rpccli_netr_LogonUasLogoff(struct rpc_pipe_client *cli, TALLOC_CTX *mem *info = *r.out.info; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } @@ -456,7 +464,7 @@ NTSTATUS rpccli_netr_GetDcName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, return r.out.result; } -NTSTATUS rpccli_netr_LogonControl(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, enum netr_LogonControlCode function_code, uint32_t level, union netr_CONTROL_QUERY_INFORMATION *info) +NTSTATUS rpccli_netr_LogonControl(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, enum netr_LogonControlCode function_code, uint32_t level, union netr_CONTROL_QUERY_INFORMATION *info, WERROR *werror) { struct netr_LogonControl r; NTSTATUS status; @@ -486,10 +494,14 @@ NTSTATUS rpccli_netr_LogonControl(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c *info = *r.out.info; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_GetAnyDCName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *domainname, const char **dcname) +NTSTATUS rpccli_netr_GetAnyDCName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, const char *domainname, const char **dcname, WERROR *werror) { struct netr_GetAnyDCName r; NTSTATUS status; @@ -518,10 +530,14 @@ NTSTATUS rpccli_netr_GetAnyDCName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c *dcname = *r.out.dcname; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_LogonControl2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, uint32_t function_code, uint32_t level, union netr_CONTROL_DATA_INFORMATION data, union netr_CONTROL_QUERY_INFORMATION *query) +NTSTATUS rpccli_netr_LogonControl2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, uint32_t function_code, uint32_t level, union netr_CONTROL_DATA_INFORMATION data, union netr_CONTROL_QUERY_INFORMATION *query, WERROR *werror) { struct netr_LogonControl2 r; NTSTATUS status; @@ -552,6 +568,10 @@ NTSTATUS rpccli_netr_LogonControl2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ *query = *r.out.query; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } @@ -673,7 +693,7 @@ NTSTATUS rpccli_netr_DatabaseRedo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c return r.out.result; } -NTSTATUS rpccli_netr_LogonControl2Ex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, uint32_t function_code, uint32_t level, union netr_CONTROL_DATA_INFORMATION data, union netr_CONTROL_QUERY_INFORMATION *query) +NTSTATUS rpccli_netr_LogonControl2Ex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *logon_server, uint32_t function_code, uint32_t level, union netr_CONTROL_DATA_INFORMATION data, union netr_CONTROL_QUERY_INFORMATION *query, WERROR *werror) { struct netr_LogonControl2Ex r; NTSTATUS status; @@ -704,10 +724,14 @@ NTSTATUS rpccli_netr_LogonControl2Ex(struct rpc_pipe_client *cli, TALLOC_CTX *me *query = *r.out.query; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_NETRENUMERATETRUSTEDDOMAINS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_netr_NETRENUMERATETRUSTEDDOMAINS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct netr_NETRENUMERATETRUSTEDDOMAINS r; NTSTATUS status; @@ -733,10 +757,14 @@ NTSTATUS rpccli_netr_NETRENUMERATETRUSTEDDOMAINS(struct rpc_pipe_client *cli, TA /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_DsRGetDCName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *domain_name, struct GUID *domain_guid, struct GUID *site_guid, uint32_t flags, struct netr_DsRGetDCNameInfo *info) +NTSTATUS rpccli_netr_DsRGetDCName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *domain_name, struct GUID *domain_guid, struct GUID *site_guid, uint32_t flags, struct netr_DsRGetDCNameInfo *info, WERROR *werror) { struct netr_DsRGetDCName r; NTSTATUS status; @@ -770,10 +798,14 @@ NTSTATUS rpccli_netr_DsRGetDCName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_NETRLOGONDUMMYROUTINE1(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_netr_NETRLOGONDUMMYROUTINE1(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct netr_NETRLOGONDUMMYROUTINE1 r; NTSTATUS status; @@ -799,10 +831,14 @@ NTSTATUS rpccli_netr_NETRLOGONDUMMYROUTINE1(struct rpc_pipe_client *cli, TALLOC_ /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_NETRLOGONSETSERVICEBITS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_netr_NETRLOGONSETSERVICEBITS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct netr_NETRLOGONSETSERVICEBITS r; NTSTATUS status; @@ -828,10 +864,14 @@ NTSTATUS rpccli_netr_NETRLOGONSETSERVICEBITS(struct rpc_pipe_client *cli, TALLOC /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_NETRLOGONGETTRUSTRID(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_netr_NETRLOGONGETTRUSTRID(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct netr_NETRLOGONGETTRUSTRID r; NTSTATUS status; @@ -857,10 +897,14 @@ NTSTATUS rpccli_netr_NETRLOGONGETTRUSTRID(struct rpc_pipe_client *cli, TALLOC_CT /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_NETRLOGONCOMPUTESERVERDIGEST(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_netr_NETRLOGONCOMPUTESERVERDIGEST(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct netr_NETRLOGONCOMPUTESERVERDIGEST r; NTSTATUS status; @@ -886,10 +930,14 @@ NTSTATUS rpccli_netr_NETRLOGONCOMPUTESERVERDIGEST(struct rpc_pipe_client *cli, T /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct netr_NETRLOGONCOMPUTECLIENTDIGEST r; NTSTATUS status; @@ -915,6 +963,10 @@ NTSTATUS rpccli_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct rpc_pipe_client *cli, T /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } @@ -956,7 +1008,7 @@ NTSTATUS rpccli_netr_ServerAuthenticate3(struct rpc_pipe_client *cli, TALLOC_CTX return r.out.result; } -NTSTATUS rpccli_netr_DsRGetDCNameEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *domain_name, struct GUID *domain_guid, const char *site_name, uint32_t flags, struct netr_DsRGetDCNameInfo *info) +NTSTATUS rpccli_netr_DsRGetDCNameEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *domain_name, struct GUID *domain_guid, const char *site_name, uint32_t flags, struct netr_DsRGetDCNameInfo *info, WERROR *werror) { struct netr_DsRGetDCNameEx r; NTSTATUS status; @@ -990,10 +1042,14 @@ NTSTATUS rpccli_netr_DsRGetDCNameEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_DsRGetSiteName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *computer_name, const char **site) +NTSTATUS rpccli_netr_DsRGetSiteName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *computer_name, const char **site, WERROR *werror) { struct netr_DsRGetSiteName r; NTSTATUS status; @@ -1021,6 +1077,10 @@ NTSTATUS rpccli_netr_DsRGetSiteName(struct rpc_pipe_client *cli, TALLOC_CTX *mem *site = *r.out.site; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } @@ -1097,7 +1157,7 @@ NTSTATUS rpccli_netr_ServerPasswordSet2(struct rpc_pipe_client *cli, TALLOC_CTX return r.out.result; } -NTSTATUS rpccli_netr_NETRSERVERPASSWORDGET(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_netr_NETRSERVERPASSWORDGET(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct netr_NETRSERVERPASSWORDGET r; NTSTATUS status; @@ -1123,10 +1183,14 @@ NTSTATUS rpccli_netr_NETRSERVERPASSWORDGET(struct rpc_pipe_client *cli, TALLOC_C /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_NETRLOGONSENDTOSAM(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_netr_NETRLOGONSENDTOSAM(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct netr_NETRLOGONSENDTOSAM r; NTSTATUS status; @@ -1152,10 +1216,14 @@ NTSTATUS rpccli_netr_NETRLOGONSENDTOSAM(struct rpc_pipe_client *cli, TALLOC_CTX /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_DSRADDRESSTOSITENAMESW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_netr_DSRADDRESSTOSITENAMESW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct netr_DSRADDRESSTOSITENAMESW r; NTSTATUS status; @@ -1181,10 +1249,14 @@ NTSTATUS rpccli_netr_DSRADDRESSTOSITENAMESW(struct rpc_pipe_client *cli, TALLOC_ /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_DsRGetDCNameEx2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *client_account, uint32_t mask, const char *domain_name, struct GUID *domain_guid, const char *site_name, uint32_t flags, struct netr_DsRGetDCNameInfo *info) +NTSTATUS rpccli_netr_DsRGetDCNameEx2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *client_account, uint32_t mask, const char *domain_name, struct GUID *domain_guid, const char *site_name, uint32_t flags, struct netr_DsRGetDCNameInfo *info, WERROR *werror) { struct netr_DsRGetDCNameEx2 r; NTSTATUS status; @@ -1220,10 +1292,14 @@ NTSTATUS rpccli_netr_DsRGetDCNameEx2(struct rpc_pipe_client *cli, TALLOC_CTX *me } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN r; NTSTATUS status; @@ -1249,10 +1325,14 @@ NTSTATUS rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct rpc_pipe_client /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_NETRENUMERATETRUSTEDDOMAINSEX(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_netr_NETRENUMERATETRUSTEDDOMAINSEX(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct netr_NETRENUMERATETRUSTEDDOMAINSEX r; NTSTATUS status; @@ -1278,10 +1358,14 @@ NTSTATUS rpccli_netr_NETRENUMERATETRUSTEDDOMAINSEX(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_DSRADDRESSTOSITENAMESEXW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_netr_DSRADDRESSTOSITENAMESEXW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct netr_DSRADDRESSTOSITENAMESEXW r; NTSTATUS status; @@ -1307,10 +1391,14 @@ NTSTATUS rpccli_netr_DSRADDRESSTOSITENAMESEXW(struct rpc_pipe_client *cli, TALLO /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_DSRGETDCSITECOVERAGEW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_netr_DSRGETDCSITECOVERAGEW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct netr_DSRGETDCSITECOVERAGEW r; NTSTATUS status; @@ -1336,6 +1424,10 @@ NTSTATUS rpccli_netr_DSRGETDCSITECOVERAGEW(struct rpc_pipe_client *cli, TALLOC_C /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } @@ -1377,7 +1469,7 @@ NTSTATUS rpccli_netr_LogonSamLogonEx(struct rpc_pipe_client *cli, TALLOC_CTX *me return r.out.result; } -NTSTATUS rpccli_netr_DsrEnumerateDomainTrusts(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, uint32_t trust_flags, uint32_t *count, struct netr_DomainTrust **trusts) +NTSTATUS rpccli_netr_DsrEnumerateDomainTrusts(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, uint32_t trust_flags, uint32_t *count, struct netr_DomainTrust **trusts, WERROR *werror) { struct netr_DsrEnumerateDomainTrusts r; NTSTATUS status; @@ -1407,10 +1499,14 @@ NTSTATUS rpccli_netr_DsrEnumerateDomainTrusts(struct rpc_pipe_client *cli, TALLO memcpy(trusts, r.out.trusts, count); /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_DSRDEREGISTERDNSHOSTRECORDS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_netr_DSRDEREGISTERDNSHOSTRECORDS(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct netr_DSRDEREGISTERDNSHOSTRECORDS r; NTSTATUS status; @@ -1436,10 +1532,14 @@ NTSTATUS rpccli_netr_DSRDEREGISTERDNSHOSTRECORDS(struct rpc_pipe_client *cli, TA /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_NETRSERVERTRUSTPASSWORDSGET(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_netr_NETRSERVERTRUSTPASSWORDSGET(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct netr_NETRSERVERTRUSTPASSWORDSGET r; NTSTATUS status; @@ -1465,10 +1565,14 @@ NTSTATUS rpccli_netr_NETRSERVERTRUSTPASSWORDSGET(struct rpc_pipe_client *cli, TA /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_DSRGETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_netr_DSRGETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct netr_DSRGETFORESTTRUSTINFORMATION r; NTSTATUS status; @@ -1494,10 +1598,14 @@ NTSTATUS rpccli_netr_DSRGETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, T /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_netr_NETRGETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_netr_NETRGETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct netr_NETRGETFORESTTRUSTINFORMATION r; NTSTATUS status; @@ -1523,6 +1631,10 @@ NTSTATUS rpccli_netr_NETRGETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } @@ -1569,7 +1681,7 @@ NTSTATUS rpccli_netr_LogonSamLogonWithFlags(struct rpc_pipe_client *cli, TALLOC_ return r.out.result; } -NTSTATUS rpccli_netr_NETRSERVERGETTRUSTINFO(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_netr_NETRSERVERGETTRUSTINFO(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct netr_NETRSERVERGETTRUSTINFO r; NTSTATUS status; @@ -1595,6 +1707,10 @@ NTSTATUS rpccli_netr_NETRSERVERGETTRUSTINFO(struct rpc_pipe_client *cli, TALLOC_ /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } diff --git a/source3/librpc/gen_ndr/cli_srvsvc.c b/source3/librpc/gen_ndr/cli_srvsvc.c index e848e5b9c1..b7f1521dd3 100644 --- a/source3/librpc/gen_ndr/cli_srvsvc.c +++ b/source3/librpc/gen_ndr/cli_srvsvc.c @@ -6,7 +6,7 @@ #include "includes.h" #include "librpc/gen_ndr/cli_srvsvc.h" -NTSTATUS rpccli_srvsvc_NetCharDevEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetCharDevCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle) +NTSTATUS rpccli_srvsvc_NetCharDevEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetCharDevCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle, WERROR *werror) { struct srvsvc_NetCharDevEnum r; NTSTATUS status; @@ -43,10 +43,14 @@ NTSTATUS rpccli_srvsvc_NetCharDevEnum(struct rpc_pipe_client *cli, TALLOC_CTX *m } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetCharDevGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *device_name, uint32_t level, union srvsvc_NetCharDevInfo *info) +NTSTATUS rpccli_srvsvc_NetCharDevGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *device_name, uint32_t level, union srvsvc_NetCharDevInfo *info, WERROR *werror) { struct srvsvc_NetCharDevGetInfo r; NTSTATUS status; @@ -76,10 +80,14 @@ NTSTATUS rpccli_srvsvc_NetCharDevGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *info = *r.out.info; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetCharDevControl(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *device_name, uint32_t opcode) +NTSTATUS rpccli_srvsvc_NetCharDevControl(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *device_name, uint32_t opcode, WERROR *werror) { struct srvsvc_NetCharDevControl r; NTSTATUS status; @@ -108,10 +116,14 @@ NTSTATUS rpccli_srvsvc_NetCharDevControl(struct rpc_pipe_client *cli, TALLOC_CTX /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetCharDevQEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *user, uint32_t *level, union srvsvc_NetCharDevQCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle) +NTSTATUS rpccli_srvsvc_NetCharDevQEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *user, uint32_t *level, union srvsvc_NetCharDevQCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle, WERROR *werror) { struct srvsvc_NetCharDevQEnum r; NTSTATUS status; @@ -149,10 +161,14 @@ NTSTATUS rpccli_srvsvc_NetCharDevQEnum(struct rpc_pipe_client *cli, TALLOC_CTX * } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetCharDevQGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *queue_name, const char *user, uint32_t level, union srvsvc_NetCharDevQInfo *info) +NTSTATUS rpccli_srvsvc_NetCharDevQGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *queue_name, const char *user, uint32_t level, union srvsvc_NetCharDevQInfo *info, WERROR *werror) { struct srvsvc_NetCharDevQGetInfo r; NTSTATUS status; @@ -183,10 +199,14 @@ NTSTATUS rpccli_srvsvc_NetCharDevQGetInfo(struct rpc_pipe_client *cli, TALLOC_CT *info = *r.out.info; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetCharDevQSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *queue_name, uint32_t level, union srvsvc_NetCharDevQInfo info, uint32_t *parm_error) +NTSTATUS rpccli_srvsvc_NetCharDevQSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *queue_name, uint32_t level, union srvsvc_NetCharDevQInfo info, uint32_t *parm_error, WERROR *werror) { struct srvsvc_NetCharDevQSetInfo r; NTSTATUS status; @@ -220,10 +240,14 @@ NTSTATUS rpccli_srvsvc_NetCharDevQSetInfo(struct rpc_pipe_client *cli, TALLOC_CT } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetCharDevQPurge(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *queue_name) +NTSTATUS rpccli_srvsvc_NetCharDevQPurge(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *queue_name, WERROR *werror) { struct srvsvc_NetCharDevQPurge r; NTSTATUS status; @@ -251,10 +275,14 @@ NTSTATUS rpccli_srvsvc_NetCharDevQPurge(struct rpc_pipe_client *cli, TALLOC_CTX /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetCharDevQPurgeSelf(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *queue_name, const char *computer_name) +NTSTATUS rpccli_srvsvc_NetCharDevQPurgeSelf(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *queue_name, const char *computer_name, WERROR *werror) { struct srvsvc_NetCharDevQPurgeSelf r; NTSTATUS status; @@ -283,10 +311,14 @@ NTSTATUS rpccli_srvsvc_NetCharDevQPurgeSelf(struct rpc_pipe_client *cli, TALLOC_ /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetConnEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path, uint32_t *level, union srvsvc_NetConnCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle) +NTSTATUS rpccli_srvsvc_NetConnEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path, uint32_t *level, union srvsvc_NetConnCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle, WERROR *werror) { struct srvsvc_NetConnEnum r; NTSTATUS status; @@ -324,10 +356,14 @@ NTSTATUS rpccli_srvsvc_NetConnEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetFileEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path, const char *user, uint32_t *level, union srvsvc_NetFileCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle) +NTSTATUS rpccli_srvsvc_NetFileEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path, const char *user, uint32_t *level, union srvsvc_NetFileCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle, WERROR *werror) { struct srvsvc_NetFileEnum r; NTSTATUS status; @@ -366,10 +402,14 @@ NTSTATUS rpccli_srvsvc_NetFileEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetFileGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t fid, uint32_t level, union srvsvc_NetFileInfo *info) +NTSTATUS rpccli_srvsvc_NetFileGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t fid, uint32_t level, union srvsvc_NetFileInfo *info, WERROR *werror) { struct srvsvc_NetFileGetInfo r; NTSTATUS status; @@ -399,10 +439,14 @@ NTSTATUS rpccli_srvsvc_NetFileGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *m *info = *r.out.info; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetFileClose(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t fid) +NTSTATUS rpccli_srvsvc_NetFileClose(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t fid, WERROR *werror) { struct srvsvc_NetFileClose r; NTSTATUS status; @@ -430,10 +474,14 @@ NTSTATUS rpccli_srvsvc_NetFileClose(struct rpc_pipe_client *cli, TALLOC_CTX *mem /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetSessEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *client, const char *user, uint32_t *level, union srvsvc_NetSessCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle) +NTSTATUS rpccli_srvsvc_NetSessEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *client, const char *user, uint32_t *level, union srvsvc_NetSessCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle, WERROR *werror) { struct srvsvc_NetSessEnum r; NTSTATUS status; @@ -472,10 +520,14 @@ NTSTATUS rpccli_srvsvc_NetSessEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetSessDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *client, const char *user) +NTSTATUS rpccli_srvsvc_NetSessDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *client, const char *user, WERROR *werror) { struct srvsvc_NetSessDel r; NTSTATUS status; @@ -504,10 +556,14 @@ NTSTATUS rpccli_srvsvc_NetSessDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetShareAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetShareInfo info, uint32_t *parm_error) +NTSTATUS rpccli_srvsvc_NetShareAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetShareInfo info, uint32_t *parm_error, WERROR *werror) { struct srvsvc_NetShareAdd r; NTSTATUS status; @@ -540,10 +596,14 @@ NTSTATUS rpccli_srvsvc_NetShareAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetShareEnumAll(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetShareCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle) +NTSTATUS rpccli_srvsvc_NetShareEnumAll(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetShareCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle, WERROR *werror) { struct srvsvc_NetShareEnumAll r; NTSTATUS status; @@ -580,10 +640,14 @@ NTSTATUS rpccli_srvsvc_NetShareEnumAll(struct rpc_pipe_client *cli, TALLOC_CTX * } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetShareGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share_name, uint32_t level, union srvsvc_NetShareInfo *info) +NTSTATUS rpccli_srvsvc_NetShareGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share_name, uint32_t level, union srvsvc_NetShareInfo *info, WERROR *werror) { struct srvsvc_NetShareGetInfo r; NTSTATUS status; @@ -613,10 +677,14 @@ NTSTATUS rpccli_srvsvc_NetShareGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX * *info = *r.out.info; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetShareSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share_name, uint32_t level, union srvsvc_NetShareInfo info, uint32_t *parm_error) +NTSTATUS rpccli_srvsvc_NetShareSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share_name, uint32_t level, union srvsvc_NetShareInfo info, uint32_t *parm_error, WERROR *werror) { struct srvsvc_NetShareSetInfo r; NTSTATUS status; @@ -650,10 +718,14 @@ NTSTATUS rpccli_srvsvc_NetShareSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX * } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetShareDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share_name, uint32_t reserved) +NTSTATUS rpccli_srvsvc_NetShareDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share_name, uint32_t reserved, WERROR *werror) { struct srvsvc_NetShareDel r; NTSTATUS status; @@ -682,10 +754,14 @@ NTSTATUS rpccli_srvsvc_NetShareDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetShareDelSticky(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share_name, uint32_t reserved) +NTSTATUS rpccli_srvsvc_NetShareDelSticky(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share_name, uint32_t reserved, WERROR *werror) { struct srvsvc_NetShareDelSticky r; NTSTATUS status; @@ -714,10 +790,14 @@ NTSTATUS rpccli_srvsvc_NetShareDelSticky(struct rpc_pipe_client *cli, TALLOC_CTX /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetShareCheck(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *device_name, enum srvsvc_ShareType *type) +NTSTATUS rpccli_srvsvc_NetShareCheck(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *device_name, enum srvsvc_ShareType *type, WERROR *werror) { struct srvsvc_NetShareCheck r; NTSTATUS status; @@ -746,10 +826,14 @@ NTSTATUS rpccli_srvsvc_NetShareCheck(struct rpc_pipe_client *cli, TALLOC_CTX *me *type = *r.out.type; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetSrvGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetSrvInfo *info) +NTSTATUS rpccli_srvsvc_NetSrvGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetSrvInfo *info, WERROR *werror) { struct srvsvc_NetSrvGetInfo r; NTSTATUS status; @@ -778,10 +862,14 @@ NTSTATUS rpccli_srvsvc_NetSrvGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *me *info = *r.out.info; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetSrvSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetSrvInfo info, uint32_t *parm_error) +NTSTATUS rpccli_srvsvc_NetSrvSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetSrvInfo info, uint32_t *parm_error, WERROR *werror) { struct srvsvc_NetSrvSetInfo r; NTSTATUS status; @@ -814,10 +902,14 @@ NTSTATUS rpccli_srvsvc_NetSrvSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *me } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetDiskEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, struct srvsvc_NetDiskInfo *info, uint32_t maxlen, uint32_t *totalentries, uint32_t *resume_handle) +NTSTATUS rpccli_srvsvc_NetDiskEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, struct srvsvc_NetDiskInfo *info, uint32_t maxlen, uint32_t *totalentries, uint32_t *resume_handle, WERROR *werror) { struct srvsvc_NetDiskEnum r; NTSTATUS status; @@ -853,10 +945,14 @@ NTSTATUS rpccli_srvsvc_NetDiskEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetServerStatisticsGet(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *service, uint32_t level, uint32_t options, struct srvsvc_Statistics *stats) +NTSTATUS rpccli_srvsvc_NetServerStatisticsGet(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *service, uint32_t level, uint32_t options, struct srvsvc_Statistics *stats, WERROR *werror) { struct srvsvc_NetServerStatisticsGet r; NTSTATUS status; @@ -887,10 +983,14 @@ NTSTATUS rpccli_srvsvc_NetServerStatisticsGet(struct rpc_pipe_client *cli, TALLO *stats = *r.out.stats; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetTransportAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetTransportInfo info) +NTSTATUS rpccli_srvsvc_NetTransportAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetTransportInfo info, WERROR *werror) { struct srvsvc_NetTransportAdd r; NTSTATUS status; @@ -919,10 +1019,14 @@ NTSTATUS rpccli_srvsvc_NetTransportAdd(struct rpc_pipe_client *cli, TALLOC_CTX * /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetTransportEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetTransportCtr *transports, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle) +NTSTATUS rpccli_srvsvc_NetTransportEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetTransportCtr *transports, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle, WERROR *werror) { struct srvsvc_NetTransportEnum r; NTSTATUS status; @@ -959,10 +1063,14 @@ NTSTATUS rpccli_srvsvc_NetTransportEnum(struct rpc_pipe_client *cli, TALLOC_CTX } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetTransportDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t unknown, struct srvsvc_NetTransportInfo0 transport) +NTSTATUS rpccli_srvsvc_NetTransportDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t unknown, struct srvsvc_NetTransportInfo0 transport, WERROR *werror) { struct srvsvc_NetTransportDel r; NTSTATUS status; @@ -991,10 +1099,14 @@ NTSTATUS rpccli_srvsvc_NetTransportDel(struct rpc_pipe_client *cli, TALLOC_CTX * /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetRemoteTOD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, struct srvsvc_NetRemoteTODInfo *info) +NTSTATUS rpccli_srvsvc_NetRemoteTOD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, struct srvsvc_NetRemoteTODInfo *info, WERROR *werror) { struct srvsvc_NetRemoteTOD r; NTSTATUS status; @@ -1024,10 +1136,14 @@ NTSTATUS rpccli_srvsvc_NetRemoteTOD(struct rpc_pipe_client *cli, TALLOC_CTX *mem } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetSetServiceBits(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *transport, uint32_t servicebits, uint32_t updateimmediately) +NTSTATUS rpccli_srvsvc_NetSetServiceBits(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *transport, uint32_t servicebits, uint32_t updateimmediately, WERROR *werror) { struct srvsvc_NetSetServiceBits r; NTSTATUS status; @@ -1057,10 +1173,14 @@ NTSTATUS rpccli_srvsvc_NetSetServiceBits(struct rpc_pipe_client *cli, TALLOC_CTX /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetPathType(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path, uint32_t pathflags, uint32_t *pathtype) +NTSTATUS rpccli_srvsvc_NetPathType(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path, uint32_t pathflags, uint32_t *pathtype, WERROR *werror) { struct srvsvc_NetPathType r; NTSTATUS status; @@ -1090,10 +1210,14 @@ NTSTATUS rpccli_srvsvc_NetPathType(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ *pathtype = *r.out.pathtype; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetPathCanonicalize(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path, uint8_t *can_path, uint32_t maxbuf, const char *prefix, uint32_t *pathtype, uint32_t pathflags) +NTSTATUS rpccli_srvsvc_NetPathCanonicalize(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path, uint8_t *can_path, uint32_t maxbuf, const char *prefix, uint32_t *pathtype, uint32_t pathflags, WERROR *werror) { struct srvsvc_NetPathCanonicalize r; NTSTATUS status; @@ -1127,10 +1251,14 @@ NTSTATUS rpccli_srvsvc_NetPathCanonicalize(struct rpc_pipe_client *cli, TALLOC_C *pathtype = *r.out.pathtype; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetPathCompare(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path1, const char *path2, uint32_t pathtype, uint32_t pathflags) +NTSTATUS rpccli_srvsvc_NetPathCompare(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *path1, const char *path2, uint32_t pathtype, uint32_t pathflags, WERROR *werror) { struct srvsvc_NetPathCompare r; NTSTATUS status; @@ -1161,10 +1289,14 @@ NTSTATUS rpccli_srvsvc_NetPathCompare(struct rpc_pipe_client *cli, TALLOC_CTX *m /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetNameValidate(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *name, uint32_t name_type, uint32_t flags) +NTSTATUS rpccli_srvsvc_NetNameValidate(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *name, uint32_t name_type, uint32_t flags, WERROR *werror) { struct srvsvc_NetNameValidate r; NTSTATUS status; @@ -1194,10 +1326,14 @@ NTSTATUS rpccli_srvsvc_NetNameValidate(struct rpc_pipe_client *cli, TALLOC_CTX * /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NETRPRNAMECANONICALIZE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_srvsvc_NETRPRNAMECANONICALIZE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct srvsvc_NETRPRNAMECANONICALIZE r; NTSTATUS status; @@ -1223,10 +1359,14 @@ NTSTATUS rpccli_srvsvc_NETRPRNAMECANONICALIZE(struct rpc_pipe_client *cli, TALLO /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetPRNameCompare(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *name1, const char *name2, uint32_t name_type, uint32_t flags) +NTSTATUS rpccli_srvsvc_NetPRNameCompare(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *name1, const char *name2, uint32_t name_type, uint32_t flags, WERROR *werror) { struct srvsvc_NetPRNameCompare r; NTSTATUS status; @@ -1257,10 +1397,14 @@ NTSTATUS rpccli_srvsvc_NetPRNameCompare(struct rpc_pipe_client *cli, TALLOC_CTX /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetShareEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetShareCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle) +NTSTATUS rpccli_srvsvc_NetShareEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t *level, union srvsvc_NetShareCtr *ctr, uint32_t max_buffer, uint32_t *totalentries, uint32_t *resume_handle, WERROR *werror) { struct srvsvc_NetShareEnum r; NTSTATUS status; @@ -1297,10 +1441,14 @@ NTSTATUS rpccli_srvsvc_NetShareEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetShareDelStart(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share, uint32_t reserved, struct policy_handle *hnd) +NTSTATUS rpccli_srvsvc_NetShareDelStart(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share, uint32_t reserved, struct policy_handle *hnd, WERROR *werror) { struct srvsvc_NetShareDelStart r; NTSTATUS status; @@ -1332,10 +1480,14 @@ NTSTATUS rpccli_srvsvc_NetShareDelStart(struct rpc_pipe_client *cli, TALLOC_CTX } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetShareDelCommit(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *hnd) +NTSTATUS rpccli_srvsvc_NetShareDelCommit(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *hnd, WERROR *werror) { struct srvsvc_NetShareDelCommit r; NTSTATUS status; @@ -1365,10 +1517,14 @@ NTSTATUS rpccli_srvsvc_NetShareDelCommit(struct rpc_pipe_client *cli, TALLOC_CTX } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetGetFileSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share, const char *file, uint32_t securityinformation, struct sec_desc_buf *sd_buf) +NTSTATUS rpccli_srvsvc_NetGetFileSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share, const char *file, uint32_t securityinformation, struct sec_desc_buf *sd_buf, WERROR *werror) { struct srvsvc_NetGetFileSecurity r; NTSTATUS status; @@ -1401,10 +1557,14 @@ NTSTATUS rpccli_srvsvc_NetGetFileSecurity(struct rpc_pipe_client *cli, TALLOC_CT } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetSetFileSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share, const char *file, uint32_t securityinformation, struct sec_desc_buf sd_buf) +NTSTATUS rpccli_srvsvc_NetSetFileSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *share, const char *file, uint32_t securityinformation, struct sec_desc_buf sd_buf, WERROR *werror) { struct srvsvc_NetSetFileSecurity r; NTSTATUS status; @@ -1435,10 +1595,14 @@ NTSTATUS rpccli_srvsvc_NetSetFileSecurity(struct rpc_pipe_client *cli, TALLOC_CT /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetServerTransportAddEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetTransportInfo info) +NTSTATUS rpccli_srvsvc_NetServerTransportAddEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, uint32_t level, union srvsvc_NetTransportInfo info, WERROR *werror) { struct srvsvc_NetServerTransportAddEx r; NTSTATUS status; @@ -1467,10 +1631,14 @@ NTSTATUS rpccli_srvsvc_NetServerTransportAddEx(struct rpc_pipe_client *cli, TALL /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NetServerSetServiceBitsEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *emulated_server_unc, const char *transport, uint32_t servicebitsofinterest, uint32_t servicebits, uint32_t updateimmediately) +NTSTATUS rpccli_srvsvc_NetServerSetServiceBitsEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_unc, const char *emulated_server_unc, const char *transport, uint32_t servicebitsofinterest, uint32_t servicebits, uint32_t updateimmediately, WERROR *werror) { struct srvsvc_NetServerSetServiceBitsEx r; NTSTATUS status; @@ -1502,10 +1670,14 @@ NTSTATUS rpccli_srvsvc_NetServerSetServiceBitsEx(struct rpc_pipe_client *cli, TA /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NETRDFSGETVERSION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_srvsvc_NETRDFSGETVERSION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct srvsvc_NETRDFSGETVERSION r; NTSTATUS status; @@ -1531,10 +1703,14 @@ NTSTATUS rpccli_srvsvc_NETRDFSGETVERSION(struct rpc_pipe_client *cli, TALLOC_CTX /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NETRDFSCREATELOCALPARTITION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_srvsvc_NETRDFSCREATELOCALPARTITION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct srvsvc_NETRDFSCREATELOCALPARTITION r; NTSTATUS status; @@ -1560,10 +1736,14 @@ NTSTATUS rpccli_srvsvc_NETRDFSCREATELOCALPARTITION(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NETRDFSDELETELOCALPARTITION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_srvsvc_NETRDFSDELETELOCALPARTITION(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct srvsvc_NETRDFSDELETELOCALPARTITION r; NTSTATUS status; @@ -1589,10 +1769,14 @@ NTSTATUS rpccli_srvsvc_NETRDFSDELETELOCALPARTITION(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct srvsvc_NETRDFSSETLOCALVOLUMESTATE r; NTSTATUS status; @@ -1618,10 +1802,14 @@ NTSTATUS rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct rpc_pipe_client *cli, T /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NETRDFSSETSERVERINFO(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_srvsvc_NETRDFSSETSERVERINFO(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct srvsvc_NETRDFSSETSERVERINFO r; NTSTATUS status; @@ -1647,10 +1835,14 @@ NTSTATUS rpccli_srvsvc_NETRDFSSETSERVERINFO(struct rpc_pipe_client *cli, TALLOC_ /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NETRDFSCREATEEXITPOINT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_srvsvc_NETRDFSCREATEEXITPOINT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct srvsvc_NETRDFSCREATEEXITPOINT r; NTSTATUS status; @@ -1676,10 +1868,14 @@ NTSTATUS rpccli_srvsvc_NETRDFSCREATEEXITPOINT(struct rpc_pipe_client *cli, TALLO /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NETRDFSDELETEEXITPOINT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_srvsvc_NETRDFSDELETEEXITPOINT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct srvsvc_NETRDFSDELETEEXITPOINT r; NTSTATUS status; @@ -1705,10 +1901,14 @@ NTSTATUS rpccli_srvsvc_NETRDFSDELETEEXITPOINT(struct rpc_pipe_client *cli, TALLO /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NETRDFSMODIFYPREFIX(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_srvsvc_NETRDFSMODIFYPREFIX(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct srvsvc_NETRDFSMODIFYPREFIX r; NTSTATUS status; @@ -1734,10 +1934,14 @@ NTSTATUS rpccli_srvsvc_NETRDFSMODIFYPREFIX(struct rpc_pipe_client *cli, TALLOC_C /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NETRDFSFIXLOCALVOLUME(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_srvsvc_NETRDFSFIXLOCALVOLUME(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct srvsvc_NETRDFSFIXLOCALVOLUME r; NTSTATUS status; @@ -1763,10 +1967,14 @@ NTSTATUS rpccli_srvsvc_NETRDFSFIXLOCALVOLUME(struct rpc_pipe_client *cli, TALLOC /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct srvsvc_NETRDFSMANAGERREPORTSITEINFO r; NTSTATUS status; @@ -1792,10 +2000,14 @@ NTSTATUS rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_srvsvc_NETRSERVERTRANSPORTDELEX(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_srvsvc_NETRSERVERTRANSPORTDELEX(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct srvsvc_NETRSERVERTRANSPORTDELEX r; NTSTATUS status; @@ -1821,6 +2033,10 @@ NTSTATUS rpccli_srvsvc_NETRSERVERTRANSPORTDELEX(struct rpc_pipe_client *cli, TAL /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } diff --git a/source3/librpc/gen_ndr/cli_svcctl.c b/source3/librpc/gen_ndr/cli_svcctl.c index 005ec85ad6..8010d20919 100644 --- a/source3/librpc/gen_ndr/cli_svcctl.c +++ b/source3/librpc/gen_ndr/cli_svcctl.c @@ -6,7 +6,7 @@ #include "includes.h" #include "librpc/gen_ndr/cli_svcctl.h" -NTSTATUS rpccli_svcctl_CloseServiceHandle(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle) +NTSTATUS rpccli_svcctl_CloseServiceHandle(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, WERROR *werror) { struct svcctl_CloseServiceHandle r; NTSTATUS status; @@ -34,10 +34,14 @@ NTSTATUS rpccli_svcctl_CloseServiceHandle(struct rpc_pipe_client *cli, TALLOC_CT *handle = *r.out.handle; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_ControlService(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t control, struct SERVICE_STATUS *service_status) +NTSTATUS rpccli_svcctl_ControlService(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t control, struct SERVICE_STATUS *service_status, WERROR *werror) { struct svcctl_ControlService r; NTSTATUS status; @@ -66,10 +70,14 @@ NTSTATUS rpccli_svcctl_ControlService(struct rpc_pipe_client *cli, TALLOC_CTX *m *service_status = *r.out.service_status; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_DeleteService(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle) +NTSTATUS rpccli_svcctl_DeleteService(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, WERROR *werror) { struct svcctl_DeleteService r; NTSTATUS status; @@ -96,10 +104,14 @@ NTSTATUS rpccli_svcctl_DeleteService(struct rpc_pipe_client *cli, TALLOC_CTX *me /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_LockServiceDatabase(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct policy_handle *lock) +NTSTATUS rpccli_svcctl_LockServiceDatabase(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct policy_handle *lock, WERROR *werror) { struct svcctl_LockServiceDatabase r; NTSTATUS status; @@ -127,10 +139,14 @@ NTSTATUS rpccli_svcctl_LockServiceDatabase(struct rpc_pipe_client *cli, TALLOC_C *lock = *r.out.lock; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct svcctl_QueryServiceObjectSecurity r; NTSTATUS status; @@ -156,10 +172,14 @@ NTSTATUS rpccli_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client *cli, T /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_SetServiceObjectSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_svcctl_SetServiceObjectSecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct svcctl_SetServiceObjectSecurity r; NTSTATUS status; @@ -185,10 +205,14 @@ NTSTATUS rpccli_svcctl_SetServiceObjectSecurity(struct rpc_pipe_client *cli, TAL /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_QueryServiceStatus(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct SERVICE_STATUS *service_status) +NTSTATUS rpccli_svcctl_QueryServiceStatus(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct SERVICE_STATUS *service_status, WERROR *werror) { struct svcctl_QueryServiceStatus r; NTSTATUS status; @@ -216,10 +240,14 @@ NTSTATUS rpccli_svcctl_QueryServiceStatus(struct rpc_pipe_client *cli, TALLOC_CT *service_status = *r.out.service_status; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_SetServiceStatus(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_svcctl_SetServiceStatus(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct svcctl_SetServiceStatus r; NTSTATUS status; @@ -245,10 +273,14 @@ NTSTATUS rpccli_svcctl_SetServiceStatus(struct rpc_pipe_client *cli, TALLOC_CTX /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_UnlockServiceDatabase(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *lock) +NTSTATUS rpccli_svcctl_UnlockServiceDatabase(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *lock, WERROR *werror) { struct svcctl_UnlockServiceDatabase r; NTSTATUS status; @@ -276,10 +308,14 @@ NTSTATUS rpccli_svcctl_UnlockServiceDatabase(struct rpc_pipe_client *cli, TALLOC *lock = *r.out.lock; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_NotifyBootConfigStatus(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_svcctl_NotifyBootConfigStatus(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct svcctl_NotifyBootConfigStatus r; NTSTATUS status; @@ -305,10 +341,14 @@ NTSTATUS rpccli_svcctl_NotifyBootConfigStatus(struct rpc_pipe_client *cli, TALLO /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_SCSetServiceBitsW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t bits, uint32_t bitson, uint32_t immediate) +NTSTATUS rpccli_svcctl_SCSetServiceBitsW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t bits, uint32_t bitson, uint32_t immediate, WERROR *werror) { struct svcctl_SCSetServiceBitsW r; NTSTATUS status; @@ -338,10 +378,14 @@ NTSTATUS rpccli_svcctl_SCSetServiceBitsW(struct rpc_pipe_client *cli, TALLOC_CTX /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_ChangeServiceConfigW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t type, uint32_t start, uint32_t error, const char *binary_path, const char *load_order_group, uint32_t *tag_id, const char *dependencies, const char *service_start_name, const char *password, const char *display_name) +NTSTATUS rpccli_svcctl_ChangeServiceConfigW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t type, uint32_t start, uint32_t error, const char *binary_path, const char *load_order_group, uint32_t *tag_id, const char *dependencies, const char *service_start_name, const char *password, const char *display_name, WERROR *werror) { struct svcctl_ChangeServiceConfigW r; NTSTATUS status; @@ -378,10 +422,14 @@ NTSTATUS rpccli_svcctl_ChangeServiceConfigW(struct rpc_pipe_client *cli, TALLOC_ *tag_id = *r.out.tag_id; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_CreateServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager_handle, const char *ServiceName, const char *DisplayName, uint32_t desired_access, uint32_t type, uint32_t start_type, uint32_t error_control, const char *binary_path, const char *LoadOrderGroupKey, uint32_t *TagId, uint8_t *dependencies, uint32_t dependencies_size, const char *service_start_name, uint8_t *password, uint32_t password_size, struct policy_handle *handle) +NTSTATUS rpccli_svcctl_CreateServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager_handle, const char *ServiceName, const char *DisplayName, uint32_t desired_access, uint32_t type, uint32_t start_type, uint32_t error_control, const char *binary_path, const char *LoadOrderGroupKey, uint32_t *TagId, uint8_t *dependencies, uint32_t dependencies_size, const char *service_start_name, uint8_t *password, uint32_t password_size, struct policy_handle *handle, WERROR *werror) { struct svcctl_CreateServiceW r; NTSTATUS status; @@ -426,10 +474,14 @@ NTSTATUS rpccli_svcctl_CreateServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *m *handle = *r.out.handle; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_EnumDependentServicesW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *service, uint32_t state, struct ENUM_SERVICE_STATUS *service_status, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *services_returned) +NTSTATUS rpccli_svcctl_EnumDependentServicesW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *service, uint32_t state, struct ENUM_SERVICE_STATUS *service_status, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *services_returned, WERROR *werror) { struct svcctl_EnumDependentServicesW r; NTSTATUS status; @@ -463,10 +515,14 @@ NTSTATUS rpccli_svcctl_EnumDependentServicesW(struct rpc_pipe_client *cli, TALLO *services_returned = *r.out.services_returned; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t type, uint32_t state, uint32_t buf_size, uint8_t *service, uint32_t *bytes_needed, uint32_t *services_returned, uint32_t *resume_handle) +NTSTATUS rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t type, uint32_t state, uint32_t buf_size, uint8_t *service, uint32_t *bytes_needed, uint32_t *services_returned, uint32_t *resume_handle, WERROR *werror) { struct svcctl_EnumServicesStatusW r; NTSTATUS status; @@ -503,10 +559,14 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client *cli, TALLOC_C } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_OpenSCManagerW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *MachineName, const char *DatabaseName, uint32_t access_mask, struct policy_handle *handle) +NTSTATUS rpccli_svcctl_OpenSCManagerW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *MachineName, const char *DatabaseName, uint32_t access_mask, struct policy_handle *handle, WERROR *werror) { struct svcctl_OpenSCManagerW r; NTSTATUS status; @@ -536,10 +596,14 @@ NTSTATUS rpccli_svcctl_OpenSCManagerW(struct rpc_pipe_client *cli, TALLOC_CTX *m *handle = *r.out.handle; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_OpenServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager_handle, const char *ServiceName, uint32_t access_mask, struct policy_handle *handle) +NTSTATUS rpccli_svcctl_OpenServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager_handle, const char *ServiceName, uint32_t access_mask, struct policy_handle *handle, WERROR *werror) { struct svcctl_OpenServiceW r; NTSTATUS status; @@ -569,10 +633,14 @@ NTSTATUS rpccli_svcctl_OpenServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem *handle = *r.out.handle; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_QueryServiceConfigW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint8_t *query, uint32_t buf_size, uint32_t *bytes_needed) +NTSTATUS rpccli_svcctl_QueryServiceConfigW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint8_t *query, uint32_t buf_size, uint32_t *bytes_needed, WERROR *werror) { struct svcctl_QueryServiceConfigW r; NTSTATUS status; @@ -602,10 +670,14 @@ NTSTATUS rpccli_svcctl_QueryServiceConfigW(struct rpc_pipe_client *cli, TALLOC_C *bytes_needed = *r.out.bytes_needed; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_QueryServiceLockStatusW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t buf_size, struct SERVICE_LOCK_STATUS *lock_status, uint32_t *required_buf_size) +NTSTATUS rpccli_svcctl_QueryServiceLockStatusW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t buf_size, struct SERVICE_LOCK_STATUS *lock_status, uint32_t *required_buf_size, WERROR *werror) { struct svcctl_QueryServiceLockStatusW r; NTSTATUS status; @@ -635,10 +707,14 @@ NTSTATUS rpccli_svcctl_QueryServiceLockStatusW(struct rpc_pipe_client *cli, TALL *required_buf_size = *r.out.required_buf_size; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_StartServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t NumArgs, const char *Arguments) +NTSTATUS rpccli_svcctl_StartServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t NumArgs, const char *Arguments, WERROR *werror) { struct svcctl_StartServiceW r; NTSTATUS status; @@ -667,10 +743,14 @@ NTSTATUS rpccli_svcctl_StartServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *me /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_GetServiceDisplayNameW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **display_name, uint32_t *display_name_length) +NTSTATUS rpccli_svcctl_GetServiceDisplayNameW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **display_name, uint32_t *display_name_length, WERROR *werror) { struct svcctl_GetServiceDisplayNameW r; NTSTATUS status; @@ -703,10 +783,14 @@ NTSTATUS rpccli_svcctl_GetServiceDisplayNameW(struct rpc_pipe_client *cli, TALLO } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_GetServiceKeyNameW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **key_name, uint32_t *display_name_length) +NTSTATUS rpccli_svcctl_GetServiceKeyNameW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **key_name, uint32_t *display_name_length, WERROR *werror) { struct svcctl_GetServiceKeyNameW r; NTSTATUS status; @@ -739,10 +823,14 @@ NTSTATUS rpccli_svcctl_GetServiceKeyNameW(struct rpc_pipe_client *cli, TALLOC_CT } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_SCSetServiceBitsA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t bits, uint32_t bitson, uint32_t immediate) +NTSTATUS rpccli_svcctl_SCSetServiceBitsA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t bits, uint32_t bitson, uint32_t immediate, WERROR *werror) { struct svcctl_SCSetServiceBitsA r; NTSTATUS status; @@ -772,10 +860,14 @@ NTSTATUS rpccli_svcctl_SCSetServiceBitsA(struct rpc_pipe_client *cli, TALLOC_CTX /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_ChangeServiceConfigA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t type, uint32_t start, uint32_t error, const char *binary_path, const char *load_order_group, uint32_t *tag_id, const char *dependencies, const char *service_start_name, const char *password, const char *display_name) +NTSTATUS rpccli_svcctl_ChangeServiceConfigA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t type, uint32_t start, uint32_t error, const char *binary_path, const char *load_order_group, uint32_t *tag_id, const char *dependencies, const char *service_start_name, const char *password, const char *display_name, WERROR *werror) { struct svcctl_ChangeServiceConfigA r; NTSTATUS status; @@ -812,10 +904,14 @@ NTSTATUS rpccli_svcctl_ChangeServiceConfigA(struct rpc_pipe_client *cli, TALLOC_ *tag_id = *r.out.tag_id; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_CreateServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *ServiceName, const char *DisplayName, uint32_t desired_access, uint32_t type, uint32_t start_type, uint32_t error_control, const char *binary_path, const char *LoadOrderGroupKey, uint32_t *TagId, const char *dependencies, const char *service_start_name, const char *password) +NTSTATUS rpccli_svcctl_CreateServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *ServiceName, const char *DisplayName, uint32_t desired_access, uint32_t type, uint32_t start_type, uint32_t error_control, const char *binary_path, const char *LoadOrderGroupKey, uint32_t *TagId, const char *dependencies, const char *service_start_name, const char *password, WERROR *werror) { struct svcctl_CreateServiceA r; NTSTATUS status; @@ -856,10 +952,14 @@ NTSTATUS rpccli_svcctl_CreateServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *m } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_EnumDependentServicesA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *service, uint32_t state, struct ENUM_SERVICE_STATUS *service_status, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *services_returned) +NTSTATUS rpccli_svcctl_EnumDependentServicesA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *service, uint32_t state, struct ENUM_SERVICE_STATUS *service_status, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *services_returned, WERROR *werror) { struct svcctl_EnumDependentServicesA r; NTSTATUS status; @@ -893,10 +993,14 @@ NTSTATUS rpccli_svcctl_EnumDependentServicesA(struct rpc_pipe_client *cli, TALLO *services_returned = *r.out.services_returned; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_EnumServicesStatusA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t type, uint32_t state, uint32_t buf_size, uint8_t *service, uint32_t *bytes_needed, uint32_t *services_returned, uint32_t *resume_handle) +NTSTATUS rpccli_svcctl_EnumServicesStatusA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t type, uint32_t state, uint32_t buf_size, uint8_t *service, uint32_t *bytes_needed, uint32_t *services_returned, uint32_t *resume_handle, WERROR *werror) { struct svcctl_EnumServicesStatusA r; NTSTATUS status; @@ -933,10 +1037,14 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusA(struct rpc_pipe_client *cli, TALLOC_C } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_OpenSCManagerA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *MachineName, const char *DatabaseName, uint32_t access_mask, struct policy_handle *handle) +NTSTATUS rpccli_svcctl_OpenSCManagerA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *MachineName, const char *DatabaseName, uint32_t access_mask, struct policy_handle *handle, WERROR *werror) { struct svcctl_OpenSCManagerA r; NTSTATUS status; @@ -966,10 +1074,14 @@ NTSTATUS rpccli_svcctl_OpenSCManagerA(struct rpc_pipe_client *cli, TALLOC_CTX *m *handle = *r.out.handle; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_OpenServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager_handle, const char *ServiceName, uint32_t access_mask) +NTSTATUS rpccli_svcctl_OpenServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager_handle, const char *ServiceName, uint32_t access_mask, WERROR *werror) { struct svcctl_OpenServiceA r; NTSTATUS status; @@ -998,10 +1110,14 @@ NTSTATUS rpccli_svcctl_OpenServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *mem /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_QueryServiceConfigA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint8_t *query, uint32_t buf_size, uint32_t *bytes_needed) +NTSTATUS rpccli_svcctl_QueryServiceConfigA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint8_t *query, uint32_t buf_size, uint32_t *bytes_needed, WERROR *werror) { struct svcctl_QueryServiceConfigA r; NTSTATUS status; @@ -1031,10 +1147,14 @@ NTSTATUS rpccli_svcctl_QueryServiceConfigA(struct rpc_pipe_client *cli, TALLOC_C *bytes_needed = *r.out.bytes_needed; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_QueryServiceLockStatusA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t buf_size, struct SERVICE_LOCK_STATUS *lock_status, uint32_t *required_buf_size) +NTSTATUS rpccli_svcctl_QueryServiceLockStatusA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t buf_size, struct SERVICE_LOCK_STATUS *lock_status, uint32_t *required_buf_size, WERROR *werror) { struct svcctl_QueryServiceLockStatusA r; NTSTATUS status; @@ -1064,10 +1184,14 @@ NTSTATUS rpccli_svcctl_QueryServiceLockStatusA(struct rpc_pipe_client *cli, TALL *required_buf_size = *r.out.required_buf_size; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_StartServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t NumArgs, const char *Arguments) +NTSTATUS rpccli_svcctl_StartServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t NumArgs, const char *Arguments, WERROR *werror) { struct svcctl_StartServiceA r; NTSTATUS status; @@ -1096,10 +1220,14 @@ NTSTATUS rpccli_svcctl_StartServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *me /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_GetServiceDisplayNameA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **display_name, uint32_t *display_name_length) +NTSTATUS rpccli_svcctl_GetServiceDisplayNameA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **display_name, uint32_t *display_name_length, WERROR *werror) { struct svcctl_GetServiceDisplayNameA r; NTSTATUS status; @@ -1132,10 +1260,14 @@ NTSTATUS rpccli_svcctl_GetServiceDisplayNameA(struct rpc_pipe_client *cli, TALLO } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_GetServiceKeyNameA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **key_name, uint32_t *display_name_length) +NTSTATUS rpccli_svcctl_GetServiceKeyNameA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, const char *service_name, const char **key_name, uint32_t *display_name_length, WERROR *werror) { struct svcctl_GetServiceKeyNameA r; NTSTATUS status; @@ -1168,10 +1300,14 @@ NTSTATUS rpccli_svcctl_GetServiceKeyNameA(struct rpc_pipe_client *cli, TALLOC_CT } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_GetCurrentGroupeStateW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_svcctl_GetCurrentGroupeStateW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct svcctl_GetCurrentGroupeStateW r; NTSTATUS status; @@ -1197,10 +1333,14 @@ NTSTATUS rpccli_svcctl_GetCurrentGroupeStateW(struct rpc_pipe_client *cli, TALLO /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_EnumServiceGroupW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_svcctl_EnumServiceGroupW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct svcctl_EnumServiceGroupW r; NTSTATUS status; @@ -1226,10 +1366,14 @@ NTSTATUS rpccli_svcctl_EnumServiceGroupW(struct rpc_pipe_client *cli, TALLOC_CTX /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_ChangeServiceConfig2A(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t *info) +NTSTATUS rpccli_svcctl_ChangeServiceConfig2A(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t *info, WERROR *werror) { struct svcctl_ChangeServiceConfig2A r; NTSTATUS status; @@ -1258,10 +1402,14 @@ NTSTATUS rpccli_svcctl_ChangeServiceConfig2A(struct rpc_pipe_client *cli, TALLOC /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_ChangeServiceConfig2W(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t *info) +NTSTATUS rpccli_svcctl_ChangeServiceConfig2W(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t *info, WERROR *werror) { struct svcctl_ChangeServiceConfig2W r; NTSTATUS status; @@ -1290,10 +1438,14 @@ NTSTATUS rpccli_svcctl_ChangeServiceConfig2W(struct rpc_pipe_client *cli, TALLOC /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_QueryServiceConfig2A(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t *buffer, uint32_t buf_size, uint32_t *bytes_needed) +NTSTATUS rpccli_svcctl_QueryServiceConfig2A(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t *buffer, uint32_t buf_size, uint32_t *bytes_needed, WERROR *werror) { struct svcctl_QueryServiceConfig2A r; NTSTATUS status; @@ -1324,10 +1476,14 @@ NTSTATUS rpccli_svcctl_QueryServiceConfig2A(struct rpc_pipe_client *cli, TALLOC_ *bytes_needed = *r.out.bytes_needed; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_QueryServiceConfig2W(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t *buffer, uint32_t buf_size, uint32_t *bytes_needed) +NTSTATUS rpccli_svcctl_QueryServiceConfig2W(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t *buffer, uint32_t buf_size, uint32_t *bytes_needed, WERROR *werror) { struct svcctl_QueryServiceConfig2W r; NTSTATUS status; @@ -1358,10 +1514,14 @@ NTSTATUS rpccli_svcctl_QueryServiceConfig2W(struct rpc_pipe_client *cli, TALLOC_ *bytes_needed = *r.out.bytes_needed; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_QueryServiceStatusEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t *buffer, uint32_t buf_size, uint32_t *bytes_needed) +NTSTATUS rpccli_svcctl_QueryServiceStatusEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t info_level, uint8_t *buffer, uint32_t buf_size, uint32_t *bytes_needed, WERROR *werror) { struct svcctl_QueryServiceStatusEx r; NTSTATUS status; @@ -1392,10 +1552,14 @@ NTSTATUS rpccli_svcctl_QueryServiceStatusEx(struct rpc_pipe_client *cli, TALLOC_ *bytes_needed = *r.out.bytes_needed; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_EnumServicesStatusExA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager, uint32_t info_level, uint32_t type, uint32_t state, uint8_t *services, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *service_returned, uint32_t *resume_handle, const char **group_name) +NTSTATUS rpccli_EnumServicesStatusExA(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager, uint32_t info_level, uint32_t type, uint32_t state, uint8_t *services, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *service_returned, uint32_t *resume_handle, const char **group_name, WERROR *werror) { struct EnumServicesStatusExA r; NTSTATUS status; @@ -1434,10 +1598,14 @@ NTSTATUS rpccli_EnumServicesStatusExA(struct rpc_pipe_client *cli, TALLOC_CTX *m *group_name = *r.out.group_name; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_EnumServicesStatusExW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager, uint32_t info_level, uint32_t type, uint32_t state, uint8_t *services, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *service_returned, uint32_t *resume_handle, const char **group_name) +NTSTATUS rpccli_EnumServicesStatusExW(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *scmanager, uint32_t info_level, uint32_t type, uint32_t state, uint8_t *services, uint32_t buf_size, uint32_t *bytes_needed, uint32_t *service_returned, uint32_t *resume_handle, const char **group_name, WERROR *werror) { struct EnumServicesStatusExW r; NTSTATUS status; @@ -1476,10 +1644,14 @@ NTSTATUS rpccli_EnumServicesStatusExW(struct rpc_pipe_client *cli, TALLOC_CTX *m *group_name = *r.out.group_name; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_svcctl_SCSendTSMessage(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_svcctl_SCSendTSMessage(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct svcctl_SCSendTSMessage r; NTSTATUS status; @@ -1505,6 +1677,10 @@ NTSTATUS rpccli_svcctl_SCSendTSMessage(struct rpc_pipe_client *cli, TALLOC_CTX * /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } diff --git a/source3/librpc/gen_ndr/cli_winreg.c b/source3/librpc/gen_ndr/cli_winreg.c index 0450f056d0..d89f306b17 100644 --- a/source3/librpc/gen_ndr/cli_winreg.c +++ b/source3/librpc/gen_ndr/cli_winreg.c @@ -6,7 +6,7 @@ #include "includes.h" #include "librpc/gen_ndr/cli_winreg.h" -NTSTATUS rpccli_winreg_OpenHKCR(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle) +NTSTATUS rpccli_winreg_OpenHKCR(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle, WERROR *werror) { struct winreg_OpenHKCR r; NTSTATUS status; @@ -35,10 +35,14 @@ NTSTATUS rpccli_winreg_OpenHKCR(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx *handle = *r.out.handle; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_OpenHKCU(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle) +NTSTATUS rpccli_winreg_OpenHKCU(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle, WERROR *werror) { struct winreg_OpenHKCU r; NTSTATUS status; @@ -67,10 +71,14 @@ NTSTATUS rpccli_winreg_OpenHKCU(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx *handle = *r.out.handle; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_OpenHKLM(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle) +NTSTATUS rpccli_winreg_OpenHKLM(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle, WERROR *werror) { struct winreg_OpenHKLM r; NTSTATUS status; @@ -99,10 +107,14 @@ NTSTATUS rpccli_winreg_OpenHKLM(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx *handle = *r.out.handle; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_OpenHKPD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle) +NTSTATUS rpccli_winreg_OpenHKPD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle, WERROR *werror) { struct winreg_OpenHKPD r; NTSTATUS status; @@ -131,10 +143,14 @@ NTSTATUS rpccli_winreg_OpenHKPD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx *handle = *r.out.handle; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_OpenHKU(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle) +NTSTATUS rpccli_winreg_OpenHKU(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle, WERROR *werror) { struct winreg_OpenHKU r; NTSTATUS status; @@ -163,10 +179,14 @@ NTSTATUS rpccli_winreg_OpenHKU(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, *handle = *r.out.handle; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_CloseKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle) +NTSTATUS rpccli_winreg_CloseKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, WERROR *werror) { struct winreg_CloseKey r; NTSTATUS status; @@ -194,10 +214,14 @@ NTSTATUS rpccli_winreg_CloseKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx *handle = *r.out.handle; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_CreateKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String name, struct winreg_String keyclass, uint32_t options, uint32_t access_mask, struct winreg_SecBuf *secdesc, struct policy_handle *new_handle, enum winreg_CreateAction *action_taken) +NTSTATUS rpccli_winreg_CreateKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String name, struct winreg_String keyclass, uint32_t options, uint32_t access_mask, struct winreg_SecBuf *secdesc, struct policy_handle *new_handle, enum winreg_CreateAction *action_taken, WERROR *werror) { struct winreg_CreateKey r; NTSTATUS status; @@ -234,10 +258,14 @@ NTSTATUS rpccli_winreg_CreateKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_DeleteKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String key) +NTSTATUS rpccli_winreg_DeleteKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String key, WERROR *werror) { struct winreg_DeleteKey r; NTSTATUS status; @@ -265,10 +293,14 @@ NTSTATUS rpccli_winreg_DeleteKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_DeleteValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String value) +NTSTATUS rpccli_winreg_DeleteValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String value, WERROR *werror) { struct winreg_DeleteValue r; NTSTATUS status; @@ -296,10 +328,14 @@ NTSTATUS rpccli_winreg_DeleteValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_EnumKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t enum_index, struct winreg_StringBuf *name, struct winreg_StringBuf *keyclass, NTTIME *last_changed_time) +NTSTATUS rpccli_winreg_EnumKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t enum_index, struct winreg_StringBuf *name, struct winreg_StringBuf *keyclass, NTTIME *last_changed_time, WERROR *werror) { struct winreg_EnumKey r; NTSTATUS status; @@ -337,10 +373,14 @@ NTSTATUS rpccli_winreg_EnumKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_EnumValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t enum_index, struct winreg_ValNameBuf *name, enum winreg_Type *type, uint8_t *value, uint32_t *size, uint32_t *length) +NTSTATUS rpccli_winreg_EnumValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t enum_index, struct winreg_ValNameBuf *name, enum winreg_Type *type, uint8_t *value, uint32_t *size, uint32_t *length, WERROR *werror) { struct winreg_EnumValue r; NTSTATUS status; @@ -386,10 +426,14 @@ NTSTATUS rpccli_winreg_EnumValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_FlushKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle) +NTSTATUS rpccli_winreg_FlushKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, WERROR *werror) { struct winreg_FlushKey r; NTSTATUS status; @@ -416,10 +460,14 @@ NTSTATUS rpccli_winreg_FlushKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_GetKeySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t sec_info, struct KeySecurityData *sd) +NTSTATUS rpccli_winreg_GetKeySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t sec_info, struct KeySecurityData *sd, WERROR *werror) { struct winreg_GetKeySecurity r; NTSTATUS status; @@ -449,10 +497,14 @@ NTSTATUS rpccli_winreg_GetKeySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *m *sd = *r.out.sd; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_LoadKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String *keyname, struct winreg_String *filename) +NTSTATUS rpccli_winreg_LoadKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String *keyname, struct winreg_String *filename, WERROR *werror) { struct winreg_LoadKey r; NTSTATUS status; @@ -481,10 +533,14 @@ NTSTATUS rpccli_winreg_LoadKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_NotifyChangeKeyValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint8_t watch_subtree, uint32_t notify_filter, uint32_t unknown, struct winreg_String string1, struct winreg_String string2, uint32_t unknown2) +NTSTATUS rpccli_winreg_NotifyChangeKeyValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint8_t watch_subtree, uint32_t notify_filter, uint32_t unknown, struct winreg_String string1, struct winreg_String string2, uint32_t unknown2, WERROR *werror) { struct winreg_NotifyChangeKeyValue r; NTSTATUS status; @@ -517,10 +573,14 @@ NTSTATUS rpccli_winreg_NotifyChangeKeyValue(struct rpc_pipe_client *cli, TALLOC_ /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_OpenKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *parent_handle, struct winreg_String keyname, uint32_t unknown, uint32_t access_mask, struct policy_handle *handle) +NTSTATUS rpccli_winreg_OpenKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *parent_handle, struct winreg_String keyname, uint32_t unknown, uint32_t access_mask, struct policy_handle *handle, WERROR *werror) { struct winreg_OpenKey r; NTSTATUS status; @@ -551,10 +611,14 @@ NTSTATUS rpccli_winreg_OpenKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, *handle = *r.out.handle; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_QueryInfoKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String *classname, uint32_t *num_subkeys, uint32_t *max_subkeylen, uint32_t *max_classlen, uint32_t *num_values, uint32_t *max_valnamelen, uint32_t *max_valbufsize, uint32_t *secdescsize, NTTIME *last_changed_time) +NTSTATUS rpccli_winreg_QueryInfoKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String *classname, uint32_t *num_subkeys, uint32_t *max_subkeylen, uint32_t *max_classlen, uint32_t *num_values, uint32_t *max_valnamelen, uint32_t *max_valbufsize, uint32_t *secdescsize, NTTIME *last_changed_time, WERROR *werror) { struct winreg_QueryInfoKey r; NTSTATUS status; @@ -591,10 +655,14 @@ NTSTATUS rpccli_winreg_QueryInfoKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem *last_changed_time = *r.out.last_changed_time; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String value_name, enum winreg_Type *type, uint8_t *data, uint32_t *data_size, uint32_t *value_length) +NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String value_name, enum winreg_Type *type, uint8_t *data, uint32_t *data_size, uint32_t *value_length, WERROR *werror) { struct winreg_QueryValue r; NTSTATUS status; @@ -638,10 +706,14 @@ NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_ReplaceKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_winreg_ReplaceKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct winreg_ReplaceKey r; NTSTATUS status; @@ -667,10 +739,14 @@ NTSTATUS rpccli_winreg_ReplaceKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_RestoreKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String *filename, uint32_t flags) +NTSTATUS rpccli_winreg_RestoreKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String *filename, uint32_t flags, WERROR *werror) { struct winreg_RestoreKey r; NTSTATUS status; @@ -699,10 +775,14 @@ NTSTATUS rpccli_winreg_RestoreKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_SaveKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String *filename, struct KeySecurityAttribute *sec_attrib) +NTSTATUS rpccli_winreg_SaveKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String *filename, struct KeySecurityAttribute *sec_attrib, WERROR *werror) { struct winreg_SaveKey r; NTSTATUS status; @@ -731,10 +811,14 @@ NTSTATUS rpccli_winreg_SaveKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_SetKeySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t access_mask, struct KeySecurityData *sd) +NTSTATUS rpccli_winreg_SetKeySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t access_mask, struct KeySecurityData *sd, WERROR *werror) { struct winreg_SetKeySecurity r; NTSTATUS status; @@ -763,10 +847,14 @@ NTSTATUS rpccli_winreg_SetKeySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *m /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_SetValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String name, enum winreg_Type type, uint8_t *data, uint32_t size) +NTSTATUS rpccli_winreg_SetValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String name, enum winreg_Type type, uint8_t *data, uint32_t size, WERROR *werror) { struct winreg_SetValue r; NTSTATUS status; @@ -797,10 +885,14 @@ NTSTATUS rpccli_winreg_SetValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_UnLoadKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_winreg_UnLoadKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct winreg_UnLoadKey r; NTSTATUS status; @@ -826,10 +918,14 @@ NTSTATUS rpccli_winreg_UnLoadKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_InitiateSystemShutdown(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *hostname, struct initshutdown_String *message, uint32_t timeout, uint8_t force_apps, uint8_t reboot) +NTSTATUS rpccli_winreg_InitiateSystemShutdown(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *hostname, struct initshutdown_String *message, uint32_t timeout, uint8_t force_apps, uint8_t reboot, WERROR *werror) { struct winreg_InitiateSystemShutdown r; NTSTATUS status; @@ -860,10 +956,14 @@ NTSTATUS rpccli_winreg_InitiateSystemShutdown(struct rpc_pipe_client *cli, TALLO /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_AbortSystemShutdown(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *server) +NTSTATUS rpccli_winreg_AbortSystemShutdown(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *server, WERROR *werror) { struct winreg_AbortSystemShutdown r; NTSTATUS status; @@ -890,10 +990,14 @@ NTSTATUS rpccli_winreg_AbortSystemShutdown(struct rpc_pipe_client *cli, TALLOC_C /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_GetVersion(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t *version) +NTSTATUS rpccli_winreg_GetVersion(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, uint32_t *version, WERROR *werror) { struct winreg_GetVersion r; NTSTATUS status; @@ -921,10 +1025,14 @@ NTSTATUS rpccli_winreg_GetVersion(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c *version = *r.out.version; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_OpenHKCC(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle) +NTSTATUS rpccli_winreg_OpenHKCC(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle, WERROR *werror) { struct winreg_OpenHKCC r; NTSTATUS status; @@ -953,10 +1061,14 @@ NTSTATUS rpccli_winreg_OpenHKCC(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx *handle = *r.out.handle; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_OpenHKDD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle) +NTSTATUS rpccli_winreg_OpenHKDD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle, WERROR *werror) { struct winreg_OpenHKDD r; NTSTATUS status; @@ -985,10 +1097,14 @@ NTSTATUS rpccli_winreg_OpenHKDD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx *handle = *r.out.handle; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_QueryMultipleValues(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *key_handle, struct QueryMultipleValue *values, uint32_t num_values, uint8_t *buffer, uint32_t *buffer_size) +NTSTATUS rpccli_winreg_QueryMultipleValues(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *key_handle, struct QueryMultipleValue *values, uint32_t num_values, uint8_t *buffer, uint32_t *buffer_size, WERROR *werror) { struct winreg_QueryMultipleValues r; NTSTATUS status; @@ -1024,10 +1140,14 @@ NTSTATUS rpccli_winreg_QueryMultipleValues(struct rpc_pipe_client *cli, TALLOC_C *buffer_size = *r.out.buffer_size; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_InitiateSystemShutdownEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *hostname, struct initshutdown_String *message, uint32_t timeout, uint8_t force_apps, uint8_t reboot, uint32_t reason) +NTSTATUS rpccli_winreg_InitiateSystemShutdownEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *hostname, struct initshutdown_String *message, uint32_t timeout, uint8_t force_apps, uint8_t reboot, uint32_t reason, WERROR *werror) { struct winreg_InitiateSystemShutdownEx r; NTSTATUS status; @@ -1059,10 +1179,14 @@ NTSTATUS rpccli_winreg_InitiateSystemShutdownEx(struct rpc_pipe_client *cli, TAL /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_SaveKeyEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_winreg_SaveKeyEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct winreg_SaveKeyEx r; NTSTATUS status; @@ -1088,10 +1212,14 @@ NTSTATUS rpccli_winreg_SaveKeyEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_OpenHKPT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle) +NTSTATUS rpccli_winreg_OpenHKPT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle, WERROR *werror) { struct winreg_OpenHKPT r; NTSTATUS status; @@ -1120,10 +1248,14 @@ NTSTATUS rpccli_winreg_OpenHKPT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx *handle = *r.out.handle; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_OpenHKPN(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle) +NTSTATUS rpccli_winreg_OpenHKPN(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle, WERROR *werror) { struct winreg_OpenHKPN r; NTSTATUS status; @@ -1152,10 +1284,14 @@ NTSTATUS rpccli_winreg_OpenHKPN(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx *handle = *r.out.handle; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_winreg_QueryMultipleValues2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) +NTSTATUS rpccli_winreg_QueryMultipleValues2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, WERROR *werror) { struct winreg_QueryMultipleValues2 r; NTSTATUS status; @@ -1181,6 +1317,10 @@ NTSTATUS rpccli_winreg_QueryMultipleValues2(struct rpc_pipe_client *cli, TALLOC_ /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } diff --git a/source3/librpc/gen_ndr/cli_wkssvc.c b/source3/librpc/gen_ndr/cli_wkssvc.c index 8c58b6dbee..fbdc93ed2a 100644 --- a/source3/librpc/gen_ndr/cli_wkssvc.c +++ b/source3/librpc/gen_ndr/cli_wkssvc.c @@ -6,7 +6,7 @@ #include "includes.h" #include "librpc/gen_ndr/cli_wkssvc.h" -NTSTATUS rpccli_wkssvc_NetWkstaGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, uint32_t level, union wkssvc_NetWkstaInfo *info) +NTSTATUS rpccli_wkssvc_NetWkstaGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, uint32_t level, union wkssvc_NetWkstaInfo *info, WERROR *werror) { struct wkssvc_NetWkstaGetInfo r; NTSTATUS status; @@ -35,10 +35,14 @@ NTSTATUS rpccli_wkssvc_NetWkstaGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX * *info = *r.out.info; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetWkstaSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, uint32_t level, union wkssvc_NetWkstaInfo *info, uint32_t *parm_error) +NTSTATUS rpccli_wkssvc_NetWkstaSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, uint32_t level, union wkssvc_NetWkstaInfo *info, uint32_t *parm_error, WERROR *werror) { struct wkssvc_NetWkstaSetInfo r; NTSTATUS status; @@ -69,10 +73,14 @@ NTSTATUS rpccli_wkssvc_NetWkstaSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX * *parm_error = *r.out.parm_error; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetWkstaEnumUsers(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, struct wkssvc_NetWkstaEnumUsersInfo *info, uint32_t prefmaxlen, uint32_t *entries_read, uint32_t *resume_handle) +NTSTATUS rpccli_wkssvc_NetWkstaEnumUsers(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, struct wkssvc_NetWkstaEnumUsersInfo *info, uint32_t prefmaxlen, uint32_t *entries_read, uint32_t *resume_handle, WERROR *werror) { struct wkssvc_NetWkstaEnumUsers r; NTSTATUS status; @@ -107,10 +115,14 @@ NTSTATUS rpccli_wkssvc_NetWkstaEnumUsers(struct rpc_pipe_client *cli, TALLOC_CTX } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetrWkstaUserGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *unknown, uint32_t level, union wkssvc_NetrWkstaUserInfo *info) +NTSTATUS rpccli_wkssvc_NetrWkstaUserGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *unknown, uint32_t level, union wkssvc_NetrWkstaUserInfo *info, WERROR *werror) { struct wkssvc_NetrWkstaUserGetInfo r; NTSTATUS status; @@ -139,10 +151,14 @@ NTSTATUS rpccli_wkssvc_NetrWkstaUserGetInfo(struct rpc_pipe_client *cli, TALLOC_ *info = *r.out.info; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetrWkstaUserSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *unknown, uint32_t level, union wkssvc_NetrWkstaUserInfo *info, uint32_t *parm_err) +NTSTATUS rpccli_wkssvc_NetrWkstaUserSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *unknown, uint32_t level, union wkssvc_NetrWkstaUserInfo *info, uint32_t *parm_err, WERROR *werror) { struct wkssvc_NetrWkstaUserSetInfo r; NTSTATUS status; @@ -175,10 +191,14 @@ NTSTATUS rpccli_wkssvc_NetrWkstaUserSetInfo(struct rpc_pipe_client *cli, TALLOC_ } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetWkstaTransportEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, struct wkssvc_NetWkstaTransportInfo *info, uint32_t max_buffer, uint32_t *total_entries, uint32_t *resume_handle) +NTSTATUS rpccli_wkssvc_NetWkstaTransportEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, struct wkssvc_NetWkstaTransportInfo *info, uint32_t max_buffer, uint32_t *total_entries, uint32_t *resume_handle, WERROR *werror) { struct wkssvc_NetWkstaTransportEnum r; NTSTATUS status; @@ -213,10 +233,14 @@ NTSTATUS rpccli_wkssvc_NetWkstaTransportEnum(struct rpc_pipe_client *cli, TALLOC } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetrWkstaTransportAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, uint32_t level, struct wkssvc_NetWkstaTransportInfo0 *info0, uint32_t *parm_err) +NTSTATUS rpccli_wkssvc_NetrWkstaTransportAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, uint32_t level, struct wkssvc_NetWkstaTransportInfo0 *info0, uint32_t *parm_err, WERROR *werror) { struct wkssvc_NetrWkstaTransportAdd r; NTSTATUS status; @@ -249,10 +273,14 @@ NTSTATUS rpccli_wkssvc_NetrWkstaTransportAdd(struct rpc_pipe_client *cli, TALLOC } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetrWkstaTransportDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *transport_name, uint32_t unknown3) +NTSTATUS rpccli_wkssvc_NetrWkstaTransportDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *transport_name, uint32_t unknown3, WERROR *werror) { struct wkssvc_NetrWkstaTransportDel r; NTSTATUS status; @@ -281,10 +309,14 @@ NTSTATUS rpccli_wkssvc_NetrWkstaTransportDel(struct rpc_pipe_client *cli, TALLOC /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetrUseAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, uint32_t level, union wkssvc_NetrUseGetInfoCtr *ctr, uint32_t *parm_err) +NTSTATUS rpccli_wkssvc_NetrUseAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, uint32_t level, union wkssvc_NetrUseGetInfoCtr *ctr, uint32_t *parm_err, WERROR *werror) { struct wkssvc_NetrUseAdd r; NTSTATUS status; @@ -317,10 +349,14 @@ NTSTATUS rpccli_wkssvc_NetrUseAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetrUseGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *use_name, uint32_t level, union wkssvc_NetrUseGetInfoCtr *ctr) +NTSTATUS rpccli_wkssvc_NetrUseGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *use_name, uint32_t level, union wkssvc_NetrUseGetInfoCtr *ctr, WERROR *werror) { struct wkssvc_NetrUseGetInfo r; NTSTATUS status; @@ -350,10 +386,14 @@ NTSTATUS rpccli_wkssvc_NetrUseGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *m *ctr = *r.out.ctr; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetrUseDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *use_name, uint32_t force_cond) +NTSTATUS rpccli_wkssvc_NetrUseDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *use_name, uint32_t force_cond, WERROR *werror) { struct wkssvc_NetrUseDel r; NTSTATUS status; @@ -382,10 +422,14 @@ NTSTATUS rpccli_wkssvc_NetrUseDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetrUseEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, struct wkssvc_NetrUseEnumInfo *info, uint32_t prefmaxlen, uint32_t *entries_read, uint32_t *resume_handle) +NTSTATUS rpccli_wkssvc_NetrUseEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, struct wkssvc_NetrUseEnumInfo *info, uint32_t prefmaxlen, uint32_t *entries_read, uint32_t *resume_handle, WERROR *werror) { struct wkssvc_NetrUseEnum r; NTSTATUS status; @@ -420,10 +464,14 @@ NTSTATUS rpccli_wkssvc_NetrUseEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ } /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetrMessageBufferSend(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *message_name, const char *message_sender_name, uint8_t *message_buffer, uint32_t message_size) +NTSTATUS rpccli_wkssvc_NetrMessageBufferSend(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *message_name, const char *message_sender_name, uint8_t *message_buffer, uint32_t message_size, WERROR *werror) { struct wkssvc_NetrMessageBufferSend r; NTSTATUS status; @@ -454,10 +502,14 @@ NTSTATUS rpccli_wkssvc_NetrMessageBufferSend(struct rpc_pipe_client *cli, TALLOC /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetrWorkstationStatisticsGet(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *unknown2, uint32_t unknown3, uint32_t unknown4, struct wkssvc_NetrWorkstationStatistics **info) +NTSTATUS rpccli_wkssvc_NetrWorkstationStatisticsGet(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *unknown2, uint32_t unknown3, uint32_t unknown4, struct wkssvc_NetrWorkstationStatistics **info, WERROR *werror) { struct wkssvc_NetrWorkstationStatisticsGet r; NTSTATUS status; @@ -488,10 +540,14 @@ NTSTATUS rpccli_wkssvc_NetrWorkstationStatisticsGet(struct rpc_pipe_client *cli, *info = *r.out.info; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetrLogonDomainNameAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *domain_name) +NTSTATUS rpccli_wkssvc_NetrLogonDomainNameAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *domain_name, WERROR *werror) { struct wkssvc_NetrLogonDomainNameAdd r; NTSTATUS status; @@ -518,10 +574,14 @@ NTSTATUS rpccli_wkssvc_NetrLogonDomainNameAdd(struct rpc_pipe_client *cli, TALLO /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetrLogonDomainNameDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *domain_name) +NTSTATUS rpccli_wkssvc_NetrLogonDomainNameDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *domain_name, WERROR *werror) { struct wkssvc_NetrLogonDomainNameDel r; NTSTATUS status; @@ -548,10 +608,14 @@ NTSTATUS rpccli_wkssvc_NetrLogonDomainNameDel(struct rpc_pipe_client *cli, TALLO /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetrJoinDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *domain_name, const char *account_ou, const char *Account, const char *password, uint32_t join_flags) +NTSTATUS rpccli_wkssvc_NetrJoinDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *domain_name, const char *account_ou, const char *Account, const char *password, uint32_t join_flags, WERROR *werror) { struct wkssvc_NetrJoinDomain r; NTSTATUS status; @@ -583,10 +647,14 @@ NTSTATUS rpccli_wkssvc_NetrJoinDomain(struct rpc_pipe_client *cli, TALLOC_CTX *m /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetrUnjoinDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *Account, const char *password, uint32_t unjoin_flags) +NTSTATUS rpccli_wkssvc_NetrUnjoinDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *Account, const char *password, uint32_t unjoin_flags, WERROR *werror) { struct wkssvc_NetrUnjoinDomain r; NTSTATUS status; @@ -616,10 +684,14 @@ NTSTATUS rpccli_wkssvc_NetrUnjoinDomain(struct rpc_pipe_client *cli, TALLOC_CTX /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetrRenameMachineInDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *NewMachineName, const char *Account, const char *password, uint32_t RenameOptions) +NTSTATUS rpccli_wkssvc_NetrRenameMachineInDomain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *NewMachineName, const char *Account, const char *password, uint32_t RenameOptions, WERROR *werror) { struct wkssvc_NetrRenameMachineInDomain r; NTSTATUS status; @@ -650,10 +722,14 @@ NTSTATUS rpccli_wkssvc_NetrRenameMachineInDomain(struct rpc_pipe_client *cli, TA /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetrValidateName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *name, const char *Account, const char *Password, enum wkssvc_NetValidateNameType name_type) +NTSTATUS rpccli_wkssvc_NetrValidateName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *name, const char *Account, const char *Password, enum wkssvc_NetValidateNameType name_type, WERROR *werror) { struct wkssvc_NetrValidateName r; NTSTATUS status; @@ -684,10 +760,14 @@ NTSTATUS rpccli_wkssvc_NetrValidateName(struct rpc_pipe_client *cli, TALLOC_CTX /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetrGetJoinInformation(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char **name_buffer, enum wkssvc_NetJoinStatus *name_type) +NTSTATUS rpccli_wkssvc_NetrGetJoinInformation(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char **name_buffer, enum wkssvc_NetJoinStatus *name_type, WERROR *werror) { struct wkssvc_NetrGetJoinInformation r; NTSTATUS status; @@ -717,10 +797,14 @@ NTSTATUS rpccli_wkssvc_NetrGetJoinInformation(struct rpc_pipe_client *cli, TALLO *name_type = *r.out.name_type; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetrGetJoinableOus(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *domain_name, const char *Account, const char *unknown, uint32_t *num_ous, const char ***ous) +NTSTATUS rpccli_wkssvc_NetrGetJoinableOus(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *domain_name, const char *Account, const char *unknown, uint32_t *num_ous, const char ***ous, WERROR *werror) { struct wkssvc_NetrGetJoinableOus r; NTSTATUS status; @@ -753,10 +837,14 @@ NTSTATUS rpccli_wkssvc_NetrGetJoinableOus(struct rpc_pipe_client *cli, TALLOC_CT memcpy(ous, r.out.ous, *r.in.num_ous); /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetrJoinDomain2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *domain_name, const char *account_ou, const char *admin_account, struct wkssvc_PasswordBuffer *encrypted_password, uint32_t join_flags) +NTSTATUS rpccli_wkssvc_NetrJoinDomain2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *domain_name, const char *account_ou, const char *admin_account, struct wkssvc_PasswordBuffer *encrypted_password, uint32_t join_flags, WERROR *werror) { struct wkssvc_NetrJoinDomain2 r; NTSTATUS status; @@ -788,10 +876,14 @@ NTSTATUS rpccli_wkssvc_NetrJoinDomain2(struct rpc_pipe_client *cli, TALLOC_CTX * /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetrUnjoinDomain2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *account, struct wkssvc_PasswordBuffer *encrypted_password, uint32_t unjoin_flags) +NTSTATUS rpccli_wkssvc_NetrUnjoinDomain2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *account, struct wkssvc_PasswordBuffer *encrypted_password, uint32_t unjoin_flags, WERROR *werror) { struct wkssvc_NetrUnjoinDomain2 r; NTSTATUS status; @@ -821,10 +913,14 @@ NTSTATUS rpccli_wkssvc_NetrUnjoinDomain2(struct rpc_pipe_client *cli, TALLOC_CTX /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetrRenameMachineInDomain2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *NewMachineName, const char *Account, struct wkssvc_PasswordBuffer *EncryptedPassword, uint32_t RenameOptions) +NTSTATUS rpccli_wkssvc_NetrRenameMachineInDomain2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *NewMachineName, const char *Account, struct wkssvc_PasswordBuffer *EncryptedPassword, uint32_t RenameOptions, WERROR *werror) { struct wkssvc_NetrRenameMachineInDomain2 r; NTSTATUS status; @@ -855,10 +951,14 @@ NTSTATUS rpccli_wkssvc_NetrRenameMachineInDomain2(struct rpc_pipe_client *cli, T /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetrValidateName2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *name, const char *Account, struct wkssvc_PasswordBuffer *EncryptedPassword, enum wkssvc_NetValidateNameType name_type) +NTSTATUS rpccli_wkssvc_NetrValidateName2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *name, const char *Account, struct wkssvc_PasswordBuffer *EncryptedPassword, enum wkssvc_NetValidateNameType name_type, WERROR *werror) { struct wkssvc_NetrValidateName2 r; NTSTATUS status; @@ -889,10 +989,14 @@ NTSTATUS rpccli_wkssvc_NetrValidateName2(struct rpc_pipe_client *cli, TALLOC_CTX /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetrGetJoinableOus2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *domain_name, const char *Account, struct wkssvc_PasswordBuffer *EncryptedPassword, uint32_t *num_ous, const char ***ous) +NTSTATUS rpccli_wkssvc_NetrGetJoinableOus2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *domain_name, const char *Account, struct wkssvc_PasswordBuffer *EncryptedPassword, uint32_t *num_ous, const char ***ous, WERROR *werror) { struct wkssvc_NetrGetJoinableOus2 r; NTSTATUS status; @@ -925,10 +1029,14 @@ NTSTATUS rpccli_wkssvc_NetrGetJoinableOus2(struct rpc_pipe_client *cli, TALLOC_C memcpy(ous, r.out.ous, *r.in.num_ous); /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetrAddAlternateComputerName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *NewAlternateMachineName, const char *Account, struct wkssvc_PasswordBuffer *EncryptedPassword, uint32_t Reserved) +NTSTATUS rpccli_wkssvc_NetrAddAlternateComputerName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *NewAlternateMachineName, const char *Account, struct wkssvc_PasswordBuffer *EncryptedPassword, uint32_t Reserved, WERROR *werror) { struct wkssvc_NetrAddAlternateComputerName r; NTSTATUS status; @@ -959,10 +1067,14 @@ NTSTATUS rpccli_wkssvc_NetrAddAlternateComputerName(struct rpc_pipe_client *cli, /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetrRemoveAlternateComputerName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *AlternateMachineNameToRemove, const char *Account, struct wkssvc_PasswordBuffer *EncryptedPassword, uint32_t Reserved) +NTSTATUS rpccli_wkssvc_NetrRemoveAlternateComputerName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *AlternateMachineNameToRemove, const char *Account, struct wkssvc_PasswordBuffer *EncryptedPassword, uint32_t Reserved, WERROR *werror) { struct wkssvc_NetrRemoveAlternateComputerName r; NTSTATUS status; @@ -993,10 +1105,14 @@ NTSTATUS rpccli_wkssvc_NetrRemoveAlternateComputerName(struct rpc_pipe_client *c /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetrSetPrimaryComputername(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *primary_name, const char *Account, struct wkssvc_PasswordBuffer *EncryptedPassword, uint32_t Reserved) +NTSTATUS rpccli_wkssvc_NetrSetPrimaryComputername(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, const char *primary_name, const char *Account, struct wkssvc_PasswordBuffer *EncryptedPassword, uint32_t Reserved, WERROR *werror) { struct wkssvc_NetrSetPrimaryComputername r; NTSTATUS status; @@ -1027,10 +1143,14 @@ NTSTATUS rpccli_wkssvc_NetrSetPrimaryComputername(struct rpc_pipe_client *cli, T /* Return variables */ /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } -NTSTATUS rpccli_wkssvc_NetrEnumerateComputerNames(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, enum wkssvc_ComputerNameType name_type, uint32_t Reserved, struct wkssvc_ComputerNamesCtr **ctr) +NTSTATUS rpccli_wkssvc_NetrEnumerateComputerNames(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const char *server_name, enum wkssvc_ComputerNameType name_type, uint32_t Reserved, struct wkssvc_ComputerNamesCtr **ctr, WERROR *werror) { struct wkssvc_NetrEnumerateComputerNames r; NTSTATUS status; @@ -1060,6 +1180,10 @@ NTSTATUS rpccli_wkssvc_NetrEnumerateComputerNames(struct rpc_pipe_client *cli, T *ctr = *r.out.ctr; /* Return result */ + if (werror) { + *werror = r.out.result; + } + return werror_to_ntstatus(r.out.result); } |