Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/librpc/gen_ndr/ndr_winreg.h"
5 :
6 : #include "librpc/gen_ndr/ndr_lsa.h"
7 : #include "librpc/gen_ndr/ndr_security.h"
8 : #include "librpc/gen_ndr/ndr_misc.h"
9 95867 : _PUBLIC_ enum ndr_err_code ndr_push_winreg_AccessMask(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
10 : {
11 95867 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
12 95867 : return NDR_ERR_SUCCESS;
13 : }
14 :
15 95897 : _PUBLIC_ enum ndr_err_code ndr_pull_winreg_AccessMask(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
16 : {
17 6 : uint32_t v;
18 95897 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
19 95897 : *r = v;
20 95897 : return NDR_ERR_SUCCESS;
21 : }
22 :
23 16 : _PUBLIC_ void ndr_print_winreg_AccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
24 : {
25 16 : ndr_print_uint32(ndr, name, r);
26 16 : ndr->depth++;
27 16 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KEY_QUERY_VALUE", KEY_QUERY_VALUE, r);
28 16 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KEY_SET_VALUE", KEY_SET_VALUE, r);
29 16 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KEY_CREATE_SUB_KEY", KEY_CREATE_SUB_KEY, r);
30 16 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KEY_ENUMERATE_SUB_KEYS", KEY_ENUMERATE_SUB_KEYS, r);
31 16 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KEY_NOTIFY", KEY_NOTIFY, r);
32 16 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KEY_CREATE_LINK", KEY_CREATE_LINK, r);
33 16 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KEY_WOW64_64KEY", KEY_WOW64_64KEY, r);
34 16 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "KEY_WOW64_32KEY", KEY_WOW64_32KEY, r);
35 16 : ndr->depth--;
36 16 : }
37 :
38 190644 : _PUBLIC_ enum ndr_err_code ndr_push_winreg_String(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct winreg_String *r)
39 : {
40 190644 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
41 190644 : if (ndr_flags & NDR_SCALARS) {
42 190644 : NDR_CHECK(ndr_push_align(ndr, 5));
43 190644 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->name) * 2));
44 190644 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->name) * 2));
45 190644 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
46 190644 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
47 : }
48 190644 : if (ndr_flags & NDR_BUFFERS) {
49 190644 : if (r->name) {
50 144586 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
51 144586 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
52 144586 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
53 144586 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
54 : }
55 : }
56 190644 : return NDR_ERR_SUCCESS;
57 : }
58 :
59 190756 : _PUBLIC_ enum ndr_err_code ndr_pull_winreg_String(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct winreg_String *r)
60 : {
61 16 : uint32_t _ptr_name;
62 190756 : uint32_t size_name_1 = 0;
63 190756 : uint32_t length_name_1 = 0;
64 190756 : TALLOC_CTX *_mem_save_name_0 = NULL;
65 190756 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
66 190756 : if (ndr_flags & NDR_SCALARS) {
67 190756 : NDR_CHECK(ndr_pull_align(ndr, 5));
68 190756 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->name_len));
69 190756 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->name_size));
70 190756 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
71 190756 : if (_ptr_name) {
72 144694 : NDR_PULL_ALLOC(ndr, r->name);
73 : } else {
74 46062 : r->name = NULL;
75 : }
76 190756 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
77 : }
78 190756 : if (ndr_flags & NDR_BUFFERS) {
79 190756 : if (r->name) {
80 144694 : _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
81 144694 : NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
82 144694 : NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
83 144694 : NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
84 144694 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->name, &size_name_1));
85 144694 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->name, &length_name_1));
86 144694 : if (length_name_1 > size_name_1) {
87 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_name_1, length_name_1);
88 : }
89 144694 : NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
90 144694 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
91 144694 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
92 : }
93 : }
94 190740 : return NDR_ERR_SUCCESS;
95 : }
96 :
97 0 : static void ndr_print_flags_winreg_String(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct winreg_String *r)
98 : {
99 0 : ndr_print_winreg_String(ndr, name, r);
100 0 : }
101 :
102 64 : _PUBLIC_ void ndr_print_winreg_String(struct ndr_print *ndr, const char *name, const struct winreg_String *r)
103 : {
104 64 : ndr_print_struct(ndr, name, "winreg_String");
105 64 : if (r == NULL) { ndr_print_null(ndr); return; }
106 64 : ndr->depth++;
107 64 : ndr_print_uint16(ndr, "name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->name) * 2:r->name_len);
108 64 : ndr_print_uint16(ndr, "name_size", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->name) * 2:r->name_size);
109 64 : ndr_print_ptr(ndr, "name", r->name);
110 64 : ndr->depth++;
111 64 : if (r->name) {
112 16 : ndr_print_string(ndr, "name", r->name);
113 : }
114 64 : ndr->depth--;
115 64 : ndr->depth--;
116 : }
117 :
118 0 : static enum ndr_err_code ndr_push_KeySecurityData(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct KeySecurityData *r)
119 : {
120 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
121 0 : if (ndr_flags & NDR_SCALARS) {
122 0 : NDR_CHECK(ndr_push_align(ndr, 5));
123 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->data));
124 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
125 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->len));
126 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
127 : }
128 0 : if (ndr_flags & NDR_BUFFERS) {
129 0 : if (r->data) {
130 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->size));
131 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
132 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->len));
133 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->data, r->len));
134 : }
135 : }
136 0 : return NDR_ERR_SUCCESS;
137 : }
138 :
139 0 : static enum ndr_err_code ndr_pull_KeySecurityData(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct KeySecurityData *r)
140 : {
141 0 : uint32_t _ptr_data;
142 0 : uint32_t size_data_1 = 0;
143 0 : uint32_t length_data_1 = 0;
144 0 : TALLOC_CTX *_mem_save_data_0 = NULL;
145 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
146 0 : if (ndr_flags & NDR_SCALARS) {
147 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
148 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
149 0 : if (_ptr_data) {
150 0 : NDR_PULL_ALLOC(ndr, r->data);
151 : } else {
152 0 : r->data = NULL;
153 : }
154 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
155 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->len));
156 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
157 : }
158 0 : if (ndr_flags & NDR_BUFFERS) {
159 0 : if (r->data) {
160 0 : _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
161 0 : NDR_PULL_SET_MEM_CTX(ndr, r->data, 0);
162 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->data));
163 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->data));
164 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->data, &size_data_1));
165 0 : NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->data, &length_data_1));
166 0 : if (length_data_1 > size_data_1) {
167 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_data_1, length_data_1);
168 : }
169 0 : NDR_PULL_ALLOC_N(ndr, r->data, size_data_1);
170 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->data, length_data_1));
171 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
172 : }
173 0 : if (r->data) {
174 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->data, r->size));
175 : }
176 0 : if (r->data) {
177 0 : NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->data, r->len));
178 : }
179 : }
180 0 : return NDR_ERR_SUCCESS;
181 : }
182 :
183 0 : _PUBLIC_ void ndr_print_KeySecurityData(struct ndr_print *ndr, const char *name, const struct KeySecurityData *r)
184 : {
185 0 : ndr_print_struct(ndr, name, "KeySecurityData");
186 0 : if (r == NULL) { ndr_print_null(ndr); return; }
187 0 : ndr->depth++;
188 0 : ndr_print_ptr(ndr, "data", r->data);
189 0 : ndr->depth++;
190 0 : if (r->data) {
191 0 : ndr_print_array_uint8(ndr, "data", r->data, r->len);
192 : }
193 0 : ndr->depth--;
194 0 : ndr_print_uint32(ndr, "size", r->size);
195 0 : ndr_print_uint32(ndr, "len", r->len);
196 0 : ndr->depth--;
197 : }
198 :
199 0 : static enum ndr_err_code ndr_push_winreg_SecBuf(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct winreg_SecBuf *r)
200 : {
201 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
202 0 : if (ndr_flags & NDR_SCALARS) {
203 0 : NDR_CHECK(ndr_push_align(ndr, 5));
204 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->length));
205 0 : NDR_CHECK(ndr_push_KeySecurityData(ndr, NDR_SCALARS, &r->sd));
206 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->inherit));
207 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
208 : }
209 0 : if (ndr_flags & NDR_BUFFERS) {
210 0 : NDR_CHECK(ndr_push_KeySecurityData(ndr, NDR_BUFFERS, &r->sd));
211 : }
212 0 : return NDR_ERR_SUCCESS;
213 : }
214 :
215 0 : static enum ndr_err_code ndr_pull_winreg_SecBuf(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct winreg_SecBuf *r)
216 : {
217 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
218 0 : if (ndr_flags & NDR_SCALARS) {
219 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
220 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
221 0 : NDR_CHECK(ndr_pull_KeySecurityData(ndr, NDR_SCALARS, &r->sd));
222 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->inherit));
223 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
224 : }
225 0 : if (ndr_flags & NDR_BUFFERS) {
226 0 : NDR_CHECK(ndr_pull_KeySecurityData(ndr, NDR_BUFFERS, &r->sd));
227 : }
228 0 : return NDR_ERR_SUCCESS;
229 : }
230 :
231 0 : _PUBLIC_ void ndr_print_winreg_SecBuf(struct ndr_print *ndr, const char *name, const struct winreg_SecBuf *r)
232 : {
233 0 : ndr_print_struct(ndr, name, "winreg_SecBuf");
234 0 : if (r == NULL) { ndr_print_null(ndr); return; }
235 0 : ndr->depth++;
236 0 : ndr_print_uint32(ndr, "length", r->length);
237 0 : ndr_print_KeySecurityData(ndr, "sd", &r->sd);
238 0 : ndr_print_uint8(ndr, "inherit", r->inherit);
239 0 : ndr->depth--;
240 : }
241 :
242 51024 : static enum ndr_err_code ndr_push_winreg_KeyOptions(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
243 : {
244 51024 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
245 51024 : return NDR_ERR_SUCCESS;
246 : }
247 :
248 51048 : static enum ndr_err_code ndr_pull_winreg_KeyOptions(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
249 : {
250 4 : uint32_t v;
251 51048 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
252 51048 : *r = v;
253 51048 : return NDR_ERR_SUCCESS;
254 : }
255 :
256 12 : _PUBLIC_ void ndr_print_winreg_KeyOptions(struct ndr_print *ndr, const char *name, uint32_t r)
257 : {
258 12 : ndr_print_uint32(ndr, name, r);
259 12 : ndr->depth++;
260 12 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "REG_OPTION_VOLATILE", REG_OPTION_VOLATILE, r);
261 12 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "REG_OPTION_CREATE_LINK", REG_OPTION_CREATE_LINK, r);
262 12 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "REG_OPTION_BACKUP_RESTORE", REG_OPTION_BACKUP_RESTORE, r);
263 12 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "REG_OPTION_OPEN_LINK", REG_OPTION_OPEN_LINK, r);
264 12 : ndr->depth--;
265 12 : }
266 :
267 15873 : static enum ndr_err_code ndr_push_winreg_CreateAction(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum winreg_CreateAction r)
268 : {
269 15873 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
270 15873 : return NDR_ERR_SUCCESS;
271 : }
272 :
273 15852 : static enum ndr_err_code ndr_pull_winreg_CreateAction(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum winreg_CreateAction *r)
274 : {
275 0 : uint32_t v;
276 15852 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
277 15852 : *r = v;
278 15852 : return NDR_ERR_SUCCESS;
279 : }
280 :
281 42 : _PUBLIC_ void ndr_print_winreg_CreateAction(struct ndr_print *ndr, const char *name, enum winreg_CreateAction r)
282 : {
283 42 : const char *val = NULL;
284 :
285 42 : switch (r) {
286 0 : case REG_ACTION_NONE: val = "REG_ACTION_NONE"; break;
287 42 : case REG_CREATED_NEW_KEY: val = "REG_CREATED_NEW_KEY"; break;
288 0 : case REG_OPENED_EXISTING_KEY: val = "REG_OPENED_EXISTING_KEY"; break;
289 : }
290 42 : ndr_print_enum(ndr, name, "ENUM", val, r);
291 42 : }
292 :
293 265914 : static enum ndr_err_code ndr_push_winreg_StringBuf(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct winreg_StringBuf *r)
294 : {
295 265914 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
296 265914 : if (ndr_flags & NDR_SCALARS) {
297 265914 : NDR_CHECK(ndr_push_align(ndr, 5));
298 265914 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term_null(r->name) * 2));
299 265914 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->size));
300 265914 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
301 265914 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
302 : }
303 265914 : if (ndr_flags & NDR_BUFFERS) {
304 265914 : if (r->name) {
305 264942 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->size / 2));
306 264942 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
307 264942 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, strlen_m_term_null(r->name) * 2 / 2));
308 264942 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, strlen_m_term_null(r->name) * 2 / 2, sizeof(uint16_t), CH_UTF16));
309 : }
310 : }
311 265914 : return NDR_ERR_SUCCESS;
312 : }
313 :
314 265908 : static enum ndr_err_code ndr_pull_winreg_StringBuf(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct winreg_StringBuf *r)
315 : {
316 8 : uint32_t _ptr_name;
317 265908 : uint32_t size_name_1 = 0;
318 265908 : uint32_t length_name_1 = 0;
319 265908 : TALLOC_CTX *_mem_save_name_0 = NULL;
320 265908 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
321 265908 : if (ndr_flags & NDR_SCALARS) {
322 265908 : NDR_CHECK(ndr_pull_align(ndr, 5));
323 265908 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
324 265908 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
325 265908 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
326 265908 : if (_ptr_name) {
327 264936 : NDR_PULL_ALLOC(ndr, r->name);
328 : } else {
329 972 : r->name = NULL;
330 : }
331 265908 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
332 : }
333 265908 : if (ndr_flags & NDR_BUFFERS) {
334 265908 : if (r->name) {
335 264936 : _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
336 264936 : NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
337 264936 : NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
338 264936 : NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
339 264936 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->name, &size_name_1));
340 264936 : NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->name, &length_name_1));
341 264936 : if (length_name_1 > size_name_1) {
342 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_name_1, length_name_1);
343 : }
344 264936 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
345 264936 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
346 : }
347 265908 : if (r->name) {
348 264936 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->name, r->size / 2));
349 : }
350 265908 : if (r->name) {
351 264936 : NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->name, r->length / 2));
352 : }
353 : }
354 265900 : return NDR_ERR_SUCCESS;
355 : }
356 :
357 60 : _PUBLIC_ void ndr_print_winreg_StringBuf(struct ndr_print *ndr, const char *name, const struct winreg_StringBuf *r)
358 : {
359 60 : ndr_print_struct(ndr, name, "winreg_StringBuf");
360 60 : if (r == NULL) { ndr_print_null(ndr); return; }
361 60 : ndr->depth++;
362 60 : ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term_null(r->name) * 2:r->length);
363 60 : ndr_print_uint16(ndr, "size", r->size);
364 60 : ndr_print_ptr(ndr, "name", r->name);
365 60 : ndr->depth++;
366 60 : if (r->name) {
367 48 : ndr_print_string(ndr, "name", r->name);
368 : }
369 60 : ndr->depth--;
370 60 : ndr->depth--;
371 : }
372 :
373 389943 : static enum ndr_err_code ndr_push_winreg_ValNameBuf(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct winreg_ValNameBuf *r)
374 : {
375 389943 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
376 389943 : if (ndr_flags & NDR_SCALARS) {
377 389943 : NDR_CHECK(ndr_push_align(ndr, 5));
378 389943 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, strlen_m_term(r->name) * 2));
379 389943 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->size));
380 389943 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
381 389943 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
382 : }
383 389943 : if (ndr_flags & NDR_BUFFERS) {
384 389943 : if (r->name) {
385 389935 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->size / 2));
386 389935 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
387 389935 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, strlen_m_term(r->name) * 2 / 2));
388 389935 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, strlen_m_term(r->name) * 2 / 2, sizeof(uint16_t), CH_UTF16));
389 : }
390 : }
391 389943 : return NDR_ERR_SUCCESS;
392 : }
393 :
394 389918 : static enum ndr_err_code ndr_pull_winreg_ValNameBuf(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct winreg_ValNameBuf *r)
395 : {
396 18 : uint32_t _ptr_name;
397 389918 : uint32_t size_name_1 = 0;
398 389918 : uint32_t length_name_1 = 0;
399 389918 : TALLOC_CTX *_mem_save_name_0 = NULL;
400 389918 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
401 389918 : if (ndr_flags & NDR_SCALARS) {
402 389918 : NDR_CHECK(ndr_pull_align(ndr, 5));
403 389918 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->length));
404 389918 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->size));
405 389918 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
406 389918 : if (_ptr_name) {
407 389910 : NDR_PULL_ALLOC(ndr, r->name);
408 : } else {
409 8 : r->name = NULL;
410 : }
411 389918 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
412 : }
413 389918 : if (ndr_flags & NDR_BUFFERS) {
414 389918 : if (r->name) {
415 389910 : _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
416 389910 : NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
417 389910 : NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
418 389910 : NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
419 389910 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->name, &size_name_1));
420 389910 : NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->name, &length_name_1));
421 389910 : if (length_name_1 > size_name_1) {
422 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_name_1, length_name_1);
423 : }
424 389910 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
425 389910 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
426 : }
427 389918 : if (r->name) {
428 389910 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->name, r->size / 2));
429 : }
430 389918 : if (r->name) {
431 389910 : NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->name, r->length / 2));
432 : }
433 : }
434 389900 : return NDR_ERR_SUCCESS;
435 : }
436 :
437 196 : _PUBLIC_ void ndr_print_winreg_ValNameBuf(struct ndr_print *ndr, const char *name, const struct winreg_ValNameBuf *r)
438 : {
439 196 : ndr_print_struct(ndr, name, "winreg_ValNameBuf");
440 196 : if (r == NULL) { ndr_print_null(ndr); return; }
441 196 : ndr->depth++;
442 196 : ndr_print_uint16(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen_m_term(r->name) * 2:r->length);
443 196 : ndr_print_uint16(ndr, "size", r->size);
444 196 : ndr_print_ptr(ndr, "name", r->name);
445 196 : ndr->depth++;
446 196 : if (r->name) {
447 196 : ndr_print_string(ndr, "name", r->name);
448 : }
449 196 : ndr->depth--;
450 196 : ndr->depth--;
451 : }
452 :
453 272 : _PUBLIC_ enum ndr_err_code ndr_push_winreg_NotifyChangeType(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
454 : {
455 272 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
456 272 : return NDR_ERR_SUCCESS;
457 : }
458 :
459 274 : _PUBLIC_ enum ndr_err_code ndr_pull_winreg_NotifyChangeType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
460 : {
461 2 : uint32_t v;
462 274 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
463 274 : *r = v;
464 274 : return NDR_ERR_SUCCESS;
465 : }
466 :
467 2 : _PUBLIC_ void ndr_print_winreg_NotifyChangeType(struct ndr_print *ndr, const char *name, uint32_t r)
468 : {
469 2 : ndr_print_uint32(ndr, name, r);
470 2 : ndr->depth++;
471 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "REG_NOTIFY_CHANGE_NAME", REG_NOTIFY_CHANGE_NAME, r);
472 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "REG_NOTIFY_CHANGE_ATTRIBUTES", REG_NOTIFY_CHANGE_ATTRIBUTES, r);
473 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "REG_NOTIFY_CHANGE_LAST_SET", REG_NOTIFY_CHANGE_LAST_SET, r);
474 2 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "REG_NOTIFY_CHANGE_SECURITY", REG_NOTIFY_CHANGE_SECURITY, r);
475 2 : ndr->depth--;
476 2 : }
477 :
478 0 : _PUBLIC_ enum ndr_err_code ndr_push_winreg_RestoreKeyFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
479 : {
480 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
481 0 : return NDR_ERR_SUCCESS;
482 : }
483 :
484 0 : _PUBLIC_ enum ndr_err_code ndr_pull_winreg_RestoreKeyFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
485 : {
486 0 : uint32_t v;
487 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
488 0 : *r = v;
489 0 : return NDR_ERR_SUCCESS;
490 : }
491 :
492 0 : _PUBLIC_ void ndr_print_winreg_RestoreKeyFlags(struct ndr_print *ndr, const char *name, uint32_t r)
493 : {
494 0 : ndr_print_uint32(ndr, name, r);
495 0 : ndr->depth++;
496 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "REG_WHOLE_HIVE_VOLATILE", REG_WHOLE_HIVE_VOLATILE, r);
497 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "REG_REFRESH_HIVE", REG_REFRESH_HIVE, r);
498 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "REG_NO_LAZY_FLUSH", REG_NO_LAZY_FLUSH, r);
499 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "REG_FORCE_RESTORE", REG_FORCE_RESTORE, r);
500 0 : ndr->depth--;
501 0 : }
502 :
503 0 : static enum ndr_err_code ndr_push_KeySecurityAttribute(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct KeySecurityAttribute *r)
504 : {
505 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
506 0 : if (ndr_flags & NDR_SCALARS) {
507 0 : NDR_CHECK(ndr_push_align(ndr, 5));
508 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->data_size));
509 0 : NDR_CHECK(ndr_push_KeySecurityData(ndr, NDR_SCALARS, &r->sec_data));
510 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->inherit));
511 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
512 : }
513 0 : if (ndr_flags & NDR_BUFFERS) {
514 0 : NDR_CHECK(ndr_push_KeySecurityData(ndr, NDR_BUFFERS, &r->sec_data));
515 : }
516 0 : return NDR_ERR_SUCCESS;
517 : }
518 :
519 0 : static enum ndr_err_code ndr_pull_KeySecurityAttribute(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct KeySecurityAttribute *r)
520 : {
521 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
522 0 : if (ndr_flags & NDR_SCALARS) {
523 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
524 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->data_size));
525 0 : NDR_CHECK(ndr_pull_KeySecurityData(ndr, NDR_SCALARS, &r->sec_data));
526 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->inherit));
527 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
528 : }
529 0 : if (ndr_flags & NDR_BUFFERS) {
530 0 : NDR_CHECK(ndr_pull_KeySecurityData(ndr, NDR_BUFFERS, &r->sec_data));
531 : }
532 0 : return NDR_ERR_SUCCESS;
533 : }
534 :
535 0 : _PUBLIC_ void ndr_print_KeySecurityAttribute(struct ndr_print *ndr, const char *name, const struct KeySecurityAttribute *r)
536 : {
537 0 : ndr_print_struct(ndr, name, "KeySecurityAttribute");
538 0 : if (r == NULL) { ndr_print_null(ndr); return; }
539 0 : ndr->depth++;
540 0 : ndr_print_uint32(ndr, "data_size", r->data_size);
541 0 : ndr_print_KeySecurityData(ndr, "sec_data", &r->sec_data);
542 0 : ndr_print_uint8(ndr, "inherit", r->inherit);
543 0 : ndr->depth--;
544 : }
545 :
546 800 : static enum ndr_err_code ndr_push_QueryMultipleValue(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct QueryMultipleValue *r)
547 : {
548 800 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
549 800 : if (ndr_flags & NDR_SCALARS) {
550 400 : NDR_CHECK(ndr_push_align(ndr, 5));
551 400 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->ve_valuename));
552 400 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ve_valuelen));
553 400 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ve_valueptr));
554 400 : NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, r->ve_type));
555 400 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
556 : }
557 800 : if (ndr_flags & NDR_BUFFERS) {
558 400 : if (r->ve_valuename) {
559 400 : NDR_CHECK(ndr_push_winreg_ValNameBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->ve_valuename));
560 : }
561 : }
562 800 : return NDR_ERR_SUCCESS;
563 : }
564 :
565 824 : static enum ndr_err_code ndr_pull_QueryMultipleValue(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct QueryMultipleValue *r)
566 : {
567 24 : uint32_t _ptr_ve_valuename;
568 824 : TALLOC_CTX *_mem_save_ve_valuename_0 = NULL;
569 824 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
570 824 : if (ndr_flags & NDR_SCALARS) {
571 412 : NDR_CHECK(ndr_pull_align(ndr, 5));
572 412 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ve_valuename));
573 412 : if (_ptr_ve_valuename) {
574 412 : NDR_PULL_ALLOC(ndr, r->ve_valuename);
575 : } else {
576 0 : r->ve_valuename = NULL;
577 : }
578 412 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ve_valuelen));
579 412 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ve_valueptr));
580 412 : NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, &r->ve_type));
581 412 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
582 : }
583 824 : if (ndr_flags & NDR_BUFFERS) {
584 412 : if (r->ve_valuename) {
585 412 : _mem_save_ve_valuename_0 = NDR_PULL_GET_MEM_CTX(ndr);
586 412 : NDR_PULL_SET_MEM_CTX(ndr, r->ve_valuename, 0);
587 412 : NDR_CHECK(ndr_pull_winreg_ValNameBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->ve_valuename));
588 412 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ve_valuename_0, 0);
589 : }
590 : }
591 800 : return NDR_ERR_SUCCESS;
592 : }
593 :
594 12 : _PUBLIC_ void ndr_print_QueryMultipleValue(struct ndr_print *ndr, const char *name, const struct QueryMultipleValue *r)
595 : {
596 12 : ndr_print_struct(ndr, name, "QueryMultipleValue");
597 12 : if (r == NULL) { ndr_print_null(ndr); return; }
598 12 : ndr->depth++;
599 12 : ndr_print_ptr(ndr, "ve_valuename", r->ve_valuename);
600 12 : ndr->depth++;
601 12 : if (r->ve_valuename) {
602 12 : ndr_print_winreg_ValNameBuf(ndr, "ve_valuename", r->ve_valuename);
603 : }
604 12 : ndr->depth--;
605 12 : ndr_print_uint32(ndr, "ve_valuelen", r->ve_valuelen);
606 12 : ndr_print_uint32(ndr, "ve_valueptr", r->ve_valueptr);
607 12 : ndr_print_winreg_Type(ndr, "ve_type", r->ve_type);
608 12 : ndr->depth--;
609 : }
610 :
611 177 : static enum ndr_err_code ndr_push_winreg_OpenHKCR(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_OpenHKCR *r)
612 : {
613 177 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
614 177 : if (flags & NDR_IN) {
615 88 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
616 88 : if (r->in.system_name) {
617 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.system_name));
618 : }
619 88 : NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
620 : }
621 177 : if (flags & NDR_OUT) {
622 89 : if (r->out.handle == NULL) {
623 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
624 : }
625 89 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
626 89 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
627 : }
628 177 : return NDR_ERR_SUCCESS;
629 : }
630 :
631 176 : static enum ndr_err_code ndr_pull_winreg_OpenHKCR(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_OpenHKCR *r)
632 : {
633 0 : uint32_t _ptr_system_name;
634 176 : TALLOC_CTX *_mem_save_system_name_0 = NULL;
635 176 : TALLOC_CTX *_mem_save_handle_0 = NULL;
636 176 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
637 176 : if (flags & NDR_IN) {
638 88 : NDR_ZERO_STRUCT(r->out);
639 :
640 88 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
641 88 : if (_ptr_system_name) {
642 0 : NDR_PULL_ALLOC(ndr, r->in.system_name);
643 : } else {
644 88 : r->in.system_name = NULL;
645 : }
646 88 : if (r->in.system_name) {
647 0 : _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
648 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
649 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.system_name));
650 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
651 : }
652 88 : NDR_CHECK(ndr_pull_winreg_AccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
653 88 : NDR_PULL_ALLOC(ndr, r->out.handle);
654 88 : NDR_ZERO_STRUCTP(r->out.handle);
655 : }
656 176 : if (flags & NDR_OUT) {
657 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
658 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
659 88 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
660 1 : NDR_PULL_ALLOC(ndr, r->out.handle);
661 : }
662 88 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
663 88 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
664 88 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
665 88 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
666 88 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
667 : }
668 176 : return NDR_ERR_SUCCESS;
669 : }
670 :
671 2 : _PUBLIC_ void ndr_print_winreg_OpenHKCR(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_OpenHKCR *r)
672 : {
673 2 : ndr_print_struct(ndr, name, "winreg_OpenHKCR");
674 2 : if (r == NULL) { ndr_print_null(ndr); return; }
675 2 : ndr->depth++;
676 2 : if (flags & NDR_SET_VALUES) {
677 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
678 : }
679 2 : if (flags & NDR_IN) {
680 0 : ndr_print_struct(ndr, "in", "winreg_OpenHKCR");
681 0 : ndr->depth++;
682 0 : ndr_print_ptr(ndr, "system_name", r->in.system_name);
683 0 : ndr->depth++;
684 0 : if (r->in.system_name) {
685 0 : ndr_print_uint16(ndr, "system_name", *r->in.system_name);
686 : }
687 0 : ndr->depth--;
688 0 : ndr_print_winreg_AccessMask(ndr, "access_mask", r->in.access_mask);
689 0 : ndr->depth--;
690 : }
691 2 : if (flags & NDR_OUT) {
692 2 : ndr_print_struct(ndr, "out", "winreg_OpenHKCR");
693 2 : ndr->depth++;
694 2 : ndr_print_ptr(ndr, "handle", r->out.handle);
695 2 : ndr->depth++;
696 2 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
697 2 : ndr->depth--;
698 2 : ndr_print_WERROR(ndr, "result", r->out.result);
699 2 : ndr->depth--;
700 : }
701 2 : ndr->depth--;
702 : }
703 :
704 177 : static enum ndr_err_code ndr_push_winreg_OpenHKCU(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_OpenHKCU *r)
705 : {
706 177 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
707 177 : if (flags & NDR_IN) {
708 88 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
709 88 : if (r->in.system_name) {
710 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.system_name));
711 : }
712 88 : NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
713 : }
714 177 : if (flags & NDR_OUT) {
715 89 : if (r->out.handle == NULL) {
716 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
717 : }
718 89 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
719 89 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
720 : }
721 177 : return NDR_ERR_SUCCESS;
722 : }
723 :
724 176 : static enum ndr_err_code ndr_pull_winreg_OpenHKCU(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_OpenHKCU *r)
725 : {
726 0 : uint32_t _ptr_system_name;
727 176 : TALLOC_CTX *_mem_save_system_name_0 = NULL;
728 176 : TALLOC_CTX *_mem_save_handle_0 = NULL;
729 176 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
730 176 : if (flags & NDR_IN) {
731 88 : NDR_ZERO_STRUCT(r->out);
732 :
733 88 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
734 88 : if (_ptr_system_name) {
735 0 : NDR_PULL_ALLOC(ndr, r->in.system_name);
736 : } else {
737 88 : r->in.system_name = NULL;
738 : }
739 88 : if (r->in.system_name) {
740 0 : _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
741 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
742 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.system_name));
743 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
744 : }
745 88 : NDR_CHECK(ndr_pull_winreg_AccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
746 88 : NDR_PULL_ALLOC(ndr, r->out.handle);
747 88 : NDR_ZERO_STRUCTP(r->out.handle);
748 : }
749 176 : if (flags & NDR_OUT) {
750 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
751 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
752 88 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
753 1 : NDR_PULL_ALLOC(ndr, r->out.handle);
754 : }
755 88 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
756 88 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
757 88 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
758 88 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
759 88 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
760 : }
761 176 : return NDR_ERR_SUCCESS;
762 : }
763 :
764 2 : _PUBLIC_ void ndr_print_winreg_OpenHKCU(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_OpenHKCU *r)
765 : {
766 2 : ndr_print_struct(ndr, name, "winreg_OpenHKCU");
767 2 : if (r == NULL) { ndr_print_null(ndr); return; }
768 2 : ndr->depth++;
769 2 : if (flags & NDR_SET_VALUES) {
770 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
771 : }
772 2 : if (flags & NDR_IN) {
773 0 : ndr_print_struct(ndr, "in", "winreg_OpenHKCU");
774 0 : ndr->depth++;
775 0 : ndr_print_ptr(ndr, "system_name", r->in.system_name);
776 0 : ndr->depth++;
777 0 : if (r->in.system_name) {
778 0 : ndr_print_uint16(ndr, "system_name", *r->in.system_name);
779 : }
780 0 : ndr->depth--;
781 0 : ndr_print_winreg_AccessMask(ndr, "access_mask", r->in.access_mask);
782 0 : ndr->depth--;
783 : }
784 2 : if (flags & NDR_OUT) {
785 2 : ndr_print_struct(ndr, "out", "winreg_OpenHKCU");
786 2 : ndr->depth++;
787 2 : ndr_print_ptr(ndr, "handle", r->out.handle);
788 2 : ndr->depth++;
789 2 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
790 2 : ndr->depth--;
791 2 : ndr_print_WERROR(ndr, "result", r->out.result);
792 2 : ndr->depth--;
793 : }
794 2 : ndr->depth--;
795 : }
796 :
797 89163 : _PUBLIC_ enum ndr_err_code ndr_push_winreg_OpenHKLM(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_OpenHKLM *r)
798 : {
799 89163 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
800 89163 : if (flags & NDR_IN) {
801 44579 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
802 44579 : if (r->in.system_name) {
803 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.system_name));
804 : }
805 44579 : NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
806 : }
807 89163 : if (flags & NDR_OUT) {
808 44584 : if (r->out.handle == NULL) {
809 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
810 : }
811 44584 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
812 44584 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
813 : }
814 89163 : return NDR_ERR_SUCCESS;
815 : }
816 :
817 89166 : _PUBLIC_ enum ndr_err_code ndr_pull_winreg_OpenHKLM(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_OpenHKLM *r)
818 : {
819 4 : uint32_t _ptr_system_name;
820 89166 : TALLOC_CTX *_mem_save_system_name_0 = NULL;
821 89166 : TALLOC_CTX *_mem_save_handle_0 = NULL;
822 89166 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
823 89166 : if (flags & NDR_IN) {
824 44585 : NDR_ZERO_STRUCT(r->out);
825 :
826 44585 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
827 44585 : if (_ptr_system_name) {
828 2 : NDR_PULL_ALLOC(ndr, r->in.system_name);
829 : } else {
830 44583 : r->in.system_name = NULL;
831 : }
832 44585 : if (r->in.system_name) {
833 2 : _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
834 2 : NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
835 2 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.system_name));
836 2 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
837 : }
838 44585 : NDR_CHECK(ndr_pull_winreg_AccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
839 44585 : NDR_PULL_ALLOC(ndr, r->out.handle);
840 44585 : NDR_ZERO_STRUCTP(r->out.handle);
841 : }
842 89166 : if (flags & NDR_OUT) {
843 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
844 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
845 44581 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
846 44442 : NDR_PULL_ALLOC(ndr, r->out.handle);
847 : }
848 44581 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
849 44581 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
850 44581 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
851 44581 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
852 44581 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
853 : }
854 89162 : return NDR_ERR_SUCCESS;
855 : }
856 :
857 10 : _PUBLIC_ void ndr_print_winreg_OpenHKLM(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_OpenHKLM *r)
858 : {
859 10 : ndr_print_struct(ndr, name, "winreg_OpenHKLM");
860 10 : if (r == NULL) { ndr_print_null(ndr); return; }
861 10 : ndr->depth++;
862 10 : if (flags & NDR_SET_VALUES) {
863 2 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
864 : }
865 10 : if (flags & NDR_IN) {
866 4 : ndr_print_struct(ndr, "in", "winreg_OpenHKLM");
867 4 : ndr->depth++;
868 4 : ndr_print_ptr(ndr, "system_name", r->in.system_name);
869 4 : ndr->depth++;
870 4 : if (r->in.system_name) {
871 2 : ndr_print_uint16(ndr, "system_name", *r->in.system_name);
872 : }
873 4 : ndr->depth--;
874 4 : ndr_print_winreg_AccessMask(ndr, "access_mask", r->in.access_mask);
875 4 : ndr->depth--;
876 : }
877 10 : if (flags & NDR_OUT) {
878 6 : ndr_print_struct(ndr, "out", "winreg_OpenHKLM");
879 6 : ndr->depth++;
880 6 : ndr_print_ptr(ndr, "handle", r->out.handle);
881 6 : ndr->depth++;
882 6 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
883 6 : ndr->depth--;
884 6 : ndr_print_WERROR(ndr, "result", r->out.result);
885 6 : ndr->depth--;
886 : }
887 10 : ndr->depth--;
888 : }
889 :
890 0 : static enum ndr_err_code ndr_push_winreg_OpenHKPD(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_OpenHKPD *r)
891 : {
892 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
893 0 : if (flags & NDR_IN) {
894 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
895 0 : if (r->in.system_name) {
896 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.system_name));
897 : }
898 0 : NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
899 : }
900 0 : if (flags & NDR_OUT) {
901 0 : if (r->out.handle == NULL) {
902 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
903 : }
904 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
905 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
906 : }
907 0 : return NDR_ERR_SUCCESS;
908 : }
909 :
910 0 : static enum ndr_err_code ndr_pull_winreg_OpenHKPD(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_OpenHKPD *r)
911 : {
912 0 : uint32_t _ptr_system_name;
913 0 : TALLOC_CTX *_mem_save_system_name_0 = NULL;
914 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
915 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
916 0 : if (flags & NDR_IN) {
917 0 : NDR_ZERO_STRUCT(r->out);
918 :
919 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
920 0 : if (_ptr_system_name) {
921 0 : NDR_PULL_ALLOC(ndr, r->in.system_name);
922 : } else {
923 0 : r->in.system_name = NULL;
924 : }
925 0 : if (r->in.system_name) {
926 0 : _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
927 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
928 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.system_name));
929 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
930 : }
931 0 : NDR_CHECK(ndr_pull_winreg_AccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
932 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
933 0 : NDR_ZERO_STRUCTP(r->out.handle);
934 : }
935 0 : if (flags & NDR_OUT) {
936 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
937 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
938 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
939 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
940 : }
941 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
942 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
943 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
944 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
945 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
946 : }
947 0 : return NDR_ERR_SUCCESS;
948 : }
949 :
950 0 : _PUBLIC_ void ndr_print_winreg_OpenHKPD(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_OpenHKPD *r)
951 : {
952 0 : ndr_print_struct(ndr, name, "winreg_OpenHKPD");
953 0 : if (r == NULL) { ndr_print_null(ndr); return; }
954 0 : ndr->depth++;
955 0 : if (flags & NDR_SET_VALUES) {
956 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
957 : }
958 0 : if (flags & NDR_IN) {
959 0 : ndr_print_struct(ndr, "in", "winreg_OpenHKPD");
960 0 : ndr->depth++;
961 0 : ndr_print_ptr(ndr, "system_name", r->in.system_name);
962 0 : ndr->depth++;
963 0 : if (r->in.system_name) {
964 0 : ndr_print_uint16(ndr, "system_name", *r->in.system_name);
965 : }
966 0 : ndr->depth--;
967 0 : ndr_print_winreg_AccessMask(ndr, "access_mask", r->in.access_mask);
968 0 : ndr->depth--;
969 : }
970 0 : if (flags & NDR_OUT) {
971 0 : ndr_print_struct(ndr, "out", "winreg_OpenHKPD");
972 0 : ndr->depth++;
973 0 : ndr_print_ptr(ndr, "handle", r->out.handle);
974 0 : ndr->depth++;
975 0 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
976 0 : ndr->depth--;
977 0 : ndr_print_WERROR(ndr, "result", r->out.result);
978 0 : ndr->depth--;
979 : }
980 0 : ndr->depth--;
981 : }
982 :
983 177 : static enum ndr_err_code ndr_push_winreg_OpenHKU(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_OpenHKU *r)
984 : {
985 177 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
986 177 : if (flags & NDR_IN) {
987 88 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
988 88 : if (r->in.system_name) {
989 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.system_name));
990 : }
991 88 : NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
992 : }
993 177 : if (flags & NDR_OUT) {
994 89 : if (r->out.handle == NULL) {
995 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
996 : }
997 89 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
998 89 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
999 : }
1000 177 : return NDR_ERR_SUCCESS;
1001 : }
1002 :
1003 176 : static enum ndr_err_code ndr_pull_winreg_OpenHKU(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_OpenHKU *r)
1004 : {
1005 0 : uint32_t _ptr_system_name;
1006 176 : TALLOC_CTX *_mem_save_system_name_0 = NULL;
1007 176 : TALLOC_CTX *_mem_save_handle_0 = NULL;
1008 176 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1009 176 : if (flags & NDR_IN) {
1010 88 : NDR_ZERO_STRUCT(r->out);
1011 :
1012 88 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
1013 88 : if (_ptr_system_name) {
1014 0 : NDR_PULL_ALLOC(ndr, r->in.system_name);
1015 : } else {
1016 88 : r->in.system_name = NULL;
1017 : }
1018 88 : if (r->in.system_name) {
1019 0 : _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
1020 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
1021 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.system_name));
1022 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
1023 : }
1024 88 : NDR_CHECK(ndr_pull_winreg_AccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
1025 88 : NDR_PULL_ALLOC(ndr, r->out.handle);
1026 88 : NDR_ZERO_STRUCTP(r->out.handle);
1027 : }
1028 176 : if (flags & NDR_OUT) {
1029 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1030 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1031 88 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1032 1 : NDR_PULL_ALLOC(ndr, r->out.handle);
1033 : }
1034 88 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1035 88 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
1036 88 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
1037 88 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1038 88 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1039 : }
1040 176 : return NDR_ERR_SUCCESS;
1041 : }
1042 :
1043 2 : _PUBLIC_ void ndr_print_winreg_OpenHKU(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_OpenHKU *r)
1044 : {
1045 2 : ndr_print_struct(ndr, name, "winreg_OpenHKU");
1046 2 : if (r == NULL) { ndr_print_null(ndr); return; }
1047 2 : ndr->depth++;
1048 2 : if (flags & NDR_SET_VALUES) {
1049 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1050 : }
1051 2 : if (flags & NDR_IN) {
1052 0 : ndr_print_struct(ndr, "in", "winreg_OpenHKU");
1053 0 : ndr->depth++;
1054 0 : ndr_print_ptr(ndr, "system_name", r->in.system_name);
1055 0 : ndr->depth++;
1056 0 : if (r->in.system_name) {
1057 0 : ndr_print_uint16(ndr, "system_name", *r->in.system_name);
1058 : }
1059 0 : ndr->depth--;
1060 0 : ndr_print_winreg_AccessMask(ndr, "access_mask", r->in.access_mask);
1061 0 : ndr->depth--;
1062 : }
1063 2 : if (flags & NDR_OUT) {
1064 2 : ndr_print_struct(ndr, "out", "winreg_OpenHKU");
1065 2 : ndr->depth++;
1066 2 : ndr_print_ptr(ndr, "handle", r->out.handle);
1067 2 : ndr->depth++;
1068 2 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
1069 2 : ndr->depth--;
1070 2 : ndr_print_WERROR(ndr, "result", r->out.result);
1071 2 : ndr->depth--;
1072 : }
1073 2 : ndr->depth--;
1074 : }
1075 :
1076 182021 : _PUBLIC_ enum ndr_err_code ndr_push_winreg_CloseKey(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_CloseKey *r)
1077 : {
1078 182021 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1079 182021 : if (flags & NDR_IN) {
1080 91019 : if (r->in.handle == NULL) {
1081 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1082 : }
1083 91019 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1084 : }
1085 182021 : if (flags & NDR_OUT) {
1086 91002 : if (r->out.handle == NULL) {
1087 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1088 : }
1089 91002 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
1090 91002 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1091 : }
1092 182021 : return NDR_ERR_SUCCESS;
1093 : }
1094 :
1095 182016 : _PUBLIC_ enum ndr_err_code ndr_pull_winreg_CloseKey(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_CloseKey *r)
1096 : {
1097 182016 : TALLOC_CTX *_mem_save_handle_0 = NULL;
1098 182016 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1099 182016 : if (flags & NDR_IN) {
1100 91041 : NDR_ZERO_STRUCT(r->out);
1101 :
1102 91041 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1103 91041 : NDR_PULL_ALLOC(ndr, r->in.handle);
1104 : }
1105 91041 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1106 91041 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1107 91041 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1108 91041 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1109 91041 : NDR_PULL_ALLOC(ndr, r->out.handle);
1110 91041 : *r->out.handle = *r->in.handle;
1111 : }
1112 182016 : if (flags & NDR_OUT) {
1113 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1114 : if (r->in.handle == NULL) {
1115 : NDR_PULL_ALLOC(ndr, r->in.handle);
1116 : NDR_ZERO_STRUCTP(r->in.handle);
1117 : }
1118 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1119 90975 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1120 89604 : NDR_PULL_ALLOC(ndr, r->out.handle);
1121 : }
1122 90975 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1123 90975 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
1124 90975 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
1125 90975 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1126 90975 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1127 : }
1128 182012 : return NDR_ERR_SUCCESS;
1129 : }
1130 :
1131 42 : _PUBLIC_ void ndr_print_winreg_CloseKey(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_CloseKey *r)
1132 : {
1133 42 : ndr_print_struct(ndr, name, "winreg_CloseKey");
1134 42 : if (r == NULL) { ndr_print_null(ndr); return; }
1135 42 : ndr->depth++;
1136 42 : if (flags & NDR_SET_VALUES) {
1137 10 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1138 : }
1139 42 : if (flags & NDR_IN) {
1140 12 : ndr_print_struct(ndr, "in", "winreg_CloseKey");
1141 12 : ndr->depth++;
1142 12 : ndr_print_ptr(ndr, "handle", r->in.handle);
1143 12 : ndr->depth++;
1144 12 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
1145 12 : ndr->depth--;
1146 12 : ndr->depth--;
1147 : }
1148 42 : if (flags & NDR_OUT) {
1149 30 : ndr_print_struct(ndr, "out", "winreg_CloseKey");
1150 30 : ndr->depth++;
1151 30 : ndr_print_ptr(ndr, "handle", r->out.handle);
1152 30 : ndr->depth++;
1153 30 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
1154 30 : ndr->depth--;
1155 30 : ndr_print_WERROR(ndr, "result", r->out.result);
1156 30 : ndr->depth--;
1157 : }
1158 42 : ndr->depth--;
1159 : }
1160 :
1161 15873 : _PUBLIC_ enum ndr_err_code ndr_push_winreg_CreateKey(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_CreateKey *r)
1162 : {
1163 15873 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1164 15873 : if (flags & NDR_IN) {
1165 7918 : if (r->in.handle == NULL) {
1166 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1167 : }
1168 7918 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1169 7918 : NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
1170 7918 : NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.keyclass));
1171 7918 : NDR_CHECK(ndr_push_winreg_KeyOptions(ndr, NDR_SCALARS, r->in.options));
1172 7918 : NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
1173 7918 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.secdesc));
1174 7918 : if (r->in.secdesc) {
1175 0 : NDR_CHECK(ndr_push_winreg_SecBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.secdesc));
1176 : }
1177 7918 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.action_taken));
1178 7918 : if (r->in.action_taken) {
1179 7918 : NDR_CHECK(ndr_push_winreg_CreateAction(ndr, NDR_SCALARS, *r->in.action_taken));
1180 : }
1181 : }
1182 15873 : if (flags & NDR_OUT) {
1183 7955 : if (r->out.new_handle == NULL) {
1184 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1185 : }
1186 7955 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.new_handle));
1187 7955 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.action_taken));
1188 7955 : if (r->out.action_taken) {
1189 7955 : NDR_CHECK(ndr_push_winreg_CreateAction(ndr, NDR_SCALARS, *r->out.action_taken));
1190 : }
1191 7955 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1192 : }
1193 15873 : return NDR_ERR_SUCCESS;
1194 : }
1195 :
1196 15856 : _PUBLIC_ enum ndr_err_code ndr_pull_winreg_CreateKey(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_CreateKey *r)
1197 : {
1198 4 : uint32_t _ptr_secdesc;
1199 4 : uint32_t _ptr_action_taken;
1200 15856 : TALLOC_CTX *_mem_save_handle_0 = NULL;
1201 15856 : TALLOC_CTX *_mem_save_secdesc_0 = NULL;
1202 15856 : TALLOC_CTX *_mem_save_new_handle_0 = NULL;
1203 15856 : TALLOC_CTX *_mem_save_action_taken_0 = NULL;
1204 15856 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1205 15856 : if (flags & NDR_IN) {
1206 7936 : NDR_ZERO_STRUCT(r->out);
1207 :
1208 7936 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1209 7936 : NDR_PULL_ALLOC(ndr, r->in.handle);
1210 : }
1211 7936 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1212 7936 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1213 7936 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1214 7936 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1215 7936 : NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
1216 7936 : NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.keyclass));
1217 7938 : NDR_CHECK(ndr_pull_winreg_KeyOptions(ndr, NDR_SCALARS, &r->in.options));
1218 7936 : NDR_CHECK(ndr_pull_winreg_AccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
1219 7936 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_secdesc));
1220 7936 : if (_ptr_secdesc) {
1221 0 : NDR_PULL_ALLOC(ndr, r->in.secdesc);
1222 : } else {
1223 7936 : r->in.secdesc = NULL;
1224 : }
1225 7936 : if (r->in.secdesc) {
1226 0 : _mem_save_secdesc_0 = NDR_PULL_GET_MEM_CTX(ndr);
1227 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.secdesc, 0);
1228 0 : NDR_CHECK(ndr_pull_winreg_SecBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.secdesc));
1229 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secdesc_0, 0);
1230 : }
1231 7936 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_action_taken));
1232 7936 : if (_ptr_action_taken) {
1233 7934 : NDR_PULL_ALLOC(ndr, r->in.action_taken);
1234 : } else {
1235 2 : r->in.action_taken = NULL;
1236 : }
1237 7936 : if (r->in.action_taken) {
1238 7934 : _mem_save_action_taken_0 = NDR_PULL_GET_MEM_CTX(ndr);
1239 7934 : NDR_PULL_SET_MEM_CTX(ndr, r->in.action_taken, 0);
1240 7934 : NDR_CHECK(ndr_pull_winreg_CreateAction(ndr, NDR_SCALARS, r->in.action_taken));
1241 7934 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_action_taken_0, 0);
1242 : }
1243 7936 : NDR_PULL_ALLOC(ndr, r->out.new_handle);
1244 7936 : NDR_ZERO_STRUCTP(r->out.new_handle);
1245 : }
1246 15856 : if (flags & NDR_OUT) {
1247 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1248 : if (r->in.handle == NULL) {
1249 : NDR_PULL_ALLOC(ndr, r->in.handle);
1250 : NDR_ZERO_STRUCTP(r->in.handle);
1251 : }
1252 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1253 7920 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1254 6093 : NDR_PULL_ALLOC(ndr, r->out.new_handle);
1255 : }
1256 7920 : _mem_save_new_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1257 7920 : NDR_PULL_SET_MEM_CTX(ndr, r->out.new_handle, LIBNDR_FLAG_REF_ALLOC);
1258 7920 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.new_handle));
1259 7920 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_handle_0, LIBNDR_FLAG_REF_ALLOC);
1260 7920 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_action_taken));
1261 7920 : if (_ptr_action_taken) {
1262 7918 : NDR_PULL_ALLOC(ndr, r->out.action_taken);
1263 : } else {
1264 2 : r->out.action_taken = NULL;
1265 : }
1266 7920 : if (r->out.action_taken) {
1267 7918 : _mem_save_action_taken_0 = NDR_PULL_GET_MEM_CTX(ndr);
1268 7918 : NDR_PULL_SET_MEM_CTX(ndr, r->out.action_taken, 0);
1269 7918 : NDR_CHECK(ndr_pull_winreg_CreateAction(ndr, NDR_SCALARS, r->out.action_taken));
1270 7918 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_action_taken_0, 0);
1271 : }
1272 7920 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1273 : }
1274 15852 : return NDR_ERR_SUCCESS;
1275 : }
1276 :
1277 46 : _PUBLIC_ void ndr_print_winreg_CreateKey(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_CreateKey *r)
1278 : {
1279 46 : ndr_print_struct(ndr, name, "winreg_CreateKey");
1280 46 : if (r == NULL) { ndr_print_null(ndr); return; }
1281 46 : ndr->depth++;
1282 46 : if (flags & NDR_SET_VALUES) {
1283 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1284 : }
1285 46 : if (flags & NDR_IN) {
1286 2 : ndr_print_struct(ndr, "in", "winreg_CreateKey");
1287 2 : ndr->depth++;
1288 2 : ndr_print_ptr(ndr, "handle", r->in.handle);
1289 2 : ndr->depth++;
1290 2 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
1291 2 : ndr->depth--;
1292 2 : ndr_print_winreg_String(ndr, "name", &r->in.name);
1293 2 : ndr_print_winreg_String(ndr, "keyclass", &r->in.keyclass);
1294 2 : ndr_print_winreg_KeyOptions(ndr, "options", r->in.options);
1295 2 : ndr_print_winreg_AccessMask(ndr, "access_mask", r->in.access_mask);
1296 2 : ndr_print_ptr(ndr, "secdesc", r->in.secdesc);
1297 2 : ndr->depth++;
1298 2 : if (r->in.secdesc) {
1299 0 : ndr_print_winreg_SecBuf(ndr, "secdesc", r->in.secdesc);
1300 : }
1301 2 : ndr->depth--;
1302 2 : ndr_print_ptr(ndr, "action_taken", r->in.action_taken);
1303 2 : ndr->depth++;
1304 2 : if (r->in.action_taken) {
1305 0 : ndr_print_winreg_CreateAction(ndr, "action_taken", *r->in.action_taken);
1306 : }
1307 2 : ndr->depth--;
1308 2 : ndr->depth--;
1309 : }
1310 46 : if (flags & NDR_OUT) {
1311 44 : ndr_print_struct(ndr, "out", "winreg_CreateKey");
1312 44 : ndr->depth++;
1313 44 : ndr_print_ptr(ndr, "new_handle", r->out.new_handle);
1314 44 : ndr->depth++;
1315 44 : ndr_print_policy_handle(ndr, "new_handle", r->out.new_handle);
1316 44 : ndr->depth--;
1317 44 : ndr_print_ptr(ndr, "action_taken", r->out.action_taken);
1318 44 : ndr->depth++;
1319 44 : if (r->out.action_taken) {
1320 42 : ndr_print_winreg_CreateAction(ndr, "action_taken", *r->out.action_taken);
1321 : }
1322 44 : ndr->depth--;
1323 44 : ndr_print_WERROR(ndr, "result", r->out.result);
1324 44 : ndr->depth--;
1325 : }
1326 46 : ndr->depth--;
1327 : }
1328 :
1329 7604 : _PUBLIC_ enum ndr_err_code ndr_push_winreg_DeleteKey(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_DeleteKey *r)
1330 : {
1331 7604 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1332 7604 : if (flags & NDR_IN) {
1333 3786 : if (r->in.handle == NULL) {
1334 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1335 : }
1336 3786 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1337 3786 : NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.key));
1338 : }
1339 7604 : if (flags & NDR_OUT) {
1340 3818 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1341 : }
1342 7604 : return NDR_ERR_SUCCESS;
1343 : }
1344 :
1345 7576 : _PUBLIC_ enum ndr_err_code ndr_pull_winreg_DeleteKey(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_DeleteKey *r)
1346 : {
1347 7576 : TALLOC_CTX *_mem_save_handle_0 = NULL;
1348 7576 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1349 7576 : if (flags & NDR_IN) {
1350 3788 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1351 3788 : NDR_PULL_ALLOC(ndr, r->in.handle);
1352 : }
1353 3788 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1354 3788 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1355 3788 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1356 3788 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1357 3788 : NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.key));
1358 : }
1359 7576 : if (flags & NDR_OUT) {
1360 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1361 : if (r->in.handle == NULL) {
1362 : NDR_PULL_ALLOC(ndr, r->in.handle);
1363 : NDR_ZERO_STRUCTP(r->in.handle);
1364 : }
1365 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1366 3788 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1367 : }
1368 7572 : return NDR_ERR_SUCCESS;
1369 : }
1370 :
1371 68 : _PUBLIC_ void ndr_print_winreg_DeleteKey(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_DeleteKey *r)
1372 : {
1373 68 : ndr_print_struct(ndr, name, "winreg_DeleteKey");
1374 68 : if (r == NULL) { ndr_print_null(ndr); return; }
1375 68 : ndr->depth++;
1376 68 : if (flags & NDR_SET_VALUES) {
1377 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1378 : }
1379 68 : if (flags & NDR_IN) {
1380 2 : ndr_print_struct(ndr, "in", "winreg_DeleteKey");
1381 2 : ndr->depth++;
1382 2 : ndr_print_ptr(ndr, "handle", r->in.handle);
1383 2 : ndr->depth++;
1384 2 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
1385 2 : ndr->depth--;
1386 2 : ndr_print_winreg_String(ndr, "key", &r->in.key);
1387 2 : ndr->depth--;
1388 : }
1389 68 : if (flags & NDR_OUT) {
1390 66 : ndr_print_struct(ndr, "out", "winreg_DeleteKey");
1391 66 : ndr->depth++;
1392 66 : ndr_print_WERROR(ndr, "result", r->out.result);
1393 66 : ndr->depth--;
1394 : }
1395 68 : ndr->depth--;
1396 : }
1397 :
1398 11216 : static enum ndr_err_code ndr_push_winreg_DeleteValue(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_DeleteValue *r)
1399 : {
1400 11216 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1401 11216 : if (flags & NDR_IN) {
1402 5592 : if (r->in.handle == NULL) {
1403 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1404 : }
1405 5592 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1406 5592 : NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.value));
1407 : }
1408 11216 : if (flags & NDR_OUT) {
1409 5624 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1410 : }
1411 11216 : return NDR_ERR_SUCCESS;
1412 : }
1413 :
1414 11184 : static enum ndr_err_code ndr_pull_winreg_DeleteValue(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_DeleteValue *r)
1415 : {
1416 11184 : TALLOC_CTX *_mem_save_handle_0 = NULL;
1417 11184 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1418 11184 : if (flags & NDR_IN) {
1419 5592 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1420 5592 : NDR_PULL_ALLOC(ndr, r->in.handle);
1421 : }
1422 5592 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1423 5592 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1424 5592 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1425 5592 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1426 5592 : NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.value));
1427 : }
1428 11184 : if (flags & NDR_OUT) {
1429 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1430 : if (r->in.handle == NULL) {
1431 : NDR_PULL_ALLOC(ndr, r->in.handle);
1432 : NDR_ZERO_STRUCTP(r->in.handle);
1433 : }
1434 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1435 5592 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1436 : }
1437 11184 : return NDR_ERR_SUCCESS;
1438 : }
1439 :
1440 64 : _PUBLIC_ void ndr_print_winreg_DeleteValue(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_DeleteValue *r)
1441 : {
1442 64 : ndr_print_struct(ndr, name, "winreg_DeleteValue");
1443 64 : if (r == NULL) { ndr_print_null(ndr); return; }
1444 64 : ndr->depth++;
1445 64 : if (flags & NDR_SET_VALUES) {
1446 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1447 : }
1448 64 : if (flags & NDR_IN) {
1449 0 : ndr_print_struct(ndr, "in", "winreg_DeleteValue");
1450 0 : ndr->depth++;
1451 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
1452 0 : ndr->depth++;
1453 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
1454 0 : ndr->depth--;
1455 0 : ndr_print_winreg_String(ndr, "value", &r->in.value);
1456 0 : ndr->depth--;
1457 : }
1458 64 : if (flags & NDR_OUT) {
1459 64 : ndr_print_struct(ndr, "out", "winreg_DeleteValue");
1460 64 : ndr->depth++;
1461 64 : ndr_print_WERROR(ndr, "result", r->out.result);
1462 64 : ndr->depth--;
1463 : }
1464 64 : ndr->depth--;
1465 : }
1466 :
1467 132957 : _PUBLIC_ enum ndr_err_code ndr_push_winreg_EnumKey(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_EnumKey *r)
1468 : {
1469 132957 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1470 132957 : if (flags & NDR_IN) {
1471 66466 : if (r->in.handle == NULL) {
1472 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1473 : }
1474 66466 : if (r->in.name == NULL) {
1475 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1476 : }
1477 66466 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1478 66466 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.enum_index));
1479 66466 : NDR_CHECK(ndr_push_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
1480 66466 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.keyclass));
1481 66466 : if (r->in.keyclass) {
1482 66466 : NDR_CHECK(ndr_push_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.keyclass));
1483 : }
1484 66466 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.last_changed_time));
1485 66466 : if (r->in.last_changed_time) {
1486 66466 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, *r->in.last_changed_time));
1487 : }
1488 : }
1489 132957 : if (flags & NDR_OUT) {
1490 66491 : if (r->out.name == NULL) {
1491 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1492 : }
1493 66491 : NDR_CHECK(ndr_push_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.name));
1494 66491 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.keyclass));
1495 66491 : if (r->out.keyclass) {
1496 66491 : NDR_CHECK(ndr_push_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.keyclass));
1497 : }
1498 66491 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.last_changed_time));
1499 66491 : if (r->out.last_changed_time) {
1500 66491 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, *r->out.last_changed_time));
1501 : }
1502 66491 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1503 : }
1504 132957 : return NDR_ERR_SUCCESS;
1505 : }
1506 :
1507 132954 : _PUBLIC_ enum ndr_err_code ndr_pull_winreg_EnumKey(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_EnumKey *r)
1508 : {
1509 4 : uint32_t _ptr_keyclass;
1510 4 : uint32_t _ptr_last_changed_time;
1511 132954 : TALLOC_CTX *_mem_save_handle_0 = NULL;
1512 132954 : TALLOC_CTX *_mem_save_name_0 = NULL;
1513 132954 : TALLOC_CTX *_mem_save_keyclass_0 = NULL;
1514 132954 : TALLOC_CTX *_mem_save_last_changed_time_0 = NULL;
1515 132954 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1516 132954 : if (flags & NDR_IN) {
1517 66486 : NDR_ZERO_STRUCT(r->out);
1518 :
1519 66486 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1520 66486 : NDR_PULL_ALLOC(ndr, r->in.handle);
1521 : }
1522 66486 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1523 66486 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1524 66486 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1525 66486 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1526 66486 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.enum_index));
1527 66486 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1528 66486 : NDR_PULL_ALLOC(ndr, r->in.name);
1529 : }
1530 66486 : _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
1531 66486 : NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC);
1532 66486 : NDR_CHECK(ndr_pull_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
1533 66486 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
1534 66486 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_keyclass));
1535 66486 : if (_ptr_keyclass) {
1536 66486 : NDR_PULL_ALLOC(ndr, r->in.keyclass);
1537 : } else {
1538 0 : r->in.keyclass = NULL;
1539 : }
1540 66486 : if (r->in.keyclass) {
1541 66486 : _mem_save_keyclass_0 = NDR_PULL_GET_MEM_CTX(ndr);
1542 66486 : NDR_PULL_SET_MEM_CTX(ndr, r->in.keyclass, 0);
1543 66486 : NDR_CHECK(ndr_pull_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.keyclass));
1544 66486 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keyclass_0, 0);
1545 : }
1546 66486 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_last_changed_time));
1547 66486 : if (_ptr_last_changed_time) {
1548 66486 : NDR_PULL_ALLOC(ndr, r->in.last_changed_time);
1549 : } else {
1550 0 : r->in.last_changed_time = NULL;
1551 : }
1552 66486 : if (r->in.last_changed_time) {
1553 66486 : _mem_save_last_changed_time_0 = NDR_PULL_GET_MEM_CTX(ndr);
1554 66486 : NDR_PULL_SET_MEM_CTX(ndr, r->in.last_changed_time, 0);
1555 66486 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, r->in.last_changed_time));
1556 66486 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_last_changed_time_0, 0);
1557 : }
1558 66486 : NDR_PULL_ALLOC(ndr, r->out.name);
1559 66486 : *r->out.name = *r->in.name;
1560 : }
1561 132954 : if (flags & NDR_OUT) {
1562 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1563 : if (r->in.handle == NULL) {
1564 : NDR_PULL_ALLOC(ndr, r->in.handle);
1565 : NDR_ZERO_STRUCTP(r->in.handle);
1566 : }
1567 : if (r->in.name == NULL) {
1568 : NDR_PULL_ALLOC(ndr, r->in.name);
1569 : NDR_ZERO_STRUCTP(r->in.name);
1570 : }
1571 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1572 66468 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1573 65831 : NDR_PULL_ALLOC(ndr, r->out.name);
1574 : }
1575 66468 : _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
1576 66468 : NDR_PULL_SET_MEM_CTX(ndr, r->out.name, LIBNDR_FLAG_REF_ALLOC);
1577 66468 : NDR_CHECK(ndr_pull_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.name));
1578 66468 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
1579 66468 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_keyclass));
1580 66468 : if (_ptr_keyclass) {
1581 66468 : NDR_PULL_ALLOC(ndr, r->out.keyclass);
1582 : } else {
1583 0 : r->out.keyclass = NULL;
1584 : }
1585 66468 : if (r->out.keyclass) {
1586 66468 : _mem_save_keyclass_0 = NDR_PULL_GET_MEM_CTX(ndr);
1587 66468 : NDR_PULL_SET_MEM_CTX(ndr, r->out.keyclass, 0);
1588 66468 : NDR_CHECK(ndr_pull_winreg_StringBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.keyclass));
1589 66468 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keyclass_0, 0);
1590 : }
1591 66468 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_last_changed_time));
1592 66468 : if (_ptr_last_changed_time) {
1593 66468 : NDR_PULL_ALLOC(ndr, r->out.last_changed_time);
1594 : } else {
1595 0 : r->out.last_changed_time = NULL;
1596 : }
1597 66468 : if (r->out.last_changed_time) {
1598 66468 : _mem_save_last_changed_time_0 = NDR_PULL_GET_MEM_CTX(ndr);
1599 66468 : NDR_PULL_SET_MEM_CTX(ndr, r->out.last_changed_time, 0);
1600 66468 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, r->out.last_changed_time));
1601 66468 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_last_changed_time_0, 0);
1602 : }
1603 66468 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1604 : }
1605 132950 : return NDR_ERR_SUCCESS;
1606 : }
1607 :
1608 30 : _PUBLIC_ void ndr_print_winreg_EnumKey(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_EnumKey *r)
1609 : {
1610 30 : ndr_print_struct(ndr, name, "winreg_EnumKey");
1611 30 : if (r == NULL) { ndr_print_null(ndr); return; }
1612 30 : ndr->depth++;
1613 30 : if (flags & NDR_SET_VALUES) {
1614 6 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1615 : }
1616 30 : if (flags & NDR_IN) {
1617 8 : ndr_print_struct(ndr, "in", "winreg_EnumKey");
1618 8 : ndr->depth++;
1619 8 : ndr_print_ptr(ndr, "handle", r->in.handle);
1620 8 : ndr->depth++;
1621 8 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
1622 8 : ndr->depth--;
1623 8 : ndr_print_uint32(ndr, "enum_index", r->in.enum_index);
1624 8 : ndr_print_ptr(ndr, "name", r->in.name);
1625 8 : ndr->depth++;
1626 8 : ndr_print_winreg_StringBuf(ndr, "name", r->in.name);
1627 8 : ndr->depth--;
1628 8 : ndr_print_ptr(ndr, "keyclass", r->in.keyclass);
1629 8 : ndr->depth++;
1630 8 : if (r->in.keyclass) {
1631 8 : ndr_print_winreg_StringBuf(ndr, "keyclass", r->in.keyclass);
1632 : }
1633 8 : ndr->depth--;
1634 8 : ndr_print_ptr(ndr, "last_changed_time", r->in.last_changed_time);
1635 8 : ndr->depth++;
1636 8 : if (r->in.last_changed_time) {
1637 8 : ndr_print_NTTIME(ndr, "last_changed_time", *r->in.last_changed_time);
1638 : }
1639 8 : ndr->depth--;
1640 8 : ndr->depth--;
1641 : }
1642 30 : if (flags & NDR_OUT) {
1643 22 : ndr_print_struct(ndr, "out", "winreg_EnumKey");
1644 22 : ndr->depth++;
1645 22 : ndr_print_ptr(ndr, "name", r->out.name);
1646 22 : ndr->depth++;
1647 22 : ndr_print_winreg_StringBuf(ndr, "name", r->out.name);
1648 22 : ndr->depth--;
1649 22 : ndr_print_ptr(ndr, "keyclass", r->out.keyclass);
1650 22 : ndr->depth++;
1651 22 : if (r->out.keyclass) {
1652 22 : ndr_print_winreg_StringBuf(ndr, "keyclass", r->out.keyclass);
1653 : }
1654 22 : ndr->depth--;
1655 22 : ndr_print_ptr(ndr, "last_changed_time", r->out.last_changed_time);
1656 22 : ndr->depth++;
1657 22 : if (r->out.last_changed_time) {
1658 22 : ndr_print_NTTIME(ndr, "last_changed_time", *r->out.last_changed_time);
1659 : }
1660 22 : ndr->depth--;
1661 22 : ndr_print_WERROR(ndr, "result", r->out.result);
1662 22 : ndr->depth--;
1663 : }
1664 30 : ndr->depth--;
1665 : }
1666 :
1667 389543 : _PUBLIC_ enum ndr_err_code ndr_push_winreg_EnumValue(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_EnumValue *r)
1668 : {
1669 389543 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1670 389543 : if (flags & NDR_IN) {
1671 194750 : if (r->in.handle == NULL) {
1672 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1673 : }
1674 194750 : if (r->in.name == NULL) {
1675 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1676 : }
1677 194750 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1678 194750 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.enum_index));
1679 194750 : NDR_CHECK(ndr_push_winreg_ValNameBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
1680 194750 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.type));
1681 194750 : if (r->in.type) {
1682 194750 : NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, *r->in.type));
1683 : }
1684 194750 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.value));
1685 194750 : if (r->in.value) {
1686 194406 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.size?*r->in.size:0));
1687 194406 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1688 194406 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.length?*r->in.length:0));
1689 194406 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.value, r->in.length?*r->in.length:0));
1690 : }
1691 194750 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.size));
1692 194750 : if (r->in.size) {
1693 194678 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.size));
1694 : }
1695 194750 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.length));
1696 194750 : if (r->in.length) {
1697 194750 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.length));
1698 : }
1699 : }
1700 389543 : if (flags & NDR_OUT) {
1701 194793 : if (r->out.name == NULL) {
1702 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1703 : }
1704 194793 : NDR_CHECK(ndr_push_winreg_ValNameBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.name));
1705 194793 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.type));
1706 194793 : if (r->out.type) {
1707 194793 : NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, *r->out.type));
1708 : }
1709 194793 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.value));
1710 194793 : if (r->out.value) {
1711 193485 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->out.size?*r->out.size:0));
1712 193485 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1713 193485 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->out.length?*r->out.length:0));
1714 193485 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.value, r->out.length?*r->out.length:0));
1715 : }
1716 194793 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.size));
1717 194793 : if (r->out.size) {
1718 194721 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.size));
1719 : }
1720 194793 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.length));
1721 194793 : if (r->out.length) {
1722 193833 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.length));
1723 : }
1724 194793 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1725 : }
1726 389543 : return NDR_ERR_SUCCESS;
1727 : }
1728 :
1729 389506 : _PUBLIC_ enum ndr_err_code ndr_pull_winreg_EnumValue(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_EnumValue *r)
1730 : {
1731 6 : uint32_t _ptr_type;
1732 6 : uint32_t _ptr_value;
1733 389506 : uint32_t size_value_1 = 0;
1734 389506 : uint32_t length_value_1 = 0;
1735 6 : uint32_t _ptr_size;
1736 6 : uint32_t _ptr_length;
1737 389506 : TALLOC_CTX *_mem_save_handle_0 = NULL;
1738 389506 : TALLOC_CTX *_mem_save_name_0 = NULL;
1739 389506 : TALLOC_CTX *_mem_save_type_0 = NULL;
1740 389506 : TALLOC_CTX *_mem_save_value_0 = NULL;
1741 389506 : TALLOC_CTX *_mem_save_size_0 = NULL;
1742 389506 : TALLOC_CTX *_mem_save_length_0 = NULL;
1743 389506 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1744 389506 : if (flags & NDR_IN) {
1745 194754 : NDR_ZERO_STRUCT(r->out);
1746 :
1747 194754 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1748 194754 : NDR_PULL_ALLOC(ndr, r->in.handle);
1749 : }
1750 194754 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1751 194754 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1752 194754 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1753 194754 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1754 194754 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.enum_index));
1755 194754 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1756 194754 : NDR_PULL_ALLOC(ndr, r->in.name);
1757 : }
1758 194754 : _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
1759 194754 : NDR_PULL_SET_MEM_CTX(ndr, r->in.name, LIBNDR_FLAG_REF_ALLOC);
1760 194754 : NDR_CHECK(ndr_pull_winreg_ValNameBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.name));
1761 194754 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
1762 194754 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_type));
1763 194754 : if (_ptr_type) {
1764 194754 : NDR_PULL_ALLOC(ndr, r->in.type);
1765 : } else {
1766 0 : r->in.type = NULL;
1767 : }
1768 194754 : if (r->in.type) {
1769 194754 : _mem_save_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
1770 194754 : NDR_PULL_SET_MEM_CTX(ndr, r->in.type, 0);
1771 194754 : NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, r->in.type));
1772 194754 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, 0);
1773 : }
1774 194754 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value));
1775 194754 : if (_ptr_value) {
1776 194410 : NDR_PULL_ALLOC(ndr, r->in.value);
1777 : } else {
1778 344 : r->in.value = NULL;
1779 : }
1780 194754 : if (r->in.value) {
1781 194410 : _mem_save_value_0 = NDR_PULL_GET_MEM_CTX(ndr);
1782 194410 : NDR_PULL_SET_MEM_CTX(ndr, r->in.value, 0);
1783 194410 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.value));
1784 194410 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.value));
1785 194410 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.value, &size_value_1));
1786 194410 : if (size_value_1 > 67108864) {
1787 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_value_1, (uint32_t)(0), (uint32_t)(67108864));
1788 : }
1789 194410 : NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->in.value, &length_value_1));
1790 194410 : if (length_value_1 > 67108864) {
1791 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_value_1, (uint32_t)(0), (uint32_t)(67108864));
1792 : }
1793 194410 : if (length_value_1 > size_value_1) {
1794 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_value_1, length_value_1);
1795 : }
1796 194410 : NDR_PULL_ALLOC_N(ndr, r->in.value, size_value_1);
1797 194410 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.value, length_value_1));
1798 194410 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_0, 0);
1799 : }
1800 194754 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_size));
1801 194754 : if (_ptr_size) {
1802 194682 : NDR_PULL_ALLOC(ndr, r->in.size);
1803 : } else {
1804 72 : r->in.size = NULL;
1805 : }
1806 194754 : if (r->in.size) {
1807 194682 : _mem_save_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
1808 194682 : NDR_PULL_SET_MEM_CTX(ndr, r->in.size, 0);
1809 194682 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.size));
1810 194682 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_size_0, 0);
1811 : }
1812 194754 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_length));
1813 194754 : if (_ptr_length) {
1814 194754 : NDR_PULL_ALLOC(ndr, r->in.length);
1815 : } else {
1816 0 : r->in.length = NULL;
1817 : }
1818 194754 : if (r->in.length) {
1819 194754 : _mem_save_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
1820 194754 : NDR_PULL_SET_MEM_CTX(ndr, r->in.length, 0);
1821 194754 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.length));
1822 194754 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_length_0, 0);
1823 : }
1824 194754 : NDR_PULL_ALLOC(ndr, r->out.name);
1825 194754 : *r->out.name = *r->in.name;
1826 194754 : if (r->in.value) {
1827 194410 : if (r->in.size == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for size_is()");
1828 194410 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.value, r->in.size?*r->in.size:0));
1829 : }
1830 194754 : if (r->in.value) {
1831 194410 : if (r->in.length == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for length_is()");
1832 194410 : NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->in.value, r->in.length?*r->in.length:0));
1833 : }
1834 : }
1835 389506 : if (flags & NDR_OUT) {
1836 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1837 : if (r->in.handle == NULL) {
1838 : NDR_PULL_ALLOC(ndr, r->in.handle);
1839 : NDR_ZERO_STRUCTP(r->in.handle);
1840 : }
1841 : if (r->in.name == NULL) {
1842 : NDR_PULL_ALLOC(ndr, r->in.name);
1843 : NDR_ZERO_STRUCTP(r->in.name);
1844 : }
1845 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1846 194752 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1847 190343 : NDR_PULL_ALLOC(ndr, r->out.name);
1848 : }
1849 194752 : _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
1850 194752 : NDR_PULL_SET_MEM_CTX(ndr, r->out.name, LIBNDR_FLAG_REF_ALLOC);
1851 194752 : NDR_CHECK(ndr_pull_winreg_ValNameBuf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.name));
1852 194752 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, LIBNDR_FLAG_REF_ALLOC);
1853 194752 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_type));
1854 194752 : if (_ptr_type) {
1855 194752 : NDR_PULL_ALLOC(ndr, r->out.type);
1856 : } else {
1857 0 : r->out.type = NULL;
1858 : }
1859 194752 : if (r->out.type) {
1860 194752 : _mem_save_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
1861 194752 : NDR_PULL_SET_MEM_CTX(ndr, r->out.type, 0);
1862 194752 : NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, r->out.type));
1863 194752 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, 0);
1864 : }
1865 194752 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_value));
1866 194752 : if (_ptr_value) {
1867 193448 : NDR_PULL_ALLOC(ndr, r->out.value);
1868 : } else {
1869 1304 : r->out.value = NULL;
1870 : }
1871 194752 : if (r->out.value) {
1872 193448 : _mem_save_value_0 = NDR_PULL_GET_MEM_CTX(ndr);
1873 193448 : NDR_PULL_SET_MEM_CTX(ndr, r->out.value, 0);
1874 193448 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.value));
1875 193448 : NDR_CHECK(ndr_pull_array_length(ndr, &r->out.value));
1876 193448 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.value, &size_value_1));
1877 193448 : if (size_value_1 > 67108864) {
1878 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_value_1, (uint32_t)(0), (uint32_t)(67108864));
1879 : }
1880 193448 : NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->out.value, &length_value_1));
1881 193448 : if (length_value_1 > 67108864) {
1882 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_value_1, (uint32_t)(0), (uint32_t)(67108864));
1883 : }
1884 193448 : if (length_value_1 > size_value_1) {
1885 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_value_1, length_value_1);
1886 : }
1887 193448 : NDR_PULL_ALLOC_N(ndr, r->out.value, size_value_1);
1888 193448 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.value, length_value_1));
1889 193448 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_0, 0);
1890 : }
1891 194752 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_size));
1892 194752 : if (_ptr_size) {
1893 194680 : NDR_PULL_ALLOC(ndr, r->out.size);
1894 : } else {
1895 72 : r->out.size = NULL;
1896 : }
1897 194752 : if (r->out.size) {
1898 194680 : _mem_save_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
1899 194680 : NDR_PULL_SET_MEM_CTX(ndr, r->out.size, 0);
1900 194680 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.size));
1901 194680 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_size_0, 0);
1902 : }
1903 194752 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_length));
1904 194752 : if (_ptr_length) {
1905 193792 : NDR_PULL_ALLOC(ndr, r->out.length);
1906 : } else {
1907 960 : r->out.length = NULL;
1908 : }
1909 194752 : if (r->out.length) {
1910 193792 : _mem_save_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
1911 193792 : NDR_PULL_SET_MEM_CTX(ndr, r->out.length, 0);
1912 193792 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.length));
1913 193792 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_length_0, 0);
1914 : }
1915 194752 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1916 194752 : if (r->out.value) {
1917 193448 : if (r->out.size == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for size_is()");
1918 193448 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.value, r->out.size?*r->out.size:0));
1919 : }
1920 194752 : if (r->out.value) {
1921 193448 : if (r->out.length == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for length_is()");
1922 193448 : NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->out.value, r->out.length?*r->out.length:0));
1923 : }
1924 : }
1925 389500 : return NDR_ERR_SUCCESS;
1926 : }
1927 :
1928 184 : _PUBLIC_ void ndr_print_winreg_EnumValue(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_EnumValue *r)
1929 : {
1930 184 : ndr_print_struct(ndr, name, "winreg_EnumValue");
1931 184 : if (r == NULL) { ndr_print_null(ndr); return; }
1932 184 : ndr->depth++;
1933 184 : if (flags & NDR_SET_VALUES) {
1934 46 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1935 : }
1936 184 : if (flags & NDR_IN) {
1937 50 : ndr_print_struct(ndr, "in", "winreg_EnumValue");
1938 50 : ndr->depth++;
1939 50 : ndr_print_ptr(ndr, "handle", r->in.handle);
1940 50 : ndr->depth++;
1941 50 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
1942 50 : ndr->depth--;
1943 50 : ndr_print_uint32(ndr, "enum_index", r->in.enum_index);
1944 50 : ndr_print_ptr(ndr, "name", r->in.name);
1945 50 : ndr->depth++;
1946 50 : ndr_print_winreg_ValNameBuf(ndr, "name", r->in.name);
1947 50 : ndr->depth--;
1948 50 : ndr_print_ptr(ndr, "type", r->in.type);
1949 50 : ndr->depth++;
1950 50 : if (r->in.type) {
1951 50 : ndr_print_winreg_Type(ndr, "type", *r->in.type);
1952 : }
1953 50 : ndr->depth--;
1954 50 : ndr_print_ptr(ndr, "value", r->in.value);
1955 50 : ndr->depth++;
1956 50 : if (r->in.value) {
1957 50 : if (r->in.length == NULL) return;
1958 50 : ndr_print_array_uint8(ndr, "value", r->in.value, r->in.length?*r->in.length:0);
1959 : }
1960 50 : ndr->depth--;
1961 50 : ndr_print_ptr(ndr, "size", r->in.size);
1962 50 : ndr->depth++;
1963 50 : if (r->in.size) {
1964 50 : ndr_print_uint32(ndr, "size", *r->in.size);
1965 : }
1966 50 : ndr->depth--;
1967 50 : ndr_print_ptr(ndr, "length", r->in.length);
1968 50 : ndr->depth++;
1969 50 : if (r->in.length) {
1970 50 : ndr_print_uint32(ndr, "length", *r->in.length);
1971 : }
1972 50 : ndr->depth--;
1973 50 : ndr->depth--;
1974 : }
1975 184 : if (flags & NDR_OUT) {
1976 134 : ndr_print_struct(ndr, "out", "winreg_EnumValue");
1977 134 : ndr->depth++;
1978 134 : ndr_print_ptr(ndr, "name", r->out.name);
1979 134 : ndr->depth++;
1980 134 : ndr_print_winreg_ValNameBuf(ndr, "name", r->out.name);
1981 134 : ndr->depth--;
1982 134 : ndr_print_ptr(ndr, "type", r->out.type);
1983 134 : ndr->depth++;
1984 134 : if (r->out.type) {
1985 134 : ndr_print_winreg_Type(ndr, "type", *r->out.type);
1986 : }
1987 134 : ndr->depth--;
1988 134 : ndr_print_ptr(ndr, "value", r->out.value);
1989 134 : ndr->depth++;
1990 134 : if (r->out.value) {
1991 126 : if (r->out.length == NULL) return;
1992 126 : ndr_print_array_uint8(ndr, "value", r->out.value, r->out.length?*r->out.length:0);
1993 : }
1994 134 : ndr->depth--;
1995 134 : ndr_print_ptr(ndr, "size", r->out.size);
1996 134 : ndr->depth++;
1997 134 : if (r->out.size) {
1998 134 : ndr_print_uint32(ndr, "size", *r->out.size);
1999 : }
2000 134 : ndr->depth--;
2001 134 : ndr_print_ptr(ndr, "length", r->out.length);
2002 134 : ndr->depth++;
2003 134 : if (r->out.length) {
2004 134 : ndr_print_uint32(ndr, "length", *r->out.length);
2005 : }
2006 134 : ndr->depth--;
2007 134 : ndr_print_WERROR(ndr, "result", r->out.result);
2008 134 : ndr->depth--;
2009 : }
2010 184 : ndr->depth--;
2011 : }
2012 :
2013 1416 : _PUBLIC_ enum ndr_err_code ndr_push_winreg_FlushKey(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_FlushKey *r)
2014 : {
2015 1416 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2016 1416 : if (flags & NDR_IN) {
2017 704 : if (r->in.handle == NULL) {
2018 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2019 : }
2020 704 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2021 : }
2022 1416 : if (flags & NDR_OUT) {
2023 712 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2024 : }
2025 1416 : return NDR_ERR_SUCCESS;
2026 : }
2027 :
2028 1412 : _PUBLIC_ enum ndr_err_code ndr_pull_winreg_FlushKey(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_FlushKey *r)
2029 : {
2030 1412 : TALLOC_CTX *_mem_save_handle_0 = NULL;
2031 1412 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2032 1412 : if (flags & NDR_IN) {
2033 706 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2034 706 : NDR_PULL_ALLOC(ndr, r->in.handle);
2035 : }
2036 706 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2037 706 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2038 706 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2039 706 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2040 : }
2041 1412 : if (flags & NDR_OUT) {
2042 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
2043 : if (r->in.handle == NULL) {
2044 : NDR_PULL_ALLOC(ndr, r->in.handle);
2045 : NDR_ZERO_STRUCTP(r->in.handle);
2046 : }
2047 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
2048 706 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2049 : }
2050 1408 : return NDR_ERR_SUCCESS;
2051 : }
2052 :
2053 20 : _PUBLIC_ void ndr_print_winreg_FlushKey(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_FlushKey *r)
2054 : {
2055 20 : ndr_print_struct(ndr, name, "winreg_FlushKey");
2056 20 : if (r == NULL) { ndr_print_null(ndr); return; }
2057 20 : ndr->depth++;
2058 20 : if (flags & NDR_SET_VALUES) {
2059 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2060 : }
2061 20 : if (flags & NDR_IN) {
2062 2 : ndr_print_struct(ndr, "in", "winreg_FlushKey");
2063 2 : ndr->depth++;
2064 2 : ndr_print_ptr(ndr, "handle", r->in.handle);
2065 2 : ndr->depth++;
2066 2 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
2067 2 : ndr->depth--;
2068 2 : ndr->depth--;
2069 : }
2070 20 : if (flags & NDR_OUT) {
2071 18 : ndr_print_struct(ndr, "out", "winreg_FlushKey");
2072 18 : ndr->depth++;
2073 18 : ndr_print_WERROR(ndr, "result", r->out.result);
2074 18 : ndr->depth--;
2075 : }
2076 20 : ndr->depth--;
2077 : }
2078 :
2079 0 : _PUBLIC_ enum ndr_err_code ndr_push_winreg_GetKeySecurity(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_GetKeySecurity *r)
2080 : {
2081 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2082 0 : if (flags & NDR_IN) {
2083 0 : if (r->in.handle == NULL) {
2084 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2085 : }
2086 0 : if (r->in.sd == NULL) {
2087 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2088 : }
2089 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2090 0 : NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.sec_info));
2091 0 : NDR_CHECK(ndr_push_KeySecurityData(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sd));
2092 : }
2093 0 : if (flags & NDR_OUT) {
2094 0 : if (r->out.sd == NULL) {
2095 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2096 : }
2097 0 : NDR_CHECK(ndr_push_KeySecurityData(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sd));
2098 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2099 : }
2100 0 : return NDR_ERR_SUCCESS;
2101 : }
2102 :
2103 0 : _PUBLIC_ enum ndr_err_code ndr_pull_winreg_GetKeySecurity(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_GetKeySecurity *r)
2104 : {
2105 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
2106 0 : TALLOC_CTX *_mem_save_sd_0 = NULL;
2107 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2108 0 : if (flags & NDR_IN) {
2109 0 : NDR_ZERO_STRUCT(r->out);
2110 :
2111 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2112 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
2113 : }
2114 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2115 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2116 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2117 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2118 0 : NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.sec_info));
2119 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2120 0 : NDR_PULL_ALLOC(ndr, r->in.sd);
2121 : }
2122 0 : _mem_save_sd_0 = NDR_PULL_GET_MEM_CTX(ndr);
2123 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.sd, LIBNDR_FLAG_REF_ALLOC);
2124 0 : NDR_CHECK(ndr_pull_KeySecurityData(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sd));
2125 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_0, LIBNDR_FLAG_REF_ALLOC);
2126 0 : NDR_PULL_ALLOC(ndr, r->out.sd);
2127 0 : *r->out.sd = *r->in.sd;
2128 : }
2129 0 : if (flags & NDR_OUT) {
2130 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
2131 : if (r->in.handle == NULL) {
2132 : NDR_PULL_ALLOC(ndr, r->in.handle);
2133 : NDR_ZERO_STRUCTP(r->in.handle);
2134 : }
2135 : if (r->in.sd == NULL) {
2136 : NDR_PULL_ALLOC(ndr, r->in.sd);
2137 : NDR_ZERO_STRUCTP(r->in.sd);
2138 : }
2139 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
2140 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2141 0 : NDR_PULL_ALLOC(ndr, r->out.sd);
2142 : }
2143 0 : _mem_save_sd_0 = NDR_PULL_GET_MEM_CTX(ndr);
2144 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.sd, LIBNDR_FLAG_REF_ALLOC);
2145 0 : NDR_CHECK(ndr_pull_KeySecurityData(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sd));
2146 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_0, LIBNDR_FLAG_REF_ALLOC);
2147 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2148 : }
2149 0 : return NDR_ERR_SUCCESS;
2150 : }
2151 :
2152 0 : _PUBLIC_ void ndr_print_winreg_GetKeySecurity(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_GetKeySecurity *r)
2153 : {
2154 0 : ndr_print_struct(ndr, name, "winreg_GetKeySecurity");
2155 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2156 0 : ndr->depth++;
2157 0 : if (flags & NDR_SET_VALUES) {
2158 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2159 : }
2160 0 : if (flags & NDR_IN) {
2161 0 : ndr_print_struct(ndr, "in", "winreg_GetKeySecurity");
2162 0 : ndr->depth++;
2163 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
2164 0 : ndr->depth++;
2165 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
2166 0 : ndr->depth--;
2167 0 : ndr_print_security_secinfo(ndr, "sec_info", r->in.sec_info);
2168 0 : ndr_print_ptr(ndr, "sd", r->in.sd);
2169 0 : ndr->depth++;
2170 0 : ndr_print_KeySecurityData(ndr, "sd", r->in.sd);
2171 0 : ndr->depth--;
2172 0 : ndr->depth--;
2173 : }
2174 0 : if (flags & NDR_OUT) {
2175 0 : ndr_print_struct(ndr, "out", "winreg_GetKeySecurity");
2176 0 : ndr->depth++;
2177 0 : ndr_print_ptr(ndr, "sd", r->out.sd);
2178 0 : ndr->depth++;
2179 0 : ndr_print_KeySecurityData(ndr, "sd", r->out.sd);
2180 0 : ndr->depth--;
2181 0 : ndr_print_WERROR(ndr, "result", r->out.result);
2182 0 : ndr->depth--;
2183 : }
2184 0 : ndr->depth--;
2185 : }
2186 :
2187 0 : static enum ndr_err_code ndr_push_winreg_LoadKey(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_LoadKey *r)
2188 : {
2189 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2190 0 : if (flags & NDR_IN) {
2191 0 : if (r->in.handle == NULL) {
2192 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2193 : }
2194 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2195 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.keyname));
2196 0 : if (r->in.keyname) {
2197 0 : NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.keyname));
2198 : }
2199 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.filename));
2200 0 : if (r->in.filename) {
2201 0 : NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.filename));
2202 : }
2203 : }
2204 0 : if (flags & NDR_OUT) {
2205 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2206 : }
2207 0 : return NDR_ERR_SUCCESS;
2208 : }
2209 :
2210 0 : static enum ndr_err_code ndr_pull_winreg_LoadKey(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_LoadKey *r)
2211 : {
2212 0 : uint32_t _ptr_keyname;
2213 0 : uint32_t _ptr_filename;
2214 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
2215 0 : TALLOC_CTX *_mem_save_keyname_0 = NULL;
2216 0 : TALLOC_CTX *_mem_save_filename_0 = NULL;
2217 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2218 0 : if (flags & NDR_IN) {
2219 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2220 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
2221 : }
2222 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2223 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2224 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2225 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2226 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_keyname));
2227 0 : if (_ptr_keyname) {
2228 0 : NDR_PULL_ALLOC(ndr, r->in.keyname);
2229 : } else {
2230 0 : r->in.keyname = NULL;
2231 : }
2232 0 : if (r->in.keyname) {
2233 0 : _mem_save_keyname_0 = NDR_PULL_GET_MEM_CTX(ndr);
2234 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.keyname, 0);
2235 0 : NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.keyname));
2236 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_keyname_0, 0);
2237 : }
2238 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_filename));
2239 0 : if (_ptr_filename) {
2240 0 : NDR_PULL_ALLOC(ndr, r->in.filename);
2241 : } else {
2242 0 : r->in.filename = NULL;
2243 : }
2244 0 : if (r->in.filename) {
2245 0 : _mem_save_filename_0 = NDR_PULL_GET_MEM_CTX(ndr);
2246 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.filename, 0);
2247 0 : NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.filename));
2248 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_filename_0, 0);
2249 : }
2250 : }
2251 0 : if (flags & NDR_OUT) {
2252 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
2253 : if (r->in.handle == NULL) {
2254 : NDR_PULL_ALLOC(ndr, r->in.handle);
2255 : NDR_ZERO_STRUCTP(r->in.handle);
2256 : }
2257 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
2258 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2259 : }
2260 0 : return NDR_ERR_SUCCESS;
2261 : }
2262 :
2263 0 : _PUBLIC_ void ndr_print_winreg_LoadKey(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_LoadKey *r)
2264 : {
2265 0 : ndr_print_struct(ndr, name, "winreg_LoadKey");
2266 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2267 0 : ndr->depth++;
2268 0 : if (flags & NDR_SET_VALUES) {
2269 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2270 : }
2271 0 : if (flags & NDR_IN) {
2272 0 : ndr_print_struct(ndr, "in", "winreg_LoadKey");
2273 0 : ndr->depth++;
2274 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
2275 0 : ndr->depth++;
2276 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
2277 0 : ndr->depth--;
2278 0 : ndr_print_ptr(ndr, "keyname", r->in.keyname);
2279 0 : ndr->depth++;
2280 0 : if (r->in.keyname) {
2281 0 : ndr_print_winreg_String(ndr, "keyname", r->in.keyname);
2282 : }
2283 0 : ndr->depth--;
2284 0 : ndr_print_ptr(ndr, "filename", r->in.filename);
2285 0 : ndr->depth++;
2286 0 : if (r->in.filename) {
2287 0 : ndr_print_winreg_String(ndr, "filename", r->in.filename);
2288 : }
2289 0 : ndr->depth--;
2290 0 : ndr->depth--;
2291 : }
2292 0 : if (flags & NDR_OUT) {
2293 0 : ndr_print_struct(ndr, "out", "winreg_LoadKey");
2294 0 : ndr->depth++;
2295 0 : ndr_print_WERROR(ndr, "result", r->out.result);
2296 0 : ndr->depth--;
2297 : }
2298 0 : ndr->depth--;
2299 : }
2300 :
2301 548 : _PUBLIC_ enum ndr_err_code ndr_push_winreg_NotifyChangeKeyValue(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_NotifyChangeKeyValue *r)
2302 : {
2303 548 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2304 548 : if (flags & NDR_IN) {
2305 272 : if (r->in.handle == NULL) {
2306 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2307 : }
2308 272 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2309 272 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.watch_subtree));
2310 272 : NDR_CHECK(ndr_push_winreg_NotifyChangeType(ndr, NDR_SCALARS, r->in.notify_filter));
2311 272 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown));
2312 272 : NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.string1));
2313 272 : NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.string2));
2314 272 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown2));
2315 : }
2316 548 : if (flags & NDR_OUT) {
2317 276 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2318 : }
2319 548 : return NDR_ERR_SUCCESS;
2320 : }
2321 :
2322 548 : _PUBLIC_ enum ndr_err_code ndr_pull_winreg_NotifyChangeKeyValue(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_NotifyChangeKeyValue *r)
2323 : {
2324 548 : TALLOC_CTX *_mem_save_handle_0 = NULL;
2325 548 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2326 548 : if (flags & NDR_IN) {
2327 274 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2328 274 : NDR_PULL_ALLOC(ndr, r->in.handle);
2329 : }
2330 274 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2331 274 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2332 274 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2333 274 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2334 274 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.watch_subtree));
2335 274 : NDR_CHECK(ndr_pull_winreg_NotifyChangeType(ndr, NDR_SCALARS, &r->in.notify_filter));
2336 274 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown));
2337 274 : NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.string1));
2338 274 : NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.string2));
2339 274 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown2));
2340 : }
2341 548 : if (flags & NDR_OUT) {
2342 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
2343 : if (r->in.handle == NULL) {
2344 : NDR_PULL_ALLOC(ndr, r->in.handle);
2345 : NDR_ZERO_STRUCTP(r->in.handle);
2346 : }
2347 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
2348 274 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2349 : }
2350 544 : return NDR_ERR_SUCCESS;
2351 : }
2352 :
2353 12 : _PUBLIC_ void ndr_print_winreg_NotifyChangeKeyValue(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_NotifyChangeKeyValue *r)
2354 : {
2355 12 : ndr_print_struct(ndr, name, "winreg_NotifyChangeKeyValue");
2356 12 : if (r == NULL) { ndr_print_null(ndr); return; }
2357 12 : ndr->depth++;
2358 12 : if (flags & NDR_SET_VALUES) {
2359 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2360 : }
2361 12 : if (flags & NDR_IN) {
2362 2 : ndr_print_struct(ndr, "in", "winreg_NotifyChangeKeyValue");
2363 2 : ndr->depth++;
2364 2 : ndr_print_ptr(ndr, "handle", r->in.handle);
2365 2 : ndr->depth++;
2366 2 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
2367 2 : ndr->depth--;
2368 2 : ndr_print_uint8(ndr, "watch_subtree", r->in.watch_subtree);
2369 2 : ndr_print_winreg_NotifyChangeType(ndr, "notify_filter", r->in.notify_filter);
2370 2 : ndr_print_uint32(ndr, "unknown", r->in.unknown);
2371 2 : ndr_print_winreg_String(ndr, "string1", &r->in.string1);
2372 2 : ndr_print_winreg_String(ndr, "string2", &r->in.string2);
2373 2 : ndr_print_uint32(ndr, "unknown2", r->in.unknown2);
2374 2 : ndr->depth--;
2375 : }
2376 12 : if (flags & NDR_OUT) {
2377 10 : ndr_print_struct(ndr, "out", "winreg_NotifyChangeKeyValue");
2378 10 : ndr->depth++;
2379 10 : ndr_print_WERROR(ndr, "result", r->out.result);
2380 10 : ndr->depth--;
2381 : }
2382 12 : ndr->depth--;
2383 : }
2384 :
2385 86228 : _PUBLIC_ enum ndr_err_code ndr_push_winreg_OpenKey(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_OpenKey *r)
2386 : {
2387 86228 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2388 86228 : if (flags & NDR_IN) {
2389 43106 : if (r->in.parent_handle == NULL) {
2390 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2391 : }
2392 43106 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.parent_handle));
2393 43106 : NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.keyname));
2394 43106 : NDR_CHECK(ndr_push_winreg_KeyOptions(ndr, NDR_SCALARS, r->in.options));
2395 43106 : NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
2396 : }
2397 86228 : if (flags & NDR_OUT) {
2398 43122 : if (r->out.handle == NULL) {
2399 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2400 : }
2401 43122 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
2402 43122 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2403 : }
2404 86228 : return NDR_ERR_SUCCESS;
2405 : }
2406 :
2407 86220 : _PUBLIC_ enum ndr_err_code ndr_pull_winreg_OpenKey(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_OpenKey *r)
2408 : {
2409 86220 : TALLOC_CTX *_mem_save_parent_handle_0 = NULL;
2410 86220 : TALLOC_CTX *_mem_save_handle_0 = NULL;
2411 86220 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2412 86220 : if (flags & NDR_IN) {
2413 43112 : NDR_ZERO_STRUCT(r->out);
2414 :
2415 43112 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2416 43112 : NDR_PULL_ALLOC(ndr, r->in.parent_handle);
2417 : }
2418 43112 : _mem_save_parent_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2419 43112 : NDR_PULL_SET_MEM_CTX(ndr, r->in.parent_handle, LIBNDR_FLAG_REF_ALLOC);
2420 43112 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.parent_handle));
2421 43112 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parent_handle_0, LIBNDR_FLAG_REF_ALLOC);
2422 43112 : NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.keyname));
2423 43114 : NDR_CHECK(ndr_pull_winreg_KeyOptions(ndr, NDR_SCALARS, &r->in.options));
2424 43112 : NDR_CHECK(ndr_pull_winreg_AccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
2425 43112 : NDR_PULL_ALLOC(ndr, r->out.handle);
2426 43112 : NDR_ZERO_STRUCTP(r->out.handle);
2427 : }
2428 86220 : if (flags & NDR_OUT) {
2429 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
2430 : if (r->in.parent_handle == NULL) {
2431 : NDR_PULL_ALLOC(ndr, r->in.parent_handle);
2432 : NDR_ZERO_STRUCTP(r->in.parent_handle);
2433 : }
2434 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
2435 43108 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2436 41688 : NDR_PULL_ALLOC(ndr, r->out.handle);
2437 : }
2438 43108 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2439 43108 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
2440 43108 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
2441 43108 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2442 43108 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2443 : }
2444 86216 : return NDR_ERR_SUCCESS;
2445 : }
2446 :
2447 44 : _PUBLIC_ void ndr_print_winreg_OpenKey(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_OpenKey *r)
2448 : {
2449 44 : ndr_print_struct(ndr, name, "winreg_OpenKey");
2450 44 : if (r == NULL) { ndr_print_null(ndr); return; }
2451 44 : ndr->depth++;
2452 44 : if (flags & NDR_SET_VALUES) {
2453 8 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2454 : }
2455 44 : if (flags & NDR_IN) {
2456 10 : ndr_print_struct(ndr, "in", "winreg_OpenKey");
2457 10 : ndr->depth++;
2458 10 : ndr_print_ptr(ndr, "parent_handle", r->in.parent_handle);
2459 10 : ndr->depth++;
2460 10 : ndr_print_policy_handle(ndr, "parent_handle", r->in.parent_handle);
2461 10 : ndr->depth--;
2462 10 : ndr_print_winreg_String(ndr, "keyname", &r->in.keyname);
2463 10 : ndr_print_winreg_KeyOptions(ndr, "options", r->in.options);
2464 10 : ndr_print_winreg_AccessMask(ndr, "access_mask", r->in.access_mask);
2465 10 : ndr->depth--;
2466 : }
2467 44 : if (flags & NDR_OUT) {
2468 34 : ndr_print_struct(ndr, "out", "winreg_OpenKey");
2469 34 : ndr->depth++;
2470 34 : ndr_print_ptr(ndr, "handle", r->out.handle);
2471 34 : ndr->depth++;
2472 34 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
2473 34 : ndr->depth--;
2474 34 : ndr_print_WERROR(ndr, "result", r->out.result);
2475 34 : ndr->depth--;
2476 : }
2477 44 : ndr->depth--;
2478 : }
2479 :
2480 41202 : _PUBLIC_ enum ndr_err_code ndr_push_winreg_QueryInfoKey(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_QueryInfoKey *r)
2481 : {
2482 41202 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2483 41202 : if (flags & NDR_IN) {
2484 20597 : if (r->in.handle == NULL) {
2485 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2486 : }
2487 20597 : if (r->in.classname == NULL) {
2488 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2489 : }
2490 20597 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2491 20597 : NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.classname));
2492 : }
2493 41202 : if (flags & NDR_OUT) {
2494 20605 : if (r->out.classname == NULL) {
2495 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2496 : }
2497 20605 : if (r->out.num_subkeys == NULL) {
2498 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2499 : }
2500 20605 : if (r->out.max_subkeylen == NULL) {
2501 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2502 : }
2503 20605 : if (r->out.max_classlen == NULL) {
2504 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2505 : }
2506 20605 : if (r->out.num_values == NULL) {
2507 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2508 : }
2509 20605 : if (r->out.max_valnamelen == NULL) {
2510 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2511 : }
2512 20605 : if (r->out.max_valbufsize == NULL) {
2513 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2514 : }
2515 20605 : if (r->out.secdescsize == NULL) {
2516 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2517 : }
2518 20605 : if (r->out.last_changed_time == NULL) {
2519 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2520 : }
2521 20605 : NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.classname));
2522 20605 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_subkeys));
2523 20605 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.max_subkeylen));
2524 20605 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.max_classlen));
2525 20605 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.num_values));
2526 20605 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.max_valnamelen));
2527 20605 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.max_valbufsize));
2528 20605 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.secdescsize));
2529 20605 : NDR_CHECK(ndr_push_NTTIME(ndr, NDR_SCALARS, *r->out.last_changed_time));
2530 20605 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2531 : }
2532 41202 : return NDR_ERR_SUCCESS;
2533 : }
2534 :
2535 41200 : _PUBLIC_ enum ndr_err_code ndr_pull_winreg_QueryInfoKey(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_QueryInfoKey *r)
2536 : {
2537 41200 : TALLOC_CTX *_mem_save_handle_0 = NULL;
2538 41200 : TALLOC_CTX *_mem_save_classname_0 = NULL;
2539 41200 : TALLOC_CTX *_mem_save_num_subkeys_0 = NULL;
2540 41200 : TALLOC_CTX *_mem_save_max_subkeylen_0 = NULL;
2541 41200 : TALLOC_CTX *_mem_save_max_classlen_0 = NULL;
2542 41200 : TALLOC_CTX *_mem_save_num_values_0 = NULL;
2543 41200 : TALLOC_CTX *_mem_save_max_valnamelen_0 = NULL;
2544 41200 : TALLOC_CTX *_mem_save_max_valbufsize_0 = NULL;
2545 41200 : TALLOC_CTX *_mem_save_secdescsize_0 = NULL;
2546 41200 : TALLOC_CTX *_mem_save_last_changed_time_0 = NULL;
2547 41200 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2548 41200 : if (flags & NDR_IN) {
2549 20603 : NDR_ZERO_STRUCT(r->out);
2550 :
2551 20603 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2552 20603 : NDR_PULL_ALLOC(ndr, r->in.handle);
2553 : }
2554 20603 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2555 20603 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2556 20603 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2557 20603 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2558 20603 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2559 20603 : NDR_PULL_ALLOC(ndr, r->in.classname);
2560 : }
2561 20603 : _mem_save_classname_0 = NDR_PULL_GET_MEM_CTX(ndr);
2562 20603 : NDR_PULL_SET_MEM_CTX(ndr, r->in.classname, LIBNDR_FLAG_REF_ALLOC);
2563 20603 : NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.classname));
2564 20603 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_classname_0, LIBNDR_FLAG_REF_ALLOC);
2565 20603 : NDR_PULL_ALLOC(ndr, r->out.classname);
2566 20603 : *r->out.classname = *r->in.classname;
2567 20603 : NDR_PULL_ALLOC(ndr, r->out.num_subkeys);
2568 20603 : NDR_ZERO_STRUCTP(r->out.num_subkeys);
2569 20603 : NDR_PULL_ALLOC(ndr, r->out.max_subkeylen);
2570 20603 : NDR_ZERO_STRUCTP(r->out.max_subkeylen);
2571 20603 : NDR_PULL_ALLOC(ndr, r->out.max_classlen);
2572 20603 : NDR_ZERO_STRUCTP(r->out.max_classlen);
2573 20603 : NDR_PULL_ALLOC(ndr, r->out.num_values);
2574 20603 : NDR_ZERO_STRUCTP(r->out.num_values);
2575 20603 : NDR_PULL_ALLOC(ndr, r->out.max_valnamelen);
2576 20603 : NDR_ZERO_STRUCTP(r->out.max_valnamelen);
2577 20603 : NDR_PULL_ALLOC(ndr, r->out.max_valbufsize);
2578 20603 : NDR_ZERO_STRUCTP(r->out.max_valbufsize);
2579 20603 : NDR_PULL_ALLOC(ndr, r->out.secdescsize);
2580 20603 : NDR_ZERO_STRUCTP(r->out.secdescsize);
2581 20603 : NDR_PULL_ALLOC(ndr, r->out.last_changed_time);
2582 20603 : NDR_ZERO_STRUCTP(r->out.last_changed_time);
2583 : }
2584 41200 : if (flags & NDR_OUT) {
2585 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
2586 : if (r->in.handle == NULL) {
2587 : NDR_PULL_ALLOC(ndr, r->in.handle);
2588 : NDR_ZERO_STRUCTP(r->in.handle);
2589 : }
2590 : if (r->in.classname == NULL) {
2591 : NDR_PULL_ALLOC(ndr, r->in.classname);
2592 : NDR_ZERO_STRUCTP(r->in.classname);
2593 : }
2594 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
2595 20597 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2596 20329 : NDR_PULL_ALLOC(ndr, r->out.classname);
2597 : }
2598 20597 : _mem_save_classname_0 = NDR_PULL_GET_MEM_CTX(ndr);
2599 20597 : NDR_PULL_SET_MEM_CTX(ndr, r->out.classname, LIBNDR_FLAG_REF_ALLOC);
2600 20597 : NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.classname));
2601 20597 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_classname_0, LIBNDR_FLAG_REF_ALLOC);
2602 20597 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2603 20329 : NDR_PULL_ALLOC(ndr, r->out.num_subkeys);
2604 : }
2605 20597 : _mem_save_num_subkeys_0 = NDR_PULL_GET_MEM_CTX(ndr);
2606 20597 : NDR_PULL_SET_MEM_CTX(ndr, r->out.num_subkeys, LIBNDR_FLAG_REF_ALLOC);
2607 20597 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_subkeys));
2608 20597 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_subkeys_0, LIBNDR_FLAG_REF_ALLOC);
2609 20597 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2610 20329 : NDR_PULL_ALLOC(ndr, r->out.max_subkeylen);
2611 : }
2612 20597 : _mem_save_max_subkeylen_0 = NDR_PULL_GET_MEM_CTX(ndr);
2613 20597 : NDR_PULL_SET_MEM_CTX(ndr, r->out.max_subkeylen, LIBNDR_FLAG_REF_ALLOC);
2614 20597 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.max_subkeylen));
2615 20597 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_max_subkeylen_0, LIBNDR_FLAG_REF_ALLOC);
2616 20597 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2617 20329 : NDR_PULL_ALLOC(ndr, r->out.max_classlen);
2618 : }
2619 20597 : _mem_save_max_classlen_0 = NDR_PULL_GET_MEM_CTX(ndr);
2620 20597 : NDR_PULL_SET_MEM_CTX(ndr, r->out.max_classlen, LIBNDR_FLAG_REF_ALLOC);
2621 20597 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.max_classlen));
2622 20597 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_max_classlen_0, LIBNDR_FLAG_REF_ALLOC);
2623 20597 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2624 20329 : NDR_PULL_ALLOC(ndr, r->out.num_values);
2625 : }
2626 20597 : _mem_save_num_values_0 = NDR_PULL_GET_MEM_CTX(ndr);
2627 20597 : NDR_PULL_SET_MEM_CTX(ndr, r->out.num_values, LIBNDR_FLAG_REF_ALLOC);
2628 20597 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.num_values));
2629 20597 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_num_values_0, LIBNDR_FLAG_REF_ALLOC);
2630 20597 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2631 20329 : NDR_PULL_ALLOC(ndr, r->out.max_valnamelen);
2632 : }
2633 20597 : _mem_save_max_valnamelen_0 = NDR_PULL_GET_MEM_CTX(ndr);
2634 20597 : NDR_PULL_SET_MEM_CTX(ndr, r->out.max_valnamelen, LIBNDR_FLAG_REF_ALLOC);
2635 20597 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.max_valnamelen));
2636 20597 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_max_valnamelen_0, LIBNDR_FLAG_REF_ALLOC);
2637 20597 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2638 20329 : NDR_PULL_ALLOC(ndr, r->out.max_valbufsize);
2639 : }
2640 20597 : _mem_save_max_valbufsize_0 = NDR_PULL_GET_MEM_CTX(ndr);
2641 20597 : NDR_PULL_SET_MEM_CTX(ndr, r->out.max_valbufsize, LIBNDR_FLAG_REF_ALLOC);
2642 20597 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.max_valbufsize));
2643 20597 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_max_valbufsize_0, LIBNDR_FLAG_REF_ALLOC);
2644 20597 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2645 20329 : NDR_PULL_ALLOC(ndr, r->out.secdescsize);
2646 : }
2647 20597 : _mem_save_secdescsize_0 = NDR_PULL_GET_MEM_CTX(ndr);
2648 20597 : NDR_PULL_SET_MEM_CTX(ndr, r->out.secdescsize, LIBNDR_FLAG_REF_ALLOC);
2649 20597 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.secdescsize));
2650 20597 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_secdescsize_0, LIBNDR_FLAG_REF_ALLOC);
2651 20597 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2652 20329 : NDR_PULL_ALLOC(ndr, r->out.last_changed_time);
2653 : }
2654 20597 : _mem_save_last_changed_time_0 = NDR_PULL_GET_MEM_CTX(ndr);
2655 20597 : NDR_PULL_SET_MEM_CTX(ndr, r->out.last_changed_time, LIBNDR_FLAG_REF_ALLOC);
2656 20597 : NDR_CHECK(ndr_pull_NTTIME(ndr, NDR_SCALARS, r->out.last_changed_time));
2657 20597 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_last_changed_time_0, LIBNDR_FLAG_REF_ALLOC);
2658 20597 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2659 : }
2660 41198 : return NDR_ERR_SUCCESS;
2661 : }
2662 :
2663 42 : _PUBLIC_ void ndr_print_winreg_QueryInfoKey(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_QueryInfoKey *r)
2664 : {
2665 42 : ndr_print_struct(ndr, name, "winreg_QueryInfoKey");
2666 42 : if (r == NULL) { ndr_print_null(ndr); return; }
2667 42 : ndr->depth++;
2668 42 : if (flags & NDR_SET_VALUES) {
2669 16 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2670 : }
2671 42 : if (flags & NDR_IN) {
2672 18 : ndr_print_struct(ndr, "in", "winreg_QueryInfoKey");
2673 18 : ndr->depth++;
2674 18 : ndr_print_ptr(ndr, "handle", r->in.handle);
2675 18 : ndr->depth++;
2676 18 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
2677 18 : ndr->depth--;
2678 18 : ndr_print_ptr(ndr, "classname", r->in.classname);
2679 18 : ndr->depth++;
2680 18 : ndr_print_winreg_String(ndr, "classname", r->in.classname);
2681 18 : ndr->depth--;
2682 18 : ndr->depth--;
2683 : }
2684 42 : if (flags & NDR_OUT) {
2685 24 : ndr_print_struct(ndr, "out", "winreg_QueryInfoKey");
2686 24 : ndr->depth++;
2687 24 : ndr_print_ptr(ndr, "classname", r->out.classname);
2688 24 : ndr->depth++;
2689 24 : ndr_print_winreg_String(ndr, "classname", r->out.classname);
2690 24 : ndr->depth--;
2691 24 : ndr_print_ptr(ndr, "num_subkeys", r->out.num_subkeys);
2692 24 : ndr->depth++;
2693 24 : ndr_print_uint32(ndr, "num_subkeys", *r->out.num_subkeys);
2694 24 : ndr->depth--;
2695 24 : ndr_print_ptr(ndr, "max_subkeylen", r->out.max_subkeylen);
2696 24 : ndr->depth++;
2697 24 : ndr_print_uint32(ndr, "max_subkeylen", *r->out.max_subkeylen);
2698 24 : ndr->depth--;
2699 24 : ndr_print_ptr(ndr, "max_classlen", r->out.max_classlen);
2700 24 : ndr->depth++;
2701 24 : ndr_print_uint32(ndr, "max_classlen", *r->out.max_classlen);
2702 24 : ndr->depth--;
2703 24 : ndr_print_ptr(ndr, "num_values", r->out.num_values);
2704 24 : ndr->depth++;
2705 24 : ndr_print_uint32(ndr, "num_values", *r->out.num_values);
2706 24 : ndr->depth--;
2707 24 : ndr_print_ptr(ndr, "max_valnamelen", r->out.max_valnamelen);
2708 24 : ndr->depth++;
2709 24 : ndr_print_uint32(ndr, "max_valnamelen", *r->out.max_valnamelen);
2710 24 : ndr->depth--;
2711 24 : ndr_print_ptr(ndr, "max_valbufsize", r->out.max_valbufsize);
2712 24 : ndr->depth++;
2713 24 : ndr_print_uint32(ndr, "max_valbufsize", *r->out.max_valbufsize);
2714 24 : ndr->depth--;
2715 24 : ndr_print_ptr(ndr, "secdescsize", r->out.secdescsize);
2716 24 : ndr->depth++;
2717 24 : ndr_print_uint32(ndr, "secdescsize", *r->out.secdescsize);
2718 24 : ndr->depth--;
2719 24 : ndr_print_ptr(ndr, "last_changed_time", r->out.last_changed_time);
2720 24 : ndr->depth++;
2721 24 : ndr_print_NTTIME(ndr, "last_changed_time", *r->out.last_changed_time);
2722 24 : ndr->depth--;
2723 24 : ndr_print_WERROR(ndr, "result", r->out.result);
2724 24 : ndr->depth--;
2725 : }
2726 42 : ndr->depth--;
2727 : }
2728 :
2729 123978 : _PUBLIC_ enum ndr_err_code ndr_push_winreg_QueryValue(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_QueryValue *r)
2730 : {
2731 123978 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2732 123978 : if (flags & NDR_IN) {
2733 61894 : if (r->in.handle == NULL) {
2734 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2735 : }
2736 61894 : if (r->in.value_name == NULL) {
2737 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2738 : }
2739 61894 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2740 61894 : NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.value_name));
2741 61894 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.type));
2742 61894 : if (r->in.type) {
2743 58022 : NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, *r->in.type));
2744 : }
2745 61894 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.data));
2746 61894 : if (r->in.data) {
2747 27490 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.data_size?*r->in.data_size:0));
2748 27490 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2749 27490 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.data_length?*r->in.data_length:0));
2750 27490 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.data, r->in.data_length?*r->in.data_length:0));
2751 : }
2752 61894 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.data_size));
2753 61894 : if (r->in.data_size) {
2754 54150 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.data_size));
2755 : }
2756 61894 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.data_length));
2757 61894 : if (r->in.data_length) {
2758 56086 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.data_length));
2759 : }
2760 : }
2761 123978 : if (flags & NDR_OUT) {
2762 62084 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.type));
2763 62084 : if (r->out.type) {
2764 54648 : NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, *r->out.type));
2765 : }
2766 62084 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.data));
2767 62084 : if (r->out.data) {
2768 29090 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->out.data_size?*r->out.data_size:0));
2769 29090 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2770 29090 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->out.data_length?*r->out.data_length:0));
2771 29090 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.data, r->out.data_length?*r->out.data_length:0));
2772 : }
2773 62084 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.data_size));
2774 62084 : if (r->out.data_size) {
2775 54252 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.data_size));
2776 : }
2777 62084 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.data_length));
2778 62084 : if (r->out.data_length) {
2779 54450 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.data_length));
2780 : }
2781 62084 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2782 : }
2783 123978 : return NDR_ERR_SUCCESS;
2784 : }
2785 :
2786 123792 : _PUBLIC_ enum ndr_err_code ndr_pull_winreg_QueryValue(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_QueryValue *r)
2787 : {
2788 4 : uint32_t _ptr_type;
2789 4 : uint32_t _ptr_data;
2790 123792 : uint32_t size_data_1 = 0;
2791 123792 : uint32_t length_data_1 = 0;
2792 4 : uint32_t _ptr_data_size;
2793 4 : uint32_t _ptr_data_length;
2794 123792 : TALLOC_CTX *_mem_save_handle_0 = NULL;
2795 123792 : TALLOC_CTX *_mem_save_value_name_0 = NULL;
2796 123792 : TALLOC_CTX *_mem_save_type_0 = NULL;
2797 123792 : TALLOC_CTX *_mem_save_data_0 = NULL;
2798 123792 : TALLOC_CTX *_mem_save_data_size_0 = NULL;
2799 123792 : TALLOC_CTX *_mem_save_data_length_0 = NULL;
2800 123792 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2801 123792 : if (flags & NDR_IN) {
2802 61896 : NDR_ZERO_STRUCT(r->out);
2803 :
2804 61896 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2805 61896 : NDR_PULL_ALLOC(ndr, r->in.handle);
2806 : }
2807 61896 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2808 61896 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2809 61896 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2810 61896 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2811 61896 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2812 61896 : NDR_PULL_ALLOC(ndr, r->in.value_name);
2813 : }
2814 61896 : _mem_save_value_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
2815 61896 : NDR_PULL_SET_MEM_CTX(ndr, r->in.value_name, LIBNDR_FLAG_REF_ALLOC);
2816 61896 : NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.value_name));
2817 61896 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_value_name_0, LIBNDR_FLAG_REF_ALLOC);
2818 61896 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_type));
2819 61896 : if (_ptr_type) {
2820 58024 : NDR_PULL_ALLOC(ndr, r->in.type);
2821 : } else {
2822 3872 : r->in.type = NULL;
2823 : }
2824 61896 : if (r->in.type) {
2825 58024 : _mem_save_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
2826 58024 : NDR_PULL_SET_MEM_CTX(ndr, r->in.type, 0);
2827 58024 : NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, r->in.type));
2828 58024 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, 0);
2829 : }
2830 61896 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
2831 61896 : if (_ptr_data) {
2832 27490 : NDR_PULL_ALLOC(ndr, r->in.data);
2833 : } else {
2834 34406 : r->in.data = NULL;
2835 : }
2836 61896 : if (r->in.data) {
2837 27490 : _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
2838 27490 : NDR_PULL_SET_MEM_CTX(ndr, r->in.data, 0);
2839 27490 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.data));
2840 27490 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.data));
2841 27490 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.data, &size_data_1));
2842 27490 : if (size_data_1 > 67108864) {
2843 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_data_1, (uint32_t)(0), (uint32_t)(67108864));
2844 : }
2845 27490 : NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->in.data, &length_data_1));
2846 27490 : if (length_data_1 > 67108864) {
2847 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_data_1, (uint32_t)(0), (uint32_t)(67108864));
2848 : }
2849 27490 : if (length_data_1 > size_data_1) {
2850 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_data_1, length_data_1);
2851 : }
2852 27490 : NDR_PULL_ALLOC_N(ndr, r->in.data, size_data_1);
2853 27490 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.data, length_data_1));
2854 27490 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
2855 : }
2856 61896 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_size));
2857 61896 : if (_ptr_data_size) {
2858 54152 : NDR_PULL_ALLOC(ndr, r->in.data_size);
2859 : } else {
2860 7744 : r->in.data_size = NULL;
2861 : }
2862 61896 : if (r->in.data_size) {
2863 54152 : _mem_save_data_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
2864 54152 : NDR_PULL_SET_MEM_CTX(ndr, r->in.data_size, 0);
2865 54152 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.data_size));
2866 54152 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_size_0, 0);
2867 : }
2868 61896 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_length));
2869 61896 : if (_ptr_data_length) {
2870 56088 : NDR_PULL_ALLOC(ndr, r->in.data_length);
2871 : } else {
2872 5808 : r->in.data_length = NULL;
2873 : }
2874 61896 : if (r->in.data_length) {
2875 56088 : _mem_save_data_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
2876 56088 : NDR_PULL_SET_MEM_CTX(ndr, r->in.data_length, 0);
2877 56088 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.data_length));
2878 56088 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_length_0, 0);
2879 : }
2880 61896 : if (r->in.data) {
2881 27490 : if (r->in.data_size == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for size_is()");
2882 27490 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.data, r->in.data_size?*r->in.data_size:0));
2883 : }
2884 61896 : if (r->in.data) {
2885 27490 : if (r->in.data_length == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for length_is()");
2886 27490 : NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->in.data, r->in.data_length?*r->in.data_length:0));
2887 : }
2888 : }
2889 123792 : if (flags & NDR_OUT) {
2890 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
2891 : if (r->in.handle == NULL) {
2892 : NDR_PULL_ALLOC(ndr, r->in.handle);
2893 : NDR_ZERO_STRUCTP(r->in.handle);
2894 : }
2895 : if (r->in.value_name == NULL) {
2896 : NDR_PULL_ALLOC(ndr, r->in.value_name);
2897 : NDR_ZERO_STRUCTP(r->in.value_name);
2898 : }
2899 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
2900 61896 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_type));
2901 61896 : if (_ptr_type) {
2902 54504 : NDR_PULL_ALLOC(ndr, r->out.type);
2903 : } else {
2904 7392 : r->out.type = NULL;
2905 : }
2906 61896 : if (r->out.type) {
2907 54504 : _mem_save_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
2908 54504 : NDR_PULL_SET_MEM_CTX(ndr, r->out.type, 0);
2909 54504 : NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, r->out.type));
2910 54504 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, 0);
2911 : }
2912 61896 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
2913 61896 : if (_ptr_data) {
2914 29010 : NDR_PULL_ALLOC(ndr, r->out.data);
2915 : } else {
2916 32886 : r->out.data = NULL;
2917 : }
2918 61896 : if (r->out.data) {
2919 29010 : _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
2920 29010 : NDR_PULL_SET_MEM_CTX(ndr, r->out.data, 0);
2921 29010 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.data));
2922 29010 : NDR_CHECK(ndr_pull_array_length(ndr, &r->out.data));
2923 29010 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.data, &size_data_1));
2924 29010 : if (size_data_1 > 67108864) {
2925 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_data_1, (uint32_t)(0), (uint32_t)(67108864));
2926 : }
2927 29010 : NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->out.data, &length_data_1));
2928 29010 : if (length_data_1 > 67108864) {
2929 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_data_1, (uint32_t)(0), (uint32_t)(67108864));
2930 : }
2931 29010 : if (length_data_1 > size_data_1) {
2932 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_data_1, length_data_1);
2933 : }
2934 29010 : NDR_PULL_ALLOC_N(ndr, r->out.data, size_data_1);
2935 29010 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.data, length_data_1));
2936 29010 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
2937 : }
2938 61896 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_size));
2939 61896 : if (_ptr_data_size) {
2940 54152 : NDR_PULL_ALLOC(ndr, r->out.data_size);
2941 : } else {
2942 7744 : r->out.data_size = NULL;
2943 : }
2944 61896 : if (r->out.data_size) {
2945 54152 : _mem_save_data_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
2946 54152 : NDR_PULL_SET_MEM_CTX(ndr, r->out.data_size, 0);
2947 54152 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.data_size));
2948 54152 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_size_0, 0);
2949 : }
2950 61896 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_length));
2951 61896 : if (_ptr_data_length) {
2952 54328 : NDR_PULL_ALLOC(ndr, r->out.data_length);
2953 : } else {
2954 7568 : r->out.data_length = NULL;
2955 : }
2956 61896 : if (r->out.data_length) {
2957 54328 : _mem_save_data_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
2958 54328 : NDR_PULL_SET_MEM_CTX(ndr, r->out.data_length, 0);
2959 54328 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.data_length));
2960 54328 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_length_0, 0);
2961 : }
2962 61896 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2963 61896 : if (r->out.data) {
2964 29010 : if (r->out.data_size == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for size_is()");
2965 29010 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.data, r->out.data_size?*r->out.data_size:0));
2966 : }
2967 61896 : if (r->out.data) {
2968 29010 : if (r->out.data_length == NULL) return ndr_pull_error(ndr, NDR_ERR_INVALID_POINTER, "NULL Pointer for length_is()");
2969 29010 : NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->out.data, r->out.data_length?*r->out.data_length:0));
2970 : }
2971 : }
2972 123788 : return NDR_ERR_SUCCESS;
2973 : }
2974 :
2975 384 : _PUBLIC_ void ndr_print_winreg_QueryValue(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_QueryValue *r)
2976 : {
2977 384 : ndr_print_struct(ndr, name, "winreg_QueryValue");
2978 384 : if (r == NULL) { ndr_print_null(ndr); return; }
2979 384 : ndr->depth++;
2980 384 : if (flags & NDR_SET_VALUES) {
2981 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2982 : }
2983 384 : if (flags & NDR_IN) {
2984 2 : ndr_print_struct(ndr, "in", "winreg_QueryValue");
2985 2 : ndr->depth++;
2986 2 : ndr_print_ptr(ndr, "handle", r->in.handle);
2987 2 : ndr->depth++;
2988 2 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
2989 2 : ndr->depth--;
2990 2 : ndr_print_ptr(ndr, "value_name", r->in.value_name);
2991 2 : ndr->depth++;
2992 2 : ndr_print_winreg_String(ndr, "value_name", r->in.value_name);
2993 2 : ndr->depth--;
2994 2 : ndr_print_ptr(ndr, "type", r->in.type);
2995 2 : ndr->depth++;
2996 2 : if (r->in.type) {
2997 2 : ndr_print_winreg_Type(ndr, "type", *r->in.type);
2998 : }
2999 2 : ndr->depth--;
3000 2 : ndr_print_ptr(ndr, "data", r->in.data);
3001 2 : ndr->depth++;
3002 2 : if (r->in.data) {
3003 0 : if (r->in.data_length == NULL) return;
3004 0 : ndr_print_array_uint8(ndr, "data", r->in.data, r->in.data_length?*r->in.data_length:0);
3005 : }
3006 2 : ndr->depth--;
3007 2 : ndr_print_ptr(ndr, "data_size", r->in.data_size);
3008 2 : ndr->depth++;
3009 2 : if (r->in.data_size) {
3010 2 : ndr_print_uint32(ndr, "data_size", *r->in.data_size);
3011 : }
3012 2 : ndr->depth--;
3013 2 : ndr_print_ptr(ndr, "data_length", r->in.data_length);
3014 2 : ndr->depth++;
3015 2 : if (r->in.data_length) {
3016 2 : ndr_print_uint32(ndr, "data_length", *r->in.data_length);
3017 : }
3018 2 : ndr->depth--;
3019 2 : ndr->depth--;
3020 : }
3021 384 : if (flags & NDR_OUT) {
3022 382 : ndr_print_struct(ndr, "out", "winreg_QueryValue");
3023 382 : ndr->depth++;
3024 382 : ndr_print_ptr(ndr, "type", r->out.type);
3025 382 : ndr->depth++;
3026 382 : if (r->out.type) {
3027 294 : ndr_print_winreg_Type(ndr, "type", *r->out.type);
3028 : }
3029 382 : ndr->depth--;
3030 382 : ndr_print_ptr(ndr, "data", r->out.data);
3031 382 : ndr->depth++;
3032 382 : if (r->out.data) {
3033 160 : if (r->out.data_length == NULL) return;
3034 160 : ndr_print_array_uint8(ndr, "data", r->out.data, r->out.data_length?*r->out.data_length:0);
3035 : }
3036 382 : ndr->depth--;
3037 382 : ndr_print_ptr(ndr, "data_size", r->out.data_size);
3038 382 : ndr->depth++;
3039 382 : if (r->out.data_size) {
3040 206 : ndr_print_uint32(ndr, "data_size", *r->out.data_size);
3041 : }
3042 382 : ndr->depth--;
3043 382 : ndr_print_ptr(ndr, "data_length", r->out.data_length);
3044 382 : ndr->depth++;
3045 382 : if (r->out.data_length) {
3046 250 : ndr_print_uint32(ndr, "data_length", *r->out.data_length);
3047 : }
3048 382 : ndr->depth--;
3049 382 : ndr_print_WERROR(ndr, "result", r->out.result);
3050 382 : ndr->depth--;
3051 : }
3052 384 : ndr->depth--;
3053 : }
3054 :
3055 0 : static enum ndr_err_code ndr_push_winreg_ReplaceKey(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_ReplaceKey *r)
3056 : {
3057 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3058 0 : if (flags & NDR_IN) {
3059 0 : if (r->in.handle == NULL) {
3060 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3061 : }
3062 0 : if (r->in.subkey == NULL) {
3063 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3064 : }
3065 0 : if (r->in.new_file == NULL) {
3066 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3067 : }
3068 0 : if (r->in.old_file == NULL) {
3069 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3070 : }
3071 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3072 0 : NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.subkey));
3073 0 : NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.new_file));
3074 0 : NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.old_file));
3075 : }
3076 0 : if (flags & NDR_OUT) {
3077 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3078 : }
3079 0 : return NDR_ERR_SUCCESS;
3080 : }
3081 :
3082 0 : static enum ndr_err_code ndr_pull_winreg_ReplaceKey(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_ReplaceKey *r)
3083 : {
3084 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
3085 0 : TALLOC_CTX *_mem_save_subkey_0 = NULL;
3086 0 : TALLOC_CTX *_mem_save_new_file_0 = NULL;
3087 0 : TALLOC_CTX *_mem_save_old_file_0 = NULL;
3088 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3089 0 : if (flags & NDR_IN) {
3090 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3091 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
3092 : }
3093 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3094 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3095 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3096 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3097 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3098 0 : NDR_PULL_ALLOC(ndr, r->in.subkey);
3099 : }
3100 0 : _mem_save_subkey_0 = NDR_PULL_GET_MEM_CTX(ndr);
3101 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.subkey, LIBNDR_FLAG_REF_ALLOC);
3102 0 : NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.subkey));
3103 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_subkey_0, LIBNDR_FLAG_REF_ALLOC);
3104 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3105 0 : NDR_PULL_ALLOC(ndr, r->in.new_file);
3106 : }
3107 0 : _mem_save_new_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
3108 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.new_file, LIBNDR_FLAG_REF_ALLOC);
3109 0 : NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.new_file));
3110 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_new_file_0, LIBNDR_FLAG_REF_ALLOC);
3111 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3112 0 : NDR_PULL_ALLOC(ndr, r->in.old_file);
3113 : }
3114 0 : _mem_save_old_file_0 = NDR_PULL_GET_MEM_CTX(ndr);
3115 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.old_file, LIBNDR_FLAG_REF_ALLOC);
3116 0 : NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.old_file));
3117 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_old_file_0, LIBNDR_FLAG_REF_ALLOC);
3118 : }
3119 0 : if (flags & NDR_OUT) {
3120 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3121 : if (r->in.handle == NULL) {
3122 : NDR_PULL_ALLOC(ndr, r->in.handle);
3123 : NDR_ZERO_STRUCTP(r->in.handle);
3124 : }
3125 : if (r->in.subkey == NULL) {
3126 : NDR_PULL_ALLOC(ndr, r->in.subkey);
3127 : NDR_ZERO_STRUCTP(r->in.subkey);
3128 : }
3129 : if (r->in.new_file == NULL) {
3130 : NDR_PULL_ALLOC(ndr, r->in.new_file);
3131 : NDR_ZERO_STRUCTP(r->in.new_file);
3132 : }
3133 : if (r->in.old_file == NULL) {
3134 : NDR_PULL_ALLOC(ndr, r->in.old_file);
3135 : NDR_ZERO_STRUCTP(r->in.old_file);
3136 : }
3137 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3138 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3139 : }
3140 0 : return NDR_ERR_SUCCESS;
3141 : }
3142 :
3143 0 : _PUBLIC_ void ndr_print_winreg_ReplaceKey(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_ReplaceKey *r)
3144 : {
3145 0 : ndr_print_struct(ndr, name, "winreg_ReplaceKey");
3146 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3147 0 : ndr->depth++;
3148 0 : if (flags & NDR_SET_VALUES) {
3149 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3150 : }
3151 0 : if (flags & NDR_IN) {
3152 0 : ndr_print_struct(ndr, "in", "winreg_ReplaceKey");
3153 0 : ndr->depth++;
3154 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
3155 0 : ndr->depth++;
3156 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
3157 0 : ndr->depth--;
3158 0 : ndr_print_ptr(ndr, "subkey", r->in.subkey);
3159 0 : ndr->depth++;
3160 0 : ndr_print_winreg_String(ndr, "subkey", r->in.subkey);
3161 0 : ndr->depth--;
3162 0 : ndr_print_ptr(ndr, "new_file", r->in.new_file);
3163 0 : ndr->depth++;
3164 0 : ndr_print_winreg_String(ndr, "new_file", r->in.new_file);
3165 0 : ndr->depth--;
3166 0 : ndr_print_ptr(ndr, "old_file", r->in.old_file);
3167 0 : ndr->depth++;
3168 0 : ndr_print_winreg_String(ndr, "old_file", r->in.old_file);
3169 0 : ndr->depth--;
3170 0 : ndr->depth--;
3171 : }
3172 0 : if (flags & NDR_OUT) {
3173 0 : ndr_print_struct(ndr, "out", "winreg_ReplaceKey");
3174 0 : ndr->depth++;
3175 0 : ndr_print_WERROR(ndr, "result", r->out.result);
3176 0 : ndr->depth--;
3177 : }
3178 0 : ndr->depth--;
3179 : }
3180 :
3181 0 : static enum ndr_err_code ndr_push_winreg_RestoreKey(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_RestoreKey *r)
3182 : {
3183 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3184 0 : if (flags & NDR_IN) {
3185 0 : if (r->in.handle == NULL) {
3186 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3187 : }
3188 0 : if (r->in.filename == NULL) {
3189 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3190 : }
3191 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3192 0 : NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.filename));
3193 0 : NDR_CHECK(ndr_push_winreg_RestoreKeyFlags(ndr, NDR_SCALARS, r->in.flags));
3194 : }
3195 0 : if (flags & NDR_OUT) {
3196 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3197 : }
3198 0 : return NDR_ERR_SUCCESS;
3199 : }
3200 :
3201 0 : static enum ndr_err_code ndr_pull_winreg_RestoreKey(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_RestoreKey *r)
3202 : {
3203 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
3204 0 : TALLOC_CTX *_mem_save_filename_0 = NULL;
3205 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3206 0 : if (flags & NDR_IN) {
3207 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3208 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
3209 : }
3210 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3211 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3212 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3213 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3214 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3215 0 : NDR_PULL_ALLOC(ndr, r->in.filename);
3216 : }
3217 0 : _mem_save_filename_0 = NDR_PULL_GET_MEM_CTX(ndr);
3218 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.filename, LIBNDR_FLAG_REF_ALLOC);
3219 0 : NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.filename));
3220 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_filename_0, LIBNDR_FLAG_REF_ALLOC);
3221 0 : NDR_CHECK(ndr_pull_winreg_RestoreKeyFlags(ndr, NDR_SCALARS, &r->in.flags));
3222 : }
3223 0 : if (flags & NDR_OUT) {
3224 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3225 : if (r->in.handle == NULL) {
3226 : NDR_PULL_ALLOC(ndr, r->in.handle);
3227 : NDR_ZERO_STRUCTP(r->in.handle);
3228 : }
3229 : if (r->in.filename == NULL) {
3230 : NDR_PULL_ALLOC(ndr, r->in.filename);
3231 : NDR_ZERO_STRUCTP(r->in.filename);
3232 : }
3233 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3234 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3235 : }
3236 0 : return NDR_ERR_SUCCESS;
3237 : }
3238 :
3239 0 : _PUBLIC_ void ndr_print_winreg_RestoreKey(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_RestoreKey *r)
3240 : {
3241 0 : ndr_print_struct(ndr, name, "winreg_RestoreKey");
3242 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3243 0 : ndr->depth++;
3244 0 : if (flags & NDR_SET_VALUES) {
3245 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3246 : }
3247 0 : if (flags & NDR_IN) {
3248 0 : ndr_print_struct(ndr, "in", "winreg_RestoreKey");
3249 0 : ndr->depth++;
3250 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
3251 0 : ndr->depth++;
3252 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
3253 0 : ndr->depth--;
3254 0 : ndr_print_ptr(ndr, "filename", r->in.filename);
3255 0 : ndr->depth++;
3256 0 : ndr_print_winreg_String(ndr, "filename", r->in.filename);
3257 0 : ndr->depth--;
3258 0 : ndr_print_winreg_RestoreKeyFlags(ndr, "flags", r->in.flags);
3259 0 : ndr->depth--;
3260 : }
3261 0 : if (flags & NDR_OUT) {
3262 0 : ndr_print_struct(ndr, "out", "winreg_RestoreKey");
3263 0 : ndr->depth++;
3264 0 : ndr_print_WERROR(ndr, "result", r->out.result);
3265 0 : ndr->depth--;
3266 : }
3267 0 : ndr->depth--;
3268 : }
3269 :
3270 0 : static enum ndr_err_code ndr_push_winreg_SaveKey(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_SaveKey *r)
3271 : {
3272 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3273 0 : if (flags & NDR_IN) {
3274 0 : if (r->in.handle == NULL) {
3275 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3276 : }
3277 0 : if (r->in.filename == NULL) {
3278 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3279 : }
3280 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3281 0 : NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.filename));
3282 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sec_attrib));
3283 0 : if (r->in.sec_attrib) {
3284 0 : NDR_CHECK(ndr_push_KeySecurityAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sec_attrib));
3285 : }
3286 : }
3287 0 : if (flags & NDR_OUT) {
3288 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3289 : }
3290 0 : return NDR_ERR_SUCCESS;
3291 : }
3292 :
3293 0 : static enum ndr_err_code ndr_pull_winreg_SaveKey(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_SaveKey *r)
3294 : {
3295 0 : uint32_t _ptr_sec_attrib;
3296 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
3297 0 : TALLOC_CTX *_mem_save_filename_0 = NULL;
3298 0 : TALLOC_CTX *_mem_save_sec_attrib_0 = NULL;
3299 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3300 0 : if (flags & NDR_IN) {
3301 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3302 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
3303 : }
3304 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3305 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3306 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3307 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3308 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3309 0 : NDR_PULL_ALLOC(ndr, r->in.filename);
3310 : }
3311 0 : _mem_save_filename_0 = NDR_PULL_GET_MEM_CTX(ndr);
3312 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.filename, LIBNDR_FLAG_REF_ALLOC);
3313 0 : NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.filename));
3314 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_filename_0, LIBNDR_FLAG_REF_ALLOC);
3315 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sec_attrib));
3316 0 : if (_ptr_sec_attrib) {
3317 0 : NDR_PULL_ALLOC(ndr, r->in.sec_attrib);
3318 : } else {
3319 0 : r->in.sec_attrib = NULL;
3320 : }
3321 0 : if (r->in.sec_attrib) {
3322 0 : _mem_save_sec_attrib_0 = NDR_PULL_GET_MEM_CTX(ndr);
3323 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.sec_attrib, 0);
3324 0 : NDR_CHECK(ndr_pull_KeySecurityAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sec_attrib));
3325 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_attrib_0, 0);
3326 : }
3327 : }
3328 0 : if (flags & NDR_OUT) {
3329 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3330 : if (r->in.handle == NULL) {
3331 : NDR_PULL_ALLOC(ndr, r->in.handle);
3332 : NDR_ZERO_STRUCTP(r->in.handle);
3333 : }
3334 : if (r->in.filename == NULL) {
3335 : NDR_PULL_ALLOC(ndr, r->in.filename);
3336 : NDR_ZERO_STRUCTP(r->in.filename);
3337 : }
3338 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3339 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3340 : }
3341 0 : return NDR_ERR_SUCCESS;
3342 : }
3343 :
3344 0 : _PUBLIC_ void ndr_print_winreg_SaveKey(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_SaveKey *r)
3345 : {
3346 0 : ndr_print_struct(ndr, name, "winreg_SaveKey");
3347 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3348 0 : ndr->depth++;
3349 0 : if (flags & NDR_SET_VALUES) {
3350 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3351 : }
3352 0 : if (flags & NDR_IN) {
3353 0 : ndr_print_struct(ndr, "in", "winreg_SaveKey");
3354 0 : ndr->depth++;
3355 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
3356 0 : ndr->depth++;
3357 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
3358 0 : ndr->depth--;
3359 0 : ndr_print_ptr(ndr, "filename", r->in.filename);
3360 0 : ndr->depth++;
3361 0 : ndr_print_winreg_String(ndr, "filename", r->in.filename);
3362 0 : ndr->depth--;
3363 0 : ndr_print_ptr(ndr, "sec_attrib", r->in.sec_attrib);
3364 0 : ndr->depth++;
3365 0 : if (r->in.sec_attrib) {
3366 0 : ndr_print_KeySecurityAttribute(ndr, "sec_attrib", r->in.sec_attrib);
3367 : }
3368 0 : ndr->depth--;
3369 0 : ndr->depth--;
3370 : }
3371 0 : if (flags & NDR_OUT) {
3372 0 : ndr_print_struct(ndr, "out", "winreg_SaveKey");
3373 0 : ndr->depth++;
3374 0 : ndr_print_WERROR(ndr, "result", r->out.result);
3375 0 : ndr->depth--;
3376 : }
3377 0 : ndr->depth--;
3378 : }
3379 :
3380 0 : static enum ndr_err_code ndr_push_winreg_SetKeySecurity(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_SetKeySecurity *r)
3381 : {
3382 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3383 0 : if (flags & NDR_IN) {
3384 0 : if (r->in.handle == NULL) {
3385 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3386 : }
3387 0 : if (r->in.sd == NULL) {
3388 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3389 : }
3390 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3391 0 : NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.sec_info));
3392 0 : NDR_CHECK(ndr_push_KeySecurityData(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sd));
3393 : }
3394 0 : if (flags & NDR_OUT) {
3395 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3396 : }
3397 0 : return NDR_ERR_SUCCESS;
3398 : }
3399 :
3400 0 : static enum ndr_err_code ndr_pull_winreg_SetKeySecurity(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_SetKeySecurity *r)
3401 : {
3402 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
3403 0 : TALLOC_CTX *_mem_save_sd_0 = NULL;
3404 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3405 0 : if (flags & NDR_IN) {
3406 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3407 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
3408 : }
3409 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3410 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3411 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3412 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3413 0 : NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.sec_info));
3414 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3415 0 : NDR_PULL_ALLOC(ndr, r->in.sd);
3416 : }
3417 0 : _mem_save_sd_0 = NDR_PULL_GET_MEM_CTX(ndr);
3418 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.sd, LIBNDR_FLAG_REF_ALLOC);
3419 0 : NDR_CHECK(ndr_pull_KeySecurityData(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sd));
3420 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_0, LIBNDR_FLAG_REF_ALLOC);
3421 : }
3422 0 : if (flags & NDR_OUT) {
3423 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3424 : if (r->in.handle == NULL) {
3425 : NDR_PULL_ALLOC(ndr, r->in.handle);
3426 : NDR_ZERO_STRUCTP(r->in.handle);
3427 : }
3428 : if (r->in.sd == NULL) {
3429 : NDR_PULL_ALLOC(ndr, r->in.sd);
3430 : NDR_ZERO_STRUCTP(r->in.sd);
3431 : }
3432 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3433 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3434 : }
3435 0 : return NDR_ERR_SUCCESS;
3436 : }
3437 :
3438 0 : _PUBLIC_ void ndr_print_winreg_SetKeySecurity(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_SetKeySecurity *r)
3439 : {
3440 0 : ndr_print_struct(ndr, name, "winreg_SetKeySecurity");
3441 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3442 0 : ndr->depth++;
3443 0 : if (flags & NDR_SET_VALUES) {
3444 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3445 : }
3446 0 : if (flags & NDR_IN) {
3447 0 : ndr_print_struct(ndr, "in", "winreg_SetKeySecurity");
3448 0 : ndr->depth++;
3449 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
3450 0 : ndr->depth++;
3451 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
3452 0 : ndr->depth--;
3453 0 : ndr_print_security_secinfo(ndr, "sec_info", r->in.sec_info);
3454 0 : ndr_print_ptr(ndr, "sd", r->in.sd);
3455 0 : ndr->depth++;
3456 0 : ndr_print_KeySecurityData(ndr, "sd", r->in.sd);
3457 0 : ndr->depth--;
3458 0 : ndr->depth--;
3459 : }
3460 0 : if (flags & NDR_OUT) {
3461 0 : ndr_print_struct(ndr, "out", "winreg_SetKeySecurity");
3462 0 : ndr->depth++;
3463 0 : ndr_print_WERROR(ndr, "result", r->out.result);
3464 0 : ndr->depth--;
3465 : }
3466 0 : ndr->depth--;
3467 : }
3468 :
3469 37464 : static enum ndr_err_code ndr_push_winreg_SetValue(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_SetValue *r)
3470 : {
3471 37464 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3472 37464 : if (flags & NDR_IN) {
3473 18684 : if (r->in.handle == NULL) {
3474 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3475 : }
3476 18684 : if (r->in.data == NULL) {
3477 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3478 : }
3479 18684 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3480 18684 : NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
3481 18684 : NDR_CHECK(ndr_push_winreg_Type(ndr, NDR_SCALARS, r->in.type));
3482 18684 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.size));
3483 18684 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.data, r->in.size));
3484 18684 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.size));
3485 : }
3486 37464 : if (flags & NDR_OUT) {
3487 18780 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3488 : }
3489 37464 : return NDR_ERR_SUCCESS;
3490 : }
3491 :
3492 37432 : static enum ndr_err_code ndr_pull_winreg_SetValue(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_SetValue *r)
3493 : {
3494 37432 : uint32_t size_data_1 = 0;
3495 37432 : TALLOC_CTX *_mem_save_handle_0 = NULL;
3496 37432 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3497 37432 : if (flags & NDR_IN) {
3498 18748 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3499 18748 : NDR_PULL_ALLOC(ndr, r->in.handle);
3500 : }
3501 18748 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3502 18748 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3503 18748 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3504 18748 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3505 18748 : NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.name));
3506 18748 : NDR_CHECK(ndr_pull_winreg_Type(ndr, NDR_SCALARS, &r->in.type));
3507 18748 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.data));
3508 18748 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.data, &size_data_1));
3509 18748 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3510 18748 : NDR_PULL_ALLOC_N(ndr, r->in.data, size_data_1);
3511 : }
3512 18748 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.data, size_data_1));
3513 18748 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.size));
3514 18748 : if (r->in.data) {
3515 18748 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.data, r->in.size));
3516 : }
3517 : }
3518 37432 : if (flags & NDR_OUT) {
3519 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3520 : if (r->in.handle == NULL) {
3521 : NDR_PULL_ALLOC(ndr, r->in.handle);
3522 : NDR_ZERO_STRUCTP(r->in.handle);
3523 : }
3524 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3525 18684 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3526 : }
3527 37432 : return NDR_ERR_SUCCESS;
3528 : }
3529 :
3530 64 : _PUBLIC_ void ndr_print_winreg_SetValue(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_SetValue *r)
3531 : {
3532 64 : ndr_print_struct(ndr, name, "winreg_SetValue");
3533 64 : if (r == NULL) { ndr_print_null(ndr); return; }
3534 64 : ndr->depth++;
3535 64 : if (flags & NDR_SET_VALUES) {
3536 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3537 : }
3538 64 : if (flags & NDR_IN) {
3539 0 : ndr_print_struct(ndr, "in", "winreg_SetValue");
3540 0 : ndr->depth++;
3541 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
3542 0 : ndr->depth++;
3543 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
3544 0 : ndr->depth--;
3545 0 : ndr_print_winreg_String(ndr, "name", &r->in.name);
3546 0 : ndr_print_winreg_Type(ndr, "type", r->in.type);
3547 0 : ndr_print_ptr(ndr, "data", r->in.data);
3548 0 : ndr->depth++;
3549 0 : ndr_print_array_uint8(ndr, "data", r->in.data, r->in.size);
3550 0 : ndr->depth--;
3551 0 : ndr_print_uint32(ndr, "size", r->in.size);
3552 0 : ndr->depth--;
3553 : }
3554 64 : if (flags & NDR_OUT) {
3555 64 : ndr_print_struct(ndr, "out", "winreg_SetValue");
3556 64 : ndr->depth++;
3557 64 : ndr_print_WERROR(ndr, "result", r->out.result);
3558 64 : ndr->depth--;
3559 : }
3560 64 : ndr->depth--;
3561 : }
3562 :
3563 0 : static enum ndr_err_code ndr_push_winreg_UnLoadKey(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_UnLoadKey *r)
3564 : {
3565 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3566 0 : if (flags & NDR_IN) {
3567 0 : if (r->in.handle == NULL) {
3568 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3569 : }
3570 0 : if (r->in.subkey == NULL) {
3571 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3572 : }
3573 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3574 0 : NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.subkey));
3575 : }
3576 0 : if (flags & NDR_OUT) {
3577 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3578 : }
3579 0 : return NDR_ERR_SUCCESS;
3580 : }
3581 :
3582 0 : static enum ndr_err_code ndr_pull_winreg_UnLoadKey(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_UnLoadKey *r)
3583 : {
3584 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
3585 0 : TALLOC_CTX *_mem_save_subkey_0 = NULL;
3586 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3587 0 : if (flags & NDR_IN) {
3588 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3589 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
3590 : }
3591 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3592 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3593 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3594 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3595 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3596 0 : NDR_PULL_ALLOC(ndr, r->in.subkey);
3597 : }
3598 0 : _mem_save_subkey_0 = NDR_PULL_GET_MEM_CTX(ndr);
3599 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.subkey, LIBNDR_FLAG_REF_ALLOC);
3600 0 : NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.subkey));
3601 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_subkey_0, LIBNDR_FLAG_REF_ALLOC);
3602 : }
3603 0 : if (flags & NDR_OUT) {
3604 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3605 : if (r->in.handle == NULL) {
3606 : NDR_PULL_ALLOC(ndr, r->in.handle);
3607 : NDR_ZERO_STRUCTP(r->in.handle);
3608 : }
3609 : if (r->in.subkey == NULL) {
3610 : NDR_PULL_ALLOC(ndr, r->in.subkey);
3611 : NDR_ZERO_STRUCTP(r->in.subkey);
3612 : }
3613 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3614 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3615 : }
3616 0 : return NDR_ERR_SUCCESS;
3617 : }
3618 :
3619 0 : _PUBLIC_ void ndr_print_winreg_UnLoadKey(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_UnLoadKey *r)
3620 : {
3621 0 : ndr_print_struct(ndr, name, "winreg_UnLoadKey");
3622 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3623 0 : ndr->depth++;
3624 0 : if (flags & NDR_SET_VALUES) {
3625 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3626 : }
3627 0 : if (flags & NDR_IN) {
3628 0 : ndr_print_struct(ndr, "in", "winreg_UnLoadKey");
3629 0 : ndr->depth++;
3630 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
3631 0 : ndr->depth++;
3632 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
3633 0 : ndr->depth--;
3634 0 : ndr_print_ptr(ndr, "subkey", r->in.subkey);
3635 0 : ndr->depth++;
3636 0 : ndr_print_winreg_String(ndr, "subkey", r->in.subkey);
3637 0 : ndr->depth--;
3638 0 : ndr->depth--;
3639 : }
3640 0 : if (flags & NDR_OUT) {
3641 0 : ndr_print_struct(ndr, "out", "winreg_UnLoadKey");
3642 0 : ndr->depth++;
3643 0 : ndr_print_WERROR(ndr, "result", r->out.result);
3644 0 : ndr->depth--;
3645 : }
3646 0 : ndr->depth--;
3647 : }
3648 :
3649 0 : static enum ndr_err_code ndr_push_winreg_InitiateSystemShutdown(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_InitiateSystemShutdown *r)
3650 : {
3651 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3652 0 : if (flags & NDR_IN) {
3653 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.hostname));
3654 0 : if (r->in.hostname) {
3655 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.hostname));
3656 : }
3657 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.message));
3658 0 : if (r->in.message) {
3659 0 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
3660 : }
3661 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.timeout));
3662 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.force_apps));
3663 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.do_reboot));
3664 : }
3665 0 : if (flags & NDR_OUT) {
3666 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3667 : }
3668 0 : return NDR_ERR_SUCCESS;
3669 : }
3670 :
3671 0 : static enum ndr_err_code ndr_pull_winreg_InitiateSystemShutdown(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_InitiateSystemShutdown *r)
3672 : {
3673 0 : uint32_t _ptr_hostname;
3674 0 : uint32_t _ptr_message;
3675 0 : TALLOC_CTX *_mem_save_hostname_0 = NULL;
3676 0 : TALLOC_CTX *_mem_save_message_0 = NULL;
3677 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3678 0 : if (flags & NDR_IN) {
3679 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hostname));
3680 0 : if (_ptr_hostname) {
3681 0 : NDR_PULL_ALLOC(ndr, r->in.hostname);
3682 : } else {
3683 0 : r->in.hostname = NULL;
3684 : }
3685 0 : if (r->in.hostname) {
3686 0 : _mem_save_hostname_0 = NDR_PULL_GET_MEM_CTX(ndr);
3687 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.hostname, 0);
3688 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.hostname));
3689 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hostname_0, 0);
3690 : }
3691 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_message));
3692 0 : if (_ptr_message) {
3693 0 : NDR_PULL_ALLOC(ndr, r->in.message);
3694 : } else {
3695 0 : r->in.message = NULL;
3696 : }
3697 0 : if (r->in.message) {
3698 0 : _mem_save_message_0 = NDR_PULL_GET_MEM_CTX(ndr);
3699 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.message, 0);
3700 0 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
3701 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_message_0, 0);
3702 : }
3703 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.timeout));
3704 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.force_apps));
3705 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.do_reboot));
3706 : }
3707 0 : if (flags & NDR_OUT) {
3708 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3709 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3710 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3711 : }
3712 0 : return NDR_ERR_SUCCESS;
3713 : }
3714 :
3715 0 : _PUBLIC_ void ndr_print_winreg_InitiateSystemShutdown(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_InitiateSystemShutdown *r)
3716 : {
3717 0 : ndr_print_struct(ndr, name, "winreg_InitiateSystemShutdown");
3718 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3719 0 : ndr->depth++;
3720 0 : if (flags & NDR_SET_VALUES) {
3721 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3722 : }
3723 0 : if (flags & NDR_IN) {
3724 0 : ndr_print_struct(ndr, "in", "winreg_InitiateSystemShutdown");
3725 0 : ndr->depth++;
3726 0 : ndr_print_ptr(ndr, "hostname", r->in.hostname);
3727 0 : ndr->depth++;
3728 0 : if (r->in.hostname) {
3729 0 : ndr_print_uint16(ndr, "hostname", *r->in.hostname);
3730 : }
3731 0 : ndr->depth--;
3732 0 : ndr_print_ptr(ndr, "message", r->in.message);
3733 0 : ndr->depth++;
3734 0 : if (r->in.message) {
3735 0 : ndr_print_lsa_StringLarge(ndr, "message", r->in.message);
3736 : }
3737 0 : ndr->depth--;
3738 0 : ndr_print_uint32(ndr, "timeout", r->in.timeout);
3739 0 : ndr_print_uint8(ndr, "force_apps", r->in.force_apps);
3740 0 : ndr_print_uint8(ndr, "do_reboot", r->in.do_reboot);
3741 0 : ndr->depth--;
3742 : }
3743 0 : if (flags & NDR_OUT) {
3744 0 : ndr_print_struct(ndr, "out", "winreg_InitiateSystemShutdown");
3745 0 : ndr->depth++;
3746 0 : ndr_print_WERROR(ndr, "result", r->out.result);
3747 0 : ndr->depth--;
3748 : }
3749 0 : ndr->depth--;
3750 : }
3751 :
3752 0 : static enum ndr_err_code ndr_push_winreg_AbortSystemShutdown(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_AbortSystemShutdown *r)
3753 : {
3754 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3755 0 : if (flags & NDR_IN) {
3756 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server));
3757 0 : if (r->in.server) {
3758 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.server));
3759 : }
3760 : }
3761 0 : if (flags & NDR_OUT) {
3762 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3763 : }
3764 0 : return NDR_ERR_SUCCESS;
3765 : }
3766 :
3767 0 : static enum ndr_err_code ndr_pull_winreg_AbortSystemShutdown(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_AbortSystemShutdown *r)
3768 : {
3769 0 : uint32_t _ptr_server;
3770 0 : TALLOC_CTX *_mem_save_server_0 = NULL;
3771 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3772 0 : if (flags & NDR_IN) {
3773 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
3774 0 : if (_ptr_server) {
3775 0 : NDR_PULL_ALLOC(ndr, r->in.server);
3776 : } else {
3777 0 : r->in.server = NULL;
3778 : }
3779 0 : if (r->in.server) {
3780 0 : _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
3781 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.server, 0);
3782 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.server));
3783 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
3784 : }
3785 : }
3786 0 : if (flags & NDR_OUT) {
3787 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3788 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3789 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3790 : }
3791 0 : return NDR_ERR_SUCCESS;
3792 : }
3793 :
3794 0 : _PUBLIC_ void ndr_print_winreg_AbortSystemShutdown(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_AbortSystemShutdown *r)
3795 : {
3796 0 : ndr_print_struct(ndr, name, "winreg_AbortSystemShutdown");
3797 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3798 0 : ndr->depth++;
3799 0 : if (flags & NDR_SET_VALUES) {
3800 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3801 : }
3802 0 : if (flags & NDR_IN) {
3803 0 : ndr_print_struct(ndr, "in", "winreg_AbortSystemShutdown");
3804 0 : ndr->depth++;
3805 0 : ndr_print_ptr(ndr, "server", r->in.server);
3806 0 : ndr->depth++;
3807 0 : if (r->in.server) {
3808 0 : ndr_print_uint16(ndr, "server", *r->in.server);
3809 : }
3810 0 : ndr->depth--;
3811 0 : ndr->depth--;
3812 : }
3813 0 : if (flags & NDR_OUT) {
3814 0 : ndr_print_struct(ndr, "out", "winreg_AbortSystemShutdown");
3815 0 : ndr->depth++;
3816 0 : ndr_print_WERROR(ndr, "result", r->out.result);
3817 0 : ndr->depth--;
3818 : }
3819 0 : ndr->depth--;
3820 : }
3821 :
3822 710 : _PUBLIC_ enum ndr_err_code ndr_push_winreg_GetVersion(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_GetVersion *r)
3823 : {
3824 710 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3825 710 : if (flags & NDR_IN) {
3826 353 : if (r->in.handle == NULL) {
3827 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3828 : }
3829 353 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3830 : }
3831 710 : if (flags & NDR_OUT) {
3832 357 : if (r->out.version == NULL) {
3833 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3834 : }
3835 357 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.version));
3836 357 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3837 : }
3838 710 : return NDR_ERR_SUCCESS;
3839 : }
3840 :
3841 710 : _PUBLIC_ enum ndr_err_code ndr_pull_winreg_GetVersion(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_GetVersion *r)
3842 : {
3843 710 : TALLOC_CTX *_mem_save_handle_0 = NULL;
3844 710 : TALLOC_CTX *_mem_save_version_0 = NULL;
3845 710 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3846 710 : if (flags & NDR_IN) {
3847 355 : NDR_ZERO_STRUCT(r->out);
3848 :
3849 355 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3850 355 : NDR_PULL_ALLOC(ndr, r->in.handle);
3851 : }
3852 355 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3853 355 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3854 355 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3855 355 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3856 355 : NDR_PULL_ALLOC(ndr, r->out.version);
3857 355 : NDR_ZERO_STRUCTP(r->out.version);
3858 : }
3859 710 : if (flags & NDR_OUT) {
3860 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3861 : if (r->in.handle == NULL) {
3862 : NDR_PULL_ALLOC(ndr, r->in.handle);
3863 : NDR_ZERO_STRUCTP(r->in.handle);
3864 : }
3865 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3866 355 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3867 7 : NDR_PULL_ALLOC(ndr, r->out.version);
3868 : }
3869 355 : _mem_save_version_0 = NDR_PULL_GET_MEM_CTX(ndr);
3870 355 : NDR_PULL_SET_MEM_CTX(ndr, r->out.version, LIBNDR_FLAG_REF_ALLOC);
3871 355 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.version));
3872 355 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_version_0, LIBNDR_FLAG_REF_ALLOC);
3873 355 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3874 : }
3875 706 : return NDR_ERR_SUCCESS;
3876 : }
3877 :
3878 12 : _PUBLIC_ void ndr_print_winreg_GetVersion(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_GetVersion *r)
3879 : {
3880 12 : ndr_print_struct(ndr, name, "winreg_GetVersion");
3881 12 : if (r == NULL) { ndr_print_null(ndr); return; }
3882 12 : ndr->depth++;
3883 12 : if (flags & NDR_SET_VALUES) {
3884 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3885 : }
3886 12 : if (flags & NDR_IN) {
3887 2 : ndr_print_struct(ndr, "in", "winreg_GetVersion");
3888 2 : ndr->depth++;
3889 2 : ndr_print_ptr(ndr, "handle", r->in.handle);
3890 2 : ndr->depth++;
3891 2 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
3892 2 : ndr->depth--;
3893 2 : ndr->depth--;
3894 : }
3895 12 : if (flags & NDR_OUT) {
3896 10 : ndr_print_struct(ndr, "out", "winreg_GetVersion");
3897 10 : ndr->depth++;
3898 10 : ndr_print_ptr(ndr, "version", r->out.version);
3899 10 : ndr->depth++;
3900 10 : ndr_print_uint32(ndr, "version", *r->out.version);
3901 10 : ndr->depth--;
3902 10 : ndr_print_WERROR(ndr, "result", r->out.result);
3903 10 : ndr->depth--;
3904 : }
3905 12 : ndr->depth--;
3906 : }
3907 :
3908 0 : static enum ndr_err_code ndr_push_winreg_OpenHKCC(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_OpenHKCC *r)
3909 : {
3910 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3911 0 : if (flags & NDR_IN) {
3912 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
3913 0 : if (r->in.system_name) {
3914 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.system_name));
3915 : }
3916 0 : NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
3917 : }
3918 0 : if (flags & NDR_OUT) {
3919 0 : if (r->out.handle == NULL) {
3920 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3921 : }
3922 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
3923 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3924 : }
3925 0 : return NDR_ERR_SUCCESS;
3926 : }
3927 :
3928 0 : static enum ndr_err_code ndr_pull_winreg_OpenHKCC(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_OpenHKCC *r)
3929 : {
3930 0 : uint32_t _ptr_system_name;
3931 0 : TALLOC_CTX *_mem_save_system_name_0 = NULL;
3932 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
3933 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3934 0 : if (flags & NDR_IN) {
3935 0 : NDR_ZERO_STRUCT(r->out);
3936 :
3937 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
3938 0 : if (_ptr_system_name) {
3939 0 : NDR_PULL_ALLOC(ndr, r->in.system_name);
3940 : } else {
3941 0 : r->in.system_name = NULL;
3942 : }
3943 0 : if (r->in.system_name) {
3944 0 : _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3945 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
3946 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.system_name));
3947 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
3948 : }
3949 0 : NDR_CHECK(ndr_pull_winreg_AccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
3950 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
3951 0 : NDR_ZERO_STRUCTP(r->out.handle);
3952 : }
3953 0 : if (flags & NDR_OUT) {
3954 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3955 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3956 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3957 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
3958 : }
3959 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3960 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
3961 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
3962 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3963 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3964 : }
3965 0 : return NDR_ERR_SUCCESS;
3966 : }
3967 :
3968 0 : _PUBLIC_ void ndr_print_winreg_OpenHKCC(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_OpenHKCC *r)
3969 : {
3970 0 : ndr_print_struct(ndr, name, "winreg_OpenHKCC");
3971 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3972 0 : ndr->depth++;
3973 0 : if (flags & NDR_SET_VALUES) {
3974 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3975 : }
3976 0 : if (flags & NDR_IN) {
3977 0 : ndr_print_struct(ndr, "in", "winreg_OpenHKCC");
3978 0 : ndr->depth++;
3979 0 : ndr_print_ptr(ndr, "system_name", r->in.system_name);
3980 0 : ndr->depth++;
3981 0 : if (r->in.system_name) {
3982 0 : ndr_print_uint16(ndr, "system_name", *r->in.system_name);
3983 : }
3984 0 : ndr->depth--;
3985 0 : ndr_print_winreg_AccessMask(ndr, "access_mask", r->in.access_mask);
3986 0 : ndr->depth--;
3987 : }
3988 0 : if (flags & NDR_OUT) {
3989 0 : ndr_print_struct(ndr, "out", "winreg_OpenHKCC");
3990 0 : ndr->depth++;
3991 0 : ndr_print_ptr(ndr, "handle", r->out.handle);
3992 0 : ndr->depth++;
3993 0 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
3994 0 : ndr->depth--;
3995 0 : ndr_print_WERROR(ndr, "result", r->out.result);
3996 0 : ndr->depth--;
3997 : }
3998 0 : ndr->depth--;
3999 : }
4000 :
4001 0 : static enum ndr_err_code ndr_push_winreg_OpenHKDD(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_OpenHKDD *r)
4002 : {
4003 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4004 0 : if (flags & NDR_IN) {
4005 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
4006 0 : if (r->in.system_name) {
4007 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.system_name));
4008 : }
4009 0 : NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
4010 : }
4011 0 : if (flags & NDR_OUT) {
4012 0 : if (r->out.handle == NULL) {
4013 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4014 : }
4015 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
4016 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4017 : }
4018 0 : return NDR_ERR_SUCCESS;
4019 : }
4020 :
4021 0 : static enum ndr_err_code ndr_pull_winreg_OpenHKDD(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_OpenHKDD *r)
4022 : {
4023 0 : uint32_t _ptr_system_name;
4024 0 : TALLOC_CTX *_mem_save_system_name_0 = NULL;
4025 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
4026 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4027 0 : if (flags & NDR_IN) {
4028 0 : NDR_ZERO_STRUCT(r->out);
4029 :
4030 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
4031 0 : if (_ptr_system_name) {
4032 0 : NDR_PULL_ALLOC(ndr, r->in.system_name);
4033 : } else {
4034 0 : r->in.system_name = NULL;
4035 : }
4036 0 : if (r->in.system_name) {
4037 0 : _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4038 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
4039 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.system_name));
4040 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
4041 : }
4042 0 : NDR_CHECK(ndr_pull_winreg_AccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
4043 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
4044 0 : NDR_ZERO_STRUCTP(r->out.handle);
4045 : }
4046 0 : if (flags & NDR_OUT) {
4047 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4048 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4049 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4050 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
4051 : }
4052 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4053 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
4054 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
4055 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4056 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4057 : }
4058 0 : return NDR_ERR_SUCCESS;
4059 : }
4060 :
4061 0 : _PUBLIC_ void ndr_print_winreg_OpenHKDD(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_OpenHKDD *r)
4062 : {
4063 0 : ndr_print_struct(ndr, name, "winreg_OpenHKDD");
4064 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4065 0 : ndr->depth++;
4066 0 : if (flags & NDR_SET_VALUES) {
4067 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4068 : }
4069 0 : if (flags & NDR_IN) {
4070 0 : ndr_print_struct(ndr, "in", "winreg_OpenHKDD");
4071 0 : ndr->depth++;
4072 0 : ndr_print_ptr(ndr, "system_name", r->in.system_name);
4073 0 : ndr->depth++;
4074 0 : if (r->in.system_name) {
4075 0 : ndr_print_uint16(ndr, "system_name", *r->in.system_name);
4076 : }
4077 0 : ndr->depth--;
4078 0 : ndr_print_winreg_AccessMask(ndr, "access_mask", r->in.access_mask);
4079 0 : ndr->depth--;
4080 : }
4081 0 : if (flags & NDR_OUT) {
4082 0 : ndr_print_struct(ndr, "out", "winreg_OpenHKDD");
4083 0 : ndr->depth++;
4084 0 : ndr_print_ptr(ndr, "handle", r->out.handle);
4085 0 : ndr->depth++;
4086 0 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
4087 0 : ndr->depth--;
4088 0 : ndr_print_WERROR(ndr, "result", r->out.result);
4089 0 : ndr->depth--;
4090 : }
4091 0 : ndr->depth--;
4092 : }
4093 :
4094 176 : _PUBLIC_ enum ndr_err_code ndr_push_winreg_QueryMultipleValues(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_QueryMultipleValues *r)
4095 : {
4096 0 : uint32_t cntr_values_in_1;
4097 0 : uint32_t cntr_values_out_1;
4098 176 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4099 176 : if (flags & NDR_IN) {
4100 88 : if (r->in.key_handle == NULL) {
4101 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4102 : }
4103 88 : if (r->in.values_in == NULL) {
4104 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4105 : }
4106 88 : if (r->in.buffer_size == NULL) {
4107 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4108 : }
4109 88 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.key_handle));
4110 88 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_values));
4111 88 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4112 88 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_values));
4113 188 : for (cntr_values_in_1 = 0; cntr_values_in_1 < (r->in.num_values); cntr_values_in_1++) {
4114 100 : NDR_CHECK(ndr_push_QueryMultipleValue(ndr, NDR_SCALARS, &r->in.values_in[cntr_values_in_1]));
4115 : }
4116 188 : for (cntr_values_in_1 = 0; cntr_values_in_1 < (r->in.num_values); cntr_values_in_1++) {
4117 100 : NDR_CHECK(ndr_push_QueryMultipleValue(ndr, NDR_BUFFERS, &r->in.values_in[cntr_values_in_1]));
4118 : }
4119 88 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_values));
4120 88 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
4121 88 : if (r->in.buffer) {
4122 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->in.buffer_size));
4123 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4124 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->in.buffer_size));
4125 16 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.buffer, *r->in.buffer_size));
4126 : }
4127 88 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.buffer_size));
4128 : }
4129 176 : if (flags & NDR_OUT) {
4130 88 : if (r->out.values_out == NULL) {
4131 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4132 : }
4133 88 : if (r->out.buffer_size == NULL) {
4134 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4135 : }
4136 88 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_values));
4137 88 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4138 88 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_values));
4139 188 : for (cntr_values_out_1 = 0; cntr_values_out_1 < (r->in.num_values); cntr_values_out_1++) {
4140 100 : NDR_CHECK(ndr_push_QueryMultipleValue(ndr, NDR_SCALARS, &r->out.values_out[cntr_values_out_1]));
4141 : }
4142 188 : for (cntr_values_out_1 = 0; cntr_values_out_1 < (r->in.num_values); cntr_values_out_1++) {
4143 100 : NDR_CHECK(ndr_push_QueryMultipleValue(ndr, NDR_BUFFERS, &r->out.values_out[cntr_values_out_1]));
4144 : }
4145 88 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.buffer));
4146 88 : if (r->out.buffer) {
4147 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.buffer_size));
4148 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4149 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.buffer_size));
4150 16 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, *r->out.buffer_size));
4151 : }
4152 88 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.buffer_size));
4153 88 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4154 : }
4155 176 : return NDR_ERR_SUCCESS;
4156 : }
4157 :
4158 182 : _PUBLIC_ enum ndr_err_code ndr_pull_winreg_QueryMultipleValues(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_QueryMultipleValues *r)
4159 : {
4160 182 : uint32_t size_values_in_1 = 0;
4161 182 : uint32_t length_values_in_1 = 0;
4162 6 : uint32_t cntr_values_in_1;
4163 182 : uint32_t size_values_out_1 = 0;
4164 182 : uint32_t length_values_out_1 = 0;
4165 6 : uint32_t cntr_values_out_1;
4166 6 : uint32_t _ptr_buffer;
4167 182 : uint32_t size_buffer_1 = 0;
4168 182 : uint32_t length_buffer_1 = 0;
4169 182 : TALLOC_CTX *_mem_save_key_handle_0 = NULL;
4170 182 : TALLOC_CTX *_mem_save_values_in_1 = NULL;
4171 182 : TALLOC_CTX *_mem_save_values_out_1 = NULL;
4172 182 : TALLOC_CTX *_mem_save_buffer_0 = NULL;
4173 182 : TALLOC_CTX *_mem_save_buffer_size_0 = NULL;
4174 182 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4175 182 : if (flags & NDR_IN) {
4176 92 : NDR_ZERO_STRUCT(r->out);
4177 :
4178 92 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4179 92 : NDR_PULL_ALLOC(ndr, r->in.key_handle);
4180 : }
4181 92 : _mem_save_key_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4182 92 : NDR_PULL_SET_MEM_CTX(ndr, r->in.key_handle, LIBNDR_FLAG_REF_ALLOC);
4183 92 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.key_handle));
4184 92 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_handle_0, LIBNDR_FLAG_REF_ALLOC);
4185 92 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.values_in));
4186 92 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.values_in));
4187 92 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.values_in, &size_values_in_1));
4188 92 : NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->in.values_in, &length_values_in_1));
4189 92 : if (length_values_in_1 > size_values_in_1) {
4190 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_values_in_1, length_values_in_1);
4191 : }
4192 92 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4193 92 : NDR_PULL_ALLOC_N(ndr, r->in.values_in, size_values_in_1);
4194 : }
4195 92 : _mem_save_values_in_1 = NDR_PULL_GET_MEM_CTX(ndr);
4196 92 : NDR_PULL_SET_MEM_CTX(ndr, r->in.values_in, 0);
4197 196 : for (cntr_values_in_1 = 0; cntr_values_in_1 < (length_values_in_1); cntr_values_in_1++) {
4198 104 : NDR_CHECK(ndr_pull_QueryMultipleValue(ndr, NDR_SCALARS, &r->in.values_in[cntr_values_in_1]));
4199 : }
4200 196 : for (cntr_values_in_1 = 0; cntr_values_in_1 < (length_values_in_1); cntr_values_in_1++) {
4201 104 : NDR_CHECK(ndr_pull_QueryMultipleValue(ndr, NDR_BUFFERS, &r->in.values_in[cntr_values_in_1]));
4202 : }
4203 92 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_values_in_1, 0);
4204 92 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_values));
4205 92 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
4206 92 : if (_ptr_buffer) {
4207 20 : NDR_PULL_ALLOC(ndr, r->in.buffer);
4208 : } else {
4209 72 : r->in.buffer = NULL;
4210 : }
4211 92 : if (r->in.buffer) {
4212 20 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
4213 20 : NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
4214 20 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.buffer));
4215 20 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.buffer));
4216 20 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.buffer, &size_buffer_1));
4217 20 : NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->in.buffer, &length_buffer_1));
4218 20 : if (length_buffer_1 > size_buffer_1) {
4219 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_buffer_1, length_buffer_1);
4220 : }
4221 20 : NDR_PULL_ALLOC_N(ndr, r->in.buffer, size_buffer_1);
4222 20 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.buffer, length_buffer_1));
4223 20 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
4224 : }
4225 92 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4226 92 : NDR_PULL_ALLOC(ndr, r->in.buffer_size);
4227 : }
4228 92 : _mem_save_buffer_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
4229 92 : NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer_size, LIBNDR_FLAG_REF_ALLOC);
4230 92 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.buffer_size));
4231 92 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_size_0, LIBNDR_FLAG_REF_ALLOC);
4232 92 : NDR_PULL_ALLOC_N(ndr, r->out.values_out, r->in.num_values);
4233 92 : memset(r->out.values_out, 0, (r->in.num_values) * sizeof(*r->out.values_out));
4234 92 : NDR_PULL_ALLOC(ndr, r->out.buffer_size);
4235 92 : *r->out.buffer_size = *r->in.buffer_size;
4236 92 : if (r->in.values_in) {
4237 92 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.values_in, r->in.num_values));
4238 : }
4239 92 : if (r->in.values_in) {
4240 92 : NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->in.values_in, r->in.num_values));
4241 : }
4242 196 : for (cntr_values_in_1 = 0; cntr_values_in_1 < (length_values_in_1); cntr_values_in_1++) {
4243 4 : }
4244 92 : if (r->in.buffer) {
4245 20 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.buffer, *r->in.buffer_size));
4246 : }
4247 92 : if (r->in.buffer) {
4248 20 : NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->in.buffer, *r->in.buffer_size));
4249 : }
4250 : }
4251 182 : if (flags & NDR_OUT) {
4252 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4253 : if (r->in.key_handle == NULL) {
4254 : NDR_PULL_ALLOC(ndr, r->in.key_handle);
4255 : NDR_ZERO_STRUCTP(r->in.key_handle);
4256 : }
4257 : if (r->in.buffer_size == NULL) {
4258 : NDR_PULL_ALLOC(ndr, r->in.buffer_size);
4259 : NDR_ZERO_STRUCTP(r->in.buffer_size);
4260 : }
4261 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4262 90 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.values_out));
4263 90 : NDR_CHECK(ndr_pull_array_length(ndr, &r->out.values_out));
4264 90 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.values_out, &size_values_out_1));
4265 90 : NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->out.values_out, &length_values_out_1));
4266 90 : if (length_values_out_1 > size_values_out_1) {
4267 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_values_out_1, length_values_out_1);
4268 : }
4269 90 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4270 2 : NDR_PULL_ALLOC_N(ndr, r->out.values_out, size_values_out_1);
4271 : }
4272 90 : _mem_save_values_out_1 = NDR_PULL_GET_MEM_CTX(ndr);
4273 90 : NDR_PULL_SET_MEM_CTX(ndr, r->out.values_out, 0);
4274 192 : for (cntr_values_out_1 = 0; cntr_values_out_1 < (length_values_out_1); cntr_values_out_1++) {
4275 102 : NDR_CHECK(ndr_pull_QueryMultipleValue(ndr, NDR_SCALARS, &r->out.values_out[cntr_values_out_1]));
4276 : }
4277 192 : for (cntr_values_out_1 = 0; cntr_values_out_1 < (length_values_out_1); cntr_values_out_1++) {
4278 102 : NDR_CHECK(ndr_pull_QueryMultipleValue(ndr, NDR_BUFFERS, &r->out.values_out[cntr_values_out_1]));
4279 : }
4280 90 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_values_out_1, 0);
4281 90 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
4282 90 : if (_ptr_buffer) {
4283 18 : NDR_PULL_ALLOC(ndr, r->out.buffer);
4284 : } else {
4285 72 : r->out.buffer = NULL;
4286 : }
4287 90 : if (r->out.buffer) {
4288 18 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
4289 18 : NDR_PULL_SET_MEM_CTX(ndr, r->out.buffer, 0);
4290 18 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
4291 18 : NDR_CHECK(ndr_pull_array_length(ndr, &r->out.buffer));
4292 18 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.buffer, &size_buffer_1));
4293 18 : NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->out.buffer, &length_buffer_1));
4294 18 : if (length_buffer_1 > size_buffer_1) {
4295 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_buffer_1, length_buffer_1);
4296 : }
4297 18 : NDR_PULL_ALLOC_N(ndr, r->out.buffer, size_buffer_1);
4298 18 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, length_buffer_1));
4299 18 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
4300 : }
4301 90 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4302 2 : NDR_PULL_ALLOC(ndr, r->out.buffer_size);
4303 : }
4304 90 : _mem_save_buffer_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
4305 90 : NDR_PULL_SET_MEM_CTX(ndr, r->out.buffer_size, LIBNDR_FLAG_REF_ALLOC);
4306 90 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.buffer_size));
4307 90 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_size_0, LIBNDR_FLAG_REF_ALLOC);
4308 90 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4309 90 : if (r->out.values_out) {
4310 90 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.values_out, r->in.num_values));
4311 : }
4312 90 : if (r->out.values_out) {
4313 90 : NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->out.values_out, r->in.num_values));
4314 : }
4315 192 : for (cntr_values_out_1 = 0; cntr_values_out_1 < (length_values_out_1); cntr_values_out_1++) {
4316 2 : }
4317 90 : if (r->out.buffer) {
4318 18 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.buffer, *r->out.buffer_size));
4319 : }
4320 90 : if (r->out.buffer) {
4321 18 : NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->out.buffer, *r->out.buffer_size));
4322 : }
4323 : }
4324 176 : return NDR_ERR_SUCCESS;
4325 : }
4326 :
4327 6 : _PUBLIC_ void ndr_print_winreg_QueryMultipleValues(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_QueryMultipleValues *r)
4328 : {
4329 6 : uint32_t cntr_values_in_1;
4330 6 : uint32_t cntr_values_out_1;
4331 6 : ndr_print_struct(ndr, name, "winreg_QueryMultipleValues");
4332 6 : if (r == NULL) { ndr_print_null(ndr); return; }
4333 6 : ndr->depth++;
4334 6 : if (flags & NDR_SET_VALUES) {
4335 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4336 : }
4337 6 : if (flags & NDR_IN) {
4338 4 : ndr_print_struct(ndr, "in", "winreg_QueryMultipleValues");
4339 4 : ndr->depth++;
4340 4 : ndr_print_ptr(ndr, "key_handle", r->in.key_handle);
4341 4 : ndr->depth++;
4342 4 : ndr_print_policy_handle(ndr, "key_handle", r->in.key_handle);
4343 4 : ndr->depth--;
4344 4 : ndr_print_ptr(ndr, "values_in", r->in.values_in);
4345 4 : ndr->depth++;
4346 4 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "values_in", (uint32_t)(r->in.num_values));
4347 4 : ndr->depth++;
4348 8 : for (cntr_values_in_1 = 0; cntr_values_in_1 < (r->in.num_values); cntr_values_in_1++) {
4349 4 : ndr_print_QueryMultipleValue(ndr, "values_in", &r->in.values_in[cntr_values_in_1]);
4350 : }
4351 4 : ndr->depth--;
4352 4 : ndr->depth--;
4353 4 : ndr_print_uint32(ndr, "num_values", r->in.num_values);
4354 4 : ndr_print_ptr(ndr, "buffer", r->in.buffer);
4355 4 : ndr->depth++;
4356 4 : if (r->in.buffer) {
4357 4 : ndr_print_array_uint8(ndr, "buffer", r->in.buffer, *r->in.buffer_size);
4358 : }
4359 4 : ndr->depth--;
4360 4 : ndr_print_ptr(ndr, "buffer_size", r->in.buffer_size);
4361 4 : ndr->depth++;
4362 4 : ndr_print_uint32(ndr, "buffer_size", *r->in.buffer_size);
4363 4 : ndr->depth--;
4364 4 : ndr->depth--;
4365 : }
4366 6 : if (flags & NDR_OUT) {
4367 2 : ndr_print_struct(ndr, "out", "winreg_QueryMultipleValues");
4368 2 : ndr->depth++;
4369 2 : ndr_print_ptr(ndr, "values_out", r->out.values_out);
4370 2 : ndr->depth++;
4371 2 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "values_out", (uint32_t)(r->in.num_values));
4372 2 : ndr->depth++;
4373 4 : for (cntr_values_out_1 = 0; cntr_values_out_1 < (r->in.num_values); cntr_values_out_1++) {
4374 2 : ndr_print_QueryMultipleValue(ndr, "values_out", &r->out.values_out[cntr_values_out_1]);
4375 : }
4376 2 : ndr->depth--;
4377 2 : ndr->depth--;
4378 2 : ndr_print_ptr(ndr, "buffer", r->out.buffer);
4379 2 : ndr->depth++;
4380 2 : if (r->out.buffer) {
4381 2 : ndr_print_array_uint8(ndr, "buffer", r->out.buffer, *r->out.buffer_size);
4382 : }
4383 2 : ndr->depth--;
4384 2 : ndr_print_ptr(ndr, "buffer_size", r->out.buffer_size);
4385 2 : ndr->depth++;
4386 2 : ndr_print_uint32(ndr, "buffer_size", *r->out.buffer_size);
4387 2 : ndr->depth--;
4388 2 : ndr_print_WERROR(ndr, "result", r->out.result);
4389 2 : ndr->depth--;
4390 : }
4391 6 : ndr->depth--;
4392 : }
4393 :
4394 0 : static enum ndr_err_code ndr_push_winreg_InitiateSystemShutdownEx(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_InitiateSystemShutdownEx *r)
4395 : {
4396 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4397 0 : if (flags & NDR_IN) {
4398 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.hostname));
4399 0 : if (r->in.hostname) {
4400 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.hostname));
4401 : }
4402 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.message));
4403 0 : if (r->in.message) {
4404 0 : NDR_CHECK(ndr_push_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
4405 : }
4406 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.timeout));
4407 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.force_apps));
4408 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.do_reboot));
4409 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reason));
4410 : }
4411 0 : if (flags & NDR_OUT) {
4412 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4413 : }
4414 0 : return NDR_ERR_SUCCESS;
4415 : }
4416 :
4417 0 : static enum ndr_err_code ndr_pull_winreg_InitiateSystemShutdownEx(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_InitiateSystemShutdownEx *r)
4418 : {
4419 0 : uint32_t _ptr_hostname;
4420 0 : uint32_t _ptr_message;
4421 0 : TALLOC_CTX *_mem_save_hostname_0 = NULL;
4422 0 : TALLOC_CTX *_mem_save_message_0 = NULL;
4423 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4424 0 : if (flags & NDR_IN) {
4425 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hostname));
4426 0 : if (_ptr_hostname) {
4427 0 : NDR_PULL_ALLOC(ndr, r->in.hostname);
4428 : } else {
4429 0 : r->in.hostname = NULL;
4430 : }
4431 0 : if (r->in.hostname) {
4432 0 : _mem_save_hostname_0 = NDR_PULL_GET_MEM_CTX(ndr);
4433 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.hostname, 0);
4434 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.hostname));
4435 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hostname_0, 0);
4436 : }
4437 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_message));
4438 0 : if (_ptr_message) {
4439 0 : NDR_PULL_ALLOC(ndr, r->in.message);
4440 : } else {
4441 0 : r->in.message = NULL;
4442 : }
4443 0 : if (r->in.message) {
4444 0 : _mem_save_message_0 = NDR_PULL_GET_MEM_CTX(ndr);
4445 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.message, 0);
4446 0 : NDR_CHECK(ndr_pull_lsa_StringLarge(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.message));
4447 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_message_0, 0);
4448 : }
4449 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.timeout));
4450 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.force_apps));
4451 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.do_reboot));
4452 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reason));
4453 : }
4454 0 : if (flags & NDR_OUT) {
4455 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4456 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4457 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4458 : }
4459 0 : return NDR_ERR_SUCCESS;
4460 : }
4461 :
4462 0 : _PUBLIC_ void ndr_print_winreg_InitiateSystemShutdownEx(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_InitiateSystemShutdownEx *r)
4463 : {
4464 0 : ndr_print_struct(ndr, name, "winreg_InitiateSystemShutdownEx");
4465 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4466 0 : ndr->depth++;
4467 0 : if (flags & NDR_SET_VALUES) {
4468 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4469 : }
4470 0 : if (flags & NDR_IN) {
4471 0 : ndr_print_struct(ndr, "in", "winreg_InitiateSystemShutdownEx");
4472 0 : ndr->depth++;
4473 0 : ndr_print_ptr(ndr, "hostname", r->in.hostname);
4474 0 : ndr->depth++;
4475 0 : if (r->in.hostname) {
4476 0 : ndr_print_uint16(ndr, "hostname", *r->in.hostname);
4477 : }
4478 0 : ndr->depth--;
4479 0 : ndr_print_ptr(ndr, "message", r->in.message);
4480 0 : ndr->depth++;
4481 0 : if (r->in.message) {
4482 0 : ndr_print_lsa_StringLarge(ndr, "message", r->in.message);
4483 : }
4484 0 : ndr->depth--;
4485 0 : ndr_print_uint32(ndr, "timeout", r->in.timeout);
4486 0 : ndr_print_uint8(ndr, "force_apps", r->in.force_apps);
4487 0 : ndr_print_uint8(ndr, "do_reboot", r->in.do_reboot);
4488 0 : ndr_print_uint32(ndr, "reason", r->in.reason);
4489 0 : ndr->depth--;
4490 : }
4491 0 : if (flags & NDR_OUT) {
4492 0 : ndr_print_struct(ndr, "out", "winreg_InitiateSystemShutdownEx");
4493 0 : ndr->depth++;
4494 0 : ndr_print_WERROR(ndr, "result", r->out.result);
4495 0 : ndr->depth--;
4496 : }
4497 0 : ndr->depth--;
4498 : }
4499 :
4500 0 : static enum ndr_err_code ndr_push_winreg_SaveKeyEx(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_SaveKeyEx *r)
4501 : {
4502 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4503 0 : if (flags & NDR_IN) {
4504 0 : if (r->in.handle == NULL) {
4505 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4506 : }
4507 0 : if (r->in.filename == NULL) {
4508 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4509 : }
4510 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4511 0 : NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.filename));
4512 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sec_attrib));
4513 0 : if (r->in.sec_attrib) {
4514 0 : NDR_CHECK(ndr_push_KeySecurityAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sec_attrib));
4515 : }
4516 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4517 : }
4518 0 : if (flags & NDR_OUT) {
4519 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4520 : }
4521 0 : return NDR_ERR_SUCCESS;
4522 : }
4523 :
4524 0 : static enum ndr_err_code ndr_pull_winreg_SaveKeyEx(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_SaveKeyEx *r)
4525 : {
4526 0 : uint32_t _ptr_sec_attrib;
4527 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
4528 0 : TALLOC_CTX *_mem_save_filename_0 = NULL;
4529 0 : TALLOC_CTX *_mem_save_sec_attrib_0 = NULL;
4530 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4531 0 : if (flags & NDR_IN) {
4532 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4533 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
4534 : }
4535 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4536 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
4537 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4538 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4539 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4540 0 : NDR_PULL_ALLOC(ndr, r->in.filename);
4541 : }
4542 0 : _mem_save_filename_0 = NDR_PULL_GET_MEM_CTX(ndr);
4543 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.filename, LIBNDR_FLAG_REF_ALLOC);
4544 0 : NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.filename));
4545 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_filename_0, LIBNDR_FLAG_REF_ALLOC);
4546 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sec_attrib));
4547 0 : if (_ptr_sec_attrib) {
4548 0 : NDR_PULL_ALLOC(ndr, r->in.sec_attrib);
4549 : } else {
4550 0 : r->in.sec_attrib = NULL;
4551 : }
4552 0 : if (r->in.sec_attrib) {
4553 0 : _mem_save_sec_attrib_0 = NDR_PULL_GET_MEM_CTX(ndr);
4554 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.sec_attrib, 0);
4555 0 : NDR_CHECK(ndr_pull_KeySecurityAttribute(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sec_attrib));
4556 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sec_attrib_0, 0);
4557 : }
4558 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4559 : }
4560 0 : if (flags & NDR_OUT) {
4561 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4562 : if (r->in.handle == NULL) {
4563 : NDR_PULL_ALLOC(ndr, r->in.handle);
4564 : NDR_ZERO_STRUCTP(r->in.handle);
4565 : }
4566 : if (r->in.filename == NULL) {
4567 : NDR_PULL_ALLOC(ndr, r->in.filename);
4568 : NDR_ZERO_STRUCTP(r->in.filename);
4569 : }
4570 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4571 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4572 : }
4573 0 : return NDR_ERR_SUCCESS;
4574 : }
4575 :
4576 0 : _PUBLIC_ void ndr_print_winreg_SaveKeyEx(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_SaveKeyEx *r)
4577 : {
4578 0 : ndr_print_struct(ndr, name, "winreg_SaveKeyEx");
4579 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4580 0 : ndr->depth++;
4581 0 : if (flags & NDR_SET_VALUES) {
4582 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4583 : }
4584 0 : if (flags & NDR_IN) {
4585 0 : ndr_print_struct(ndr, "in", "winreg_SaveKeyEx");
4586 0 : ndr->depth++;
4587 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
4588 0 : ndr->depth++;
4589 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
4590 0 : ndr->depth--;
4591 0 : ndr_print_ptr(ndr, "filename", r->in.filename);
4592 0 : ndr->depth++;
4593 0 : ndr_print_winreg_String(ndr, "filename", r->in.filename);
4594 0 : ndr->depth--;
4595 0 : ndr_print_ptr(ndr, "sec_attrib", r->in.sec_attrib);
4596 0 : ndr->depth++;
4597 0 : if (r->in.sec_attrib) {
4598 0 : ndr_print_KeySecurityAttribute(ndr, "sec_attrib", r->in.sec_attrib);
4599 : }
4600 0 : ndr->depth--;
4601 0 : ndr_print_uint32(ndr, "flags", r->in.flags);
4602 0 : ndr->depth--;
4603 : }
4604 0 : if (flags & NDR_OUT) {
4605 0 : ndr_print_struct(ndr, "out", "winreg_SaveKeyEx");
4606 0 : ndr->depth++;
4607 0 : ndr_print_WERROR(ndr, "result", r->out.result);
4608 0 : ndr->depth--;
4609 : }
4610 0 : ndr->depth--;
4611 : }
4612 :
4613 0 : static enum ndr_err_code ndr_push_winreg_OpenHKPT(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_OpenHKPT *r)
4614 : {
4615 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4616 0 : if (flags & NDR_IN) {
4617 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
4618 0 : if (r->in.system_name) {
4619 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.system_name));
4620 : }
4621 0 : NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
4622 : }
4623 0 : if (flags & NDR_OUT) {
4624 0 : if (r->out.handle == NULL) {
4625 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4626 : }
4627 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
4628 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4629 : }
4630 0 : return NDR_ERR_SUCCESS;
4631 : }
4632 :
4633 0 : static enum ndr_err_code ndr_pull_winreg_OpenHKPT(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_OpenHKPT *r)
4634 : {
4635 0 : uint32_t _ptr_system_name;
4636 0 : TALLOC_CTX *_mem_save_system_name_0 = NULL;
4637 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
4638 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4639 0 : if (flags & NDR_IN) {
4640 0 : NDR_ZERO_STRUCT(r->out);
4641 :
4642 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
4643 0 : if (_ptr_system_name) {
4644 0 : NDR_PULL_ALLOC(ndr, r->in.system_name);
4645 : } else {
4646 0 : r->in.system_name = NULL;
4647 : }
4648 0 : if (r->in.system_name) {
4649 0 : _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4650 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
4651 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.system_name));
4652 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
4653 : }
4654 0 : NDR_CHECK(ndr_pull_winreg_AccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
4655 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
4656 0 : NDR_ZERO_STRUCTP(r->out.handle);
4657 : }
4658 0 : if (flags & NDR_OUT) {
4659 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4660 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4661 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4662 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
4663 : }
4664 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4665 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
4666 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
4667 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4668 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4669 : }
4670 0 : return NDR_ERR_SUCCESS;
4671 : }
4672 :
4673 0 : _PUBLIC_ void ndr_print_winreg_OpenHKPT(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_OpenHKPT *r)
4674 : {
4675 0 : ndr_print_struct(ndr, name, "winreg_OpenHKPT");
4676 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4677 0 : ndr->depth++;
4678 0 : if (flags & NDR_SET_VALUES) {
4679 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4680 : }
4681 0 : if (flags & NDR_IN) {
4682 0 : ndr_print_struct(ndr, "in", "winreg_OpenHKPT");
4683 0 : ndr->depth++;
4684 0 : ndr_print_ptr(ndr, "system_name", r->in.system_name);
4685 0 : ndr->depth++;
4686 0 : if (r->in.system_name) {
4687 0 : ndr_print_uint16(ndr, "system_name", *r->in.system_name);
4688 : }
4689 0 : ndr->depth--;
4690 0 : ndr_print_winreg_AccessMask(ndr, "access_mask", r->in.access_mask);
4691 0 : ndr->depth--;
4692 : }
4693 0 : if (flags & NDR_OUT) {
4694 0 : ndr_print_struct(ndr, "out", "winreg_OpenHKPT");
4695 0 : ndr->depth++;
4696 0 : ndr_print_ptr(ndr, "handle", r->out.handle);
4697 0 : ndr->depth++;
4698 0 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
4699 0 : ndr->depth--;
4700 0 : ndr_print_WERROR(ndr, "result", r->out.result);
4701 0 : ndr->depth--;
4702 : }
4703 0 : ndr->depth--;
4704 : }
4705 :
4706 0 : static enum ndr_err_code ndr_push_winreg_OpenHKPN(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_OpenHKPN *r)
4707 : {
4708 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4709 0 : if (flags & NDR_IN) {
4710 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.system_name));
4711 0 : if (r->in.system_name) {
4712 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.system_name));
4713 : }
4714 0 : NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
4715 : }
4716 0 : if (flags & NDR_OUT) {
4717 0 : if (r->out.handle == NULL) {
4718 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4719 : }
4720 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
4721 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4722 : }
4723 0 : return NDR_ERR_SUCCESS;
4724 : }
4725 :
4726 0 : static enum ndr_err_code ndr_pull_winreg_OpenHKPN(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_OpenHKPN *r)
4727 : {
4728 0 : uint32_t _ptr_system_name;
4729 0 : TALLOC_CTX *_mem_save_system_name_0 = NULL;
4730 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
4731 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4732 0 : if (flags & NDR_IN) {
4733 0 : NDR_ZERO_STRUCT(r->out);
4734 :
4735 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_system_name));
4736 0 : if (_ptr_system_name) {
4737 0 : NDR_PULL_ALLOC(ndr, r->in.system_name);
4738 : } else {
4739 0 : r->in.system_name = NULL;
4740 : }
4741 0 : if (r->in.system_name) {
4742 0 : _mem_save_system_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4743 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.system_name, 0);
4744 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.system_name));
4745 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_system_name_0, 0);
4746 : }
4747 0 : NDR_CHECK(ndr_pull_winreg_AccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
4748 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
4749 0 : NDR_ZERO_STRUCTP(r->out.handle);
4750 : }
4751 0 : if (flags & NDR_OUT) {
4752 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4753 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4754 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4755 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
4756 : }
4757 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4758 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
4759 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
4760 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4761 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4762 : }
4763 0 : return NDR_ERR_SUCCESS;
4764 : }
4765 :
4766 0 : _PUBLIC_ void ndr_print_winreg_OpenHKPN(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_OpenHKPN *r)
4767 : {
4768 0 : ndr_print_struct(ndr, name, "winreg_OpenHKPN");
4769 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4770 0 : ndr->depth++;
4771 0 : if (flags & NDR_SET_VALUES) {
4772 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4773 : }
4774 0 : if (flags & NDR_IN) {
4775 0 : ndr_print_struct(ndr, "in", "winreg_OpenHKPN");
4776 0 : ndr->depth++;
4777 0 : ndr_print_ptr(ndr, "system_name", r->in.system_name);
4778 0 : ndr->depth++;
4779 0 : if (r->in.system_name) {
4780 0 : ndr_print_uint16(ndr, "system_name", *r->in.system_name);
4781 : }
4782 0 : ndr->depth--;
4783 0 : ndr_print_winreg_AccessMask(ndr, "access_mask", r->in.access_mask);
4784 0 : ndr->depth--;
4785 : }
4786 0 : if (flags & NDR_OUT) {
4787 0 : ndr_print_struct(ndr, "out", "winreg_OpenHKPN");
4788 0 : ndr->depth++;
4789 0 : ndr_print_ptr(ndr, "handle", r->out.handle);
4790 0 : ndr->depth++;
4791 0 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
4792 0 : ndr->depth--;
4793 0 : ndr_print_WERROR(ndr, "result", r->out.result);
4794 0 : ndr->depth--;
4795 : }
4796 0 : ndr->depth--;
4797 : }
4798 :
4799 176 : _PUBLIC_ enum ndr_err_code ndr_push_winreg_QueryMultipleValues2(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_QueryMultipleValues2 *r)
4800 : {
4801 0 : uint32_t cntr_values_in_1;
4802 0 : uint32_t cntr_values_out_1;
4803 176 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4804 176 : if (flags & NDR_IN) {
4805 88 : if (r->in.key_handle == NULL) {
4806 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4807 : }
4808 88 : if (r->in.values_in == NULL) {
4809 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4810 : }
4811 88 : if (r->in.offered == NULL) {
4812 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4813 : }
4814 88 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.key_handle));
4815 88 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_values));
4816 88 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4817 88 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_values));
4818 188 : for (cntr_values_in_1 = 0; cntr_values_in_1 < (r->in.num_values); cntr_values_in_1++) {
4819 100 : NDR_CHECK(ndr_push_QueryMultipleValue(ndr, NDR_SCALARS, &r->in.values_in[cntr_values_in_1]));
4820 : }
4821 188 : for (cntr_values_in_1 = 0; cntr_values_in_1 < (r->in.num_values); cntr_values_in_1++) {
4822 100 : NDR_CHECK(ndr_push_QueryMultipleValue(ndr, NDR_BUFFERS, &r->in.values_in[cntr_values_in_1]));
4823 : }
4824 88 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_values));
4825 88 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.buffer));
4826 88 : if (r->in.buffer) {
4827 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->in.offered));
4828 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4829 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->in.offered));
4830 16 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.buffer, *r->in.offered));
4831 : }
4832 88 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.offered));
4833 : }
4834 176 : if (flags & NDR_OUT) {
4835 88 : if (r->out.values_out == NULL) {
4836 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4837 : }
4838 88 : if (r->out.needed == NULL) {
4839 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4840 : }
4841 88 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_values));
4842 88 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4843 88 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_values));
4844 188 : for (cntr_values_out_1 = 0; cntr_values_out_1 < (r->in.num_values); cntr_values_out_1++) {
4845 100 : NDR_CHECK(ndr_push_QueryMultipleValue(ndr, NDR_SCALARS, &r->out.values_out[cntr_values_out_1]));
4846 : }
4847 188 : for (cntr_values_out_1 = 0; cntr_values_out_1 < (r->in.num_values); cntr_values_out_1++) {
4848 100 : NDR_CHECK(ndr_push_QueryMultipleValue(ndr, NDR_BUFFERS, &r->out.values_out[cntr_values_out_1]));
4849 : }
4850 88 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.buffer));
4851 88 : if (r->out.buffer) {
4852 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->in.offered));
4853 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4854 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->in.offered));
4855 16 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, *r->in.offered));
4856 : }
4857 88 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
4858 88 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4859 : }
4860 176 : return NDR_ERR_SUCCESS;
4861 : }
4862 :
4863 182 : _PUBLIC_ enum ndr_err_code ndr_pull_winreg_QueryMultipleValues2(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_QueryMultipleValues2 *r)
4864 : {
4865 182 : uint32_t size_values_in_1 = 0;
4866 182 : uint32_t length_values_in_1 = 0;
4867 6 : uint32_t cntr_values_in_1;
4868 182 : uint32_t size_values_out_1 = 0;
4869 182 : uint32_t length_values_out_1 = 0;
4870 6 : uint32_t cntr_values_out_1;
4871 6 : uint32_t _ptr_buffer;
4872 182 : uint32_t size_buffer_1 = 0;
4873 182 : uint32_t length_buffer_1 = 0;
4874 182 : TALLOC_CTX *_mem_save_key_handle_0 = NULL;
4875 182 : TALLOC_CTX *_mem_save_values_in_1 = NULL;
4876 182 : TALLOC_CTX *_mem_save_values_out_1 = NULL;
4877 182 : TALLOC_CTX *_mem_save_buffer_0 = NULL;
4878 182 : TALLOC_CTX *_mem_save_offered_0 = NULL;
4879 182 : TALLOC_CTX *_mem_save_needed_0 = NULL;
4880 182 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4881 182 : if (flags & NDR_IN) {
4882 92 : NDR_ZERO_STRUCT(r->out);
4883 :
4884 92 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4885 92 : NDR_PULL_ALLOC(ndr, r->in.key_handle);
4886 : }
4887 92 : _mem_save_key_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4888 92 : NDR_PULL_SET_MEM_CTX(ndr, r->in.key_handle, LIBNDR_FLAG_REF_ALLOC);
4889 92 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.key_handle));
4890 92 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_handle_0, LIBNDR_FLAG_REF_ALLOC);
4891 92 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.values_in));
4892 92 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.values_in));
4893 92 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.values_in, &size_values_in_1));
4894 92 : NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->in.values_in, &length_values_in_1));
4895 92 : if (length_values_in_1 > size_values_in_1) {
4896 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_values_in_1, length_values_in_1);
4897 : }
4898 92 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4899 92 : NDR_PULL_ALLOC_N(ndr, r->in.values_in, size_values_in_1);
4900 : }
4901 92 : _mem_save_values_in_1 = NDR_PULL_GET_MEM_CTX(ndr);
4902 92 : NDR_PULL_SET_MEM_CTX(ndr, r->in.values_in, 0);
4903 196 : for (cntr_values_in_1 = 0; cntr_values_in_1 < (length_values_in_1); cntr_values_in_1++) {
4904 104 : NDR_CHECK(ndr_pull_QueryMultipleValue(ndr, NDR_SCALARS, &r->in.values_in[cntr_values_in_1]));
4905 : }
4906 196 : for (cntr_values_in_1 = 0; cntr_values_in_1 < (length_values_in_1); cntr_values_in_1++) {
4907 104 : NDR_CHECK(ndr_pull_QueryMultipleValue(ndr, NDR_BUFFERS, &r->in.values_in[cntr_values_in_1]));
4908 : }
4909 92 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_values_in_1, 0);
4910 92 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.num_values));
4911 92 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
4912 92 : if (_ptr_buffer) {
4913 16 : NDR_PULL_ALLOC(ndr, r->in.buffer);
4914 : } else {
4915 76 : r->in.buffer = NULL;
4916 : }
4917 92 : if (r->in.buffer) {
4918 16 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
4919 16 : NDR_PULL_SET_MEM_CTX(ndr, r->in.buffer, 0);
4920 16 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.buffer));
4921 16 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.buffer));
4922 16 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.buffer, &size_buffer_1));
4923 16 : NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->in.buffer, &length_buffer_1));
4924 16 : if (length_buffer_1 > size_buffer_1) {
4925 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_buffer_1, length_buffer_1);
4926 : }
4927 16 : NDR_PULL_ALLOC_N(ndr, r->in.buffer, size_buffer_1);
4928 16 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.buffer, length_buffer_1));
4929 16 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
4930 : }
4931 92 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4932 92 : NDR_PULL_ALLOC(ndr, r->in.offered);
4933 : }
4934 92 : _mem_save_offered_0 = NDR_PULL_GET_MEM_CTX(ndr);
4935 92 : NDR_PULL_SET_MEM_CTX(ndr, r->in.offered, LIBNDR_FLAG_REF_ALLOC);
4936 92 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.offered));
4937 92 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_offered_0, LIBNDR_FLAG_REF_ALLOC);
4938 92 : NDR_PULL_ALLOC_N(ndr, r->out.values_out, r->in.num_values);
4939 92 : memset(r->out.values_out, 0, (r->in.num_values) * sizeof(*r->out.values_out));
4940 92 : NDR_PULL_ALLOC(ndr, r->out.needed);
4941 92 : NDR_ZERO_STRUCTP(r->out.needed);
4942 92 : if (r->in.values_in) {
4943 92 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.values_in, r->in.num_values));
4944 : }
4945 92 : if (r->in.values_in) {
4946 92 : NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->in.values_in, r->in.num_values));
4947 : }
4948 196 : for (cntr_values_in_1 = 0; cntr_values_in_1 < (length_values_in_1); cntr_values_in_1++) {
4949 4 : }
4950 92 : if (r->in.buffer) {
4951 16 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.buffer, *r->in.offered));
4952 : }
4953 92 : if (r->in.buffer) {
4954 16 : NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->in.buffer, *r->in.offered));
4955 : }
4956 : }
4957 182 : if (flags & NDR_OUT) {
4958 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4959 : if (r->in.key_handle == NULL) {
4960 : NDR_PULL_ALLOC(ndr, r->in.key_handle);
4961 : NDR_ZERO_STRUCTP(r->in.key_handle);
4962 : }
4963 : if (r->in.offered == NULL) {
4964 : NDR_PULL_ALLOC(ndr, r->in.offered);
4965 : NDR_ZERO_STRUCTP(r->in.offered);
4966 : }
4967 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4968 90 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.values_out));
4969 90 : NDR_CHECK(ndr_pull_array_length(ndr, &r->out.values_out));
4970 90 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.values_out, &size_values_out_1));
4971 90 : NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->out.values_out, &length_values_out_1));
4972 90 : if (length_values_out_1 > size_values_out_1) {
4973 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_values_out_1, length_values_out_1);
4974 : }
4975 90 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4976 2 : NDR_PULL_ALLOC_N(ndr, r->out.values_out, size_values_out_1);
4977 : }
4978 90 : _mem_save_values_out_1 = NDR_PULL_GET_MEM_CTX(ndr);
4979 90 : NDR_PULL_SET_MEM_CTX(ndr, r->out.values_out, 0);
4980 192 : for (cntr_values_out_1 = 0; cntr_values_out_1 < (length_values_out_1); cntr_values_out_1++) {
4981 102 : NDR_CHECK(ndr_pull_QueryMultipleValue(ndr, NDR_SCALARS, &r->out.values_out[cntr_values_out_1]));
4982 : }
4983 192 : for (cntr_values_out_1 = 0; cntr_values_out_1 < (length_values_out_1); cntr_values_out_1++) {
4984 102 : NDR_CHECK(ndr_pull_QueryMultipleValue(ndr, NDR_BUFFERS, &r->out.values_out[cntr_values_out_1]));
4985 : }
4986 90 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_values_out_1, 0);
4987 90 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_buffer));
4988 90 : if (_ptr_buffer) {
4989 16 : NDR_PULL_ALLOC(ndr, r->out.buffer);
4990 : } else {
4991 74 : r->out.buffer = NULL;
4992 : }
4993 90 : if (r->out.buffer) {
4994 16 : _mem_save_buffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
4995 16 : NDR_PULL_SET_MEM_CTX(ndr, r->out.buffer, 0);
4996 16 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
4997 16 : NDR_CHECK(ndr_pull_array_length(ndr, &r->out.buffer));
4998 16 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.buffer, &size_buffer_1));
4999 16 : NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->out.buffer, &length_buffer_1));
5000 16 : if (length_buffer_1 > size_buffer_1) {
5001 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_buffer_1, length_buffer_1);
5002 : }
5003 16 : NDR_PULL_ALLOC_N(ndr, r->out.buffer, size_buffer_1);
5004 16 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, length_buffer_1));
5005 16 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_buffer_0, 0);
5006 : }
5007 90 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5008 2 : NDR_PULL_ALLOC(ndr, r->out.needed);
5009 : }
5010 90 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
5011 90 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
5012 90 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
5013 90 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
5014 90 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5015 90 : if (r->out.values_out) {
5016 90 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.values_out, r->in.num_values));
5017 : }
5018 90 : if (r->out.values_out) {
5019 90 : NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->out.values_out, r->in.num_values));
5020 : }
5021 192 : for (cntr_values_out_1 = 0; cntr_values_out_1 < (length_values_out_1); cntr_values_out_1++) {
5022 2 : }
5023 90 : if (r->out.buffer) {
5024 16 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.buffer, *r->in.offered));
5025 : }
5026 90 : if (r->out.buffer) {
5027 16 : NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->out.buffer, *r->in.offered));
5028 : }
5029 : }
5030 176 : return NDR_ERR_SUCCESS;
5031 : }
5032 :
5033 6 : _PUBLIC_ void ndr_print_winreg_QueryMultipleValues2(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_QueryMultipleValues2 *r)
5034 : {
5035 6 : uint32_t cntr_values_in_1;
5036 6 : uint32_t cntr_values_out_1;
5037 6 : ndr_print_struct(ndr, name, "winreg_QueryMultipleValues2");
5038 6 : if (r == NULL) { ndr_print_null(ndr); return; }
5039 6 : ndr->depth++;
5040 6 : if (flags & NDR_SET_VALUES) {
5041 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5042 : }
5043 6 : if (flags & NDR_IN) {
5044 4 : ndr_print_struct(ndr, "in", "winreg_QueryMultipleValues2");
5045 4 : ndr->depth++;
5046 4 : ndr_print_ptr(ndr, "key_handle", r->in.key_handle);
5047 4 : ndr->depth++;
5048 4 : ndr_print_policy_handle(ndr, "key_handle", r->in.key_handle);
5049 4 : ndr->depth--;
5050 4 : ndr_print_ptr(ndr, "values_in", r->in.values_in);
5051 4 : ndr->depth++;
5052 4 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "values_in", (uint32_t)(r->in.num_values));
5053 4 : ndr->depth++;
5054 8 : for (cntr_values_in_1 = 0; cntr_values_in_1 < (r->in.num_values); cntr_values_in_1++) {
5055 4 : ndr_print_QueryMultipleValue(ndr, "values_in", &r->in.values_in[cntr_values_in_1]);
5056 : }
5057 4 : ndr->depth--;
5058 4 : ndr->depth--;
5059 4 : ndr_print_uint32(ndr, "num_values", r->in.num_values);
5060 4 : ndr_print_ptr(ndr, "buffer", r->in.buffer);
5061 4 : ndr->depth++;
5062 4 : if (r->in.buffer) {
5063 0 : ndr_print_array_uint8(ndr, "buffer", r->in.buffer, *r->in.offered);
5064 : }
5065 4 : ndr->depth--;
5066 4 : ndr_print_ptr(ndr, "offered", r->in.offered);
5067 4 : ndr->depth++;
5068 4 : ndr_print_uint32(ndr, "offered", *r->in.offered);
5069 4 : ndr->depth--;
5070 4 : ndr->depth--;
5071 : }
5072 6 : if (flags & NDR_OUT) {
5073 2 : ndr_print_struct(ndr, "out", "winreg_QueryMultipleValues2");
5074 2 : ndr->depth++;
5075 2 : ndr_print_ptr(ndr, "values_out", r->out.values_out);
5076 2 : ndr->depth++;
5077 2 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "values_out", (uint32_t)(r->in.num_values));
5078 2 : ndr->depth++;
5079 4 : for (cntr_values_out_1 = 0; cntr_values_out_1 < (r->in.num_values); cntr_values_out_1++) {
5080 2 : ndr_print_QueryMultipleValue(ndr, "values_out", &r->out.values_out[cntr_values_out_1]);
5081 : }
5082 2 : ndr->depth--;
5083 2 : ndr->depth--;
5084 2 : ndr_print_ptr(ndr, "buffer", r->out.buffer);
5085 2 : ndr->depth++;
5086 2 : if (r->out.buffer) {
5087 0 : ndr_print_array_uint8(ndr, "buffer", r->out.buffer, *r->in.offered);
5088 : }
5089 2 : ndr->depth--;
5090 2 : ndr_print_ptr(ndr, "needed", r->out.needed);
5091 2 : ndr->depth++;
5092 2 : ndr_print_uint32(ndr, "needed", *r->out.needed);
5093 2 : ndr->depth--;
5094 2 : ndr_print_WERROR(ndr, "result", r->out.result);
5095 2 : ndr->depth--;
5096 : }
5097 6 : ndr->depth--;
5098 : }
5099 :
5100 0 : static enum ndr_err_code ndr_push_winreg_DeleteKeyEx(struct ndr_push *ndr, ndr_flags_type flags, const struct winreg_DeleteKeyEx *r)
5101 : {
5102 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
5103 0 : if (flags & NDR_IN) {
5104 0 : if (r->in.handle == NULL) {
5105 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5106 : }
5107 0 : if (r->in.key == NULL) {
5108 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5109 : }
5110 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5111 0 : NDR_CHECK(ndr_push_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.key));
5112 0 : NDR_CHECK(ndr_push_winreg_AccessMask(ndr, NDR_SCALARS, r->in.access_mask));
5113 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reserved));
5114 : }
5115 0 : if (flags & NDR_OUT) {
5116 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5117 : }
5118 0 : return NDR_ERR_SUCCESS;
5119 : }
5120 :
5121 0 : static enum ndr_err_code ndr_pull_winreg_DeleteKeyEx(struct ndr_pull *ndr, ndr_flags_type flags, struct winreg_DeleteKeyEx *r)
5122 : {
5123 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
5124 0 : TALLOC_CTX *_mem_save_key_0 = NULL;
5125 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
5126 0 : if (flags & NDR_IN) {
5127 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5128 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
5129 : }
5130 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5131 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5132 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5133 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5134 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5135 0 : NDR_PULL_ALLOC(ndr, r->in.key);
5136 : }
5137 0 : _mem_save_key_0 = NDR_PULL_GET_MEM_CTX(ndr);
5138 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.key, LIBNDR_FLAG_REF_ALLOC);
5139 0 : NDR_CHECK(ndr_pull_winreg_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.key));
5140 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_0, LIBNDR_FLAG_REF_ALLOC);
5141 0 : NDR_CHECK(ndr_pull_winreg_AccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
5142 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reserved));
5143 : }
5144 0 : if (flags & NDR_OUT) {
5145 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
5146 : if (r->in.handle == NULL) {
5147 : NDR_PULL_ALLOC(ndr, r->in.handle);
5148 : NDR_ZERO_STRUCTP(r->in.handle);
5149 : }
5150 : if (r->in.key == NULL) {
5151 : NDR_PULL_ALLOC(ndr, r->in.key);
5152 : NDR_ZERO_STRUCTP(r->in.key);
5153 : }
5154 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
5155 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5156 : }
5157 0 : return NDR_ERR_SUCCESS;
5158 : }
5159 :
5160 0 : _PUBLIC_ void ndr_print_winreg_DeleteKeyEx(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct winreg_DeleteKeyEx *r)
5161 : {
5162 0 : ndr_print_struct(ndr, name, "winreg_DeleteKeyEx");
5163 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5164 0 : ndr->depth++;
5165 0 : if (flags & NDR_SET_VALUES) {
5166 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5167 : }
5168 0 : if (flags & NDR_IN) {
5169 0 : ndr_print_struct(ndr, "in", "winreg_DeleteKeyEx");
5170 0 : ndr->depth++;
5171 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
5172 0 : ndr->depth++;
5173 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
5174 0 : ndr->depth--;
5175 0 : ndr_print_ptr(ndr, "key", r->in.key);
5176 0 : ndr->depth++;
5177 0 : ndr_print_winreg_String(ndr, "key", r->in.key);
5178 0 : ndr->depth--;
5179 0 : ndr_print_winreg_AccessMask(ndr, "access_mask", r->in.access_mask);
5180 0 : ndr_print_uint32(ndr, "reserved", r->in.reserved);
5181 0 : ndr->depth--;
5182 : }
5183 0 : if (flags & NDR_OUT) {
5184 0 : ndr_print_struct(ndr, "out", "winreg_DeleteKeyEx");
5185 0 : ndr->depth++;
5186 0 : ndr_print_WERROR(ndr, "result", r->out.result);
5187 0 : ndr->depth--;
5188 : }
5189 0 : ndr->depth--;
5190 : }
5191 :
5192 : #ifndef SKIP_NDR_TABLE_winreg
5193 : static const struct ndr_interface_public_struct winreg_public_structs[] = {
5194 : {
5195 : .name = "winreg_String",
5196 : .struct_size = sizeof(struct winreg_String ),
5197 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_winreg_String,
5198 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_winreg_String,
5199 : .ndr_print = (ndr_print_function_t) ndr_print_flags_winreg_String,
5200 : },
5201 : { .name = NULL }
5202 : };
5203 :
5204 : static const struct ndr_interface_call winreg_calls[] = {
5205 : {
5206 : "winreg_OpenHKCR",
5207 : sizeof(struct winreg_OpenHKCR),
5208 : (ndr_push_flags_fn_t) ndr_push_winreg_OpenHKCR,
5209 : (ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKCR,
5210 : (ndr_print_function_t) ndr_print_winreg_OpenHKCR,
5211 : { 0, NULL },
5212 : { 0, NULL },
5213 : },
5214 : {
5215 : "winreg_OpenHKCU",
5216 : sizeof(struct winreg_OpenHKCU),
5217 : (ndr_push_flags_fn_t) ndr_push_winreg_OpenHKCU,
5218 : (ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKCU,
5219 : (ndr_print_function_t) ndr_print_winreg_OpenHKCU,
5220 : { 0, NULL },
5221 : { 0, NULL },
5222 : },
5223 : {
5224 : "winreg_OpenHKLM",
5225 : sizeof(struct winreg_OpenHKLM),
5226 : (ndr_push_flags_fn_t) ndr_push_winreg_OpenHKLM,
5227 : (ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKLM,
5228 : (ndr_print_function_t) ndr_print_winreg_OpenHKLM,
5229 : { 0, NULL },
5230 : { 0, NULL },
5231 : },
5232 : {
5233 : "winreg_OpenHKPD",
5234 : sizeof(struct winreg_OpenHKPD),
5235 : (ndr_push_flags_fn_t) ndr_push_winreg_OpenHKPD,
5236 : (ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKPD,
5237 : (ndr_print_function_t) ndr_print_winreg_OpenHKPD,
5238 : { 0, NULL },
5239 : { 0, NULL },
5240 : },
5241 : {
5242 : "winreg_OpenHKU",
5243 : sizeof(struct winreg_OpenHKU),
5244 : (ndr_push_flags_fn_t) ndr_push_winreg_OpenHKU,
5245 : (ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKU,
5246 : (ndr_print_function_t) ndr_print_winreg_OpenHKU,
5247 : { 0, NULL },
5248 : { 0, NULL },
5249 : },
5250 : {
5251 : "winreg_CloseKey",
5252 : sizeof(struct winreg_CloseKey),
5253 : (ndr_push_flags_fn_t) ndr_push_winreg_CloseKey,
5254 : (ndr_pull_flags_fn_t) ndr_pull_winreg_CloseKey,
5255 : (ndr_print_function_t) ndr_print_winreg_CloseKey,
5256 : { 0, NULL },
5257 : { 0, NULL },
5258 : },
5259 : {
5260 : "winreg_CreateKey",
5261 : sizeof(struct winreg_CreateKey),
5262 : (ndr_push_flags_fn_t) ndr_push_winreg_CreateKey,
5263 : (ndr_pull_flags_fn_t) ndr_pull_winreg_CreateKey,
5264 : (ndr_print_function_t) ndr_print_winreg_CreateKey,
5265 : { 0, NULL },
5266 : { 0, NULL },
5267 : },
5268 : {
5269 : "winreg_DeleteKey",
5270 : sizeof(struct winreg_DeleteKey),
5271 : (ndr_push_flags_fn_t) ndr_push_winreg_DeleteKey,
5272 : (ndr_pull_flags_fn_t) ndr_pull_winreg_DeleteKey,
5273 : (ndr_print_function_t) ndr_print_winreg_DeleteKey,
5274 : { 0, NULL },
5275 : { 0, NULL },
5276 : },
5277 : {
5278 : "winreg_DeleteValue",
5279 : sizeof(struct winreg_DeleteValue),
5280 : (ndr_push_flags_fn_t) ndr_push_winreg_DeleteValue,
5281 : (ndr_pull_flags_fn_t) ndr_pull_winreg_DeleteValue,
5282 : (ndr_print_function_t) ndr_print_winreg_DeleteValue,
5283 : { 0, NULL },
5284 : { 0, NULL },
5285 : },
5286 : {
5287 : "winreg_EnumKey",
5288 : sizeof(struct winreg_EnumKey),
5289 : (ndr_push_flags_fn_t) ndr_push_winreg_EnumKey,
5290 : (ndr_pull_flags_fn_t) ndr_pull_winreg_EnumKey,
5291 : (ndr_print_function_t) ndr_print_winreg_EnumKey,
5292 : { 0, NULL },
5293 : { 0, NULL },
5294 : },
5295 : {
5296 : "winreg_EnumValue",
5297 : sizeof(struct winreg_EnumValue),
5298 : (ndr_push_flags_fn_t) ndr_push_winreg_EnumValue,
5299 : (ndr_pull_flags_fn_t) ndr_pull_winreg_EnumValue,
5300 : (ndr_print_function_t) ndr_print_winreg_EnumValue,
5301 : { 0, NULL },
5302 : { 0, NULL },
5303 : },
5304 : {
5305 : "winreg_FlushKey",
5306 : sizeof(struct winreg_FlushKey),
5307 : (ndr_push_flags_fn_t) ndr_push_winreg_FlushKey,
5308 : (ndr_pull_flags_fn_t) ndr_pull_winreg_FlushKey,
5309 : (ndr_print_function_t) ndr_print_winreg_FlushKey,
5310 : { 0, NULL },
5311 : { 0, NULL },
5312 : },
5313 : {
5314 : "winreg_GetKeySecurity",
5315 : sizeof(struct winreg_GetKeySecurity),
5316 : (ndr_push_flags_fn_t) ndr_push_winreg_GetKeySecurity,
5317 : (ndr_pull_flags_fn_t) ndr_pull_winreg_GetKeySecurity,
5318 : (ndr_print_function_t) ndr_print_winreg_GetKeySecurity,
5319 : { 0, NULL },
5320 : { 0, NULL },
5321 : },
5322 : {
5323 : "winreg_LoadKey",
5324 : sizeof(struct winreg_LoadKey),
5325 : (ndr_push_flags_fn_t) ndr_push_winreg_LoadKey,
5326 : (ndr_pull_flags_fn_t) ndr_pull_winreg_LoadKey,
5327 : (ndr_print_function_t) ndr_print_winreg_LoadKey,
5328 : { 0, NULL },
5329 : { 0, NULL },
5330 : },
5331 : {
5332 : "winreg_NotifyChangeKeyValue",
5333 : sizeof(struct winreg_NotifyChangeKeyValue),
5334 : (ndr_push_flags_fn_t) ndr_push_winreg_NotifyChangeKeyValue,
5335 : (ndr_pull_flags_fn_t) ndr_pull_winreg_NotifyChangeKeyValue,
5336 : (ndr_print_function_t) ndr_print_winreg_NotifyChangeKeyValue,
5337 : { 0, NULL },
5338 : { 0, NULL },
5339 : },
5340 : {
5341 : "winreg_OpenKey",
5342 : sizeof(struct winreg_OpenKey),
5343 : (ndr_push_flags_fn_t) ndr_push_winreg_OpenKey,
5344 : (ndr_pull_flags_fn_t) ndr_pull_winreg_OpenKey,
5345 : (ndr_print_function_t) ndr_print_winreg_OpenKey,
5346 : { 0, NULL },
5347 : { 0, NULL },
5348 : },
5349 : {
5350 : "winreg_QueryInfoKey",
5351 : sizeof(struct winreg_QueryInfoKey),
5352 : (ndr_push_flags_fn_t) ndr_push_winreg_QueryInfoKey,
5353 : (ndr_pull_flags_fn_t) ndr_pull_winreg_QueryInfoKey,
5354 : (ndr_print_function_t) ndr_print_winreg_QueryInfoKey,
5355 : { 0, NULL },
5356 : { 0, NULL },
5357 : },
5358 : {
5359 : "winreg_QueryValue",
5360 : sizeof(struct winreg_QueryValue),
5361 : (ndr_push_flags_fn_t) ndr_push_winreg_QueryValue,
5362 : (ndr_pull_flags_fn_t) ndr_pull_winreg_QueryValue,
5363 : (ndr_print_function_t) ndr_print_winreg_QueryValue,
5364 : { 0, NULL },
5365 : { 0, NULL },
5366 : },
5367 : {
5368 : "winreg_ReplaceKey",
5369 : sizeof(struct winreg_ReplaceKey),
5370 : (ndr_push_flags_fn_t) ndr_push_winreg_ReplaceKey,
5371 : (ndr_pull_flags_fn_t) ndr_pull_winreg_ReplaceKey,
5372 : (ndr_print_function_t) ndr_print_winreg_ReplaceKey,
5373 : { 0, NULL },
5374 : { 0, NULL },
5375 : },
5376 : {
5377 : "winreg_RestoreKey",
5378 : sizeof(struct winreg_RestoreKey),
5379 : (ndr_push_flags_fn_t) ndr_push_winreg_RestoreKey,
5380 : (ndr_pull_flags_fn_t) ndr_pull_winreg_RestoreKey,
5381 : (ndr_print_function_t) ndr_print_winreg_RestoreKey,
5382 : { 0, NULL },
5383 : { 0, NULL },
5384 : },
5385 : {
5386 : "winreg_SaveKey",
5387 : sizeof(struct winreg_SaveKey),
5388 : (ndr_push_flags_fn_t) ndr_push_winreg_SaveKey,
5389 : (ndr_pull_flags_fn_t) ndr_pull_winreg_SaveKey,
5390 : (ndr_print_function_t) ndr_print_winreg_SaveKey,
5391 : { 0, NULL },
5392 : { 0, NULL },
5393 : },
5394 : {
5395 : "winreg_SetKeySecurity",
5396 : sizeof(struct winreg_SetKeySecurity),
5397 : (ndr_push_flags_fn_t) ndr_push_winreg_SetKeySecurity,
5398 : (ndr_pull_flags_fn_t) ndr_pull_winreg_SetKeySecurity,
5399 : (ndr_print_function_t) ndr_print_winreg_SetKeySecurity,
5400 : { 0, NULL },
5401 : { 0, NULL },
5402 : },
5403 : {
5404 : "winreg_SetValue",
5405 : sizeof(struct winreg_SetValue),
5406 : (ndr_push_flags_fn_t) ndr_push_winreg_SetValue,
5407 : (ndr_pull_flags_fn_t) ndr_pull_winreg_SetValue,
5408 : (ndr_print_function_t) ndr_print_winreg_SetValue,
5409 : { 0, NULL },
5410 : { 0, NULL },
5411 : },
5412 : {
5413 : "winreg_UnLoadKey",
5414 : sizeof(struct winreg_UnLoadKey),
5415 : (ndr_push_flags_fn_t) ndr_push_winreg_UnLoadKey,
5416 : (ndr_pull_flags_fn_t) ndr_pull_winreg_UnLoadKey,
5417 : (ndr_print_function_t) ndr_print_winreg_UnLoadKey,
5418 : { 0, NULL },
5419 : { 0, NULL },
5420 : },
5421 : {
5422 : "winreg_InitiateSystemShutdown",
5423 : sizeof(struct winreg_InitiateSystemShutdown),
5424 : (ndr_push_flags_fn_t) ndr_push_winreg_InitiateSystemShutdown,
5425 : (ndr_pull_flags_fn_t) ndr_pull_winreg_InitiateSystemShutdown,
5426 : (ndr_print_function_t) ndr_print_winreg_InitiateSystemShutdown,
5427 : { 0, NULL },
5428 : { 0, NULL },
5429 : },
5430 : {
5431 : "winreg_AbortSystemShutdown",
5432 : sizeof(struct winreg_AbortSystemShutdown),
5433 : (ndr_push_flags_fn_t) ndr_push_winreg_AbortSystemShutdown,
5434 : (ndr_pull_flags_fn_t) ndr_pull_winreg_AbortSystemShutdown,
5435 : (ndr_print_function_t) ndr_print_winreg_AbortSystemShutdown,
5436 : { 0, NULL },
5437 : { 0, NULL },
5438 : },
5439 : {
5440 : "winreg_GetVersion",
5441 : sizeof(struct winreg_GetVersion),
5442 : (ndr_push_flags_fn_t) ndr_push_winreg_GetVersion,
5443 : (ndr_pull_flags_fn_t) ndr_pull_winreg_GetVersion,
5444 : (ndr_print_function_t) ndr_print_winreg_GetVersion,
5445 : { 0, NULL },
5446 : { 0, NULL },
5447 : },
5448 : {
5449 : "winreg_OpenHKCC",
5450 : sizeof(struct winreg_OpenHKCC),
5451 : (ndr_push_flags_fn_t) ndr_push_winreg_OpenHKCC,
5452 : (ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKCC,
5453 : (ndr_print_function_t) ndr_print_winreg_OpenHKCC,
5454 : { 0, NULL },
5455 : { 0, NULL },
5456 : },
5457 : {
5458 : "winreg_OpenHKDD",
5459 : sizeof(struct winreg_OpenHKDD),
5460 : (ndr_push_flags_fn_t) ndr_push_winreg_OpenHKDD,
5461 : (ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKDD,
5462 : (ndr_print_function_t) ndr_print_winreg_OpenHKDD,
5463 : { 0, NULL },
5464 : { 0, NULL },
5465 : },
5466 : {
5467 : "winreg_QueryMultipleValues",
5468 : sizeof(struct winreg_QueryMultipleValues),
5469 : (ndr_push_flags_fn_t) ndr_push_winreg_QueryMultipleValues,
5470 : (ndr_pull_flags_fn_t) ndr_pull_winreg_QueryMultipleValues,
5471 : (ndr_print_function_t) ndr_print_winreg_QueryMultipleValues,
5472 : { 0, NULL },
5473 : { 0, NULL },
5474 : },
5475 : {
5476 : "winreg_InitiateSystemShutdownEx",
5477 : sizeof(struct winreg_InitiateSystemShutdownEx),
5478 : (ndr_push_flags_fn_t) ndr_push_winreg_InitiateSystemShutdownEx,
5479 : (ndr_pull_flags_fn_t) ndr_pull_winreg_InitiateSystemShutdownEx,
5480 : (ndr_print_function_t) ndr_print_winreg_InitiateSystemShutdownEx,
5481 : { 0, NULL },
5482 : { 0, NULL },
5483 : },
5484 : {
5485 : "winreg_SaveKeyEx",
5486 : sizeof(struct winreg_SaveKeyEx),
5487 : (ndr_push_flags_fn_t) ndr_push_winreg_SaveKeyEx,
5488 : (ndr_pull_flags_fn_t) ndr_pull_winreg_SaveKeyEx,
5489 : (ndr_print_function_t) ndr_print_winreg_SaveKeyEx,
5490 : { 0, NULL },
5491 : { 0, NULL },
5492 : },
5493 : {
5494 : "winreg_OpenHKPT",
5495 : sizeof(struct winreg_OpenHKPT),
5496 : (ndr_push_flags_fn_t) ndr_push_winreg_OpenHKPT,
5497 : (ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKPT,
5498 : (ndr_print_function_t) ndr_print_winreg_OpenHKPT,
5499 : { 0, NULL },
5500 : { 0, NULL },
5501 : },
5502 : {
5503 : "winreg_OpenHKPN",
5504 : sizeof(struct winreg_OpenHKPN),
5505 : (ndr_push_flags_fn_t) ndr_push_winreg_OpenHKPN,
5506 : (ndr_pull_flags_fn_t) ndr_pull_winreg_OpenHKPN,
5507 : (ndr_print_function_t) ndr_print_winreg_OpenHKPN,
5508 : { 0, NULL },
5509 : { 0, NULL },
5510 : },
5511 : {
5512 : "winreg_QueryMultipleValues2",
5513 : sizeof(struct winreg_QueryMultipleValues2),
5514 : (ndr_push_flags_fn_t) ndr_push_winreg_QueryMultipleValues2,
5515 : (ndr_pull_flags_fn_t) ndr_pull_winreg_QueryMultipleValues2,
5516 : (ndr_print_function_t) ndr_print_winreg_QueryMultipleValues2,
5517 : { 0, NULL },
5518 : { 0, NULL },
5519 : },
5520 : {
5521 : "winreg_DeleteKeyEx",
5522 : sizeof(struct winreg_DeleteKeyEx),
5523 : (ndr_push_flags_fn_t) ndr_push_winreg_DeleteKeyEx,
5524 : (ndr_pull_flags_fn_t) ndr_pull_winreg_DeleteKeyEx,
5525 : (ndr_print_function_t) ndr_print_winreg_DeleteKeyEx,
5526 : { 0, NULL },
5527 : { 0, NULL },
5528 : },
5529 : { .name = NULL }
5530 : };
5531 :
5532 : static const char * const winreg_endpoint_strings[] = {
5533 : "ncacn_np:[\\pipe\\winreg]",
5534 : "ncacn_ip_tcp:",
5535 : "ncalrpc:",
5536 : };
5537 :
5538 : static const struct ndr_interface_string_array winreg_endpoints = {
5539 : .count = 3,
5540 : .names = winreg_endpoint_strings
5541 : };
5542 :
5543 : static const char * const winreg_authservice_strings[] = {
5544 : "host",
5545 : };
5546 :
5547 : static const struct ndr_interface_string_array winreg_authservices = {
5548 : .count = 1,
5549 : .names = winreg_authservice_strings
5550 : };
5551 :
5552 :
5553 : const struct ndr_interface_table ndr_table_winreg = {
5554 : .name = "winreg",
5555 : .syntax_id = {
5556 : {0x338cd001,0x2244,0x31f1,{0xaa,0xaa},{0x90,0x00,0x38,0x00,0x10,0x03}},
5557 : NDR_WINREG_VERSION
5558 : },
5559 : .helpstring = NDR_WINREG_HELPSTRING,
5560 : .num_calls = 36,
5561 : .calls = winreg_calls,
5562 : .num_public_structs = 1,
5563 : .public_structs = winreg_public_structs,
5564 : .endpoints = &winreg_endpoints,
5565 : .authservices = &winreg_authservices
5566 : };
5567 :
5568 : #endif /* SKIP_NDR_TABLE_winreg */
|