summaryrefslogtreecommitdiff
path: root/source3/librpc/gen_ndr
diff options
context:
space:
mode:
Diffstat (limited to 'source3/librpc/gen_ndr')
-rw-r--r--source3/librpc/gen_ndr/cli_lsa.c20
-rw-r--r--source3/librpc/gen_ndr/cli_lsa.h12
-rw-r--r--source3/librpc/gen_ndr/cli_netlogon.c2
-rw-r--r--source3/librpc/gen_ndr/cli_netlogon.h2
-rw-r--r--source3/librpc/gen_ndr/cli_samr.c2
-rw-r--r--source3/librpc/gen_ndr/cli_samr.h2
-rw-r--r--source3/librpc/gen_ndr/lsa.h16
-rw-r--r--source3/librpc/gen_ndr/ndr_lsa.c135
-rw-r--r--source3/librpc/gen_ndr/ndr_netlogon.c27
-rw-r--r--source3/librpc/gen_ndr/ndr_samr.c27
-rw-r--r--source3/librpc/gen_ndr/netlogon.h2
-rw-r--r--source3/librpc/gen_ndr/samr.h2
-rw-r--r--source3/librpc/gen_ndr/srv_lsa.c9
-rw-r--r--source3/librpc/gen_ndr/srv_netlogon.c2
-rw-r--r--source3/librpc/gen_ndr/srv_samr.c2
15 files changed, 207 insertions, 55 deletions
diff --git a/source3/librpc/gen_ndr/cli_lsa.c b/source3/librpc/gen_ndr/cli_lsa.c
index 227ae809c9..64da84d55f 100644
--- a/source3/librpc/gen_ndr/cli_lsa.c
+++ b/source3/librpc/gen_ndr/cli_lsa.c
@@ -762,7 +762,7 @@ NTSTATUS rpccli_lsa_OpenAccount(struct rpc_pipe_client *cli,
struct policy_handle *handle,
struct dom_sid2 *sid,
uint32_t access_mask,
- struct policy_handle *acct_handle)
+ struct policy_handle **acct_handle)
{
struct lsa_OpenAccount r;
NTSTATUS status;
@@ -1004,12 +1004,15 @@ NTSTATUS rpccli_lsa_SetQuotasForAccount(struct rpc_pipe_client *cli,
}
NTSTATUS rpccli_lsa_GetSystemAccessAccount(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx)
+ TALLOC_CTX *mem_ctx,
+ struct policy_handle *handle,
+ uint32_t *access_mask)
{
struct lsa_GetSystemAccessAccount r;
NTSTATUS status;
/* In parameters */
+ r.in.handle = handle;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(lsa_GetSystemAccessAccount, &r);
@@ -1035,18 +1038,23 @@ NTSTATUS rpccli_lsa_GetSystemAccessAccount(struct rpc_pipe_client *cli,
}
/* Return variables */
+ *access_mask = *r.out.access_mask;
/* Return result */
return r.out.result;
}
NTSTATUS rpccli_lsa_SetSystemAccessAccount(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx)
+ TALLOC_CTX *mem_ctx,
+ struct policy_handle *handle,
+ uint32_t access_mask)
{
struct lsa_SetSystemAccessAccount r;
NTSTATUS status;
/* In parameters */
+ r.in.handle = handle;
+ r.in.access_mask = access_mask;
if (DEBUGLEVEL >= 10) {
NDR_PRINT_IN_DEBUG(lsa_SetSystemAccessAccount, &r);
@@ -2085,7 +2093,7 @@ NTSTATUS rpccli_lsa_SetInfoPolicy2(struct rpc_pipe_client *cli,
NTSTATUS rpccli_lsa_QueryTrustedDomainInfoByName(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
- struct lsa_String trusted_domain,
+ struct lsa_String *trusted_domain,
enum lsa_TrustDomInfoEnum level,
union lsa_TrustedDomainInfo *info)
{
@@ -2121,9 +2129,7 @@ NTSTATUS rpccli_lsa_QueryTrustedDomainInfoByName(struct rpc_pipe_client *cli,
}
/* Return variables */
- if (info && r.out.info) {
- *info = *r.out.info;
- }
+ *info = *r.out.info;
/* Return result */
return r.out.result;
diff --git a/source3/librpc/gen_ndr/cli_lsa.h b/source3/librpc/gen_ndr/cli_lsa.h
index ec9abaf568..396debaca8 100644
--- a/source3/librpc/gen_ndr/cli_lsa.h
+++ b/source3/librpc/gen_ndr/cli_lsa.h
@@ -95,7 +95,7 @@ NTSTATUS rpccli_lsa_OpenAccount(struct rpc_pipe_client *cli,
struct policy_handle *handle,
struct dom_sid2 *sid,
uint32_t access_mask,
- struct policy_handle *acct_handle);
+ struct policy_handle **acct_handle);
NTSTATUS rpccli_lsa_EnumPrivsAccount(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
@@ -114,9 +114,13 @@ NTSTATUS rpccli_lsa_GetQuotasForAccount(struct rpc_pipe_client *cli,
NTSTATUS rpccli_lsa_SetQuotasForAccount(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx);
NTSTATUS rpccli_lsa_GetSystemAccessAccount(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx);
+ TALLOC_CTX *mem_ctx,
+ struct policy_handle *handle,
+ uint32_t *access_mask);
NTSTATUS rpccli_lsa_SetSystemAccessAccount(struct rpc_pipe_client *cli,
- TALLOC_CTX *mem_ctx);
+ TALLOC_CTX *mem_ctx,
+ struct policy_handle *handle,
+ uint32_t access_mask);
NTSTATUS rpccli_lsa_OpenTrustedDomain(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
@@ -229,7 +233,7 @@ NTSTATUS rpccli_lsa_SetInfoPolicy2(struct rpc_pipe_client *cli,
NTSTATUS rpccli_lsa_QueryTrustedDomainInfoByName(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *handle,
- struct lsa_String trusted_domain,
+ struct lsa_String *trusted_domain,
enum lsa_TrustDomInfoEnum level,
union lsa_TrustedDomainInfo *info);
NTSTATUS rpccli_lsa_SetTrustedDomainInfoByName(struct rpc_pipe_client *cli,
diff --git a/source3/librpc/gen_ndr/cli_netlogon.c b/source3/librpc/gen_ndr/cli_netlogon.c
index cac3962073..de04c21dc5 100644
--- a/source3/librpc/gen_ndr/cli_netlogon.c
+++ b/source3/librpc/gen_ndr/cli_netlogon.c
@@ -1057,7 +1057,7 @@ NTSTATUS rpccli_netr_DsRGetDCName(struct rpc_pipe_client *cli,
struct GUID *domain_guid,
struct GUID *site_guid,
uint32_t flags,
- struct netr_DsRGetDCNameInfo *info,
+ struct netr_DsRGetDCNameInfo **info,
WERROR *werror)
{
struct netr_DsRGetDCName r;
diff --git a/source3/librpc/gen_ndr/cli_netlogon.h b/source3/librpc/gen_ndr/cli_netlogon.h
index fa043233ea..4aa0f9fa73 100644
--- a/source3/librpc/gen_ndr/cli_netlogon.h
+++ b/source3/librpc/gen_ndr/cli_netlogon.h
@@ -178,7 +178,7 @@ NTSTATUS rpccli_netr_DsRGetDCName(struct rpc_pipe_client *cli,
struct GUID *domain_guid,
struct GUID *site_guid,
uint32_t flags,
- struct netr_DsRGetDCNameInfo *info,
+ struct netr_DsRGetDCNameInfo **info,
WERROR *werror);
NTSTATUS rpccli_netr_NETRLOGONDUMMYROUTINE1(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
diff --git a/source3/librpc/gen_ndr/cli_samr.c b/source3/librpc/gen_ndr/cli_samr.c
index c3cb5ad273..efedb00078 100644
--- a/source3/librpc/gen_ndr/cli_samr.c
+++ b/source3/librpc/gen_ndr/cli_samr.c
@@ -261,8 +261,8 @@ NTSTATUS rpccli_samr_EnumDomains(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *connect_handle,
uint32_t *resume_handle,
+ struct samr_SamArray **sam,
uint32_t buf_size,
- struct samr_SamArray *sam,
uint32_t *num_entries)
{
struct samr_EnumDomains r;
diff --git a/source3/librpc/gen_ndr/cli_samr.h b/source3/librpc/gen_ndr/cli_samr.h
index 5df5e3a70c..9eac177001 100644
--- a/source3/librpc/gen_ndr/cli_samr.h
+++ b/source3/librpc/gen_ndr/cli_samr.h
@@ -31,8 +31,8 @@ NTSTATUS rpccli_samr_EnumDomains(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
struct policy_handle *connect_handle,
uint32_t *resume_handle,
+ struct samr_SamArray **sam,
uint32_t buf_size,
- struct samr_SamArray *sam,
uint32_t *num_entries);
NTSTATUS rpccli_samr_OpenDomain(struct rpc_pipe_client *cli,
TALLOC_CTX *mem_ctx,
diff --git a/source3/librpc/gen_ndr/lsa.h b/source3/librpc/gen_ndr/lsa.h
index 810ce945da..06f714acc8 100644
--- a/source3/librpc/gen_ndr/lsa.h
+++ b/source3/librpc/gen_ndr/lsa.h
@@ -829,7 +829,7 @@ struct lsa_OpenAccount {
} in;
struct {
- struct policy_handle *acct_handle;/* [ref] */
+ struct policy_handle **acct_handle;/* [ref] */
NTSTATUS result;
} out;
@@ -894,6 +894,11 @@ struct lsa_SetQuotasForAccount {
struct lsa_GetSystemAccessAccount {
struct {
+ struct policy_handle *handle;/* [ref] */
+ } in;
+
+ struct {
+ uint32_t *access_mask;/* [ref] */
NTSTATUS result;
} out;
@@ -902,6 +907,11 @@ struct lsa_GetSystemAccessAccount {
struct lsa_SetSystemAccessAccount {
struct {
+ struct policy_handle *handle;/* [ref] */
+ uint32_t access_mask;
+ } in;
+
+ struct {
NTSTATUS result;
} out;
@@ -1223,12 +1233,12 @@ struct lsa_SetInfoPolicy2 {
struct lsa_QueryTrustedDomainInfoByName {
struct {
struct policy_handle *handle;/* [ref] */
- struct lsa_String trusted_domain;
+ struct lsa_String *trusted_domain;/* [ref] */
enum lsa_TrustDomInfoEnum level;
} in;
struct {
- union lsa_TrustedDomainInfo *info;/* [unique,switch_is(level)] */
+ union lsa_TrustedDomainInfo *info;/* [ref,switch_is(level)] */
NTSTATUS result;
} out;
diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c
index 8c863085a9..5ac4cbcb59 100644
--- a/source3/librpc/gen_ndr/ndr_lsa.c
+++ b/source3/librpc/gen_ndr/ndr_lsa.c
@@ -6208,7 +6208,10 @@ static enum ndr_err_code ndr_push_lsa_OpenAccount(struct ndr_push *ndr, int flag
if (r->out.acct_handle == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.acct_handle));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.acct_handle));
+ if (*r->out.acct_handle) {
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.acct_handle));
+ }
NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -6216,9 +6219,11 @@ static enum ndr_err_code ndr_push_lsa_OpenAccount(struct ndr_push *ndr, int flag
static enum ndr_err_code ndr_pull_lsa_OpenAccount(struct ndr_pull *ndr, int flags, struct lsa_OpenAccount *r)
{
+ uint32_t _ptr_acct_handle;
TALLOC_CTX *_mem_save_handle_0;
TALLOC_CTX *_mem_save_sid_0;
TALLOC_CTX *_mem_save_acct_handle_0;
+ TALLOC_CTX *_mem_save_acct_handle_1;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -6246,7 +6251,18 @@ static enum ndr_err_code ndr_pull_lsa_OpenAccount(struct ndr_pull *ndr, int flag
}
_mem_save_acct_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.acct_handle, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.acct_handle));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_acct_handle));
+ if (_ptr_acct_handle) {
+ NDR_PULL_ALLOC(ndr, *r->out.acct_handle);
+ } else {
+ *r->out.acct_handle = NULL;
+ }
+ if (*r->out.acct_handle) {
+ _mem_save_acct_handle_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, *r->out.acct_handle, 0);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.acct_handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acct_handle_1, 0);
+ }
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_acct_handle_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
}
@@ -6279,7 +6295,12 @@ _PUBLIC_ void ndr_print_lsa_OpenAccount(struct ndr_print *ndr, const char *name,
ndr->depth++;
ndr_print_ptr(ndr, "acct_handle", r->out.acct_handle);
ndr->depth++;
- ndr_print_policy_handle(ndr, "acct_handle", r->out.acct_handle);
+ ndr_print_ptr(ndr, "acct_handle", *r->out.acct_handle);
+ ndr->depth++;
+ if (*r->out.acct_handle) {
+ ndr_print_policy_handle(ndr, "acct_handle", *r->out.acct_handle);
+ }
+ ndr->depth--;
ndr->depth--;
ndr_print_NTSTATUS(ndr, "result", r->out.result);
ndr->depth--;
@@ -6612,8 +6633,16 @@ _PUBLIC_ void ndr_print_lsa_SetQuotasForAccount(struct ndr_print *ndr, const cha
static enum ndr_err_code ndr_push_lsa_GetSystemAccessAccount(struct ndr_push *ndr, int flags, const struct lsa_GetSystemAccessAccount *r)
{
if (flags & NDR_IN) {
+ if (r->in.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
}
if (flags & NDR_OUT) {
+ if (r->out.access_mask == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.access_mask));
NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -6621,9 +6650,29 @@ static enum ndr_err_code ndr_push_lsa_GetSystemAccessAccount(struct ndr_push *nd
static enum ndr_err_code ndr_pull_lsa_GetSystemAccessAccount(struct ndr_pull *ndr, int flags, struct lsa_GetSystemAccessAccount *r)
{
+ TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_access_mask_0;
if (flags & NDR_IN) {
+ ZERO_STRUCT(r->out);
+
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_PULL_ALLOC(ndr, r->out.access_mask);
+ ZERO_STRUCTP(r->out.access_mask);
}
if (flags & NDR_OUT) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->out.access_mask);
+ }
+ _mem_save_access_mask_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.access_mask, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.access_mask));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_access_mask_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -6639,11 +6688,19 @@ _PUBLIC_ void ndr_print_lsa_GetSystemAccessAccount(struct ndr_print *ndr, const
if (flags & NDR_IN) {
ndr_print_struct(ndr, "in", "lsa_GetSystemAccessAccount");
ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
ndr->depth--;
}
if (flags & NDR_OUT) {
ndr_print_struct(ndr, "out", "lsa_GetSystemAccessAccount");
ndr->depth++;
+ ndr_print_ptr(ndr, "access_mask", r->out.access_mask);
+ ndr->depth++;
+ ndr_print_uint32(ndr, "access_mask", *r->out.access_mask);
+ ndr->depth--;
ndr_print_NTSTATUS(ndr, "result", r->out.result);
ndr->depth--;
}
@@ -6653,6 +6710,11 @@ _PUBLIC_ void ndr_print_lsa_GetSystemAccessAccount(struct ndr_print *ndr, const
static enum ndr_err_code ndr_push_lsa_SetSystemAccessAccount(struct ndr_push *ndr, int flags, const struct lsa_SetSystemAccessAccount *r)
{
if (flags & NDR_IN) {
+ if (r->in.handle == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
@@ -6662,7 +6724,16 @@ static enum ndr_err_code ndr_push_lsa_SetSystemAccessAccount(struct ndr_push *nd
static enum ndr_err_code ndr_pull_lsa_SetSystemAccessAccount(struct ndr_pull *ndr, int flags, struct lsa_SetSystemAccessAccount *r)
{
+ TALLOC_CTX *_mem_save_handle_0;
if (flags & NDR_IN) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.handle);
+ }
+ _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
}
if (flags & NDR_OUT) {
NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
@@ -6680,6 +6751,11 @@ _PUBLIC_ void ndr_print_lsa_SetSystemAccessAccount(struct ndr_print *ndr, const
if (flags & NDR_IN) {
ndr_print_struct(ndr, "in", "lsa_SetSystemAccessAccount");
ndr->depth++;
+ ndr_print_ptr(ndr, "handle", r->in.handle);
+ ndr->depth++;
+ ndr_print_policy_handle(ndr, "handle", r->in.handle);
+ ndr->depth--;
+ ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
ndr->depth--;
}
if (flags & NDR_OUT) {
@@ -8938,15 +9014,18 @@ static enum ndr_err_code ndr_push_lsa_QueryTrustedDomainInfoByName(struct ndr_pu
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
- NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.trusted_domain));
+ if (r->in.trusted_domain == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
+ }
+ NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.trusted_domain));
NDR_CHECK(ndr_push_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, r->in.level));
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
- if (r->out.info) {
- NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
- NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ if (r->out.info == NULL) {
+ return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
+ NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_push_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -8954,8 +9033,8 @@ static enum ndr_err_code ndr_push_lsa_QueryTrustedDomainInfoByName(struct ndr_pu
static enum ndr_err_code ndr_pull_lsa_QueryTrustedDomainInfoByName(struct ndr_pull *ndr, int flags, struct lsa_QueryTrustedDomainInfoByName *r)
{
- uint32_t _ptr_info;
TALLOC_CTX *_mem_save_handle_0;
+ TALLOC_CTX *_mem_save_trusted_domain_0;
TALLOC_CTX *_mem_save_info_0;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -8967,23 +9046,26 @@ static enum ndr_err_code ndr_pull_lsa_QueryTrustedDomainInfoByName(struct ndr_pu
NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle));
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.trusted_domain));
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
+ NDR_PULL_ALLOC(ndr, r->in.trusted_domain);
+ }
+ _mem_save_trusted_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->in.trusted_domain, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.trusted_domain));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_trusted_domain_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_lsa_TrustDomInfoEnum(ndr, NDR_SCALARS, &r->in.level));
+ NDR_PULL_ALLOC(ndr, r->out.info);
+ ZERO_STRUCTP(r->out.info);
}
if (flags & NDR_OUT) {
- NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
- if (_ptr_info) {
+ if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.info);
- } else {
- r->out.info = NULL;
- }
- if (r->out.info) {
- _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
- NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
- NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
- NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
- NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
}
+ _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
+ NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
+ NDR_CHECK(ndr_pull_lsa_TrustedDomainInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -9003,7 +9085,10 @@ _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfoByName(struct ndr_print *ndr,
ndr->depth++;
ndr_print_policy_handle(ndr, "handle", r->in.handle);
ndr->depth--;
- ndr_print_lsa_String(ndr, "trusted_domain", &r->in.trusted_domain);
+ ndr_print_ptr(ndr, "trusted_domain", r->in.trusted_domain);
+ ndr->depth++;
+ ndr_print_lsa_String(ndr, "trusted_domain", r->in.trusted_domain);
+ ndr->depth--;
ndr_print_lsa_TrustDomInfoEnum(ndr, "level", r->in.level);
ndr->depth--;
}
@@ -9012,10 +9097,8 @@ _PUBLIC_ void ndr_print_lsa_QueryTrustedDomainInfoByName(struct ndr_print *ndr,
ndr->depth++;
ndr_print_ptr(ndr, "info", r->out.info);
ndr->depth++;
- if (r->out.info) {
- ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
- ndr_print_lsa_TrustedDomainInfo(ndr, "info", r->out.info);
- }
+ ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
+ ndr_print_lsa_TrustedDomainInfo(ndr, "info", r->out.info);
ndr->depth--;
ndr_print_NTSTATUS(ndr, "result", r->out.result);
ndr->depth--;
diff --git a/source3/librpc/gen_ndr/ndr_netlogon.c b/source3/librpc/gen_ndr/ndr_netlogon.c
index eabbc337fc..dd1d2cf387 100644
--- a/source3/librpc/gen_ndr/ndr_netlogon.c
+++ b/source3/librpc/gen_ndr/ndr_netlogon.c
@@ -10983,7 +10983,10 @@ static enum ndr_err_code ndr_push_netr_DsRGetDCName(struct ndr_push *ndr, int fl
if (r->out.info == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
+ if (*r->out.info) {
+ NDR_CHECK(ndr_push_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
+ }
NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
}
return NDR_ERR_SUCCESS;
@@ -10995,11 +10998,13 @@ static enum ndr_err_code ndr_pull_netr_DsRGetDCName(struct ndr_pull *ndr, int fl
uint32_t _ptr_domain_name;
uint32_t _ptr_domain_guid;
uint32_t _ptr_site_guid;
+ uint32_t _ptr_info;
TALLOC_CTX *_mem_save_server_unc_0;
TALLOC_CTX *_mem_save_domain_name_0;
TALLOC_CTX *_mem_save_domain_guid_0;
TALLOC_CTX *_mem_save_site_guid_0;
TALLOC_CTX *_mem_save_info_0;
+ TALLOC_CTX *_mem_save_info_1;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -11073,7 +11078,18 @@ static enum ndr_err_code ndr_pull_netr_DsRGetDCName(struct ndr_pull *ndr, int fl
}
_mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
+ if (_ptr_info) {
+ NDR_PULL_ALLOC(ndr, *r->out.info);
+ } else {
+ *r->out.info = NULL;
+ }
+ if (*r->out.info) {
+ _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
+ NDR_CHECK(ndr_pull_netr_DsRGetDCNameInfo(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.info));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
+ }
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
}
@@ -11122,7 +11138,12 @@ _PUBLIC_ void ndr_print_netr_DsRGetDCName(struct ndr_print *ndr, const char *nam
ndr->depth++;
ndr_print_ptr(ndr, "info", r->out.info);
ndr->depth++;
- ndr_print_netr_DsRGetDCNameInfo(ndr, "info", r->out.info);
+ ndr_print_ptr(ndr, "info", *r->out.info);
+ ndr->depth++;
+ if (*r->out.info) {
+ ndr_print_netr_DsRGetDCNameInfo(ndr, "info", *r->out.info);
+ }
+ ndr->depth--;
ndr->depth--;
ndr_print_WERROR(ndr, "result", r->out.result);
ndr->depth--;
diff --git a/source3/librpc/gen_ndr/ndr_samr.c b/source3/librpc/gen_ndr/ndr_samr.c
index f257c17864..8c97ea1d95 100644
--- a/source3/librpc/gen_ndr/ndr_samr.c
+++ b/source3/librpc/gen_ndr/ndr_samr.c
@@ -5788,7 +5788,10 @@ static enum ndr_err_code ndr_push_samr_EnumDomains(struct ndr_push *ndr, int fla
if (r->out.sam == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
- NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam));
+ NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sam));
+ if (*r->out.sam) {
+ NDR_CHECK(ndr_push_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam));
+ }
if (r->out.num_entries == NULL) {
return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
}
@@ -5800,9 +5803,11 @@ static enum ndr_err_code ndr_push_samr_EnumDomains(struct ndr_push *ndr, int fla
static enum ndr_err_code ndr_pull_samr_EnumDomains(struct ndr_pull *ndr, int flags, struct samr_EnumDomains *r)
{
+ uint32_t _ptr_sam;
TALLOC_CTX *_mem_save_connect_handle_0;
TALLOC_CTX *_mem_save_resume_handle_0;
TALLOC_CTX *_mem_save_sam_0;
+ TALLOC_CTX *_mem_save_sam_1;
TALLOC_CTX *_mem_save_num_entries_0;
if (flags & NDR_IN) {
ZERO_STRUCT(r->out);
@@ -5842,7 +5847,18 @@ static enum ndr_err_code ndr_pull_samr_EnumDomains(struct ndr_pull *ndr, int fla
}
_mem_save_sam_0 = NDR_PULL_GET_MEM_CTX(ndr);
NDR_PULL_SET_MEM_CTX(ndr, r->out.sam, LIBNDR_FLAG_REF_ALLOC);
- NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sam));
+ NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sam));
+ if (_ptr_sam) {
+ NDR_PULL_ALLOC(ndr, *r->out.sam);
+ } else {
+ *r->out.sam = NULL;
+ }
+ if (*r->out.sam) {
+ _mem_save_sam_1 = NDR_PULL_GET_MEM_CTX(ndr);
+ NDR_PULL_SET_MEM_CTX(ndr, *r->out.sam, 0);
+ NDR_CHECK(ndr_pull_samr_SamArray(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sam));
+ NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_1, 0);
+ }
NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sam_0, LIBNDR_FLAG_REF_ALLOC);
if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
NDR_PULL_ALLOC(ndr, r->out.num_entries);
@@ -5886,7 +5902,12 @@ _PUBLIC_ void ndr_print_samr_EnumDomains(struct ndr_print *ndr, const char *name
ndr->depth--;
ndr_print_ptr(ndr, "sam", r->out.sam);
ndr->depth++;
- ndr_print_samr_SamArray(ndr, "sam", r->out.sam);
+ ndr_print_ptr(ndr, "sam", *r->out.sam);
+ ndr->depth++;
+ if (*r->out.sam) {
+ ndr_print_samr_SamArray(ndr, "sam", *r->out.sam);
+ }
+ ndr->depth--;
ndr->depth--;
ndr_print_ptr(ndr, "num_entries", r->out.num_entries);
ndr->depth++;
diff --git a/source3/librpc/gen_ndr/netlogon.h b/source3/librpc/gen_ndr/netlogon.h
index 612e30914a..ef2218c0f2 100644
--- a/source3/librpc/gen_ndr/netlogon.h
+++ b/source3/librpc/gen_ndr/netlogon.h
@@ -1181,7 +1181,7 @@ struct netr_DsRGetDCName {
} in;
struct {
- struct netr_DsRGetDCNameInfo *info;/* [ref] */
+ struct netr_DsRGetDCNameInfo **info;/* [ref] */
WERROR result;
} out;
diff --git a/source3/librpc/gen_ndr/samr.h b/source3/librpc/gen_ndr/samr.h
index 376feae5d1..2d6126a3f4 100644
--- a/source3/librpc/gen_ndr/samr.h
+++ b/source3/librpc/gen_ndr/samr.h
@@ -837,7 +837,7 @@ struct samr_EnumDomains {
} in;
struct {
- struct samr_SamArray *sam;/* [ref] */
+ struct samr_SamArray **sam;/* [ref] */
uint32_t *num_entries;/* [ref] */
uint32_t *resume_handle;/* [ref] */
NTSTATUS result;
diff --git a/source3/librpc/gen_ndr/srv_lsa.c b/source3/librpc/gen_ndr/srv_lsa.c
index 9d41be35a8..874cf4c410 100644
--- a/source3/librpc/gen_ndr/srv_lsa.c
+++ b/source3/librpc/gen_ndr/srv_lsa.c
@@ -1372,7 +1372,7 @@ static bool api_lsa_OpenAccount(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.acct_handle = talloc_zero(r, struct policy_handle);
+ r->out.acct_handle = talloc_zero(r, struct policy_handle *);
if (r->out.acct_handle == NULL) {
talloc_free(r);
return false;
@@ -1823,6 +1823,13 @@ static bool api_lsa_GetSystemAccessAccount(pipes_struct *p)
NDR_PRINT_IN_DEBUG(lsa_GetSystemAccessAccount, r);
}
+ ZERO_STRUCT(r->out);
+ r->out.access_mask = talloc_zero(r, uint32_t);
+ if (r->out.access_mask == NULL) {
+ talloc_free(r);
+ return false;
+ }
+
r->out.result = _lsa_GetSystemAccessAccount(p, r);
if (p->rng_fault_state) {
diff --git a/source3/librpc/gen_ndr/srv_netlogon.c b/source3/librpc/gen_ndr/srv_netlogon.c
index b9e6ae69b1..673f9503df 100644
--- a/source3/librpc/gen_ndr/srv_netlogon.c
+++ b/source3/librpc/gen_ndr/srv_netlogon.c
@@ -1679,7 +1679,7 @@ static bool api_netr_DsRGetDCName(pipes_struct *p)
}
ZERO_STRUCT(r->out);
- r->out.info = talloc_zero(r, struct netr_DsRGetDCNameInfo);
+ r->out.info = talloc_zero(r, struct netr_DsRGetDCNameInfo *);
if (r->out.info == NULL) {
talloc_free(r);
return false;
diff --git a/source3/librpc/gen_ndr/srv_samr.c b/source3/librpc/gen_ndr/srv_samr.c
index 374df34a96..3312964178 100644
--- a/source3/librpc/gen_ndr/srv_samr.c
+++ b/source3/librpc/gen_ndr/srv_samr.c
@@ -507,7 +507,7 @@ static bool api_samr_EnumDomains(pipes_struct *p)
ZERO_STRUCT(r->out);
r->out.resume_handle = r->in.resume_handle;
- r->out.sam = talloc_zero(r, struct samr_SamArray);
+ r->out.sam = talloc_zero(r, struct samr_SamArray *);
if (r->out.sam == NULL) {
talloc_free(r);
return false;