diff options
Diffstat (limited to 'source3/librpc/gen_ndr/ndr_lsa.c')
-rw-r--r-- | source3/librpc/gen_ndr/ndr_lsa.c | 106 |
1 files changed, 12 insertions, 94 deletions
diff --git a/source3/librpc/gen_ndr/ndr_lsa.c b/source3/librpc/gen_ndr/ndr_lsa.c index 5ac4cbcb59..a3565c8f2c 100644 --- a/source3/librpc/gen_ndr/ndr_lsa.c +++ b/source3/librpc/gen_ndr/ndr_lsa.c @@ -5321,10 +5321,7 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateAccount(struct ndr_push *ndr, int if (r->out.acct_handle == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - 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_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; @@ -5332,11 +5329,9 @@ _PUBLIC_ enum ndr_err_code ndr_push_lsa_CreateAccount(struct ndr_push *ndr, int _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateAccount(struct ndr_pull *ndr, int flags, struct lsa_CreateAccount *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); @@ -5364,18 +5359,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_lsa_CreateAccount(struct ndr_pull *ndr, int } _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_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_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.acct_handle)); 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)); } @@ -5408,12 +5392,7 @@ _PUBLIC_ void ndr_print_lsa_CreateAccount(struct ndr_print *ndr, const char *nam ndr->depth++; ndr_print_ptr(ndr, "acct_handle", r->out.acct_handle); ndr->depth++; - 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_print_policy_handle(ndr, "acct_handle", r->out.acct_handle); ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; @@ -6208,10 +6187,7 @@ 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_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_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; @@ -6219,11 +6195,9 @@ 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); @@ -6251,18 +6225,7 @@ 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_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_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.acct_handle)); 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)); } @@ -6295,12 +6258,7 @@ _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_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_print_policy_handle(ndr, "acct_handle", r->out.acct_handle); ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; @@ -7757,19 +7715,13 @@ static enum ndr_err_code ndr_push_lsa_DeleteObject(struct ndr_push *ndr, int fla if (r->in.handle == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.handle)); - if (*r->in.handle) { - NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.handle)); - } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.handle)); } if (flags & NDR_OUT) { if (r->out.handle == NULL) { return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer"); } - NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.handle)); - if (*r->out.handle) { - NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.handle)); - } + NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle)); NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result)); } return NDR_ERR_SUCCESS; @@ -7777,9 +7729,7 @@ static enum ndr_err_code ndr_push_lsa_DeleteObject(struct ndr_push *ndr, int fla static enum ndr_err_code ndr_pull_lsa_DeleteObject(struct ndr_pull *ndr, int flags, struct lsa_DeleteObject *r) { - uint32_t _ptr_handle; TALLOC_CTX *_mem_save_handle_0; - TALLOC_CTX *_mem_save_handle_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -7788,18 +7738,7 @@ static enum ndr_err_code ndr_pull_lsa_DeleteObject(struct ndr_pull *ndr, int fla } _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_generic_ptr(ndr, &_ptr_handle)); - if (_ptr_handle) { - NDR_PULL_ALLOC(ndr, *r->in.handle); - } else { - *r->in.handle = NULL; - } - if (*r->in.handle) { - _mem_save_handle_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->in.handle, 0); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.handle)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_1, 0); - } + 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.handle); *r->out.handle = *r->in.handle; @@ -7810,18 +7749,7 @@ static enum ndr_err_code ndr_pull_lsa_DeleteObject(struct ndr_pull *ndr, int fla } _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr); NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_handle)); - if (_ptr_handle) { - NDR_PULL_ALLOC(ndr, *r->out.handle); - } else { - *r->out.handle = NULL; - } - if (*r->out.handle) { - _mem_save_handle_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->out.handle, 0); - NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.handle)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_1, 0); - } + NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result)); } @@ -7840,12 +7768,7 @@ _PUBLIC_ void ndr_print_lsa_DeleteObject(struct ndr_print *ndr, const char *name ndr->depth++; ndr_print_ptr(ndr, "handle", r->in.handle); ndr->depth++; - ndr_print_ptr(ndr, "handle", *r->in.handle); - ndr->depth++; - if (*r->in.handle) { - ndr_print_policy_handle(ndr, "handle", *r->in.handle); - } - ndr->depth--; + ndr_print_policy_handle(ndr, "handle", r->in.handle); ndr->depth--; ndr->depth--; } @@ -7854,12 +7777,7 @@ _PUBLIC_ void ndr_print_lsa_DeleteObject(struct ndr_print *ndr, const char *name ndr->depth++; ndr_print_ptr(ndr, "handle", r->out.handle); ndr->depth++; - ndr_print_ptr(ndr, "handle", *r->out.handle); - ndr->depth++; - if (*r->out.handle) { - ndr_print_policy_handle(ndr, "handle", *r->out.handle); - } - ndr->depth--; + ndr_print_policy_handle(ndr, "handle", r->out.handle); ndr->depth--; ndr_print_NTSTATUS(ndr, "result", r->out.result); ndr->depth--; |