diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-11-28 13:09:32 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:16:10 -0500 |
commit | f1d492d11f4da7bbff883fefc3d8fcb71f08f67b (patch) | |
tree | fab610f3306c1c7ae3b8f88b603dfc1cdf3235f9 /source3/librpc/gen_ndr | |
parent | 7ef185fae7fc43b566dedb267023cf8d346baee2 (diff) | |
download | samba-f1d492d11f4da7bbff883fefc3d8fcb71f08f67b.tar.gz samba-f1d492d11f4da7bbff883fefc3d8fcb71f08f67b.tar.bz2 samba-f1d492d11f4da7bbff883fefc3d8fcb71f08f67b.zip |
r19930: Revert the winreg idl changes. At least enumkey does not work anymore today.
With more than 5 different trees I can't swear that I did test this properly
yesterday. Sorry for the noise.
Volker
(This used to be commit 978a6196bf0a2280c7f74b4a6d9fa7941c3aa049)
Diffstat (limited to 'source3/librpc/gen_ndr')
-rw-r--r-- | source3/librpc/gen_ndr/cli_winreg.c | 12 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/ndr_winreg.c | 219 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/srv_winreg.h | 4 | ||||
-rw-r--r-- | source3/librpc/gen_ndr/winreg.h | 12 |
4 files changed, 110 insertions, 137 deletions
diff --git a/source3/librpc/gen_ndr/cli_winreg.c b/source3/librpc/gen_ndr/cli_winreg.c index b11000bd7e..7ace36ca52 100644 --- a/source3/librpc/gen_ndr/cli_winreg.c +++ b/source3/librpc/gen_ndr/cli_winreg.c @@ -209,7 +209,7 @@ NTSTATUS rpccli_winreg_CreateKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ct r.in.options = options; r.in.access_mask = access_mask; r.in.secdesc = secdesc; - r.in.action_taken = action_taken; + r.in.action_taken = *action_taken; if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(winreg_CreateKey, &r); @@ -229,7 +229,7 @@ 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; + *action_taken = r.out.action_taken; /* Return result */ return werror_to_ntstatus(r.out.result); @@ -306,8 +306,8 @@ NTSTATUS rpccli_winreg_EnumKey(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, r.in.handle = handle; r.in.enum_index = enum_index; r.in.name = name; - r.in.keyclass = keyclass; - r.in.last_changed_time = last_changed_time; + r.in.keyclass = *keyclass; + r.in.last_changed_time = *last_changed_time; if (DEBUGLEVEL >= 10) NDR_PRINT_IN_DEBUG(winreg_EnumKey, &r); @@ -327,8 +327,8 @@ 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; + *keyclass = r.out.keyclass; + *last_changed_time = r.out.last_changed_time; /* Return result */ return werror_to_ntstatus(r.out.result); diff --git a/source3/librpc/gen_ndr/ndr_winreg.c b/source3/librpc/gen_ndr/ndr_winreg.c index 8aaa571c3f..bc931dafe8 100644 --- a/source3/librpc/gen_ndr/ndr_winreg.c +++ b/source3/librpc/gen_ndr/ndr_winreg.c @@ -1019,18 +1019,18 @@ NTSTATUS ndr_push_winreg_CreateKey(struct ndr_push *ndr, int flags, const struct if (r->in.secdesc) { NDR_CHECK(ndr_push_winreg_SecBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.secdesc)); } - if (r->in.action_taken == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; - if (*r->in.action_taken == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_winreg_CreateAction(ndr, NDR_SCALARS, **r->in.action_taken)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.action_taken)); + if (r->in.action_taken) { + NDR_CHECK(ndr_push_winreg_CreateAction(ndr, NDR_SCALARS, *r->in.action_taken)); + } } if (flags & NDR_OUT) { if (r->out.new_handle == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.new_handle)); - if (r->out.action_taken == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; - if (*r->out.action_taken == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_winreg_CreateAction(ndr, NDR_SCALARS, **r->out.action_taken)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.action_taken)); + if (r->out.action_taken) { + NDR_CHECK(ndr_push_winreg_CreateAction(ndr, NDR_SCALARS, *r->out.action_taken)); + } NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NT_STATUS_OK; @@ -1044,7 +1044,6 @@ NTSTATUS ndr_pull_winreg_CreateKey(struct ndr_pull *ndr, int flags, struct winre TALLOC_CTX *_mem_save_secdesc_0; TALLOC_CTX *_mem_save_new_handle_0; TALLOC_CTX *_mem_save_action_taken_0; - TALLOC_CTX *_mem_save_action_taken_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -1071,24 +1070,20 @@ NTSTATUS ndr_pull_winreg_CreateKey(struct ndr_pull *ndr, int flags, struct winre NDR_CHECK(ndr_pull_winreg_SecBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.secdesc)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secdesc_0, 0); } - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_action_taken)); + if (_ptr_action_taken) { NDR_PULL_ALLOC(ndr, r->in.action_taken); + } else { + r->in.action_taken = NULL; } - _mem_save_action_taken_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->in.action_taken, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_action_taken)); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, *r->in.action_taken); + if (r->in.action_taken) { + _mem_save_action_taken_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.action_taken, 0); + NDR_CHECK(ndr_pull_winreg_CreateAction(ndr, NDR_SCALARS, r->in.action_taken)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_action_taken_0, 0); } - _mem_save_action_taken_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->in.action_taken, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_winreg_CreateAction(ndr, NDR_SCALARS, *r->in.action_taken)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_action_taken_1, LIBNDR_FLAG_REF_ALLOC); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_action_taken_0, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_ALLOC(ndr, r->out.new_handle); ZERO_STRUCTP(r->out.new_handle); - NDR_PULL_ALLOC(ndr, r->out.action_taken); - *r->out.action_taken = *r->in.action_taken; } if (flags & NDR_OUT) { if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { @@ -1098,20 +1093,18 @@ NTSTATUS ndr_pull_winreg_CreateKey(struct ndr_pull *ndr, int flags, struct winre NDR_PULL_SET_MEM_CTX(ndr, r->out.new_handle, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.new_handle)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_handle_0, LIBNDR_FLAG_REF_ALLOC); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_action_taken)); + if (_ptr_action_taken) { NDR_PULL_ALLOC(ndr, r->out.action_taken); + } else { + r->out.action_taken = NULL; } - _mem_save_action_taken_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.action_taken, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_action_taken)); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, *r->out.action_taken); + if (r->out.action_taken) { + _mem_save_action_taken_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.action_taken, 0); + NDR_CHECK(ndr_pull_winreg_CreateAction(ndr, NDR_SCALARS, r->out.action_taken)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_action_taken_0, 0); } - _mem_save_action_taken_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->out.action_taken, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_winreg_CreateAction(ndr, NDR_SCALARS, *r->out.action_taken)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_action_taken_1, LIBNDR_FLAG_REF_ALLOC); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_action_taken_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NT_STATUS_OK; @@ -1143,10 +1136,9 @@ _PUBLIC_ void ndr_print_winreg_CreateKey(struct ndr_print *ndr, const char *name ndr->depth--; ndr_print_ptr(ndr, "action_taken", r->in.action_taken); ndr->depth++; - ndr_print_ptr(ndr, "action_taken", *r->in.action_taken); - ndr->depth++; - ndr_print_winreg_CreateAction(ndr, "action_taken", **r->in.action_taken); - ndr->depth--; + if (r->in.action_taken) { + ndr_print_winreg_CreateAction(ndr, "action_taken", *r->in.action_taken); + } ndr->depth--; ndr->depth--; } @@ -1159,10 +1151,9 @@ _PUBLIC_ void ndr_print_winreg_CreateKey(struct ndr_print *ndr, const char *name ndr->depth--; ndr_print_ptr(ndr, "action_taken", r->out.action_taken); ndr->depth++; - ndr_print_ptr(ndr, "action_taken", *r->out.action_taken); - ndr->depth++; - ndr_print_winreg_CreateAction(ndr, "action_taken", **r->out.action_taken); - ndr->depth--; + if (r->out.action_taken) { + ndr_print_winreg_CreateAction(ndr, "action_taken", *r->out.action_taken); + } ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; @@ -1294,26 +1285,26 @@ NTSTATUS ndr_push_winreg_EnumKey(struct ndr_push *ndr, int flags, const struct w NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.enum_index)); if (r->in.name == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; NDR_CHECK(ndr_push_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name)); - if (r->in.keyclass == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; - if (*r->in.keyclass == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.keyclass)); - if (r->in.last_changed_time == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; - if (*r->in.last_changed_time == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, **r->in.last_changed_time)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.keyclass)); + if (r->in.keyclass) { + NDR_CHECK(ndr_push_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.keyclass)); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.last_changed_time)); + if (r->in.last_changed_time) { + NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, *r->in.last_changed_time)); + } } if (flags & NDR_OUT) { if (r->out.name == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; NDR_CHECK(ndr_push_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.name)); - if (r->out.keyclass == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; - if (*r->out.keyclass == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.keyclass)); - if (r->out.last_changed_time == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; - if (*r->out.last_changed_time == NULL) return NT_STATUS_INVALID_PARAMETER_MIX; - NDR_CHECK(ndr_push_ref_ptr(ndr)); - NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, **r->out.last_changed_time)); + NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.keyclass)); + if (r->out.keyclass) { + NDR_CHECK(ndr_push_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.keyclass)); + } + NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.last_changed_time)); + if (r->out.last_changed_time) { + NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, *r->out.last_changed_time)); + } NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result)); } return NT_STATUS_OK; @@ -1326,9 +1317,7 @@ NTSTATUS ndr_pull_winreg_EnumKey(struct ndr_pull *ndr, int flags, struct winreg_ TALLOC_CTX *_mem_save_handle_0; TALLOC_CTX *_mem_save_name_0; TALLOC_CTX *_mem_save_keyclass_0; - TALLOC_CTX *_mem_save_keyclass_1; TALLOC_CTX *_mem_save_last_changed_time_0; - TALLOC_CTX *_mem_save_last_changed_time_1; if (flags & NDR_IN) { ZERO_STRUCT(r->out); @@ -1347,40 +1336,32 @@ NTSTATUS ndr_pull_winreg_EnumKey(struct ndr_pull *ndr, int flags, struct winreg_ NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_keyclass)); + if (_ptr_keyclass) { NDR_PULL_ALLOC(ndr, r->in.keyclass); + } else { + r->in.keyclass = NULL; } - _mem_save_keyclass_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->in.keyclass, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_keyclass)); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, *r->in.keyclass); + if (r->in.keyclass) { + _mem_save_keyclass_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.keyclass, 0); + NDR_CHECK(ndr_pull_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.keyclass)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keyclass_0, 0); } - _mem_save_keyclass_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->in.keyclass, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.keyclass)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keyclass_1, LIBNDR_FLAG_REF_ALLOC); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keyclass_0, LIBNDR_FLAG_REF_ALLOC); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_last_changed_time)); + if (_ptr_last_changed_time) { NDR_PULL_ALLOC(ndr, r->in.last_changed_time); + } else { + r->in.last_changed_time = NULL; } - _mem_save_last_changed_time_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->in.last_changed_time, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_last_changed_time)); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, *r->in.last_changed_time); + if (r->in.last_changed_time) { + _mem_save_last_changed_time_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->in.last_changed_time, 0); + NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, r->in.last_changed_time)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_last_changed_time_0, 0); } - _mem_save_last_changed_time_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->in.last_changed_time, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, *r->in.last_changed_time)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_last_changed_time_1, LIBNDR_FLAG_REF_ALLOC); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_last_changed_time_0, LIBNDR_FLAG_REF_ALLOC); NDR_PULL_ALLOC(ndr, r->out.name); *r->out.name = *r->in.name; - NDR_PULL_ALLOC(ndr, r->out.keyclass); - *r->out.keyclass = *r->in.keyclass; - NDR_PULL_ALLOC(ndr, r->out.last_changed_time); - *r->out.last_changed_time = *r->in.last_changed_time; } if (flags & NDR_OUT) { if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { @@ -1390,34 +1371,30 @@ NTSTATUS ndr_pull_winreg_EnumKey(struct ndr_pull *ndr, int flags, struct winreg_ NDR_PULL_SET_MEM_CTX(ndr, r->out.name, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.name)); NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_keyclass)); + if (_ptr_keyclass) { NDR_PULL_ALLOC(ndr, r->out.keyclass); + } else { + r->out.keyclass = NULL; } - _mem_save_keyclass_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.keyclass, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_keyclass)); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, *r->out.keyclass); + if (r->out.keyclass) { + _mem_save_keyclass_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.keyclass, 0); + NDR_CHECK(ndr_pull_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.keyclass)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keyclass_0, 0); } - _mem_save_keyclass_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->out.keyclass, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.keyclass)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keyclass_1, LIBNDR_FLAG_REF_ALLOC); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keyclass_0, LIBNDR_FLAG_REF_ALLOC); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { + NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_last_changed_time)); + if (_ptr_last_changed_time) { NDR_PULL_ALLOC(ndr, r->out.last_changed_time); + } else { + r->out.last_changed_time = NULL; } - _mem_save_last_changed_time_0 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, r->out.last_changed_time, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_last_changed_time)); - if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) { - NDR_PULL_ALLOC(ndr, *r->out.last_changed_time); + if (r->out.last_changed_time) { + _mem_save_last_changed_time_0 = NDR_PULL_GET_MEM_CTX(ndr); + NDR_PULL_SET_MEM_CTX(ndr, r->out.last_changed_time, 0); + NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, r->out.last_changed_time)); + NDR_PULL_SET_MEM_CTX(ndr, _mem_save_last_changed_time_0, 0); } - _mem_save_last_changed_time_1 = NDR_PULL_GET_MEM_CTX(ndr); - NDR_PULL_SET_MEM_CTX(ndr, *r->out.last_changed_time, LIBNDR_FLAG_REF_ALLOC); - NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, *r->out.last_changed_time)); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_last_changed_time_1, LIBNDR_FLAG_REF_ALLOC); - NDR_PULL_SET_MEM_CTX(ndr, _mem_save_last_changed_time_0, LIBNDR_FLAG_REF_ALLOC); NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result)); } return NT_STATUS_OK; @@ -1444,17 +1421,15 @@ _PUBLIC_ void ndr_print_winreg_EnumKey(struct ndr_print *ndr, const char *name, ndr->depth--; ndr_print_ptr(ndr, "keyclass", r->in.keyclass); ndr->depth++; - ndr_print_ptr(ndr, "keyclass", *r->in.keyclass); - ndr->depth++; - ndr_print_winreg_StringBuf(ndr, "keyclass", *r->in.keyclass); - ndr->depth--; + if (r->in.keyclass) { + ndr_print_winreg_StringBuf(ndr, "keyclass", r->in.keyclass); + } ndr->depth--; ndr_print_ptr(ndr, "last_changed_time", r->in.last_changed_time); ndr->depth++; - ndr_print_ptr(ndr, "last_changed_time", *r->in.last_changed_time); - ndr->depth++; - ndr_print_NTTIME(ndr, "last_changed_time", **r->in.last_changed_time); - ndr->depth--; + if (r->in.last_changed_time) { + ndr_print_NTTIME(ndr, "last_changed_time", *r->in.last_changed_time); + } ndr->depth--; ndr->depth--; } @@ -1467,17 +1442,15 @@ _PUBLIC_ void ndr_print_winreg_EnumKey(struct ndr_print *ndr, const char *name, ndr->depth--; ndr_print_ptr(ndr, "keyclass", r->out.keyclass); ndr->depth++; - ndr_print_ptr(ndr, "keyclass", *r->out.keyclass); - ndr->depth++; - ndr_print_winreg_StringBuf(ndr, "keyclass", *r->out.keyclass); - ndr->depth--; + if (r->out.keyclass) { + ndr_print_winreg_StringBuf(ndr, "keyclass", r->out.keyclass); + } ndr->depth--; ndr_print_ptr(ndr, "last_changed_time", r->out.last_changed_time); ndr->depth++; - ndr_print_ptr(ndr, "last_changed_time", *r->out.last_changed_time); - ndr->depth++; - ndr_print_NTTIME(ndr, "last_changed_time", **r->out.last_changed_time); - ndr->depth--; + if (r->out.last_changed_time) { + ndr_print_NTTIME(ndr, "last_changed_time", *r->out.last_changed_time); + } ndr->depth--; ndr_print_WERROR(ndr, "result", r->out.result); ndr->depth--; diff --git a/source3/librpc/gen_ndr/srv_winreg.h b/source3/librpc/gen_ndr/srv_winreg.h index f972e09d26..dfa557f90c 100644 --- a/source3/librpc/gen_ndr/srv_winreg.h +++ b/source3/librpc/gen_ndr/srv_winreg.h @@ -7,10 +7,10 @@ WERROR _winreg_OpenHKLM(pipes_struct *p, uint16_t *system_name, uint32_t access_ WERROR _winreg_OpenHKPD(pipes_struct *p, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle); WERROR _winreg_OpenHKU(pipes_struct *p, uint16_t *system_name, uint32_t access_mask, struct policy_handle *handle); WERROR _winreg_CloseKey(pipes_struct *p, struct policy_handle *handle); -WERROR _winreg_CreateKey(pipes_struct *p, struct policy_handle *handle, struct winreg_String name, struct winreg_String keyclass, uint32_t options, uint32_t access_mask, struct winreg_SecBuf *secdesc, struct policy_handle *new_handle, enum winreg_CreateAction **action_taken); +WERROR _winreg_CreateKey(pipes_struct *p, struct policy_handle *handle, struct winreg_String name, struct winreg_String keyclass, uint32_t options, uint32_t access_mask, struct winreg_SecBuf *secdesc, struct policy_handle *new_handle, enum winreg_CreateAction *action_taken); WERROR _winreg_DeleteKey(pipes_struct *p, struct policy_handle *handle, struct winreg_String key); WERROR _winreg_DeleteValue(pipes_struct *p, struct policy_handle *handle, struct winreg_String value); -WERROR _winreg_EnumKey(pipes_struct *p, struct policy_handle *handle, uint32_t enum_index, struct winreg_StringBuf *name, struct winreg_StringBuf **keyclass, NTTIME **last_changed_time); +WERROR _winreg_EnumKey(pipes_struct *p, struct policy_handle *handle, uint32_t enum_index, struct winreg_StringBuf *name, struct winreg_StringBuf *keyclass, NTTIME *last_changed_time); WERROR _winreg_EnumValue(pipes_struct *p, struct policy_handle *handle, uint32_t enum_index, struct winreg_ValNameBuf *name, enum winreg_Type *type, uint8_t *data, uint32_t *data_size, uint32_t *value_length); WERROR _winreg_FlushKey(pipes_struct *p, struct policy_handle *handle); WERROR _winreg_GetKeySecurity(pipes_struct *p, struct policy_handle *handle, uint32_t sec_info, struct KeySecurityData *sd); diff --git a/source3/librpc/gen_ndr/winreg.h b/source3/librpc/gen_ndr/winreg.h index 0a8833acb5..4703c3dc07 100644 --- a/source3/librpc/gen_ndr/winreg.h +++ b/source3/librpc/gen_ndr/winreg.h @@ -164,12 +164,12 @@ struct winreg_CreateKey { uint32_t options; uint32_t access_mask; struct winreg_SecBuf *secdesc;/* [unique] */ - enum winreg_CreateAction **action_taken;/* [ref] */ + enum winreg_CreateAction *action_taken;/* [unique] */ } in; struct { struct policy_handle *new_handle;/* [ref] */ - enum winreg_CreateAction **action_taken;/* [ref] */ + enum winreg_CreateAction *action_taken;/* [unique] */ WERROR result; } out; @@ -207,14 +207,14 @@ struct winreg_EnumKey { struct policy_handle *handle;/* [ref] */ uint32_t enum_index; struct winreg_StringBuf *name;/* [ref] */ - struct winreg_StringBuf **keyclass;/* [ref] */ - NTTIME **last_changed_time;/* [ref] */ + struct winreg_StringBuf *keyclass;/* [unique] */ + NTTIME *last_changed_time;/* [unique] */ } in; struct { struct winreg_StringBuf *name;/* [ref] */ - struct winreg_StringBuf **keyclass;/* [ref] */ - NTTIME **last_changed_time;/* [ref] */ + struct winreg_StringBuf *keyclass;/* [unique] */ + NTTIME *last_changed_time;/* [unique] */ WERROR result; } out; |