diff options
Diffstat (limited to 'source3/librpc')
-rw-r--r-- | source3/librpc/gen_ndr/cli_dfs.c | 108 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/cli_echo.c | 40 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/cli_eventlog.c | 96 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/cli_initshutdown.c | 12 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/cli_lsa.c | 420 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/cli_netlogon.c | 232 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/cli_srvsvc.c | 284 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/cli_svcctl.c | 224 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/cli_unixinfo.c | 28 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/cli_winreg.c | 192 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/cli_winreg.h | 2 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/cli_wkssvc.c | 136 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/ndr_winreg.c | 32 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/srv_winreg.c | 6 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/srv_winreg.h | 2 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/winreg.h | 4 | ||||
-rw-r--r-- | source3/librpc/idl/winreg.idl | 7 |
17 files changed, 1714 insertions, 111 deletions
diff --git a/source3/librpc/gen_ndr/cli_dfs.c b/source3/librpc/gen_ndr/cli_dfs.c index fda91f2f5f..a5f4e681e0 100644 --- a/source3/librpc/gen_ndr/cli_dfs.c +++ b/source3/librpc/gen_ndr/cli_dfs.c @@ -18,6 +18,10 @@ NTSTATUS rpccli_dfs_GetManagerVersion(struct rpc_pipe_client *cli, TALLOC_CTX *m status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETDFS, DCERPC_DFS_GETMANAGERVERSION, &r, (ndr_pull_flags_fn_t)ndr_pull_dfs_GetManagerVersion, (ndr_push_flags_fn_t)ndr_push_dfs_GetManagerVersion); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_GetManagerVersion, &r); @@ -49,6 +53,10 @@ NTSTATUS rpccli_dfs_Add(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETDFS, DCERPC_DFS_ADD, &r, (ndr_pull_flags_fn_t)ndr_pull_dfs_Add, (ndr_push_flags_fn_t)ndr_push_dfs_Add); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_Add, &r); @@ -77,6 +85,10 @@ NTSTATUS rpccli_dfs_Remove(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, con status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETDFS, DCERPC_DFS_REMOVE, &r, (ndr_pull_flags_fn_t)ndr_pull_dfs_Remove, (ndr_push_flags_fn_t)ndr_push_dfs_Remove); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_Remove, &r); @@ -102,6 +114,10 @@ NTSTATUS rpccli_dfs_SetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETDFS, DCERPC_DFS_SETINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_dfs_SetInfo, (ndr_push_flags_fn_t)ndr_push_dfs_SetInfo); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_SetInfo, &r); @@ -131,6 +147,10 @@ NTSTATUS rpccli_dfs_GetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, co status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETDFS, DCERPC_DFS_GETINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_dfs_GetInfo, (ndr_push_flags_fn_t)ndr_push_dfs_GetInfo); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_GetInfo, &r); @@ -162,6 +182,10 @@ NTSTATUS rpccli_dfs_Enum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint3 status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETDFS, DCERPC_DFS_ENUM, &r, (ndr_pull_flags_fn_t)ndr_pull_dfs_Enum, (ndr_push_flags_fn_t)ndr_push_dfs_Enum); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_Enum, &r); @@ -170,8 +194,12 @@ NTSTATUS rpccli_dfs_Enum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, uint3 } /* Return variables */ - *info = *r.out.info; - *total = *r.out.total; + if ( info ) { + *info = *r.out.info; + } + if ( total ) { + *total = *r.out.total; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -189,6 +217,10 @@ NTSTATUS rpccli_dfs_Rename(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETDFS, DCERPC_DFS_RENAME, &r, (ndr_pull_flags_fn_t)ndr_pull_dfs_Rename, (ndr_push_flags_fn_t)ndr_push_dfs_Rename); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_Rename, &r); @@ -214,6 +246,10 @@ NTSTATUS rpccli_dfs_Move(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETDFS, DCERPC_DFS_MOVE, &r, (ndr_pull_flags_fn_t)ndr_pull_dfs_Move, (ndr_push_flags_fn_t)ndr_push_dfs_Move); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_Move, &r); @@ -239,6 +275,10 @@ NTSTATUS rpccli_dfs_ManagerGetConfigInfo(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETDFS, DCERPC_DFS_MANAGERGETCONFIGINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_dfs_ManagerGetConfigInfo, (ndr_push_flags_fn_t)ndr_push_dfs_ManagerGetConfigInfo); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_ManagerGetConfigInfo, &r); @@ -264,6 +304,10 @@ NTSTATUS rpccli_dfs_ManagerSendSiteInfo(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETDFS, DCERPC_DFS_MANAGERSENDSITEINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_dfs_ManagerSendSiteInfo, (ndr_push_flags_fn_t)ndr_push_dfs_ManagerSendSiteInfo); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_ManagerSendSiteInfo, &r); @@ -289,6 +333,10 @@ NTSTATUS rpccli_dfs_AddFtRoot(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETDFS, DCERPC_DFS_ADDFTROOT, &r, (ndr_pull_flags_fn_t)ndr_pull_dfs_AddFtRoot, (ndr_push_flags_fn_t)ndr_push_dfs_AddFtRoot); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_AddFtRoot, &r); @@ -314,6 +362,10 @@ NTSTATUS rpccli_dfs_RemoveFtRoot(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETDFS, DCERPC_DFS_REMOVEFTROOT, &r, (ndr_pull_flags_fn_t)ndr_pull_dfs_RemoveFtRoot, (ndr_push_flags_fn_t)ndr_push_dfs_RemoveFtRoot); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_RemoveFtRoot, &r); @@ -339,6 +391,10 @@ NTSTATUS rpccli_dfs_AddStdRoot(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETDFS, DCERPC_DFS_ADDSTDROOT, &r, (ndr_pull_flags_fn_t)ndr_pull_dfs_AddStdRoot, (ndr_push_flags_fn_t)ndr_push_dfs_AddStdRoot); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_AddStdRoot, &r); @@ -364,6 +420,10 @@ NTSTATUS rpccli_dfs_RemoveStdRoot(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETDFS, DCERPC_DFS_REMOVESTDROOT, &r, (ndr_pull_flags_fn_t)ndr_pull_dfs_RemoveStdRoot, (ndr_push_flags_fn_t)ndr_push_dfs_RemoveStdRoot); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_RemoveStdRoot, &r); @@ -389,6 +449,10 @@ NTSTATUS rpccli_dfs_ManagerInitialize(struct rpc_pipe_client *cli, TALLOC_CTX *m status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETDFS, DCERPC_DFS_MANAGERINITIALIZE, &r, (ndr_pull_flags_fn_t)ndr_pull_dfs_ManagerInitialize, (ndr_push_flags_fn_t)ndr_push_dfs_ManagerInitialize); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_ManagerInitialize, &r); @@ -414,6 +478,10 @@ NTSTATUS rpccli_dfs_AddStdRootForced(struct rpc_pipe_client *cli, TALLOC_CTX *me status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETDFS, DCERPC_DFS_ADDSTDROOTFORCED, &r, (ndr_pull_flags_fn_t)ndr_pull_dfs_AddStdRootForced, (ndr_push_flags_fn_t)ndr_push_dfs_AddStdRootForced); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_AddStdRootForced, &r); @@ -439,6 +507,10 @@ NTSTATUS rpccli_dfs_GetDcAddress(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETDFS, DCERPC_DFS_GETDCADDRESS, &r, (ndr_pull_flags_fn_t)ndr_pull_dfs_GetDcAddress, (ndr_push_flags_fn_t)ndr_push_dfs_GetDcAddress); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_GetDcAddress, &r); @@ -464,6 +536,10 @@ NTSTATUS rpccli_dfs_SetDcAddress(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETDFS, DCERPC_DFS_SETDCADDRESS, &r, (ndr_pull_flags_fn_t)ndr_pull_dfs_SetDcAddress, (ndr_push_flags_fn_t)ndr_push_dfs_SetDcAddress); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_SetDcAddress, &r); @@ -489,6 +565,10 @@ NTSTATUS rpccli_dfs_FlushFtTable(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETDFS, DCERPC_DFS_FLUSHFTTABLE, &r, (ndr_pull_flags_fn_t)ndr_pull_dfs_FlushFtTable, (ndr_push_flags_fn_t)ndr_push_dfs_FlushFtTable); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_FlushFtTable, &r); @@ -514,6 +594,10 @@ NTSTATUS rpccli_dfs_Add2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETDFS, DCERPC_DFS_ADD2, &r, (ndr_pull_flags_fn_t)ndr_pull_dfs_Add2, (ndr_push_flags_fn_t)ndr_push_dfs_Add2); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_Add2, &r); @@ -539,6 +623,10 @@ NTSTATUS rpccli_dfs_Remove2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETDFS, DCERPC_DFS_REMOVE2, &r, (ndr_pull_flags_fn_t)ndr_pull_dfs_Remove2, (ndr_push_flags_fn_t)ndr_push_dfs_Remove2); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_Remove2, &r); @@ -569,6 +657,10 @@ NTSTATUS rpccli_dfs_EnumEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, con status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETDFS, DCERPC_DFS_ENUMEX, &r, (ndr_pull_flags_fn_t)ndr_pull_dfs_EnumEx, (ndr_push_flags_fn_t)ndr_push_dfs_EnumEx); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_EnumEx, &r); @@ -577,8 +669,12 @@ NTSTATUS rpccli_dfs_EnumEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, con } /* Return variables */ - *info = *r.out.info; - *total = *r.out.total; + if ( info ) { + *info = *r.out.info; + } + if ( total ) { + *total = *r.out.total; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -596,6 +692,10 @@ NTSTATUS rpccli_dfs_SetInfo2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETDFS, DCERPC_DFS_SETINFO2, &r, (ndr_pull_flags_fn_t)ndr_pull_dfs_SetInfo2, (ndr_push_flags_fn_t)ndr_push_dfs_SetInfo2); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(dfs_SetInfo2, &r); diff --git a/source3/librpc/gen_ndr/cli_echo.c b/source3/librpc/gen_ndr/cli_echo.c index 9cfe744e76..c393de477c 100644 --- a/source3/librpc/gen_ndr/cli_echo.c +++ b/source3/librpc/gen_ndr/cli_echo.c @@ -19,6 +19,10 @@ NTSTATUS rpccli_echo_AddOne(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, ui status = cli_do_rpc_ndr(cli, mem_ctx, PI_RPCECHO, DCERPC_ECHO_ADDONE, &r, (ndr_pull_flags_fn_t)ndr_pull_echo_AddOne, (ndr_push_flags_fn_t)ndr_push_echo_AddOne); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(echo_AddOne, &r); @@ -47,6 +51,10 @@ NTSTATUS rpccli_echo_EchoData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, status = cli_do_rpc_ndr(cli, mem_ctx, PI_RPCECHO, DCERPC_ECHO_ECHODATA, &r, (ndr_pull_flags_fn_t)ndr_pull_echo_EchoData, (ndr_push_flags_fn_t)ndr_push_echo_EchoData); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(echo_EchoData, &r); @@ -75,6 +83,10 @@ NTSTATUS rpccli_echo_SinkData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, status = cli_do_rpc_ndr(cli, mem_ctx, PI_RPCECHO, DCERPC_ECHO_SINKDATA, &r, (ndr_pull_flags_fn_t)ndr_pull_echo_SinkData, (ndr_push_flags_fn_t)ndr_push_echo_SinkData); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(echo_SinkData, &r); @@ -101,6 +113,10 @@ NTSTATUS rpccli_echo_SourceData(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx status = cli_do_rpc_ndr(cli, mem_ctx, PI_RPCECHO, DCERPC_ECHO_SOURCEDATA, &r, (ndr_pull_flags_fn_t)ndr_pull_echo_SourceData, (ndr_push_flags_fn_t)ndr_push_echo_SourceData); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(echo_SourceData, &r); @@ -128,6 +144,10 @@ NTSTATUS rpccli_echo_TestCall(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, status = cli_do_rpc_ndr(cli, mem_ctx, PI_RPCECHO, DCERPC_ECHO_TESTCALL, &r, (ndr_pull_flags_fn_t)ndr_pull_echo_TestCall, (ndr_push_flags_fn_t)ndr_push_echo_TestCall); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(echo_TestCall, &r); @@ -155,6 +175,10 @@ NTSTATUS rpccli_echo_TestCall2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, status = cli_do_rpc_ndr(cli, mem_ctx, PI_RPCECHO, DCERPC_ECHO_TESTCALL2, &r, (ndr_pull_flags_fn_t)ndr_pull_echo_TestCall2, (ndr_push_flags_fn_t)ndr_push_echo_TestCall2); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(echo_TestCall2, &r); @@ -182,6 +206,10 @@ NTSTATUS rpccli_echo_TestSleep(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, status = cli_do_rpc_ndr(cli, mem_ctx, PI_RPCECHO, DCERPC_ECHO_TESTSLEEP, &r, (ndr_pull_flags_fn_t)ndr_pull_echo_TestSleep, (ndr_push_flags_fn_t)ndr_push_echo_TestSleep); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(echo_TestSleep, &r); @@ -211,6 +239,10 @@ NTSTATUS rpccli_echo_TestEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, status = cli_do_rpc_ndr(cli, mem_ctx, PI_RPCECHO, DCERPC_ECHO_TESTENUM, &r, (ndr_pull_flags_fn_t)ndr_pull_echo_TestEnum, (ndr_push_flags_fn_t)ndr_push_echo_TestEnum); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(echo_TestEnum, &r); @@ -240,6 +272,10 @@ NTSTATUS rpccli_echo_TestSurrounding(struct rpc_pipe_client *cli, TALLOC_CTX *me status = cli_do_rpc_ndr(cli, mem_ctx, PI_RPCECHO, DCERPC_ECHO_TESTSURROUNDING, &r, (ndr_pull_flags_fn_t)ndr_pull_echo_TestSurrounding, (ndr_push_flags_fn_t)ndr_push_echo_TestSurrounding); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(echo_TestSurrounding, &r); @@ -267,6 +303,10 @@ NTSTATUS rpccli_echo_TestDoublePointer(struct rpc_pipe_client *cli, TALLOC_CTX * status = cli_do_rpc_ndr(cli, mem_ctx, PI_RPCECHO, DCERPC_ECHO_TESTDOUBLEPOINTER, &r, (ndr_pull_flags_fn_t)ndr_pull_echo_TestDoublePointer, (ndr_push_flags_fn_t)ndr_push_echo_TestDoublePointer); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(echo_TestDoublePointer, &r); diff --git a/source3/librpc/gen_ndr/cli_eventlog.c b/source3/librpc/gen_ndr/cli_eventlog.c index 18ec6a065c..8608816b20 100644 --- a/source3/librpc/gen_ndr/cli_eventlog.c +++ b/source3/librpc/gen_ndr/cli_eventlog.c @@ -20,6 +20,10 @@ NTSTATUS rpccli_eventlog_ClearEventLogW(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_EVENTLOG, DCERPC_EVENTLOG_CLEAREVENTLOGW, &r, (ndr_pull_flags_fn_t)ndr_pull_eventlog_ClearEventLogW, (ndr_push_flags_fn_t)ndr_push_eventlog_ClearEventLogW); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(eventlog_ClearEventLogW, &r); @@ -45,6 +49,10 @@ NTSTATUS rpccli_eventlog_BackupEventLogW(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_EVENTLOG, DCERPC_EVENTLOG_BACKUPEVENTLOGW, &r, (ndr_pull_flags_fn_t)ndr_pull_eventlog_BackupEventLogW, (ndr_push_flags_fn_t)ndr_push_eventlog_BackupEventLogW); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(eventlog_BackupEventLogW, &r); @@ -71,6 +79,10 @@ NTSTATUS rpccli_eventlog_CloseEventLog(struct rpc_pipe_client *cli, TALLOC_CTX * status = cli_do_rpc_ndr(cli, mem_ctx, PI_EVENTLOG, DCERPC_EVENTLOG_CLOSEEVENTLOG, &r, (ndr_pull_flags_fn_t)ndr_pull_eventlog_CloseEventLog, (ndr_push_flags_fn_t)ndr_push_eventlog_CloseEventLog); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(eventlog_CloseEventLog, &r); @@ -97,6 +109,10 @@ NTSTATUS rpccli_eventlog_DeregisterEventSource(struct rpc_pipe_client *cli, TALL status = cli_do_rpc_ndr(cli, mem_ctx, PI_EVENTLOG, DCERPC_EVENTLOG_DEREGISTEREVENTSOURCE, &r, (ndr_pull_flags_fn_t)ndr_pull_eventlog_DeregisterEventSource, (ndr_push_flags_fn_t)ndr_push_eventlog_DeregisterEventSource); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(eventlog_DeregisterEventSource, &r); @@ -123,6 +139,10 @@ NTSTATUS rpccli_eventlog_GetNumRecords(struct rpc_pipe_client *cli, TALLOC_CTX * status = cli_do_rpc_ndr(cli, mem_ctx, PI_EVENTLOG, DCERPC_EVENTLOG_GETNUMRECORDS, &r, (ndr_pull_flags_fn_t)ndr_pull_eventlog_GetNumRecords, (ndr_push_flags_fn_t)ndr_push_eventlog_GetNumRecords); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(eventlog_GetNumRecords, &r); @@ -149,6 +169,10 @@ NTSTATUS rpccli_eventlog_GetOldestRecord(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_EVENTLOG, DCERPC_EVENTLOG_GETOLDESTRECORD, &r, (ndr_pull_flags_fn_t)ndr_pull_eventlog_GetOldestRecord, (ndr_push_flags_fn_t)ndr_push_eventlog_GetOldestRecord); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(eventlog_GetOldestRecord, &r); @@ -174,6 +198,10 @@ NTSTATUS rpccli_eventlog_ChangeNotify(struct rpc_pipe_client *cli, TALLOC_CTX *m status = cli_do_rpc_ndr(cli, mem_ctx, PI_EVENTLOG, DCERPC_EVENTLOG_CHANGENOTIFY, &r, (ndr_pull_flags_fn_t)ndr_pull_eventlog_ChangeNotify, (ndr_push_flags_fn_t)ndr_push_eventlog_ChangeNotify); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(eventlog_ChangeNotify, &r); @@ -204,6 +232,10 @@ NTSTATUS rpccli_eventlog_OpenEventLogW(struct rpc_pipe_client *cli, TALLOC_CTX * status = cli_do_rpc_ndr(cli, mem_ctx, PI_EVENTLOG, DCERPC_EVENTLOG_OPENEVENTLOGW, &r, (ndr_pull_flags_fn_t)ndr_pull_eventlog_OpenEventLogW, (ndr_push_flags_fn_t)ndr_push_eventlog_OpenEventLogW); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(eventlog_OpenEventLogW, &r); @@ -230,6 +262,10 @@ NTSTATUS rpccli_eventlog_RegisterEventSourceW(struct rpc_pipe_client *cli, TALLO status = cli_do_rpc_ndr(cli, mem_ctx, PI_EVENTLOG, DCERPC_EVENTLOG_REGISTEREVENTSOURCEW, &r, (ndr_pull_flags_fn_t)ndr_pull_eventlog_RegisterEventSourceW, (ndr_push_flags_fn_t)ndr_push_eventlog_RegisterEventSourceW); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(eventlog_RegisterEventSourceW, &r); @@ -255,6 +291,10 @@ NTSTATUS rpccli_eventlog_OpenBackupEventLogW(struct rpc_pipe_client *cli, TALLOC status = cli_do_rpc_ndr(cli, mem_ctx, PI_EVENTLOG, DCERPC_EVENTLOG_OPENBACKUPEVENTLOGW, &r, (ndr_pull_flags_fn_t)ndr_pull_eventlog_OpenBackupEventLogW, (ndr_push_flags_fn_t)ndr_push_eventlog_OpenBackupEventLogW); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(eventlog_OpenBackupEventLogW, &r); @@ -284,6 +324,10 @@ NTSTATUS rpccli_eventlog_ReadEventLogW(struct rpc_pipe_client *cli, TALLOC_CTX * status = cli_do_rpc_ndr(cli, mem_ctx, PI_EVENTLOG, DCERPC_EVENTLOG_READEVENTLOGW, &r, (ndr_pull_flags_fn_t)ndr_pull_eventlog_ReadEventLogW, (ndr_push_flags_fn_t)ndr_push_eventlog_ReadEventLogW); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(eventlog_ReadEventLogW, &r); @@ -312,6 +356,10 @@ NTSTATUS rpccli_eventlog_ReportEventW(struct rpc_pipe_client *cli, TALLOC_CTX *m status = cli_do_rpc_ndr(cli, mem_ctx, PI_EVENTLOG, DCERPC_EVENTLOG_REPORTEVENTW, &r, (ndr_pull_flags_fn_t)ndr_pull_eventlog_ReportEventW, (ndr_push_flags_fn_t)ndr_push_eventlog_ReportEventW); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(eventlog_ReportEventW, &r); @@ -337,6 +385,10 @@ NTSTATUS rpccli_eventlog_ClearEventLogA(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_EVENTLOG, DCERPC_EVENTLOG_CLEAREVENTLOGA, &r, (ndr_pull_flags_fn_t)ndr_pull_eventlog_ClearEventLogA, (ndr_push_flags_fn_t)ndr_push_eventlog_ClearEventLogA); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(eventlog_ClearEventLogA, &r); @@ -362,6 +414,10 @@ NTSTATUS rpccli_eventlog_BackupEventLogA(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_EVENTLOG, DCERPC_EVENTLOG_BACKUPEVENTLOGA, &r, (ndr_pull_flags_fn_t)ndr_pull_eventlog_BackupEventLogA, (ndr_push_flags_fn_t)ndr_push_eventlog_BackupEventLogA); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(eventlog_BackupEventLogA, &r); @@ -387,6 +443,10 @@ NTSTATUS rpccli_eventlog_OpenEventLogA(struct rpc_pipe_client *cli, TALLOC_CTX * status = cli_do_rpc_ndr(cli, mem_ctx, PI_EVENTLOG, DCERPC_EVENTLOG_OPENEVENTLOGA, &r, (ndr_pull_flags_fn_t)ndr_pull_eventlog_OpenEventLogA, (ndr_push_flags_fn_t)ndr_push_eventlog_OpenEventLogA); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(eventlog_OpenEventLogA, &r); @@ -412,6 +472,10 @@ NTSTATUS rpccli_eventlog_RegisterEventSourceA(struct rpc_pipe_client *cli, TALLO status = cli_do_rpc_ndr(cli, mem_ctx, PI_EVENTLOG, DCERPC_EVENTLOG_REGISTEREVENTSOURCEA, &r, (ndr_pull_flags_fn_t)ndr_pull_eventlog_RegisterEventSourceA, (ndr_push_flags_fn_t)ndr_push_eventlog_RegisterEventSourceA); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(eventlog_RegisterEventSourceA, &r); @@ -437,6 +501,10 @@ NTSTATUS rpccli_eventlog_OpenBackupEventLogA(struct rpc_pipe_client *cli, TALLOC status = cli_do_rpc_ndr(cli, mem_ctx, PI_EVENTLOG, DCERPC_EVENTLOG_OPENBACKUPEVENTLOGA, &r, (ndr_pull_flags_fn_t)ndr_pull_eventlog_OpenBackupEventLogA, (ndr_push_flags_fn_t)ndr_push_eventlog_OpenBackupEventLogA); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(eventlog_OpenBackupEventLogA, &r); @@ -462,6 +530,10 @@ NTSTATUS rpccli_eventlog_ReadEventLogA(struct rpc_pipe_client *cli, TALLOC_CTX * status = cli_do_rpc_ndr(cli, mem_ctx, PI_EVENTLOG, DCERPC_EVENTLOG_READEVENTLOGA, &r, (ndr_pull_flags_fn_t)ndr_pull_eventlog_ReadEventLogA, (ndr_push_flags_fn_t)ndr_push_eventlog_ReadEventLogA); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(eventlog_ReadEventLogA, &r); @@ -487,6 +559,10 @@ NTSTATUS rpccli_eventlog_ReportEventA(struct rpc_pipe_client *cli, TALLOC_CTX *m status = cli_do_rpc_ndr(cli, mem_ctx, PI_EVENTLOG, DCERPC_EVENTLOG_REPORTEVENTA, &r, (ndr_pull_flags_fn_t)ndr_pull_eventlog_ReportEventA, (ndr_push_flags_fn_t)ndr_push_eventlog_ReportEventA); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(eventlog_ReportEventA, &r); @@ -512,6 +588,10 @@ NTSTATUS rpccli_eventlog_RegisterClusterSvc(struct rpc_pipe_client *cli, TALLOC_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_EVENTLOG, DCERPC_EVENTLOG_REGISTERCLUSTERSVC, &r, (ndr_pull_flags_fn_t)ndr_pull_eventlog_RegisterClusterSvc, (ndr_push_flags_fn_t)ndr_push_eventlog_RegisterClusterSvc); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(eventlog_RegisterClusterSvc, &r); @@ -537,6 +617,10 @@ NTSTATUS rpccli_eventlog_DeregisterClusterSvc(struct rpc_pipe_client *cli, TALLO status = cli_do_rpc_ndr(cli, mem_ctx, PI_EVENTLOG, DCERPC_EVENTLOG_DEREGISTERCLUSTERSVC, &r, (ndr_pull_flags_fn_t)ndr_pull_eventlog_DeregisterClusterSvc, (ndr_push_flags_fn_t)ndr_push_eventlog_DeregisterClusterSvc); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(eventlog_DeregisterClusterSvc, &r); @@ -562,6 +646,10 @@ NTSTATUS rpccli_eventlog_WriteClusterEvents(struct rpc_pipe_client *cli, TALLOC_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_EVENTLOG, DCERPC_EVENTLOG_WRITECLUSTEREVENTS, &r, (ndr_pull_flags_fn_t)ndr_pull_eventlog_WriteClusterEvents, (ndr_push_flags_fn_t)ndr_push_eventlog_WriteClusterEvents); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(eventlog_WriteClusterEvents, &r); @@ -587,6 +675,10 @@ NTSTATUS rpccli_eventlog_GetLogIntormation(struct rpc_pipe_client *cli, TALLOC_C status = cli_do_rpc_ndr(cli, mem_ctx, PI_EVENTLOG, DCERPC_EVENTLOG_GETLOGINTORMATION, &r, (ndr_pull_flags_fn_t)ndr_pull_eventlog_GetLogIntormation, (ndr_push_flags_fn_t)ndr_push_eventlog_GetLogIntormation); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(eventlog_GetLogIntormation, &r); @@ -613,6 +705,10 @@ NTSTATUS rpccli_eventlog_FlushEventLog(struct rpc_pipe_client *cli, TALLOC_CTX * status = cli_do_rpc_ndr(cli, mem_ctx, PI_EVENTLOG, DCERPC_EVENTLOG_FLUSHEVENTLOG, &r, (ndr_pull_flags_fn_t)ndr_pull_eventlog_FlushEventLog, (ndr_push_flags_fn_t)ndr_push_eventlog_FlushEventLog); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(eventlog_FlushEventLog, &r); diff --git a/source3/librpc/gen_ndr/cli_initshutdown.c b/source3/librpc/gen_ndr/cli_initshutdown.c index 689c639838..02a4f9ad0a 100644 --- a/source3/librpc/gen_ndr/cli_initshutdown.c +++ b/source3/librpc/gen_ndr/cli_initshutdown.c @@ -23,6 +23,10 @@ NTSTATUS rpccli_initshutdown_Init(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c status = cli_do_rpc_ndr(cli, mem_ctx, PI_INITSHUTDOWN, DCERPC_INITSHUTDOWN_INIT, &r, (ndr_pull_flags_fn_t)ndr_pull_initshutdown_Init, (ndr_push_flags_fn_t)ndr_push_initshutdown_Init); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(initshutdown_Init, &r); @@ -49,6 +53,10 @@ NTSTATUS rpccli_initshutdown_Abort(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_INITSHUTDOWN, DCERPC_INITSHUTDOWN_ABORT, &r, (ndr_pull_flags_fn_t)ndr_pull_initshutdown_Abort, (ndr_push_flags_fn_t)ndr_push_initshutdown_Abort); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(initshutdown_Abort, &r); @@ -80,6 +88,10 @@ NTSTATUS rpccli_initshutdown_InitEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem status = cli_do_rpc_ndr(cli, mem_ctx, PI_INITSHUTDOWN, DCERPC_INITSHUTDOWN_INITEX, &r, (ndr_pull_flags_fn_t)ndr_pull_initshutdown_InitEx, (ndr_push_flags_fn_t)ndr_push_initshutdown_InitEx); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(initshutdown_InitEx, &r); diff --git a/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c index e7be9032e5..063b78f7f6 100644 --- a/source3/librpc/gen_ndr/cli_lsa.c +++ b/source3/librpc/gen_ndr/cli_lsa.c @@ -19,6 +19,10 @@ NTSTATUS rpccli_lsa_Close(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, stru status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CLOSE, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_Close, (ndr_push_flags_fn_t)ndr_push_lsa_Close); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_Close, &r); @@ -46,6 +50,10 @@ NTSTATUS rpccli_lsa_Delete(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, str status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_DELETE, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_Delete, (ndr_push_flags_fn_t)ndr_push_lsa_Delete); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_Delete, &r); @@ -74,6 +82,10 @@ NTSTATUS rpccli_lsa_EnumPrivs(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_ENUMPRIVS, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_EnumPrivs, (ndr_push_flags_fn_t)ndr_push_lsa_EnumPrivs); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_EnumPrivs, &r); @@ -103,6 +115,10 @@ NTSTATUS rpccli_lsa_QuerySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_QUERYSECURITY, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_QuerySecurity, (ndr_push_flags_fn_t)ndr_push_lsa_QuerySecurity); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_QuerySecurity, &r); @@ -111,7 +127,9 @@ NTSTATUS rpccli_lsa_QuerySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c } /* Return variables */ - *sdbuf = *r.out.sdbuf; + if ( sdbuf ) { + *sdbuf = *r.out.sdbuf; + } /* Return result */ return r.out.result; @@ -129,6 +147,10 @@ NTSTATUS rpccli_lsa_SetSecObj(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_SETSECOBJ, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_SetSecObj, (ndr_push_flags_fn_t)ndr_push_lsa_SetSecObj); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_SetSecObj, &r); @@ -154,6 +176,10 @@ NTSTATUS rpccli_lsa_ChangePassword(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CHANGEPASSWORD, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_ChangePassword, (ndr_push_flags_fn_t)ndr_push_lsa_ChangePassword); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_ChangePassword, &r); @@ -182,6 +208,10 @@ NTSTATUS rpccli_lsa_OpenPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_OPENPOLICY, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_OpenPolicy, (ndr_push_flags_fn_t)ndr_push_lsa_OpenPolicy); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_OpenPolicy, &r); @@ -210,6 +240,10 @@ NTSTATUS rpccli_lsa_QueryInfoPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_QUERYINFOPOLICY, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_QueryInfoPolicy, (ndr_push_flags_fn_t)ndr_push_lsa_QueryInfoPolicy); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_QueryInfoPolicy, &r); @@ -218,7 +252,9 @@ NTSTATUS rpccli_lsa_QueryInfoPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem } /* Return variables */ - *info = *r.out.info; + if ( info ) { + *info = *r.out.info; + } /* Return result */ return r.out.result; @@ -236,6 +272,10 @@ NTSTATUS rpccli_lsa_SetInfoPolicy(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_SETINFOPOLICY, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_SetInfoPolicy, (ndr_push_flags_fn_t)ndr_push_lsa_SetInfoPolicy); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_SetInfoPolicy, &r); @@ -261,6 +301,10 @@ NTSTATUS rpccli_lsa_ClearAuditLog(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CLEARAUDITLOG, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_ClearAuditLog, (ndr_push_flags_fn_t)ndr_push_lsa_ClearAuditLog); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_ClearAuditLog, &r); @@ -289,6 +333,10 @@ NTSTATUS rpccli_lsa_CreateAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CREATEACCOUNT, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CreateAccount, (ndr_push_flags_fn_t)ndr_push_lsa_CreateAccount); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_CreateAccount, &r); @@ -318,6 +366,10 @@ NTSTATUS rpccli_lsa_EnumAccounts(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_ENUMACCOUNTS, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_EnumAccounts, (ndr_push_flags_fn_t)ndr_push_lsa_EnumAccounts); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_EnumAccounts, &r); @@ -348,6 +400,10 @@ NTSTATUS rpccli_lsa_CreateTrustedDomain(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CREATETRUSTEDDOMAIN, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CreateTrustedDomain, (ndr_push_flags_fn_t)ndr_push_lsa_CreateTrustedDomain); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomain, &r); @@ -377,6 +433,10 @@ NTSTATUS rpccli_lsa_EnumTrustDom(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_ENUMTRUSTDOM, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_EnumTrustDom, (ndr_push_flags_fn_t)ndr_push_lsa_EnumTrustDom); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_EnumTrustDom, &r); @@ -410,6 +470,10 @@ NTSTATUS rpccli_lsa_LookupNames(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LOOKUPNAMES, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LookupNames, (ndr_push_flags_fn_t)ndr_push_lsa_LookupNames); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_LookupNames, &r); @@ -418,7 +482,9 @@ NTSTATUS rpccli_lsa_LookupNames(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx } /* Return variables */ - *domains = *r.out.domains; + if ( domains ) { + *domains = *r.out.domains; + } *sids = *r.out.sids; *count = *r.out.count; @@ -443,6 +509,10 @@ NTSTATUS rpccli_lsa_LookupSids(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LOOKUPSIDS, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LookupSids, (ndr_push_flags_fn_t)ndr_push_lsa_LookupSids); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_LookupSids, &r); @@ -451,7 +521,9 @@ NTSTATUS rpccli_lsa_LookupSids(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, } /* Return variables */ - *domains = *r.out.domains; + if ( domains ) { + *domains = *r.out.domains; + } *names = *r.out.names; *count = *r.out.count; @@ -474,6 +546,10 @@ NTSTATUS rpccli_lsa_CreateSecret(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CREATESECRET, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CreateSecret, (ndr_push_flags_fn_t)ndr_push_lsa_CreateSecret); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_CreateSecret, &r); @@ -503,6 +579,10 @@ NTSTATUS rpccli_lsa_OpenAccount(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_OPENACCOUNT, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_OpenAccount, (ndr_push_flags_fn_t)ndr_push_lsa_OpenAccount); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_OpenAccount, &r); @@ -530,6 +610,10 @@ NTSTATUS rpccli_lsa_EnumPrivsAccount(struct rpc_pipe_client *cli, TALLOC_CTX *me status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_ENUMPRIVSACCOUNT, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_EnumPrivsAccount, (ndr_push_flags_fn_t)ndr_push_lsa_EnumPrivsAccount); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_EnumPrivsAccount, &r); @@ -538,7 +622,9 @@ NTSTATUS rpccli_lsa_EnumPrivsAccount(struct rpc_pipe_client *cli, TALLOC_CTX *me } /* Return variables */ - *privs = *r.out.privs; + if ( privs ) { + *privs = *r.out.privs; + } /* Return result */ return r.out.result; @@ -558,6 +644,10 @@ NTSTATUS rpccli_lsa_AddPrivilegesToAccount(struct rpc_pipe_client *cli, TALLOC_C status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_ADDPRIVILEGESTOACCOUNT, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_AddPrivilegesToAccount, (ndr_push_flags_fn_t)ndr_push_lsa_AddPrivilegesToAccount); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_AddPrivilegesToAccount, &r); @@ -586,6 +676,10 @@ NTSTATUS rpccli_lsa_RemovePrivilegesFromAccount(struct rpc_pipe_client *cli, TAL status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_REMOVEPRIVILEGESFROMACCOUNT, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_RemovePrivilegesFromAccount, (ndr_push_flags_fn_t)ndr_push_lsa_RemovePrivilegesFromAccount); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_RemovePrivilegesFromAccount, &r); @@ -611,6 +705,10 @@ NTSTATUS rpccli_lsa_GetQuotasForAccount(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_GETQUOTASFORACCOUNT, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_GetQuotasForAccount, (ndr_push_flags_fn_t)ndr_push_lsa_GetQuotasForAccount); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_GetQuotasForAccount, &r); @@ -636,6 +734,10 @@ NTSTATUS rpccli_lsa_SetQuotasForAccount(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_SETQUOTASFORACCOUNT, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_SetQuotasForAccount, (ndr_push_flags_fn_t)ndr_push_lsa_SetQuotasForAccount); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_SetQuotasForAccount, &r); @@ -661,6 +763,10 @@ NTSTATUS rpccli_lsa_GetSystemAccessAccount(struct rpc_pipe_client *cli, TALLOC_C status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_GETSYSTEMACCESSACCOUNT, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_GetSystemAccessAccount, (ndr_push_flags_fn_t)ndr_push_lsa_GetSystemAccessAccount); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_GetSystemAccessAccount, &r); @@ -686,6 +792,10 @@ NTSTATUS rpccli_lsa_SetSystemAccessAccount(struct rpc_pipe_client *cli, TALLOC_C status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_SETSYSTEMACCESSACCOUNT, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_SetSystemAccessAccount, (ndr_push_flags_fn_t)ndr_push_lsa_SetSystemAccessAccount); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_SetSystemAccessAccount, &r); @@ -714,6 +824,10 @@ NTSTATUS rpccli_lsa_OpenTrustedDomain(struct rpc_pipe_client *cli, TALLOC_CTX *m status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_OPENTRUSTEDDOMAIN, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_OpenTrustedDomain, (ndr_push_flags_fn_t)ndr_push_lsa_OpenTrustedDomain); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_OpenTrustedDomain, &r); @@ -742,6 +856,10 @@ NTSTATUS rpccli_lsa_QueryTrustedDomainInfo(struct rpc_pipe_client *cli, TALLOC_C status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_QUERYTRUSTEDDOMAININFO, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_QueryTrustedDomainInfo, (ndr_push_flags_fn_t)ndr_push_lsa_QueryTrustedDomainInfo); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_QueryTrustedDomainInfo, &r); @@ -750,7 +868,9 @@ NTSTATUS rpccli_lsa_QueryTrustedDomainInfo(struct rpc_pipe_client *cli, TALLOC_C } /* Return variables */ - *info = *r.out.info; + if ( info ) { + *info = *r.out.info; + } /* Return result */ return r.out.result; @@ -768,6 +888,10 @@ NTSTATUS rpccli_lsa_SetInformationTrustedDomain(struct rpc_pipe_client *cli, TAL status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_SETINFORMATIONTRUSTEDDOMAIN, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_SetInformationTrustedDomain, (ndr_push_flags_fn_t)ndr_push_lsa_SetInformationTrustedDomain); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_SetInformationTrustedDomain, &r); @@ -796,6 +920,10 @@ NTSTATUS rpccli_lsa_OpenSecret(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_OPENSECRET, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_OpenSecret, (ndr_push_flags_fn_t)ndr_push_lsa_OpenSecret); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_OpenSecret, &r); @@ -825,6 +953,10 @@ NTSTATUS rpccli_lsa_SetSecret(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_SETSECRET, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_SetSecret, (ndr_push_flags_fn_t)ndr_push_lsa_SetSecret); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_SetSecret, &r); @@ -855,6 +987,10 @@ NTSTATUS rpccli_lsa_QuerySecret(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_QUERYSECRET, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_QuerySecret, (ndr_push_flags_fn_t)ndr_push_lsa_QuerySecret); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_QuerySecret, &r); @@ -863,10 +999,18 @@ NTSTATUS rpccli_lsa_QuerySecret(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx } /* Return variables */ - *new_val = *r.out.new_val; - *new_mtime = *r.out.new_mtime; - *old_val = *r.out.old_val; - *old_mtime = *r.out.old_mtime; + if ( new_val ) { + *new_val = *r.out.new_val; + } + if ( new_mtime ) { + *new_mtime = *r.out.new_mtime; + } + if ( old_val ) { + *old_val = *r.out.old_val; + } + if ( old_mtime ) { + *old_mtime = *r.out.old_mtime; + } /* Return result */ return r.out.result; @@ -886,6 +1030,10 @@ NTSTATUS rpccli_lsa_LookupPrivValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LOOKUPPRIVVALUE, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LookupPrivValue, (ndr_push_flags_fn_t)ndr_push_lsa_LookupPrivValue); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_LookupPrivValue, &r); @@ -914,6 +1062,10 @@ NTSTATUS rpccli_lsa_LookupPrivName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LOOKUPPRIVNAME, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LookupPrivName, (ndr_push_flags_fn_t)ndr_push_lsa_LookupPrivName); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_LookupPrivName, &r); @@ -922,7 +1074,9 @@ NTSTATUS rpccli_lsa_LookupPrivName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ } /* Return variables */ - *name = *r.out.name; + if ( name ) { + *name = *r.out.name; + } /* Return result */ return r.out.result; @@ -944,6 +1098,10 @@ NTSTATUS rpccli_lsa_LookupPrivDisplayName(struct rpc_pipe_client *cli, TALLOC_CT status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LOOKUPPRIVDISPLAYNAME, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LookupPrivDisplayName, (ndr_push_flags_fn_t)ndr_push_lsa_LookupPrivDisplayName); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_LookupPrivDisplayName, &r); @@ -952,7 +1110,9 @@ NTSTATUS rpccli_lsa_LookupPrivDisplayName(struct rpc_pipe_client *cli, TALLOC_CT } /* Return variables */ - *disp_name = *r.out.disp_name; + if ( disp_name ) { + *disp_name = *r.out.disp_name; + } *language_id = *r.out.language_id; /* Return result */ @@ -971,6 +1131,10 @@ NTSTATUS rpccli_lsa_DeleteObject(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_DELETEOBJECT, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_DeleteObject, (ndr_push_flags_fn_t)ndr_push_lsa_DeleteObject); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_DeleteObject, &r); @@ -998,6 +1162,10 @@ NTSTATUS rpccli_lsa_EnumAccountsWithUserRight(struct rpc_pipe_client *cli, TALLO status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_ENUMACCOUNTSWITHUSERRIGHT, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_EnumAccountsWithUserRight, (ndr_push_flags_fn_t)ndr_push_lsa_EnumAccountsWithUserRight); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_EnumAccountsWithUserRight, &r); @@ -1026,6 +1194,10 @@ NTSTATUS rpccli_lsa_EnumAccountRights(struct rpc_pipe_client *cli, TALLOC_CTX *m status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_ENUMACCOUNTRIGHTS, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_EnumAccountRights, (ndr_push_flags_fn_t)ndr_push_lsa_EnumAccountRights); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_EnumAccountRights, &r); @@ -1055,6 +1227,10 @@ NTSTATUS rpccli_lsa_AddAccountRights(struct rpc_pipe_client *cli, TALLOC_CTX *me status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_ADDACCOUNTRIGHTS, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_AddAccountRights, (ndr_push_flags_fn_t)ndr_push_lsa_AddAccountRights); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_AddAccountRights, &r); @@ -1084,6 +1260,10 @@ NTSTATUS rpccli_lsa_RemoveAccountRights(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_REMOVEACCOUNTRIGHTS, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_RemoveAccountRights, (ndr_push_flags_fn_t)ndr_push_lsa_RemoveAccountRights); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_RemoveAccountRights, &r); @@ -1112,6 +1292,10 @@ NTSTATUS rpccli_lsa_QueryTrustedDomainInfoBySid(struct rpc_pipe_client *cli, TAL status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_QUERYTRUSTEDDOMAININFOBYSID, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_QueryTrustedDomainInfoBySid, (ndr_push_flags_fn_t)ndr_push_lsa_QueryTrustedDomainInfoBySid); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_QueryTrustedDomainInfoBySid, &r); @@ -1120,7 +1304,9 @@ NTSTATUS rpccli_lsa_QueryTrustedDomainInfoBySid(struct rpc_pipe_client *cli, TAL } /* Return variables */ - *info = *r.out.info; + if ( info ) { + *info = *r.out.info; + } /* Return result */ return r.out.result; @@ -1138,6 +1324,10 @@ NTSTATUS rpccli_lsa_SetTrustedDomainInfo(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_SETTRUSTEDDOMAININFO, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_SetTrustedDomainInfo, (ndr_push_flags_fn_t)ndr_push_lsa_SetTrustedDomainInfo); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_SetTrustedDomainInfo, &r); @@ -1165,6 +1355,10 @@ NTSTATUS rpccli_lsa_DeleteTrustedDomain(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_DELETETRUSTEDDOMAIN, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_DeleteTrustedDomain, (ndr_push_flags_fn_t)ndr_push_lsa_DeleteTrustedDomain); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_DeleteTrustedDomain, &r); @@ -1190,6 +1384,10 @@ NTSTATUS rpccli_lsa_StorePrivateData(struct rpc_pipe_client *cli, TALLOC_CTX *me status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_STOREPRIVATEDATA, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_StorePrivateData, (ndr_push_flags_fn_t)ndr_push_lsa_StorePrivateData); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_StorePrivateData, &r); @@ -1215,6 +1413,10 @@ NTSTATUS rpccli_lsa_RetrievePrivateData(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_RETRIEVEPRIVATEDATA, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_RetrievePrivateData, (ndr_push_flags_fn_t)ndr_push_lsa_RetrievePrivateData); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_RetrievePrivateData, &r); @@ -1243,6 +1445,10 @@ NTSTATUS rpccli_lsa_OpenPolicy2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_OPENPOLICY2, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_OpenPolicy2, (ndr_push_flags_fn_t)ndr_push_lsa_OpenPolicy2); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_OpenPolicy2, &r); @@ -1272,6 +1478,10 @@ NTSTATUS rpccli_lsa_GetUserName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_GETUSERNAME, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_GetUserName, (ndr_push_flags_fn_t)ndr_push_lsa_GetUserName); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_GetUserName, &r); @@ -1280,8 +1490,12 @@ NTSTATUS rpccli_lsa_GetUserName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx } /* Return variables */ - *account_name = *r.out.account_name; - *authority_name = *r.out.authority_name; + if ( account_name ) { + *account_name = *r.out.account_name; + } + if ( authority_name ) { + *authority_name = *r.out.authority_name; + } /* Return result */ return r.out.result; @@ -1301,6 +1515,10 @@ NTSTATUS rpccli_lsa_QueryInfoPolicy2(struct rpc_pipe_client *cli, TALLOC_CTX *me status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_QUERYINFOPOLICY2, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_QueryInfoPolicy2, (ndr_push_flags_fn_t)ndr_push_lsa_QueryInfoPolicy2); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_QueryInfoPolicy2, &r); @@ -1309,7 +1527,9 @@ NTSTATUS rpccli_lsa_QueryInfoPolicy2(struct rpc_pipe_client *cli, TALLOC_CTX *me } /* Return variables */ - *info = *r.out.info; + if ( info ) { + *info = *r.out.info; + } /* Return result */ return r.out.result; @@ -1327,6 +1547,10 @@ NTSTATUS rpccli_lsa_SetInfoPolicy2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_SETINFOPOLICY2, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_SetInfoPolicy2, (ndr_push_flags_fn_t)ndr_push_lsa_SetInfoPolicy2); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_SetInfoPolicy2, &r); @@ -1355,6 +1579,10 @@ NTSTATUS rpccli_lsa_QueryTrustedDomainInfoByName(struct rpc_pipe_client *cli, TA status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_QUERYTRUSTEDDOMAININFOBYNAME, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_QueryTrustedDomainInfoByName, (ndr_push_flags_fn_t)ndr_push_lsa_QueryTrustedDomainInfoByName); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_QueryTrustedDomainInfoByName, &r); @@ -1363,7 +1591,9 @@ NTSTATUS rpccli_lsa_QueryTrustedDomainInfoByName(struct rpc_pipe_client *cli, TA } /* Return variables */ - *info = *r.out.info; + if ( info ) { + *info = *r.out.info; + } /* Return result */ return r.out.result; @@ -1385,6 +1615,10 @@ NTSTATUS rpccli_lsa_SetTrustedDomainInfoByName(struct rpc_pipe_client *cli, TALL status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_SETTRUSTEDDOMAININFOBYNAME, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_SetTrustedDomainInfoByName, (ndr_push_flags_fn_t)ndr_push_lsa_SetTrustedDomainInfoByName); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_SetTrustedDomainInfoByName, &r); @@ -1413,6 +1647,10 @@ NTSTATUS rpccli_lsa_EnumTrustedDomainsEx(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_ENUMTRUSTEDDOMAINSEX, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_EnumTrustedDomainsEx, (ndr_push_flags_fn_t)ndr_push_lsa_EnumTrustedDomainsEx); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_EnumTrustedDomainsEx, &r); @@ -1440,6 +1678,10 @@ NTSTATUS rpccli_lsa_CreateTrustedDomainEx(struct rpc_pipe_client *cli, TALLOC_CT status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CREATETRUSTEDDOMAINEX, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CreateTrustedDomainEx, (ndr_push_flags_fn_t)ndr_push_lsa_CreateTrustedDomainEx); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomainEx, &r); @@ -1466,6 +1708,10 @@ NTSTATUS rpccli_lsa_CloseTrustedDomainEx(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CLOSETRUSTEDDOMAINEX, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CloseTrustedDomainEx, (ndr_push_flags_fn_t)ndr_push_lsa_CloseTrustedDomainEx); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_CloseTrustedDomainEx, &r); @@ -1494,6 +1740,10 @@ NTSTATUS rpccli_lsa_QueryDomainInformationPolicy(struct rpc_pipe_client *cli, TA status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_QUERYDOMAININFORMATIONPOLICY, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_QueryDomainInformationPolicy, (ndr_push_flags_fn_t)ndr_push_lsa_QueryDomainInformationPolicy); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_QueryDomainInformationPolicy, &r); @@ -1502,7 +1752,9 @@ NTSTATUS rpccli_lsa_QueryDomainInformationPolicy(struct rpc_pipe_client *cli, TA } /* Return variables */ - *info = *r.out.info; + if ( info ) { + *info = *r.out.info; + } /* Return result */ return r.out.result; @@ -1523,6 +1775,10 @@ NTSTATUS rpccli_lsa_SetDomainInformationPolicy(struct rpc_pipe_client *cli, TALL status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_SETDOMAININFORMATIONPOLICY, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_SetDomainInformationPolicy, (ndr_push_flags_fn_t)ndr_push_lsa_SetDomainInformationPolicy); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_SetDomainInformationPolicy, &r); @@ -1551,6 +1807,10 @@ NTSTATUS rpccli_lsa_OpenTrustedDomainByName(struct rpc_pipe_client *cli, TALLOC_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_OPENTRUSTEDDOMAINBYNAME, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_OpenTrustedDomainByName, (ndr_push_flags_fn_t)ndr_push_lsa_OpenTrustedDomainByName); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_OpenTrustedDomainByName, &r); @@ -1577,6 +1837,10 @@ NTSTATUS rpccli_lsa_TestCall(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_TESTCALL, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_TestCall, (ndr_push_flags_fn_t)ndr_push_lsa_TestCall); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_TestCall, &r); @@ -1609,6 +1873,10 @@ NTSTATUS rpccli_lsa_LookupSids2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LOOKUPSIDS2, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LookupSids2, (ndr_push_flags_fn_t)ndr_push_lsa_LookupSids2); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_LookupSids2, &r); @@ -1617,7 +1885,9 @@ NTSTATUS rpccli_lsa_LookupSids2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx } /* Return variables */ - *domains = *r.out.domains; + if ( domains ) { + *domains = *r.out.domains; + } *names = *r.out.names; *count = *r.out.count; @@ -1645,6 +1915,10 @@ NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LOOKUPNAMES2, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LookupNames2, (ndr_push_flags_fn_t)ndr_push_lsa_LookupNames2); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_LookupNames2, &r); @@ -1653,7 +1927,9 @@ NTSTATUS rpccli_lsa_LookupNames2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct } /* Return variables */ - *domains = *r.out.domains; + if ( domains ) { + *domains = *r.out.domains; + } *sids = *r.out.sids; *count = *r.out.count; @@ -1673,6 +1949,10 @@ NTSTATUS rpccli_lsa_CreateTrustedDomainEx2(struct rpc_pipe_client *cli, TALLOC_C status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CREATETRUSTEDDOMAINEX2, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CreateTrustedDomainEx2, (ndr_push_flags_fn_t)ndr_push_lsa_CreateTrustedDomainEx2); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_CreateTrustedDomainEx2, &r); @@ -1698,6 +1978,10 @@ NTSTATUS rpccli_lsa_CREDRWRITE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CREDRWRITE, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CREDRWRITE, (ndr_push_flags_fn_t)ndr_push_lsa_CREDRWRITE); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_CREDRWRITE, &r); @@ -1723,6 +2007,10 @@ NTSTATUS rpccli_lsa_CREDRREAD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx) status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CREDRREAD, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CREDRREAD, (ndr_push_flags_fn_t)ndr_push_lsa_CREDRREAD); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_CREDRREAD, &r); @@ -1748,6 +2036,10 @@ NTSTATUS rpccli_lsa_CREDRENUMERATE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CREDRENUMERATE, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CREDRENUMERATE, (ndr_push_flags_fn_t)ndr_push_lsa_CREDRENUMERATE); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_CREDRENUMERATE, &r); @@ -1773,6 +2065,10 @@ NTSTATUS rpccli_lsa_CREDRWRITEDOMAINCREDENTIALS(struct rpc_pipe_client *cli, TAL status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CREDRWRITEDOMAINCREDENTIALS, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CREDRWRITEDOMAINCREDENTIALS, (ndr_push_flags_fn_t)ndr_push_lsa_CREDRWRITEDOMAINCREDENTIALS); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_CREDRWRITEDOMAINCREDENTIALS, &r); @@ -1798,6 +2094,10 @@ NTSTATUS rpccli_lsa_CREDRREADDOMAINCREDENTIALS(struct rpc_pipe_client *cli, TALL status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CREDRREADDOMAINCREDENTIALS, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CREDRREADDOMAINCREDENTIALS, (ndr_push_flags_fn_t)ndr_push_lsa_CREDRREADDOMAINCREDENTIALS); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_CREDRREADDOMAINCREDENTIALS, &r); @@ -1823,6 +2123,10 @@ NTSTATUS rpccli_lsa_CREDRDELETE(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CREDRDELETE, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CREDRDELETE, (ndr_push_flags_fn_t)ndr_push_lsa_CREDRDELETE); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_CREDRDELETE, &r); @@ -1848,6 +2152,10 @@ NTSTATUS rpccli_lsa_CREDRGETTARGETINFO(struct rpc_pipe_client *cli, TALLOC_CTX * status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CREDRGETTARGETINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CREDRGETTARGETINFO, (ndr_push_flags_fn_t)ndr_push_lsa_CREDRGETTARGETINFO); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_CREDRGETTARGETINFO, &r); @@ -1873,6 +2181,10 @@ NTSTATUS rpccli_lsa_CREDRPROFILELOADED(struct rpc_pipe_client *cli, TALLOC_CTX * status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CREDRPROFILELOADED, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CREDRPROFILELOADED, (ndr_push_flags_fn_t)ndr_push_lsa_CREDRPROFILELOADED); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_CREDRPROFILELOADED, &r); @@ -1906,6 +2218,10 @@ NTSTATUS rpccli_lsa_LookupNames3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LOOKUPNAMES3, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LookupNames3, (ndr_push_flags_fn_t)ndr_push_lsa_LookupNames3); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_LookupNames3, &r); @@ -1914,7 +2230,9 @@ NTSTATUS rpccli_lsa_LookupNames3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct } /* Return variables */ - *domains = *r.out.domains; + if ( domains ) { + *domains = *r.out.domains; + } *sids = *r.out.sids; *count = *r.out.count; @@ -1934,6 +2252,10 @@ NTSTATUS rpccli_lsa_CREDRGETSESSIONTYPES(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CREDRGETSESSIONTYPES, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CREDRGETSESSIONTYPES, (ndr_push_flags_fn_t)ndr_push_lsa_CREDRGETSESSIONTYPES); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_CREDRGETSESSIONTYPES, &r); @@ -1959,6 +2281,10 @@ NTSTATUS rpccli_lsa_LSARREGISTERAUDITEVENT(struct rpc_pipe_client *cli, TALLOC_C status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LSARREGISTERAUDITEVENT, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LSARREGISTERAUDITEVENT, (ndr_push_flags_fn_t)ndr_push_lsa_LSARREGISTERAUDITEVENT); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_LSARREGISTERAUDITEVENT, &r); @@ -1984,6 +2310,10 @@ NTSTATUS rpccli_lsa_LSARGENAUDITEVENT(struct rpc_pipe_client *cli, TALLOC_CTX *m status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LSARGENAUDITEVENT, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LSARGENAUDITEVENT, (ndr_push_flags_fn_t)ndr_push_lsa_LSARGENAUDITEVENT); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_LSARGENAUDITEVENT, &r); @@ -2009,6 +2339,10 @@ NTSTATUS rpccli_lsa_LSARUNREGISTERAUDITEVENT(struct rpc_pipe_client *cli, TALLOC status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LSARUNREGISTERAUDITEVENT, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LSARUNREGISTERAUDITEVENT, (ndr_push_flags_fn_t)ndr_push_lsa_LSARUNREGISTERAUDITEVENT); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_LSARUNREGISTERAUDITEVENT, &r); @@ -2034,6 +2368,10 @@ NTSTATUS rpccli_lsa_LSARQUERYFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LSARQUERYFORESTTRUSTINFORMATION, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LSARQUERYFORESTTRUSTINFORMATION, (ndr_push_flags_fn_t)ndr_push_lsa_LSARQUERYFORESTTRUSTINFORMATION); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_LSARQUERYFORESTTRUSTINFORMATION, &r); @@ -2059,6 +2397,10 @@ NTSTATUS rpccli_lsa_LSARSETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, T status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LSARSETFORESTTRUSTINFORMATION, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LSARSETFORESTTRUSTINFORMATION, (ndr_push_flags_fn_t)ndr_push_lsa_LSARSETFORESTTRUSTINFORMATION); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_LSARSETFORESTTRUSTINFORMATION, &r); @@ -2084,6 +2426,10 @@ NTSTATUS rpccli_lsa_CREDRRENAME(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_CREDRRENAME, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_CREDRRENAME, (ndr_push_flags_fn_t)ndr_push_lsa_CREDRRENAME); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_CREDRRENAME, &r); @@ -2115,6 +2461,10 @@ NTSTATUS rpccli_lsa_LookupSids3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LOOKUPSIDS3, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LookupSids3, (ndr_push_flags_fn_t)ndr_push_lsa_LookupSids3); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_LookupSids3, &r); @@ -2123,7 +2473,9 @@ NTSTATUS rpccli_lsa_LookupSids3(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx } /* Return variables */ - *domains = *r.out.domains; + if ( domains ) { + *domains = *r.out.domains; + } *names = *r.out.names; *count = *r.out.count; @@ -2150,6 +2502,10 @@ NTSTATUS rpccli_lsa_LookupNames4(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LOOKUPNAMES4, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LookupNames4, (ndr_push_flags_fn_t)ndr_push_lsa_LookupNames4); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_LookupNames4, &r); @@ -2158,7 +2514,9 @@ NTSTATUS rpccli_lsa_LookupNames4(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct } /* Return variables */ - *domains = *r.out.domains; + if ( domains ) { + *domains = *r.out.domains; + } *sids = *r.out.sids; *count = *r.out.count; @@ -2178,6 +2536,10 @@ NTSTATUS rpccli_lsa_LSAROPENPOLICYSCE(struct rpc_pipe_client *cli, TALLOC_CTX *m status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LSAROPENPOLICYSCE, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LSAROPENPOLICYSCE, (ndr_push_flags_fn_t)ndr_push_lsa_LSAROPENPOLICYSCE); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_LSAROPENPOLICYSCE, &r); @@ -2203,6 +2565,10 @@ NTSTATUS rpccli_lsa_LSARADTREGISTERSECURITYEVENTSOURCE(struct rpc_pipe_client *c status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LSARADTREGISTERSECURITYEVENTSOURCE, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LSARADTREGISTERSECURITYEVENTSOURCE, (ndr_push_flags_fn_t)ndr_push_lsa_LSARADTREGISTERSECURITYEVENTSOURCE); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_LSARADTREGISTERSECURITYEVENTSOURCE, &r); @@ -2228,6 +2594,10 @@ NTSTATUS rpccli_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE(struct rpc_pipe_client status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LSARADTUNREGISTERSECURITYEVENTSOURCE, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE, (ndr_push_flags_fn_t)ndr_push_lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_LSARADTUNREGISTERSECURITYEVENTSOURCE, &r); @@ -2253,6 +2623,10 @@ NTSTATUS rpccli_lsa_LSARADTREPORTSECURITYEVENT(struct rpc_pipe_client *cli, TALL status = cli_do_rpc_ndr(cli, mem_ctx, PI_LSARPC, DCERPC_LSA_LSARADTREPORTSECURITYEVENT, &r, (ndr_pull_flags_fn_t)ndr_pull_lsa_LSARADTREPORTSECURITYEVENT, (ndr_push_flags_fn_t)ndr_push_lsa_LSARADTREPORTSECURITYEVENT); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(lsa_LSARADTREPORTSECURITYEVENT, &r); diff --git a/source3/librpc/gen_ndr/cli_netlogon.c b/source3/librpc/gen_ndr/cli_netlogon.c index 6985d025a9..1f4e6c7867 100644 --- a/source3/librpc/gen_ndr/cli_netlogon.c +++ b/source3/librpc/gen_ndr/cli_netlogon.c @@ -21,6 +21,10 @@ NTSTATUS rpccli_netr_LogonUasLogon(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_LOGONUASLOGON, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_LogonUasLogon, (ndr_push_flags_fn_t)ndr_push_netr_LogonUasLogon); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_LogonUasLogon, &r); @@ -29,7 +33,9 @@ NTSTATUS rpccli_netr_LogonUasLogon(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ } /* Return variables */ - *info = *r.out.info; + if ( info ) { + *info = *r.out.info; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -50,6 +56,10 @@ NTSTATUS rpccli_netr_LogonUasLogoff(struct rpc_pipe_client *cli, TALLOC_CTX *mem status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_LOGONUASLOGOFF, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_LogonUasLogoff, (ndr_push_flags_fn_t)ndr_push_netr_LogonUasLogoff); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_LogonUasLogoff, &r); @@ -83,6 +93,10 @@ NTSTATUS rpccli_netr_LogonSamLogon(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_LOGONSAMLOGON, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_LogonSamLogon, (ndr_push_flags_fn_t)ndr_push_netr_LogonSamLogon); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_LogonSamLogon, &r); @@ -91,7 +105,9 @@ NTSTATUS rpccli_netr_LogonSamLogon(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ } /* Return variables */ - *return_authenticator = *r.out.return_authenticator; + if ( return_authenticator ) { + *return_authenticator = *r.out.return_authenticator; + } *validation = *r.out.validation; *authoritative = *r.out.authoritative; @@ -117,6 +133,10 @@ NTSTATUS rpccli_netr_LogonSamLogoff(struct rpc_pipe_client *cli, TALLOC_CTX *mem status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_LOGONSAMLOGOFF, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_LogonSamLogoff, (ndr_push_flags_fn_t)ndr_push_netr_LogonSamLogoff); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_LogonSamLogoff, &r); @@ -125,7 +145,9 @@ NTSTATUS rpccli_netr_LogonSamLogoff(struct rpc_pipe_client *cli, TALLOC_CTX *mem } /* Return variables */ - *return_authenticator = *r.out.return_authenticator; + if ( return_authenticator ) { + *return_authenticator = *r.out.return_authenticator; + } /* Return result */ return r.out.result; @@ -146,6 +168,10 @@ NTSTATUS rpccli_netr_ServerReqChallenge(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_SERVERREQCHALLENGE, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_ServerReqChallenge, (ndr_push_flags_fn_t)ndr_push_netr_ServerReqChallenge); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_ServerReqChallenge, &r); @@ -177,6 +203,10 @@ NTSTATUS rpccli_netr_ServerAuthenticate(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_SERVERAUTHENTICATE, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_ServerAuthenticate, (ndr_push_flags_fn_t)ndr_push_netr_ServerAuthenticate); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate, &r); @@ -209,6 +239,10 @@ NTSTATUS rpccli_netr_ServerPasswordSet(struct rpc_pipe_client *cli, TALLOC_CTX * status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_SERVERPASSWORDSET, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_ServerPasswordSet, (ndr_push_flags_fn_t)ndr_push_netr_ServerPasswordSet); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_ServerPasswordSet, &r); @@ -242,6 +276,10 @@ NTSTATUS rpccli_netr_DatabaseDeltas(struct rpc_pipe_client *cli, TALLOC_CTX *mem status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_DATABASEDELTAS, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_DatabaseDeltas, (ndr_push_flags_fn_t)ndr_push_netr_DatabaseDeltas); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_DatabaseDeltas, &r); @@ -252,7 +290,9 @@ NTSTATUS rpccli_netr_DatabaseDeltas(struct rpc_pipe_client *cli, TALLOC_CTX *mem /* Return variables */ *return_authenticator = *r.out.return_authenticator; *sequence_num = *r.out.sequence_num; - *delta_enum_array = *r.out.delta_enum_array; + if ( delta_enum_array ) { + *delta_enum_array = *r.out.delta_enum_array; + } /* Return result */ return r.out.result; @@ -277,6 +317,10 @@ NTSTATUS rpccli_netr_DatabaseSync(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_DATABASESYNC, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_DatabaseSync, (ndr_push_flags_fn_t)ndr_push_netr_DatabaseSync); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_DatabaseSync, &r); @@ -287,7 +331,9 @@ NTSTATUS rpccli_netr_DatabaseSync(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c /* Return variables */ *return_authenticator = *r.out.return_authenticator; *sync_context = *r.out.sync_context; - *delta_enum_array = *r.out.delta_enum_array; + if ( delta_enum_array ) { + *delta_enum_array = *r.out.delta_enum_array; + } /* Return result */ return r.out.result; @@ -313,6 +359,10 @@ NTSTATUS rpccli_netr_AccountDeltas(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_ACCOUNTDELTAS, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_AccountDeltas, (ndr_push_flags_fn_t)ndr_push_netr_AccountDeltas); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_AccountDeltas, &r); @@ -351,6 +401,10 @@ NTSTATUS rpccli_netr_AccountSync(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_ACCOUNTSYNC, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_AccountSync, (ndr_push_flags_fn_t)ndr_push_netr_AccountSync); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_AccountSync, &r); @@ -384,6 +438,10 @@ NTSTATUS rpccli_netr_GetDcName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_GETDCNAME, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_GetDcName, (ndr_push_flags_fn_t)ndr_push_netr_GetDcName); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_GetDcName, &r); @@ -413,6 +471,10 @@ NTSTATUS rpccli_netr_LogonControl(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_LOGONCONTROL, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_LogonControl, (ndr_push_flags_fn_t)ndr_push_netr_LogonControl); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_LogonControl, &r); @@ -441,6 +503,10 @@ NTSTATUS rpccli_netr_GetAnyDCName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_GETANYDCNAME, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_GetAnyDCName, (ndr_push_flags_fn_t)ndr_push_netr_GetAnyDCName); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_GetAnyDCName, &r); @@ -471,6 +537,10 @@ NTSTATUS rpccli_netr_LogonControl2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_LOGONCONTROL2, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_LogonControl2, (ndr_push_flags_fn_t)ndr_push_netr_LogonControl2); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_LogonControl2, &r); @@ -503,6 +573,10 @@ NTSTATUS rpccli_netr_ServerAuthenticate2(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_SERVERAUTHENTICATE2, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_ServerAuthenticate2, (ndr_push_flags_fn_t)ndr_push_netr_ServerAuthenticate2); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate2, &r); @@ -538,6 +612,10 @@ NTSTATUS rpccli_netr_DatabaseSync2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_DATABASESYNC2, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_DatabaseSync2, (ndr_push_flags_fn_t)ndr_push_netr_DatabaseSync2); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_DatabaseSync2, &r); @@ -548,7 +626,9 @@ NTSTATUS rpccli_netr_DatabaseSync2(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ /* Return variables */ *return_authenticator = *r.out.return_authenticator; *sync_context = *r.out.sync_context; - *delta_enum_array = *r.out.delta_enum_array; + if ( delta_enum_array ) { + *delta_enum_array = *r.out.delta_enum_array; + } /* Return result */ return r.out.result; @@ -572,6 +652,10 @@ NTSTATUS rpccli_netr_DatabaseRedo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_DATABASEREDO, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_DatabaseRedo, (ndr_push_flags_fn_t)ndr_push_netr_DatabaseRedo); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_DatabaseRedo, &r); @@ -581,7 +665,9 @@ NTSTATUS rpccli_netr_DatabaseRedo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c /* Return variables */ *return_authenticator = *r.out.return_authenticator; - *delta_enum_array = *r.out.delta_enum_array; + if ( delta_enum_array ) { + *delta_enum_array = *r.out.delta_enum_array; + } /* Return result */ return r.out.result; @@ -603,6 +689,10 @@ NTSTATUS rpccli_netr_LogonControl2Ex(struct rpc_pipe_client *cli, TALLOC_CTX *me status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_LOGONCONTROL2EX, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_LogonControl2Ex, (ndr_push_flags_fn_t)ndr_push_netr_LogonControl2Ex); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_LogonControl2Ex, &r); @@ -629,6 +719,10 @@ NTSTATUS rpccli_netr_NETRENUMERATETRUSTEDDOMAINS(struct rpc_pipe_client *cli, TA status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_NETRENUMERATETRUSTEDDOMAINS, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_NETRENUMERATETRUSTEDDOMAINS, (ndr_push_flags_fn_t)ndr_push_netr_NETRENUMERATETRUSTEDDOMAINS); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_NETRENUMERATETRUSTEDDOMAINS, &r); @@ -659,6 +753,10 @@ NTSTATUS rpccli_netr_DsRGetDCName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_DSRGETDCNAME, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_DsRGetDCName, (ndr_push_flags_fn_t)ndr_push_netr_DsRGetDCName); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_DsRGetDCName, &r); @@ -667,7 +765,9 @@ NTSTATUS rpccli_netr_DsRGetDCName(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c } /* Return variables */ - *info = *r.out.info; + if ( info ) { + *info = *r.out.info; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -685,6 +785,10 @@ NTSTATUS rpccli_netr_NETRLOGONDUMMYROUTINE1(struct rpc_pipe_client *cli, TALLOC_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_NETRLOGONDUMMYROUTINE1, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_NETRLOGONDUMMYROUTINE1, (ndr_push_flags_fn_t)ndr_push_netr_NETRLOGONDUMMYROUTINE1); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_NETRLOGONDUMMYROUTINE1, &r); @@ -710,6 +814,10 @@ NTSTATUS rpccli_netr_NETRLOGONSETSERVICEBITS(struct rpc_pipe_client *cli, TALLOC status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_NETRLOGONSETSERVICEBITS, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_NETRLOGONSETSERVICEBITS, (ndr_push_flags_fn_t)ndr_push_netr_NETRLOGONSETSERVICEBITS); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_NETRLOGONSETSERVICEBITS, &r); @@ -735,6 +843,10 @@ NTSTATUS rpccli_netr_NETRLOGONGETTRUSTRID(struct rpc_pipe_client *cli, TALLOC_CT status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_NETRLOGONGETTRUSTRID, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_NETRLOGONGETTRUSTRID, (ndr_push_flags_fn_t)ndr_push_netr_NETRLOGONGETTRUSTRID); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_NETRLOGONGETTRUSTRID, &r); @@ -760,6 +872,10 @@ NTSTATUS rpccli_netr_NETRLOGONCOMPUTESERVERDIGEST(struct rpc_pipe_client *cli, T status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_NETRLOGONCOMPUTESERVERDIGEST, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_NETRLOGONCOMPUTESERVERDIGEST, (ndr_push_flags_fn_t)ndr_push_netr_NETRLOGONCOMPUTESERVERDIGEST); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_NETRLOGONCOMPUTESERVERDIGEST, &r); @@ -785,6 +901,10 @@ NTSTATUS rpccli_netr_NETRLOGONCOMPUTECLIENTDIGEST(struct rpc_pipe_client *cli, T status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_NETRLOGONCOMPUTECLIENTDIGEST, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_NETRLOGONCOMPUTECLIENTDIGEST, (ndr_push_flags_fn_t)ndr_push_netr_NETRLOGONCOMPUTECLIENTDIGEST); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_NETRLOGONCOMPUTECLIENTDIGEST, &r); @@ -816,6 +936,10 @@ NTSTATUS rpccli_netr_ServerAuthenticate3(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_SERVERAUTHENTICATE3, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_ServerAuthenticate3, (ndr_push_flags_fn_t)ndr_push_netr_ServerAuthenticate3); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_ServerAuthenticate3, &r); @@ -849,6 +973,10 @@ NTSTATUS rpccli_netr_DsRGetDCNameEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_DSRGETDCNAMEEX, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_DsRGetDCNameEx, (ndr_push_flags_fn_t)ndr_push_netr_DsRGetDCNameEx); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_DsRGetDCNameEx, &r); @@ -857,7 +985,9 @@ NTSTATUS rpccli_netr_DsRGetDCNameEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem } /* Return variables */ - *info = *r.out.info; + if ( info ) { + *info = *r.out.info; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -876,6 +1006,10 @@ NTSTATUS rpccli_netr_DsRGetSiteName(struct rpc_pipe_client *cli, TALLOC_CTX *mem status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_DSRGETSITENAME, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_DsRGetSiteName, (ndr_push_flags_fn_t)ndr_push_netr_DsRGetSiteName); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_DsRGetSiteName, &r); @@ -908,6 +1042,10 @@ NTSTATUS rpccli_netr_LogonGetDomainInfo(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_LOGONGETDOMAININFO, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_LogonGetDomainInfo, (ndr_push_flags_fn_t)ndr_push_netr_LogonGetDomainInfo); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_LogonGetDomainInfo, &r); @@ -941,6 +1079,10 @@ NTSTATUS rpccli_netr_ServerPasswordSet2(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_SERVERPASSWORDSET2, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_ServerPasswordSet2, (ndr_push_flags_fn_t)ndr_push_netr_ServerPasswordSet2); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_ServerPasswordSet2, &r); @@ -967,6 +1109,10 @@ NTSTATUS rpccli_netr_NETRSERVERPASSWORDGET(struct rpc_pipe_client *cli, TALLOC_C status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_NETRSERVERPASSWORDGET, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_NETRSERVERPASSWORDGET, (ndr_push_flags_fn_t)ndr_push_netr_NETRSERVERPASSWORDGET); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_NETRSERVERPASSWORDGET, &r); @@ -992,6 +1138,10 @@ NTSTATUS rpccli_netr_NETRLOGONSENDTOSAM(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_NETRLOGONSENDTOSAM, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_NETRLOGONSENDTOSAM, (ndr_push_flags_fn_t)ndr_push_netr_NETRLOGONSENDTOSAM); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_NETRLOGONSENDTOSAM, &r); @@ -1017,6 +1167,10 @@ NTSTATUS rpccli_netr_DSRADDRESSTOSITENAMESW(struct rpc_pipe_client *cli, TALLOC_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_DSRADDRESSTOSITENAMESW, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_DSRADDRESSTOSITENAMESW, (ndr_push_flags_fn_t)ndr_push_netr_DSRADDRESSTOSITENAMESW); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_DSRADDRESSTOSITENAMESW, &r); @@ -1049,6 +1203,10 @@ NTSTATUS rpccli_netr_DsRGetDCNameEx2(struct rpc_pipe_client *cli, TALLOC_CTX *me status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_DSRGETDCNAMEEX2, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_DsRGetDCNameEx2, (ndr_push_flags_fn_t)ndr_push_netr_DsRGetDCNameEx2); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_DsRGetDCNameEx2, &r); @@ -1057,7 +1215,9 @@ NTSTATUS rpccli_netr_DsRGetDCNameEx2(struct rpc_pipe_client *cli, TALLOC_CTX *me } /* Return variables */ - *info = *r.out.info; + if ( info ) { + *info = *r.out.info; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -1075,6 +1235,10 @@ NTSTATUS rpccli_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN(struct rpc_pipe_client status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_NETRLOGONGETTIMESERVICEPARENTDOMAIN, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN, (ndr_push_flags_fn_t)ndr_push_netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_NETRLOGONGETTIMESERVICEPARENTDOMAIN, &r); @@ -1100,6 +1264,10 @@ NTSTATUS rpccli_netr_NETRENUMERATETRUSTEDDOMAINSEX(struct rpc_pipe_client *cli, status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_NETRENUMERATETRUSTEDDOMAINSEX, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_NETRENUMERATETRUSTEDDOMAINSEX, (ndr_push_flags_fn_t)ndr_push_netr_NETRENUMERATETRUSTEDDOMAINSEX); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_NETRENUMERATETRUSTEDDOMAINSEX, &r); @@ -1125,6 +1293,10 @@ NTSTATUS rpccli_netr_DSRADDRESSTOSITENAMESEXW(struct rpc_pipe_client *cli, TALLO status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_DSRADDRESSTOSITENAMESEXW, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_DSRADDRESSTOSITENAMESEXW, (ndr_push_flags_fn_t)ndr_push_netr_DSRADDRESSTOSITENAMESEXW); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_DSRADDRESSTOSITENAMESEXW, &r); @@ -1150,6 +1322,10 @@ NTSTATUS rpccli_netr_DSRGETDCSITECOVERAGEW(struct rpc_pipe_client *cli, TALLOC_C status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_DSRGETDCSITECOVERAGEW, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_DSRGETDCSITECOVERAGEW, (ndr_push_flags_fn_t)ndr_push_netr_DSRGETDCSITECOVERAGEW); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_DSRGETDCSITECOVERAGEW, &r); @@ -1181,6 +1357,10 @@ NTSTATUS rpccli_netr_LogonSamLogonEx(struct rpc_pipe_client *cli, TALLOC_CTX *me status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_LOGONSAMLOGONEX, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_LogonSamLogonEx, (ndr_push_flags_fn_t)ndr_push_netr_LogonSamLogonEx); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_LogonSamLogonEx, &r); @@ -1211,6 +1391,10 @@ NTSTATUS rpccli_netr_DsrEnumerateDomainTrusts(struct rpc_pipe_client *cli, TALLO status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_DSRENUMERATEDOMAINTRUSTS, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_DsrEnumerateDomainTrusts, (ndr_push_flags_fn_t)ndr_push_netr_DsrEnumerateDomainTrusts); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_DsrEnumerateDomainTrusts, &r); @@ -1238,6 +1422,10 @@ NTSTATUS rpccli_netr_DSRDEREGISTERDNSHOSTRECORDS(struct rpc_pipe_client *cli, TA status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_DSRDEREGISTERDNSHOSTRECORDS, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_DSRDEREGISTERDNSHOSTRECORDS, (ndr_push_flags_fn_t)ndr_push_netr_DSRDEREGISTERDNSHOSTRECORDS); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_DSRDEREGISTERDNSHOSTRECORDS, &r); @@ -1263,6 +1451,10 @@ NTSTATUS rpccli_netr_NETRSERVERTRUSTPASSWORDSGET(struct rpc_pipe_client *cli, TA status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_NETRSERVERTRUSTPASSWORDSGET, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_NETRSERVERTRUSTPASSWORDSGET, (ndr_push_flags_fn_t)ndr_push_netr_NETRSERVERTRUSTPASSWORDSGET); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_NETRSERVERTRUSTPASSWORDSGET, &r); @@ -1288,6 +1480,10 @@ NTSTATUS rpccli_netr_DSRGETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, T status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_DSRGETFORESTTRUSTINFORMATION, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_DSRGETFORESTTRUSTINFORMATION, (ndr_push_flags_fn_t)ndr_push_netr_DSRGETFORESTTRUSTINFORMATION); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_DSRGETFORESTTRUSTINFORMATION, &r); @@ -1313,6 +1509,10 @@ NTSTATUS rpccli_netr_NETRGETFORESTTRUSTINFORMATION(struct rpc_pipe_client *cli, status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_NETRGETFORESTTRUSTINFORMATION, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_NETRGETFORESTTRUSTINFORMATION, (ndr_push_flags_fn_t)ndr_push_netr_NETRGETFORESTTRUSTINFORMATION); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_NETRGETFORESTTRUSTINFORMATION, &r); @@ -1346,6 +1546,10 @@ NTSTATUS rpccli_netr_LogonSamLogonWithFlags(struct rpc_pipe_client *cli, TALLOC_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_LOGONSAMLOGONWITHFLAGS, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_LogonSamLogonWithFlags, (ndr_push_flags_fn_t)ndr_push_netr_LogonSamLogonWithFlags); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_LogonSamLogonWithFlags, &r); @@ -1354,7 +1558,9 @@ NTSTATUS rpccli_netr_LogonSamLogonWithFlags(struct rpc_pipe_client *cli, TALLOC_ } /* Return variables */ - *return_authenticator = *r.out.return_authenticator; + if ( return_authenticator ) { + *return_authenticator = *r.out.return_authenticator; + } *validation = *r.out.validation; *authoritative = *r.out.authoritative; *flags = *r.out.flags; @@ -1375,6 +1581,10 @@ NTSTATUS rpccli_netr_NETRSERVERGETTRUSTINFO(struct rpc_pipe_client *cli, TALLOC_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_NETLOGON, DCERPC_NETR_NETRSERVERGETTRUSTINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_netr_NETRSERVERGETTRUSTINFO, (ndr_push_flags_fn_t)ndr_push_netr_NETRSERVERGETTRUSTINFO); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(netr_NETRSERVERGETTRUSTINFO, &r); diff --git a/source3/librpc/gen_ndr/cli_srvsvc.c b/source3/librpc/gen_ndr/cli_srvsvc.c index 740c8371c7..8470c7b3ac 100644 --- a/source3/librpc/gen_ndr/cli_srvsvc.c +++ b/source3/librpc/gen_ndr/cli_srvsvc.c @@ -23,6 +23,10 @@ NTSTATUS rpccli_srvsvc_NetCharDevEnum(struct rpc_pipe_client *cli, TALLOC_CTX *m status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETCHARDEVENUM, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetCharDevEnum, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetCharDevEnum); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevEnum, &r); @@ -34,7 +38,9 @@ NTSTATUS rpccli_srvsvc_NetCharDevEnum(struct rpc_pipe_client *cli, TALLOC_CTX *m *level = *r.out.level; *ctr = *r.out.ctr; *totalentries = *r.out.totalentries; - *resume_handle = *r.out.resume_handle; + if ( resume_handle ) { + *resume_handle = *r.out.resume_handle; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -55,6 +61,10 @@ NTSTATUS rpccli_srvsvc_NetCharDevGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETCHARDEVGETINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetCharDevGetInfo, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetCharDevGetInfo); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevGetInfo, &r); @@ -84,6 +94,10 @@ NTSTATUS rpccli_srvsvc_NetCharDevControl(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETCHARDEVCONTROL, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetCharDevControl, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetCharDevControl); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevControl, &r); @@ -115,6 +129,10 @@ NTSTATUS rpccli_srvsvc_NetCharDevQEnum(struct rpc_pipe_client *cli, TALLOC_CTX * status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETCHARDEVQENUM, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetCharDevQEnum, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetCharDevQEnum); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQEnum, &r); @@ -126,7 +144,9 @@ NTSTATUS rpccli_srvsvc_NetCharDevQEnum(struct rpc_pipe_client *cli, TALLOC_CTX * *level = *r.out.level; *ctr = *r.out.ctr; *totalentries = *r.out.totalentries; - *resume_handle = *r.out.resume_handle; + if ( resume_handle ) { + *resume_handle = *r.out.resume_handle; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -148,6 +168,10 @@ NTSTATUS rpccli_srvsvc_NetCharDevQGetInfo(struct rpc_pipe_client *cli, TALLOC_CT status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETCHARDEVQGETINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetCharDevQGetInfo, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetCharDevQGetInfo); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQGetInfo, &r); @@ -179,6 +203,10 @@ NTSTATUS rpccli_srvsvc_NetCharDevQSetInfo(struct rpc_pipe_client *cli, TALLOC_CT status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETCHARDEVQSETINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetCharDevQSetInfo, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetCharDevQSetInfo); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQSetInfo, &r); @@ -187,7 +215,9 @@ NTSTATUS rpccli_srvsvc_NetCharDevQSetInfo(struct rpc_pipe_client *cli, TALLOC_CT } /* Return variables */ - *parm_error = *r.out.parm_error; + if ( parm_error ) { + *parm_error = *r.out.parm_error; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -207,6 +237,10 @@ NTSTATUS rpccli_srvsvc_NetCharDevQPurge(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETCHARDEVQPURGE, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetCharDevQPurge, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetCharDevQPurge); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQPurge, &r); @@ -235,6 +269,10 @@ NTSTATUS rpccli_srvsvc_NetCharDevQPurgeSelf(struct rpc_pipe_client *cli, TALLOC_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETCHARDEVQPURGESELF, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetCharDevQPurgeSelf, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetCharDevQPurgeSelf); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetCharDevQPurgeSelf, &r); @@ -266,6 +304,10 @@ NTSTATUS rpccli_srvsvc_NetConnEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETCONNENUM, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetConnEnum, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetConnEnum); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetConnEnum, &r); @@ -277,7 +319,9 @@ NTSTATUS rpccli_srvsvc_NetConnEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ *level = *r.out.level; *ctr = *r.out.ctr; *totalentries = *r.out.totalentries; - *resume_handle = *r.out.resume_handle; + if ( resume_handle ) { + *resume_handle = *r.out.resume_handle; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -302,6 +346,10 @@ NTSTATUS rpccli_srvsvc_NetFileEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETFILEENUM, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetFileEnum, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetFileEnum); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetFileEnum, &r); @@ -313,7 +361,9 @@ NTSTATUS rpccli_srvsvc_NetFileEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ *level = *r.out.level; *ctr = *r.out.ctr; *totalentries = *r.out.totalentries; - *resume_handle = *r.out.resume_handle; + if ( resume_handle ) { + *resume_handle = *r.out.resume_handle; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -334,6 +384,10 @@ NTSTATUS rpccli_srvsvc_NetFileGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *m status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETFILEGETINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetFileGetInfo, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetFileGetInfo); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetFileGetInfo, &r); @@ -362,6 +416,10 @@ NTSTATUS rpccli_srvsvc_NetFileClose(struct rpc_pipe_client *cli, TALLOC_CTX *mem status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETFILECLOSE, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetFileClose, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetFileClose); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetFileClose, &r); @@ -394,6 +452,10 @@ NTSTATUS rpccli_srvsvc_NetSessEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSESSENUM, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSessEnum, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetSessEnum); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetSessEnum, &r); @@ -405,7 +467,9 @@ NTSTATUS rpccli_srvsvc_NetSessEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ *level = *r.out.level; *ctr = *r.out.ctr; *totalentries = *r.out.totalentries; - *resume_handle = *r.out.resume_handle; + if ( resume_handle ) { + *resume_handle = *r.out.resume_handle; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -426,6 +490,10 @@ NTSTATUS rpccli_srvsvc_NetSessDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSESSDEL, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSessDel, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetSessDel); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetSessDel, &r); @@ -455,6 +523,10 @@ NTSTATUS rpccli_srvsvc_NetShareAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSHAREADD, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetShareAdd, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetShareAdd); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetShareAdd, &r); @@ -463,7 +535,9 @@ NTSTATUS rpccli_srvsvc_NetShareAdd(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ } /* Return variables */ - *parm_error = *r.out.parm_error; + if ( parm_error ) { + *parm_error = *r.out.parm_error; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -486,6 +560,10 @@ NTSTATUS rpccli_srvsvc_NetShareEnumAll(struct rpc_pipe_client *cli, TALLOC_CTX * status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSHAREENUMALL, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetShareEnumAll, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetShareEnumAll); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetShareEnumAll, &r); @@ -497,7 +575,9 @@ NTSTATUS rpccli_srvsvc_NetShareEnumAll(struct rpc_pipe_client *cli, TALLOC_CTX * *level = *r.out.level; *ctr = *r.out.ctr; *totalentries = *r.out.totalentries; - *resume_handle = *r.out.resume_handle; + if ( resume_handle ) { + *resume_handle = *r.out.resume_handle; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -518,6 +598,10 @@ NTSTATUS rpccli_srvsvc_NetShareGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX * status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSHAREGETINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetShareGetInfo, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetShareGetInfo); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetShareGetInfo, &r); @@ -549,6 +633,10 @@ NTSTATUS rpccli_srvsvc_NetShareSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX * status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSHARESETINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetShareSetInfo, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetShareSetInfo); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetShareSetInfo, &r); @@ -557,7 +645,9 @@ NTSTATUS rpccli_srvsvc_NetShareSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX * } /* Return variables */ - *parm_error = *r.out.parm_error; + if ( parm_error ) { + *parm_error = *r.out.parm_error; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -578,6 +668,10 @@ NTSTATUS rpccli_srvsvc_NetShareDel(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSHAREDEL, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetShareDel, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetShareDel); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDel, &r); @@ -606,6 +700,10 @@ NTSTATUS rpccli_srvsvc_NetShareDelSticky(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSHAREDELSTICKY, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetShareDelSticky, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetShareDelSticky); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelSticky, &r); @@ -633,6 +731,10 @@ NTSTATUS rpccli_srvsvc_NetShareCheck(struct rpc_pipe_client *cli, TALLOC_CTX *me status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSHARECHECK, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetShareCheck, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetShareCheck); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetShareCheck, &r); @@ -661,6 +763,10 @@ NTSTATUS rpccli_srvsvc_NetSrvGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *me status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSRVGETINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSrvGetInfo, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetSrvGetInfo); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetSrvGetInfo, &r); @@ -691,6 +797,10 @@ NTSTATUS rpccli_srvsvc_NetSrvSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *me status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSRVSETINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSrvSetInfo, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetSrvSetInfo); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetSrvSetInfo, &r); @@ -699,7 +809,9 @@ NTSTATUS rpccli_srvsvc_NetSrvSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX *me } /* Return variables */ - *parm_error = *r.out.parm_error; + if ( parm_error ) { + *parm_error = *r.out.parm_error; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -722,6 +834,10 @@ NTSTATUS rpccli_srvsvc_NetDiskEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETDISKENUM, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetDiskEnum, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetDiskEnum); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetDiskEnum, &r); @@ -732,7 +848,9 @@ NTSTATUS rpccli_srvsvc_NetDiskEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ /* Return variables */ *info = *r.out.info; *totalentries = *r.out.totalentries; - *resume_handle = *r.out.resume_handle; + if ( resume_handle ) { + *resume_handle = *r.out.resume_handle; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -754,6 +872,10 @@ NTSTATUS rpccli_srvsvc_NetServerStatisticsGet(struct rpc_pipe_client *cli, TALLO status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSERVERSTATISTICSGET, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetServerStatisticsGet, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetServerStatisticsGet); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetServerStatisticsGet, &r); @@ -783,6 +905,10 @@ NTSTATUS rpccli_srvsvc_NetTransportAdd(struct rpc_pipe_client *cli, TALLOC_CTX * status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETTRANSPORTADD, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetTransportAdd, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetTransportAdd); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportAdd, &r); @@ -813,6 +939,10 @@ NTSTATUS rpccli_srvsvc_NetTransportEnum(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETTRANSPORTENUM, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetTransportEnum, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetTransportEnum); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportEnum, &r); @@ -824,7 +954,9 @@ NTSTATUS rpccli_srvsvc_NetTransportEnum(struct rpc_pipe_client *cli, TALLOC_CTX *level = *r.out.level; *transports = *r.out.transports; *totalentries = *r.out.totalentries; - *resume_handle = *r.out.resume_handle; + if ( resume_handle ) { + *resume_handle = *r.out.resume_handle; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -845,6 +977,10 @@ NTSTATUS rpccli_srvsvc_NetTransportDel(struct rpc_pipe_client *cli, TALLOC_CTX * status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETTRANSPORTDEL, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetTransportDel, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetTransportDel); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetTransportDel, &r); @@ -871,6 +1007,10 @@ NTSTATUS rpccli_srvsvc_NetRemoteTOD(struct rpc_pipe_client *cli, TALLOC_CTX *mem status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETREMOTETOD, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetRemoteTOD, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetRemoteTOD); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetRemoteTOD, &r); @@ -879,7 +1019,9 @@ NTSTATUS rpccli_srvsvc_NetRemoteTOD(struct rpc_pipe_client *cli, TALLOC_CTX *mem } /* Return variables */ - *info = *r.out.info; + if ( info ) { + *info = *r.out.info; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -901,6 +1043,10 @@ NTSTATUS rpccli_srvsvc_NetSetServiceBits(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSETSERVICEBITS, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSetServiceBits, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetSetServiceBits); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetSetServiceBits, &r); @@ -929,6 +1075,10 @@ NTSTATUS rpccli_srvsvc_NetPathType(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETPATHTYPE, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetPathType, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetPathType); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetPathType, &r); @@ -961,6 +1111,10 @@ NTSTATUS rpccli_srvsvc_NetPathCanonicalize(struct rpc_pipe_client *cli, TALLOC_C status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETPATHCANONICALIZE, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetPathCanonicalize, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetPathCanonicalize); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetPathCanonicalize, &r); @@ -993,6 +1147,10 @@ NTSTATUS rpccli_srvsvc_NetPathCompare(struct rpc_pipe_client *cli, TALLOC_CTX *m status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETPATHCOMPARE, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetPathCompare, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetPathCompare); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetPathCompare, &r); @@ -1022,6 +1180,10 @@ NTSTATUS rpccli_srvsvc_NetNameValidate(struct rpc_pipe_client *cli, TALLOC_CTX * status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETNAMEVALIDATE, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetNameValidate, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetNameValidate); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetNameValidate, &r); @@ -1047,6 +1209,10 @@ NTSTATUS rpccli_srvsvc_NETRPRNAMECANONICALIZE(struct rpc_pipe_client *cli, TALLO status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETRPRNAMECANONICALIZE, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NETRPRNAMECANONICALIZE, (ndr_push_flags_fn_t)ndr_push_srvsvc_NETRPRNAMECANONICALIZE); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NETRPRNAMECANONICALIZE, &r); @@ -1077,6 +1243,10 @@ NTSTATUS rpccli_srvsvc_NetPRNameCompare(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETPRNAMECOMPARE, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetPRNameCompare, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetPRNameCompare); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetPRNameCompare, &r); @@ -1107,6 +1277,10 @@ NTSTATUS rpccli_srvsvc_NetShareEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSHAREENUM, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetShareEnum, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetShareEnum); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetShareEnum, &r); @@ -1118,7 +1292,9 @@ NTSTATUS rpccli_srvsvc_NetShareEnum(struct rpc_pipe_client *cli, TALLOC_CTX *mem *level = *r.out.level; *ctr = *r.out.ctr; *totalentries = *r.out.totalentries; - *resume_handle = *r.out.resume_handle; + if ( resume_handle ) { + *resume_handle = *r.out.resume_handle; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -1139,6 +1315,10 @@ NTSTATUS rpccli_srvsvc_NetShareDelStart(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSHAREDELSTART, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetShareDelStart, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetShareDelStart); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelStart, &r); @@ -1147,7 +1327,9 @@ NTSTATUS rpccli_srvsvc_NetShareDelStart(struct rpc_pipe_client *cli, TALLOC_CTX } /* Return variables */ - *hnd = *r.out.hnd; + if ( hnd ) { + *hnd = *r.out.hnd; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -1166,6 +1348,10 @@ NTSTATUS rpccli_srvsvc_NetShareDelCommit(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSHAREDELCOMMIT, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetShareDelCommit, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetShareDelCommit); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetShareDelCommit, &r); @@ -1174,7 +1360,9 @@ NTSTATUS rpccli_srvsvc_NetShareDelCommit(struct rpc_pipe_client *cli, TALLOC_CTX } /* Return variables */ - *hnd = *r.out.hnd; + if ( hnd ) { + *hnd = *r.out.hnd; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -1196,6 +1384,10 @@ NTSTATUS rpccli_srvsvc_NetGetFileSecurity(struct rpc_pipe_client *cli, TALLOC_CT status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETGETFILESECURITY, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetGetFileSecurity, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetGetFileSecurity); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetGetFileSecurity, &r); @@ -1204,7 +1396,9 @@ NTSTATUS rpccli_srvsvc_NetGetFileSecurity(struct rpc_pipe_client *cli, TALLOC_CT } /* Return variables */ - *sd_buf = *r.out.sd_buf; + if ( sd_buf ) { + *sd_buf = *r.out.sd_buf; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -1227,6 +1421,10 @@ NTSTATUS rpccli_srvsvc_NetSetFileSecurity(struct rpc_pipe_client *cli, TALLOC_CT status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSETFILESECURITY, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetSetFileSecurity, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetSetFileSecurity); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetSetFileSecurity, &r); @@ -1255,6 +1453,10 @@ NTSTATUS rpccli_srvsvc_NetServerTransportAddEx(struct rpc_pipe_client *cli, TALL status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSERVERTRANSPORTADDEX, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetServerTransportAddEx, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetServerTransportAddEx); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetServerTransportAddEx, &r); @@ -1286,6 +1488,10 @@ NTSTATUS rpccli_srvsvc_NetServerSetServiceBitsEx(struct rpc_pipe_client *cli, TA status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETSERVERSETSERVICEBITSEX, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NetServerSetServiceBitsEx, (ndr_push_flags_fn_t)ndr_push_srvsvc_NetServerSetServiceBitsEx); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NetServerSetServiceBitsEx, &r); @@ -1311,6 +1517,10 @@ NTSTATUS rpccli_srvsvc_NETRDFSGETVERSION(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETRDFSGETVERSION, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NETRDFSGETVERSION, (ndr_push_flags_fn_t)ndr_push_srvsvc_NETRDFSGETVERSION); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSGETVERSION, &r); @@ -1336,6 +1546,10 @@ NTSTATUS rpccli_srvsvc_NETRDFSCREATELOCALPARTITION(struct rpc_pipe_client *cli, status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETRDFSCREATELOCALPARTITION, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NETRDFSCREATELOCALPARTITION, (ndr_push_flags_fn_t)ndr_push_srvsvc_NETRDFSCREATELOCALPARTITION); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSCREATELOCALPARTITION, &r); @@ -1361,6 +1575,10 @@ NTSTATUS rpccli_srvsvc_NETRDFSDELETELOCALPARTITION(struct rpc_pipe_client *cli, status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETRDFSDELETELOCALPARTITION, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NETRDFSDELETELOCALPARTITION, (ndr_push_flags_fn_t)ndr_push_srvsvc_NETRDFSDELETELOCALPARTITION); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSDELETELOCALPARTITION, &r); @@ -1386,6 +1604,10 @@ NTSTATUS rpccli_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct rpc_pipe_client *cli, T status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETRDFSSETLOCALVOLUMESTATE, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NETRDFSSETLOCALVOLUMESTATE, (ndr_push_flags_fn_t)ndr_push_srvsvc_NETRDFSSETLOCALVOLUMESTATE); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSSETLOCALVOLUMESTATE, &r); @@ -1411,6 +1633,10 @@ NTSTATUS rpccli_srvsvc_NETRDFSSETSERVERINFO(struct rpc_pipe_client *cli, TALLOC_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETRDFSSETSERVERINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NETRDFSSETSERVERINFO, (ndr_push_flags_fn_t)ndr_push_srvsvc_NETRDFSSETSERVERINFO); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSSETSERVERINFO, &r); @@ -1436,6 +1662,10 @@ NTSTATUS rpccli_srvsvc_NETRDFSCREATEEXITPOINT(struct rpc_pipe_client *cli, TALLO status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETRDFSCREATEEXITPOINT, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NETRDFSCREATEEXITPOINT, (ndr_push_flags_fn_t)ndr_push_srvsvc_NETRDFSCREATEEXITPOINT); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSCREATEEXITPOINT, &r); @@ -1461,6 +1691,10 @@ NTSTATUS rpccli_srvsvc_NETRDFSDELETEEXITPOINT(struct rpc_pipe_client *cli, TALLO status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETRDFSDELETEEXITPOINT, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NETRDFSDELETEEXITPOINT, (ndr_push_flags_fn_t)ndr_push_srvsvc_NETRDFSDELETEEXITPOINT); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSDELETEEXITPOINT, &r); @@ -1486,6 +1720,10 @@ NTSTATUS rpccli_srvsvc_NETRDFSMODIFYPREFIX(struct rpc_pipe_client *cli, TALLOC_C status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETRDFSMODIFYPREFIX, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NETRDFSMODIFYPREFIX, (ndr_push_flags_fn_t)ndr_push_srvsvc_NETRDFSMODIFYPREFIX); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSMODIFYPREFIX, &r); @@ -1511,6 +1749,10 @@ NTSTATUS rpccli_srvsvc_NETRDFSFIXLOCALVOLUME(struct rpc_pipe_client *cli, TALLOC status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETRDFSFIXLOCALVOLUME, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NETRDFSFIXLOCALVOLUME, (ndr_push_flags_fn_t)ndr_push_srvsvc_NETRDFSFIXLOCALVOLUME); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSFIXLOCALVOLUME, &r); @@ -1536,6 +1778,10 @@ NTSTATUS rpccli_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct rpc_pipe_client *cli, status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETRDFSMANAGERREPORTSITEINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NETRDFSMANAGERREPORTSITEINFO, (ndr_push_flags_fn_t)ndr_push_srvsvc_NETRDFSMANAGERREPORTSITEINFO); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NETRDFSMANAGERREPORTSITEINFO, &r); @@ -1561,6 +1807,10 @@ NTSTATUS rpccli_srvsvc_NETRSERVERTRANSPORTDELEX(struct rpc_pipe_client *cli, TAL status = cli_do_rpc_ndr(cli, mem_ctx, PI_SRVSVC, DCERPC_SRVSVC_NETRSERVERTRANSPORTDELEX, &r, (ndr_pull_flags_fn_t)ndr_pull_srvsvc_NETRSERVERTRANSPORTDELEX, (ndr_push_flags_fn_t)ndr_push_srvsvc_NETRSERVERTRANSPORTDELEX); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(srvsvc_NETRSERVERTRANSPORTDELEX, &r); diff --git a/source3/librpc/gen_ndr/cli_svcctl.c b/source3/librpc/gen_ndr/cli_svcctl.c index dce4c332ee..a3b4df4992 100644 --- a/source3/librpc/gen_ndr/cli_svcctl.c +++ b/source3/librpc/gen_ndr/cli_svcctl.c @@ -19,6 +19,10 @@ NTSTATUS rpccli_svcctl_CloseServiceHandle(struct rpc_pipe_client *cli, TALLOC_CT status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_CLOSESERVICEHANDLE, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_CloseServiceHandle, (ndr_push_flags_fn_t)ndr_push_svcctl_CloseServiceHandle); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_CloseServiceHandle, &r); @@ -47,6 +51,10 @@ NTSTATUS rpccli_svcctl_ControlService(struct rpc_pipe_client *cli, TALLOC_CTX *m status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_CONTROLSERVICE, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_ControlService, (ndr_push_flags_fn_t)ndr_push_svcctl_ControlService); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_ControlService, &r); @@ -74,6 +82,10 @@ NTSTATUS rpccli_svcctl_DeleteService(struct rpc_pipe_client *cli, TALLOC_CTX *me status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_DELETESERVICE, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_DeleteService, (ndr_push_flags_fn_t)ndr_push_svcctl_DeleteService); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_DeleteService, &r); @@ -100,6 +112,10 @@ NTSTATUS rpccli_svcctl_LockServiceDatabase(struct rpc_pipe_client *cli, TALLOC_C status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_LOCKSERVICEDATABASE, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_LockServiceDatabase, (ndr_push_flags_fn_t)ndr_push_svcctl_LockServiceDatabase); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_LockServiceDatabase, &r); @@ -126,6 +142,10 @@ NTSTATUS rpccli_svcctl_QueryServiceObjectSecurity(struct rpc_pipe_client *cli, T status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_QUERYSERVICEOBJECTSECURITY, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_QueryServiceObjectSecurity, (ndr_push_flags_fn_t)ndr_push_svcctl_QueryServiceObjectSecurity); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceObjectSecurity, &r); @@ -151,6 +171,10 @@ NTSTATUS rpccli_svcctl_SetServiceObjectSecurity(struct rpc_pipe_client *cli, TAL status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_SETSERVICEOBJECTSECURITY, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_SetServiceObjectSecurity, (ndr_push_flags_fn_t)ndr_push_svcctl_SetServiceObjectSecurity); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_SetServiceObjectSecurity, &r); @@ -177,6 +201,10 @@ NTSTATUS rpccli_svcctl_QueryServiceStatus(struct rpc_pipe_client *cli, TALLOC_CT status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_QUERYSERVICESTATUS, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_QueryServiceStatus, (ndr_push_flags_fn_t)ndr_push_svcctl_QueryServiceStatus); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatus, &r); @@ -203,6 +231,10 @@ NTSTATUS rpccli_svcctl_SetServiceStatus(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_SETSERVICESTATUS, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_SetServiceStatus, (ndr_push_flags_fn_t)ndr_push_svcctl_SetServiceStatus); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_SetServiceStatus, &r); @@ -229,6 +261,10 @@ NTSTATUS rpccli_svcctl_UnlockServiceDatabase(struct rpc_pipe_client *cli, TALLOC status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_UNLOCKSERVICEDATABASE, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_UnlockServiceDatabase, (ndr_push_flags_fn_t)ndr_push_svcctl_UnlockServiceDatabase); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_UnlockServiceDatabase, &r); @@ -255,6 +291,10 @@ NTSTATUS rpccli_svcctl_NotifyBootConfigStatus(struct rpc_pipe_client *cli, TALLO status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_NOTIFYBOOTCONFIGSTATUS, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_NotifyBootConfigStatus, (ndr_push_flags_fn_t)ndr_push_svcctl_NotifyBootConfigStatus); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_NotifyBootConfigStatus, &r); @@ -284,6 +324,10 @@ NTSTATUS rpccli_svcctl_SCSetServiceBitsW(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_SCSETSERVICEBITSW, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_SCSetServiceBitsW, (ndr_push_flags_fn_t)ndr_push_svcctl_SCSetServiceBitsW); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsW, &r); @@ -319,6 +363,10 @@ NTSTATUS rpccli_svcctl_ChangeServiceConfigW(struct rpc_pipe_client *cli, TALLOC_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_CHANGESERVICECONFIGW, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_ChangeServiceConfigW, (ndr_push_flags_fn_t)ndr_push_svcctl_ChangeServiceConfigW); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigW, &r); @@ -360,6 +408,10 @@ NTSTATUS rpccli_svcctl_CreateServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *m status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_CREATESERVICEW, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_CreateServiceW, (ndr_push_flags_fn_t)ndr_push_svcctl_CreateServiceW); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceW, &r); @@ -368,7 +420,9 @@ NTSTATUS rpccli_svcctl_CreateServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *m } /* Return variables */ - *TagId = *r.out.TagId; + if ( TagId ) { + *TagId = *r.out.TagId; + } *handle = *r.out.handle; /* Return result */ @@ -390,6 +444,10 @@ NTSTATUS rpccli_svcctl_EnumDependentServicesW(struct rpc_pipe_client *cli, TALLO status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_ENUMDEPENDENTSERVICESW, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_EnumDependentServicesW, (ndr_push_flags_fn_t)ndr_push_svcctl_EnumDependentServicesW); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesW, &r); @@ -398,7 +456,9 @@ NTSTATUS rpccli_svcctl_EnumDependentServicesW(struct rpc_pipe_client *cli, TALLO } /* Return variables */ - *status = *r.out.status; + if ( status ) { + *status = *r.out.status; + } *bytes_needed = *r.out.bytes_needed; *services_returned = *r.out.services_returned; @@ -423,6 +483,10 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client *cli, TALLOC_C status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_ENUMSERVICESSTATUSW, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_EnumServicesStatusW, (ndr_push_flags_fn_t)ndr_push_svcctl_EnumServicesStatusW); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusW, &r); @@ -434,7 +498,9 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusW(struct rpc_pipe_client *cli, TALLOC_C *service = *r.out.service; *bytes_needed = *r.out.bytes_needed; *services_returned = *r.out.services_returned; - *resume_handle = *r.out.resume_handle; + if ( resume_handle ) { + *resume_handle = *r.out.resume_handle; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -455,6 +521,10 @@ NTSTATUS rpccli_svcctl_OpenSCManagerW(struct rpc_pipe_client *cli, TALLOC_CTX *m status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_OPENSCMANAGERW, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_OpenSCManagerW, (ndr_push_flags_fn_t)ndr_push_svcctl_OpenSCManagerW); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerW, &r); @@ -484,6 +554,10 @@ NTSTATUS rpccli_svcctl_OpenServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *mem status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_OPENSERVICEW, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_OpenServiceW, (ndr_push_flags_fn_t)ndr_push_svcctl_OpenServiceW); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceW, &r); @@ -512,6 +586,10 @@ NTSTATUS rpccli_svcctl_QueryServiceConfigW(struct rpc_pipe_client *cli, TALLOC_C status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_QUERYSERVICECONFIGW, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_QueryServiceConfigW, (ndr_push_flags_fn_t)ndr_push_svcctl_QueryServiceConfigW); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigW, &r); @@ -541,6 +619,10 @@ NTSTATUS rpccli_svcctl_QueryServiceLockStatusW(struct rpc_pipe_client *cli, TALL status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_QUERYSERVICELOCKSTATUSW, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_QueryServiceLockStatusW, (ndr_push_flags_fn_t)ndr_push_svcctl_QueryServiceLockStatusW); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusW, &r); @@ -571,6 +653,10 @@ NTSTATUS rpccli_svcctl_StartServiceW(struct rpc_pipe_client *cli, TALLOC_CTX *me status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_STARTSERVICEW, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_StartServiceW, (ndr_push_flags_fn_t)ndr_push_svcctl_StartServiceW); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_StartServiceW, &r); @@ -599,6 +685,10 @@ NTSTATUS rpccli_svcctl_GetServiceDisplayNameW(struct rpc_pipe_client *cli, TALLO status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_GETSERVICEDISPLAYNAMEW, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_GetServiceDisplayNameW, (ndr_push_flags_fn_t)ndr_push_svcctl_GetServiceDisplayNameW); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameW, &r); @@ -608,7 +698,9 @@ NTSTATUS rpccli_svcctl_GetServiceDisplayNameW(struct rpc_pipe_client *cli, TALLO /* Return variables */ *display_name = *r.out.display_name; - *display_name_length = *r.out.display_name_length; + if ( display_name_length ) { + *display_name_length = *r.out.display_name_length; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -629,6 +721,10 @@ NTSTATUS rpccli_svcctl_GetServiceKeyNameW(struct rpc_pipe_client *cli, TALLOC_CT status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_GETSERVICEKEYNAMEW, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_GetServiceKeyNameW, (ndr_push_flags_fn_t)ndr_push_svcctl_GetServiceKeyNameW); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameW, &r); @@ -638,7 +734,9 @@ NTSTATUS rpccli_svcctl_GetServiceKeyNameW(struct rpc_pipe_client *cli, TALLOC_CT /* Return variables */ *key_name = *r.out.key_name; - *display_name_length = *r.out.display_name_length; + if ( display_name_length ) { + *display_name_length = *r.out.display_name_length; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -660,6 +758,10 @@ NTSTATUS rpccli_svcctl_SCSetServiceBitsA(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_SCSETSERVICEBITSA, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_SCSetServiceBitsA, (ndr_push_flags_fn_t)ndr_push_svcctl_SCSetServiceBitsA); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_SCSetServiceBitsA, &r); @@ -695,6 +797,10 @@ NTSTATUS rpccli_svcctl_ChangeServiceConfigA(struct rpc_pipe_client *cli, TALLOC_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_CHANGESERVICECONFIGA, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_ChangeServiceConfigA, (ndr_push_flags_fn_t)ndr_push_svcctl_ChangeServiceConfigA); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfigA, &r); @@ -733,6 +839,10 @@ NTSTATUS rpccli_svcctl_CreateServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *m status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_CREATESERVICEA, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_CreateServiceA, (ndr_push_flags_fn_t)ndr_push_svcctl_CreateServiceA); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_CreateServiceA, &r); @@ -741,7 +851,9 @@ NTSTATUS rpccli_svcctl_CreateServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *m } /* Return variables */ - *TagId = *r.out.TagId; + if ( TagId ) { + *TagId = *r.out.TagId; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -762,6 +874,10 @@ NTSTATUS rpccli_svcctl_EnumDependentServicesA(struct rpc_pipe_client *cli, TALLO status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_ENUMDEPENDENTSERVICESA, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_EnumDependentServicesA, (ndr_push_flags_fn_t)ndr_push_svcctl_EnumDependentServicesA); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_EnumDependentServicesA, &r); @@ -770,7 +886,9 @@ NTSTATUS rpccli_svcctl_EnumDependentServicesA(struct rpc_pipe_client *cli, TALLO } /* Return variables */ - *status = *r.out.status; + if ( status ) { + *status = *r.out.status; + } *bytes_needed = *r.out.bytes_needed; *services_returned = *r.out.services_returned; @@ -795,6 +913,10 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusA(struct rpc_pipe_client *cli, TALLOC_C status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_ENUMSERVICESSTATUSA, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_EnumServicesStatusA, (ndr_push_flags_fn_t)ndr_push_svcctl_EnumServicesStatusA); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_EnumServicesStatusA, &r); @@ -806,7 +928,9 @@ NTSTATUS rpccli_svcctl_EnumServicesStatusA(struct rpc_pipe_client *cli, TALLOC_C *service = *r.out.service; *bytes_needed = *r.out.bytes_needed; *services_returned = *r.out.services_returned; - *resume_handle = *r.out.resume_handle; + if ( resume_handle ) { + *resume_handle = *r.out.resume_handle; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -827,6 +951,10 @@ NTSTATUS rpccli_svcctl_OpenSCManagerA(struct rpc_pipe_client *cli, TALLOC_CTX *m status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_OPENSCMANAGERA, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_OpenSCManagerA, (ndr_push_flags_fn_t)ndr_push_svcctl_OpenSCManagerA); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_OpenSCManagerA, &r); @@ -856,6 +984,10 @@ NTSTATUS rpccli_svcctl_OpenServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *mem status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_OPENSERVICEA, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_OpenServiceA, (ndr_push_flags_fn_t)ndr_push_svcctl_OpenServiceA); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_OpenServiceA, &r); @@ -883,6 +1015,10 @@ NTSTATUS rpccli_svcctl_QueryServiceConfigA(struct rpc_pipe_client *cli, TALLOC_C status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_QUERYSERVICECONFIGA, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_QueryServiceConfigA, (ndr_push_flags_fn_t)ndr_push_svcctl_QueryServiceConfigA); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfigA, &r); @@ -912,6 +1048,10 @@ NTSTATUS rpccli_svcctl_QueryServiceLockStatusA(struct rpc_pipe_client *cli, TALL status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_QUERYSERVICELOCKSTATUSA, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_QueryServiceLockStatusA, (ndr_push_flags_fn_t)ndr_push_svcctl_QueryServiceLockStatusA); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceLockStatusA, &r); @@ -942,6 +1082,10 @@ NTSTATUS rpccli_svcctl_StartServiceA(struct rpc_pipe_client *cli, TALLOC_CTX *me status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_STARTSERVICEA, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_StartServiceA, (ndr_push_flags_fn_t)ndr_push_svcctl_StartServiceA); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_StartServiceA, &r); @@ -970,6 +1114,10 @@ NTSTATUS rpccli_svcctl_GetServiceDisplayNameA(struct rpc_pipe_client *cli, TALLO status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_GETSERVICEDISPLAYNAMEA, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_GetServiceDisplayNameA, (ndr_push_flags_fn_t)ndr_push_svcctl_GetServiceDisplayNameA); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_GetServiceDisplayNameA, &r); @@ -979,7 +1127,9 @@ NTSTATUS rpccli_svcctl_GetServiceDisplayNameA(struct rpc_pipe_client *cli, TALLO /* Return variables */ *display_name = *r.out.display_name; - *display_name_length = *r.out.display_name_length; + if ( display_name_length ) { + *display_name_length = *r.out.display_name_length; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -1000,6 +1150,10 @@ NTSTATUS rpccli_svcctl_GetServiceKeyNameA(struct rpc_pipe_client *cli, TALLOC_CT status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_GETSERVICEKEYNAMEA, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_GetServiceKeyNameA, (ndr_push_flags_fn_t)ndr_push_svcctl_GetServiceKeyNameA); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_GetServiceKeyNameA, &r); @@ -1009,7 +1163,9 @@ NTSTATUS rpccli_svcctl_GetServiceKeyNameA(struct rpc_pipe_client *cli, TALLOC_CT /* Return variables */ *key_name = *r.out.key_name; - *display_name_length = *r.out.display_name_length; + if ( display_name_length ) { + *display_name_length = *r.out.display_name_length; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -1027,6 +1183,10 @@ NTSTATUS rpccli_svcctl_GetCurrentGroupeStateW(struct rpc_pipe_client *cli, TALLO status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_GETCURRENTGROUPESTATEW, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_GetCurrentGroupeStateW, (ndr_push_flags_fn_t)ndr_push_svcctl_GetCurrentGroupeStateW); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_GetCurrentGroupeStateW, &r); @@ -1052,6 +1212,10 @@ NTSTATUS rpccli_svcctl_EnumServiceGroupW(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_ENUMSERVICEGROUPW, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_EnumServiceGroupW, (ndr_push_flags_fn_t)ndr_push_svcctl_EnumServiceGroupW); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_EnumServiceGroupW, &r); @@ -1080,6 +1244,10 @@ NTSTATUS rpccli_svcctl_ChangeServiceConfig2A(struct rpc_pipe_client *cli, TALLOC status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_CHANGESERVICECONFIG2A, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_ChangeServiceConfig2A, (ndr_push_flags_fn_t)ndr_push_svcctl_ChangeServiceConfig2A); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2A, &r); @@ -1108,6 +1276,10 @@ NTSTATUS rpccli_svcctl_ChangeServiceConfig2W(struct rpc_pipe_client *cli, TALLOC status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_CHANGESERVICECONFIG2W, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_ChangeServiceConfig2W, (ndr_push_flags_fn_t)ndr_push_svcctl_ChangeServiceConfig2W); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_ChangeServiceConfig2W, &r); @@ -1136,6 +1308,10 @@ NTSTATUS rpccli_svcctl_QueryServiceConfig2A(struct rpc_pipe_client *cli, TALLOC_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_QUERYSERVICECONFIG2A, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_QueryServiceConfig2A, (ndr_push_flags_fn_t)ndr_push_svcctl_QueryServiceConfig2A); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2A, &r); @@ -1166,6 +1342,10 @@ NTSTATUS rpccli_svcctl_QueryServiceConfig2W(struct rpc_pipe_client *cli, TALLOC_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_QUERYSERVICECONFIG2W, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_QueryServiceConfig2W, (ndr_push_flags_fn_t)ndr_push_svcctl_QueryServiceConfig2W); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceConfig2W, &r); @@ -1196,6 +1376,10 @@ NTSTATUS rpccli_svcctl_QueryServiceStatusEx(struct rpc_pipe_client *cli, TALLOC_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_QUERYSERVICESTATUSEX, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_QueryServiceStatusEx, (ndr_push_flags_fn_t)ndr_push_svcctl_QueryServiceStatusEx); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_QueryServiceStatusEx, &r); @@ -1229,6 +1413,10 @@ NTSTATUS rpccli_EnumServicesStatusExA(struct rpc_pipe_client *cli, TALLOC_CTX *m status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_ENUMSERVICESSTATUSEXA, &r, (ndr_pull_flags_fn_t)ndr_pull_EnumServicesStatusExA, (ndr_push_flags_fn_t)ndr_push_EnumServicesStatusExA); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(EnumServicesStatusExA, &r); @@ -1240,7 +1428,9 @@ NTSTATUS rpccli_EnumServicesStatusExA(struct rpc_pipe_client *cli, TALLOC_CTX *m *services = *r.out.services; *bytes_needed = *r.out.bytes_needed; *service_returned = *r.out.service_returned; - *resume_handle = *r.out.resume_handle; + if ( resume_handle ) { + *resume_handle = *r.out.resume_handle; + } *group_name = *r.out.group_name; /* Return result */ @@ -1265,6 +1455,10 @@ NTSTATUS rpccli_EnumServicesStatusExW(struct rpc_pipe_client *cli, TALLOC_CTX *m status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_ENUMSERVICESSTATUSEXW, &r, (ndr_pull_flags_fn_t)ndr_pull_EnumServicesStatusExW, (ndr_push_flags_fn_t)ndr_push_EnumServicesStatusExW); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(EnumServicesStatusExW, &r); @@ -1276,7 +1470,9 @@ NTSTATUS rpccli_EnumServicesStatusExW(struct rpc_pipe_client *cli, TALLOC_CTX *m *services = *r.out.services; *bytes_needed = *r.out.bytes_needed; *service_returned = *r.out.service_returned; - *resume_handle = *r.out.resume_handle; + if ( resume_handle ) { + *resume_handle = *r.out.resume_handle; + } *group_name = *r.out.group_name; /* Return result */ @@ -1295,6 +1491,10 @@ NTSTATUS rpccli_svcctl_SCSendTSMessage(struct rpc_pipe_client *cli, TALLOC_CTX * status = cli_do_rpc_ndr(cli, mem_ctx, PI_SVCCTL, DCERPC_SVCCTL_SCSENDTSMESSAGE, &r, (ndr_pull_flags_fn_t)ndr_pull_svcctl_SCSendTSMessage, (ndr_push_flags_fn_t)ndr_push_svcctl_SCSendTSMessage); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(svcctl_SCSendTSMessage, &r); diff --git a/source3/librpc/gen_ndr/cli_unixinfo.c b/source3/librpc/gen_ndr/cli_unixinfo.c index 8448b76a8d..49ac8c8e72 100644 --- a/source3/librpc/gen_ndr/cli_unixinfo.c +++ b/source3/librpc/gen_ndr/cli_unixinfo.c @@ -19,6 +19,10 @@ NTSTATUS rpccli_unixinfo_SidToUid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c status = cli_do_rpc_ndr(cli, mem_ctx, PI_UNIXINFO, DCERPC_UNIXINFO_SIDTOUID, &r, (ndr_pull_flags_fn_t)ndr_pull_unixinfo_SidToUid, (ndr_push_flags_fn_t)ndr_push_unixinfo_SidToUid); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(unixinfo_SidToUid, &r); @@ -46,6 +50,10 @@ NTSTATUS rpccli_unixinfo_UidToSid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c status = cli_do_rpc_ndr(cli, mem_ctx, PI_UNIXINFO, DCERPC_UNIXINFO_UIDTOSID, &r, (ndr_pull_flags_fn_t)ndr_pull_unixinfo_UidToSid, (ndr_push_flags_fn_t)ndr_push_unixinfo_UidToSid); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(unixinfo_UidToSid, &r); @@ -54,7 +62,9 @@ NTSTATUS rpccli_unixinfo_UidToSid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c } /* Return variables */ - *sid = *r.out.sid; + if ( sid ) { + *sid = *r.out.sid; + } /* Return result */ return r.out.result; @@ -73,6 +83,10 @@ NTSTATUS rpccli_unixinfo_SidToGid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c status = cli_do_rpc_ndr(cli, mem_ctx, PI_UNIXINFO, DCERPC_UNIXINFO_SIDTOGID, &r, (ndr_pull_flags_fn_t)ndr_pull_unixinfo_SidToGid, (ndr_push_flags_fn_t)ndr_push_unixinfo_SidToGid); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(unixinfo_SidToGid, &r); @@ -100,6 +114,10 @@ NTSTATUS rpccli_unixinfo_GidToSid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c status = cli_do_rpc_ndr(cli, mem_ctx, PI_UNIXINFO, DCERPC_UNIXINFO_GIDTOSID, &r, (ndr_pull_flags_fn_t)ndr_pull_unixinfo_GidToSid, (ndr_push_flags_fn_t)ndr_push_unixinfo_GidToSid); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(unixinfo_GidToSid, &r); @@ -108,7 +126,9 @@ NTSTATUS rpccli_unixinfo_GidToSid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c } /* Return variables */ - *sid = *r.out.sid; + if ( sid ) { + *sid = *r.out.sid; + } /* Return result */ return r.out.result; @@ -128,6 +148,10 @@ NTSTATUS rpccli_unixinfo_GetPWUid(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c status = cli_do_rpc_ndr(cli, mem_ctx, PI_UNIXINFO, DCERPC_UNIXINFO_GETPWUID, &r, (ndr_pull_flags_fn_t)ndr_pull_unixinfo_GetPWUid, (ndr_push_flags_fn_t)ndr_push_unixinfo_GetPWUid); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(unixinfo_GetPWUid, &r); diff --git a/source3/librpc/gen_ndr/cli_winreg.c b/source3/librpc/gen_ndr/cli_winreg.c index 373fe0782d..e8f24f1941 100644 --- a/source3/librpc/gen_ndr/cli_winreg.c +++ b/source3/librpc/gen_ndr/cli_winreg.c @@ -20,6 +20,10 @@ NTSTATUS rpccli_winreg_OpenHKCR(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_OPENHKCR, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_OpenHKCR, (ndr_push_flags_fn_t)ndr_push_winreg_OpenHKCR); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_OpenHKCR, &r); @@ -48,6 +52,10 @@ NTSTATUS rpccli_winreg_OpenHKCU(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_OPENHKCU, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_OpenHKCU, (ndr_push_flags_fn_t)ndr_push_winreg_OpenHKCU); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_OpenHKCU, &r); @@ -76,6 +84,10 @@ NTSTATUS rpccli_winreg_OpenHKLM(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_OPENHKLM, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_OpenHKLM, (ndr_push_flags_fn_t)ndr_push_winreg_OpenHKLM); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_OpenHKLM, &r); @@ -104,6 +116,10 @@ NTSTATUS rpccli_winreg_OpenHKPD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_OPENHKPD, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_OpenHKPD, (ndr_push_flags_fn_t)ndr_push_winreg_OpenHKPD); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_OpenHKPD, &r); @@ -132,6 +148,10 @@ NTSTATUS rpccli_winreg_OpenHKU(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_OPENHKU, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_OpenHKU, (ndr_push_flags_fn_t)ndr_push_winreg_OpenHKU); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_OpenHKU, &r); @@ -159,6 +179,10 @@ NTSTATUS rpccli_winreg_CloseKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_CLOSEKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_CloseKey, (ndr_push_flags_fn_t)ndr_push_winreg_CloseKey); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_CloseKey, &r); @@ -192,6 +216,10 @@ NTSTATUS rpccli_winreg_CreateKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_CREATEKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_CreateKey, (ndr_push_flags_fn_t)ndr_push_winreg_CreateKey); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_CreateKey, &r); @@ -201,7 +229,9 @@ NTSTATUS rpccli_winreg_CreateKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct /* Return variables */ *new_handle = *r.out.new_handle; - *action_taken = *r.out.action_taken; + if ( action_taken ) { + *action_taken = *r.out.action_taken; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -221,6 +251,10 @@ NTSTATUS rpccli_winreg_DeleteKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_DELETEKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_DeleteKey, (ndr_push_flags_fn_t)ndr_push_winreg_DeleteKey); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_DeleteKey, &r); @@ -248,6 +282,10 @@ NTSTATUS rpccli_winreg_DeleteValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_DELETEVALUE, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_DeleteValue, (ndr_push_flags_fn_t)ndr_push_winreg_DeleteValue); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_DeleteValue, &r); @@ -278,6 +316,10 @@ NTSTATUS rpccli_winreg_EnumKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_ENUMKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_EnumKey, (ndr_push_flags_fn_t)ndr_push_winreg_EnumKey); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_EnumKey, &r); @@ -287,8 +329,12 @@ NTSTATUS rpccli_winreg_EnumKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, /* Return variables */ *name = *r.out.name; - *keyclass = *r.out.keyclass; - *last_changed_time = *r.out.last_changed_time; + if ( keyclass ) { + *keyclass = *r.out.keyclass; + } + if ( last_changed_time ) { + *last_changed_time = *r.out.last_changed_time; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -313,6 +359,10 @@ NTSTATUS rpccli_winreg_EnumValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_ENUMVALUE, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_EnumValue, (ndr_push_flags_fn_t)ndr_push_winreg_EnumValue); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_EnumValue, &r); @@ -322,10 +372,18 @@ NTSTATUS rpccli_winreg_EnumValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct /* Return variables */ *name = *r.out.name; - *type = *r.out.type; - *data = *r.out.data; - *data_size = *r.out.data_size; - *value_length = *r.out.value_length; + if ( type ) { + *type = *r.out.type; + } + if ( data ) { + *data = *r.out.data; + } + if ( data_size ) { + *data_size = *r.out.data_size; + } + if ( value_length ) { + *value_length = *r.out.value_length; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -344,6 +402,10 @@ NTSTATUS rpccli_winreg_FlushKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_FLUSHKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_FlushKey, (ndr_push_flags_fn_t)ndr_push_winreg_FlushKey); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_FlushKey, &r); @@ -372,6 +434,10 @@ NTSTATUS rpccli_winreg_GetKeySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *m status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_GETKEYSECURITY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_GetKeySecurity, (ndr_push_flags_fn_t)ndr_push_winreg_GetKeySecurity); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_GetKeySecurity, &r); @@ -401,6 +467,10 @@ NTSTATUS rpccli_winreg_LoadKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_LOADKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_LoadKey, (ndr_push_flags_fn_t)ndr_push_winreg_LoadKey); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_LoadKey, &r); @@ -433,6 +503,10 @@ NTSTATUS rpccli_winreg_NotifyChangeKeyValue(struct rpc_pipe_client *cli, TALLOC_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_NOTIFYCHANGEKEYVALUE, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_NotifyChangeKeyValue, (ndr_push_flags_fn_t)ndr_push_winreg_NotifyChangeKeyValue); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_NotifyChangeKeyValue, &r); @@ -462,6 +536,10 @@ NTSTATUS rpccli_winreg_OpenKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_OPENKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_OpenKey, (ndr_push_flags_fn_t)ndr_push_winreg_OpenKey); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_OpenKey, &r); @@ -476,7 +554,7 @@ NTSTATUS rpccli_winreg_OpenKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, 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_subkeysize, 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) { struct winreg_QueryInfoKey r; NTSTATUS status; @@ -490,6 +568,10 @@ NTSTATUS rpccli_winreg_QueryInfoKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_QUERYINFOKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_QueryInfoKey, (ndr_push_flags_fn_t)ndr_push_winreg_QueryInfoKey); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_QueryInfoKey, &r); @@ -501,7 +583,7 @@ NTSTATUS rpccli_winreg_QueryInfoKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem *classname = *r.out.classname; *num_subkeys = *r.out.num_subkeys; *max_subkeylen = *r.out.max_subkeylen; - *max_subkeysize = *r.out.max_subkeysize; + *max_classlen = *r.out.max_classlen; *num_values = *r.out.num_values; *max_valnamelen = *r.out.max_valnamelen; *max_valbufsize = *r.out.max_valbufsize; @@ -530,6 +612,10 @@ NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_QUERYVALUE, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_QueryValue, (ndr_push_flags_fn_t)ndr_push_winreg_QueryValue); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_QueryValue, &r); @@ -538,10 +624,18 @@ NTSTATUS rpccli_winreg_QueryValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c } /* Return variables */ - *type = *r.out.type; - *data = *r.out.data; - *data_size = *r.out.data_size; - *value_length = *r.out.value_length; + if ( type ) { + *type = *r.out.type; + } + if ( data ) { + *data = *r.out.data; + } + if ( data_size ) { + *data_size = *r.out.data_size; + } + if ( value_length ) { + *value_length = *r.out.value_length; + } /* Return result */ return werror_to_ntstatus(r.out.result); @@ -559,6 +653,10 @@ NTSTATUS rpccli_winreg_ReplaceKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_REPLACEKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_ReplaceKey, (ndr_push_flags_fn_t)ndr_push_winreg_ReplaceKey); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_ReplaceKey, &r); @@ -587,6 +685,10 @@ NTSTATUS rpccli_winreg_RestoreKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_RESTOREKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_RestoreKey, (ndr_push_flags_fn_t)ndr_push_winreg_RestoreKey); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_RestoreKey, &r); @@ -615,6 +717,10 @@ NTSTATUS rpccli_winreg_SaveKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_SAVEKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_SaveKey, (ndr_push_flags_fn_t)ndr_push_winreg_SaveKey); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_SaveKey, &r); @@ -643,6 +749,10 @@ NTSTATUS rpccli_winreg_SetKeySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *m status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_SETKEYSECURITY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_SetKeySecurity, (ndr_push_flags_fn_t)ndr_push_winreg_SetKeySecurity); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_SetKeySecurity, &r); @@ -674,6 +784,10 @@ NTSTATUS rpccli_winreg_SetValue(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_SETVALUE, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_SetValue, (ndr_push_flags_fn_t)ndr_push_winreg_SetValue); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_SetValue, &r); @@ -699,6 +813,10 @@ NTSTATUS rpccli_winreg_UnLoadKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_UNLOADKEY, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_UnLoadKey, (ndr_push_flags_fn_t)ndr_push_winreg_UnLoadKey); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_UnLoadKey, &r); @@ -729,6 +847,10 @@ NTSTATUS rpccli_winreg_InitiateSystemShutdown(struct rpc_pipe_client *cli, TALLO status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_INITIATESYSTEMSHUTDOWN, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_InitiateSystemShutdown, (ndr_push_flags_fn_t)ndr_push_winreg_InitiateSystemShutdown); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_InitiateSystemShutdown, &r); @@ -755,6 +877,10 @@ NTSTATUS rpccli_winreg_AbortSystemShutdown(struct rpc_pipe_client *cli, TALLOC_C status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_ABORTSYSTEMSHUTDOWN, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_AbortSystemShutdown, (ndr_push_flags_fn_t)ndr_push_winreg_AbortSystemShutdown); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_AbortSystemShutdown, &r); @@ -781,6 +907,10 @@ NTSTATUS rpccli_winreg_GetVersion(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_GETVERSION, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_GetVersion, (ndr_push_flags_fn_t)ndr_push_winreg_GetVersion); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_GetVersion, &r); @@ -809,6 +939,10 @@ NTSTATUS rpccli_winreg_OpenHKCC(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_OPENHKCC, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_OpenHKCC, (ndr_push_flags_fn_t)ndr_push_winreg_OpenHKCC); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_OpenHKCC, &r); @@ -837,6 +971,10 @@ NTSTATUS rpccli_winreg_OpenHKDD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_OPENHKDD, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_OpenHKDD, (ndr_push_flags_fn_t)ndr_push_winreg_OpenHKDD); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_OpenHKDD, &r); @@ -868,6 +1006,10 @@ NTSTATUS rpccli_winreg_QueryMultipleValues(struct rpc_pipe_client *cli, TALLOC_C status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_QUERYMULTIPLEVALUES, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_QueryMultipleValues, (ndr_push_flags_fn_t)ndr_push_winreg_QueryMultipleValues); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_QueryMultipleValues, &r); @@ -877,7 +1019,9 @@ NTSTATUS rpccli_winreg_QueryMultipleValues(struct rpc_pipe_client *cli, TALLOC_C /* Return variables */ *values = *r.out.values; - *buffer = *r.out.buffer; + if ( buffer ) { + *buffer = *r.out.buffer; + } *buffer_size = *r.out.buffer_size; /* Return result */ @@ -902,6 +1046,10 @@ NTSTATUS rpccli_winreg_InitiateSystemShutdownEx(struct rpc_pipe_client *cli, TAL status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_INITIATESYSTEMSHUTDOWNEX, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_InitiateSystemShutdownEx, (ndr_push_flags_fn_t)ndr_push_winreg_InitiateSystemShutdownEx); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_InitiateSystemShutdownEx, &r); @@ -927,6 +1075,10 @@ NTSTATUS rpccli_winreg_SaveKeyEx(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_SAVEKEYEX, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_SaveKeyEx, (ndr_push_flags_fn_t)ndr_push_winreg_SaveKeyEx); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_SaveKeyEx, &r); @@ -954,6 +1106,10 @@ NTSTATUS rpccli_winreg_OpenHKPT(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_OPENHKPT, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_OpenHKPT, (ndr_push_flags_fn_t)ndr_push_winreg_OpenHKPT); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_OpenHKPT, &r); @@ -982,6 +1138,10 @@ NTSTATUS rpccli_winreg_OpenHKPN(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_OPENHKPN, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_OpenHKPN, (ndr_push_flags_fn_t)ndr_push_winreg_OpenHKPN); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_OpenHKPN, &r); @@ -1008,6 +1168,10 @@ NTSTATUS rpccli_winreg_QueryMultipleValues2(struct rpc_pipe_client *cli, TALLOC_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_WINREG, DCERPC_WINREG_QUERYMULTIPLEVALUES2, &r, (ndr_pull_flags_fn_t)ndr_pull_winreg_QueryMultipleValues2, (ndr_push_flags_fn_t)ndr_push_winreg_QueryMultipleValues2); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_QueryMultipleValues2, &r); diff --git a/source3/librpc/gen_ndr/cli_winreg.h b/source3/librpc/gen_ndr/cli_winreg.h index 9b799bdbf9..d6df871c9a 100644 --- a/source3/librpc/gen_ndr/cli_winreg.h +++ b/source3/librpc/gen_ndr/cli_winreg.h @@ -17,7 +17,7 @@ NTSTATUS rpccli_winreg_GetKeySecurity(struct rpc_pipe_client *cli, TALLOC_CTX *m 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_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_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_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_subkeysize, 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); 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_ReplaceKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx); NTSTATUS rpccli_winreg_RestoreKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, struct policy_handle *handle, struct winreg_String *filename, uint32_t flags); diff --git a/source3/librpc/gen_ndr/cli_wkssvc.c b/source3/librpc/gen_ndr/cli_wkssvc.c index 998b85b87e..918851a15e 100644 --- a/source3/librpc/gen_ndr/cli_wkssvc.c +++ b/source3/librpc/gen_ndr/cli_wkssvc.c @@ -20,6 +20,10 @@ NTSTATUS rpccli_wkssvc_NetWkstaGetInfo(struct rpc_pipe_client *cli, TALLOC_CTX * status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETWKSTAGETINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_wkssvc_NetWkstaGetInfo, (ndr_push_flags_fn_t)ndr_push_wkssvc_NetWkstaGetInfo); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaGetInfo, &r); @@ -50,6 +54,10 @@ NTSTATUS rpccli_wkssvc_NetWkstaSetInfo(struct rpc_pipe_client *cli, TALLOC_CTX * status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETWKSTASETINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_wkssvc_NetWkstaSetInfo, (ndr_push_flags_fn_t)ndr_push_wkssvc_NetWkstaSetInfo); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaSetInfo, &r); @@ -81,6 +89,10 @@ NTSTATUS rpccli_wkssvc_NetWkstaEnumUsers(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETWKSTAENUMUSERS, &r, (ndr_pull_flags_fn_t)ndr_pull_wkssvc_NetWkstaEnumUsers, (ndr_push_flags_fn_t)ndr_push_wkssvc_NetWkstaEnumUsers); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaEnumUsers, &r); @@ -90,8 +102,12 @@ NTSTATUS rpccli_wkssvc_NetWkstaEnumUsers(struct rpc_pipe_client *cli, TALLOC_CTX /* Return variables */ *users = *r.out.users; - *entriesread = *r.out.entriesread; - *totalentries = *r.out.totalentries; + if ( entriesread ) { + *entriesread = *r.out.entriesread; + } + if ( totalentries ) { + *totalentries = *r.out.totalentries; + } *resumehandle = *r.out.resumehandle; /* Return result */ @@ -110,6 +126,10 @@ NTSTATUS rpccli_WKSSVC_NETRWKSTAUSERGETINFO(struct rpc_pipe_client *cli, TALLOC_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETRWKSTAUSERGETINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_WKSSVC_NETRWKSTAUSERGETINFO, (ndr_push_flags_fn_t)ndr_push_WKSSVC_NETRWKSTAUSERGETINFO); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(WKSSVC_NETRWKSTAUSERGETINFO, &r); @@ -135,6 +155,10 @@ NTSTATUS rpccli_WKSSVC_NETRWKSTAUSERSETINFO(struct rpc_pipe_client *cli, TALLOC_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETRWKSTAUSERSETINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_WKSSVC_NETRWKSTAUSERSETINFO, (ndr_push_flags_fn_t)ndr_push_WKSSVC_NETRWKSTAUSERSETINFO); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(WKSSVC_NETRWKSTAUSERSETINFO, &r); @@ -165,6 +189,10 @@ NTSTATUS rpccli_wkssvc_NetWkstaTransportEnum(struct rpc_pipe_client *cli, TALLOC status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETWKSTATRANSPORTENUM, &r, (ndr_pull_flags_fn_t)ndr_pull_wkssvc_NetWkstaTransportEnum, (ndr_push_flags_fn_t)ndr_push_wkssvc_NetWkstaTransportEnum); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaTransportEnum, &r); @@ -175,7 +203,9 @@ NTSTATUS rpccli_wkssvc_NetWkstaTransportEnum(struct rpc_pipe_client *cli, TALLOC /* Return variables */ *level = *r.out.level; *ctr = *r.out.ctr; - *totalentries = *r.out.totalentries; + if ( totalentries ) { + *totalentries = *r.out.totalentries; + } *resume_handle = *r.out.resume_handle; /* Return result */ @@ -194,6 +224,10 @@ NTSTATUS rpccli_WKSSVC_NETRWKSTATRANSPORTADD(struct rpc_pipe_client *cli, TALLOC status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETRWKSTATRANSPORTADD, &r, (ndr_pull_flags_fn_t)ndr_pull_WKSSVC_NETRWKSTATRANSPORTADD, (ndr_push_flags_fn_t)ndr_push_WKSSVC_NETRWKSTATRANSPORTADD); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(WKSSVC_NETRWKSTATRANSPORTADD, &r); @@ -219,6 +253,10 @@ NTSTATUS rpccli_WKSSVC_NETRWKSTATRANSPORTDEL(struct rpc_pipe_client *cli, TALLOC status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETRWKSTATRANSPORTDEL, &r, (ndr_pull_flags_fn_t)ndr_pull_WKSSVC_NETRWKSTATRANSPORTDEL, (ndr_push_flags_fn_t)ndr_push_WKSSVC_NETRWKSTATRANSPORTDEL); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(WKSSVC_NETRWKSTATRANSPORTDEL, &r); @@ -244,6 +282,10 @@ NTSTATUS rpccli_WKSSVC_NETRUSEADD(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETRUSEADD, &r, (ndr_pull_flags_fn_t)ndr_pull_WKSSVC_NETRUSEADD, (ndr_push_flags_fn_t)ndr_push_WKSSVC_NETRUSEADD); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(WKSSVC_NETRUSEADD, &r); @@ -269,6 +311,10 @@ NTSTATUS rpccli_WKSSVC_NETRUSEGETINFO(struct rpc_pipe_client *cli, TALLOC_CTX *m status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETRUSEGETINFO, &r, (ndr_pull_flags_fn_t)ndr_pull_WKSSVC_NETRUSEGETINFO, (ndr_push_flags_fn_t)ndr_push_WKSSVC_NETRUSEGETINFO); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(WKSSVC_NETRUSEGETINFO, &r); @@ -294,6 +340,10 @@ NTSTATUS rpccli_WKSSVC_NETRUSEDEL(struct rpc_pipe_client *cli, TALLOC_CTX *mem_c status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETRUSEDEL, &r, (ndr_pull_flags_fn_t)ndr_pull_WKSSVC_NETRUSEDEL, (ndr_push_flags_fn_t)ndr_push_WKSSVC_NETRUSEDEL); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(WKSSVC_NETRUSEDEL, &r); @@ -319,6 +369,10 @@ NTSTATUS rpccli_WKSSVC_NETRUSEENUM(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETRUSEENUM, &r, (ndr_pull_flags_fn_t)ndr_pull_WKSSVC_NETRUSEENUM, (ndr_push_flags_fn_t)ndr_push_WKSSVC_NETRUSEENUM); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(WKSSVC_NETRUSEENUM, &r); @@ -344,6 +398,10 @@ NTSTATUS rpccli_WKSSVC_NETRMESSAGEBUFFERSEND(struct rpc_pipe_client *cli, TALLOC status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETRMESSAGEBUFFERSEND, &r, (ndr_pull_flags_fn_t)ndr_pull_WKSSVC_NETRMESSAGEBUFFERSEND, (ndr_push_flags_fn_t)ndr_push_WKSSVC_NETRMESSAGEBUFFERSEND); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(WKSSVC_NETRMESSAGEBUFFERSEND, &r); @@ -369,6 +427,10 @@ NTSTATUS rpccli_WKSSVC_NETRWORKSTATIONSTATISTICSGET(struct rpc_pipe_client *cli, status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETRWORKSTATIONSTATISTICSGET, &r, (ndr_pull_flags_fn_t)ndr_pull_WKSSVC_NETRWORKSTATIONSTATISTICSGET, (ndr_push_flags_fn_t)ndr_push_WKSSVC_NETRWORKSTATIONSTATISTICSGET); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(WKSSVC_NETRWORKSTATIONSTATISTICSGET, &r); @@ -394,6 +456,10 @@ NTSTATUS rpccli_WKSSVC_NETRLOGONDOMAINNAMEADD(struct rpc_pipe_client *cli, TALLO status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETRLOGONDOMAINNAMEADD, &r, (ndr_pull_flags_fn_t)ndr_pull_WKSSVC_NETRLOGONDOMAINNAMEADD, (ndr_push_flags_fn_t)ndr_push_WKSSVC_NETRLOGONDOMAINNAMEADD); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(WKSSVC_NETRLOGONDOMAINNAMEADD, &r); @@ -419,6 +485,10 @@ NTSTATUS rpccli_WKSSVC_NETRLOGONDOMAINNAMEDEL(struct rpc_pipe_client *cli, TALLO status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETRLOGONDOMAINNAMEDEL, &r, (ndr_pull_flags_fn_t)ndr_pull_WKSSVC_NETRLOGONDOMAINNAMEDEL, (ndr_push_flags_fn_t)ndr_push_WKSSVC_NETRLOGONDOMAINNAMEDEL); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(WKSSVC_NETRLOGONDOMAINNAMEDEL, &r); @@ -444,6 +514,10 @@ NTSTATUS rpccli_WKSSVC_NETRJOINDOMAIN(struct rpc_pipe_client *cli, TALLOC_CTX *m status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETRJOINDOMAIN, &r, (ndr_pull_flags_fn_t)ndr_pull_WKSSVC_NETRJOINDOMAIN, (ndr_push_flags_fn_t)ndr_push_WKSSVC_NETRJOINDOMAIN); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(WKSSVC_NETRJOINDOMAIN, &r); @@ -469,6 +543,10 @@ NTSTATUS rpccli_WKSSVC_NETRUNJOINDOMAIN(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETRUNJOINDOMAIN, &r, (ndr_pull_flags_fn_t)ndr_pull_WKSSVC_NETRUNJOINDOMAIN, (ndr_push_flags_fn_t)ndr_push_WKSSVC_NETRUNJOINDOMAIN); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(WKSSVC_NETRUNJOINDOMAIN, &r); @@ -494,6 +572,10 @@ NTSTATUS rpccli_WKSSVC_NETRRENAMEMACHINEINDOMAIN(struct rpc_pipe_client *cli, TA status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETRRENAMEMACHINEINDOMAIN, &r, (ndr_pull_flags_fn_t)ndr_pull_WKSSVC_NETRRENAMEMACHINEINDOMAIN, (ndr_push_flags_fn_t)ndr_push_WKSSVC_NETRRENAMEMACHINEINDOMAIN); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(WKSSVC_NETRRENAMEMACHINEINDOMAIN, &r); @@ -519,6 +601,10 @@ NTSTATUS rpccli_WKSSVC_NETRVALIDATENAME(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETRVALIDATENAME, &r, (ndr_pull_flags_fn_t)ndr_pull_WKSSVC_NETRVALIDATENAME, (ndr_push_flags_fn_t)ndr_push_WKSSVC_NETRVALIDATENAME); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(WKSSVC_NETRVALIDATENAME, &r); @@ -544,6 +630,10 @@ NTSTATUS rpccli_WKSSVC_NETRGETJOININFORMATION(struct rpc_pipe_client *cli, TALLO status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETRGETJOININFORMATION, &r, (ndr_pull_flags_fn_t)ndr_pull_WKSSVC_NETRGETJOININFORMATION, (ndr_push_flags_fn_t)ndr_push_WKSSVC_NETRGETJOININFORMATION); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(WKSSVC_NETRGETJOININFORMATION, &r); @@ -569,6 +659,10 @@ NTSTATUS rpccli_WKSSVC_NETRGETJOINABLEOUS(struct rpc_pipe_client *cli, TALLOC_CT status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETRGETJOINABLEOUS, &r, (ndr_pull_flags_fn_t)ndr_pull_WKSSVC_NETRGETJOINABLEOUS, (ndr_push_flags_fn_t)ndr_push_WKSSVC_NETRGETJOINABLEOUS); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(WKSSVC_NETRGETJOINABLEOUS, &r); @@ -600,6 +694,10 @@ NTSTATUS rpccli_wkssvc_NetrJoinDomain2(struct rpc_pipe_client *cli, TALLOC_CTX * status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETRJOINDOMAIN2, &r, (ndr_pull_flags_fn_t)ndr_pull_wkssvc_NetrJoinDomain2, (ndr_push_flags_fn_t)ndr_push_wkssvc_NetrJoinDomain2); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(wkssvc_NetrJoinDomain2, &r); @@ -629,6 +727,10 @@ NTSTATUS rpccli_wkssvc_NetrUnjoinDomain2(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETRUNJOINDOMAIN2, &r, (ndr_pull_flags_fn_t)ndr_pull_wkssvc_NetrUnjoinDomain2, (ndr_push_flags_fn_t)ndr_push_wkssvc_NetrUnjoinDomain2); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(wkssvc_NetrUnjoinDomain2, &r); @@ -659,6 +761,10 @@ NTSTATUS rpccli_wkssvc_NetrRenameMachineInDomain2(struct rpc_pipe_client *cli, T status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETRRENAMEMACHINEINDOMAIN2, &r, (ndr_pull_flags_fn_t)ndr_pull_wkssvc_NetrRenameMachineInDomain2, (ndr_push_flags_fn_t)ndr_push_wkssvc_NetrRenameMachineInDomain2); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(wkssvc_NetrRenameMachineInDomain2, &r); @@ -684,6 +790,10 @@ NTSTATUS rpccli_WKSSVC_NETRVALIDATENAME2(struct rpc_pipe_client *cli, TALLOC_CTX status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETRVALIDATENAME2, &r, (ndr_pull_flags_fn_t)ndr_pull_WKSSVC_NETRVALIDATENAME2, (ndr_push_flags_fn_t)ndr_push_WKSSVC_NETRVALIDATENAME2); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(WKSSVC_NETRVALIDATENAME2, &r); @@ -709,6 +819,10 @@ NTSTATUS rpccli_WKSSVC_NETRGETJOINABLEOUS2(struct rpc_pipe_client *cli, TALLOC_C status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETRGETJOINABLEOUS2, &r, (ndr_pull_flags_fn_t)ndr_pull_WKSSVC_NETRGETJOINABLEOUS2, (ndr_push_flags_fn_t)ndr_push_WKSSVC_NETRGETJOINABLEOUS2); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(WKSSVC_NETRGETJOINABLEOUS2, &r); @@ -739,6 +853,10 @@ NTSTATUS rpccli_wkssvc_NetrAddAlternateComputerName(struct rpc_pipe_client *cli, status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETRADDALTERNATECOMPUTERNAME, &r, (ndr_pull_flags_fn_t)ndr_pull_wkssvc_NetrAddAlternateComputerName, (ndr_push_flags_fn_t)ndr_push_wkssvc_NetrAddAlternateComputerName); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(wkssvc_NetrAddAlternateComputerName, &r); @@ -769,6 +887,10 @@ NTSTATUS rpccli_wkssvc_NetrRemoveAlternateComputerName(struct rpc_pipe_client *c status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME, &r, (ndr_pull_flags_fn_t)ndr_pull_wkssvc_NetrRemoveAlternateComputerName, (ndr_push_flags_fn_t)ndr_push_wkssvc_NetrRemoveAlternateComputerName); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(wkssvc_NetrRemoveAlternateComputerName, &r); @@ -794,6 +916,10 @@ NTSTATUS rpccli_WKSSVC_NETRSETPRIMARYCOMPUTERNAME(struct rpc_pipe_client *cli, T status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETRSETPRIMARYCOMPUTERNAME, &r, (ndr_pull_flags_fn_t)ndr_pull_WKSSVC_NETRSETPRIMARYCOMPUTERNAME, (ndr_push_flags_fn_t)ndr_push_WKSSVC_NETRSETPRIMARYCOMPUTERNAME); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(WKSSVC_NETRSETPRIMARYCOMPUTERNAME, &r); @@ -819,6 +945,10 @@ NTSTATUS rpccli_WKSSVC_NETRENUMERATECOMPUTERNAMES(struct rpc_pipe_client *cli, T status = cli_do_rpc_ndr(cli, mem_ctx, PI_WKSSVC, DCERPC_WKSSVC_NETRENUMERATECOMPUTERNAMES, &r, (ndr_pull_flags_fn_t)ndr_pull_WKSSVC_NETRENUMERATECOMPUTERNAMES, (ndr_push_flags_fn_t)ndr_push_WKSSVC_NETRENUMERATECOMPUTERNAMES); + if ( !NT_STATUS_IS_OK(status) ) { + return status; + } + if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(WKSSVC_NETRENUMERATECOMPUTERNAMES, &r); diff --git a/source3/librpc/gen_ndr/ndr_winreg.c b/source3/librpc/gen_ndr/ndr_winreg.c index 27123d3ac2..67fd9f52c5 100644 --- a/source3/librpc/gen_ndr/ndr_winreg.c +++ b/source3/librpc/gen_ndr/ndr_winreg.c @@ -268,7 +268,7 @@ NTSTATUS ndr_push_winreg_StringBuf(struct ndr_push *ndr, int ndr_flags, const st { if (ndr_flags & NDR_SCALARS) { NDR_CHECK(ndr_push_align(ndr, 4)); - NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->name)*2)); + NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m(r->name)*2)); NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->size)); NDR_CHECK(ndr_push_unique_ptr(ndr, r->name)); } @@ -276,8 +276,8 @@ NTSTATUS ndr_push_winreg_StringBuf(struct ndr_push *ndr, int ndr_flags, const st if (r->name) { NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size/2)); NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0)); - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m_term(r->name)*2/2)); - NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, strlen_m_term(r->name)*2/2, sizeof(uint16_t), CH_UTF16)); + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen_m(r->name)*2/2)); + NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, strlen_m(r->name)*2/2, sizeof(uint16_t), CH_UTF16)); } } return NT_STATUS_OK; @@ -324,7 +324,7 @@ _PUBLIC_ void ndr_print_winreg_StringBuf(struct ndr_print *ndr, const char *name { ndr_print_struct(ndr, name, "winreg_StringBuf"); ndr->depth++; - ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->name)*2:r->length); + ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m(r->name)*2:r->length); ndr_print_uint16(ndr, "size", r->size); ndr_print_ptr(ndr, "name", r->name); ndr->depth++; @@ -2111,8 +2111,8 @@ NTSTATUS ndr_push_winreg_QueryInfoKey(struct ndr_push *ndr, int flags, const str NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_subkeys)); if (r->out.max_subkeylen == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.max_subkeylen)); - if (r->out.max_subkeysize == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; - NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.max_subkeysize)); + if (r->out.max_classlen == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; + NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.max_classlen)); if (r->out.num_values == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_values)); if (r->out.max_valnamelen == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; @@ -2134,7 +2134,7 @@ NTSTATUS ndr_pull_winreg_QueryInfoKey(struct ndr_pull *ndr, int flags, struct wi TALLOC_CTX *_mem_save_classname_0; TALLOC_CTX *_mem_save_num_subkeys_0; TALLOC_CTX *_mem_save_max_subkeylen_0; - TALLOC_CTX *_mem_save_max_subkeysize_0; + TALLOC_CTX *_mem_save_max_classlen_0; TALLOC_CTX *_mem_save_num_values_0; TALLOC_CTX *_mem_save_max_valnamelen_0; TALLOC_CTX *_mem_save_max_valbufsize_0; @@ -2163,8 +2163,8 @@ NTSTATUS ndr_pull_winreg_QueryInfoKey(struct ndr_pull *ndr, int flags, struct wi ZERO_STRUCTP(r->out.num_subkeys); NDR_PULL_ALLOC(ndr, r->out.max_subkeylen); ZERO_STRUCTP(r->out.max_subkeylen); - NDR_PULL_ALLOC(ndr, r->out.max_subkeysize); - ZERO_STRUCTP(r->out.max_subkeysize); + NDR_PULL_ALLOC(ndr, r->out.max_classlen); + ZERO_STRUCTP(r->out.max_classlen); NDR_PULL_ALLOC(ndr, r->out.num_values); ZERO_STRUCTP(r->out.num_values); NDR_PULL_ALLOC(ndr, r->out.max_valnamelen); @@ -2199,12 +2199,12 @@ NTSTATUS ndr_pull_winreg_QueryInfoKey(struct ndr_pull *ndr, int flags, struct wi NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.max_subkeylen)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_max_subkeylen_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, r->out.max_subkeysize); + NDR_PULL_ALLOC(ndr, r->out.max_classlen); } - _mem_save_max_subkeysize_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.max_subkeysize, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.max_subkeysize)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_max_subkeysize_0, LIBNDR_FLAG_REF_ALLOC); + _mem_save_max_classlen_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.max_classlen, LIBNDR_FLAG_REF_ALLOC); + NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.max_classlen)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_max_classlen_0, LIBNDR_FLAG_REF_ALLOC); if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { NDR_PULL_ALLOC(ndr, r->out.num_values); } @@ -2280,9 +2280,9 @@ _PUBLIC_ void ndr_print_winreg_QueryInfoKey(struct ndr_print *ndr, const char *n ndr->depth++; ndr_print_uint32(ndr, "max_subkeylen", *r->out.max_subkeylen); ndr->depth--; - ndr_print_ptr(ndr, "max_subkeysize", r->out.max_subkeysize); + ndr_print_ptr(ndr, "max_classlen", r->out.max_classlen); ndr->depth++; - ndr_print_uint32(ndr, "max_subkeysize", *r->out.max_subkeysize); + ndr_print_uint32(ndr, "max_classlen", *r->out.max_classlen); ndr->depth--; ndr_print_ptr(ndr, "num_values", r->out.num_values); ndr->depth++; diff --git a/source3/librpc/gen_ndr/srv_winreg.c b/source3/librpc/gen_ndr/srv_winreg.c index 9df4952a5e..2aaf0a13cb 100644 --- a/source3/librpc/gen_ndr/srv_winreg.c +++ b/source3/librpc/gen_ndr/srv_winreg.c @@ -1008,8 +1008,8 @@ static BOOL api_winreg_QueryInfoKey(pipes_struct *p) return False; } - r.out.max_subkeysize = talloc_zero_size(mem_ctx, sizeof(*r.out.max_subkeysize)); - if (r.out.max_subkeysize == NULL) { + r.out.max_classlen = talloc_zero_size(mem_ctx, sizeof(*r.out.max_classlen)); + if (r.out.max_classlen == NULL) { talloc_free(mem_ctx); return False; } @@ -1044,7 +1044,7 @@ static BOOL api_winreg_QueryInfoKey(pipes_struct *p) return False; } - r.out.result = _winreg_QueryInfoKey(p, r.in.handle, r.in.classname, r.out.num_subkeys, r.out.max_subkeylen, r.out.max_subkeysize, r.out.num_values, r.out.max_valnamelen, r.out.max_valbufsize, r.out.secdescsize, r.out.last_changed_time); + r.out.result = _winreg_QueryInfoKey(p, r.in.handle, r.in.classname, r.out.num_subkeys, r.out.max_subkeylen, r.out.max_classlen, r.out.num_values, r.out.max_valnamelen, r.out.max_valbufsize, r.out.secdescsize, r.out.last_changed_time); if (DEBUGLEVEL >= 10) NDR_PRINT_OUT_DEBUG(winreg_QueryInfoKey, &r); diff --git a/source3/librpc/gen_ndr/srv_winreg.h b/source3/librpc/gen_ndr/srv_winreg.h index b0bffa6954..8c5505a878 100644 --- a/source3/librpc/gen_ndr/srv_winreg.h +++ b/source3/librpc/gen_ndr/srv_winreg.h @@ -17,7 +17,7 @@ WERROR _winreg_GetKeySecurity(pipes_struct *p, struct policy_handle *handle, uin WERROR _winreg_LoadKey(pipes_struct *p, struct policy_handle *handle, struct winreg_String *keyname, struct winreg_String *filename); WERROR _winreg_NotifyChangeKeyValue(pipes_struct *p, 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 _winreg_OpenKey(pipes_struct *p, struct policy_handle *parent_handle, struct winreg_String keyname, uint32_t unknown, uint32_t access_mask, struct policy_handle *handle); -WERROR _winreg_QueryInfoKey(pipes_struct *p, struct policy_handle *handle, struct winreg_String *classname, uint32_t *num_subkeys, uint32_t *max_subkeylen, uint32_t *max_subkeysize, uint32_t *num_values, uint32_t *max_valnamelen, uint32_t *max_valbufsize, uint32_t *secdescsize, NTTIME *last_changed_time); +WERROR _winreg_QueryInfoKey(pipes_struct *p, 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 _winreg_QueryValue(pipes_struct *p, 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 _winreg_ReplaceKey(pipes_struct *p); WERROR _winreg_RestoreKey(pipes_struct *p, struct policy_handle *handle, struct winreg_String *filename, uint32_t flags); diff --git a/source3/librpc/gen_ndr/winreg.h b/source3/librpc/gen_ndr/winreg.h index cb117cb037..24ed2e55f8 100644 --- a/source3/librpc/gen_ndr/winreg.h +++ b/source3/librpc/gen_ndr/winreg.h @@ -48,7 +48,7 @@ enum winreg_CreateAction { }; struct winreg_StringBuf { - uint16_t length;/* [value(strlen_m_term(name)*2)] */ + uint16_t length;/* [value(strlen_m(name)*2)] */ uint16_t size; const char *name;/* [unique,length_is(length/2),charset(UTF16),size_is(size/2)] */ }; @@ -323,7 +323,7 @@ struct winreg_QueryInfoKey { struct winreg_String *classname;/* [ref] */ uint32_t *num_subkeys;/* [ref] */ uint32_t *max_subkeylen;/* [ref] */ - uint32_t *max_subkeysize;/* [ref] */ + uint32_t *max_classlen;/* [ref] */ uint32_t *num_values;/* [ref] */ uint32_t *max_valnamelen;/* [ref] */ uint32_t *max_valbufsize;/* [ref] */ diff --git a/source3/librpc/idl/winreg.idl b/source3/librpc/idl/winreg.idl index b3658280be..5178e3c7a7 100644 --- a/source3/librpc/idl/winreg.idl +++ b/source3/librpc/idl/winreg.idl @@ -131,7 +131,7 @@ ); typedef struct { - [value(strlen_m_term(name)*2)] uint16 length; + [value(strlen_m(name)*2)] uint16 length; /* size cannot be auto-set by value() as it is the amount of space the server is allowed to use for this string in the reply, not its current size */ @@ -139,6 +139,9 @@ [size_is(size/2),length_is(length/2),charset(UTF16)] uint16 *name; } winreg_StringBuf; + + /******************/ + /* Function: 0x09 */ WERROR winreg_EnumKey( [in,ref] policy_handle *handle, [in] uint32 enum_index, @@ -211,7 +214,7 @@ [in,out,ref] winreg_String *classname, [out,ref] uint32 *num_subkeys, [out,ref] uint32 *max_subkeylen, - [out,ref] uint32 *max_subkeysize, + [out,ref] uint32 *max_classlen, [out,ref] uint32 *num_values, [out,ref] uint32 *max_valnamelen, [out,ref] uint32 *max_valbufsize, |