summaryrefslogtreecommitdiff
path: root/source3/librpc/gen_ndr/cli_lsa.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2006-09-28 21:19:08 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:14:53 -0500
commit18d417663395febe60b23f376b2e92c9869e1126 (patch)
treea949532d6eb08c9fd3be722ad9738c3d1c783743 /source3/librpc/gen_ndr/cli_lsa.c
parent0f56237bc0e0da61c958eb964b6a02958e0d5cda (diff)
downloadsamba-18d417663395febe60b23f376b2e92c9869e1126.tar.gz
samba-18d417663395febe60b23f376b2e92c9869e1126.tar.bz2
samba-18d417663395febe60b23f376b2e92c9869e1126.zip
r18981: * cleanup some vestiges of old cli_reg.c code and mark some TODO
items in cac_winreg.c * Get 'net rpc registry enumerate' to list values again * Fix winreg.idl QueryInfoKey(). The max_subkeysize is the max_classlen (we previously had this correct in Samba3") * fix valgrind error about uninitialized memory and use-before-set on size value inmemset() call * Fix key enumeration in 'net rpc registry enumerate' * regenerate gen_dir files based on local pidl patches Please note that the generated ndr files are from my local copy of pidl. If you need to regenerate, please apply the patch that I posted to the samba-technical list earlier today. (This used to be commit 5d843612a1b9d92022f76626f1c7473faebec4ba)
Diffstat (limited to 'source3/librpc/gen_ndr/cli_lsa.c')
-rw-r--r--source3/librpc/gen_ndr/cli_lsa.c420
1 files changed, 397 insertions, 23 deletions
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);