Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/librpc/gen_ndr/ndr_svcctl.h"
5 :
6 : #include "librpc/gen_ndr/ndr_misc.h"
7 : #include "librpc/gen_ndr/ndr_security.h"
8 0 : static enum ndr_err_code ndr_push_SERVICE_LOCK_STATUS(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct SERVICE_LOCK_STATUS *r)
9 : {
10 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
11 0 : if (ndr_flags & NDR_SCALARS) {
12 0 : NDR_CHECK(ndr_push_align(ndr, 5));
13 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->is_locked));
14 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->lock_owner));
15 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lock_duration));
16 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
17 : }
18 0 : if (ndr_flags & NDR_BUFFERS) {
19 0 : if (r->lock_owner) {
20 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->lock_owner, CH_UTF16)));
21 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
22 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->lock_owner, CH_UTF16)));
23 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->lock_owner, ndr_charset_length(r->lock_owner, CH_UTF16), sizeof(uint16_t), CH_UTF16));
24 : }
25 : }
26 0 : return NDR_ERR_SUCCESS;
27 : }
28 :
29 0 : static enum ndr_err_code ndr_pull_SERVICE_LOCK_STATUS(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct SERVICE_LOCK_STATUS *r)
30 : {
31 0 : uint32_t _ptr_lock_owner;
32 0 : uint32_t size_lock_owner_1 = 0;
33 0 : uint32_t length_lock_owner_1 = 0;
34 0 : TALLOC_CTX *_mem_save_lock_owner_0 = NULL;
35 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
36 0 : if (ndr_flags & NDR_SCALARS) {
37 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
38 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->is_locked));
39 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lock_owner));
40 0 : if (_ptr_lock_owner) {
41 0 : NDR_PULL_ALLOC(ndr, r->lock_owner);
42 : } else {
43 0 : r->lock_owner = NULL;
44 : }
45 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lock_duration));
46 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
47 : }
48 0 : if (ndr_flags & NDR_BUFFERS) {
49 0 : if (r->lock_owner) {
50 0 : _mem_save_lock_owner_0 = NDR_PULL_GET_MEM_CTX(ndr);
51 0 : NDR_PULL_SET_MEM_CTX(ndr, r->lock_owner, 0);
52 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->lock_owner));
53 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->lock_owner));
54 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->lock_owner, &size_lock_owner_1));
55 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->lock_owner, &length_lock_owner_1));
56 0 : if (length_lock_owner_1 > size_lock_owner_1) {
57 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_lock_owner_1, length_lock_owner_1);
58 : }
59 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_lock_owner_1, sizeof(uint16_t)));
60 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->lock_owner, length_lock_owner_1, sizeof(uint16_t), CH_UTF16));
61 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_owner_0, 0);
62 : }
63 : }
64 0 : return NDR_ERR_SUCCESS;
65 : }
66 :
67 0 : _PUBLIC_ void ndr_print_SERVICE_LOCK_STATUS(struct ndr_print *ndr, const char *name, const struct SERVICE_LOCK_STATUS *r)
68 : {
69 0 : ndr_print_struct(ndr, name, "SERVICE_LOCK_STATUS");
70 0 : if (r == NULL) { ndr_print_null(ndr); return; }
71 0 : ndr->depth++;
72 0 : ndr_print_uint32(ndr, "is_locked", r->is_locked);
73 0 : ndr_print_ptr(ndr, "lock_owner", r->lock_owner);
74 0 : ndr->depth++;
75 0 : if (r->lock_owner) {
76 0 : ndr_print_string(ndr, "lock_owner", r->lock_owner);
77 : }
78 0 : ndr->depth--;
79 0 : ndr_print_uint32(ndr, "lock_duration", r->lock_duration);
80 0 : ndr->depth--;
81 : }
82 :
83 64 : static enum ndr_err_code ndr_push_svcctl_ServiceStatus(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum svcctl_ServiceStatus r)
84 : {
85 64 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
86 64 : return NDR_ERR_SUCCESS;
87 : }
88 :
89 24 : static enum ndr_err_code ndr_pull_svcctl_ServiceStatus(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum svcctl_ServiceStatus *r)
90 : {
91 0 : uint32_t v;
92 24 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
93 24 : *r = v;
94 24 : return NDR_ERR_SUCCESS;
95 : }
96 :
97 0 : _PUBLIC_ void ndr_print_svcctl_ServiceStatus(struct ndr_print *ndr, const char *name, enum svcctl_ServiceStatus r)
98 : {
99 0 : const char *val = NULL;
100 :
101 0 : switch (r) {
102 0 : case SVCCTL_STATE_UNKNOWN: val = "SVCCTL_STATE_UNKNOWN"; break;
103 0 : case SVCCTL_STOPPED: val = "SVCCTL_STOPPED"; break;
104 0 : case SVCCTL_START_PENDING: val = "SVCCTL_START_PENDING"; break;
105 0 : case SVCCTL_STOP_PENDING: val = "SVCCTL_STOP_PENDING"; break;
106 0 : case SVCCTL_RUNNING: val = "SVCCTL_RUNNING"; break;
107 0 : case SVCCTL_CONTINUE_PENDING: val = "SVCCTL_CONTINUE_PENDING"; break;
108 0 : case SVCCTL_PAUSE_PENDING: val = "SVCCTL_PAUSE_PENDING"; break;
109 0 : case SVCCTL_PAUSED: val = "SVCCTL_PAUSED"; break;
110 : }
111 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
112 0 : }
113 :
114 64 : static enum ndr_err_code ndr_push_svcctl_ControlsAccepted(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
115 : {
116 64 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
117 64 : return NDR_ERR_SUCCESS;
118 : }
119 :
120 24 : static enum ndr_err_code ndr_pull_svcctl_ControlsAccepted(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
121 : {
122 0 : uint32_t v;
123 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
124 24 : *r = v;
125 24 : return NDR_ERR_SUCCESS;
126 : }
127 :
128 0 : _PUBLIC_ void ndr_print_svcctl_ControlsAccepted(struct ndr_print *ndr, const char *name, uint32_t r)
129 : {
130 0 : ndr_print_uint32(ndr, name, r);
131 0 : ndr->depth++;
132 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_STOP", SVCCTL_ACCEPT_STOP, r);
133 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_PAUSE_CONTINUE", SVCCTL_ACCEPT_PAUSE_CONTINUE, r);
134 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_SHUTDOWN", SVCCTL_ACCEPT_SHUTDOWN, r);
135 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_PARAMCHANGE", SVCCTL_ACCEPT_PARAMCHANGE, r);
136 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_NETBINDCHANGE", SVCCTL_ACCEPT_NETBINDCHANGE, r);
137 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_HARDWAREPROFILECHANGE", SVCCTL_ACCEPT_HARDWAREPROFILECHANGE, r);
138 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SVCCTL_ACCEPT_POWEREVENT", SVCCTL_ACCEPT_POWEREVENT, r);
139 0 : ndr->depth--;
140 0 : }
141 :
142 64 : static enum ndr_err_code ndr_push_SERVICE_STATUS(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct SERVICE_STATUS *r)
143 : {
144 64 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
145 64 : if (ndr_flags & NDR_SCALARS) {
146 64 : NDR_CHECK(ndr_push_align(ndr, 4));
147 64 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->type));
148 64 : NDR_CHECK(ndr_push_svcctl_ServiceStatus(ndr, NDR_SCALARS, r->state));
149 64 : NDR_CHECK(ndr_push_svcctl_ControlsAccepted(ndr, NDR_SCALARS, r->controls_accepted));
150 64 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->win32_exit_code));
151 64 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->service_exit_code));
152 64 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->check_point));
153 64 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->wait_hint));
154 64 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
155 : }
156 64 : if (ndr_flags & NDR_BUFFERS) {
157 0 : }
158 64 : return NDR_ERR_SUCCESS;
159 : }
160 :
161 24 : static enum ndr_err_code ndr_pull_SERVICE_STATUS(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct SERVICE_STATUS *r)
162 : {
163 24 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
164 24 : if (ndr_flags & NDR_SCALARS) {
165 24 : NDR_CHECK(ndr_pull_align(ndr, 4));
166 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->type));
167 24 : NDR_CHECK(ndr_pull_svcctl_ServiceStatus(ndr, NDR_SCALARS, &r->state));
168 24 : NDR_CHECK(ndr_pull_svcctl_ControlsAccepted(ndr, NDR_SCALARS, &r->controls_accepted));
169 24 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->win32_exit_code));
170 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->service_exit_code));
171 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->check_point));
172 24 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->wait_hint));
173 24 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
174 : }
175 24 : if (ndr_flags & NDR_BUFFERS) {
176 0 : }
177 24 : return NDR_ERR_SUCCESS;
178 : }
179 :
180 0 : _PUBLIC_ void ndr_print_SERVICE_STATUS(struct ndr_print *ndr, const char *name, const struct SERVICE_STATUS *r)
181 : {
182 0 : ndr_print_struct(ndr, name, "SERVICE_STATUS");
183 0 : if (r == NULL) { ndr_print_null(ndr); return; }
184 0 : ndr->depth++;
185 0 : ndr_print_uint32(ndr, "type", r->type);
186 0 : ndr_print_svcctl_ServiceStatus(ndr, "state", r->state);
187 0 : ndr_print_svcctl_ControlsAccepted(ndr, "controls_accepted", r->controls_accepted);
188 0 : ndr_print_WERROR(ndr, "win32_exit_code", r->win32_exit_code);
189 0 : ndr_print_uint32(ndr, "service_exit_code", r->service_exit_code);
190 0 : ndr_print_uint32(ndr, "check_point", r->check_point);
191 0 : ndr_print_uint32(ndr, "wait_hint", r->wait_hint);
192 0 : ndr->depth--;
193 : }
194 :
195 8 : _PUBLIC_ enum ndr_err_code ndr_push_SERVICE_STATUS_PROCESS(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct SERVICE_STATUS_PROCESS *r)
196 : {
197 8 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
198 8 : if (ndr_flags & NDR_SCALARS) {
199 8 : NDR_CHECK(ndr_push_align(ndr, 4));
200 8 : NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status));
201 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->process_id));
202 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->service_flags));
203 8 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
204 : }
205 8 : if (ndr_flags & NDR_BUFFERS) {
206 0 : }
207 8 : return NDR_ERR_SUCCESS;
208 : }
209 :
210 0 : _PUBLIC_ enum ndr_err_code ndr_pull_SERVICE_STATUS_PROCESS(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct SERVICE_STATUS_PROCESS *r)
211 : {
212 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
213 0 : if (ndr_flags & NDR_SCALARS) {
214 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
215 0 : NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status));
216 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->process_id));
217 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->service_flags));
218 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
219 : }
220 0 : if (ndr_flags & NDR_BUFFERS) {
221 0 : }
222 0 : return NDR_ERR_SUCCESS;
223 : }
224 :
225 0 : static void ndr_print_flags_SERVICE_STATUS_PROCESS(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct SERVICE_STATUS_PROCESS *r)
226 : {
227 0 : ndr_print_SERVICE_STATUS_PROCESS(ndr, name, r);
228 0 : }
229 :
230 0 : _PUBLIC_ void ndr_print_SERVICE_STATUS_PROCESS(struct ndr_print *ndr, const char *name, const struct SERVICE_STATUS_PROCESS *r)
231 : {
232 0 : ndr_print_struct(ndr, name, "SERVICE_STATUS_PROCESS");
233 0 : if (r == NULL) { ndr_print_null(ndr); return; }
234 0 : ndr->depth++;
235 0 : ndr_print_SERVICE_STATUS(ndr, "status", &r->status);
236 0 : ndr_print_uint32(ndr, "process_id", r->process_id);
237 0 : ndr_print_uint32(ndr, "service_flags", r->service_flags);
238 0 : ndr->depth--;
239 : }
240 :
241 64 : _PUBLIC_ enum ndr_err_code ndr_push_ENUM_SERVICE_STATUSW(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct ENUM_SERVICE_STATUSW *r)
242 : {
243 64 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
244 64 : if (ndr_flags & NDR_SCALARS) {
245 48 : NDR_CHECK(ndr_push_align(ndr, 5));
246 : {
247 48 : libndr_flags _flags_save_string = ndr->flags;
248 48 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
249 48 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->service_name));
250 48 : ndr->flags = _flags_save_string;
251 : }
252 : {
253 48 : libndr_flags _flags_save_string = ndr->flags;
254 48 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
255 48 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->display_name));
256 48 : ndr->flags = _flags_save_string;
257 : }
258 48 : NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status));
259 48 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
260 : }
261 64 : if (ndr_flags & NDR_BUFFERS) {
262 : {
263 48 : libndr_flags _flags_save_string = ndr->flags;
264 48 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
265 48 : if (r->service_name) {
266 48 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->service_name));
267 48 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->service_name));
268 48 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->service_name));
269 : }
270 48 : ndr->flags = _flags_save_string;
271 : }
272 : {
273 48 : libndr_flags _flags_save_string = ndr->flags;
274 48 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
275 48 : if (r->display_name) {
276 48 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->display_name));
277 48 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->display_name));
278 48 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->display_name));
279 : }
280 48 : ndr->flags = _flags_save_string;
281 : }
282 : }
283 64 : return NDR_ERR_SUCCESS;
284 : }
285 :
286 32 : _PUBLIC_ enum ndr_err_code ndr_pull_ENUM_SERVICE_STATUSW(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct ENUM_SERVICE_STATUSW *r)
287 : {
288 0 : uint32_t _ptr_service_name;
289 32 : TALLOC_CTX *_mem_save_service_name_0 = NULL;
290 0 : uint32_t _ptr_display_name;
291 32 : TALLOC_CTX *_mem_save_display_name_0 = NULL;
292 32 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
293 32 : if (ndr_flags & NDR_SCALARS) {
294 16 : NDR_CHECK(ndr_pull_align(ndr, 5));
295 : {
296 16 : libndr_flags _flags_save_string = ndr->flags;
297 16 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
298 16 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
299 16 : if (_ptr_service_name) {
300 16 : NDR_PULL_ALLOC(ndr, r->service_name);
301 16 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->service_name, _ptr_service_name));
302 : } else {
303 0 : r->service_name = NULL;
304 : }
305 16 : ndr->flags = _flags_save_string;
306 : }
307 : {
308 16 : libndr_flags _flags_save_string = ndr->flags;
309 16 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
310 16 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
311 16 : if (_ptr_display_name) {
312 16 : NDR_PULL_ALLOC(ndr, r->display_name);
313 16 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->display_name, _ptr_display_name));
314 : } else {
315 0 : r->display_name = NULL;
316 : }
317 16 : ndr->flags = _flags_save_string;
318 : }
319 16 : NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status));
320 16 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
321 : }
322 32 : if (ndr_flags & NDR_BUFFERS) {
323 : {
324 16 : libndr_flags _flags_save_string = ndr->flags;
325 16 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
326 16 : if (r->service_name) {
327 0 : uint32_t _relative_save_offset;
328 16 : _relative_save_offset = ndr->offset;
329 16 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->service_name));
330 16 : _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
331 16 : NDR_PULL_SET_MEM_CTX(ndr, r->service_name, 0);
332 16 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->service_name));
333 16 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
334 16 : if (ndr->offset > ndr->relative_highest_offset) {
335 16 : ndr->relative_highest_offset = ndr->offset;
336 : }
337 16 : ndr->offset = _relative_save_offset;
338 : }
339 16 : ndr->flags = _flags_save_string;
340 : }
341 : {
342 16 : libndr_flags _flags_save_string = ndr->flags;
343 16 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
344 16 : if (r->display_name) {
345 0 : uint32_t _relative_save_offset;
346 16 : _relative_save_offset = ndr->offset;
347 16 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->display_name));
348 16 : _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
349 16 : NDR_PULL_SET_MEM_CTX(ndr, r->display_name, 0);
350 16 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->display_name));
351 16 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, 0);
352 16 : if (ndr->offset > ndr->relative_highest_offset) {
353 16 : ndr->relative_highest_offset = ndr->offset;
354 : }
355 16 : ndr->offset = _relative_save_offset;
356 : }
357 16 : ndr->flags = _flags_save_string;
358 : }
359 : }
360 32 : return NDR_ERR_SUCCESS;
361 : }
362 :
363 0 : static void ndr_print_flags_ENUM_SERVICE_STATUSW(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct ENUM_SERVICE_STATUSW *r)
364 : {
365 0 : ndr_print_ENUM_SERVICE_STATUSW(ndr, name, r);
366 0 : }
367 :
368 0 : _PUBLIC_ void ndr_print_ENUM_SERVICE_STATUSW(struct ndr_print *ndr, const char *name, const struct ENUM_SERVICE_STATUSW *r)
369 : {
370 0 : ndr_print_struct(ndr, name, "ENUM_SERVICE_STATUSW");
371 0 : if (r == NULL) { ndr_print_null(ndr); return; }
372 0 : ndr->depth++;
373 : {
374 0 : libndr_flags _flags_save_string = ndr->flags;
375 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
376 0 : ndr_print_ptr(ndr, "service_name", r->service_name);
377 0 : ndr->depth++;
378 0 : if (r->service_name) {
379 0 : ndr_print_string(ndr, "service_name", r->service_name);
380 : }
381 0 : ndr->depth--;
382 0 : ndr->flags = _flags_save_string;
383 : }
384 : {
385 0 : libndr_flags _flags_save_string = ndr->flags;
386 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
387 0 : ndr_print_ptr(ndr, "display_name", r->display_name);
388 0 : ndr->depth++;
389 0 : if (r->display_name) {
390 0 : ndr_print_string(ndr, "display_name", r->display_name);
391 : }
392 0 : ndr->depth--;
393 0 : ndr->flags = _flags_save_string;
394 : }
395 0 : ndr_print_SERVICE_STATUS(ndr, "status", &r->status);
396 0 : ndr->depth--;
397 : }
398 :
399 32 : _PUBLIC_ size_t ndr_size_ENUM_SERVICE_STATUSW(const struct ENUM_SERVICE_STATUSW *r, libndr_flags flags)
400 : {
401 32 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_ENUM_SERVICE_STATUSW);
402 : }
403 :
404 0 : _PUBLIC_ enum ndr_err_code ndr_push_ENUM_SERVICE_STATUSA(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct ENUM_SERVICE_STATUSA *r)
405 : {
406 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
407 0 : if (ndr_flags & NDR_SCALARS) {
408 0 : NDR_CHECK(ndr_push_align(ndr, 5));
409 : {
410 0 : libndr_flags _flags_save_string = ndr->flags;
411 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
412 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->service_name));
413 0 : ndr->flags = _flags_save_string;
414 : }
415 : {
416 0 : libndr_flags _flags_save_string = ndr->flags;
417 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
418 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->display_name));
419 0 : ndr->flags = _flags_save_string;
420 : }
421 0 : NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status));
422 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
423 : }
424 0 : if (ndr_flags & NDR_BUFFERS) {
425 : {
426 0 : libndr_flags _flags_save_string = ndr->flags;
427 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
428 0 : if (r->service_name) {
429 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->service_name));
430 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->service_name));
431 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->service_name));
432 : }
433 0 : ndr->flags = _flags_save_string;
434 : }
435 : {
436 0 : libndr_flags _flags_save_string = ndr->flags;
437 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
438 0 : if (r->display_name) {
439 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->display_name));
440 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->display_name));
441 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->display_name));
442 : }
443 0 : ndr->flags = _flags_save_string;
444 : }
445 : }
446 0 : return NDR_ERR_SUCCESS;
447 : }
448 :
449 0 : _PUBLIC_ enum ndr_err_code ndr_pull_ENUM_SERVICE_STATUSA(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct ENUM_SERVICE_STATUSA *r)
450 : {
451 0 : uint32_t _ptr_service_name;
452 0 : TALLOC_CTX *_mem_save_service_name_0 = NULL;
453 0 : uint32_t _ptr_display_name;
454 0 : TALLOC_CTX *_mem_save_display_name_0 = NULL;
455 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
456 0 : if (ndr_flags & NDR_SCALARS) {
457 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
458 : {
459 0 : libndr_flags _flags_save_string = ndr->flags;
460 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
461 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
462 0 : if (_ptr_service_name) {
463 0 : NDR_PULL_ALLOC(ndr, r->service_name);
464 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->service_name, _ptr_service_name));
465 : } else {
466 0 : r->service_name = NULL;
467 : }
468 0 : ndr->flags = _flags_save_string;
469 : }
470 : {
471 0 : libndr_flags _flags_save_string = ndr->flags;
472 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
473 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
474 0 : if (_ptr_display_name) {
475 0 : NDR_PULL_ALLOC(ndr, r->display_name);
476 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->display_name, _ptr_display_name));
477 : } else {
478 0 : r->display_name = NULL;
479 : }
480 0 : ndr->flags = _flags_save_string;
481 : }
482 0 : NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status));
483 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
484 : }
485 0 : if (ndr_flags & NDR_BUFFERS) {
486 : {
487 0 : libndr_flags _flags_save_string = ndr->flags;
488 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
489 0 : if (r->service_name) {
490 0 : uint32_t _relative_save_offset;
491 0 : _relative_save_offset = ndr->offset;
492 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->service_name));
493 0 : _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
494 0 : NDR_PULL_SET_MEM_CTX(ndr, r->service_name, 0);
495 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->service_name));
496 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
497 0 : if (ndr->offset > ndr->relative_highest_offset) {
498 0 : ndr->relative_highest_offset = ndr->offset;
499 : }
500 0 : ndr->offset = _relative_save_offset;
501 : }
502 0 : ndr->flags = _flags_save_string;
503 : }
504 : {
505 0 : libndr_flags _flags_save_string = ndr->flags;
506 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
507 0 : if (r->display_name) {
508 0 : uint32_t _relative_save_offset;
509 0 : _relative_save_offset = ndr->offset;
510 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->display_name));
511 0 : _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
512 0 : NDR_PULL_SET_MEM_CTX(ndr, r->display_name, 0);
513 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->display_name));
514 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, 0);
515 0 : if (ndr->offset > ndr->relative_highest_offset) {
516 0 : ndr->relative_highest_offset = ndr->offset;
517 : }
518 0 : ndr->offset = _relative_save_offset;
519 : }
520 0 : ndr->flags = _flags_save_string;
521 : }
522 : }
523 0 : return NDR_ERR_SUCCESS;
524 : }
525 :
526 0 : static void ndr_print_flags_ENUM_SERVICE_STATUSA(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct ENUM_SERVICE_STATUSA *r)
527 : {
528 0 : ndr_print_ENUM_SERVICE_STATUSA(ndr, name, r);
529 0 : }
530 :
531 0 : _PUBLIC_ void ndr_print_ENUM_SERVICE_STATUSA(struct ndr_print *ndr, const char *name, const struct ENUM_SERVICE_STATUSA *r)
532 : {
533 0 : ndr_print_struct(ndr, name, "ENUM_SERVICE_STATUSA");
534 0 : if (r == NULL) { ndr_print_null(ndr); return; }
535 0 : ndr->depth++;
536 : {
537 0 : libndr_flags _flags_save_string = ndr->flags;
538 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
539 0 : ndr_print_ptr(ndr, "service_name", r->service_name);
540 0 : ndr->depth++;
541 0 : if (r->service_name) {
542 0 : ndr_print_string(ndr, "service_name", r->service_name);
543 : }
544 0 : ndr->depth--;
545 0 : ndr->flags = _flags_save_string;
546 : }
547 : {
548 0 : libndr_flags _flags_save_string = ndr->flags;
549 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
550 0 : ndr_print_ptr(ndr, "display_name", r->display_name);
551 0 : ndr->depth++;
552 0 : if (r->display_name) {
553 0 : ndr_print_string(ndr, "display_name", r->display_name);
554 : }
555 0 : ndr->depth--;
556 0 : ndr->flags = _flags_save_string;
557 : }
558 0 : ndr_print_SERVICE_STATUS(ndr, "status", &r->status);
559 0 : ndr->depth--;
560 : }
561 :
562 0 : _PUBLIC_ size_t ndr_size_ENUM_SERVICE_STATUSA(const struct ENUM_SERVICE_STATUSA *r, libndr_flags flags)
563 : {
564 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_ENUM_SERVICE_STATUSA);
565 : }
566 :
567 8 : static enum ndr_err_code ndr_push_SERVICE_CONTROL(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum SERVICE_CONTROL r)
568 : {
569 8 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
570 8 : return NDR_ERR_SUCCESS;
571 : }
572 :
573 8 : static enum ndr_err_code ndr_pull_SERVICE_CONTROL(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum SERVICE_CONTROL *r)
574 : {
575 0 : uint32_t v;
576 8 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
577 8 : *r = v;
578 8 : return NDR_ERR_SUCCESS;
579 : }
580 :
581 0 : _PUBLIC_ void ndr_print_SERVICE_CONTROL(struct ndr_print *ndr, const char *name, enum SERVICE_CONTROL r)
582 : {
583 0 : const char *val = NULL;
584 :
585 0 : switch (r) {
586 0 : case SVCCTL_CONTROL_STOP: val = "SVCCTL_CONTROL_STOP"; break;
587 0 : case SVCCTL_CONTROL_PAUSE: val = "SVCCTL_CONTROL_PAUSE"; break;
588 0 : case SVCCTL_CONTROL_CONTINUE: val = "SVCCTL_CONTROL_CONTINUE"; break;
589 0 : case SVCCTL_CONTROL_INTERROGATE: val = "SVCCTL_CONTROL_INTERROGATE"; break;
590 0 : case SVCCTL_CONTROL_SHUTDOWN: val = "SVCCTL_CONTROL_SHUTDOWN"; break;
591 0 : case SVCCTL_CONTROL_PARAMCHANGE: val = "SVCCTL_CONTROL_PARAMCHANGE"; break;
592 0 : case SVCCTL_CONTROL_NETBINDADD: val = "SVCCTL_CONTROL_NETBINDADD"; break;
593 0 : case SVCCTL_CONTROL_NETBINDREMOVE: val = "SVCCTL_CONTROL_NETBINDREMOVE"; break;
594 0 : case SVCCTL_CONTROL_NETBINDENABLE: val = "SVCCTL_CONTROL_NETBINDENABLE"; break;
595 0 : case SVCCTL_CONTROL_NETBINDDISABLE: val = "SVCCTL_CONTROL_NETBINDDISABLE"; break;
596 : }
597 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
598 0 : }
599 :
600 36 : static enum ndr_err_code ndr_push_svcctl_ErrorControl(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum svcctl_ErrorControl r)
601 : {
602 36 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
603 36 : return NDR_ERR_SUCCESS;
604 : }
605 :
606 22 : static enum ndr_err_code ndr_pull_svcctl_ErrorControl(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum svcctl_ErrorControl *r)
607 : {
608 2 : uint32_t v;
609 22 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
610 22 : *r = v;
611 22 : return NDR_ERR_SUCCESS;
612 : }
613 :
614 2 : _PUBLIC_ void ndr_print_svcctl_ErrorControl(struct ndr_print *ndr, const char *name, enum svcctl_ErrorControl r)
615 : {
616 2 : const char *val = NULL;
617 :
618 2 : switch (r) {
619 0 : case SVCCTL_SVC_ERROR_IGNORE: val = "SVCCTL_SVC_ERROR_IGNORE"; break;
620 2 : case SVCCTL_SVC_ERROR_NORMAL: val = "SVCCTL_SVC_ERROR_NORMAL"; break;
621 0 : case SVCCTL_SVC_ERROR_CRITICAL: val = "SVCCTL_SVC_ERROR_CRITICAL"; break;
622 0 : case SVCCTL_SVC_ERROR_SEVERE: val = "SVCCTL_SVC_ERROR_SEVERE"; break;
623 : }
624 2 : ndr_print_enum(ndr, name, "ENUM", val, r);
625 2 : }
626 :
627 36 : static enum ndr_err_code ndr_push_svcctl_StartType(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum svcctl_StartType r)
628 : {
629 36 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
630 36 : return NDR_ERR_SUCCESS;
631 : }
632 :
633 22 : static enum ndr_err_code ndr_pull_svcctl_StartType(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum svcctl_StartType *r)
634 : {
635 2 : uint32_t v;
636 22 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
637 22 : *r = v;
638 22 : return NDR_ERR_SUCCESS;
639 : }
640 :
641 2 : _PUBLIC_ void ndr_print_svcctl_StartType(struct ndr_print *ndr, const char *name, enum svcctl_StartType r)
642 : {
643 2 : const char *val = NULL;
644 :
645 2 : switch (r) {
646 0 : case SVCCTL_BOOT_START: val = "SVCCTL_BOOT_START"; break;
647 0 : case SVCCTL_SYSTEM_START: val = "SVCCTL_SYSTEM_START"; break;
648 2 : case SVCCTL_AUTO_START: val = "SVCCTL_AUTO_START"; break;
649 0 : case SVCCTL_DEMAND_START: val = "SVCCTL_DEMAND_START"; break;
650 0 : case SVCCTL_DISABLED: val = "SVCCTL_DISABLED"; break;
651 : }
652 2 : ndr_print_enum(ndr, name, "ENUM", val, r);
653 2 : }
654 :
655 24 : static enum ndr_err_code ndr_push_svcctl_ServiceState(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum svcctl_ServiceState r)
656 : {
657 24 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
658 24 : return NDR_ERR_SUCCESS;
659 : }
660 :
661 24 : static enum ndr_err_code ndr_pull_svcctl_ServiceState(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum svcctl_ServiceState *r)
662 : {
663 0 : uint32_t v;
664 24 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
665 24 : *r = v;
666 24 : return NDR_ERR_SUCCESS;
667 : }
668 :
669 0 : _PUBLIC_ void ndr_print_svcctl_ServiceState(struct ndr_print *ndr, const char *name, enum svcctl_ServiceState r)
670 : {
671 0 : const char *val = NULL;
672 :
673 0 : switch (r) {
674 0 : case SERVICE_STATE_ACTIVE: val = "SERVICE_STATE_ACTIVE"; break;
675 0 : case SERVICE_STATE_INACTIVE: val = "SERVICE_STATE_INACTIVE"; break;
676 0 : case SERVICE_STATE_ALL: val = "SERVICE_STATE_ALL"; break;
677 : }
678 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
679 0 : }
680 :
681 56 : static enum ndr_err_code ndr_push_svcctl_MgrAccessMask(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
682 : {
683 56 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
684 56 : return NDR_ERR_SUCCESS;
685 : }
686 :
687 56 : static enum ndr_err_code ndr_pull_svcctl_MgrAccessMask(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
688 : {
689 0 : uint32_t v;
690 56 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
691 56 : *r = v;
692 56 : return NDR_ERR_SUCCESS;
693 : }
694 :
695 0 : _PUBLIC_ void ndr_print_svcctl_MgrAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
696 : {
697 0 : ndr_print_uint32(ndr, name, r);
698 0 : ndr->depth++;
699 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_MGR_CONNECT", SC_RIGHT_MGR_CONNECT, r);
700 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_MGR_CREATE_SERVICE", SC_RIGHT_MGR_CREATE_SERVICE, r);
701 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_MGR_ENUMERATE_SERVICE", SC_RIGHT_MGR_ENUMERATE_SERVICE, r);
702 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_MGR_LOCK", SC_RIGHT_MGR_LOCK, r);
703 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_MGR_QUERY_LOCK_STATUS", SC_RIGHT_MGR_QUERY_LOCK_STATUS, r);
704 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_MGR_MODIFY_BOOT_CONFIG", SC_RIGHT_MGR_MODIFY_BOOT_CONFIG, r);
705 0 : ndr->depth--;
706 0 : }
707 :
708 48 : static enum ndr_err_code ndr_push_svcctl_ServiceAccessMask(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
709 : {
710 48 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
711 48 : return NDR_ERR_SUCCESS;
712 : }
713 :
714 48 : static enum ndr_err_code ndr_pull_svcctl_ServiceAccessMask(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
715 : {
716 0 : uint32_t v;
717 48 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
718 48 : *r = v;
719 48 : return NDR_ERR_SUCCESS;
720 : }
721 :
722 0 : _PUBLIC_ void ndr_print_svcctl_ServiceAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
723 : {
724 0 : ndr_print_uint32(ndr, name, r);
725 0 : ndr->depth++;
726 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_QUERY_CONFIG", SC_RIGHT_SVC_QUERY_CONFIG, r);
727 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_CHANGE_CONFIG", SC_RIGHT_SVC_CHANGE_CONFIG, r);
728 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_QUERY_STATUS", SC_RIGHT_SVC_QUERY_STATUS, r);
729 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_ENUMERATE_DEPENDENTS", SC_RIGHT_SVC_ENUMERATE_DEPENDENTS, r);
730 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_START", SC_RIGHT_SVC_START, r);
731 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_STOP", SC_RIGHT_SVC_STOP, r);
732 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_PAUSE_CONTINUE", SC_RIGHT_SVC_PAUSE_CONTINUE, r);
733 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_INTERROGATE", SC_RIGHT_SVC_INTERROGATE, r);
734 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_USER_DEFINED_CONTROL", SC_RIGHT_SVC_USER_DEFINED_CONTROL, r);
735 0 : ndr->depth--;
736 0 : }
737 :
738 32 : _PUBLIC_ enum ndr_err_code ndr_push_QUERY_SERVICE_CONFIG(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct QUERY_SERVICE_CONFIG *r)
739 : {
740 32 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
741 32 : if (ndr_flags & NDR_SCALARS) {
742 32 : NDR_CHECK(ndr_push_align(ndr, 5));
743 32 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->service_type));
744 32 : NDR_CHECK(ndr_push_svcctl_StartType(ndr, NDR_SCALARS, r->start_type));
745 32 : NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr, NDR_SCALARS, r->error_control));
746 32 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->executablepath));
747 32 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->loadordergroup));
748 32 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->tag_id));
749 32 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dependencies));
750 32 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->startname));
751 32 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->displayname));
752 32 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
753 : }
754 32 : if (ndr_flags & NDR_BUFFERS) {
755 32 : if (r->executablepath) {
756 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->executablepath, CH_UTF16)));
757 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
758 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->executablepath, CH_UTF16)));
759 24 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->executablepath, ndr_charset_length(r->executablepath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
760 : }
761 32 : if (r->loadordergroup) {
762 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->loadordergroup, CH_UTF16)));
763 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
764 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->loadordergroup, CH_UTF16)));
765 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->loadordergroup, ndr_charset_length(r->loadordergroup, CH_UTF16), sizeof(uint16_t), CH_UTF16));
766 : }
767 32 : if (r->dependencies) {
768 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dependencies, CH_UTF16)));
769 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
770 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dependencies, CH_UTF16)));
771 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dependencies, ndr_charset_length(r->dependencies, CH_UTF16), sizeof(uint16_t), CH_UTF16));
772 : }
773 32 : if (r->startname) {
774 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->startname, CH_UTF16)));
775 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
776 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->startname, CH_UTF16)));
777 24 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->startname, ndr_charset_length(r->startname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
778 : }
779 32 : if (r->displayname) {
780 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->displayname, CH_UTF16)));
781 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
782 24 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->displayname, CH_UTF16)));
783 24 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->displayname, ndr_charset_length(r->displayname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
784 : }
785 : }
786 32 : return NDR_ERR_SUCCESS;
787 : }
788 :
789 16 : _PUBLIC_ enum ndr_err_code ndr_pull_QUERY_SERVICE_CONFIG(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct QUERY_SERVICE_CONFIG *r)
790 : {
791 0 : uint32_t _ptr_executablepath;
792 16 : uint32_t size_executablepath_1 = 0;
793 16 : uint32_t length_executablepath_1 = 0;
794 16 : TALLOC_CTX *_mem_save_executablepath_0 = NULL;
795 0 : uint32_t _ptr_loadordergroup;
796 16 : uint32_t size_loadordergroup_1 = 0;
797 16 : uint32_t length_loadordergroup_1 = 0;
798 16 : TALLOC_CTX *_mem_save_loadordergroup_0 = NULL;
799 0 : uint32_t _ptr_dependencies;
800 16 : uint32_t size_dependencies_1 = 0;
801 16 : uint32_t length_dependencies_1 = 0;
802 16 : TALLOC_CTX *_mem_save_dependencies_0 = NULL;
803 0 : uint32_t _ptr_startname;
804 16 : uint32_t size_startname_1 = 0;
805 16 : uint32_t length_startname_1 = 0;
806 16 : TALLOC_CTX *_mem_save_startname_0 = NULL;
807 0 : uint32_t _ptr_displayname;
808 16 : uint32_t size_displayname_1 = 0;
809 16 : uint32_t length_displayname_1 = 0;
810 16 : TALLOC_CTX *_mem_save_displayname_0 = NULL;
811 16 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
812 16 : if (ndr_flags & NDR_SCALARS) {
813 16 : NDR_CHECK(ndr_pull_align(ndr, 5));
814 16 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->service_type));
815 16 : NDR_CHECK(ndr_pull_svcctl_StartType(ndr, NDR_SCALARS, &r->start_type));
816 16 : NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr, NDR_SCALARS, &r->error_control));
817 16 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_executablepath));
818 16 : if (_ptr_executablepath) {
819 8 : NDR_PULL_ALLOC(ndr, r->executablepath);
820 : } else {
821 8 : r->executablepath = NULL;
822 : }
823 16 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_loadordergroup));
824 16 : if (_ptr_loadordergroup) {
825 0 : NDR_PULL_ALLOC(ndr, r->loadordergroup);
826 : } else {
827 16 : r->loadordergroup = NULL;
828 : }
829 16 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->tag_id));
830 16 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
831 16 : if (_ptr_dependencies) {
832 0 : NDR_PULL_ALLOC(ndr, r->dependencies);
833 : } else {
834 16 : r->dependencies = NULL;
835 : }
836 16 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_startname));
837 16 : if (_ptr_startname) {
838 8 : NDR_PULL_ALLOC(ndr, r->startname);
839 : } else {
840 8 : r->startname = NULL;
841 : }
842 16 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_displayname));
843 16 : if (_ptr_displayname) {
844 8 : NDR_PULL_ALLOC(ndr, r->displayname);
845 : } else {
846 8 : r->displayname = NULL;
847 : }
848 16 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
849 : }
850 16 : if (ndr_flags & NDR_BUFFERS) {
851 16 : if (r->executablepath) {
852 8 : _mem_save_executablepath_0 = NDR_PULL_GET_MEM_CTX(ndr);
853 8 : NDR_PULL_SET_MEM_CTX(ndr, r->executablepath, 0);
854 8 : NDR_CHECK(ndr_pull_array_size(ndr, &r->executablepath));
855 8 : NDR_CHECK(ndr_pull_array_length(ndr, &r->executablepath));
856 8 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->executablepath, &size_executablepath_1));
857 8 : if (size_executablepath_1 > 8192) {
858 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_executablepath_1, (uint32_t)(0), (uint32_t)(8192));
859 : }
860 8 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->executablepath, &length_executablepath_1));
861 8 : if (length_executablepath_1 > 8192) {
862 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_executablepath_1, (uint32_t)(0), (uint32_t)(8192));
863 : }
864 8 : if (length_executablepath_1 > size_executablepath_1) {
865 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_executablepath_1, length_executablepath_1);
866 : }
867 8 : NDR_CHECK(ndr_check_string_terminator(ndr, length_executablepath_1, sizeof(uint16_t)));
868 8 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->executablepath, length_executablepath_1, sizeof(uint16_t), CH_UTF16));
869 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_executablepath_0, 0);
870 : }
871 16 : if (r->loadordergroup) {
872 0 : _mem_save_loadordergroup_0 = NDR_PULL_GET_MEM_CTX(ndr);
873 0 : NDR_PULL_SET_MEM_CTX(ndr, r->loadordergroup, 0);
874 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->loadordergroup));
875 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->loadordergroup));
876 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->loadordergroup, &size_loadordergroup_1));
877 0 : if (size_loadordergroup_1 > 8192) {
878 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_loadordergroup_1, (uint32_t)(0), (uint32_t)(8192));
879 : }
880 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->loadordergroup, &length_loadordergroup_1));
881 0 : if (length_loadordergroup_1 > 8192) {
882 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_loadordergroup_1, (uint32_t)(0), (uint32_t)(8192));
883 : }
884 0 : if (length_loadordergroup_1 > size_loadordergroup_1) {
885 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_loadordergroup_1, length_loadordergroup_1);
886 : }
887 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_loadordergroup_1, sizeof(uint16_t)));
888 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->loadordergroup, length_loadordergroup_1, sizeof(uint16_t), CH_UTF16));
889 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_loadordergroup_0, 0);
890 : }
891 16 : if (r->dependencies) {
892 0 : _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
893 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dependencies, 0);
894 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dependencies));
895 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->dependencies));
896 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dependencies, &size_dependencies_1));
897 0 : if (size_dependencies_1 > 8192) {
898 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_dependencies_1, (uint32_t)(0), (uint32_t)(8192));
899 : }
900 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dependencies, &length_dependencies_1));
901 0 : if (length_dependencies_1 > 8192) {
902 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_dependencies_1, (uint32_t)(0), (uint32_t)(8192));
903 : }
904 0 : if (length_dependencies_1 > size_dependencies_1) {
905 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dependencies_1, length_dependencies_1);
906 : }
907 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dependencies_1, sizeof(uint16_t)));
908 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dependencies, length_dependencies_1, sizeof(uint16_t), CH_UTF16));
909 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
910 : }
911 16 : if (r->startname) {
912 8 : _mem_save_startname_0 = NDR_PULL_GET_MEM_CTX(ndr);
913 8 : NDR_PULL_SET_MEM_CTX(ndr, r->startname, 0);
914 8 : NDR_CHECK(ndr_pull_array_size(ndr, &r->startname));
915 8 : NDR_CHECK(ndr_pull_array_length(ndr, &r->startname));
916 8 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->startname, &size_startname_1));
917 8 : if (size_startname_1 > 8192) {
918 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_startname_1, (uint32_t)(0), (uint32_t)(8192));
919 : }
920 8 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->startname, &length_startname_1));
921 8 : if (length_startname_1 > 8192) {
922 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_startname_1, (uint32_t)(0), (uint32_t)(8192));
923 : }
924 8 : if (length_startname_1 > size_startname_1) {
925 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_startname_1, length_startname_1);
926 : }
927 8 : NDR_CHECK(ndr_check_string_terminator(ndr, length_startname_1, sizeof(uint16_t)));
928 8 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->startname, length_startname_1, sizeof(uint16_t), CH_UTF16));
929 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_startname_0, 0);
930 : }
931 16 : if (r->displayname) {
932 8 : _mem_save_displayname_0 = NDR_PULL_GET_MEM_CTX(ndr);
933 8 : NDR_PULL_SET_MEM_CTX(ndr, r->displayname, 0);
934 8 : NDR_CHECK(ndr_pull_array_size(ndr, &r->displayname));
935 8 : NDR_CHECK(ndr_pull_array_length(ndr, &r->displayname));
936 8 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->displayname, &size_displayname_1));
937 8 : if (size_displayname_1 > 8192) {
938 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_displayname_1, (uint32_t)(0), (uint32_t)(8192));
939 : }
940 8 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->displayname, &length_displayname_1));
941 8 : if (length_displayname_1 > 8192) {
942 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_displayname_1, (uint32_t)(0), (uint32_t)(8192));
943 : }
944 8 : if (length_displayname_1 > size_displayname_1) {
945 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_displayname_1, length_displayname_1);
946 : }
947 8 : NDR_CHECK(ndr_check_string_terminator(ndr, length_displayname_1, sizeof(uint16_t)));
948 8 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->displayname, length_displayname_1, sizeof(uint16_t), CH_UTF16));
949 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_displayname_0, 0);
950 : }
951 : }
952 16 : return NDR_ERR_SUCCESS;
953 : }
954 :
955 0 : static void ndr_print_flags_QUERY_SERVICE_CONFIG(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct QUERY_SERVICE_CONFIG *r)
956 : {
957 0 : ndr_print_QUERY_SERVICE_CONFIG(ndr, name, r);
958 0 : }
959 :
960 0 : _PUBLIC_ void ndr_print_QUERY_SERVICE_CONFIG(struct ndr_print *ndr, const char *name, const struct QUERY_SERVICE_CONFIG *r)
961 : {
962 0 : ndr_print_struct(ndr, name, "QUERY_SERVICE_CONFIG");
963 0 : if (r == NULL) { ndr_print_null(ndr); return; }
964 0 : ndr->depth++;
965 0 : ndr_print_uint32(ndr, "service_type", r->service_type);
966 0 : ndr_print_svcctl_StartType(ndr, "start_type", r->start_type);
967 0 : ndr_print_svcctl_ErrorControl(ndr, "error_control", r->error_control);
968 0 : ndr_print_ptr(ndr, "executablepath", r->executablepath);
969 0 : ndr->depth++;
970 0 : if (r->executablepath) {
971 0 : ndr_print_string(ndr, "executablepath", r->executablepath);
972 : }
973 0 : ndr->depth--;
974 0 : ndr_print_ptr(ndr, "loadordergroup", r->loadordergroup);
975 0 : ndr->depth++;
976 0 : if (r->loadordergroup) {
977 0 : ndr_print_string(ndr, "loadordergroup", r->loadordergroup);
978 : }
979 0 : ndr->depth--;
980 0 : ndr_print_uint32(ndr, "tag_id", r->tag_id);
981 0 : ndr_print_ptr(ndr, "dependencies", r->dependencies);
982 0 : ndr->depth++;
983 0 : if (r->dependencies) {
984 0 : ndr_print_string(ndr, "dependencies", r->dependencies);
985 : }
986 0 : ndr->depth--;
987 0 : ndr_print_ptr(ndr, "startname", r->startname);
988 0 : ndr->depth++;
989 0 : if (r->startname) {
990 0 : ndr_print_string(ndr, "startname", r->startname);
991 : }
992 0 : ndr->depth--;
993 0 : ndr_print_ptr(ndr, "displayname", r->displayname);
994 0 : ndr->depth++;
995 0 : if (r->displayname) {
996 0 : ndr_print_string(ndr, "displayname", r->displayname);
997 : }
998 0 : ndr->depth--;
999 0 : ndr->depth--;
1000 : }
1001 :
1002 16 : _PUBLIC_ size_t ndr_size_QUERY_SERVICE_CONFIG(const struct QUERY_SERVICE_CONFIG *r, libndr_flags flags)
1003 : {
1004 16 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_QUERY_SERVICE_CONFIG);
1005 : }
1006 :
1007 0 : static enum ndr_err_code ndr_push_svcctl_ArgumentString(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct svcctl_ArgumentString *r)
1008 : {
1009 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1010 0 : if (ndr_flags & NDR_SCALARS) {
1011 0 : NDR_CHECK(ndr_push_align(ndr, 5));
1012 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
1013 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1014 : }
1015 0 : if (ndr_flags & NDR_BUFFERS) {
1016 0 : if (r->string) {
1017 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->string, CH_UTF16)));
1018 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1019 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->string, CH_UTF16)));
1020 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, ndr_charset_length(r->string, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1021 : }
1022 : }
1023 0 : return NDR_ERR_SUCCESS;
1024 : }
1025 :
1026 0 : static enum ndr_err_code ndr_pull_svcctl_ArgumentString(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct svcctl_ArgumentString *r)
1027 : {
1028 0 : uint32_t _ptr_string;
1029 0 : uint32_t size_string_1 = 0;
1030 0 : uint32_t length_string_1 = 0;
1031 0 : TALLOC_CTX *_mem_save_string_0 = NULL;
1032 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1033 0 : if (ndr_flags & NDR_SCALARS) {
1034 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
1035 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
1036 0 : if (_ptr_string) {
1037 0 : NDR_PULL_ALLOC(ndr, r->string);
1038 : } else {
1039 0 : r->string = NULL;
1040 : }
1041 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1042 : }
1043 0 : if (ndr_flags & NDR_BUFFERS) {
1044 0 : if (r->string) {
1045 0 : _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
1046 0 : NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
1047 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
1048 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->string));
1049 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->string, &size_string_1));
1050 0 : if (size_string_1 > SC_MAX_ARGUMENT_LENGTH) {
1051 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_string_1, (uint32_t)(0), (uint32_t)(SC_MAX_ARGUMENT_LENGTH));
1052 : }
1053 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->string, &length_string_1));
1054 0 : if (length_string_1 > SC_MAX_ARGUMENT_LENGTH) {
1055 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_string_1, (uint32_t)(0), (uint32_t)(SC_MAX_ARGUMENT_LENGTH));
1056 : }
1057 0 : if (length_string_1 > size_string_1) {
1058 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_string_1, length_string_1);
1059 : }
1060 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_string_1, sizeof(uint16_t)));
1061 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, length_string_1, sizeof(uint16_t), CH_UTF16));
1062 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
1063 : }
1064 : }
1065 0 : return NDR_ERR_SUCCESS;
1066 : }
1067 :
1068 0 : _PUBLIC_ void ndr_print_svcctl_ArgumentString(struct ndr_print *ndr, const char *name, const struct svcctl_ArgumentString *r)
1069 : {
1070 0 : ndr_print_struct(ndr, name, "svcctl_ArgumentString");
1071 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1072 0 : ndr->depth++;
1073 0 : ndr_print_ptr(ndr, "string", r->string);
1074 0 : ndr->depth++;
1075 0 : if (r->string) {
1076 0 : ndr_print_string(ndr, "string", r->string);
1077 : }
1078 0 : ndr->depth--;
1079 0 : ndr->depth--;
1080 : }
1081 :
1082 16 : static enum ndr_err_code ndr_push_svcctl_ConfigLevel(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum svcctl_ConfigLevel r)
1083 : {
1084 16 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
1085 16 : return NDR_ERR_SUCCESS;
1086 : }
1087 :
1088 16 : static enum ndr_err_code ndr_pull_svcctl_ConfigLevel(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum svcctl_ConfigLevel *r)
1089 : {
1090 0 : uint32_t v;
1091 16 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
1092 16 : *r = v;
1093 16 : return NDR_ERR_SUCCESS;
1094 : }
1095 :
1096 0 : _PUBLIC_ void ndr_print_svcctl_ConfigLevel(struct ndr_print *ndr, const char *name, enum svcctl_ConfigLevel r)
1097 : {
1098 0 : const char *val = NULL;
1099 :
1100 0 : switch (r) {
1101 0 : case SERVICE_CONFIG_DESCRIPTION: val = "SERVICE_CONFIG_DESCRIPTION"; break;
1102 0 : case SERVICE_CONFIG_FAILURE_ACTIONS: val = "SERVICE_CONFIG_FAILURE_ACTIONS"; break;
1103 : }
1104 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
1105 0 : }
1106 :
1107 8 : _PUBLIC_ enum ndr_err_code ndr_push_SERVICE_DESCRIPTION(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct SERVICE_DESCRIPTION *r)
1108 : {
1109 8 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1110 8 : if (ndr_flags & NDR_SCALARS) {
1111 8 : NDR_CHECK(ndr_push_align(ndr, 5));
1112 : {
1113 8 : libndr_flags _flags_save_string = ndr->flags;
1114 8 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1115 8 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->description));
1116 8 : ndr->flags = _flags_save_string;
1117 : }
1118 8 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1119 : }
1120 8 : if (ndr_flags & NDR_BUFFERS) {
1121 : {
1122 8 : libndr_flags _flags_save_string = ndr->flags;
1123 8 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1124 8 : if (r->description) {
1125 8 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->description));
1126 8 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->description));
1127 8 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->description));
1128 : }
1129 8 : ndr->flags = _flags_save_string;
1130 : }
1131 : }
1132 8 : return NDR_ERR_SUCCESS;
1133 : }
1134 :
1135 0 : _PUBLIC_ enum ndr_err_code ndr_pull_SERVICE_DESCRIPTION(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct SERVICE_DESCRIPTION *r)
1136 : {
1137 0 : uint32_t _ptr_description;
1138 0 : TALLOC_CTX *_mem_save_description_0 = NULL;
1139 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1140 0 : if (ndr_flags & NDR_SCALARS) {
1141 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
1142 : {
1143 0 : libndr_flags _flags_save_string = ndr->flags;
1144 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1145 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_description));
1146 0 : if (_ptr_description) {
1147 0 : NDR_PULL_ALLOC(ndr, r->description);
1148 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->description, _ptr_description));
1149 : } else {
1150 0 : r->description = NULL;
1151 : }
1152 0 : ndr->flags = _flags_save_string;
1153 : }
1154 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1155 : }
1156 0 : if (ndr_flags & NDR_BUFFERS) {
1157 : {
1158 0 : libndr_flags _flags_save_string = ndr->flags;
1159 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1160 0 : if (r->description) {
1161 0 : uint32_t _relative_save_offset;
1162 0 : _relative_save_offset = ndr->offset;
1163 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->description));
1164 0 : _mem_save_description_0 = NDR_PULL_GET_MEM_CTX(ndr);
1165 0 : NDR_PULL_SET_MEM_CTX(ndr, r->description, 0);
1166 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->description));
1167 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_description_0, 0);
1168 0 : if (ndr->offset > ndr->relative_highest_offset) {
1169 0 : ndr->relative_highest_offset = ndr->offset;
1170 : }
1171 0 : ndr->offset = _relative_save_offset;
1172 : }
1173 0 : ndr->flags = _flags_save_string;
1174 : }
1175 : }
1176 0 : return NDR_ERR_SUCCESS;
1177 : }
1178 :
1179 0 : static void ndr_print_flags_SERVICE_DESCRIPTION(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct SERVICE_DESCRIPTION *r)
1180 : {
1181 0 : ndr_print_SERVICE_DESCRIPTION(ndr, name, r);
1182 0 : }
1183 :
1184 0 : _PUBLIC_ void ndr_print_SERVICE_DESCRIPTION(struct ndr_print *ndr, const char *name, const struct SERVICE_DESCRIPTION *r)
1185 : {
1186 0 : ndr_print_struct(ndr, name, "SERVICE_DESCRIPTION");
1187 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1188 0 : ndr->depth++;
1189 : {
1190 0 : libndr_flags _flags_save_string = ndr->flags;
1191 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1192 0 : ndr_print_ptr(ndr, "description", r->description);
1193 0 : ndr->depth++;
1194 0 : if (r->description) {
1195 0 : ndr_print_string(ndr, "description", r->description);
1196 : }
1197 0 : ndr->depth--;
1198 0 : ndr->flags = _flags_save_string;
1199 : }
1200 0 : ndr->depth--;
1201 : }
1202 :
1203 0 : _PUBLIC_ size_t ndr_size_SERVICE_DESCRIPTION(const struct SERVICE_DESCRIPTION *r, libndr_flags flags)
1204 : {
1205 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_SERVICE_DESCRIPTION);
1206 : }
1207 :
1208 0 : static enum ndr_err_code ndr_push_SC_ACTION_TYPE(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum SC_ACTION_TYPE r)
1209 : {
1210 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
1211 0 : return NDR_ERR_SUCCESS;
1212 : }
1213 :
1214 0 : static enum ndr_err_code ndr_pull_SC_ACTION_TYPE(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum SC_ACTION_TYPE *r)
1215 : {
1216 0 : uint32_t v;
1217 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
1218 0 : *r = v;
1219 0 : return NDR_ERR_SUCCESS;
1220 : }
1221 :
1222 0 : _PUBLIC_ void ndr_print_SC_ACTION_TYPE(struct ndr_print *ndr, const char *name, enum SC_ACTION_TYPE r)
1223 : {
1224 0 : const char *val = NULL;
1225 :
1226 0 : switch (r) {
1227 0 : case SC_ACTION_NONE: val = "SC_ACTION_NONE"; break;
1228 0 : case SC_ACTION_RESTART: val = "SC_ACTION_RESTART"; break;
1229 0 : case SC_ACTION_REBOOT: val = "SC_ACTION_REBOOT"; break;
1230 0 : case SC_ACTION_RUN_COMMAND: val = "SC_ACTION_RUN_COMMAND"; break;
1231 : }
1232 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
1233 0 : }
1234 :
1235 0 : static enum ndr_err_code ndr_push_SC_ACTION(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct SC_ACTION *r)
1236 : {
1237 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1238 0 : if (ndr_flags & NDR_SCALARS) {
1239 0 : NDR_CHECK(ndr_push_align(ndr, 4));
1240 0 : NDR_CHECK(ndr_push_SC_ACTION_TYPE(ndr, NDR_SCALARS, r->type));
1241 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->delay));
1242 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1243 : }
1244 0 : if (ndr_flags & NDR_BUFFERS) {
1245 0 : }
1246 0 : return NDR_ERR_SUCCESS;
1247 : }
1248 :
1249 0 : static enum ndr_err_code ndr_pull_SC_ACTION(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct SC_ACTION *r)
1250 : {
1251 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1252 0 : if (ndr_flags & NDR_SCALARS) {
1253 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
1254 0 : NDR_CHECK(ndr_pull_SC_ACTION_TYPE(ndr, NDR_SCALARS, &r->type));
1255 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->delay));
1256 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1257 : }
1258 0 : if (ndr_flags & NDR_BUFFERS) {
1259 0 : }
1260 0 : return NDR_ERR_SUCCESS;
1261 : }
1262 :
1263 0 : _PUBLIC_ void ndr_print_SC_ACTION(struct ndr_print *ndr, const char *name, const struct SC_ACTION *r)
1264 : {
1265 0 : ndr_print_struct(ndr, name, "SC_ACTION");
1266 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1267 0 : ndr->depth++;
1268 0 : ndr_print_SC_ACTION_TYPE(ndr, "type", r->type);
1269 0 : ndr_print_uint32(ndr, "delay", r->delay);
1270 0 : ndr->depth--;
1271 : }
1272 :
1273 8 : _PUBLIC_ enum ndr_err_code ndr_push_SERVICE_FAILURE_ACTIONSW(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct SERVICE_FAILURE_ACTIONSW *r)
1274 : {
1275 0 : uint32_t cntr_actions_1;
1276 8 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1277 8 : if (ndr_flags & NDR_SCALARS) {
1278 8 : NDR_CHECK(ndr_push_align(ndr, 5));
1279 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reset_period));
1280 : {
1281 8 : libndr_flags _flags_save_string = ndr->flags;
1282 8 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1283 8 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->rebootmsg));
1284 8 : ndr->flags = _flags_save_string;
1285 : }
1286 : {
1287 8 : libndr_flags _flags_save_string = ndr->flags;
1288 8 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1289 8 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->command));
1290 8 : ndr->flags = _flags_save_string;
1291 : }
1292 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_actions));
1293 8 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->actions));
1294 8 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1295 : }
1296 8 : if (ndr_flags & NDR_BUFFERS) {
1297 : {
1298 8 : libndr_flags _flags_save_string = ndr->flags;
1299 8 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1300 8 : if (r->rebootmsg) {
1301 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->rebootmsg));
1302 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->rebootmsg));
1303 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->rebootmsg));
1304 : }
1305 8 : ndr->flags = _flags_save_string;
1306 : }
1307 : {
1308 8 : libndr_flags _flags_save_string = ndr->flags;
1309 8 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1310 8 : if (r->command) {
1311 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->command));
1312 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->command));
1313 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->command));
1314 : }
1315 8 : ndr->flags = _flags_save_string;
1316 : }
1317 8 : if (r->actions) {
1318 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->actions));
1319 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_actions));
1320 0 : for (cntr_actions_1 = 0; cntr_actions_1 < (r->num_actions); cntr_actions_1++) {
1321 0 : NDR_CHECK(ndr_push_SC_ACTION(ndr, NDR_SCALARS, &r->actions[cntr_actions_1]));
1322 : }
1323 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->actions));
1324 : }
1325 : }
1326 8 : return NDR_ERR_SUCCESS;
1327 : }
1328 :
1329 0 : _PUBLIC_ enum ndr_err_code ndr_pull_SERVICE_FAILURE_ACTIONSW(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct SERVICE_FAILURE_ACTIONSW *r)
1330 : {
1331 0 : uint32_t _ptr_rebootmsg;
1332 0 : TALLOC_CTX *_mem_save_rebootmsg_0 = NULL;
1333 0 : uint32_t _ptr_command;
1334 0 : TALLOC_CTX *_mem_save_command_0 = NULL;
1335 0 : uint32_t _ptr_actions;
1336 0 : uint32_t size_actions_1 = 0;
1337 0 : uint32_t cntr_actions_1;
1338 0 : TALLOC_CTX *_mem_save_actions_0 = NULL;
1339 0 : TALLOC_CTX *_mem_save_actions_1 = NULL;
1340 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1341 0 : if (ndr_flags & NDR_SCALARS) {
1342 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
1343 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reset_period));
1344 : {
1345 0 : libndr_flags _flags_save_string = ndr->flags;
1346 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1347 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rebootmsg));
1348 0 : if (_ptr_rebootmsg) {
1349 0 : NDR_PULL_ALLOC(ndr, r->rebootmsg);
1350 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->rebootmsg, _ptr_rebootmsg));
1351 : } else {
1352 0 : r->rebootmsg = NULL;
1353 : }
1354 0 : ndr->flags = _flags_save_string;
1355 : }
1356 : {
1357 0 : libndr_flags _flags_save_string = ndr->flags;
1358 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1359 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_command));
1360 0 : if (_ptr_command) {
1361 0 : NDR_PULL_ALLOC(ndr, r->command);
1362 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->command, _ptr_command));
1363 : } else {
1364 0 : r->command = NULL;
1365 : }
1366 0 : ndr->flags = _flags_save_string;
1367 : }
1368 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_actions));
1369 0 : if (r->num_actions > 1024) {
1370 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->num_actions), (uint32_t)(0), (uint32_t)(1024));
1371 : }
1372 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_actions));
1373 0 : if (_ptr_actions) {
1374 0 : NDR_PULL_ALLOC(ndr, r->actions);
1375 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->actions, _ptr_actions));
1376 : } else {
1377 0 : r->actions = NULL;
1378 : }
1379 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1380 : }
1381 0 : if (ndr_flags & NDR_BUFFERS) {
1382 : {
1383 0 : libndr_flags _flags_save_string = ndr->flags;
1384 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1385 0 : if (r->rebootmsg) {
1386 0 : uint32_t _relative_save_offset;
1387 0 : _relative_save_offset = ndr->offset;
1388 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->rebootmsg));
1389 0 : _mem_save_rebootmsg_0 = NDR_PULL_GET_MEM_CTX(ndr);
1390 0 : NDR_PULL_SET_MEM_CTX(ndr, r->rebootmsg, 0);
1391 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->rebootmsg));
1392 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rebootmsg_0, 0);
1393 0 : if (ndr->offset > ndr->relative_highest_offset) {
1394 0 : ndr->relative_highest_offset = ndr->offset;
1395 : }
1396 0 : ndr->offset = _relative_save_offset;
1397 : }
1398 0 : ndr->flags = _flags_save_string;
1399 : }
1400 : {
1401 0 : libndr_flags _flags_save_string = ndr->flags;
1402 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1403 0 : if (r->command) {
1404 0 : uint32_t _relative_save_offset;
1405 0 : _relative_save_offset = ndr->offset;
1406 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->command));
1407 0 : _mem_save_command_0 = NDR_PULL_GET_MEM_CTX(ndr);
1408 0 : NDR_PULL_SET_MEM_CTX(ndr, r->command, 0);
1409 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->command));
1410 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_command_0, 0);
1411 0 : if (ndr->offset > ndr->relative_highest_offset) {
1412 0 : ndr->relative_highest_offset = ndr->offset;
1413 : }
1414 0 : ndr->offset = _relative_save_offset;
1415 : }
1416 0 : ndr->flags = _flags_save_string;
1417 : }
1418 0 : if (r->actions) {
1419 0 : uint32_t _relative_save_offset;
1420 0 : _relative_save_offset = ndr->offset;
1421 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->actions));
1422 0 : _mem_save_actions_0 = NDR_PULL_GET_MEM_CTX(ndr);
1423 0 : NDR_PULL_SET_MEM_CTX(ndr, r->actions, 0);
1424 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->actions));
1425 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->actions, &size_actions_1));
1426 0 : NDR_PULL_ALLOC_N(ndr, r->actions, size_actions_1);
1427 0 : _mem_save_actions_1 = NDR_PULL_GET_MEM_CTX(ndr);
1428 0 : NDR_PULL_SET_MEM_CTX(ndr, r->actions, 0);
1429 0 : for (cntr_actions_1 = 0; cntr_actions_1 < (size_actions_1); cntr_actions_1++) {
1430 0 : NDR_CHECK(ndr_pull_SC_ACTION(ndr, NDR_SCALARS, &r->actions[cntr_actions_1]));
1431 : }
1432 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_actions_1, 0);
1433 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_actions_0, 0);
1434 0 : if (ndr->offset > ndr->relative_highest_offset) {
1435 0 : ndr->relative_highest_offset = ndr->offset;
1436 : }
1437 0 : ndr->offset = _relative_save_offset;
1438 : }
1439 0 : if (r->actions) {
1440 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->actions, r->num_actions));
1441 : }
1442 : }
1443 0 : return NDR_ERR_SUCCESS;
1444 : }
1445 :
1446 0 : static void ndr_print_flags_SERVICE_FAILURE_ACTIONSW(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct SERVICE_FAILURE_ACTIONSW *r)
1447 : {
1448 0 : ndr_print_SERVICE_FAILURE_ACTIONSW(ndr, name, r);
1449 0 : }
1450 :
1451 0 : _PUBLIC_ void ndr_print_SERVICE_FAILURE_ACTIONSW(struct ndr_print *ndr, const char *name, const struct SERVICE_FAILURE_ACTIONSW *r)
1452 : {
1453 0 : uint32_t cntr_actions_1;
1454 0 : ndr_print_struct(ndr, name, "SERVICE_FAILURE_ACTIONSW");
1455 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1456 0 : ndr->depth++;
1457 0 : ndr_print_uint32(ndr, "reset_period", r->reset_period);
1458 : {
1459 0 : libndr_flags _flags_save_string = ndr->flags;
1460 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1461 0 : ndr_print_ptr(ndr, "rebootmsg", r->rebootmsg);
1462 0 : ndr->depth++;
1463 0 : if (r->rebootmsg) {
1464 0 : ndr_print_string(ndr, "rebootmsg", r->rebootmsg);
1465 : }
1466 0 : ndr->depth--;
1467 0 : ndr->flags = _flags_save_string;
1468 : }
1469 : {
1470 0 : libndr_flags _flags_save_string = ndr->flags;
1471 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1472 0 : ndr_print_ptr(ndr, "command", r->command);
1473 0 : ndr->depth++;
1474 0 : if (r->command) {
1475 0 : ndr_print_string(ndr, "command", r->command);
1476 : }
1477 0 : ndr->depth--;
1478 0 : ndr->flags = _flags_save_string;
1479 : }
1480 0 : ndr_print_uint32(ndr, "num_actions", r->num_actions);
1481 0 : ndr_print_ptr(ndr, "actions", r->actions);
1482 0 : ndr->depth++;
1483 0 : if (r->actions) {
1484 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "actions", (uint32_t)(r->num_actions));
1485 0 : ndr->depth++;
1486 0 : for (cntr_actions_1 = 0; cntr_actions_1 < (r->num_actions); cntr_actions_1++) {
1487 0 : ndr_print_SC_ACTION(ndr, "actions", &r->actions[cntr_actions_1]);
1488 : }
1489 0 : ndr->depth--;
1490 : }
1491 0 : ndr->depth--;
1492 0 : ndr->depth--;
1493 : }
1494 :
1495 0 : _PUBLIC_ size_t ndr_size_SERVICE_FAILURE_ACTIONSW(const struct SERVICE_FAILURE_ACTIONSW *r, libndr_flags flags)
1496 : {
1497 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_SERVICE_FAILURE_ACTIONSW);
1498 : }
1499 :
1500 8 : static enum ndr_err_code ndr_push_svcctl_StatusLevel(struct ndr_push *ndr, ndr_flags_type ndr_flags, enum svcctl_StatusLevel r)
1501 : {
1502 8 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
1503 8 : return NDR_ERR_SUCCESS;
1504 : }
1505 :
1506 8 : static enum ndr_err_code ndr_pull_svcctl_StatusLevel(struct ndr_pull *ndr, ndr_flags_type ndr_flags, enum svcctl_StatusLevel *r)
1507 : {
1508 0 : uint32_t v;
1509 8 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
1510 8 : *r = v;
1511 8 : return NDR_ERR_SUCCESS;
1512 : }
1513 :
1514 0 : _PUBLIC_ void ndr_print_svcctl_StatusLevel(struct ndr_print *ndr, const char *name, enum svcctl_StatusLevel r)
1515 : {
1516 0 : const char *val = NULL;
1517 :
1518 0 : switch (r) {
1519 0 : case SVC_STATUS_PROCESS_INFO: val = "SVC_STATUS_PROCESS_INFO"; break;
1520 : }
1521 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
1522 0 : }
1523 :
1524 0 : static enum ndr_err_code ndr_push_SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1 *r)
1525 : {
1526 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1527 0 : if (ndr_flags & NDR_SCALARS) {
1528 0 : NDR_CHECK(ndr_push_align(ndr, 8));
1529 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->ullThreadId));
1530 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwNotifyMask));
1531 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->CallbackAddressArray, 16));
1532 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->CallbackParamAddressArray, 16));
1533 0 : NDR_CHECK(ndr_push_SERVICE_STATUS_PROCESS(ndr, NDR_SCALARS, &r->ServiceStatus));
1534 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwNotificationStatus));
1535 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwSequence));
1536 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
1537 : }
1538 0 : if (ndr_flags & NDR_BUFFERS) {
1539 0 : }
1540 0 : return NDR_ERR_SUCCESS;
1541 : }
1542 :
1543 0 : static enum ndr_err_code ndr_pull_SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1 *r)
1544 : {
1545 0 : uint32_t size_CallbackAddressArray_0 = 0;
1546 0 : uint32_t size_CallbackParamAddressArray_0 = 0;
1547 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1548 0 : if (ndr_flags & NDR_SCALARS) {
1549 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
1550 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->ullThreadId));
1551 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwNotifyMask));
1552 0 : size_CallbackAddressArray_0 = 16;
1553 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->CallbackAddressArray, size_CallbackAddressArray_0));
1554 0 : size_CallbackParamAddressArray_0 = 16;
1555 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->CallbackParamAddressArray, size_CallbackParamAddressArray_0));
1556 0 : NDR_CHECK(ndr_pull_SERVICE_STATUS_PROCESS(ndr, NDR_SCALARS, &r->ServiceStatus));
1557 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwNotificationStatus));
1558 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwSequence));
1559 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
1560 : }
1561 0 : if (ndr_flags & NDR_BUFFERS) {
1562 0 : }
1563 0 : return NDR_ERR_SUCCESS;
1564 : }
1565 :
1566 0 : _PUBLIC_ void ndr_print_SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1(struct ndr_print *ndr, const char *name, const struct SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1 *r)
1567 : {
1568 0 : ndr_print_struct(ndr, name, "SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1");
1569 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1570 0 : ndr->depth++;
1571 0 : ndr_print_hyper(ndr, "ullThreadId", r->ullThreadId);
1572 0 : ndr_print_uint32(ndr, "dwNotifyMask", r->dwNotifyMask);
1573 0 : ndr_print_array_uint8(ndr, "CallbackAddressArray", r->CallbackAddressArray, 16);
1574 0 : ndr_print_array_uint8(ndr, "CallbackParamAddressArray", r->CallbackParamAddressArray, 16);
1575 0 : ndr_print_SERVICE_STATUS_PROCESS(ndr, "ServiceStatus", &r->ServiceStatus);
1576 0 : ndr_print_uint32(ndr, "dwNotificationStatus", r->dwNotificationStatus);
1577 0 : ndr_print_uint32(ndr, "dwSequence", r->dwSequence);
1578 0 : ndr->depth--;
1579 : }
1580 :
1581 0 : static enum ndr_err_code ndr_push_SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2 *r)
1582 : {
1583 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1584 0 : if (ndr_flags & NDR_SCALARS) {
1585 0 : NDR_CHECK(ndr_push_align(ndr, 8));
1586 0 : NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->ullThreadId));
1587 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwNotifyMask));
1588 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->CallbackAddressArray, 16));
1589 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->CallbackParamAddressArray, 16));
1590 0 : NDR_CHECK(ndr_push_SERVICE_STATUS_PROCESS(ndr, NDR_SCALARS, &r->ServiceStatus));
1591 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwNotificationStatus));
1592 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwSequence));
1593 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwNotificationTriggered));
1594 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszServiceNames));
1595 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 8));
1596 : }
1597 0 : if (ndr_flags & NDR_BUFFERS) {
1598 0 : if (r->pszServiceNames) {
1599 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszServiceNames, CH_UTF16)));
1600 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1601 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszServiceNames, CH_UTF16)));
1602 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszServiceNames, ndr_charset_length(r->pszServiceNames, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1603 : }
1604 : }
1605 0 : return NDR_ERR_SUCCESS;
1606 : }
1607 :
1608 0 : static enum ndr_err_code ndr_pull_SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2 *r)
1609 : {
1610 0 : uint32_t size_CallbackAddressArray_0 = 0;
1611 0 : uint32_t size_CallbackParamAddressArray_0 = 0;
1612 0 : uint32_t _ptr_pszServiceNames;
1613 0 : uint32_t size_pszServiceNames_1 = 0;
1614 0 : uint32_t length_pszServiceNames_1 = 0;
1615 0 : TALLOC_CTX *_mem_save_pszServiceNames_0 = NULL;
1616 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1617 0 : if (ndr_flags & NDR_SCALARS) {
1618 0 : NDR_CHECK(ndr_pull_align(ndr, 8));
1619 0 : NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->ullThreadId));
1620 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwNotifyMask));
1621 0 : size_CallbackAddressArray_0 = 16;
1622 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->CallbackAddressArray, size_CallbackAddressArray_0));
1623 0 : size_CallbackParamAddressArray_0 = 16;
1624 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->CallbackParamAddressArray, size_CallbackParamAddressArray_0));
1625 0 : NDR_CHECK(ndr_pull_SERVICE_STATUS_PROCESS(ndr, NDR_SCALARS, &r->ServiceStatus));
1626 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwNotificationStatus));
1627 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwSequence));
1628 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwNotificationTriggered));
1629 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszServiceNames));
1630 0 : if (_ptr_pszServiceNames) {
1631 0 : NDR_PULL_ALLOC(ndr, r->pszServiceNames);
1632 : } else {
1633 0 : r->pszServiceNames = NULL;
1634 : }
1635 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 8));
1636 : }
1637 0 : if (ndr_flags & NDR_BUFFERS) {
1638 0 : if (r->pszServiceNames) {
1639 0 : _mem_save_pszServiceNames_0 = NDR_PULL_GET_MEM_CTX(ndr);
1640 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pszServiceNames, 0);
1641 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszServiceNames));
1642 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszServiceNames));
1643 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszServiceNames, &size_pszServiceNames_1));
1644 0 : if (size_pszServiceNames_1 > 64*1024) {
1645 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_pszServiceNames_1, (uint32_t)(0), (uint32_t)(64*1024));
1646 : }
1647 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszServiceNames, &length_pszServiceNames_1));
1648 0 : if (length_pszServiceNames_1 > 64*1024) {
1649 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_pszServiceNames_1, (uint32_t)(0), (uint32_t)(64*1024));
1650 : }
1651 0 : if (length_pszServiceNames_1 > size_pszServiceNames_1) {
1652 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszServiceNames_1, length_pszServiceNames_1);
1653 : }
1654 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszServiceNames_1, sizeof(uint16_t)));
1655 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszServiceNames, length_pszServiceNames_1, sizeof(uint16_t), CH_UTF16));
1656 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszServiceNames_0, 0);
1657 : }
1658 : }
1659 0 : return NDR_ERR_SUCCESS;
1660 : }
1661 :
1662 0 : _PUBLIC_ void ndr_print_SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2(struct ndr_print *ndr, const char *name, const struct SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2 *r)
1663 : {
1664 0 : ndr_print_struct(ndr, name, "SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2");
1665 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1666 0 : ndr->depth++;
1667 0 : ndr_print_hyper(ndr, "ullThreadId", r->ullThreadId);
1668 0 : ndr_print_uint32(ndr, "dwNotifyMask", r->dwNotifyMask);
1669 0 : ndr_print_array_uint8(ndr, "CallbackAddressArray", r->CallbackAddressArray, 16);
1670 0 : ndr_print_array_uint8(ndr, "CallbackParamAddressArray", r->CallbackParamAddressArray, 16);
1671 0 : ndr_print_SERVICE_STATUS_PROCESS(ndr, "ServiceStatus", &r->ServiceStatus);
1672 0 : ndr_print_uint32(ndr, "dwNotificationStatus", r->dwNotificationStatus);
1673 0 : ndr_print_uint32(ndr, "dwSequence", r->dwSequence);
1674 0 : ndr_print_uint32(ndr, "dwNotificationTriggered", r->dwNotificationTriggered);
1675 0 : ndr_print_ptr(ndr, "pszServiceNames", r->pszServiceNames);
1676 0 : ndr->depth++;
1677 0 : if (r->pszServiceNames) {
1678 0 : ndr_print_string(ndr, "pszServiceNames", r->pszServiceNames);
1679 : }
1680 0 : ndr->depth--;
1681 0 : ndr->depth--;
1682 : }
1683 :
1684 0 : static enum ndr_err_code ndr_push_SC_RPC_NOTIFY_PARAMS_u(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union SC_RPC_NOTIFY_PARAMS_u *r)
1685 : {
1686 0 : uint32_t level;
1687 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1688 0 : if (ndr_flags & NDR_SCALARS) {
1689 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1690 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1691 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
1692 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
1693 : /* ms_union is always aligned to the largest union arm*/
1694 0 : NDR_CHECK(ndr_push_align(ndr, 5));
1695 0 : switch (level) {
1696 0 : case 1: {
1697 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pStatusChangeParam1));
1698 0 : break; }
1699 :
1700 0 : case 2: {
1701 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pStatusChangeParams));
1702 0 : break; }
1703 :
1704 0 : default:
1705 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
1706 : }
1707 : }
1708 0 : if (ndr_flags & NDR_BUFFERS) {
1709 0 : if (!(ndr_flags & NDR_SCALARS)) {
1710 : /* We didn't get it above, and the token is not needed after this. */
1711 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
1712 : }
1713 0 : switch (level) {
1714 0 : case 1:
1715 0 : if (r->pStatusChangeParam1) {
1716 0 : NDR_CHECK(ndr_push_SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1(ndr, NDR_SCALARS, r->pStatusChangeParam1));
1717 : }
1718 0 : break;
1719 :
1720 0 : case 2:
1721 0 : if (r->pStatusChangeParams) {
1722 0 : NDR_CHECK(ndr_push_SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2(ndr, NDR_SCALARS|NDR_BUFFERS, r->pStatusChangeParams));
1723 : }
1724 0 : break;
1725 :
1726 0 : default:
1727 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
1728 : }
1729 : }
1730 0 : return NDR_ERR_SUCCESS;
1731 : }
1732 :
1733 0 : static enum ndr_err_code ndr_pull_SC_RPC_NOTIFY_PARAMS_u(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union SC_RPC_NOTIFY_PARAMS_u *r)
1734 : {
1735 0 : uint32_t level;
1736 0 : uint32_t _level;
1737 0 : TALLOC_CTX *_mem_save_pStatusChangeParam1_0 = NULL;
1738 0 : uint32_t _ptr_pStatusChangeParam1;
1739 0 : TALLOC_CTX *_mem_save_pStatusChangeParams_0 = NULL;
1740 0 : uint32_t _ptr_pStatusChangeParams;
1741 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1742 0 : if (ndr_flags & NDR_SCALARS) {
1743 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
1744 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
1745 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
1746 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
1747 0 : if (_level != level) {
1748 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
1749 : }
1750 : /* ms_union is always aligned to the largest union arm*/
1751 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
1752 0 : switch (level) {
1753 0 : case 1: {
1754 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pStatusChangeParam1));
1755 0 : if (_ptr_pStatusChangeParam1) {
1756 0 : NDR_PULL_ALLOC(ndr, r->pStatusChangeParam1);
1757 : } else {
1758 0 : r->pStatusChangeParam1 = NULL;
1759 : }
1760 0 : break; }
1761 :
1762 0 : case 2: {
1763 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pStatusChangeParams));
1764 0 : if (_ptr_pStatusChangeParams) {
1765 0 : NDR_PULL_ALLOC(ndr, r->pStatusChangeParams);
1766 : } else {
1767 0 : r->pStatusChangeParams = NULL;
1768 : }
1769 0 : break; }
1770 :
1771 0 : default:
1772 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
1773 : }
1774 : }
1775 0 : if (ndr_flags & NDR_BUFFERS) {
1776 0 : if (!(ndr_flags & NDR_SCALARS)) {
1777 : /* We didn't get it above, and the token is not needed after this. */
1778 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
1779 : }
1780 0 : switch (level) {
1781 0 : case 1:
1782 0 : if (r->pStatusChangeParam1) {
1783 0 : _mem_save_pStatusChangeParam1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1784 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pStatusChangeParam1, 0);
1785 0 : NDR_CHECK(ndr_pull_SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1(ndr, NDR_SCALARS, r->pStatusChangeParam1));
1786 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pStatusChangeParam1_0, 0);
1787 : }
1788 0 : break;
1789 :
1790 0 : case 2:
1791 0 : if (r->pStatusChangeParams) {
1792 0 : _mem_save_pStatusChangeParams_0 = NDR_PULL_GET_MEM_CTX(ndr);
1793 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pStatusChangeParams, 0);
1794 0 : NDR_CHECK(ndr_pull_SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2(ndr, NDR_SCALARS|NDR_BUFFERS, r->pStatusChangeParams));
1795 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pStatusChangeParams_0, 0);
1796 : }
1797 0 : break;
1798 :
1799 0 : default:
1800 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
1801 : }
1802 : }
1803 0 : return NDR_ERR_SUCCESS;
1804 : }
1805 :
1806 0 : _PUBLIC_ void ndr_print_SC_RPC_NOTIFY_PARAMS_u(struct ndr_print *ndr, const char *name, const union SC_RPC_NOTIFY_PARAMS_u *r)
1807 : {
1808 0 : uint32_t level;
1809 0 : level = ndr_print_steal_switch_value(ndr, r);
1810 0 : ndr_print_union(ndr, name, level, "SC_RPC_NOTIFY_PARAMS_u");
1811 0 : switch (level) {
1812 0 : case 1:
1813 0 : ndr_print_ptr(ndr, "pStatusChangeParam1", r->pStatusChangeParam1);
1814 0 : ndr->depth++;
1815 0 : if (r->pStatusChangeParam1) {
1816 0 : ndr_print_SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_1(ndr, "pStatusChangeParam1", r->pStatusChangeParam1);
1817 : }
1818 0 : ndr->depth--;
1819 0 : break;
1820 :
1821 0 : case 2:
1822 0 : ndr_print_ptr(ndr, "pStatusChangeParams", r->pStatusChangeParams);
1823 0 : ndr->depth++;
1824 0 : if (r->pStatusChangeParams) {
1825 0 : ndr_print_SERVICE_NOTIFY_STATUS_CHANGE_PARAMS_2(ndr, "pStatusChangeParams", r->pStatusChangeParams);
1826 : }
1827 0 : ndr->depth--;
1828 0 : break;
1829 :
1830 0 : default:
1831 0 : ndr_print_bad_level(ndr, name, level);
1832 : }
1833 0 : }
1834 :
1835 0 : static enum ndr_err_code ndr_push_SC_RPC_NOTIFY_PARAMS(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct SC_RPC_NOTIFY_PARAMS *r)
1836 : {
1837 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1838 0 : if (ndr_flags & NDR_SCALARS) {
1839 0 : NDR_CHECK(ndr_push_align(ndr, 5));
1840 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwInfoLevel));
1841 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->u, r->dwInfoLevel));
1842 0 : NDR_CHECK(ndr_push_SC_RPC_NOTIFY_PARAMS_u(ndr, NDR_SCALARS, &r->u));
1843 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1844 : }
1845 0 : if (ndr_flags & NDR_BUFFERS) {
1846 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->u, r->dwInfoLevel));
1847 0 : NDR_CHECK(ndr_push_SC_RPC_NOTIFY_PARAMS_u(ndr, NDR_BUFFERS, &r->u));
1848 : }
1849 0 : return NDR_ERR_SUCCESS;
1850 : }
1851 :
1852 0 : static enum ndr_err_code ndr_pull_SC_RPC_NOTIFY_PARAMS(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct SC_RPC_NOTIFY_PARAMS *r)
1853 : {
1854 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1855 0 : if (ndr_flags & NDR_SCALARS) {
1856 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
1857 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwInfoLevel));
1858 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->u, r->dwInfoLevel));
1859 0 : NDR_CHECK(ndr_pull_SC_RPC_NOTIFY_PARAMS_u(ndr, NDR_SCALARS, &r->u));
1860 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1861 : }
1862 0 : if (ndr_flags & NDR_BUFFERS) {
1863 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->u, r->dwInfoLevel));
1864 0 : NDR_CHECK(ndr_pull_SC_RPC_NOTIFY_PARAMS_u(ndr, NDR_BUFFERS, &r->u));
1865 : }
1866 0 : return NDR_ERR_SUCCESS;
1867 : }
1868 :
1869 0 : _PUBLIC_ void ndr_print_SC_RPC_NOTIFY_PARAMS(struct ndr_print *ndr, const char *name, const struct SC_RPC_NOTIFY_PARAMS *r)
1870 : {
1871 0 : ndr_print_struct(ndr, name, "SC_RPC_NOTIFY_PARAMS");
1872 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1873 0 : ndr->depth++;
1874 0 : ndr_print_uint32(ndr, "dwInfoLevel", r->dwInfoLevel);
1875 0 : ndr_print_set_switch_value(ndr, &r->u, r->dwInfoLevel);
1876 0 : ndr_print_SC_RPC_NOTIFY_PARAMS_u(ndr, "u", &r->u);
1877 0 : ndr->depth--;
1878 : }
1879 :
1880 0 : static enum ndr_err_code ndr_push_SC_RPC_NOTIFY_PARAMS_LIST(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct SC_RPC_NOTIFY_PARAMS_LIST *r)
1881 : {
1882 0 : uint32_t cntr_NotifyParamsArray_0;
1883 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1884 0 : if (ndr_flags & NDR_SCALARS) {
1885 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->cElements));
1886 0 : NDR_CHECK(ndr_push_align(ndr, 5));
1887 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cElements));
1888 0 : for (cntr_NotifyParamsArray_0 = 0; cntr_NotifyParamsArray_0 < (r->cElements); cntr_NotifyParamsArray_0++) {
1889 0 : NDR_CHECK(ndr_push_SC_RPC_NOTIFY_PARAMS(ndr, NDR_SCALARS, &r->NotifyParamsArray[cntr_NotifyParamsArray_0]));
1890 : }
1891 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1892 : }
1893 0 : if (ndr_flags & NDR_BUFFERS) {
1894 0 : for (cntr_NotifyParamsArray_0 = 0; cntr_NotifyParamsArray_0 < (r->cElements); cntr_NotifyParamsArray_0++) {
1895 0 : NDR_CHECK(ndr_push_SC_RPC_NOTIFY_PARAMS(ndr, NDR_BUFFERS, &r->NotifyParamsArray[cntr_NotifyParamsArray_0]));
1896 : }
1897 : }
1898 0 : return NDR_ERR_SUCCESS;
1899 : }
1900 :
1901 0 : static enum ndr_err_code ndr_pull_SC_RPC_NOTIFY_PARAMS_LIST(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct SC_RPC_NOTIFY_PARAMS_LIST *r)
1902 : {
1903 0 : uint32_t size_NotifyParamsArray_0 = 0;
1904 0 : uint32_t cntr_NotifyParamsArray_0;
1905 0 : TALLOC_CTX *_mem_save_NotifyParamsArray_0 = NULL;
1906 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1907 0 : if (ndr_flags & NDR_SCALARS) {
1908 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->NotifyParamsArray));
1909 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
1910 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cElements));
1911 0 : if (r->cElements > 1024*4) {
1912 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->cElements), (uint32_t)(0), (uint32_t)(1024*4));
1913 : }
1914 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->NotifyParamsArray, &size_NotifyParamsArray_0));
1915 0 : NDR_PULL_ALLOC_N(ndr, r->NotifyParamsArray, size_NotifyParamsArray_0);
1916 0 : _mem_save_NotifyParamsArray_0 = NDR_PULL_GET_MEM_CTX(ndr);
1917 0 : NDR_PULL_SET_MEM_CTX(ndr, r->NotifyParamsArray, 0);
1918 0 : for (cntr_NotifyParamsArray_0 = 0; cntr_NotifyParamsArray_0 < (size_NotifyParamsArray_0); cntr_NotifyParamsArray_0++) {
1919 0 : NDR_CHECK(ndr_pull_SC_RPC_NOTIFY_PARAMS(ndr, NDR_SCALARS, &r->NotifyParamsArray[cntr_NotifyParamsArray_0]));
1920 : }
1921 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_NotifyParamsArray_0, 0);
1922 0 : if (r->NotifyParamsArray) {
1923 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->NotifyParamsArray, r->cElements));
1924 : }
1925 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1926 : }
1927 0 : if (ndr_flags & NDR_BUFFERS) {
1928 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->NotifyParamsArray, &size_NotifyParamsArray_0));
1929 0 : _mem_save_NotifyParamsArray_0 = NDR_PULL_GET_MEM_CTX(ndr);
1930 0 : NDR_PULL_SET_MEM_CTX(ndr, r->NotifyParamsArray, 0);
1931 0 : for (cntr_NotifyParamsArray_0 = 0; cntr_NotifyParamsArray_0 < (size_NotifyParamsArray_0); cntr_NotifyParamsArray_0++) {
1932 0 : NDR_CHECK(ndr_pull_SC_RPC_NOTIFY_PARAMS(ndr, NDR_BUFFERS, &r->NotifyParamsArray[cntr_NotifyParamsArray_0]));
1933 : }
1934 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_NotifyParamsArray_0, 0);
1935 0 : for (cntr_NotifyParamsArray_0 = 0; cntr_NotifyParamsArray_0 < (size_NotifyParamsArray_0); cntr_NotifyParamsArray_0++) {
1936 : }
1937 : }
1938 0 : return NDR_ERR_SUCCESS;
1939 : }
1940 :
1941 0 : _PUBLIC_ void ndr_print_SC_RPC_NOTIFY_PARAMS_LIST(struct ndr_print *ndr, const char *name, const struct SC_RPC_NOTIFY_PARAMS_LIST *r)
1942 : {
1943 0 : uint32_t cntr_NotifyParamsArray_0;
1944 0 : ndr_print_struct(ndr, name, "SC_RPC_NOTIFY_PARAMS_LIST");
1945 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1946 0 : ndr->depth++;
1947 0 : ndr_print_uint32(ndr, "cElements", r->cElements);
1948 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "NotifyParamsArray", (uint32_t)(r->cElements));
1949 0 : ndr->depth++;
1950 0 : for (cntr_NotifyParamsArray_0 = 0; cntr_NotifyParamsArray_0 < (r->cElements); cntr_NotifyParamsArray_0++) {
1951 0 : ndr_print_SC_RPC_NOTIFY_PARAMS(ndr, "NotifyParamsArray", &r->NotifyParamsArray[cntr_NotifyParamsArray_0]);
1952 : }
1953 0 : ndr->depth--;
1954 0 : ndr->depth--;
1955 : }
1956 :
1957 0 : static enum ndr_err_code ndr_push_SERVICE_CONTROL_STATUS_REASON_IN_PARAMSA(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct SERVICE_CONTROL_STATUS_REASON_IN_PARAMSA *r)
1958 : {
1959 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1960 0 : if (ndr_flags & NDR_SCALARS) {
1961 0 : NDR_CHECK(ndr_push_align(ndr, 5));
1962 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReason));
1963 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->szComment));
1964 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1965 : }
1966 0 : if (ndr_flags & NDR_BUFFERS) {
1967 0 : if (r->szComment) {
1968 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->szComment, CH_DOS)));
1969 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1970 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->szComment, CH_DOS)));
1971 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->szComment, ndr_charset_length(r->szComment, CH_DOS), sizeof(uint8_t), CH_DOS));
1972 : }
1973 : }
1974 0 : return NDR_ERR_SUCCESS;
1975 : }
1976 :
1977 0 : static enum ndr_err_code ndr_pull_SERVICE_CONTROL_STATUS_REASON_IN_PARAMSA(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct SERVICE_CONTROL_STATUS_REASON_IN_PARAMSA *r)
1978 : {
1979 0 : uint32_t _ptr_szComment;
1980 0 : uint32_t size_szComment_1 = 0;
1981 0 : uint32_t length_szComment_1 = 0;
1982 0 : TALLOC_CTX *_mem_save_szComment_0 = NULL;
1983 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1984 0 : if (ndr_flags & NDR_SCALARS) {
1985 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
1986 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReason));
1987 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_szComment));
1988 0 : if (_ptr_szComment) {
1989 0 : NDR_PULL_ALLOC(ndr, r->szComment);
1990 : } else {
1991 0 : r->szComment = NULL;
1992 : }
1993 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1994 : }
1995 0 : if (ndr_flags & NDR_BUFFERS) {
1996 0 : if (r->szComment) {
1997 0 : _mem_save_szComment_0 = NDR_PULL_GET_MEM_CTX(ndr);
1998 0 : NDR_PULL_SET_MEM_CTX(ndr, r->szComment, 0);
1999 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->szComment));
2000 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->szComment));
2001 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->szComment, &size_szComment_1));
2002 0 : if (size_szComment_1 > SC_MAX_COMMENT_LENGTH) {
2003 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_szComment_1, (uint32_t)(0), (uint32_t)(SC_MAX_COMMENT_LENGTH));
2004 : }
2005 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->szComment, &length_szComment_1));
2006 0 : if (length_szComment_1 > SC_MAX_COMMENT_LENGTH) {
2007 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_szComment_1, (uint32_t)(0), (uint32_t)(SC_MAX_COMMENT_LENGTH));
2008 : }
2009 0 : if (length_szComment_1 > size_szComment_1) {
2010 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_szComment_1, length_szComment_1);
2011 : }
2012 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_szComment_1, sizeof(uint8_t)));
2013 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->szComment, length_szComment_1, sizeof(uint8_t), CH_DOS));
2014 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_szComment_0, 0);
2015 : }
2016 : }
2017 0 : return NDR_ERR_SUCCESS;
2018 : }
2019 :
2020 0 : _PUBLIC_ void ndr_print_SERVICE_CONTROL_STATUS_REASON_IN_PARAMSA(struct ndr_print *ndr, const char *name, const struct SERVICE_CONTROL_STATUS_REASON_IN_PARAMSA *r)
2021 : {
2022 0 : ndr_print_struct(ndr, name, "SERVICE_CONTROL_STATUS_REASON_IN_PARAMSA");
2023 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2024 0 : ndr->depth++;
2025 0 : ndr_print_uint32(ndr, "dwReason", r->dwReason);
2026 0 : ndr_print_ptr(ndr, "szComment", r->szComment);
2027 0 : ndr->depth++;
2028 0 : if (r->szComment) {
2029 0 : ndr_print_string(ndr, "szComment", r->szComment);
2030 : }
2031 0 : ndr->depth--;
2032 0 : ndr->depth--;
2033 : }
2034 :
2035 0 : static enum ndr_err_code ndr_push_SERVICE_CONTROL_STATUS_REASON_OUT_PARAMS(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct SERVICE_CONTROL_STATUS_REASON_OUT_PARAMS *r)
2036 : {
2037 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2038 0 : if (ndr_flags & NDR_SCALARS) {
2039 0 : NDR_CHECK(ndr_push_align(ndr, 4));
2040 0 : NDR_CHECK(ndr_push_SERVICE_STATUS_PROCESS(ndr, NDR_SCALARS, &r->ServiceStatus));
2041 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2042 : }
2043 0 : if (ndr_flags & NDR_BUFFERS) {
2044 0 : }
2045 0 : return NDR_ERR_SUCCESS;
2046 : }
2047 :
2048 0 : static enum ndr_err_code ndr_pull_SERVICE_CONTROL_STATUS_REASON_OUT_PARAMS(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct SERVICE_CONTROL_STATUS_REASON_OUT_PARAMS *r)
2049 : {
2050 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2051 0 : if (ndr_flags & NDR_SCALARS) {
2052 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
2053 0 : NDR_CHECK(ndr_pull_SERVICE_STATUS_PROCESS(ndr, NDR_SCALARS, &r->ServiceStatus));
2054 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2055 : }
2056 0 : if (ndr_flags & NDR_BUFFERS) {
2057 0 : }
2058 0 : return NDR_ERR_SUCCESS;
2059 : }
2060 :
2061 0 : _PUBLIC_ void ndr_print_SERVICE_CONTROL_STATUS_REASON_OUT_PARAMS(struct ndr_print *ndr, const char *name, const struct SERVICE_CONTROL_STATUS_REASON_OUT_PARAMS *r)
2062 : {
2063 0 : ndr_print_struct(ndr, name, "SERVICE_CONTROL_STATUS_REASON_OUT_PARAMS");
2064 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2065 0 : ndr->depth++;
2066 0 : ndr_print_SERVICE_STATUS_PROCESS(ndr, "ServiceStatus", &r->ServiceStatus);
2067 0 : ndr->depth--;
2068 : }
2069 :
2070 0 : static enum ndr_err_code ndr_push_SC_RPC_SERVICE_CONTROL_IN_PARAMSA(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union SC_RPC_SERVICE_CONTROL_IN_PARAMSA *r)
2071 : {
2072 0 : uint32_t level;
2073 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2074 0 : if (ndr_flags & NDR_SCALARS) {
2075 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
2076 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
2077 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
2078 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
2079 : /* ms_union is always aligned to the largest union arm*/
2080 0 : NDR_CHECK(ndr_push_align(ndr, 5));
2081 0 : switch (level) {
2082 0 : case 1: {
2083 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->psrInParams));
2084 0 : break; }
2085 :
2086 0 : default:
2087 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
2088 : }
2089 : }
2090 0 : if (ndr_flags & NDR_BUFFERS) {
2091 0 : if (!(ndr_flags & NDR_SCALARS)) {
2092 : /* We didn't get it above, and the token is not needed after this. */
2093 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
2094 : }
2095 0 : switch (level) {
2096 0 : case 1:
2097 0 : if (r->psrInParams) {
2098 0 : NDR_CHECK(ndr_push_SERVICE_CONTROL_STATUS_REASON_IN_PARAMSA(ndr, NDR_SCALARS|NDR_BUFFERS, r->psrInParams));
2099 : }
2100 0 : break;
2101 :
2102 0 : default:
2103 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
2104 : }
2105 : }
2106 0 : return NDR_ERR_SUCCESS;
2107 : }
2108 :
2109 0 : static enum ndr_err_code ndr_pull_SC_RPC_SERVICE_CONTROL_IN_PARAMSA(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union SC_RPC_SERVICE_CONTROL_IN_PARAMSA *r)
2110 : {
2111 0 : uint32_t level;
2112 0 : uint32_t _level;
2113 0 : TALLOC_CTX *_mem_save_psrInParams_0 = NULL;
2114 0 : uint32_t _ptr_psrInParams;
2115 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2116 0 : if (ndr_flags & NDR_SCALARS) {
2117 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
2118 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
2119 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
2120 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
2121 0 : if (_level != level) {
2122 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
2123 : }
2124 : /* ms_union is always aligned to the largest union arm*/
2125 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
2126 0 : switch (level) {
2127 0 : case 1: {
2128 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_psrInParams));
2129 0 : if (_ptr_psrInParams) {
2130 0 : NDR_PULL_ALLOC(ndr, r->psrInParams);
2131 : } else {
2132 0 : r->psrInParams = NULL;
2133 : }
2134 0 : break; }
2135 :
2136 0 : default:
2137 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
2138 : }
2139 : }
2140 0 : if (ndr_flags & NDR_BUFFERS) {
2141 0 : if (!(ndr_flags & NDR_SCALARS)) {
2142 : /* We didn't get it above, and the token is not needed after this. */
2143 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
2144 : }
2145 0 : switch (level) {
2146 0 : case 1:
2147 0 : if (r->psrInParams) {
2148 0 : _mem_save_psrInParams_0 = NDR_PULL_GET_MEM_CTX(ndr);
2149 0 : NDR_PULL_SET_MEM_CTX(ndr, r->psrInParams, 0);
2150 0 : NDR_CHECK(ndr_pull_SERVICE_CONTROL_STATUS_REASON_IN_PARAMSA(ndr, NDR_SCALARS|NDR_BUFFERS, r->psrInParams));
2151 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_psrInParams_0, 0);
2152 : }
2153 0 : break;
2154 :
2155 0 : default:
2156 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
2157 : }
2158 : }
2159 0 : return NDR_ERR_SUCCESS;
2160 : }
2161 :
2162 0 : _PUBLIC_ void ndr_print_SC_RPC_SERVICE_CONTROL_IN_PARAMSA(struct ndr_print *ndr, const char *name, const union SC_RPC_SERVICE_CONTROL_IN_PARAMSA *r)
2163 : {
2164 0 : uint32_t level;
2165 0 : level = ndr_print_steal_switch_value(ndr, r);
2166 0 : ndr_print_union(ndr, name, level, "SC_RPC_SERVICE_CONTROL_IN_PARAMSA");
2167 0 : switch (level) {
2168 0 : case 1:
2169 0 : ndr_print_ptr(ndr, "psrInParams", r->psrInParams);
2170 0 : ndr->depth++;
2171 0 : if (r->psrInParams) {
2172 0 : ndr_print_SERVICE_CONTROL_STATUS_REASON_IN_PARAMSA(ndr, "psrInParams", r->psrInParams);
2173 : }
2174 0 : ndr->depth--;
2175 0 : break;
2176 :
2177 0 : default:
2178 0 : ndr_print_bad_level(ndr, name, level);
2179 : }
2180 0 : }
2181 :
2182 0 : static enum ndr_err_code ndr_push_SC_RPC_SERVICE_CONTROL_OUT_PARAMSA(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union SC_RPC_SERVICE_CONTROL_OUT_PARAMSA *r)
2183 : {
2184 0 : uint32_t level;
2185 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2186 0 : if (ndr_flags & NDR_SCALARS) {
2187 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
2188 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
2189 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
2190 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
2191 : /* ms_union is always aligned to the largest union arm*/
2192 0 : NDR_CHECK(ndr_push_align(ndr, 5));
2193 0 : switch (level) {
2194 0 : case 1: {
2195 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->psrOutParams));
2196 0 : break; }
2197 :
2198 0 : default:
2199 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
2200 : }
2201 : }
2202 0 : if (ndr_flags & NDR_BUFFERS) {
2203 0 : if (!(ndr_flags & NDR_SCALARS)) {
2204 : /* We didn't get it above, and the token is not needed after this. */
2205 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
2206 : }
2207 0 : switch (level) {
2208 0 : case 1:
2209 0 : if (r->psrOutParams) {
2210 0 : NDR_CHECK(ndr_push_SERVICE_CONTROL_STATUS_REASON_OUT_PARAMS(ndr, NDR_SCALARS, r->psrOutParams));
2211 : }
2212 0 : break;
2213 :
2214 0 : default:
2215 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
2216 : }
2217 : }
2218 0 : return NDR_ERR_SUCCESS;
2219 : }
2220 :
2221 0 : static enum ndr_err_code ndr_pull_SC_RPC_SERVICE_CONTROL_OUT_PARAMSA(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union SC_RPC_SERVICE_CONTROL_OUT_PARAMSA *r)
2222 : {
2223 0 : uint32_t level;
2224 0 : uint32_t _level;
2225 0 : TALLOC_CTX *_mem_save_psrOutParams_0 = NULL;
2226 0 : uint32_t _ptr_psrOutParams;
2227 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2228 0 : if (ndr_flags & NDR_SCALARS) {
2229 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
2230 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
2231 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
2232 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
2233 0 : if (_level != level) {
2234 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
2235 : }
2236 : /* ms_union is always aligned to the largest union arm*/
2237 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
2238 0 : switch (level) {
2239 0 : case 1: {
2240 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_psrOutParams));
2241 0 : if (_ptr_psrOutParams) {
2242 0 : NDR_PULL_ALLOC(ndr, r->psrOutParams);
2243 : } else {
2244 0 : r->psrOutParams = NULL;
2245 : }
2246 0 : break; }
2247 :
2248 0 : default:
2249 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
2250 : }
2251 : }
2252 0 : if (ndr_flags & NDR_BUFFERS) {
2253 0 : if (!(ndr_flags & NDR_SCALARS)) {
2254 : /* We didn't get it above, and the token is not needed after this. */
2255 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
2256 : }
2257 0 : switch (level) {
2258 0 : case 1:
2259 0 : if (r->psrOutParams) {
2260 0 : _mem_save_psrOutParams_0 = NDR_PULL_GET_MEM_CTX(ndr);
2261 0 : NDR_PULL_SET_MEM_CTX(ndr, r->psrOutParams, 0);
2262 0 : NDR_CHECK(ndr_pull_SERVICE_CONTROL_STATUS_REASON_OUT_PARAMS(ndr, NDR_SCALARS, r->psrOutParams));
2263 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_psrOutParams_0, 0);
2264 : }
2265 0 : break;
2266 :
2267 0 : default:
2268 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
2269 : }
2270 : }
2271 0 : return NDR_ERR_SUCCESS;
2272 : }
2273 :
2274 0 : _PUBLIC_ void ndr_print_SC_RPC_SERVICE_CONTROL_OUT_PARAMSA(struct ndr_print *ndr, const char *name, const union SC_RPC_SERVICE_CONTROL_OUT_PARAMSA *r)
2275 : {
2276 0 : uint32_t level;
2277 0 : level = ndr_print_steal_switch_value(ndr, r);
2278 0 : ndr_print_union(ndr, name, level, "SC_RPC_SERVICE_CONTROL_OUT_PARAMSA");
2279 0 : switch (level) {
2280 0 : case 1:
2281 0 : ndr_print_ptr(ndr, "psrOutParams", r->psrOutParams);
2282 0 : ndr->depth++;
2283 0 : if (r->psrOutParams) {
2284 0 : ndr_print_SERVICE_CONTROL_STATUS_REASON_OUT_PARAMS(ndr, "psrOutParams", r->psrOutParams);
2285 : }
2286 0 : ndr->depth--;
2287 0 : break;
2288 :
2289 0 : default:
2290 0 : ndr_print_bad_level(ndr, name, level);
2291 : }
2292 0 : }
2293 :
2294 4 : static enum ndr_err_code ndr_push_SERVICE_CONTROL_STATUS_REASON_IN_PARAMSW(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct SERVICE_CONTROL_STATUS_REASON_IN_PARAMSW *r)
2295 : {
2296 4 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2297 4 : if (ndr_flags & NDR_SCALARS) {
2298 4 : NDR_CHECK(ndr_push_align(ndr, 5));
2299 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwReason));
2300 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pszComment));
2301 4 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2302 : }
2303 4 : if (ndr_flags & NDR_BUFFERS) {
2304 4 : if (r->pszComment) {
2305 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszComment, CH_UTF16)));
2306 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2307 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->pszComment, CH_UTF16)));
2308 4 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->pszComment, ndr_charset_length(r->pszComment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2309 : }
2310 : }
2311 4 : return NDR_ERR_SUCCESS;
2312 : }
2313 :
2314 4 : static enum ndr_err_code ndr_pull_SERVICE_CONTROL_STATUS_REASON_IN_PARAMSW(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct SERVICE_CONTROL_STATUS_REASON_IN_PARAMSW *r)
2315 : {
2316 0 : uint32_t _ptr_pszComment;
2317 4 : uint32_t size_pszComment_1 = 0;
2318 4 : uint32_t length_pszComment_1 = 0;
2319 4 : TALLOC_CTX *_mem_save_pszComment_0 = NULL;
2320 4 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2321 4 : if (ndr_flags & NDR_SCALARS) {
2322 4 : NDR_CHECK(ndr_pull_align(ndr, 5));
2323 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwReason));
2324 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pszComment));
2325 4 : if (_ptr_pszComment) {
2326 4 : NDR_PULL_ALLOC(ndr, r->pszComment);
2327 : } else {
2328 0 : r->pszComment = NULL;
2329 : }
2330 4 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2331 : }
2332 4 : if (ndr_flags & NDR_BUFFERS) {
2333 4 : if (r->pszComment) {
2334 4 : _mem_save_pszComment_0 = NDR_PULL_GET_MEM_CTX(ndr);
2335 4 : NDR_PULL_SET_MEM_CTX(ndr, r->pszComment, 0);
2336 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pszComment));
2337 4 : NDR_CHECK(ndr_pull_array_length(ndr, &r->pszComment));
2338 4 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->pszComment, &size_pszComment_1));
2339 4 : if (size_pszComment_1 > SC_MAX_COMMENT_LENGTH) {
2340 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_pszComment_1, (uint32_t)(0), (uint32_t)(SC_MAX_COMMENT_LENGTH));
2341 : }
2342 4 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->pszComment, &length_pszComment_1));
2343 4 : if (length_pszComment_1 > SC_MAX_COMMENT_LENGTH) {
2344 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_pszComment_1, (uint32_t)(0), (uint32_t)(SC_MAX_COMMENT_LENGTH));
2345 : }
2346 4 : if (length_pszComment_1 > size_pszComment_1) {
2347 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_pszComment_1, length_pszComment_1);
2348 : }
2349 4 : NDR_CHECK(ndr_check_string_terminator(ndr, length_pszComment_1, sizeof(uint16_t)));
2350 4 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->pszComment, length_pszComment_1, sizeof(uint16_t), CH_UTF16));
2351 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pszComment_0, 0);
2352 : }
2353 : }
2354 4 : return NDR_ERR_SUCCESS;
2355 : }
2356 :
2357 0 : _PUBLIC_ void ndr_print_SERVICE_CONTROL_STATUS_REASON_IN_PARAMSW(struct ndr_print *ndr, const char *name, const struct SERVICE_CONTROL_STATUS_REASON_IN_PARAMSW *r)
2358 : {
2359 0 : ndr_print_struct(ndr, name, "SERVICE_CONTROL_STATUS_REASON_IN_PARAMSW");
2360 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2361 0 : ndr->depth++;
2362 0 : ndr_print_uint32(ndr, "dwReason", r->dwReason);
2363 0 : ndr_print_ptr(ndr, "pszComment", r->pszComment);
2364 0 : ndr->depth++;
2365 0 : if (r->pszComment) {
2366 0 : ndr_print_string(ndr, "pszComment", r->pszComment);
2367 : }
2368 0 : ndr->depth--;
2369 0 : ndr->depth--;
2370 : }
2371 :
2372 4 : static enum ndr_err_code ndr_push_SC_RPC_SERVICE_CONTROL_IN_PARAMSW(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union SC_RPC_SERVICE_CONTROL_IN_PARAMSW *r)
2373 : {
2374 0 : uint32_t level;
2375 4 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2376 4 : if (ndr_flags & NDR_SCALARS) {
2377 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
2378 4 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
2379 4 : NDR_CHECK(ndr_push_union_align(ndr, 5));
2380 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
2381 : /* ms_union is always aligned to the largest union arm*/
2382 4 : NDR_CHECK(ndr_push_align(ndr, 5));
2383 4 : switch (level) {
2384 4 : case 1: {
2385 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->psrInParams));
2386 4 : break; }
2387 :
2388 0 : default:
2389 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
2390 : }
2391 : }
2392 4 : if (ndr_flags & NDR_BUFFERS) {
2393 4 : if (!(ndr_flags & NDR_SCALARS)) {
2394 : /* We didn't get it above, and the token is not needed after this. */
2395 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
2396 : }
2397 4 : switch (level) {
2398 4 : case 1:
2399 4 : if (r->psrInParams) {
2400 4 : NDR_CHECK(ndr_push_SERVICE_CONTROL_STATUS_REASON_IN_PARAMSW(ndr, NDR_SCALARS|NDR_BUFFERS, r->psrInParams));
2401 : }
2402 4 : break;
2403 :
2404 0 : default:
2405 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
2406 : }
2407 : }
2408 4 : return NDR_ERR_SUCCESS;
2409 : }
2410 :
2411 4 : static enum ndr_err_code ndr_pull_SC_RPC_SERVICE_CONTROL_IN_PARAMSW(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union SC_RPC_SERVICE_CONTROL_IN_PARAMSW *r)
2412 : {
2413 0 : uint32_t level;
2414 0 : uint32_t _level;
2415 4 : TALLOC_CTX *_mem_save_psrInParams_0 = NULL;
2416 0 : uint32_t _ptr_psrInParams;
2417 4 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2418 4 : if (ndr_flags & NDR_SCALARS) {
2419 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
2420 4 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
2421 4 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
2422 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
2423 4 : if (_level != level) {
2424 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
2425 : }
2426 : /* ms_union is always aligned to the largest union arm*/
2427 4 : NDR_CHECK(ndr_pull_align(ndr, 5));
2428 4 : switch (level) {
2429 4 : case 1: {
2430 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_psrInParams));
2431 4 : if (_ptr_psrInParams) {
2432 4 : NDR_PULL_ALLOC(ndr, r->psrInParams);
2433 : } else {
2434 0 : r->psrInParams = NULL;
2435 : }
2436 4 : break; }
2437 :
2438 0 : default:
2439 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
2440 : }
2441 : }
2442 4 : if (ndr_flags & NDR_BUFFERS) {
2443 4 : if (!(ndr_flags & NDR_SCALARS)) {
2444 : /* We didn't get it above, and the token is not needed after this. */
2445 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
2446 : }
2447 4 : switch (level) {
2448 4 : case 1:
2449 4 : if (r->psrInParams) {
2450 4 : _mem_save_psrInParams_0 = NDR_PULL_GET_MEM_CTX(ndr);
2451 4 : NDR_PULL_SET_MEM_CTX(ndr, r->psrInParams, 0);
2452 4 : NDR_CHECK(ndr_pull_SERVICE_CONTROL_STATUS_REASON_IN_PARAMSW(ndr, NDR_SCALARS|NDR_BUFFERS, r->psrInParams));
2453 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_psrInParams_0, 0);
2454 : }
2455 4 : break;
2456 :
2457 0 : default:
2458 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
2459 : }
2460 : }
2461 4 : return NDR_ERR_SUCCESS;
2462 : }
2463 :
2464 0 : _PUBLIC_ void ndr_print_SC_RPC_SERVICE_CONTROL_IN_PARAMSW(struct ndr_print *ndr, const char *name, const union SC_RPC_SERVICE_CONTROL_IN_PARAMSW *r)
2465 : {
2466 0 : uint32_t level;
2467 0 : level = ndr_print_steal_switch_value(ndr, r);
2468 0 : ndr_print_union(ndr, name, level, "SC_RPC_SERVICE_CONTROL_IN_PARAMSW");
2469 0 : switch (level) {
2470 0 : case 1:
2471 0 : ndr_print_ptr(ndr, "psrInParams", r->psrInParams);
2472 0 : ndr->depth++;
2473 0 : if (r->psrInParams) {
2474 0 : ndr_print_SERVICE_CONTROL_STATUS_REASON_IN_PARAMSW(ndr, "psrInParams", r->psrInParams);
2475 : }
2476 0 : ndr->depth--;
2477 0 : break;
2478 :
2479 0 : default:
2480 0 : ndr_print_bad_level(ndr, name, level);
2481 : }
2482 0 : }
2483 :
2484 0 : static enum ndr_err_code ndr_push_SC_RPC_SERVICE_CONTROL_OUT_PARAMSW(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union SC_RPC_SERVICE_CONTROL_OUT_PARAMSW *r)
2485 : {
2486 0 : uint32_t level;
2487 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2488 0 : if (ndr_flags & NDR_SCALARS) {
2489 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
2490 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
2491 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
2492 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
2493 : /* ms_union is always aligned to the largest union arm*/
2494 0 : NDR_CHECK(ndr_push_align(ndr, 5));
2495 0 : switch (level) {
2496 0 : case 1: {
2497 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->psrOutParams));
2498 0 : break; }
2499 :
2500 0 : default:
2501 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
2502 : }
2503 : }
2504 0 : if (ndr_flags & NDR_BUFFERS) {
2505 0 : if (!(ndr_flags & NDR_SCALARS)) {
2506 : /* We didn't get it above, and the token is not needed after this. */
2507 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
2508 : }
2509 0 : switch (level) {
2510 0 : case 1:
2511 0 : if (r->psrOutParams) {
2512 0 : NDR_CHECK(ndr_push_SERVICE_CONTROL_STATUS_REASON_OUT_PARAMS(ndr, NDR_SCALARS, r->psrOutParams));
2513 : }
2514 0 : break;
2515 :
2516 0 : default:
2517 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
2518 : }
2519 : }
2520 0 : return NDR_ERR_SUCCESS;
2521 : }
2522 :
2523 0 : static enum ndr_err_code ndr_pull_SC_RPC_SERVICE_CONTROL_OUT_PARAMSW(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union SC_RPC_SERVICE_CONTROL_OUT_PARAMSW *r)
2524 : {
2525 0 : uint32_t level;
2526 0 : uint32_t _level;
2527 0 : TALLOC_CTX *_mem_save_psrOutParams_0 = NULL;
2528 0 : uint32_t _ptr_psrOutParams;
2529 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2530 0 : if (ndr_flags & NDR_SCALARS) {
2531 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
2532 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
2533 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
2534 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
2535 0 : if (_level != level) {
2536 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
2537 : }
2538 : /* ms_union is always aligned to the largest union arm*/
2539 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
2540 0 : switch (level) {
2541 0 : case 1: {
2542 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_psrOutParams));
2543 0 : if (_ptr_psrOutParams) {
2544 0 : NDR_PULL_ALLOC(ndr, r->psrOutParams);
2545 : } else {
2546 0 : r->psrOutParams = NULL;
2547 : }
2548 0 : break; }
2549 :
2550 0 : default:
2551 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
2552 : }
2553 : }
2554 0 : if (ndr_flags & NDR_BUFFERS) {
2555 0 : if (!(ndr_flags & NDR_SCALARS)) {
2556 : /* We didn't get it above, and the token is not needed after this. */
2557 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
2558 : }
2559 0 : switch (level) {
2560 0 : case 1:
2561 0 : if (r->psrOutParams) {
2562 0 : _mem_save_psrOutParams_0 = NDR_PULL_GET_MEM_CTX(ndr);
2563 0 : NDR_PULL_SET_MEM_CTX(ndr, r->psrOutParams, 0);
2564 0 : NDR_CHECK(ndr_pull_SERVICE_CONTROL_STATUS_REASON_OUT_PARAMS(ndr, NDR_SCALARS, r->psrOutParams));
2565 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_psrOutParams_0, 0);
2566 : }
2567 0 : break;
2568 :
2569 0 : default:
2570 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
2571 : }
2572 : }
2573 0 : return NDR_ERR_SUCCESS;
2574 : }
2575 :
2576 0 : _PUBLIC_ void ndr_print_SC_RPC_SERVICE_CONTROL_OUT_PARAMSW(struct ndr_print *ndr, const char *name, const union SC_RPC_SERVICE_CONTROL_OUT_PARAMSW *r)
2577 : {
2578 0 : uint32_t level;
2579 0 : level = ndr_print_steal_switch_value(ndr, r);
2580 0 : ndr_print_union(ndr, name, level, "SC_RPC_SERVICE_CONTROL_OUT_PARAMSW");
2581 0 : switch (level) {
2582 0 : case 1:
2583 0 : ndr_print_ptr(ndr, "psrOutParams", r->psrOutParams);
2584 0 : ndr->depth++;
2585 0 : if (r->psrOutParams) {
2586 0 : ndr_print_SERVICE_CONTROL_STATUS_REASON_OUT_PARAMS(ndr, "psrOutParams", r->psrOutParams);
2587 : }
2588 0 : ndr->depth--;
2589 0 : break;
2590 :
2591 0 : default:
2592 0 : ndr_print_bad_level(ndr, name, level);
2593 : }
2594 0 : }
2595 :
2596 0 : static enum ndr_err_code ndr_push_SERVICE_DESCRIPTIONW(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct SERVICE_DESCRIPTIONW *r)
2597 : {
2598 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2599 0 : if (ndr_flags & NDR_SCALARS) {
2600 0 : NDR_CHECK(ndr_push_align(ndr, 5));
2601 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->lpDescription));
2602 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2603 : }
2604 0 : if (ndr_flags & NDR_BUFFERS) {
2605 0 : if (r->lpDescription) {
2606 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->lpDescription, CH_UTF16)));
2607 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2608 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->lpDescription, CH_UTF16)));
2609 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->lpDescription, ndr_charset_length(r->lpDescription, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2610 : }
2611 : }
2612 0 : return NDR_ERR_SUCCESS;
2613 : }
2614 :
2615 0 : static enum ndr_err_code ndr_pull_SERVICE_DESCRIPTIONW(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct SERVICE_DESCRIPTIONW *r)
2616 : {
2617 0 : uint32_t _ptr_lpDescription;
2618 0 : uint32_t size_lpDescription_1 = 0;
2619 0 : uint32_t length_lpDescription_1 = 0;
2620 0 : TALLOC_CTX *_mem_save_lpDescription_0 = NULL;
2621 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2622 0 : if (ndr_flags & NDR_SCALARS) {
2623 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
2624 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lpDescription));
2625 0 : if (_ptr_lpDescription) {
2626 0 : NDR_PULL_ALLOC(ndr, r->lpDescription);
2627 : } else {
2628 0 : r->lpDescription = NULL;
2629 : }
2630 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2631 : }
2632 0 : if (ndr_flags & NDR_BUFFERS) {
2633 0 : if (r->lpDescription) {
2634 0 : _mem_save_lpDescription_0 = NDR_PULL_GET_MEM_CTX(ndr);
2635 0 : NDR_PULL_SET_MEM_CTX(ndr, r->lpDescription, 0);
2636 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->lpDescription));
2637 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->lpDescription));
2638 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->lpDescription, &size_lpDescription_1));
2639 0 : if (size_lpDescription_1 > 8*1024) {
2640 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_lpDescription_1, (uint32_t)(0), (uint32_t)(8*1024));
2641 : }
2642 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->lpDescription, &length_lpDescription_1));
2643 0 : if (length_lpDescription_1 > 8*1024) {
2644 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_lpDescription_1, (uint32_t)(0), (uint32_t)(8*1024));
2645 : }
2646 0 : if (length_lpDescription_1 > size_lpDescription_1) {
2647 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_lpDescription_1, length_lpDescription_1);
2648 : }
2649 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_lpDescription_1, sizeof(uint16_t)));
2650 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->lpDescription, length_lpDescription_1, sizeof(uint16_t), CH_UTF16));
2651 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lpDescription_0, 0);
2652 : }
2653 : }
2654 0 : return NDR_ERR_SUCCESS;
2655 : }
2656 :
2657 0 : _PUBLIC_ void ndr_print_SERVICE_DESCRIPTIONW(struct ndr_print *ndr, const char *name, const struct SERVICE_DESCRIPTIONW *r)
2658 : {
2659 0 : ndr_print_struct(ndr, name, "SERVICE_DESCRIPTIONW");
2660 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2661 0 : ndr->depth++;
2662 0 : ndr_print_ptr(ndr, "lpDescription", r->lpDescription);
2663 0 : ndr->depth++;
2664 0 : if (r->lpDescription) {
2665 0 : ndr_print_string(ndr, "lpDescription", r->lpDescription);
2666 : }
2667 0 : ndr->depth--;
2668 0 : ndr->depth--;
2669 : }
2670 :
2671 0 : static enum ndr_err_code ndr_push_SERVICE_DELAYED_AUTO_START_INFO(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct SERVICE_DELAYED_AUTO_START_INFO *r)
2672 : {
2673 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2674 0 : if (ndr_flags & NDR_SCALARS) {
2675 0 : NDR_CHECK(ndr_push_align(ndr, 4));
2676 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fDelayedAutostart));
2677 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2678 : }
2679 0 : if (ndr_flags & NDR_BUFFERS) {
2680 0 : }
2681 0 : return NDR_ERR_SUCCESS;
2682 : }
2683 :
2684 0 : static enum ndr_err_code ndr_pull_SERVICE_DELAYED_AUTO_START_INFO(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct SERVICE_DELAYED_AUTO_START_INFO *r)
2685 : {
2686 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2687 0 : if (ndr_flags & NDR_SCALARS) {
2688 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
2689 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fDelayedAutostart));
2690 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2691 : }
2692 0 : if (ndr_flags & NDR_BUFFERS) {
2693 0 : }
2694 0 : return NDR_ERR_SUCCESS;
2695 : }
2696 :
2697 0 : _PUBLIC_ void ndr_print_SERVICE_DELAYED_AUTO_START_INFO(struct ndr_print *ndr, const char *name, const struct SERVICE_DELAYED_AUTO_START_INFO *r)
2698 : {
2699 0 : ndr_print_struct(ndr, name, "SERVICE_DELAYED_AUTO_START_INFO");
2700 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2701 0 : ndr->depth++;
2702 0 : ndr_print_uint32(ndr, "fDelayedAutostart", r->fDelayedAutostart);
2703 0 : ndr->depth--;
2704 : }
2705 :
2706 0 : static enum ndr_err_code ndr_push_SERVICE_FAILURE_ACTIONS_FLAG(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct SERVICE_FAILURE_ACTIONS_FLAG *r)
2707 : {
2708 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2709 0 : if (ndr_flags & NDR_SCALARS) {
2710 0 : NDR_CHECK(ndr_push_align(ndr, 4));
2711 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fFailureActionsOnNonCrashFailures));
2712 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2713 : }
2714 0 : if (ndr_flags & NDR_BUFFERS) {
2715 0 : }
2716 0 : return NDR_ERR_SUCCESS;
2717 : }
2718 :
2719 0 : static enum ndr_err_code ndr_pull_SERVICE_FAILURE_ACTIONS_FLAG(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct SERVICE_FAILURE_ACTIONS_FLAG *r)
2720 : {
2721 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2722 0 : if (ndr_flags & NDR_SCALARS) {
2723 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
2724 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fFailureActionsOnNonCrashFailures));
2725 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2726 : }
2727 0 : if (ndr_flags & NDR_BUFFERS) {
2728 0 : }
2729 0 : return NDR_ERR_SUCCESS;
2730 : }
2731 :
2732 0 : _PUBLIC_ void ndr_print_SERVICE_FAILURE_ACTIONS_FLAG(struct ndr_print *ndr, const char *name, const struct SERVICE_FAILURE_ACTIONS_FLAG *r)
2733 : {
2734 0 : ndr_print_struct(ndr, name, "SERVICE_FAILURE_ACTIONS_FLAG");
2735 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2736 0 : ndr->depth++;
2737 0 : ndr_print_uint32(ndr, "fFailureActionsOnNonCrashFailures", r->fFailureActionsOnNonCrashFailures);
2738 0 : ndr->depth--;
2739 : }
2740 :
2741 0 : static enum ndr_err_code ndr_push_SERVICE_SID_INFO(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct SERVICE_SID_INFO *r)
2742 : {
2743 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2744 0 : if (ndr_flags & NDR_SCALARS) {
2745 0 : NDR_CHECK(ndr_push_align(ndr, 4));
2746 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwServiceSidType));
2747 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2748 : }
2749 0 : if (ndr_flags & NDR_BUFFERS) {
2750 0 : }
2751 0 : return NDR_ERR_SUCCESS;
2752 : }
2753 :
2754 0 : static enum ndr_err_code ndr_pull_SERVICE_SID_INFO(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct SERVICE_SID_INFO *r)
2755 : {
2756 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2757 0 : if (ndr_flags & NDR_SCALARS) {
2758 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
2759 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwServiceSidType));
2760 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2761 : }
2762 0 : if (ndr_flags & NDR_BUFFERS) {
2763 0 : }
2764 0 : return NDR_ERR_SUCCESS;
2765 : }
2766 :
2767 0 : _PUBLIC_ void ndr_print_SERVICE_SID_INFO(struct ndr_print *ndr, const char *name, const struct SERVICE_SID_INFO *r)
2768 : {
2769 0 : ndr_print_struct(ndr, name, "SERVICE_SID_INFO");
2770 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2771 0 : ndr->depth++;
2772 0 : ndr_print_uint32(ndr, "dwServiceSidType", r->dwServiceSidType);
2773 0 : ndr->depth--;
2774 : }
2775 :
2776 0 : static enum ndr_err_code ndr_push_SERVICE_RPC_REQUIRED_PRIVILEGES_INFO(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct SERVICE_RPC_REQUIRED_PRIVILEGES_INFO *r)
2777 : {
2778 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2779 0 : if (ndr_flags & NDR_SCALARS) {
2780 0 : NDR_CHECK(ndr_push_align(ndr, 5));
2781 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cbRequiredPrivileges));
2782 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pRequiredPrivileges));
2783 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2784 : }
2785 0 : if (ndr_flags & NDR_BUFFERS) {
2786 0 : if (r->pRequiredPrivileges) {
2787 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->cbRequiredPrivileges));
2788 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->pRequiredPrivileges, r->cbRequiredPrivileges));
2789 : }
2790 : }
2791 0 : return NDR_ERR_SUCCESS;
2792 : }
2793 :
2794 0 : static enum ndr_err_code ndr_pull_SERVICE_RPC_REQUIRED_PRIVILEGES_INFO(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct SERVICE_RPC_REQUIRED_PRIVILEGES_INFO *r)
2795 : {
2796 0 : uint32_t _ptr_pRequiredPrivileges;
2797 0 : uint32_t size_pRequiredPrivileges_1 = 0;
2798 0 : TALLOC_CTX *_mem_save_pRequiredPrivileges_0 = NULL;
2799 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2800 0 : if (ndr_flags & NDR_SCALARS) {
2801 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
2802 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cbRequiredPrivileges));
2803 0 : if (r->cbRequiredPrivileges > 1024*4) {
2804 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->cbRequiredPrivileges), (uint32_t)(0), (uint32_t)(1024*4));
2805 : }
2806 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pRequiredPrivileges));
2807 0 : if (_ptr_pRequiredPrivileges) {
2808 0 : NDR_PULL_ALLOC(ndr, r->pRequiredPrivileges);
2809 : } else {
2810 0 : r->pRequiredPrivileges = NULL;
2811 : }
2812 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2813 : }
2814 0 : if (ndr_flags & NDR_BUFFERS) {
2815 0 : if (r->pRequiredPrivileges) {
2816 0 : _mem_save_pRequiredPrivileges_0 = NDR_PULL_GET_MEM_CTX(ndr);
2817 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pRequiredPrivileges, 0);
2818 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pRequiredPrivileges));
2819 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->pRequiredPrivileges, &size_pRequiredPrivileges_1));
2820 0 : NDR_PULL_ALLOC_N(ndr, r->pRequiredPrivileges, size_pRequiredPrivileges_1);
2821 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->pRequiredPrivileges, size_pRequiredPrivileges_1));
2822 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pRequiredPrivileges_0, 0);
2823 : }
2824 0 : if (r->pRequiredPrivileges) {
2825 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->pRequiredPrivileges, r->cbRequiredPrivileges));
2826 : }
2827 : }
2828 0 : return NDR_ERR_SUCCESS;
2829 : }
2830 :
2831 0 : _PUBLIC_ void ndr_print_SERVICE_RPC_REQUIRED_PRIVILEGES_INFO(struct ndr_print *ndr, const char *name, const struct SERVICE_RPC_REQUIRED_PRIVILEGES_INFO *r)
2832 : {
2833 0 : ndr_print_struct(ndr, name, "SERVICE_RPC_REQUIRED_PRIVILEGES_INFO");
2834 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2835 0 : ndr->depth++;
2836 0 : ndr_print_uint32(ndr, "cbRequiredPrivileges", r->cbRequiredPrivileges);
2837 0 : ndr_print_ptr(ndr, "pRequiredPrivileges", r->pRequiredPrivileges);
2838 0 : ndr->depth++;
2839 0 : if (r->pRequiredPrivileges) {
2840 0 : ndr_print_array_uint8(ndr, "pRequiredPrivileges", r->pRequiredPrivileges, r->cbRequiredPrivileges);
2841 : }
2842 0 : ndr->depth--;
2843 0 : ndr->depth--;
2844 : }
2845 :
2846 0 : static enum ndr_err_code ndr_push_SERVICE_PRESHUTDOWN_INFO(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct SERVICE_PRESHUTDOWN_INFO *r)
2847 : {
2848 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2849 0 : if (ndr_flags & NDR_SCALARS) {
2850 0 : NDR_CHECK(ndr_push_align(ndr, 4));
2851 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwPreshutdownTimeout));
2852 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
2853 : }
2854 0 : if (ndr_flags & NDR_BUFFERS) {
2855 0 : }
2856 0 : return NDR_ERR_SUCCESS;
2857 : }
2858 :
2859 0 : static enum ndr_err_code ndr_pull_SERVICE_PRESHUTDOWN_INFO(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct SERVICE_PRESHUTDOWN_INFO *r)
2860 : {
2861 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2862 0 : if (ndr_flags & NDR_SCALARS) {
2863 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
2864 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwPreshutdownTimeout));
2865 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
2866 : }
2867 0 : if (ndr_flags & NDR_BUFFERS) {
2868 0 : }
2869 0 : return NDR_ERR_SUCCESS;
2870 : }
2871 :
2872 0 : _PUBLIC_ void ndr_print_SERVICE_PRESHUTDOWN_INFO(struct ndr_print *ndr, const char *name, const struct SERVICE_PRESHUTDOWN_INFO *r)
2873 : {
2874 0 : ndr_print_struct(ndr, name, "SERVICE_PRESHUTDOWN_INFO");
2875 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2876 0 : ndr->depth++;
2877 0 : ndr_print_uint32(ndr, "dwPreshutdownTimeout", r->dwPreshutdownTimeout);
2878 0 : ndr->depth--;
2879 : }
2880 :
2881 0 : static enum ndr_err_code ndr_push_SERVICE_TRIGGER_SPECIFIC_DATA_ITEM(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct SERVICE_TRIGGER_SPECIFIC_DATA_ITEM *r)
2882 : {
2883 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2884 0 : if (ndr_flags & NDR_SCALARS) {
2885 0 : NDR_CHECK(ndr_push_align(ndr, 5));
2886 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwDataType));
2887 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cbData));
2888 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pData));
2889 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2890 : }
2891 0 : if (ndr_flags & NDR_BUFFERS) {
2892 0 : if (r->pData) {
2893 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->cbData));
2894 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->pData, r->cbData));
2895 : }
2896 : }
2897 0 : return NDR_ERR_SUCCESS;
2898 : }
2899 :
2900 0 : static enum ndr_err_code ndr_pull_SERVICE_TRIGGER_SPECIFIC_DATA_ITEM(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct SERVICE_TRIGGER_SPECIFIC_DATA_ITEM *r)
2901 : {
2902 0 : uint32_t _ptr_pData;
2903 0 : uint32_t size_pData_1 = 0;
2904 0 : TALLOC_CTX *_mem_save_pData_0 = NULL;
2905 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2906 0 : if (ndr_flags & NDR_SCALARS) {
2907 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
2908 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwDataType));
2909 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cbData));
2910 0 : if (r->cbData > 1024) {
2911 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->cbData), (uint32_t)(0), (uint32_t)(1024));
2912 : }
2913 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pData));
2914 0 : if (_ptr_pData) {
2915 0 : NDR_PULL_ALLOC(ndr, r->pData);
2916 : } else {
2917 0 : r->pData = NULL;
2918 : }
2919 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2920 : }
2921 0 : if (ndr_flags & NDR_BUFFERS) {
2922 0 : if (r->pData) {
2923 0 : _mem_save_pData_0 = NDR_PULL_GET_MEM_CTX(ndr);
2924 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pData, 0);
2925 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pData));
2926 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->pData, &size_pData_1));
2927 0 : NDR_PULL_ALLOC_N(ndr, r->pData, size_pData_1);
2928 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->pData, size_pData_1));
2929 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pData_0, 0);
2930 : }
2931 0 : if (r->pData) {
2932 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->pData, r->cbData));
2933 : }
2934 : }
2935 0 : return NDR_ERR_SUCCESS;
2936 : }
2937 :
2938 0 : _PUBLIC_ void ndr_print_SERVICE_TRIGGER_SPECIFIC_DATA_ITEM(struct ndr_print *ndr, const char *name, const struct SERVICE_TRIGGER_SPECIFIC_DATA_ITEM *r)
2939 : {
2940 0 : ndr_print_struct(ndr, name, "SERVICE_TRIGGER_SPECIFIC_DATA_ITEM");
2941 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2942 0 : ndr->depth++;
2943 0 : ndr_print_uint32(ndr, "dwDataType", r->dwDataType);
2944 0 : ndr_print_uint32(ndr, "cbData", r->cbData);
2945 0 : ndr_print_ptr(ndr, "pData", r->pData);
2946 0 : ndr->depth++;
2947 0 : if (r->pData) {
2948 0 : ndr_print_array_uint8(ndr, "pData", r->pData, r->cbData);
2949 : }
2950 0 : ndr->depth--;
2951 0 : ndr->depth--;
2952 : }
2953 :
2954 0 : static enum ndr_err_code ndr_push_SERVICE_TRIGGER(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct SERVICE_TRIGGER *r)
2955 : {
2956 0 : uint32_t cntr_pDataItems_1;
2957 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
2958 0 : if (ndr_flags & NDR_SCALARS) {
2959 0 : NDR_CHECK(ndr_push_align(ndr, 5));
2960 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwTriggerType));
2961 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwAction));
2962 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pTriggerSubtype));
2963 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cDataItems));
2964 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pDataItems));
2965 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2966 : }
2967 0 : if (ndr_flags & NDR_BUFFERS) {
2968 0 : if (r->pTriggerSubtype) {
2969 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->pTriggerSubtype));
2970 : }
2971 0 : if (r->pDataItems) {
2972 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->cDataItems));
2973 0 : for (cntr_pDataItems_1 = 0; cntr_pDataItems_1 < (r->cDataItems); cntr_pDataItems_1++) {
2974 0 : NDR_CHECK(ndr_push_SERVICE_TRIGGER_SPECIFIC_DATA_ITEM(ndr, NDR_SCALARS, &r->pDataItems[cntr_pDataItems_1]));
2975 : }
2976 0 : for (cntr_pDataItems_1 = 0; cntr_pDataItems_1 < (r->cDataItems); cntr_pDataItems_1++) {
2977 0 : NDR_CHECK(ndr_push_SERVICE_TRIGGER_SPECIFIC_DATA_ITEM(ndr, NDR_BUFFERS, &r->pDataItems[cntr_pDataItems_1]));
2978 : }
2979 : }
2980 : }
2981 0 : return NDR_ERR_SUCCESS;
2982 : }
2983 :
2984 0 : static enum ndr_err_code ndr_pull_SERVICE_TRIGGER(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct SERVICE_TRIGGER *r)
2985 : {
2986 0 : uint32_t _ptr_pTriggerSubtype;
2987 0 : TALLOC_CTX *_mem_save_pTriggerSubtype_0 = NULL;
2988 0 : uint32_t _ptr_pDataItems;
2989 0 : uint32_t size_pDataItems_1 = 0;
2990 0 : uint32_t cntr_pDataItems_1;
2991 0 : TALLOC_CTX *_mem_save_pDataItems_0 = NULL;
2992 0 : TALLOC_CTX *_mem_save_pDataItems_1 = NULL;
2993 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
2994 0 : if (ndr_flags & NDR_SCALARS) {
2995 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
2996 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwTriggerType));
2997 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwAction));
2998 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pTriggerSubtype));
2999 0 : if (_ptr_pTriggerSubtype) {
3000 0 : NDR_PULL_ALLOC(ndr, r->pTriggerSubtype);
3001 : } else {
3002 0 : r->pTriggerSubtype = NULL;
3003 : }
3004 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cDataItems));
3005 0 : if (r->cDataItems > 64) {
3006 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->cDataItems), (uint32_t)(0), (uint32_t)(64));
3007 : }
3008 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pDataItems));
3009 0 : if (_ptr_pDataItems) {
3010 0 : NDR_PULL_ALLOC(ndr, r->pDataItems);
3011 : } else {
3012 0 : r->pDataItems = NULL;
3013 : }
3014 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3015 : }
3016 0 : if (ndr_flags & NDR_BUFFERS) {
3017 0 : if (r->pTriggerSubtype) {
3018 0 : _mem_save_pTriggerSubtype_0 = NDR_PULL_GET_MEM_CTX(ndr);
3019 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pTriggerSubtype, 0);
3020 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->pTriggerSubtype));
3021 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pTriggerSubtype_0, 0);
3022 : }
3023 0 : if (r->pDataItems) {
3024 0 : _mem_save_pDataItems_0 = NDR_PULL_GET_MEM_CTX(ndr);
3025 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pDataItems, 0);
3026 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pDataItems));
3027 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->pDataItems, &size_pDataItems_1));
3028 0 : NDR_PULL_ALLOC_N(ndr, r->pDataItems, size_pDataItems_1);
3029 0 : _mem_save_pDataItems_1 = NDR_PULL_GET_MEM_CTX(ndr);
3030 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pDataItems, 0);
3031 0 : for (cntr_pDataItems_1 = 0; cntr_pDataItems_1 < (size_pDataItems_1); cntr_pDataItems_1++) {
3032 0 : NDR_CHECK(ndr_pull_SERVICE_TRIGGER_SPECIFIC_DATA_ITEM(ndr, NDR_SCALARS, &r->pDataItems[cntr_pDataItems_1]));
3033 : }
3034 0 : for (cntr_pDataItems_1 = 0; cntr_pDataItems_1 < (size_pDataItems_1); cntr_pDataItems_1++) {
3035 0 : NDR_CHECK(ndr_pull_SERVICE_TRIGGER_SPECIFIC_DATA_ITEM(ndr, NDR_BUFFERS, &r->pDataItems[cntr_pDataItems_1]));
3036 : }
3037 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pDataItems_1, 0);
3038 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pDataItems_0, 0);
3039 : }
3040 0 : if (r->pDataItems) {
3041 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->pDataItems, r->cDataItems));
3042 : }
3043 0 : for (cntr_pDataItems_1 = 0; cntr_pDataItems_1 < (size_pDataItems_1); cntr_pDataItems_1++) {
3044 0 : }
3045 : }
3046 0 : return NDR_ERR_SUCCESS;
3047 : }
3048 :
3049 0 : _PUBLIC_ void ndr_print_SERVICE_TRIGGER(struct ndr_print *ndr, const char *name, const struct SERVICE_TRIGGER *r)
3050 : {
3051 0 : uint32_t cntr_pDataItems_1;
3052 0 : ndr_print_struct(ndr, name, "SERVICE_TRIGGER");
3053 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3054 0 : ndr->depth++;
3055 0 : ndr_print_uint32(ndr, "dwTriggerType", r->dwTriggerType);
3056 0 : ndr_print_uint32(ndr, "dwAction", r->dwAction);
3057 0 : ndr_print_ptr(ndr, "pTriggerSubtype", r->pTriggerSubtype);
3058 0 : ndr->depth++;
3059 0 : if (r->pTriggerSubtype) {
3060 0 : ndr_print_GUID(ndr, "pTriggerSubtype", r->pTriggerSubtype);
3061 : }
3062 0 : ndr->depth--;
3063 0 : ndr_print_uint32(ndr, "cDataItems", r->cDataItems);
3064 0 : ndr_print_ptr(ndr, "pDataItems", r->pDataItems);
3065 0 : ndr->depth++;
3066 0 : if (r->pDataItems) {
3067 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "pDataItems", (uint32_t)(r->cDataItems));
3068 0 : ndr->depth++;
3069 0 : for (cntr_pDataItems_1 = 0; cntr_pDataItems_1 < (r->cDataItems); cntr_pDataItems_1++) {
3070 0 : ndr_print_SERVICE_TRIGGER_SPECIFIC_DATA_ITEM(ndr, "pDataItems", &r->pDataItems[cntr_pDataItems_1]);
3071 : }
3072 0 : ndr->depth--;
3073 : }
3074 0 : ndr->depth--;
3075 0 : ndr->depth--;
3076 : }
3077 :
3078 0 : static enum ndr_err_code ndr_push_SERVICE_TRIGGER_INFO(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct SERVICE_TRIGGER_INFO *r)
3079 : {
3080 0 : uint32_t cntr_pTriggers_1;
3081 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3082 0 : if (ndr_flags & NDR_SCALARS) {
3083 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3084 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->cTriggers));
3085 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pTriggers));
3086 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pReserved));
3087 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3088 : }
3089 0 : if (ndr_flags & NDR_BUFFERS) {
3090 0 : if (r->pTriggers) {
3091 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->cTriggers));
3092 0 : for (cntr_pTriggers_1 = 0; cntr_pTriggers_1 < (r->cTriggers); cntr_pTriggers_1++) {
3093 0 : NDR_CHECK(ndr_push_SERVICE_TRIGGER(ndr, NDR_SCALARS, &r->pTriggers[cntr_pTriggers_1]));
3094 : }
3095 0 : for (cntr_pTriggers_1 = 0; cntr_pTriggers_1 < (r->cTriggers); cntr_pTriggers_1++) {
3096 0 : NDR_CHECK(ndr_push_SERVICE_TRIGGER(ndr, NDR_BUFFERS, &r->pTriggers[cntr_pTriggers_1]));
3097 : }
3098 : }
3099 0 : if (r->pReserved) {
3100 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->pReserved));
3101 : }
3102 : }
3103 0 : return NDR_ERR_SUCCESS;
3104 : }
3105 :
3106 0 : static enum ndr_err_code ndr_pull_SERVICE_TRIGGER_INFO(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct SERVICE_TRIGGER_INFO *r)
3107 : {
3108 0 : uint32_t _ptr_pTriggers;
3109 0 : uint32_t size_pTriggers_1 = 0;
3110 0 : uint32_t cntr_pTriggers_1;
3111 0 : TALLOC_CTX *_mem_save_pTriggers_0 = NULL;
3112 0 : TALLOC_CTX *_mem_save_pTriggers_1 = NULL;
3113 0 : uint32_t _ptr_pReserved;
3114 0 : TALLOC_CTX *_mem_save_pReserved_0 = NULL;
3115 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3116 0 : if (ndr_flags & NDR_SCALARS) {
3117 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3118 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->cTriggers));
3119 0 : if (r->cTriggers > 64) {
3120 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->cTriggers), (uint32_t)(0), (uint32_t)(64));
3121 : }
3122 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pTriggers));
3123 0 : if (_ptr_pTriggers) {
3124 0 : NDR_PULL_ALLOC(ndr, r->pTriggers);
3125 : } else {
3126 0 : r->pTriggers = NULL;
3127 : }
3128 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pReserved));
3129 0 : if (_ptr_pReserved) {
3130 0 : NDR_PULL_ALLOC(ndr, r->pReserved);
3131 : } else {
3132 0 : r->pReserved = NULL;
3133 : }
3134 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3135 : }
3136 0 : if (ndr_flags & NDR_BUFFERS) {
3137 0 : if (r->pTriggers) {
3138 0 : _mem_save_pTriggers_0 = NDR_PULL_GET_MEM_CTX(ndr);
3139 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pTriggers, 0);
3140 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->pTriggers));
3141 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->pTriggers, &size_pTriggers_1));
3142 0 : NDR_PULL_ALLOC_N(ndr, r->pTriggers, size_pTriggers_1);
3143 0 : _mem_save_pTriggers_1 = NDR_PULL_GET_MEM_CTX(ndr);
3144 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pTriggers, 0);
3145 0 : for (cntr_pTriggers_1 = 0; cntr_pTriggers_1 < (size_pTriggers_1); cntr_pTriggers_1++) {
3146 0 : NDR_CHECK(ndr_pull_SERVICE_TRIGGER(ndr, NDR_SCALARS, &r->pTriggers[cntr_pTriggers_1]));
3147 : }
3148 0 : for (cntr_pTriggers_1 = 0; cntr_pTriggers_1 < (size_pTriggers_1); cntr_pTriggers_1++) {
3149 0 : NDR_CHECK(ndr_pull_SERVICE_TRIGGER(ndr, NDR_BUFFERS, &r->pTriggers[cntr_pTriggers_1]));
3150 : }
3151 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pTriggers_1, 0);
3152 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pTriggers_0, 0);
3153 : }
3154 0 : if (r->pReserved) {
3155 0 : _mem_save_pReserved_0 = NDR_PULL_GET_MEM_CTX(ndr);
3156 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pReserved, 0);
3157 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->pReserved));
3158 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pReserved_0, 0);
3159 : }
3160 0 : if (r->pTriggers) {
3161 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->pTriggers, r->cTriggers));
3162 : }
3163 0 : for (cntr_pTriggers_1 = 0; cntr_pTriggers_1 < (size_pTriggers_1); cntr_pTriggers_1++) {
3164 0 : }
3165 : }
3166 0 : return NDR_ERR_SUCCESS;
3167 : }
3168 :
3169 0 : _PUBLIC_ void ndr_print_SERVICE_TRIGGER_INFO(struct ndr_print *ndr, const char *name, const struct SERVICE_TRIGGER_INFO *r)
3170 : {
3171 0 : uint32_t cntr_pTriggers_1;
3172 0 : ndr_print_struct(ndr, name, "SERVICE_TRIGGER_INFO");
3173 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3174 0 : ndr->depth++;
3175 0 : ndr_print_uint32(ndr, "cTriggers", r->cTriggers);
3176 0 : ndr_print_ptr(ndr, "pTriggers", r->pTriggers);
3177 0 : ndr->depth++;
3178 0 : if (r->pTriggers) {
3179 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "pTriggers", (uint32_t)(r->cTriggers));
3180 0 : ndr->depth++;
3181 0 : for (cntr_pTriggers_1 = 0; cntr_pTriggers_1 < (r->cTriggers); cntr_pTriggers_1++) {
3182 0 : ndr_print_SERVICE_TRIGGER(ndr, "pTriggers", &r->pTriggers[cntr_pTriggers_1]);
3183 : }
3184 0 : ndr->depth--;
3185 : }
3186 0 : ndr->depth--;
3187 0 : ndr_print_ptr(ndr, "pReserved", r->pReserved);
3188 0 : ndr->depth++;
3189 0 : if (r->pReserved) {
3190 0 : ndr_print_uint8(ndr, "pReserved", *r->pReserved);
3191 : }
3192 0 : ndr->depth--;
3193 0 : ndr->depth--;
3194 : }
3195 :
3196 0 : static enum ndr_err_code ndr_push_SERVICE_PREFERRED_NODE_INFO(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct SERVICE_PREFERRED_NODE_INFO *r)
3197 : {
3198 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3199 0 : if (ndr_flags & NDR_SCALARS) {
3200 0 : NDR_CHECK(ndr_push_align(ndr, 4));
3201 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->usPreferredNode));
3202 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fDelete));
3203 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
3204 : }
3205 0 : if (ndr_flags & NDR_BUFFERS) {
3206 0 : }
3207 0 : return NDR_ERR_SUCCESS;
3208 : }
3209 :
3210 0 : static enum ndr_err_code ndr_pull_SERVICE_PREFERRED_NODE_INFO(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct SERVICE_PREFERRED_NODE_INFO *r)
3211 : {
3212 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3213 0 : if (ndr_flags & NDR_SCALARS) {
3214 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
3215 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->usPreferredNode));
3216 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fDelete));
3217 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
3218 : }
3219 0 : if (ndr_flags & NDR_BUFFERS) {
3220 0 : }
3221 0 : return NDR_ERR_SUCCESS;
3222 : }
3223 :
3224 0 : _PUBLIC_ void ndr_print_SERVICE_PREFERRED_NODE_INFO(struct ndr_print *ndr, const char *name, const struct SERVICE_PREFERRED_NODE_INFO *r)
3225 : {
3226 0 : ndr_print_struct(ndr, name, "SERVICE_PREFERRED_NODE_INFO");
3227 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3228 0 : ndr->depth++;
3229 0 : ndr_print_uint16(ndr, "usPreferredNode", r->usPreferredNode);
3230 0 : ndr_print_uint32(ndr, "fDelete", r->fDelete);
3231 0 : ndr->depth--;
3232 : }
3233 :
3234 0 : static enum ndr_err_code ndr_push_SC_RPC_CONFIG_INFOW_u(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union SC_RPC_CONFIG_INFOW_u *r)
3235 : {
3236 0 : uint32_t level;
3237 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3238 0 : if (ndr_flags & NDR_SCALARS) {
3239 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
3240 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
3241 0 : NDR_CHECK(ndr_push_union_align(ndr, 5));
3242 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
3243 : /* ms_union is always aligned to the largest union arm*/
3244 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3245 0 : switch (level) {
3246 0 : case 1: {
3247 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->psd));
3248 0 : break; }
3249 :
3250 0 : case 2: {
3251 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->psfa));
3252 0 : break; }
3253 :
3254 0 : case 3: {
3255 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->psda));
3256 0 : break; }
3257 :
3258 0 : case 4: {
3259 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->psfaf));
3260 0 : break; }
3261 :
3262 0 : case 5: {
3263 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pssid));
3264 0 : break; }
3265 :
3266 0 : case 6: {
3267 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->psrp));
3268 0 : break; }
3269 :
3270 0 : case 7: {
3271 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->psps));
3272 0 : break; }
3273 :
3274 0 : case 8: {
3275 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->psti));
3276 0 : break; }
3277 :
3278 0 : case 9: {
3279 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->pspn));
3280 0 : break; }
3281 :
3282 0 : default:
3283 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
3284 : }
3285 : }
3286 0 : if (ndr_flags & NDR_BUFFERS) {
3287 0 : if (!(ndr_flags & NDR_SCALARS)) {
3288 : /* We didn't get it above, and the token is not needed after this. */
3289 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
3290 : }
3291 0 : switch (level) {
3292 0 : case 1:
3293 0 : if (r->psd) {
3294 0 : NDR_CHECK(ndr_push_SERVICE_DESCRIPTIONW(ndr, NDR_SCALARS|NDR_BUFFERS, r->psd));
3295 : }
3296 0 : break;
3297 :
3298 0 : case 2:
3299 0 : if (r->psfa) {
3300 0 : NDR_CHECK(ndr_push_SERVICE_FAILURE_ACTIONSW(ndr, NDR_SCALARS|NDR_BUFFERS, r->psfa));
3301 : }
3302 0 : break;
3303 :
3304 0 : case 3:
3305 0 : if (r->psda) {
3306 0 : NDR_CHECK(ndr_push_SERVICE_DELAYED_AUTO_START_INFO(ndr, NDR_SCALARS, r->psda));
3307 : }
3308 0 : break;
3309 :
3310 0 : case 4:
3311 0 : if (r->psfaf) {
3312 0 : NDR_CHECK(ndr_push_SERVICE_FAILURE_ACTIONS_FLAG(ndr, NDR_SCALARS, r->psfaf));
3313 : }
3314 0 : break;
3315 :
3316 0 : case 5:
3317 0 : if (r->pssid) {
3318 0 : NDR_CHECK(ndr_push_SERVICE_SID_INFO(ndr, NDR_SCALARS, r->pssid));
3319 : }
3320 0 : break;
3321 :
3322 0 : case 6:
3323 0 : if (r->psrp) {
3324 0 : NDR_CHECK(ndr_push_SERVICE_RPC_REQUIRED_PRIVILEGES_INFO(ndr, NDR_SCALARS|NDR_BUFFERS, r->psrp));
3325 : }
3326 0 : break;
3327 :
3328 0 : case 7:
3329 0 : if (r->psps) {
3330 0 : NDR_CHECK(ndr_push_SERVICE_PRESHUTDOWN_INFO(ndr, NDR_SCALARS, r->psps));
3331 : }
3332 0 : break;
3333 :
3334 0 : case 8:
3335 0 : if (r->psti) {
3336 0 : NDR_CHECK(ndr_push_SERVICE_TRIGGER_INFO(ndr, NDR_SCALARS|NDR_BUFFERS, r->psti));
3337 : }
3338 0 : break;
3339 :
3340 0 : case 9:
3341 0 : if (r->pspn) {
3342 0 : NDR_CHECK(ndr_push_SERVICE_PREFERRED_NODE_INFO(ndr, NDR_SCALARS, r->pspn));
3343 : }
3344 0 : break;
3345 :
3346 0 : default:
3347 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
3348 : }
3349 : }
3350 0 : return NDR_ERR_SUCCESS;
3351 : }
3352 :
3353 0 : static enum ndr_err_code ndr_pull_SC_RPC_CONFIG_INFOW_u(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union SC_RPC_CONFIG_INFOW_u *r)
3354 : {
3355 0 : uint32_t level;
3356 0 : uint32_t _level;
3357 0 : TALLOC_CTX *_mem_save_psd_0 = NULL;
3358 0 : uint32_t _ptr_psd;
3359 0 : TALLOC_CTX *_mem_save_psfa_0 = NULL;
3360 0 : uint32_t _ptr_psfa;
3361 0 : TALLOC_CTX *_mem_save_psda_0 = NULL;
3362 0 : uint32_t _ptr_psda;
3363 0 : TALLOC_CTX *_mem_save_psfaf_0 = NULL;
3364 0 : uint32_t _ptr_psfaf;
3365 0 : TALLOC_CTX *_mem_save_pssid_0 = NULL;
3366 0 : uint32_t _ptr_pssid;
3367 0 : TALLOC_CTX *_mem_save_psrp_0 = NULL;
3368 0 : uint32_t _ptr_psrp;
3369 0 : TALLOC_CTX *_mem_save_psps_0 = NULL;
3370 0 : uint32_t _ptr_psps;
3371 0 : TALLOC_CTX *_mem_save_psti_0 = NULL;
3372 0 : uint32_t _ptr_psti;
3373 0 : TALLOC_CTX *_mem_save_pspn_0 = NULL;
3374 0 : uint32_t _ptr_pspn;
3375 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3376 0 : if (ndr_flags & NDR_SCALARS) {
3377 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
3378 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
3379 0 : NDR_CHECK(ndr_pull_union_align(ndr, 5));
3380 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
3381 0 : if (_level != level) {
3382 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" for r at %s", (uint32_t)_level, __location__);
3383 : }
3384 : /* ms_union is always aligned to the largest union arm*/
3385 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3386 0 : switch (level) {
3387 0 : case 1: {
3388 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_psd));
3389 0 : if (_ptr_psd) {
3390 0 : NDR_PULL_ALLOC(ndr, r->psd);
3391 : } else {
3392 0 : r->psd = NULL;
3393 : }
3394 0 : break; }
3395 :
3396 0 : case 2: {
3397 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_psfa));
3398 0 : if (_ptr_psfa) {
3399 0 : NDR_PULL_ALLOC(ndr, r->psfa);
3400 : } else {
3401 0 : r->psfa = NULL;
3402 : }
3403 0 : break; }
3404 :
3405 0 : case 3: {
3406 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_psda));
3407 0 : if (_ptr_psda) {
3408 0 : NDR_PULL_ALLOC(ndr, r->psda);
3409 : } else {
3410 0 : r->psda = NULL;
3411 : }
3412 0 : break; }
3413 :
3414 0 : case 4: {
3415 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_psfaf));
3416 0 : if (_ptr_psfaf) {
3417 0 : NDR_PULL_ALLOC(ndr, r->psfaf);
3418 : } else {
3419 0 : r->psfaf = NULL;
3420 : }
3421 0 : break; }
3422 :
3423 0 : case 5: {
3424 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pssid));
3425 0 : if (_ptr_pssid) {
3426 0 : NDR_PULL_ALLOC(ndr, r->pssid);
3427 : } else {
3428 0 : r->pssid = NULL;
3429 : }
3430 0 : break; }
3431 :
3432 0 : case 6: {
3433 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_psrp));
3434 0 : if (_ptr_psrp) {
3435 0 : NDR_PULL_ALLOC(ndr, r->psrp);
3436 : } else {
3437 0 : r->psrp = NULL;
3438 : }
3439 0 : break; }
3440 :
3441 0 : case 7: {
3442 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_psps));
3443 0 : if (_ptr_psps) {
3444 0 : NDR_PULL_ALLOC(ndr, r->psps);
3445 : } else {
3446 0 : r->psps = NULL;
3447 : }
3448 0 : break; }
3449 :
3450 0 : case 8: {
3451 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_psti));
3452 0 : if (_ptr_psti) {
3453 0 : NDR_PULL_ALLOC(ndr, r->psti);
3454 : } else {
3455 0 : r->psti = NULL;
3456 : }
3457 0 : break; }
3458 :
3459 0 : case 9: {
3460 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_pspn));
3461 0 : if (_ptr_pspn) {
3462 0 : NDR_PULL_ALLOC(ndr, r->pspn);
3463 : } else {
3464 0 : r->pspn = NULL;
3465 : }
3466 0 : break; }
3467 :
3468 0 : default:
3469 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
3470 : }
3471 : }
3472 0 : if (ndr_flags & NDR_BUFFERS) {
3473 0 : if (!(ndr_flags & NDR_SCALARS)) {
3474 : /* We didn't get it above, and the token is not needed after this. */
3475 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
3476 : }
3477 0 : switch (level) {
3478 0 : case 1:
3479 0 : if (r->psd) {
3480 0 : _mem_save_psd_0 = NDR_PULL_GET_MEM_CTX(ndr);
3481 0 : NDR_PULL_SET_MEM_CTX(ndr, r->psd, 0);
3482 0 : NDR_CHECK(ndr_pull_SERVICE_DESCRIPTIONW(ndr, NDR_SCALARS|NDR_BUFFERS, r->psd));
3483 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_psd_0, 0);
3484 : }
3485 0 : break;
3486 :
3487 0 : case 2:
3488 0 : if (r->psfa) {
3489 0 : _mem_save_psfa_0 = NDR_PULL_GET_MEM_CTX(ndr);
3490 0 : NDR_PULL_SET_MEM_CTX(ndr, r->psfa, 0);
3491 0 : NDR_CHECK(ndr_pull_SERVICE_FAILURE_ACTIONSW(ndr, NDR_SCALARS|NDR_BUFFERS, r->psfa));
3492 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_psfa_0, 0);
3493 : }
3494 0 : break;
3495 :
3496 0 : case 3:
3497 0 : if (r->psda) {
3498 0 : _mem_save_psda_0 = NDR_PULL_GET_MEM_CTX(ndr);
3499 0 : NDR_PULL_SET_MEM_CTX(ndr, r->psda, 0);
3500 0 : NDR_CHECK(ndr_pull_SERVICE_DELAYED_AUTO_START_INFO(ndr, NDR_SCALARS, r->psda));
3501 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_psda_0, 0);
3502 : }
3503 0 : break;
3504 :
3505 0 : case 4:
3506 0 : if (r->psfaf) {
3507 0 : _mem_save_psfaf_0 = NDR_PULL_GET_MEM_CTX(ndr);
3508 0 : NDR_PULL_SET_MEM_CTX(ndr, r->psfaf, 0);
3509 0 : NDR_CHECK(ndr_pull_SERVICE_FAILURE_ACTIONS_FLAG(ndr, NDR_SCALARS, r->psfaf));
3510 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_psfaf_0, 0);
3511 : }
3512 0 : break;
3513 :
3514 0 : case 5:
3515 0 : if (r->pssid) {
3516 0 : _mem_save_pssid_0 = NDR_PULL_GET_MEM_CTX(ndr);
3517 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pssid, 0);
3518 0 : NDR_CHECK(ndr_pull_SERVICE_SID_INFO(ndr, NDR_SCALARS, r->pssid));
3519 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pssid_0, 0);
3520 : }
3521 0 : break;
3522 :
3523 0 : case 6:
3524 0 : if (r->psrp) {
3525 0 : _mem_save_psrp_0 = NDR_PULL_GET_MEM_CTX(ndr);
3526 0 : NDR_PULL_SET_MEM_CTX(ndr, r->psrp, 0);
3527 0 : NDR_CHECK(ndr_pull_SERVICE_RPC_REQUIRED_PRIVILEGES_INFO(ndr, NDR_SCALARS|NDR_BUFFERS, r->psrp));
3528 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_psrp_0, 0);
3529 : }
3530 0 : break;
3531 :
3532 0 : case 7:
3533 0 : if (r->psps) {
3534 0 : _mem_save_psps_0 = NDR_PULL_GET_MEM_CTX(ndr);
3535 0 : NDR_PULL_SET_MEM_CTX(ndr, r->psps, 0);
3536 0 : NDR_CHECK(ndr_pull_SERVICE_PRESHUTDOWN_INFO(ndr, NDR_SCALARS, r->psps));
3537 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_psps_0, 0);
3538 : }
3539 0 : break;
3540 :
3541 0 : case 8:
3542 0 : if (r->psti) {
3543 0 : _mem_save_psti_0 = NDR_PULL_GET_MEM_CTX(ndr);
3544 0 : NDR_PULL_SET_MEM_CTX(ndr, r->psti, 0);
3545 0 : NDR_CHECK(ndr_pull_SERVICE_TRIGGER_INFO(ndr, NDR_SCALARS|NDR_BUFFERS, r->psti));
3546 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_psti_0, 0);
3547 : }
3548 0 : break;
3549 :
3550 0 : case 9:
3551 0 : if (r->pspn) {
3552 0 : _mem_save_pspn_0 = NDR_PULL_GET_MEM_CTX(ndr);
3553 0 : NDR_PULL_SET_MEM_CTX(ndr, r->pspn, 0);
3554 0 : NDR_CHECK(ndr_pull_SERVICE_PREFERRED_NODE_INFO(ndr, NDR_SCALARS, r->pspn));
3555 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pspn_0, 0);
3556 : }
3557 0 : break;
3558 :
3559 0 : default:
3560 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
3561 : }
3562 : }
3563 0 : return NDR_ERR_SUCCESS;
3564 : }
3565 :
3566 0 : _PUBLIC_ void ndr_print_SC_RPC_CONFIG_INFOW_u(struct ndr_print *ndr, const char *name, const union SC_RPC_CONFIG_INFOW_u *r)
3567 : {
3568 0 : uint32_t level;
3569 0 : level = ndr_print_steal_switch_value(ndr, r);
3570 0 : ndr_print_union(ndr, name, level, "SC_RPC_CONFIG_INFOW_u");
3571 0 : switch (level) {
3572 0 : case 1:
3573 0 : ndr_print_ptr(ndr, "psd", r->psd);
3574 0 : ndr->depth++;
3575 0 : if (r->psd) {
3576 0 : ndr_print_SERVICE_DESCRIPTIONW(ndr, "psd", r->psd);
3577 : }
3578 0 : ndr->depth--;
3579 0 : break;
3580 :
3581 0 : case 2:
3582 0 : ndr_print_ptr(ndr, "psfa", r->psfa);
3583 0 : ndr->depth++;
3584 0 : if (r->psfa) {
3585 0 : ndr_print_SERVICE_FAILURE_ACTIONSW(ndr, "psfa", r->psfa);
3586 : }
3587 0 : ndr->depth--;
3588 0 : break;
3589 :
3590 0 : case 3:
3591 0 : ndr_print_ptr(ndr, "psda", r->psda);
3592 0 : ndr->depth++;
3593 0 : if (r->psda) {
3594 0 : ndr_print_SERVICE_DELAYED_AUTO_START_INFO(ndr, "psda", r->psda);
3595 : }
3596 0 : ndr->depth--;
3597 0 : break;
3598 :
3599 0 : case 4:
3600 0 : ndr_print_ptr(ndr, "psfaf", r->psfaf);
3601 0 : ndr->depth++;
3602 0 : if (r->psfaf) {
3603 0 : ndr_print_SERVICE_FAILURE_ACTIONS_FLAG(ndr, "psfaf", r->psfaf);
3604 : }
3605 0 : ndr->depth--;
3606 0 : break;
3607 :
3608 0 : case 5:
3609 0 : ndr_print_ptr(ndr, "pssid", r->pssid);
3610 0 : ndr->depth++;
3611 0 : if (r->pssid) {
3612 0 : ndr_print_SERVICE_SID_INFO(ndr, "pssid", r->pssid);
3613 : }
3614 0 : ndr->depth--;
3615 0 : break;
3616 :
3617 0 : case 6:
3618 0 : ndr_print_ptr(ndr, "psrp", r->psrp);
3619 0 : ndr->depth++;
3620 0 : if (r->psrp) {
3621 0 : ndr_print_SERVICE_RPC_REQUIRED_PRIVILEGES_INFO(ndr, "psrp", r->psrp);
3622 : }
3623 0 : ndr->depth--;
3624 0 : break;
3625 :
3626 0 : case 7:
3627 0 : ndr_print_ptr(ndr, "psps", r->psps);
3628 0 : ndr->depth++;
3629 0 : if (r->psps) {
3630 0 : ndr_print_SERVICE_PRESHUTDOWN_INFO(ndr, "psps", r->psps);
3631 : }
3632 0 : ndr->depth--;
3633 0 : break;
3634 :
3635 0 : case 8:
3636 0 : ndr_print_ptr(ndr, "psti", r->psti);
3637 0 : ndr->depth++;
3638 0 : if (r->psti) {
3639 0 : ndr_print_SERVICE_TRIGGER_INFO(ndr, "psti", r->psti);
3640 : }
3641 0 : ndr->depth--;
3642 0 : break;
3643 :
3644 0 : case 9:
3645 0 : ndr_print_ptr(ndr, "pspn", r->pspn);
3646 0 : ndr->depth++;
3647 0 : if (r->pspn) {
3648 0 : ndr_print_SERVICE_PREFERRED_NODE_INFO(ndr, "pspn", r->pspn);
3649 : }
3650 0 : ndr->depth--;
3651 0 : break;
3652 :
3653 0 : default:
3654 0 : ndr_print_bad_level(ndr, name, level);
3655 : }
3656 0 : }
3657 :
3658 0 : static enum ndr_err_code ndr_push_SC_RPC_CONFIG_INFOW(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct SC_RPC_CONFIG_INFOW *r)
3659 : {
3660 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
3661 0 : if (ndr_flags & NDR_SCALARS) {
3662 0 : NDR_CHECK(ndr_push_align(ndr, 5));
3663 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->dwInfoLevel));
3664 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->u, r->dwInfoLevel));
3665 0 : NDR_CHECK(ndr_push_SC_RPC_CONFIG_INFOW_u(ndr, NDR_SCALARS, &r->u));
3666 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3667 : }
3668 0 : if (ndr_flags & NDR_BUFFERS) {
3669 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, &r->u, r->dwInfoLevel));
3670 0 : NDR_CHECK(ndr_push_SC_RPC_CONFIG_INFOW_u(ndr, NDR_BUFFERS, &r->u));
3671 : }
3672 0 : return NDR_ERR_SUCCESS;
3673 : }
3674 :
3675 0 : static enum ndr_err_code ndr_pull_SC_RPC_CONFIG_INFOW(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct SC_RPC_CONFIG_INFOW *r)
3676 : {
3677 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
3678 0 : if (ndr_flags & NDR_SCALARS) {
3679 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
3680 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->dwInfoLevel));
3681 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->u, r->dwInfoLevel));
3682 0 : NDR_CHECK(ndr_pull_SC_RPC_CONFIG_INFOW_u(ndr, NDR_SCALARS, &r->u));
3683 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3684 : }
3685 0 : if (ndr_flags & NDR_BUFFERS) {
3686 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->u, r->dwInfoLevel));
3687 0 : NDR_CHECK(ndr_pull_SC_RPC_CONFIG_INFOW_u(ndr, NDR_BUFFERS, &r->u));
3688 : }
3689 0 : return NDR_ERR_SUCCESS;
3690 : }
3691 :
3692 0 : _PUBLIC_ void ndr_print_SC_RPC_CONFIG_INFOW(struct ndr_print *ndr, const char *name, const struct SC_RPC_CONFIG_INFOW *r)
3693 : {
3694 0 : ndr_print_struct(ndr, name, "SC_RPC_CONFIG_INFOW");
3695 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3696 0 : ndr->depth++;
3697 0 : ndr_print_uint32(ndr, "dwInfoLevel", r->dwInfoLevel);
3698 0 : ndr_print_set_switch_value(ndr, &r->u, r->dwInfoLevel);
3699 0 : ndr_print_SC_RPC_CONFIG_INFOW_u(ndr, "u", &r->u);
3700 0 : ndr->depth--;
3701 : }
3702 :
3703 160 : static enum ndr_err_code ndr_push_svcctl_CloseServiceHandle(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_CloseServiceHandle *r)
3704 : {
3705 160 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3706 160 : if (flags & NDR_IN) {
3707 80 : if (r->in.handle == NULL) {
3708 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3709 : }
3710 80 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3711 : }
3712 160 : if (flags & NDR_OUT) {
3713 80 : if (r->out.handle == NULL) {
3714 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3715 : }
3716 80 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
3717 80 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3718 : }
3719 160 : return NDR_ERR_SUCCESS;
3720 : }
3721 :
3722 160 : static enum ndr_err_code ndr_pull_svcctl_CloseServiceHandle(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_CloseServiceHandle *r)
3723 : {
3724 160 : TALLOC_CTX *_mem_save_handle_0 = NULL;
3725 160 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3726 160 : if (flags & NDR_IN) {
3727 80 : NDR_ZERO_STRUCT(r->out);
3728 :
3729 80 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3730 80 : NDR_PULL_ALLOC(ndr, r->in.handle);
3731 : }
3732 80 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3733 80 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3734 80 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3735 80 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3736 80 : NDR_PULL_ALLOC(ndr, r->out.handle);
3737 80 : *r->out.handle = *r->in.handle;
3738 : }
3739 160 : if (flags & NDR_OUT) {
3740 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3741 : if (r->in.handle == NULL) {
3742 : NDR_PULL_ALLOC(ndr, r->in.handle);
3743 : NDR_ZERO_STRUCTP(r->in.handle);
3744 : }
3745 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3746 80 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3747 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
3748 : }
3749 80 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3750 80 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
3751 80 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
3752 80 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3753 80 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3754 : }
3755 160 : return NDR_ERR_SUCCESS;
3756 : }
3757 :
3758 0 : _PUBLIC_ void ndr_print_svcctl_CloseServiceHandle(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_CloseServiceHandle *r)
3759 : {
3760 0 : ndr_print_struct(ndr, name, "svcctl_CloseServiceHandle");
3761 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3762 0 : ndr->depth++;
3763 0 : if (flags & NDR_SET_VALUES) {
3764 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3765 : }
3766 0 : if (flags & NDR_IN) {
3767 0 : ndr_print_struct(ndr, "in", "svcctl_CloseServiceHandle");
3768 0 : ndr->depth++;
3769 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
3770 0 : ndr->depth++;
3771 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
3772 0 : ndr->depth--;
3773 0 : ndr->depth--;
3774 : }
3775 0 : if (flags & NDR_OUT) {
3776 0 : ndr_print_struct(ndr, "out", "svcctl_CloseServiceHandle");
3777 0 : ndr->depth++;
3778 0 : ndr_print_ptr(ndr, "handle", r->out.handle);
3779 0 : ndr->depth++;
3780 0 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
3781 0 : ndr->depth--;
3782 0 : ndr_print_WERROR(ndr, "result", r->out.result);
3783 0 : ndr->depth--;
3784 : }
3785 0 : ndr->depth--;
3786 : }
3787 :
3788 8 : static enum ndr_err_code ndr_push_svcctl_ControlService(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_ControlService *r)
3789 : {
3790 8 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3791 8 : if (flags & NDR_IN) {
3792 4 : if (r->in.handle == NULL) {
3793 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3794 : }
3795 4 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3796 4 : NDR_CHECK(ndr_push_SERVICE_CONTROL(ndr, NDR_SCALARS, r->in.control));
3797 : }
3798 8 : if (flags & NDR_OUT) {
3799 4 : if (r->out.service_status == NULL) {
3800 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3801 : }
3802 4 : NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, r->out.service_status));
3803 4 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3804 : }
3805 8 : return NDR_ERR_SUCCESS;
3806 : }
3807 :
3808 8 : static enum ndr_err_code ndr_pull_svcctl_ControlService(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_ControlService *r)
3809 : {
3810 8 : TALLOC_CTX *_mem_save_handle_0 = NULL;
3811 8 : TALLOC_CTX *_mem_save_service_status_0 = NULL;
3812 8 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3813 8 : if (flags & NDR_IN) {
3814 4 : NDR_ZERO_STRUCT(r->out);
3815 :
3816 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3817 4 : NDR_PULL_ALLOC(ndr, r->in.handle);
3818 : }
3819 4 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3820 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3821 4 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3822 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3823 4 : NDR_CHECK(ndr_pull_SERVICE_CONTROL(ndr, NDR_SCALARS, &r->in.control));
3824 4 : NDR_PULL_ALLOC(ndr, r->out.service_status);
3825 4 : NDR_ZERO_STRUCTP(r->out.service_status);
3826 : }
3827 8 : if (flags & NDR_OUT) {
3828 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3829 : if (r->in.handle == NULL) {
3830 : NDR_PULL_ALLOC(ndr, r->in.handle);
3831 : NDR_ZERO_STRUCTP(r->in.handle);
3832 : }
3833 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3834 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3835 0 : NDR_PULL_ALLOC(ndr, r->out.service_status);
3836 : }
3837 4 : _mem_save_service_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
3838 4 : NDR_PULL_SET_MEM_CTX(ndr, r->out.service_status, LIBNDR_FLAG_REF_ALLOC);
3839 4 : NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, r->out.service_status));
3840 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_status_0, LIBNDR_FLAG_REF_ALLOC);
3841 4 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3842 : }
3843 8 : return NDR_ERR_SUCCESS;
3844 : }
3845 :
3846 0 : _PUBLIC_ void ndr_print_svcctl_ControlService(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_ControlService *r)
3847 : {
3848 0 : ndr_print_struct(ndr, name, "svcctl_ControlService");
3849 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3850 0 : ndr->depth++;
3851 0 : if (flags & NDR_SET_VALUES) {
3852 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3853 : }
3854 0 : if (flags & NDR_IN) {
3855 0 : ndr_print_struct(ndr, "in", "svcctl_ControlService");
3856 0 : ndr->depth++;
3857 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
3858 0 : ndr->depth++;
3859 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
3860 0 : ndr->depth--;
3861 0 : ndr_print_SERVICE_CONTROL(ndr, "control", r->in.control);
3862 0 : ndr->depth--;
3863 : }
3864 0 : if (flags & NDR_OUT) {
3865 0 : ndr_print_struct(ndr, "out", "svcctl_ControlService");
3866 0 : ndr->depth++;
3867 0 : ndr_print_ptr(ndr, "service_status", r->out.service_status);
3868 0 : ndr->depth++;
3869 0 : ndr_print_SERVICE_STATUS(ndr, "service_status", r->out.service_status);
3870 0 : ndr->depth--;
3871 0 : ndr_print_WERROR(ndr, "result", r->out.result);
3872 0 : ndr->depth--;
3873 : }
3874 0 : ndr->depth--;
3875 : }
3876 :
3877 0 : static enum ndr_err_code ndr_push_svcctl_DeleteService(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_DeleteService *r)
3878 : {
3879 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3880 0 : if (flags & NDR_IN) {
3881 0 : if (r->in.handle == NULL) {
3882 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3883 : }
3884 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3885 : }
3886 0 : if (flags & NDR_OUT) {
3887 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3888 : }
3889 0 : return NDR_ERR_SUCCESS;
3890 : }
3891 :
3892 0 : static enum ndr_err_code ndr_pull_svcctl_DeleteService(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_DeleteService *r)
3893 : {
3894 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
3895 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3896 0 : if (flags & NDR_IN) {
3897 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3898 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
3899 : }
3900 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3901 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3902 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3903 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3904 : }
3905 0 : if (flags & NDR_OUT) {
3906 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3907 : if (r->in.handle == NULL) {
3908 : NDR_PULL_ALLOC(ndr, r->in.handle);
3909 : NDR_ZERO_STRUCTP(r->in.handle);
3910 : }
3911 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3912 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3913 : }
3914 0 : return NDR_ERR_SUCCESS;
3915 : }
3916 :
3917 0 : _PUBLIC_ void ndr_print_svcctl_DeleteService(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_DeleteService *r)
3918 : {
3919 0 : ndr_print_struct(ndr, name, "svcctl_DeleteService");
3920 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3921 0 : ndr->depth++;
3922 0 : if (flags & NDR_SET_VALUES) {
3923 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3924 : }
3925 0 : if (flags & NDR_IN) {
3926 0 : ndr_print_struct(ndr, "in", "svcctl_DeleteService");
3927 0 : ndr->depth++;
3928 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
3929 0 : ndr->depth++;
3930 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
3931 0 : ndr->depth--;
3932 0 : ndr->depth--;
3933 : }
3934 0 : if (flags & NDR_OUT) {
3935 0 : ndr_print_struct(ndr, "out", "svcctl_DeleteService");
3936 0 : ndr->depth++;
3937 0 : ndr_print_WERROR(ndr, "result", r->out.result);
3938 0 : ndr->depth--;
3939 : }
3940 0 : ndr->depth--;
3941 : }
3942 :
3943 0 : static enum ndr_err_code ndr_push_svcctl_LockServiceDatabase(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_LockServiceDatabase *r)
3944 : {
3945 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3946 0 : if (flags & NDR_IN) {
3947 0 : if (r->in.handle == NULL) {
3948 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3949 : }
3950 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3951 : }
3952 0 : if (flags & NDR_OUT) {
3953 0 : if (r->out.lock == NULL) {
3954 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3955 : }
3956 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.lock));
3957 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3958 : }
3959 0 : return NDR_ERR_SUCCESS;
3960 : }
3961 :
3962 0 : static enum ndr_err_code ndr_pull_svcctl_LockServiceDatabase(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_LockServiceDatabase *r)
3963 : {
3964 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
3965 0 : TALLOC_CTX *_mem_save_lock_0 = NULL;
3966 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3967 0 : if (flags & NDR_IN) {
3968 0 : NDR_ZERO_STRUCT(r->out);
3969 :
3970 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3971 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
3972 : }
3973 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3974 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3975 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3976 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3977 0 : NDR_PULL_ALLOC(ndr, r->out.lock);
3978 0 : NDR_ZERO_STRUCTP(r->out.lock);
3979 : }
3980 0 : if (flags & NDR_OUT) {
3981 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3982 : if (r->in.handle == NULL) {
3983 : NDR_PULL_ALLOC(ndr, r->in.handle);
3984 : NDR_ZERO_STRUCTP(r->in.handle);
3985 : }
3986 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3987 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3988 0 : NDR_PULL_ALLOC(ndr, r->out.lock);
3989 : }
3990 0 : _mem_save_lock_0 = NDR_PULL_GET_MEM_CTX(ndr);
3991 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.lock, LIBNDR_FLAG_REF_ALLOC);
3992 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.lock));
3993 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_0, LIBNDR_FLAG_REF_ALLOC);
3994 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3995 : }
3996 0 : return NDR_ERR_SUCCESS;
3997 : }
3998 :
3999 0 : _PUBLIC_ void ndr_print_svcctl_LockServiceDatabase(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_LockServiceDatabase *r)
4000 : {
4001 0 : ndr_print_struct(ndr, name, "svcctl_LockServiceDatabase");
4002 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4003 0 : ndr->depth++;
4004 0 : if (flags & NDR_SET_VALUES) {
4005 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4006 : }
4007 0 : if (flags & NDR_IN) {
4008 0 : ndr_print_struct(ndr, "in", "svcctl_LockServiceDatabase");
4009 0 : ndr->depth++;
4010 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
4011 0 : ndr->depth++;
4012 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
4013 0 : ndr->depth--;
4014 0 : ndr->depth--;
4015 : }
4016 0 : if (flags & NDR_OUT) {
4017 0 : ndr_print_struct(ndr, "out", "svcctl_LockServiceDatabase");
4018 0 : ndr->depth++;
4019 0 : ndr_print_ptr(ndr, "lock", r->out.lock);
4020 0 : ndr->depth++;
4021 0 : ndr_print_policy_handle(ndr, "lock", r->out.lock);
4022 0 : ndr->depth--;
4023 0 : ndr_print_WERROR(ndr, "result", r->out.result);
4024 0 : ndr->depth--;
4025 : }
4026 0 : ndr->depth--;
4027 : }
4028 :
4029 40 : static enum ndr_err_code ndr_push_svcctl_QueryServiceObjectSecurity(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_QueryServiceObjectSecurity *r)
4030 : {
4031 40 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4032 40 : if (flags & NDR_IN) {
4033 20 : if (r->in.handle == NULL) {
4034 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4035 : }
4036 20 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4037 20 : NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.security_flags));
4038 20 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
4039 : }
4040 40 : if (flags & NDR_OUT) {
4041 20 : if (r->out.buffer == NULL) {
4042 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4043 : }
4044 20 : if (r->out.needed == NULL) {
4045 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4046 : }
4047 20 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
4048 20 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
4049 20 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
4050 20 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4051 : }
4052 40 : return NDR_ERR_SUCCESS;
4053 : }
4054 :
4055 40 : static enum ndr_err_code ndr_pull_svcctl_QueryServiceObjectSecurity(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_QueryServiceObjectSecurity *r)
4056 : {
4057 40 : uint32_t size_buffer_1 = 0;
4058 40 : TALLOC_CTX *_mem_save_handle_0 = NULL;
4059 40 : TALLOC_CTX *_mem_save_needed_0 = NULL;
4060 40 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4061 40 : if (flags & NDR_IN) {
4062 20 : NDR_ZERO_STRUCT(r->out);
4063 :
4064 20 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4065 20 : NDR_PULL_ALLOC(ndr, r->in.handle);
4066 : }
4067 20 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4068 20 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
4069 20 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4070 20 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4071 20 : NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.security_flags));
4072 20 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
4073 20 : if (r->in.offered > 262144) {
4074 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->in.offered), (uint32_t)(0), (uint32_t)(262144));
4075 : }
4076 20 : NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.offered);
4077 20 : memset(r->out.buffer, 0, (r->in.offered) * sizeof(*r->out.buffer));
4078 20 : NDR_PULL_ALLOC(ndr, r->out.needed);
4079 20 : NDR_ZERO_STRUCTP(r->out.needed);
4080 : }
4081 40 : if (flags & NDR_OUT) {
4082 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4083 : if (r->in.handle == NULL) {
4084 : NDR_PULL_ALLOC(ndr, r->in.handle);
4085 : NDR_ZERO_STRUCTP(r->in.handle);
4086 : }
4087 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4088 20 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
4089 20 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.buffer, &size_buffer_1));
4090 20 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4091 0 : NDR_PULL_ALLOC_N(ndr, r->out.buffer, size_buffer_1);
4092 : }
4093 20 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, size_buffer_1));
4094 20 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4095 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
4096 : }
4097 20 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
4098 20 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
4099 20 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
4100 20 : if (*r->out.needed > 262144) {
4101 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(*r->out.needed), (uint32_t)(0), (uint32_t)(262144));
4102 : }
4103 20 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
4104 20 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4105 20 : if (r->out.buffer) {
4106 8 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.buffer, r->in.offered));
4107 : }
4108 : }
4109 40 : return NDR_ERR_SUCCESS;
4110 : }
4111 :
4112 0 : _PUBLIC_ void ndr_print_svcctl_QueryServiceObjectSecurity(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_QueryServiceObjectSecurity *r)
4113 : {
4114 0 : ndr_print_struct(ndr, name, "svcctl_QueryServiceObjectSecurity");
4115 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4116 0 : ndr->depth++;
4117 0 : if (flags & NDR_SET_VALUES) {
4118 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4119 : }
4120 0 : if (flags & NDR_IN) {
4121 0 : ndr_print_struct(ndr, "in", "svcctl_QueryServiceObjectSecurity");
4122 0 : ndr->depth++;
4123 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
4124 0 : ndr->depth++;
4125 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
4126 0 : ndr->depth--;
4127 0 : ndr_print_security_secinfo(ndr, "security_flags", r->in.security_flags);
4128 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
4129 0 : ndr->depth--;
4130 : }
4131 0 : if (flags & NDR_OUT) {
4132 0 : ndr_print_struct(ndr, "out", "svcctl_QueryServiceObjectSecurity");
4133 0 : ndr->depth++;
4134 0 : ndr_print_ptr(ndr, "buffer", r->out.buffer);
4135 0 : ndr->depth++;
4136 0 : ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
4137 0 : ndr->depth--;
4138 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
4139 0 : ndr->depth++;
4140 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
4141 0 : ndr->depth--;
4142 0 : ndr_print_WERROR(ndr, "result", r->out.result);
4143 0 : ndr->depth--;
4144 : }
4145 0 : ndr->depth--;
4146 : }
4147 :
4148 8 : static enum ndr_err_code ndr_push_svcctl_SetServiceObjectSecurity(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_SetServiceObjectSecurity *r)
4149 : {
4150 8 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4151 8 : if (flags & NDR_IN) {
4152 4 : if (r->in.handle == NULL) {
4153 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4154 : }
4155 4 : if (r->in.buffer == NULL) {
4156 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4157 : }
4158 4 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4159 4 : NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.security_flags));
4160 4 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
4161 4 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.buffer, r->in.offered));
4162 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
4163 : }
4164 8 : if (flags & NDR_OUT) {
4165 4 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4166 : }
4167 8 : return NDR_ERR_SUCCESS;
4168 : }
4169 :
4170 8 : static enum ndr_err_code ndr_pull_svcctl_SetServiceObjectSecurity(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_SetServiceObjectSecurity *r)
4171 : {
4172 8 : uint32_t size_buffer_1 = 0;
4173 8 : TALLOC_CTX *_mem_save_handle_0 = NULL;
4174 8 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4175 8 : if (flags & NDR_IN) {
4176 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4177 4 : NDR_PULL_ALLOC(ndr, r->in.handle);
4178 : }
4179 4 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4180 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
4181 4 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4182 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4183 4 : NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.security_flags));
4184 4 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.buffer));
4185 4 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.buffer, &size_buffer_1));
4186 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4187 4 : NDR_PULL_ALLOC_N(ndr, r->in.buffer, size_buffer_1);
4188 : }
4189 4 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.buffer, size_buffer_1));
4190 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
4191 4 : if (r->in.buffer) {
4192 4 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.buffer, r->in.offered));
4193 : }
4194 : }
4195 8 : if (flags & NDR_OUT) {
4196 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4197 : if (r->in.handle == NULL) {
4198 : NDR_PULL_ALLOC(ndr, r->in.handle);
4199 : NDR_ZERO_STRUCTP(r->in.handle);
4200 : }
4201 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4202 4 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4203 : }
4204 8 : return NDR_ERR_SUCCESS;
4205 : }
4206 :
4207 0 : _PUBLIC_ void ndr_print_svcctl_SetServiceObjectSecurity(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_SetServiceObjectSecurity *r)
4208 : {
4209 0 : ndr_print_struct(ndr, name, "svcctl_SetServiceObjectSecurity");
4210 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4211 0 : ndr->depth++;
4212 0 : if (flags & NDR_SET_VALUES) {
4213 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4214 : }
4215 0 : if (flags & NDR_IN) {
4216 0 : ndr_print_struct(ndr, "in", "svcctl_SetServiceObjectSecurity");
4217 0 : ndr->depth++;
4218 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
4219 0 : ndr->depth++;
4220 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
4221 0 : ndr->depth--;
4222 0 : ndr_print_security_secinfo(ndr, "security_flags", r->in.security_flags);
4223 0 : ndr_print_ptr(ndr, "buffer", r->in.buffer);
4224 0 : ndr->depth++;
4225 0 : ndr_print_array_uint8(ndr, "buffer", r->in.buffer, r->in.offered);
4226 0 : ndr->depth--;
4227 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
4228 0 : ndr->depth--;
4229 : }
4230 0 : if (flags & NDR_OUT) {
4231 0 : ndr_print_struct(ndr, "out", "svcctl_SetServiceObjectSecurity");
4232 0 : ndr->depth++;
4233 0 : ndr_print_WERROR(ndr, "result", r->out.result);
4234 0 : ndr->depth--;
4235 : }
4236 0 : ndr->depth--;
4237 : }
4238 :
4239 8 : static enum ndr_err_code ndr_push_svcctl_QueryServiceStatus(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_QueryServiceStatus *r)
4240 : {
4241 8 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4242 8 : if (flags & NDR_IN) {
4243 4 : if (r->in.handle == NULL) {
4244 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4245 : }
4246 4 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4247 : }
4248 8 : if (flags & NDR_OUT) {
4249 4 : if (r->out.service_status == NULL) {
4250 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4251 : }
4252 4 : NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, r->out.service_status));
4253 4 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4254 : }
4255 8 : return NDR_ERR_SUCCESS;
4256 : }
4257 :
4258 8 : static enum ndr_err_code ndr_pull_svcctl_QueryServiceStatus(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_QueryServiceStatus *r)
4259 : {
4260 8 : TALLOC_CTX *_mem_save_handle_0 = NULL;
4261 8 : TALLOC_CTX *_mem_save_service_status_0 = NULL;
4262 8 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4263 8 : if (flags & NDR_IN) {
4264 4 : NDR_ZERO_STRUCT(r->out);
4265 :
4266 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4267 4 : NDR_PULL_ALLOC(ndr, r->in.handle);
4268 : }
4269 4 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4270 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
4271 4 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4272 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4273 4 : NDR_PULL_ALLOC(ndr, r->out.service_status);
4274 4 : NDR_ZERO_STRUCTP(r->out.service_status);
4275 : }
4276 8 : if (flags & NDR_OUT) {
4277 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4278 : if (r->in.handle == NULL) {
4279 : NDR_PULL_ALLOC(ndr, r->in.handle);
4280 : NDR_ZERO_STRUCTP(r->in.handle);
4281 : }
4282 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4283 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4284 0 : NDR_PULL_ALLOC(ndr, r->out.service_status);
4285 : }
4286 4 : _mem_save_service_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
4287 4 : NDR_PULL_SET_MEM_CTX(ndr, r->out.service_status, LIBNDR_FLAG_REF_ALLOC);
4288 4 : NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, r->out.service_status));
4289 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_status_0, LIBNDR_FLAG_REF_ALLOC);
4290 4 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4291 : }
4292 8 : return NDR_ERR_SUCCESS;
4293 : }
4294 :
4295 0 : _PUBLIC_ void ndr_print_svcctl_QueryServiceStatus(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_QueryServiceStatus *r)
4296 : {
4297 0 : ndr_print_struct(ndr, name, "svcctl_QueryServiceStatus");
4298 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4299 0 : ndr->depth++;
4300 0 : if (flags & NDR_SET_VALUES) {
4301 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4302 : }
4303 0 : if (flags & NDR_IN) {
4304 0 : ndr_print_struct(ndr, "in", "svcctl_QueryServiceStatus");
4305 0 : ndr->depth++;
4306 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
4307 0 : ndr->depth++;
4308 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
4309 0 : ndr->depth--;
4310 0 : ndr->depth--;
4311 : }
4312 0 : if (flags & NDR_OUT) {
4313 0 : ndr_print_struct(ndr, "out", "svcctl_QueryServiceStatus");
4314 0 : ndr->depth++;
4315 0 : ndr_print_ptr(ndr, "service_status", r->out.service_status);
4316 0 : ndr->depth++;
4317 0 : ndr_print_SERVICE_STATUS(ndr, "service_status", r->out.service_status);
4318 0 : ndr->depth--;
4319 0 : ndr_print_WERROR(ndr, "result", r->out.result);
4320 0 : ndr->depth--;
4321 : }
4322 0 : ndr->depth--;
4323 : }
4324 :
4325 0 : static enum ndr_err_code ndr_push_svcctl_SetServiceStatus(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_SetServiceStatus *r)
4326 : {
4327 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4328 0 : if (flags & NDR_IN) {
4329 0 : }
4330 0 : if (flags & NDR_OUT) {
4331 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4332 : }
4333 0 : return NDR_ERR_SUCCESS;
4334 : }
4335 :
4336 0 : static enum ndr_err_code ndr_pull_svcctl_SetServiceStatus(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_SetServiceStatus *r)
4337 : {
4338 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4339 0 : if (flags & NDR_IN) {
4340 0 : }
4341 0 : if (flags & NDR_OUT) {
4342 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4343 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4344 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4345 : }
4346 0 : return NDR_ERR_SUCCESS;
4347 : }
4348 :
4349 0 : _PUBLIC_ void ndr_print_svcctl_SetServiceStatus(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_SetServiceStatus *r)
4350 : {
4351 0 : ndr_print_struct(ndr, name, "svcctl_SetServiceStatus");
4352 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4353 0 : ndr->depth++;
4354 0 : if (flags & NDR_SET_VALUES) {
4355 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4356 : }
4357 0 : if (flags & NDR_IN) {
4358 0 : ndr_print_struct(ndr, "in", "svcctl_SetServiceStatus");
4359 0 : ndr->depth++;
4360 0 : ndr->depth--;
4361 : }
4362 0 : if (flags & NDR_OUT) {
4363 0 : ndr_print_struct(ndr, "out", "svcctl_SetServiceStatus");
4364 0 : ndr->depth++;
4365 0 : ndr_print_WERROR(ndr, "result", r->out.result);
4366 0 : ndr->depth--;
4367 : }
4368 0 : ndr->depth--;
4369 : }
4370 :
4371 0 : static enum ndr_err_code ndr_push_svcctl_UnlockServiceDatabase(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_UnlockServiceDatabase *r)
4372 : {
4373 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4374 0 : if (flags & NDR_IN) {
4375 0 : if (r->in.lock == NULL) {
4376 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4377 : }
4378 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.lock));
4379 : }
4380 0 : if (flags & NDR_OUT) {
4381 0 : if (r->out.lock == NULL) {
4382 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4383 : }
4384 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.lock));
4385 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4386 : }
4387 0 : return NDR_ERR_SUCCESS;
4388 : }
4389 :
4390 0 : static enum ndr_err_code ndr_pull_svcctl_UnlockServiceDatabase(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_UnlockServiceDatabase *r)
4391 : {
4392 0 : TALLOC_CTX *_mem_save_lock_0 = NULL;
4393 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4394 0 : if (flags & NDR_IN) {
4395 0 : NDR_ZERO_STRUCT(r->out);
4396 :
4397 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4398 0 : NDR_PULL_ALLOC(ndr, r->in.lock);
4399 : }
4400 0 : _mem_save_lock_0 = NDR_PULL_GET_MEM_CTX(ndr);
4401 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.lock, LIBNDR_FLAG_REF_ALLOC);
4402 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.lock));
4403 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_0, LIBNDR_FLAG_REF_ALLOC);
4404 0 : NDR_PULL_ALLOC(ndr, r->out.lock);
4405 0 : *r->out.lock = *r->in.lock;
4406 : }
4407 0 : if (flags & NDR_OUT) {
4408 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4409 : if (r->in.lock == NULL) {
4410 : NDR_PULL_ALLOC(ndr, r->in.lock);
4411 : NDR_ZERO_STRUCTP(r->in.lock);
4412 : }
4413 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4414 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4415 0 : NDR_PULL_ALLOC(ndr, r->out.lock);
4416 : }
4417 0 : _mem_save_lock_0 = NDR_PULL_GET_MEM_CTX(ndr);
4418 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.lock, LIBNDR_FLAG_REF_ALLOC);
4419 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.lock));
4420 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_0, LIBNDR_FLAG_REF_ALLOC);
4421 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4422 : }
4423 0 : return NDR_ERR_SUCCESS;
4424 : }
4425 :
4426 0 : _PUBLIC_ void ndr_print_svcctl_UnlockServiceDatabase(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_UnlockServiceDatabase *r)
4427 : {
4428 0 : ndr_print_struct(ndr, name, "svcctl_UnlockServiceDatabase");
4429 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4430 0 : ndr->depth++;
4431 0 : if (flags & NDR_SET_VALUES) {
4432 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4433 : }
4434 0 : if (flags & NDR_IN) {
4435 0 : ndr_print_struct(ndr, "in", "svcctl_UnlockServiceDatabase");
4436 0 : ndr->depth++;
4437 0 : ndr_print_ptr(ndr, "lock", r->in.lock);
4438 0 : ndr->depth++;
4439 0 : ndr_print_policy_handle(ndr, "lock", r->in.lock);
4440 0 : ndr->depth--;
4441 0 : ndr->depth--;
4442 : }
4443 0 : if (flags & NDR_OUT) {
4444 0 : ndr_print_struct(ndr, "out", "svcctl_UnlockServiceDatabase");
4445 0 : ndr->depth++;
4446 0 : ndr_print_ptr(ndr, "lock", r->out.lock);
4447 0 : ndr->depth++;
4448 0 : ndr_print_policy_handle(ndr, "lock", r->out.lock);
4449 0 : ndr->depth--;
4450 0 : ndr_print_WERROR(ndr, "result", r->out.result);
4451 0 : ndr->depth--;
4452 : }
4453 0 : ndr->depth--;
4454 : }
4455 :
4456 0 : static enum ndr_err_code ndr_push_svcctl_NotifyBootConfigStatus(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_NotifyBootConfigStatus *r)
4457 : {
4458 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4459 0 : if (flags & NDR_IN) {
4460 0 : }
4461 0 : if (flags & NDR_OUT) {
4462 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4463 : }
4464 0 : return NDR_ERR_SUCCESS;
4465 : }
4466 :
4467 0 : static enum ndr_err_code ndr_pull_svcctl_NotifyBootConfigStatus(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_NotifyBootConfigStatus *r)
4468 : {
4469 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4470 0 : if (flags & NDR_IN) {
4471 0 : }
4472 0 : if (flags & NDR_OUT) {
4473 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4474 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4475 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4476 : }
4477 0 : return NDR_ERR_SUCCESS;
4478 : }
4479 :
4480 0 : _PUBLIC_ void ndr_print_svcctl_NotifyBootConfigStatus(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_NotifyBootConfigStatus *r)
4481 : {
4482 0 : ndr_print_struct(ndr, name, "svcctl_NotifyBootConfigStatus");
4483 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4484 0 : ndr->depth++;
4485 0 : if (flags & NDR_SET_VALUES) {
4486 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4487 : }
4488 0 : if (flags & NDR_IN) {
4489 0 : ndr_print_struct(ndr, "in", "svcctl_NotifyBootConfigStatus");
4490 0 : ndr->depth++;
4491 0 : ndr->depth--;
4492 : }
4493 0 : if (flags & NDR_OUT) {
4494 0 : ndr_print_struct(ndr, "out", "svcctl_NotifyBootConfigStatus");
4495 0 : ndr->depth++;
4496 0 : ndr_print_WERROR(ndr, "result", r->out.result);
4497 0 : ndr->depth--;
4498 : }
4499 0 : ndr->depth--;
4500 : }
4501 :
4502 0 : static enum ndr_err_code ndr_push_svcctl_SCSetServiceBitsW(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_SCSetServiceBitsW *r)
4503 : {
4504 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4505 0 : if (flags & NDR_IN) {
4506 0 : if (r->in.handle == NULL) {
4507 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4508 : }
4509 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4510 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bits));
4511 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bitson));
4512 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.immediate));
4513 : }
4514 0 : if (flags & NDR_OUT) {
4515 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4516 : }
4517 0 : return NDR_ERR_SUCCESS;
4518 : }
4519 :
4520 0 : static enum ndr_err_code ndr_pull_svcctl_SCSetServiceBitsW(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_SCSetServiceBitsW *r)
4521 : {
4522 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
4523 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4524 0 : if (flags & NDR_IN) {
4525 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4526 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
4527 : }
4528 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4529 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
4530 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4531 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4532 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bits));
4533 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bitson));
4534 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.immediate));
4535 : }
4536 0 : if (flags & NDR_OUT) {
4537 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4538 : if (r->in.handle == NULL) {
4539 : NDR_PULL_ALLOC(ndr, r->in.handle);
4540 : NDR_ZERO_STRUCTP(r->in.handle);
4541 : }
4542 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4543 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4544 : }
4545 0 : return NDR_ERR_SUCCESS;
4546 : }
4547 :
4548 0 : _PUBLIC_ void ndr_print_svcctl_SCSetServiceBitsW(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_SCSetServiceBitsW *r)
4549 : {
4550 0 : ndr_print_struct(ndr, name, "svcctl_SCSetServiceBitsW");
4551 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4552 0 : ndr->depth++;
4553 0 : if (flags & NDR_SET_VALUES) {
4554 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4555 : }
4556 0 : if (flags & NDR_IN) {
4557 0 : ndr_print_struct(ndr, "in", "svcctl_SCSetServiceBitsW");
4558 0 : ndr->depth++;
4559 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
4560 0 : ndr->depth++;
4561 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
4562 0 : ndr->depth--;
4563 0 : ndr_print_uint32(ndr, "bits", r->in.bits);
4564 0 : ndr_print_uint32(ndr, "bitson", r->in.bitson);
4565 0 : ndr_print_uint32(ndr, "immediate", r->in.immediate);
4566 0 : ndr->depth--;
4567 : }
4568 0 : if (flags & NDR_OUT) {
4569 0 : ndr_print_struct(ndr, "out", "svcctl_SCSetServiceBitsW");
4570 0 : ndr->depth++;
4571 0 : ndr_print_WERROR(ndr, "result", r->out.result);
4572 0 : ndr->depth--;
4573 : }
4574 0 : ndr->depth--;
4575 : }
4576 :
4577 4 : _PUBLIC_ enum ndr_err_code ndr_push_svcctl_ChangeServiceConfigW(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_ChangeServiceConfigW *r)
4578 : {
4579 4 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4580 4 : if (flags & NDR_IN) {
4581 4 : if (r->in.handle == NULL) {
4582 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4583 : }
4584 4 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4585 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
4586 4 : NDR_CHECK(ndr_push_svcctl_StartType(ndr, NDR_SCALARS, r->in.start_type));
4587 4 : NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr, NDR_SCALARS, r->in.error_control));
4588 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.binary_path));
4589 4 : if (r->in.binary_path) {
4590 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
4591 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4592 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
4593 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.binary_path, ndr_charset_length(r->in.binary_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4594 : }
4595 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.load_order_group));
4596 4 : if (r->in.load_order_group) {
4597 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.load_order_group, CH_UTF16)));
4598 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4599 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.load_order_group, CH_UTF16)));
4600 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.load_order_group, ndr_charset_length(r->in.load_order_group, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4601 : }
4602 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.tag_id));
4603 4 : if (r->in.tag_id) {
4604 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.tag_id));
4605 : }
4606 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dependencies));
4607 4 : if (r->in.dependencies) {
4608 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.dwDependSize));
4609 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4610 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.dwDependSize));
4611 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dependencies, r->in.dwDependSize, sizeof(uint16_t), CH_UTF16));
4612 : }
4613 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwDependSize));
4614 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_start_name));
4615 4 : if (r->in.service_start_name) {
4616 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
4617 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4618 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
4619 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.service_start_name, ndr_charset_length(r->in.service_start_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4620 : }
4621 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
4622 4 : if (r->in.password) {
4623 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.dwPwSize));
4624 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4625 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.dwPwSize));
4626 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.password, r->in.dwPwSize, sizeof(uint16_t), CH_UTF16));
4627 : }
4628 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwPwSize));
4629 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name));
4630 4 : if (r->in.display_name) {
4631 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.display_name, CH_UTF16)));
4632 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4633 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.display_name, CH_UTF16)));
4634 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.display_name, ndr_charset_length(r->in.display_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4635 : }
4636 : }
4637 4 : if (flags & NDR_OUT) {
4638 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.tag_id));
4639 0 : if (r->out.tag_id) {
4640 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.tag_id));
4641 : }
4642 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4643 : }
4644 4 : return NDR_ERR_SUCCESS;
4645 : }
4646 :
4647 8 : _PUBLIC_ enum ndr_err_code ndr_pull_svcctl_ChangeServiceConfigW(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_ChangeServiceConfigW *r)
4648 : {
4649 4 : uint32_t _ptr_binary_path;
4650 8 : uint32_t size_binary_path_1 = 0;
4651 8 : uint32_t length_binary_path_1 = 0;
4652 4 : uint32_t _ptr_load_order_group;
4653 8 : uint32_t size_load_order_group_1 = 0;
4654 8 : uint32_t length_load_order_group_1 = 0;
4655 4 : uint32_t _ptr_tag_id;
4656 4 : uint32_t _ptr_dependencies;
4657 8 : uint32_t size_dependencies_1 = 0;
4658 8 : uint32_t length_dependencies_1 = 0;
4659 4 : uint32_t _ptr_service_start_name;
4660 8 : uint32_t size_service_start_name_1 = 0;
4661 8 : uint32_t length_service_start_name_1 = 0;
4662 4 : uint32_t _ptr_password;
4663 8 : uint32_t size_password_1 = 0;
4664 8 : uint32_t length_password_1 = 0;
4665 4 : uint32_t _ptr_display_name;
4666 8 : uint32_t size_display_name_1 = 0;
4667 8 : uint32_t length_display_name_1 = 0;
4668 8 : TALLOC_CTX *_mem_save_handle_0 = NULL;
4669 8 : TALLOC_CTX *_mem_save_binary_path_0 = NULL;
4670 8 : TALLOC_CTX *_mem_save_load_order_group_0 = NULL;
4671 8 : TALLOC_CTX *_mem_save_tag_id_0 = NULL;
4672 8 : TALLOC_CTX *_mem_save_dependencies_0 = NULL;
4673 8 : TALLOC_CTX *_mem_save_service_start_name_0 = NULL;
4674 8 : TALLOC_CTX *_mem_save_password_0 = NULL;
4675 8 : TALLOC_CTX *_mem_save_display_name_0 = NULL;
4676 8 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4677 8 : if (flags & NDR_IN) {
4678 6 : NDR_ZERO_STRUCT(r->out);
4679 :
4680 6 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4681 6 : NDR_PULL_ALLOC(ndr, r->in.handle);
4682 : }
4683 6 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4684 6 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
4685 6 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4686 6 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4687 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
4688 8 : NDR_CHECK(ndr_pull_svcctl_StartType(ndr, NDR_SCALARS, &r->in.start_type));
4689 8 : NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr, NDR_SCALARS, &r->in.error_control));
4690 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_binary_path));
4691 6 : if (_ptr_binary_path) {
4692 0 : NDR_PULL_ALLOC(ndr, r->in.binary_path);
4693 : } else {
4694 6 : r->in.binary_path = NULL;
4695 : }
4696 6 : if (r->in.binary_path) {
4697 0 : _mem_save_binary_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
4698 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.binary_path, 0);
4699 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.binary_path));
4700 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.binary_path));
4701 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.binary_path, &size_binary_path_1));
4702 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.binary_path, &length_binary_path_1));
4703 0 : if (length_binary_path_1 > size_binary_path_1) {
4704 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_binary_path_1, length_binary_path_1);
4705 : }
4706 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_binary_path_1, sizeof(uint16_t)));
4707 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.binary_path, length_binary_path_1, sizeof(uint16_t), CH_UTF16));
4708 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_binary_path_0, 0);
4709 : }
4710 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_load_order_group));
4711 6 : if (_ptr_load_order_group) {
4712 0 : NDR_PULL_ALLOC(ndr, r->in.load_order_group);
4713 : } else {
4714 6 : r->in.load_order_group = NULL;
4715 : }
4716 6 : if (r->in.load_order_group) {
4717 0 : _mem_save_load_order_group_0 = NDR_PULL_GET_MEM_CTX(ndr);
4718 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.load_order_group, 0);
4719 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.load_order_group));
4720 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.load_order_group));
4721 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.load_order_group, &size_load_order_group_1));
4722 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.load_order_group, &length_load_order_group_1));
4723 0 : if (length_load_order_group_1 > size_load_order_group_1) {
4724 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_load_order_group_1, length_load_order_group_1);
4725 : }
4726 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_load_order_group_1, sizeof(uint16_t)));
4727 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.load_order_group, length_load_order_group_1, sizeof(uint16_t), CH_UTF16));
4728 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_load_order_group_0, 0);
4729 : }
4730 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_tag_id));
4731 6 : if (_ptr_tag_id) {
4732 0 : NDR_PULL_ALLOC(ndr, r->in.tag_id);
4733 : } else {
4734 6 : r->in.tag_id = NULL;
4735 : }
4736 6 : if (r->in.tag_id) {
4737 0 : _mem_save_tag_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
4738 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.tag_id, 0);
4739 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.tag_id));
4740 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_tag_id_0, 0);
4741 : }
4742 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
4743 6 : if (_ptr_dependencies) {
4744 0 : NDR_PULL_ALLOC(ndr, r->in.dependencies);
4745 : } else {
4746 6 : r->in.dependencies = NULL;
4747 : }
4748 6 : if (r->in.dependencies) {
4749 0 : _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
4750 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.dependencies, 0);
4751 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dependencies));
4752 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dependencies));
4753 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.dependencies, &size_dependencies_1));
4754 0 : NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->in.dependencies, &length_dependencies_1));
4755 0 : if (length_dependencies_1 > size_dependencies_1) {
4756 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dependencies_1, length_dependencies_1);
4757 : }
4758 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dependencies_1, sizeof(uint16_t)));
4759 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dependencies, length_dependencies_1, sizeof(uint16_t), CH_UTF16));
4760 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
4761 : }
4762 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwDependSize));
4763 6 : if (r->in.dwDependSize > SC_MAX_DEPEND_SIZE) {
4764 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->in.dwDependSize), (uint32_t)(0), (uint32_t)(SC_MAX_DEPEND_SIZE));
4765 : }
4766 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_start_name));
4767 6 : if (_ptr_service_start_name) {
4768 0 : NDR_PULL_ALLOC(ndr, r->in.service_start_name);
4769 : } else {
4770 6 : r->in.service_start_name = NULL;
4771 : }
4772 6 : if (r->in.service_start_name) {
4773 0 : _mem_save_service_start_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4774 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.service_start_name, 0);
4775 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_start_name));
4776 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_start_name));
4777 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.service_start_name, &size_service_start_name_1));
4778 0 : if (size_service_start_name_1 > SC_MAX_ACCOUNT_NAME_LENGTH) {
4779 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_service_start_name_1, (uint32_t)(0), (uint32_t)(SC_MAX_ACCOUNT_NAME_LENGTH));
4780 : }
4781 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.service_start_name, &length_service_start_name_1));
4782 0 : if (length_service_start_name_1 > SC_MAX_ACCOUNT_NAME_LENGTH) {
4783 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_service_start_name_1, (uint32_t)(0), (uint32_t)(SC_MAX_ACCOUNT_NAME_LENGTH));
4784 : }
4785 0 : if (length_service_start_name_1 > size_service_start_name_1) {
4786 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_service_start_name_1, length_service_start_name_1);
4787 : }
4788 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_service_start_name_1, sizeof(uint16_t)));
4789 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_start_name, length_service_start_name_1, sizeof(uint16_t), CH_UTF16));
4790 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_start_name_0, 0);
4791 : }
4792 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
4793 6 : if (_ptr_password) {
4794 0 : NDR_PULL_ALLOC(ndr, r->in.password);
4795 : } else {
4796 6 : r->in.password = NULL;
4797 : }
4798 6 : if (r->in.password) {
4799 0 : _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
4800 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
4801 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
4802 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.password));
4803 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.password, &size_password_1));
4804 0 : NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->in.password, &length_password_1));
4805 0 : if (length_password_1 > size_password_1) {
4806 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_password_1, length_password_1);
4807 : }
4808 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_password_1, sizeof(uint16_t)));
4809 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.password, length_password_1, sizeof(uint16_t), CH_UTF16));
4810 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
4811 : }
4812 6 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwPwSize));
4813 6 : if (r->in.dwPwSize > SC_MAX_PWD_SIZE) {
4814 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->in.dwPwSize), (uint32_t)(0), (uint32_t)(SC_MAX_PWD_SIZE));
4815 : }
4816 6 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
4817 6 : if (_ptr_display_name) {
4818 0 : NDR_PULL_ALLOC(ndr, r->in.display_name);
4819 : } else {
4820 6 : r->in.display_name = NULL;
4821 : }
4822 6 : if (r->in.display_name) {
4823 0 : _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4824 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name, 0);
4825 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.display_name));
4826 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.display_name));
4827 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.display_name, &size_display_name_1));
4828 0 : if (size_display_name_1 > SC_MAX_NAME_LENGTH) {
4829 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_display_name_1, (uint32_t)(0), (uint32_t)(SC_MAX_NAME_LENGTH));
4830 : }
4831 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.display_name, &length_display_name_1));
4832 0 : if (length_display_name_1 > SC_MAX_NAME_LENGTH) {
4833 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_display_name_1, (uint32_t)(0), (uint32_t)(SC_MAX_NAME_LENGTH));
4834 : }
4835 0 : if (length_display_name_1 > size_display_name_1) {
4836 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_display_name_1, length_display_name_1);
4837 : }
4838 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_display_name_1, sizeof(uint16_t)));
4839 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.display_name, length_display_name_1, sizeof(uint16_t), CH_UTF16));
4840 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, 0);
4841 : }
4842 6 : if (r->in.dependencies) {
4843 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.dependencies, r->in.dwDependSize));
4844 : }
4845 6 : if (r->in.dependencies) {
4846 0 : NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->in.dependencies, r->in.dwDependSize));
4847 : }
4848 6 : if (r->in.password) {
4849 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.password, r->in.dwPwSize));
4850 : }
4851 6 : if (r->in.password) {
4852 0 : NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->in.password, r->in.dwPwSize));
4853 : }
4854 : }
4855 8 : if (flags & NDR_OUT) {
4856 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4857 : if (r->in.handle == NULL) {
4858 : NDR_PULL_ALLOC(ndr, r->in.handle);
4859 : NDR_ZERO_STRUCTP(r->in.handle);
4860 : }
4861 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4862 2 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_tag_id));
4863 2 : if (_ptr_tag_id) {
4864 0 : NDR_PULL_ALLOC(ndr, r->out.tag_id);
4865 : } else {
4866 2 : r->out.tag_id = NULL;
4867 : }
4868 2 : if (r->out.tag_id) {
4869 0 : _mem_save_tag_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
4870 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.tag_id, 0);
4871 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.tag_id));
4872 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_tag_id_0, 0);
4873 : }
4874 2 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4875 : }
4876 4 : return NDR_ERR_SUCCESS;
4877 : }
4878 :
4879 4 : _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfigW(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_ChangeServiceConfigW *r)
4880 : {
4881 4 : ndr_print_struct(ndr, name, "svcctl_ChangeServiceConfigW");
4882 4 : if (r == NULL) { ndr_print_null(ndr); return; }
4883 4 : ndr->depth++;
4884 4 : if (flags & NDR_SET_VALUES) {
4885 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4886 : }
4887 4 : if (flags & NDR_IN) {
4888 2 : ndr_print_struct(ndr, "in", "svcctl_ChangeServiceConfigW");
4889 2 : ndr->depth++;
4890 2 : ndr_print_ptr(ndr, "handle", r->in.handle);
4891 2 : ndr->depth++;
4892 2 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
4893 2 : ndr->depth--;
4894 2 : ndr_print_uint32(ndr, "type", r->in.type);
4895 2 : ndr_print_svcctl_StartType(ndr, "start_type", r->in.start_type);
4896 2 : ndr_print_svcctl_ErrorControl(ndr, "error_control", r->in.error_control);
4897 2 : ndr_print_ptr(ndr, "binary_path", r->in.binary_path);
4898 2 : ndr->depth++;
4899 2 : if (r->in.binary_path) {
4900 0 : ndr_print_string(ndr, "binary_path", r->in.binary_path);
4901 : }
4902 2 : ndr->depth--;
4903 2 : ndr_print_ptr(ndr, "load_order_group", r->in.load_order_group);
4904 2 : ndr->depth++;
4905 2 : if (r->in.load_order_group) {
4906 0 : ndr_print_string(ndr, "load_order_group", r->in.load_order_group);
4907 : }
4908 2 : ndr->depth--;
4909 2 : ndr_print_ptr(ndr, "tag_id", r->in.tag_id);
4910 2 : ndr->depth++;
4911 2 : if (r->in.tag_id) {
4912 0 : ndr_print_uint32(ndr, "tag_id", *r->in.tag_id);
4913 : }
4914 2 : ndr->depth--;
4915 2 : ndr_print_ptr(ndr, "dependencies", r->in.dependencies);
4916 2 : ndr->depth++;
4917 2 : if (r->in.dependencies) {
4918 0 : ndr_print_string(ndr, "dependencies", r->in.dependencies);
4919 : }
4920 2 : ndr->depth--;
4921 2 : ndr_print_uint32(ndr, "dwDependSize", r->in.dwDependSize);
4922 2 : ndr_print_ptr(ndr, "service_start_name", r->in.service_start_name);
4923 2 : ndr->depth++;
4924 2 : if (r->in.service_start_name) {
4925 0 : ndr_print_string(ndr, "service_start_name", r->in.service_start_name);
4926 : }
4927 2 : ndr->depth--;
4928 2 : ndr_print_ptr(ndr, "password", r->in.password);
4929 2 : ndr->depth++;
4930 2 : if (r->in.password) {
4931 0 : ndr_print_string(ndr, "password", r->in.password);
4932 : }
4933 2 : ndr->depth--;
4934 2 : ndr_print_uint32(ndr, "dwPwSize", r->in.dwPwSize);
4935 2 : ndr_print_ptr(ndr, "display_name", r->in.display_name);
4936 2 : ndr->depth++;
4937 2 : if (r->in.display_name) {
4938 0 : ndr_print_string(ndr, "display_name", r->in.display_name);
4939 : }
4940 2 : ndr->depth--;
4941 2 : ndr->depth--;
4942 : }
4943 4 : if (flags & NDR_OUT) {
4944 2 : ndr_print_struct(ndr, "out", "svcctl_ChangeServiceConfigW");
4945 2 : ndr->depth++;
4946 2 : ndr_print_ptr(ndr, "tag_id", r->out.tag_id);
4947 2 : ndr->depth++;
4948 2 : if (r->out.tag_id) {
4949 0 : ndr_print_uint32(ndr, "tag_id", *r->out.tag_id);
4950 : }
4951 2 : ndr->depth--;
4952 2 : ndr_print_WERROR(ndr, "result", r->out.result);
4953 2 : ndr->depth--;
4954 : }
4955 4 : ndr->depth--;
4956 : }
4957 :
4958 0 : static enum ndr_err_code ndr_push_svcctl_CreateServiceW(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_CreateServiceW *r)
4959 : {
4960 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4961 0 : if (flags & NDR_IN) {
4962 0 : if (r->in.scmanager_handle == NULL) {
4963 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4964 : }
4965 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
4966 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
4967 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4968 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
4969 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.ServiceName, ndr_charset_length(r->in.ServiceName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4970 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.DisplayName));
4971 0 : if (r->in.DisplayName) {
4972 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DisplayName, CH_UTF16)));
4973 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4974 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DisplayName, CH_UTF16)));
4975 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.DisplayName, ndr_charset_length(r->in.DisplayName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4976 : }
4977 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.desired_access));
4978 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
4979 0 : NDR_CHECK(ndr_push_svcctl_StartType(ndr, NDR_SCALARS, r->in.start_type));
4980 0 : NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr, NDR_SCALARS, r->in.error_control));
4981 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
4982 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4983 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
4984 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.binary_path, ndr_charset_length(r->in.binary_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4985 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.LoadOrderGroupKey));
4986 0 : if (r->in.LoadOrderGroupKey) {
4987 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16)));
4988 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4989 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16)));
4990 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.LoadOrderGroupKey, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4991 : }
4992 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.TagId));
4993 0 : if (r->in.TagId) {
4994 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.TagId));
4995 : }
4996 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dependencies));
4997 0 : if (r->in.dependencies) {
4998 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.dependencies_size));
4999 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.dependencies, r->in.dependencies_size));
5000 : }
5001 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dependencies_size));
5002 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_start_name));
5003 0 : if (r->in.service_start_name) {
5004 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
5005 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5006 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
5007 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.service_start_name, ndr_charset_length(r->in.service_start_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5008 : }
5009 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
5010 0 : if (r->in.password) {
5011 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.password_size));
5012 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.password, r->in.password_size));
5013 : }
5014 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.password_size));
5015 : }
5016 0 : if (flags & NDR_OUT) {
5017 0 : if (r->out.handle == NULL) {
5018 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5019 : }
5020 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.TagId));
5021 0 : if (r->out.TagId) {
5022 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.TagId));
5023 : }
5024 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5025 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5026 : }
5027 0 : return NDR_ERR_SUCCESS;
5028 : }
5029 :
5030 0 : static enum ndr_err_code ndr_pull_svcctl_CreateServiceW(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_CreateServiceW *r)
5031 : {
5032 0 : uint32_t size_ServiceName_0 = 0;
5033 0 : uint32_t length_ServiceName_0 = 0;
5034 0 : uint32_t _ptr_DisplayName;
5035 0 : uint32_t size_DisplayName_1 = 0;
5036 0 : uint32_t length_DisplayName_1 = 0;
5037 0 : uint32_t size_binary_path_0 = 0;
5038 0 : uint32_t length_binary_path_0 = 0;
5039 0 : uint32_t _ptr_LoadOrderGroupKey;
5040 0 : uint32_t size_LoadOrderGroupKey_1 = 0;
5041 0 : uint32_t length_LoadOrderGroupKey_1 = 0;
5042 0 : uint32_t _ptr_TagId;
5043 0 : uint32_t _ptr_dependencies;
5044 0 : uint32_t size_dependencies_1 = 0;
5045 0 : uint32_t _ptr_service_start_name;
5046 0 : uint32_t size_service_start_name_1 = 0;
5047 0 : uint32_t length_service_start_name_1 = 0;
5048 0 : uint32_t _ptr_password;
5049 0 : uint32_t size_password_1 = 0;
5050 0 : TALLOC_CTX *_mem_save_scmanager_handle_0 = NULL;
5051 0 : TALLOC_CTX *_mem_save_DisplayName_0 = NULL;
5052 0 : TALLOC_CTX *_mem_save_LoadOrderGroupKey_0 = NULL;
5053 0 : TALLOC_CTX *_mem_save_TagId_0 = NULL;
5054 0 : TALLOC_CTX *_mem_save_dependencies_0 = NULL;
5055 0 : TALLOC_CTX *_mem_save_service_start_name_0 = NULL;
5056 0 : TALLOC_CTX *_mem_save_password_0 = NULL;
5057 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
5058 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
5059 0 : if (flags & NDR_IN) {
5060 0 : NDR_ZERO_STRUCT(r->out);
5061 :
5062 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5063 0 : NDR_PULL_ALLOC(ndr, r->in.scmanager_handle);
5064 : }
5065 0 : _mem_save_scmanager_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5066 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager_handle, LIBNDR_FLAG_REF_ALLOC);
5067 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
5068 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_handle_0, LIBNDR_FLAG_REF_ALLOC);
5069 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.ServiceName));
5070 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.ServiceName));
5071 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.ServiceName, &size_ServiceName_0));
5072 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.ServiceName, &length_ServiceName_0));
5073 0 : if (length_ServiceName_0 > size_ServiceName_0) {
5074 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_ServiceName_0, length_ServiceName_0);
5075 : }
5076 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_ServiceName_0, sizeof(uint16_t)));
5077 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.ServiceName, length_ServiceName_0, sizeof(uint16_t), CH_UTF16));
5078 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DisplayName));
5079 0 : if (_ptr_DisplayName) {
5080 0 : NDR_PULL_ALLOC(ndr, r->in.DisplayName);
5081 : } else {
5082 0 : r->in.DisplayName = NULL;
5083 : }
5084 0 : if (r->in.DisplayName) {
5085 0 : _mem_save_DisplayName_0 = NDR_PULL_GET_MEM_CTX(ndr);
5086 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.DisplayName, 0);
5087 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.DisplayName));
5088 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.DisplayName));
5089 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.DisplayName, &size_DisplayName_1));
5090 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.DisplayName, &length_DisplayName_1));
5091 0 : if (length_DisplayName_1 > size_DisplayName_1) {
5092 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_DisplayName_1, length_DisplayName_1);
5093 : }
5094 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_DisplayName_1, sizeof(uint16_t)));
5095 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.DisplayName, length_DisplayName_1, sizeof(uint16_t), CH_UTF16));
5096 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DisplayName_0, 0);
5097 : }
5098 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.desired_access));
5099 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
5100 0 : NDR_CHECK(ndr_pull_svcctl_StartType(ndr, NDR_SCALARS, &r->in.start_type));
5101 0 : NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr, NDR_SCALARS, &r->in.error_control));
5102 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.binary_path));
5103 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.binary_path));
5104 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.binary_path, &size_binary_path_0));
5105 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.binary_path, &length_binary_path_0));
5106 0 : if (length_binary_path_0 > size_binary_path_0) {
5107 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_binary_path_0, length_binary_path_0);
5108 : }
5109 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_binary_path_0, sizeof(uint16_t)));
5110 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.binary_path, length_binary_path_0, sizeof(uint16_t), CH_UTF16));
5111 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_LoadOrderGroupKey));
5112 0 : if (_ptr_LoadOrderGroupKey) {
5113 0 : NDR_PULL_ALLOC(ndr, r->in.LoadOrderGroupKey);
5114 : } else {
5115 0 : r->in.LoadOrderGroupKey = NULL;
5116 : }
5117 0 : if (r->in.LoadOrderGroupKey) {
5118 0 : _mem_save_LoadOrderGroupKey_0 = NDR_PULL_GET_MEM_CTX(ndr);
5119 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.LoadOrderGroupKey, 0);
5120 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.LoadOrderGroupKey));
5121 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.LoadOrderGroupKey));
5122 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.LoadOrderGroupKey, &size_LoadOrderGroupKey_1));
5123 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.LoadOrderGroupKey, &length_LoadOrderGroupKey_1));
5124 0 : if (length_LoadOrderGroupKey_1 > size_LoadOrderGroupKey_1) {
5125 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_LoadOrderGroupKey_1, length_LoadOrderGroupKey_1);
5126 : }
5127 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_LoadOrderGroupKey_1, sizeof(uint16_t)));
5128 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.LoadOrderGroupKey, length_LoadOrderGroupKey_1, sizeof(uint16_t), CH_UTF16));
5129 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_LoadOrderGroupKey_0, 0);
5130 : }
5131 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_TagId));
5132 0 : if (_ptr_TagId) {
5133 0 : NDR_PULL_ALLOC(ndr, r->in.TagId);
5134 : } else {
5135 0 : r->in.TagId = NULL;
5136 : }
5137 0 : if (r->in.TagId) {
5138 0 : _mem_save_TagId_0 = NDR_PULL_GET_MEM_CTX(ndr);
5139 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.TagId, 0);
5140 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.TagId));
5141 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_TagId_0, 0);
5142 : }
5143 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
5144 0 : if (_ptr_dependencies) {
5145 0 : NDR_PULL_ALLOC(ndr, r->in.dependencies);
5146 : } else {
5147 0 : r->in.dependencies = NULL;
5148 : }
5149 0 : if (r->in.dependencies) {
5150 0 : _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
5151 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.dependencies, 0);
5152 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dependencies));
5153 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.dependencies, &size_dependencies_1));
5154 0 : NDR_PULL_ALLOC_N(ndr, r->in.dependencies, size_dependencies_1);
5155 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.dependencies, size_dependencies_1));
5156 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
5157 : }
5158 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dependencies_size));
5159 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_start_name));
5160 0 : if (_ptr_service_start_name) {
5161 0 : NDR_PULL_ALLOC(ndr, r->in.service_start_name);
5162 : } else {
5163 0 : r->in.service_start_name = NULL;
5164 : }
5165 0 : if (r->in.service_start_name) {
5166 0 : _mem_save_service_start_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5167 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.service_start_name, 0);
5168 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_start_name));
5169 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_start_name));
5170 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.service_start_name, &size_service_start_name_1));
5171 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.service_start_name, &length_service_start_name_1));
5172 0 : if (length_service_start_name_1 > size_service_start_name_1) {
5173 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_service_start_name_1, length_service_start_name_1);
5174 : }
5175 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_service_start_name_1, sizeof(uint16_t)));
5176 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_start_name, length_service_start_name_1, sizeof(uint16_t), CH_UTF16));
5177 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_start_name_0, 0);
5178 : }
5179 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
5180 0 : if (_ptr_password) {
5181 0 : NDR_PULL_ALLOC(ndr, r->in.password);
5182 : } else {
5183 0 : r->in.password = NULL;
5184 : }
5185 0 : if (r->in.password) {
5186 0 : _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
5187 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
5188 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
5189 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.password, &size_password_1));
5190 0 : NDR_PULL_ALLOC_N(ndr, r->in.password, size_password_1);
5191 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.password, size_password_1));
5192 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
5193 : }
5194 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.password_size));
5195 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
5196 0 : NDR_ZERO_STRUCTP(r->out.handle);
5197 0 : if (r->in.dependencies) {
5198 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.dependencies, r->in.dependencies_size));
5199 : }
5200 0 : if (r->in.password) {
5201 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.password, r->in.password_size));
5202 : }
5203 : }
5204 0 : if (flags & NDR_OUT) {
5205 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
5206 : if (r->in.scmanager_handle == NULL) {
5207 : NDR_PULL_ALLOC(ndr, r->in.scmanager_handle);
5208 : NDR_ZERO_STRUCTP(r->in.scmanager_handle);
5209 : }
5210 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
5211 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_TagId));
5212 0 : if (_ptr_TagId) {
5213 0 : NDR_PULL_ALLOC(ndr, r->out.TagId);
5214 : } else {
5215 0 : r->out.TagId = NULL;
5216 : }
5217 0 : if (r->out.TagId) {
5218 0 : _mem_save_TagId_0 = NDR_PULL_GET_MEM_CTX(ndr);
5219 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.TagId, 0);
5220 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.TagId));
5221 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_TagId_0, 0);
5222 : }
5223 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5224 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
5225 : }
5226 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5227 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
5228 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5229 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5230 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5231 : }
5232 0 : return NDR_ERR_SUCCESS;
5233 : }
5234 :
5235 0 : _PUBLIC_ void ndr_print_svcctl_CreateServiceW(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_CreateServiceW *r)
5236 : {
5237 0 : ndr_print_struct(ndr, name, "svcctl_CreateServiceW");
5238 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5239 0 : ndr->depth++;
5240 0 : if (flags & NDR_SET_VALUES) {
5241 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5242 : }
5243 0 : if (flags & NDR_IN) {
5244 0 : ndr_print_struct(ndr, "in", "svcctl_CreateServiceW");
5245 0 : ndr->depth++;
5246 0 : ndr_print_ptr(ndr, "scmanager_handle", r->in.scmanager_handle);
5247 0 : ndr->depth++;
5248 0 : ndr_print_policy_handle(ndr, "scmanager_handle", r->in.scmanager_handle);
5249 0 : ndr->depth--;
5250 0 : ndr_print_string(ndr, "ServiceName", r->in.ServiceName);
5251 0 : ndr_print_ptr(ndr, "DisplayName", r->in.DisplayName);
5252 0 : ndr->depth++;
5253 0 : if (r->in.DisplayName) {
5254 0 : ndr_print_string(ndr, "DisplayName", r->in.DisplayName);
5255 : }
5256 0 : ndr->depth--;
5257 0 : ndr_print_uint32(ndr, "desired_access", r->in.desired_access);
5258 0 : ndr_print_uint32(ndr, "type", r->in.type);
5259 0 : ndr_print_svcctl_StartType(ndr, "start_type", r->in.start_type);
5260 0 : ndr_print_svcctl_ErrorControl(ndr, "error_control", r->in.error_control);
5261 0 : ndr_print_string(ndr, "binary_path", r->in.binary_path);
5262 0 : ndr_print_ptr(ndr, "LoadOrderGroupKey", r->in.LoadOrderGroupKey);
5263 0 : ndr->depth++;
5264 0 : if (r->in.LoadOrderGroupKey) {
5265 0 : ndr_print_string(ndr, "LoadOrderGroupKey", r->in.LoadOrderGroupKey);
5266 : }
5267 0 : ndr->depth--;
5268 0 : ndr_print_ptr(ndr, "TagId", r->in.TagId);
5269 0 : ndr->depth++;
5270 0 : if (r->in.TagId) {
5271 0 : ndr_print_uint32(ndr, "TagId", *r->in.TagId);
5272 : }
5273 0 : ndr->depth--;
5274 0 : ndr_print_ptr(ndr, "dependencies", r->in.dependencies);
5275 0 : ndr->depth++;
5276 0 : if (r->in.dependencies) {
5277 0 : ndr_print_array_uint8(ndr, "dependencies", r->in.dependencies, r->in.dependencies_size);
5278 : }
5279 0 : ndr->depth--;
5280 0 : ndr_print_uint32(ndr, "dependencies_size", r->in.dependencies_size);
5281 0 : ndr_print_ptr(ndr, "service_start_name", r->in.service_start_name);
5282 0 : ndr->depth++;
5283 0 : if (r->in.service_start_name) {
5284 0 : ndr_print_string(ndr, "service_start_name", r->in.service_start_name);
5285 : }
5286 0 : ndr->depth--;
5287 0 : ndr_print_ptr(ndr, "password", r->in.password);
5288 0 : ndr->depth++;
5289 0 : if (r->in.password) {
5290 0 : ndr_print_array_uint8(ndr, "password", r->in.password, r->in.password_size);
5291 : }
5292 0 : ndr->depth--;
5293 0 : ndr_print_uint32(ndr, "password_size", r->in.password_size);
5294 0 : ndr->depth--;
5295 : }
5296 0 : if (flags & NDR_OUT) {
5297 0 : ndr_print_struct(ndr, "out", "svcctl_CreateServiceW");
5298 0 : ndr->depth++;
5299 0 : ndr_print_ptr(ndr, "TagId", r->out.TagId);
5300 0 : ndr->depth++;
5301 0 : if (r->out.TagId) {
5302 0 : ndr_print_uint32(ndr, "TagId", *r->out.TagId);
5303 : }
5304 0 : ndr->depth--;
5305 0 : ndr_print_ptr(ndr, "handle", r->out.handle);
5306 0 : ndr->depth++;
5307 0 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
5308 0 : ndr->depth--;
5309 0 : ndr_print_WERROR(ndr, "result", r->out.result);
5310 0 : ndr->depth--;
5311 : }
5312 0 : ndr->depth--;
5313 : }
5314 :
5315 32 : static enum ndr_err_code ndr_push_svcctl_EnumDependentServicesW(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_EnumDependentServicesW *r)
5316 : {
5317 32 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
5318 32 : if (flags & NDR_IN) {
5319 16 : if (r->in.service == NULL) {
5320 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5321 : }
5322 16 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.service));
5323 16 : NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
5324 16 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
5325 : }
5326 32 : if (flags & NDR_OUT) {
5327 16 : if (r->out.service_status == NULL) {
5328 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5329 : }
5330 16 : if (r->out.needed == NULL) {
5331 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5332 : }
5333 16 : if (r->out.services_returned == NULL) {
5334 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5335 : }
5336 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
5337 16 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.service_status, r->in.offered));
5338 16 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
5339 16 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.services_returned));
5340 16 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5341 : }
5342 32 : return NDR_ERR_SUCCESS;
5343 : }
5344 :
5345 32 : static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesW(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_EnumDependentServicesW *r)
5346 : {
5347 32 : uint32_t size_service_status_1 = 0;
5348 32 : TALLOC_CTX *_mem_save_service_0 = NULL;
5349 32 : TALLOC_CTX *_mem_save_needed_0 = NULL;
5350 32 : TALLOC_CTX *_mem_save_services_returned_0 = NULL;
5351 32 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
5352 32 : if (flags & NDR_IN) {
5353 16 : NDR_ZERO_STRUCT(r->out);
5354 :
5355 16 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5356 16 : NDR_PULL_ALLOC(ndr, r->in.service);
5357 : }
5358 16 : _mem_save_service_0 = NDR_PULL_GET_MEM_CTX(ndr);
5359 16 : NDR_PULL_SET_MEM_CTX(ndr, r->in.service, LIBNDR_FLAG_REF_ALLOC);
5360 16 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.service));
5361 16 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_0, LIBNDR_FLAG_REF_ALLOC);
5362 16 : NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
5363 16 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
5364 16 : if (r->in.offered > 262144) {
5365 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->in.offered), (uint32_t)(0), (uint32_t)(262144));
5366 : }
5367 16 : NDR_PULL_ALLOC_N(ndr, r->out.service_status, r->in.offered);
5368 16 : memset(r->out.service_status, 0, (r->in.offered) * sizeof(*r->out.service_status));
5369 16 : NDR_PULL_ALLOC(ndr, r->out.needed);
5370 16 : NDR_ZERO_STRUCTP(r->out.needed);
5371 16 : NDR_PULL_ALLOC(ndr, r->out.services_returned);
5372 16 : NDR_ZERO_STRUCTP(r->out.services_returned);
5373 : }
5374 32 : if (flags & NDR_OUT) {
5375 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
5376 : if (r->in.service == NULL) {
5377 : NDR_PULL_ALLOC(ndr, r->in.service);
5378 : NDR_ZERO_STRUCTP(r->in.service);
5379 : }
5380 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
5381 16 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.service_status));
5382 16 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.service_status, &size_service_status_1));
5383 16 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5384 0 : NDR_PULL_ALLOC_N(ndr, r->out.service_status, size_service_status_1);
5385 : }
5386 16 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.service_status, size_service_status_1));
5387 16 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5388 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
5389 : }
5390 16 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
5391 16 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
5392 16 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
5393 16 : if (*r->out.needed > 262144) {
5394 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(*r->out.needed), (uint32_t)(0), (uint32_t)(262144));
5395 : }
5396 16 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
5397 16 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5398 0 : NDR_PULL_ALLOC(ndr, r->out.services_returned);
5399 : }
5400 16 : _mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
5401 16 : NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
5402 16 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
5403 16 : if (*r->out.services_returned > 262144) {
5404 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(*r->out.services_returned), (uint32_t)(0), (uint32_t)(262144));
5405 : }
5406 16 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
5407 16 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5408 16 : if (r->out.service_status) {
5409 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.service_status, r->in.offered));
5410 : }
5411 : }
5412 32 : return NDR_ERR_SUCCESS;
5413 : }
5414 :
5415 0 : _PUBLIC_ void ndr_print_svcctl_EnumDependentServicesW(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_EnumDependentServicesW *r)
5416 : {
5417 0 : ndr_print_struct(ndr, name, "svcctl_EnumDependentServicesW");
5418 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5419 0 : ndr->depth++;
5420 0 : if (flags & NDR_SET_VALUES) {
5421 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5422 : }
5423 0 : if (flags & NDR_IN) {
5424 0 : ndr_print_struct(ndr, "in", "svcctl_EnumDependentServicesW");
5425 0 : ndr->depth++;
5426 0 : ndr_print_ptr(ndr, "service", r->in.service);
5427 0 : ndr->depth++;
5428 0 : ndr_print_policy_handle(ndr, "service", r->in.service);
5429 0 : ndr->depth--;
5430 0 : ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
5431 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
5432 0 : ndr->depth--;
5433 : }
5434 0 : if (flags & NDR_OUT) {
5435 0 : ndr_print_struct(ndr, "out", "svcctl_EnumDependentServicesW");
5436 0 : ndr->depth++;
5437 0 : ndr_print_ptr(ndr, "service_status", r->out.service_status);
5438 0 : ndr->depth++;
5439 0 : ndr_print_array_uint8(ndr, "service_status", r->out.service_status, r->in.offered);
5440 0 : ndr->depth--;
5441 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
5442 0 : ndr->depth++;
5443 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
5444 0 : ndr->depth--;
5445 0 : ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
5446 0 : ndr->depth++;
5447 0 : ndr_print_uint32(ndr, "services_returned", *r->out.services_returned);
5448 0 : ndr->depth--;
5449 0 : ndr_print_WERROR(ndr, "result", r->out.result);
5450 0 : ndr->depth--;
5451 : }
5452 0 : ndr->depth--;
5453 : }
5454 :
5455 16 : static enum ndr_err_code ndr_push_svcctl_EnumServicesStatusW(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_EnumServicesStatusW *r)
5456 : {
5457 16 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
5458 16 : if (flags & NDR_IN) {
5459 8 : if (r->in.handle == NULL) {
5460 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5461 : }
5462 8 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5463 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
5464 8 : NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
5465 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
5466 8 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
5467 8 : if (r->in.resume_handle) {
5468 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
5469 : }
5470 : }
5471 16 : if (flags & NDR_OUT) {
5472 8 : if (r->out.service == NULL) {
5473 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5474 : }
5475 8 : if (r->out.needed == NULL) {
5476 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5477 : }
5478 8 : if (r->out.services_returned == NULL) {
5479 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5480 : }
5481 8 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
5482 8 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.service, r->in.offered));
5483 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
5484 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.services_returned));
5485 8 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
5486 8 : if (r->out.resume_handle) {
5487 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
5488 : }
5489 8 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5490 : }
5491 16 : return NDR_ERR_SUCCESS;
5492 : }
5493 :
5494 16 : static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusW(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_EnumServicesStatusW *r)
5495 : {
5496 16 : uint32_t size_service_1 = 0;
5497 0 : uint32_t _ptr_resume_handle;
5498 16 : TALLOC_CTX *_mem_save_handle_0 = NULL;
5499 16 : TALLOC_CTX *_mem_save_needed_0 = NULL;
5500 16 : TALLOC_CTX *_mem_save_services_returned_0 = NULL;
5501 16 : TALLOC_CTX *_mem_save_resume_handle_0 = NULL;
5502 16 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
5503 16 : if (flags & NDR_IN) {
5504 8 : NDR_ZERO_STRUCT(r->out);
5505 :
5506 8 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5507 8 : NDR_PULL_ALLOC(ndr, r->in.handle);
5508 : }
5509 8 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5510 8 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5511 8 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5512 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5513 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
5514 8 : NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
5515 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
5516 8 : if (r->in.offered > 262144) {
5517 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->in.offered), (uint32_t)(0), (uint32_t)(262144));
5518 : }
5519 8 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
5520 8 : if (_ptr_resume_handle) {
5521 8 : NDR_PULL_ALLOC(ndr, r->in.resume_handle);
5522 : } else {
5523 0 : r->in.resume_handle = NULL;
5524 : }
5525 8 : if (r->in.resume_handle) {
5526 8 : _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5527 8 : NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
5528 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
5529 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
5530 : }
5531 8 : NDR_PULL_ALLOC_N(ndr, r->out.service, r->in.offered);
5532 8 : memset(r->out.service, 0, (r->in.offered) * sizeof(*r->out.service));
5533 8 : NDR_PULL_ALLOC(ndr, r->out.needed);
5534 8 : NDR_ZERO_STRUCTP(r->out.needed);
5535 8 : NDR_PULL_ALLOC(ndr, r->out.services_returned);
5536 8 : NDR_ZERO_STRUCTP(r->out.services_returned);
5537 : }
5538 16 : if (flags & NDR_OUT) {
5539 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
5540 : if (r->in.handle == NULL) {
5541 : NDR_PULL_ALLOC(ndr, r->in.handle);
5542 : NDR_ZERO_STRUCTP(r->in.handle);
5543 : }
5544 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
5545 8 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.service));
5546 8 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.service, &size_service_1));
5547 8 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5548 0 : NDR_PULL_ALLOC_N(ndr, r->out.service, size_service_1);
5549 : }
5550 8 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.service, size_service_1));
5551 8 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5552 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
5553 : }
5554 8 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
5555 8 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
5556 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
5557 8 : if (*r->out.needed > 262144) {
5558 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(*r->out.needed), (uint32_t)(0), (uint32_t)(262144));
5559 : }
5560 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
5561 8 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5562 0 : NDR_PULL_ALLOC(ndr, r->out.services_returned);
5563 : }
5564 8 : _mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
5565 8 : NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
5566 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
5567 8 : if (*r->out.services_returned > 262144) {
5568 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(*r->out.services_returned), (uint32_t)(0), (uint32_t)(262144));
5569 : }
5570 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
5571 8 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
5572 8 : if (_ptr_resume_handle) {
5573 8 : NDR_PULL_ALLOC(ndr, r->out.resume_handle);
5574 : } else {
5575 0 : r->out.resume_handle = NULL;
5576 : }
5577 8 : if (r->out.resume_handle) {
5578 8 : _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5579 8 : NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
5580 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
5581 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
5582 : }
5583 8 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5584 8 : if (r->out.service) {
5585 4 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.service, r->in.offered));
5586 : }
5587 : }
5588 16 : return NDR_ERR_SUCCESS;
5589 : }
5590 :
5591 0 : _PUBLIC_ void ndr_print_svcctl_EnumServicesStatusW(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_EnumServicesStatusW *r)
5592 : {
5593 0 : ndr_print_struct(ndr, name, "svcctl_EnumServicesStatusW");
5594 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5595 0 : ndr->depth++;
5596 0 : if (flags & NDR_SET_VALUES) {
5597 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5598 : }
5599 0 : if (flags & NDR_IN) {
5600 0 : ndr_print_struct(ndr, "in", "svcctl_EnumServicesStatusW");
5601 0 : ndr->depth++;
5602 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
5603 0 : ndr->depth++;
5604 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
5605 0 : ndr->depth--;
5606 0 : ndr_print_uint32(ndr, "type", r->in.type);
5607 0 : ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
5608 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
5609 0 : ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
5610 0 : ndr->depth++;
5611 0 : if (r->in.resume_handle) {
5612 0 : ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
5613 : }
5614 0 : ndr->depth--;
5615 0 : ndr->depth--;
5616 : }
5617 0 : if (flags & NDR_OUT) {
5618 0 : ndr_print_struct(ndr, "out", "svcctl_EnumServicesStatusW");
5619 0 : ndr->depth++;
5620 0 : ndr_print_ptr(ndr, "service", r->out.service);
5621 0 : ndr->depth++;
5622 0 : ndr_print_array_uint8(ndr, "service", r->out.service, r->in.offered);
5623 0 : ndr->depth--;
5624 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
5625 0 : ndr->depth++;
5626 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
5627 0 : ndr->depth--;
5628 0 : ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
5629 0 : ndr->depth++;
5630 0 : ndr_print_uint32(ndr, "services_returned", *r->out.services_returned);
5631 0 : ndr->depth--;
5632 0 : ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
5633 0 : ndr->depth++;
5634 0 : if (r->out.resume_handle) {
5635 0 : ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
5636 : }
5637 0 : ndr->depth--;
5638 0 : ndr_print_WERROR(ndr, "result", r->out.result);
5639 0 : ndr->depth--;
5640 : }
5641 0 : ndr->depth--;
5642 : }
5643 :
5644 112 : static enum ndr_err_code ndr_push_svcctl_OpenSCManagerW(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_OpenSCManagerW *r)
5645 : {
5646 112 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
5647 112 : if (flags & NDR_IN) {
5648 56 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.MachineName));
5649 56 : if (r->in.MachineName) {
5650 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.MachineName, CH_UTF16)));
5651 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5652 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.MachineName, CH_UTF16)));
5653 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.MachineName, ndr_charset_length(r->in.MachineName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5654 : }
5655 56 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.DatabaseName));
5656 56 : if (r->in.DatabaseName) {
5657 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DatabaseName, CH_UTF16)));
5658 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5659 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DatabaseName, CH_UTF16)));
5660 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.DatabaseName, ndr_charset_length(r->in.DatabaseName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5661 : }
5662 56 : NDR_CHECK(ndr_push_svcctl_MgrAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
5663 : }
5664 112 : if (flags & NDR_OUT) {
5665 56 : if (r->out.handle == NULL) {
5666 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5667 : }
5668 56 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5669 56 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5670 : }
5671 112 : return NDR_ERR_SUCCESS;
5672 : }
5673 :
5674 112 : static enum ndr_err_code ndr_pull_svcctl_OpenSCManagerW(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_OpenSCManagerW *r)
5675 : {
5676 0 : uint32_t _ptr_MachineName;
5677 112 : uint32_t size_MachineName_1 = 0;
5678 112 : uint32_t length_MachineName_1 = 0;
5679 0 : uint32_t _ptr_DatabaseName;
5680 112 : uint32_t size_DatabaseName_1 = 0;
5681 112 : uint32_t length_DatabaseName_1 = 0;
5682 112 : TALLOC_CTX *_mem_save_MachineName_0 = NULL;
5683 112 : TALLOC_CTX *_mem_save_DatabaseName_0 = NULL;
5684 112 : TALLOC_CTX *_mem_save_handle_0 = NULL;
5685 112 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
5686 112 : if (flags & NDR_IN) {
5687 56 : NDR_ZERO_STRUCT(r->out);
5688 :
5689 56 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_MachineName));
5690 56 : if (_ptr_MachineName) {
5691 0 : NDR_PULL_ALLOC(ndr, r->in.MachineName);
5692 : } else {
5693 56 : r->in.MachineName = NULL;
5694 : }
5695 56 : if (r->in.MachineName) {
5696 0 : _mem_save_MachineName_0 = NDR_PULL_GET_MEM_CTX(ndr);
5697 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.MachineName, 0);
5698 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.MachineName));
5699 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.MachineName));
5700 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.MachineName, &size_MachineName_1));
5701 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.MachineName, &length_MachineName_1));
5702 0 : if (length_MachineName_1 > size_MachineName_1) {
5703 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_MachineName_1, length_MachineName_1);
5704 : }
5705 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_MachineName_1, sizeof(uint16_t)));
5706 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.MachineName, length_MachineName_1, sizeof(uint16_t), CH_UTF16));
5707 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_MachineName_0, 0);
5708 : }
5709 56 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DatabaseName));
5710 56 : if (_ptr_DatabaseName) {
5711 0 : NDR_PULL_ALLOC(ndr, r->in.DatabaseName);
5712 : } else {
5713 56 : r->in.DatabaseName = NULL;
5714 : }
5715 56 : if (r->in.DatabaseName) {
5716 0 : _mem_save_DatabaseName_0 = NDR_PULL_GET_MEM_CTX(ndr);
5717 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.DatabaseName, 0);
5718 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.DatabaseName));
5719 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.DatabaseName));
5720 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.DatabaseName, &size_DatabaseName_1));
5721 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.DatabaseName, &length_DatabaseName_1));
5722 0 : if (length_DatabaseName_1 > size_DatabaseName_1) {
5723 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_DatabaseName_1, length_DatabaseName_1);
5724 : }
5725 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_DatabaseName_1, sizeof(uint16_t)));
5726 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.DatabaseName, length_DatabaseName_1, sizeof(uint16_t), CH_UTF16));
5727 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DatabaseName_0, 0);
5728 : }
5729 56 : NDR_CHECK(ndr_pull_svcctl_MgrAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
5730 56 : NDR_PULL_ALLOC(ndr, r->out.handle);
5731 56 : NDR_ZERO_STRUCTP(r->out.handle);
5732 : }
5733 112 : if (flags & NDR_OUT) {
5734 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
5735 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
5736 56 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5737 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
5738 : }
5739 56 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5740 56 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
5741 56 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5742 56 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5743 56 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5744 : }
5745 112 : return NDR_ERR_SUCCESS;
5746 : }
5747 :
5748 0 : _PUBLIC_ void ndr_print_svcctl_OpenSCManagerW(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_OpenSCManagerW *r)
5749 : {
5750 0 : ndr_print_struct(ndr, name, "svcctl_OpenSCManagerW");
5751 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5752 0 : ndr->depth++;
5753 0 : if (flags & NDR_SET_VALUES) {
5754 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5755 : }
5756 0 : if (flags & NDR_IN) {
5757 0 : ndr_print_struct(ndr, "in", "svcctl_OpenSCManagerW");
5758 0 : ndr->depth++;
5759 0 : ndr_print_ptr(ndr, "MachineName", r->in.MachineName);
5760 0 : ndr->depth++;
5761 0 : if (r->in.MachineName) {
5762 0 : ndr_print_string(ndr, "MachineName", r->in.MachineName);
5763 : }
5764 0 : ndr->depth--;
5765 0 : ndr_print_ptr(ndr, "DatabaseName", r->in.DatabaseName);
5766 0 : ndr->depth++;
5767 0 : if (r->in.DatabaseName) {
5768 0 : ndr_print_string(ndr, "DatabaseName", r->in.DatabaseName);
5769 : }
5770 0 : ndr->depth--;
5771 0 : ndr_print_svcctl_MgrAccessMask(ndr, "access_mask", r->in.access_mask);
5772 0 : ndr->depth--;
5773 : }
5774 0 : if (flags & NDR_OUT) {
5775 0 : ndr_print_struct(ndr, "out", "svcctl_OpenSCManagerW");
5776 0 : ndr->depth++;
5777 0 : ndr_print_ptr(ndr, "handle", r->out.handle);
5778 0 : ndr->depth++;
5779 0 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
5780 0 : ndr->depth--;
5781 0 : ndr_print_WERROR(ndr, "result", r->out.result);
5782 0 : ndr->depth--;
5783 : }
5784 0 : ndr->depth--;
5785 : }
5786 :
5787 96 : static enum ndr_err_code ndr_push_svcctl_OpenServiceW(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_OpenServiceW *r)
5788 : {
5789 96 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
5790 96 : if (flags & NDR_IN) {
5791 48 : if (r->in.scmanager_handle == NULL) {
5792 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5793 : }
5794 48 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
5795 48 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
5796 48 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5797 48 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
5798 48 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.ServiceName, ndr_charset_length(r->in.ServiceName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5799 48 : NDR_CHECK(ndr_push_svcctl_ServiceAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
5800 : }
5801 96 : if (flags & NDR_OUT) {
5802 48 : if (r->out.handle == NULL) {
5803 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5804 : }
5805 48 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5806 48 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5807 : }
5808 96 : return NDR_ERR_SUCCESS;
5809 : }
5810 :
5811 96 : static enum ndr_err_code ndr_pull_svcctl_OpenServiceW(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_OpenServiceW *r)
5812 : {
5813 96 : uint32_t size_ServiceName_0 = 0;
5814 96 : uint32_t length_ServiceName_0 = 0;
5815 96 : TALLOC_CTX *_mem_save_scmanager_handle_0 = NULL;
5816 96 : TALLOC_CTX *_mem_save_handle_0 = NULL;
5817 96 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
5818 96 : if (flags & NDR_IN) {
5819 48 : NDR_ZERO_STRUCT(r->out);
5820 :
5821 48 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5822 48 : NDR_PULL_ALLOC(ndr, r->in.scmanager_handle);
5823 : }
5824 48 : _mem_save_scmanager_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5825 48 : NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager_handle, LIBNDR_FLAG_REF_ALLOC);
5826 48 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
5827 48 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_handle_0, LIBNDR_FLAG_REF_ALLOC);
5828 48 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.ServiceName));
5829 48 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.ServiceName));
5830 48 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.ServiceName, &size_ServiceName_0));
5831 48 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.ServiceName, &length_ServiceName_0));
5832 48 : if (length_ServiceName_0 > size_ServiceName_0) {
5833 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_ServiceName_0, length_ServiceName_0);
5834 : }
5835 48 : NDR_CHECK(ndr_check_string_terminator(ndr, length_ServiceName_0, sizeof(uint16_t)));
5836 48 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.ServiceName, length_ServiceName_0, sizeof(uint16_t), CH_UTF16));
5837 48 : NDR_CHECK(ndr_pull_svcctl_ServiceAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
5838 48 : NDR_PULL_ALLOC(ndr, r->out.handle);
5839 48 : NDR_ZERO_STRUCTP(r->out.handle);
5840 : }
5841 96 : if (flags & NDR_OUT) {
5842 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
5843 : if (r->in.scmanager_handle == NULL) {
5844 : NDR_PULL_ALLOC(ndr, r->in.scmanager_handle);
5845 : NDR_ZERO_STRUCTP(r->in.scmanager_handle);
5846 : }
5847 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
5848 48 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5849 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
5850 : }
5851 48 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5852 48 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
5853 48 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5854 48 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5855 48 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5856 : }
5857 96 : return NDR_ERR_SUCCESS;
5858 : }
5859 :
5860 0 : _PUBLIC_ void ndr_print_svcctl_OpenServiceW(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_OpenServiceW *r)
5861 : {
5862 0 : ndr_print_struct(ndr, name, "svcctl_OpenServiceW");
5863 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5864 0 : ndr->depth++;
5865 0 : if (flags & NDR_SET_VALUES) {
5866 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5867 : }
5868 0 : if (flags & NDR_IN) {
5869 0 : ndr_print_struct(ndr, "in", "svcctl_OpenServiceW");
5870 0 : ndr->depth++;
5871 0 : ndr_print_ptr(ndr, "scmanager_handle", r->in.scmanager_handle);
5872 0 : ndr->depth++;
5873 0 : ndr_print_policy_handle(ndr, "scmanager_handle", r->in.scmanager_handle);
5874 0 : ndr->depth--;
5875 0 : ndr_print_string(ndr, "ServiceName", r->in.ServiceName);
5876 0 : ndr_print_svcctl_ServiceAccessMask(ndr, "access_mask", r->in.access_mask);
5877 0 : ndr->depth--;
5878 : }
5879 0 : if (flags & NDR_OUT) {
5880 0 : ndr_print_struct(ndr, "out", "svcctl_OpenServiceW");
5881 0 : ndr->depth++;
5882 0 : ndr_print_ptr(ndr, "handle", r->out.handle);
5883 0 : ndr->depth++;
5884 0 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
5885 0 : ndr->depth--;
5886 0 : ndr_print_WERROR(ndr, "result", r->out.result);
5887 0 : ndr->depth--;
5888 : }
5889 0 : ndr->depth--;
5890 : }
5891 :
5892 32 : static enum ndr_err_code ndr_push_svcctl_QueryServiceConfigW(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_QueryServiceConfigW *r)
5893 : {
5894 32 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
5895 32 : if (flags & NDR_IN) {
5896 16 : if (r->in.handle == NULL) {
5897 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5898 : }
5899 16 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5900 16 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
5901 : }
5902 32 : if (flags & NDR_OUT) {
5903 16 : if (r->out.query == NULL) {
5904 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5905 : }
5906 16 : if (r->out.needed == NULL) {
5907 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5908 : }
5909 16 : NDR_CHECK(ndr_push_QUERY_SERVICE_CONFIG(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
5910 16 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
5911 16 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5912 : }
5913 32 : return NDR_ERR_SUCCESS;
5914 : }
5915 :
5916 32 : static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfigW(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_QueryServiceConfigW *r)
5917 : {
5918 32 : TALLOC_CTX *_mem_save_handle_0 = NULL;
5919 32 : TALLOC_CTX *_mem_save_query_0 = NULL;
5920 32 : TALLOC_CTX *_mem_save_needed_0 = NULL;
5921 32 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
5922 32 : if (flags & NDR_IN) {
5923 16 : NDR_ZERO_STRUCT(r->out);
5924 :
5925 16 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5926 16 : NDR_PULL_ALLOC(ndr, r->in.handle);
5927 : }
5928 16 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5929 16 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5930 16 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5931 16 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5932 16 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
5933 16 : if (r->in.offered > 8192) {
5934 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->in.offered), (uint32_t)(0), (uint32_t)(8192));
5935 : }
5936 16 : NDR_PULL_ALLOC(ndr, r->out.query);
5937 16 : NDR_ZERO_STRUCTP(r->out.query);
5938 16 : NDR_PULL_ALLOC(ndr, r->out.needed);
5939 16 : NDR_ZERO_STRUCTP(r->out.needed);
5940 : }
5941 32 : if (flags & NDR_OUT) {
5942 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
5943 : if (r->in.handle == NULL) {
5944 : NDR_PULL_ALLOC(ndr, r->in.handle);
5945 : NDR_ZERO_STRUCTP(r->in.handle);
5946 : }
5947 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
5948 16 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5949 0 : NDR_PULL_ALLOC(ndr, r->out.query);
5950 : }
5951 16 : _mem_save_query_0 = NDR_PULL_GET_MEM_CTX(ndr);
5952 16 : NDR_PULL_SET_MEM_CTX(ndr, r->out.query, LIBNDR_FLAG_REF_ALLOC);
5953 16 : NDR_CHECK(ndr_pull_QUERY_SERVICE_CONFIG(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
5954 16 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_query_0, LIBNDR_FLAG_REF_ALLOC);
5955 16 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5956 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
5957 : }
5958 16 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
5959 16 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
5960 16 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
5961 16 : if (*r->out.needed > 8192) {
5962 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(*r->out.needed), (uint32_t)(0), (uint32_t)(8192));
5963 : }
5964 16 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
5965 16 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5966 : }
5967 32 : return NDR_ERR_SUCCESS;
5968 : }
5969 :
5970 0 : _PUBLIC_ void ndr_print_svcctl_QueryServiceConfigW(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_QueryServiceConfigW *r)
5971 : {
5972 0 : ndr_print_struct(ndr, name, "svcctl_QueryServiceConfigW");
5973 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5974 0 : ndr->depth++;
5975 0 : if (flags & NDR_SET_VALUES) {
5976 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5977 : }
5978 0 : if (flags & NDR_IN) {
5979 0 : ndr_print_struct(ndr, "in", "svcctl_QueryServiceConfigW");
5980 0 : ndr->depth++;
5981 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
5982 0 : ndr->depth++;
5983 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
5984 0 : ndr->depth--;
5985 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
5986 0 : ndr->depth--;
5987 : }
5988 0 : if (flags & NDR_OUT) {
5989 0 : ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfigW");
5990 0 : ndr->depth++;
5991 0 : ndr_print_ptr(ndr, "query", r->out.query);
5992 0 : ndr->depth++;
5993 0 : ndr_print_QUERY_SERVICE_CONFIG(ndr, "query", r->out.query);
5994 0 : ndr->depth--;
5995 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
5996 0 : ndr->depth++;
5997 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
5998 0 : ndr->depth--;
5999 0 : ndr_print_WERROR(ndr, "result", r->out.result);
6000 0 : ndr->depth--;
6001 : }
6002 0 : ndr->depth--;
6003 : }
6004 :
6005 0 : static enum ndr_err_code ndr_push_svcctl_QueryServiceLockStatusW(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_QueryServiceLockStatusW *r)
6006 : {
6007 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6008 0 : if (flags & NDR_IN) {
6009 0 : if (r->in.handle == NULL) {
6010 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6011 : }
6012 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6013 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
6014 : }
6015 0 : if (flags & NDR_OUT) {
6016 0 : if (r->out.lock_status == NULL) {
6017 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6018 : }
6019 0 : if (r->out.needed == NULL) {
6020 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6021 : }
6022 0 : NDR_CHECK(ndr_push_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock_status));
6023 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
6024 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6025 : }
6026 0 : return NDR_ERR_SUCCESS;
6027 : }
6028 :
6029 0 : static enum ndr_err_code ndr_pull_svcctl_QueryServiceLockStatusW(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_QueryServiceLockStatusW *r)
6030 : {
6031 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
6032 0 : TALLOC_CTX *_mem_save_lock_status_0 = NULL;
6033 0 : TALLOC_CTX *_mem_save_needed_0 = NULL;
6034 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6035 0 : if (flags & NDR_IN) {
6036 0 : NDR_ZERO_STRUCT(r->out);
6037 :
6038 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6039 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
6040 : }
6041 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6042 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6043 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6044 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6045 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
6046 0 : NDR_PULL_ALLOC(ndr, r->out.lock_status);
6047 0 : NDR_ZERO_STRUCTP(r->out.lock_status);
6048 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
6049 0 : NDR_ZERO_STRUCTP(r->out.needed);
6050 : }
6051 0 : if (flags & NDR_OUT) {
6052 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6053 : if (r->in.handle == NULL) {
6054 : NDR_PULL_ALLOC(ndr, r->in.handle);
6055 : NDR_ZERO_STRUCTP(r->in.handle);
6056 : }
6057 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6058 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6059 0 : NDR_PULL_ALLOC(ndr, r->out.lock_status);
6060 : }
6061 0 : _mem_save_lock_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
6062 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.lock_status, LIBNDR_FLAG_REF_ALLOC);
6063 0 : NDR_CHECK(ndr_pull_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock_status));
6064 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_status_0, LIBNDR_FLAG_REF_ALLOC);
6065 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6066 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
6067 : }
6068 0 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
6069 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
6070 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
6071 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
6072 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6073 : }
6074 0 : return NDR_ERR_SUCCESS;
6075 : }
6076 :
6077 0 : _PUBLIC_ void ndr_print_svcctl_QueryServiceLockStatusW(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_QueryServiceLockStatusW *r)
6078 : {
6079 0 : ndr_print_struct(ndr, name, "svcctl_QueryServiceLockStatusW");
6080 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6081 0 : ndr->depth++;
6082 0 : if (flags & NDR_SET_VALUES) {
6083 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6084 : }
6085 0 : if (flags & NDR_IN) {
6086 0 : ndr_print_struct(ndr, "in", "svcctl_QueryServiceLockStatusW");
6087 0 : ndr->depth++;
6088 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
6089 0 : ndr->depth++;
6090 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
6091 0 : ndr->depth--;
6092 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
6093 0 : ndr->depth--;
6094 : }
6095 0 : if (flags & NDR_OUT) {
6096 0 : ndr_print_struct(ndr, "out", "svcctl_QueryServiceLockStatusW");
6097 0 : ndr->depth++;
6098 0 : ndr_print_ptr(ndr, "lock_status", r->out.lock_status);
6099 0 : ndr->depth++;
6100 0 : ndr_print_SERVICE_LOCK_STATUS(ndr, "lock_status", r->out.lock_status);
6101 0 : ndr->depth--;
6102 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
6103 0 : ndr->depth++;
6104 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
6105 0 : ndr->depth--;
6106 0 : ndr_print_WERROR(ndr, "result", r->out.result);
6107 0 : ndr->depth--;
6108 : }
6109 0 : ndr->depth--;
6110 : }
6111 :
6112 8 : static enum ndr_err_code ndr_push_svcctl_StartServiceW(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_StartServiceW *r)
6113 : {
6114 0 : uint32_t cntr_Arguments_1;
6115 8 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6116 8 : if (flags & NDR_IN) {
6117 4 : if (r->in.handle == NULL) {
6118 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6119 : }
6120 4 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6121 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.NumArgs));
6122 4 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Arguments));
6123 4 : if (r->in.Arguments) {
6124 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.NumArgs));
6125 0 : for (cntr_Arguments_1 = 0; cntr_Arguments_1 < (r->in.NumArgs); cntr_Arguments_1++) {
6126 0 : NDR_CHECK(ndr_push_svcctl_ArgumentString(ndr, NDR_SCALARS, &r->in.Arguments[cntr_Arguments_1]));
6127 : }
6128 0 : for (cntr_Arguments_1 = 0; cntr_Arguments_1 < (r->in.NumArgs); cntr_Arguments_1++) {
6129 0 : NDR_CHECK(ndr_push_svcctl_ArgumentString(ndr, NDR_BUFFERS, &r->in.Arguments[cntr_Arguments_1]));
6130 : }
6131 : }
6132 : }
6133 8 : if (flags & NDR_OUT) {
6134 4 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6135 : }
6136 8 : return NDR_ERR_SUCCESS;
6137 : }
6138 :
6139 8 : static enum ndr_err_code ndr_pull_svcctl_StartServiceW(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_StartServiceW *r)
6140 : {
6141 0 : uint32_t _ptr_Arguments;
6142 8 : uint32_t size_Arguments_1 = 0;
6143 0 : uint32_t cntr_Arguments_1;
6144 8 : TALLOC_CTX *_mem_save_handle_0 = NULL;
6145 8 : TALLOC_CTX *_mem_save_Arguments_0 = NULL;
6146 8 : TALLOC_CTX *_mem_save_Arguments_1 = NULL;
6147 8 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6148 8 : if (flags & NDR_IN) {
6149 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6150 4 : NDR_PULL_ALLOC(ndr, r->in.handle);
6151 : }
6152 4 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6153 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6154 4 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6155 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6156 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.NumArgs));
6157 4 : if (r->in.NumArgs > SC_MAX_ARGUMENTS) {
6158 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->in.NumArgs), (uint32_t)(0), (uint32_t)(SC_MAX_ARGUMENTS));
6159 : }
6160 4 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Arguments));
6161 4 : if (_ptr_Arguments) {
6162 0 : NDR_PULL_ALLOC(ndr, r->in.Arguments);
6163 : } else {
6164 4 : r->in.Arguments = NULL;
6165 : }
6166 4 : if (r->in.Arguments) {
6167 0 : _mem_save_Arguments_0 = NDR_PULL_GET_MEM_CTX(ndr);
6168 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.Arguments, 0);
6169 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.Arguments));
6170 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.Arguments, &size_Arguments_1));
6171 0 : NDR_PULL_ALLOC_N(ndr, r->in.Arguments, size_Arguments_1);
6172 0 : _mem_save_Arguments_1 = NDR_PULL_GET_MEM_CTX(ndr);
6173 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.Arguments, 0);
6174 0 : for (cntr_Arguments_1 = 0; cntr_Arguments_1 < (size_Arguments_1); cntr_Arguments_1++) {
6175 0 : NDR_CHECK(ndr_pull_svcctl_ArgumentString(ndr, NDR_SCALARS, &r->in.Arguments[cntr_Arguments_1]));
6176 : }
6177 0 : for (cntr_Arguments_1 = 0; cntr_Arguments_1 < (size_Arguments_1); cntr_Arguments_1++) {
6178 0 : NDR_CHECK(ndr_pull_svcctl_ArgumentString(ndr, NDR_BUFFERS, &r->in.Arguments[cntr_Arguments_1]));
6179 : }
6180 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Arguments_1, 0);
6181 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Arguments_0, 0);
6182 : }
6183 4 : if (r->in.Arguments) {
6184 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.Arguments, r->in.NumArgs));
6185 : }
6186 4 : for (cntr_Arguments_1 = 0; cntr_Arguments_1 < (size_Arguments_1); cntr_Arguments_1++) {
6187 0 : }
6188 : }
6189 8 : if (flags & NDR_OUT) {
6190 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6191 : if (r->in.handle == NULL) {
6192 : NDR_PULL_ALLOC(ndr, r->in.handle);
6193 : NDR_ZERO_STRUCTP(r->in.handle);
6194 : }
6195 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6196 4 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6197 : }
6198 8 : return NDR_ERR_SUCCESS;
6199 : }
6200 :
6201 0 : _PUBLIC_ void ndr_print_svcctl_StartServiceW(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_StartServiceW *r)
6202 : {
6203 0 : uint32_t cntr_Arguments_1;
6204 0 : ndr_print_struct(ndr, name, "svcctl_StartServiceW");
6205 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6206 0 : ndr->depth++;
6207 0 : if (flags & NDR_SET_VALUES) {
6208 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6209 : }
6210 0 : if (flags & NDR_IN) {
6211 0 : ndr_print_struct(ndr, "in", "svcctl_StartServiceW");
6212 0 : ndr->depth++;
6213 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
6214 0 : ndr->depth++;
6215 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
6216 0 : ndr->depth--;
6217 0 : ndr_print_uint32(ndr, "NumArgs", r->in.NumArgs);
6218 0 : ndr_print_ptr(ndr, "Arguments", r->in.Arguments);
6219 0 : ndr->depth++;
6220 0 : if (r->in.Arguments) {
6221 0 : ndr->print(ndr, "%s: ARRAY(%"PRIu32")", "Arguments", (uint32_t)(r->in.NumArgs));
6222 0 : ndr->depth++;
6223 0 : for (cntr_Arguments_1 = 0; cntr_Arguments_1 < (r->in.NumArgs); cntr_Arguments_1++) {
6224 0 : ndr_print_svcctl_ArgumentString(ndr, "Arguments", &r->in.Arguments[cntr_Arguments_1]);
6225 : }
6226 0 : ndr->depth--;
6227 : }
6228 0 : ndr->depth--;
6229 0 : ndr->depth--;
6230 : }
6231 0 : if (flags & NDR_OUT) {
6232 0 : ndr_print_struct(ndr, "out", "svcctl_StartServiceW");
6233 0 : ndr->depth++;
6234 0 : ndr_print_WERROR(ndr, "result", r->out.result);
6235 0 : ndr->depth--;
6236 : }
6237 0 : ndr->depth--;
6238 : }
6239 :
6240 0 : static enum ndr_err_code ndr_push_svcctl_GetServiceDisplayNameW(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_GetServiceDisplayNameW *r)
6241 : {
6242 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6243 0 : if (flags & NDR_IN) {
6244 0 : if (r->in.handle == NULL) {
6245 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6246 : }
6247 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6248 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name));
6249 0 : if (r->in.service_name) {
6250 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
6251 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6252 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
6253 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.service_name, ndr_charset_length(r->in.service_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6254 : }
6255 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name_length));
6256 0 : if (r->in.display_name_length) {
6257 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.display_name_length));
6258 : }
6259 : }
6260 0 : if (flags & NDR_OUT) {
6261 0 : if (r->out.display_name == NULL) {
6262 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6263 : }
6264 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.display_name));
6265 0 : if (*r->out.display_name) {
6266 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16)));
6267 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6268 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16)));
6269 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.display_name, ndr_charset_length(*r->out.display_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6270 : }
6271 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length));
6272 0 : if (r->out.display_name_length) {
6273 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length));
6274 : }
6275 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6276 : }
6277 0 : return NDR_ERR_SUCCESS;
6278 : }
6279 :
6280 0 : static enum ndr_err_code ndr_pull_svcctl_GetServiceDisplayNameW(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_GetServiceDisplayNameW *r)
6281 : {
6282 0 : uint32_t _ptr_service_name;
6283 0 : uint32_t size_service_name_1 = 0;
6284 0 : uint32_t length_service_name_1 = 0;
6285 0 : uint32_t _ptr_display_name;
6286 0 : uint32_t size_display_name_2 = 0;
6287 0 : uint32_t length_display_name_2 = 0;
6288 0 : uint32_t _ptr_display_name_length;
6289 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
6290 0 : TALLOC_CTX *_mem_save_service_name_0 = NULL;
6291 0 : TALLOC_CTX *_mem_save_display_name_0 = NULL;
6292 0 : TALLOC_CTX *_mem_save_display_name_1 = NULL;
6293 0 : TALLOC_CTX *_mem_save_display_name_length_0 = NULL;
6294 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6295 0 : if (flags & NDR_IN) {
6296 0 : NDR_ZERO_STRUCT(r->out);
6297 :
6298 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6299 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
6300 : }
6301 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6302 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6303 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6304 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6305 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
6306 0 : if (_ptr_service_name) {
6307 0 : NDR_PULL_ALLOC(ndr, r->in.service_name);
6308 : } else {
6309 0 : r->in.service_name = NULL;
6310 : }
6311 0 : if (r->in.service_name) {
6312 0 : _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6313 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.service_name, 0);
6314 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_name));
6315 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_name));
6316 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.service_name, &size_service_name_1));
6317 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.service_name, &length_service_name_1));
6318 0 : if (length_service_name_1 > size_service_name_1) {
6319 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_service_name_1, length_service_name_1);
6320 : }
6321 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_service_name_1, sizeof(uint16_t)));
6322 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_name, length_service_name_1, sizeof(uint16_t), CH_UTF16));
6323 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
6324 : }
6325 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
6326 0 : if (_ptr_display_name_length) {
6327 0 : NDR_PULL_ALLOC(ndr, r->in.display_name_length);
6328 : } else {
6329 0 : r->in.display_name_length = NULL;
6330 : }
6331 0 : if (r->in.display_name_length) {
6332 0 : _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
6333 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name_length, 0);
6334 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.display_name_length));
6335 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
6336 : }
6337 0 : NDR_PULL_ALLOC(ndr, r->out.display_name);
6338 0 : NDR_ZERO_STRUCTP(r->out.display_name);
6339 : }
6340 0 : if (flags & NDR_OUT) {
6341 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6342 : if (r->in.handle == NULL) {
6343 : NDR_PULL_ALLOC(ndr, r->in.handle);
6344 : NDR_ZERO_STRUCTP(r->in.handle);
6345 : }
6346 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6347 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6348 0 : NDR_PULL_ALLOC(ndr, r->out.display_name);
6349 : }
6350 0 : _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6351 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name, LIBNDR_FLAG_REF_ALLOC);
6352 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
6353 0 : if (_ptr_display_name) {
6354 0 : NDR_PULL_ALLOC(ndr, *r->out.display_name);
6355 : } else {
6356 0 : *r->out.display_name = NULL;
6357 : }
6358 0 : if (*r->out.display_name) {
6359 0 : _mem_save_display_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
6360 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.display_name, 0);
6361 0 : NDR_CHECK(ndr_pull_array_size(ndr, r->out.display_name));
6362 0 : NDR_CHECK(ndr_pull_array_length(ndr, r->out.display_name));
6363 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)r->out.display_name, &size_display_name_2));
6364 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)r->out.display_name, &length_display_name_2));
6365 0 : if (length_display_name_2 > size_display_name_2) {
6366 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_display_name_2, length_display_name_2);
6367 : }
6368 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_display_name_2, sizeof(uint16_t)));
6369 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.display_name, length_display_name_2, sizeof(uint16_t), CH_UTF16));
6370 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_1, 0);
6371 : }
6372 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, LIBNDR_FLAG_REF_ALLOC);
6373 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
6374 0 : if (_ptr_display_name_length) {
6375 0 : NDR_PULL_ALLOC(ndr, r->out.display_name_length);
6376 : } else {
6377 0 : r->out.display_name_length = NULL;
6378 : }
6379 0 : if (r->out.display_name_length) {
6380 0 : _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
6381 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name_length, 0);
6382 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.display_name_length));
6383 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
6384 : }
6385 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6386 : }
6387 0 : return NDR_ERR_SUCCESS;
6388 : }
6389 :
6390 0 : _PUBLIC_ void ndr_print_svcctl_GetServiceDisplayNameW(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_GetServiceDisplayNameW *r)
6391 : {
6392 0 : ndr_print_struct(ndr, name, "svcctl_GetServiceDisplayNameW");
6393 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6394 0 : ndr->depth++;
6395 0 : if (flags & NDR_SET_VALUES) {
6396 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6397 : }
6398 0 : if (flags & NDR_IN) {
6399 0 : ndr_print_struct(ndr, "in", "svcctl_GetServiceDisplayNameW");
6400 0 : ndr->depth++;
6401 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
6402 0 : ndr->depth++;
6403 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
6404 0 : ndr->depth--;
6405 0 : ndr_print_ptr(ndr, "service_name", r->in.service_name);
6406 0 : ndr->depth++;
6407 0 : if (r->in.service_name) {
6408 0 : ndr_print_string(ndr, "service_name", r->in.service_name);
6409 : }
6410 0 : ndr->depth--;
6411 0 : ndr_print_ptr(ndr, "display_name_length", r->in.display_name_length);
6412 0 : ndr->depth++;
6413 0 : if (r->in.display_name_length) {
6414 0 : ndr_print_uint32(ndr, "display_name_length", *r->in.display_name_length);
6415 : }
6416 0 : ndr->depth--;
6417 0 : ndr->depth--;
6418 : }
6419 0 : if (flags & NDR_OUT) {
6420 0 : ndr_print_struct(ndr, "out", "svcctl_GetServiceDisplayNameW");
6421 0 : ndr->depth++;
6422 0 : ndr_print_ptr(ndr, "display_name", r->out.display_name);
6423 0 : ndr->depth++;
6424 0 : ndr_print_ptr(ndr, "display_name", *r->out.display_name);
6425 0 : ndr->depth++;
6426 0 : if (*r->out.display_name) {
6427 0 : ndr_print_string(ndr, "display_name", *r->out.display_name);
6428 : }
6429 0 : ndr->depth--;
6430 0 : ndr->depth--;
6431 0 : ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length);
6432 0 : ndr->depth++;
6433 0 : if (r->out.display_name_length) {
6434 0 : ndr_print_uint32(ndr, "display_name_length", *r->out.display_name_length);
6435 : }
6436 0 : ndr->depth--;
6437 0 : ndr_print_WERROR(ndr, "result", r->out.result);
6438 0 : ndr->depth--;
6439 : }
6440 0 : ndr->depth--;
6441 : }
6442 :
6443 0 : static enum ndr_err_code ndr_push_svcctl_GetServiceKeyNameW(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_GetServiceKeyNameW *r)
6444 : {
6445 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6446 0 : if (flags & NDR_IN) {
6447 0 : if (r->in.handle == NULL) {
6448 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6449 : }
6450 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6451 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name));
6452 0 : if (r->in.service_name) {
6453 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
6454 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6455 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
6456 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.service_name, ndr_charset_length(r->in.service_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6457 : }
6458 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name_length));
6459 0 : if (r->in.display_name_length) {
6460 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.display_name_length));
6461 : }
6462 : }
6463 0 : if (flags & NDR_OUT) {
6464 0 : if (r->out.key_name == NULL) {
6465 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6466 : }
6467 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.key_name));
6468 0 : if (*r->out.key_name) {
6469 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16)));
6470 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6471 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16)));
6472 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.key_name, ndr_charset_length(*r->out.key_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6473 : }
6474 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length));
6475 0 : if (r->out.display_name_length) {
6476 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length));
6477 : }
6478 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6479 : }
6480 0 : return NDR_ERR_SUCCESS;
6481 : }
6482 :
6483 0 : static enum ndr_err_code ndr_pull_svcctl_GetServiceKeyNameW(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_GetServiceKeyNameW *r)
6484 : {
6485 0 : uint32_t _ptr_service_name;
6486 0 : uint32_t size_service_name_1 = 0;
6487 0 : uint32_t length_service_name_1 = 0;
6488 0 : uint32_t _ptr_key_name;
6489 0 : uint32_t size_key_name_2 = 0;
6490 0 : uint32_t length_key_name_2 = 0;
6491 0 : uint32_t _ptr_display_name_length;
6492 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
6493 0 : TALLOC_CTX *_mem_save_service_name_0 = NULL;
6494 0 : TALLOC_CTX *_mem_save_key_name_0 = NULL;
6495 0 : TALLOC_CTX *_mem_save_key_name_1 = NULL;
6496 0 : TALLOC_CTX *_mem_save_display_name_length_0 = NULL;
6497 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6498 0 : if (flags & NDR_IN) {
6499 0 : NDR_ZERO_STRUCT(r->out);
6500 :
6501 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6502 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
6503 : }
6504 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6505 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6506 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6507 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6508 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
6509 0 : if (_ptr_service_name) {
6510 0 : NDR_PULL_ALLOC(ndr, r->in.service_name);
6511 : } else {
6512 0 : r->in.service_name = NULL;
6513 : }
6514 0 : if (r->in.service_name) {
6515 0 : _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6516 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.service_name, 0);
6517 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_name));
6518 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_name));
6519 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.service_name, &size_service_name_1));
6520 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.service_name, &length_service_name_1));
6521 0 : if (length_service_name_1 > size_service_name_1) {
6522 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_service_name_1, length_service_name_1);
6523 : }
6524 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_service_name_1, sizeof(uint16_t)));
6525 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_name, length_service_name_1, sizeof(uint16_t), CH_UTF16));
6526 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
6527 : }
6528 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
6529 0 : if (_ptr_display_name_length) {
6530 0 : NDR_PULL_ALLOC(ndr, r->in.display_name_length);
6531 : } else {
6532 0 : r->in.display_name_length = NULL;
6533 : }
6534 0 : if (r->in.display_name_length) {
6535 0 : _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
6536 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name_length, 0);
6537 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.display_name_length));
6538 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
6539 : }
6540 0 : NDR_PULL_ALLOC(ndr, r->out.key_name);
6541 0 : NDR_ZERO_STRUCTP(r->out.key_name);
6542 : }
6543 0 : if (flags & NDR_OUT) {
6544 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6545 : if (r->in.handle == NULL) {
6546 : NDR_PULL_ALLOC(ndr, r->in.handle);
6547 : NDR_ZERO_STRUCTP(r->in.handle);
6548 : }
6549 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6550 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6551 0 : NDR_PULL_ALLOC(ndr, r->out.key_name);
6552 : }
6553 0 : _mem_save_key_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6554 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.key_name, LIBNDR_FLAG_REF_ALLOC);
6555 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_key_name));
6556 0 : if (_ptr_key_name) {
6557 0 : NDR_PULL_ALLOC(ndr, *r->out.key_name);
6558 : } else {
6559 0 : *r->out.key_name = NULL;
6560 : }
6561 0 : if (*r->out.key_name) {
6562 0 : _mem_save_key_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
6563 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.key_name, 0);
6564 0 : NDR_CHECK(ndr_pull_array_size(ndr, r->out.key_name));
6565 0 : NDR_CHECK(ndr_pull_array_length(ndr, r->out.key_name));
6566 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)r->out.key_name, &size_key_name_2));
6567 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)r->out.key_name, &length_key_name_2));
6568 0 : if (length_key_name_2 > size_key_name_2) {
6569 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_key_name_2, length_key_name_2);
6570 : }
6571 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_key_name_2, sizeof(uint16_t)));
6572 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.key_name, length_key_name_2, sizeof(uint16_t), CH_UTF16));
6573 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_name_1, 0);
6574 : }
6575 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_name_0, LIBNDR_FLAG_REF_ALLOC);
6576 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
6577 0 : if (_ptr_display_name_length) {
6578 0 : NDR_PULL_ALLOC(ndr, r->out.display_name_length);
6579 : } else {
6580 0 : r->out.display_name_length = NULL;
6581 : }
6582 0 : if (r->out.display_name_length) {
6583 0 : _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
6584 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name_length, 0);
6585 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.display_name_length));
6586 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
6587 : }
6588 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6589 : }
6590 0 : return NDR_ERR_SUCCESS;
6591 : }
6592 :
6593 0 : _PUBLIC_ void ndr_print_svcctl_GetServiceKeyNameW(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_GetServiceKeyNameW *r)
6594 : {
6595 0 : ndr_print_struct(ndr, name, "svcctl_GetServiceKeyNameW");
6596 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6597 0 : ndr->depth++;
6598 0 : if (flags & NDR_SET_VALUES) {
6599 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6600 : }
6601 0 : if (flags & NDR_IN) {
6602 0 : ndr_print_struct(ndr, "in", "svcctl_GetServiceKeyNameW");
6603 0 : ndr->depth++;
6604 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
6605 0 : ndr->depth++;
6606 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
6607 0 : ndr->depth--;
6608 0 : ndr_print_ptr(ndr, "service_name", r->in.service_name);
6609 0 : ndr->depth++;
6610 0 : if (r->in.service_name) {
6611 0 : ndr_print_string(ndr, "service_name", r->in.service_name);
6612 : }
6613 0 : ndr->depth--;
6614 0 : ndr_print_ptr(ndr, "display_name_length", r->in.display_name_length);
6615 0 : ndr->depth++;
6616 0 : if (r->in.display_name_length) {
6617 0 : ndr_print_uint32(ndr, "display_name_length", *r->in.display_name_length);
6618 : }
6619 0 : ndr->depth--;
6620 0 : ndr->depth--;
6621 : }
6622 0 : if (flags & NDR_OUT) {
6623 0 : ndr_print_struct(ndr, "out", "svcctl_GetServiceKeyNameW");
6624 0 : ndr->depth++;
6625 0 : ndr_print_ptr(ndr, "key_name", r->out.key_name);
6626 0 : ndr->depth++;
6627 0 : ndr_print_ptr(ndr, "key_name", *r->out.key_name);
6628 0 : ndr->depth++;
6629 0 : if (*r->out.key_name) {
6630 0 : ndr_print_string(ndr, "key_name", *r->out.key_name);
6631 : }
6632 0 : ndr->depth--;
6633 0 : ndr->depth--;
6634 0 : ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length);
6635 0 : ndr->depth++;
6636 0 : if (r->out.display_name_length) {
6637 0 : ndr_print_uint32(ndr, "display_name_length", *r->out.display_name_length);
6638 : }
6639 0 : ndr->depth--;
6640 0 : ndr_print_WERROR(ndr, "result", r->out.result);
6641 0 : ndr->depth--;
6642 : }
6643 0 : ndr->depth--;
6644 : }
6645 :
6646 0 : static enum ndr_err_code ndr_push_svcctl_SCSetServiceBitsA(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_SCSetServiceBitsA *r)
6647 : {
6648 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6649 0 : if (flags & NDR_IN) {
6650 0 : if (r->in.handle == NULL) {
6651 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6652 : }
6653 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6654 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bits));
6655 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bitson));
6656 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.immediate));
6657 : }
6658 0 : if (flags & NDR_OUT) {
6659 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6660 : }
6661 0 : return NDR_ERR_SUCCESS;
6662 : }
6663 :
6664 0 : static enum ndr_err_code ndr_pull_svcctl_SCSetServiceBitsA(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_SCSetServiceBitsA *r)
6665 : {
6666 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
6667 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6668 0 : if (flags & NDR_IN) {
6669 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6670 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
6671 : }
6672 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6673 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6674 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6675 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6676 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bits));
6677 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bitson));
6678 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.immediate));
6679 : }
6680 0 : if (flags & NDR_OUT) {
6681 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6682 : if (r->in.handle == NULL) {
6683 : NDR_PULL_ALLOC(ndr, r->in.handle);
6684 : NDR_ZERO_STRUCTP(r->in.handle);
6685 : }
6686 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6687 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6688 : }
6689 0 : return NDR_ERR_SUCCESS;
6690 : }
6691 :
6692 0 : _PUBLIC_ void ndr_print_svcctl_SCSetServiceBitsA(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_SCSetServiceBitsA *r)
6693 : {
6694 0 : ndr_print_struct(ndr, name, "svcctl_SCSetServiceBitsA");
6695 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6696 0 : ndr->depth++;
6697 0 : if (flags & NDR_SET_VALUES) {
6698 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6699 : }
6700 0 : if (flags & NDR_IN) {
6701 0 : ndr_print_struct(ndr, "in", "svcctl_SCSetServiceBitsA");
6702 0 : ndr->depth++;
6703 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
6704 0 : ndr->depth++;
6705 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
6706 0 : ndr->depth--;
6707 0 : ndr_print_uint32(ndr, "bits", r->in.bits);
6708 0 : ndr_print_uint32(ndr, "bitson", r->in.bitson);
6709 0 : ndr_print_uint32(ndr, "immediate", r->in.immediate);
6710 0 : ndr->depth--;
6711 : }
6712 0 : if (flags & NDR_OUT) {
6713 0 : ndr_print_struct(ndr, "out", "svcctl_SCSetServiceBitsA");
6714 0 : ndr->depth++;
6715 0 : ndr_print_WERROR(ndr, "result", r->out.result);
6716 0 : ndr->depth--;
6717 : }
6718 0 : ndr->depth--;
6719 : }
6720 :
6721 0 : static enum ndr_err_code ndr_push_svcctl_ChangeServiceConfigA(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_ChangeServiceConfigA *r)
6722 : {
6723 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6724 0 : if (flags & NDR_IN) {
6725 0 : if (r->in.handle == NULL) {
6726 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6727 : }
6728 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6729 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
6730 0 : NDR_CHECK(ndr_push_svcctl_StartType(ndr, NDR_SCALARS, r->in.start_type));
6731 0 : NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr, NDR_SCALARS, r->in.error_control));
6732 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.binary_path));
6733 0 : if (r->in.binary_path) {
6734 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
6735 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6736 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
6737 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.binary_path, ndr_charset_length(r->in.binary_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6738 : }
6739 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.load_order_group));
6740 0 : if (r->in.load_order_group) {
6741 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.load_order_group, CH_UTF16)));
6742 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6743 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.load_order_group, CH_UTF16)));
6744 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.load_order_group, ndr_charset_length(r->in.load_order_group, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6745 : }
6746 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dependencies));
6747 0 : if (r->in.dependencies) {
6748 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
6749 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6750 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
6751 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dependencies, ndr_charset_length(r->in.dependencies, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6752 : }
6753 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_start_name));
6754 0 : if (r->in.service_start_name) {
6755 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
6756 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6757 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
6758 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.service_start_name, ndr_charset_length(r->in.service_start_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6759 : }
6760 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
6761 0 : if (r->in.password) {
6762 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
6763 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6764 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
6765 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.password, ndr_charset_length(r->in.password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6766 : }
6767 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name));
6768 0 : if (r->in.display_name) {
6769 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.display_name, CH_UTF16)));
6770 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6771 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.display_name, CH_UTF16)));
6772 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.display_name, ndr_charset_length(r->in.display_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6773 : }
6774 : }
6775 0 : if (flags & NDR_OUT) {
6776 0 : if (r->out.tag_id == NULL) {
6777 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6778 : }
6779 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.tag_id));
6780 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6781 : }
6782 0 : return NDR_ERR_SUCCESS;
6783 : }
6784 :
6785 0 : static enum ndr_err_code ndr_pull_svcctl_ChangeServiceConfigA(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_ChangeServiceConfigA *r)
6786 : {
6787 0 : uint32_t _ptr_binary_path;
6788 0 : uint32_t size_binary_path_1 = 0;
6789 0 : uint32_t length_binary_path_1 = 0;
6790 0 : uint32_t _ptr_load_order_group;
6791 0 : uint32_t size_load_order_group_1 = 0;
6792 0 : uint32_t length_load_order_group_1 = 0;
6793 0 : uint32_t _ptr_dependencies;
6794 0 : uint32_t size_dependencies_1 = 0;
6795 0 : uint32_t length_dependencies_1 = 0;
6796 0 : uint32_t _ptr_service_start_name;
6797 0 : uint32_t size_service_start_name_1 = 0;
6798 0 : uint32_t length_service_start_name_1 = 0;
6799 0 : uint32_t _ptr_password;
6800 0 : uint32_t size_password_1 = 0;
6801 0 : uint32_t length_password_1 = 0;
6802 0 : uint32_t _ptr_display_name;
6803 0 : uint32_t size_display_name_1 = 0;
6804 0 : uint32_t length_display_name_1 = 0;
6805 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
6806 0 : TALLOC_CTX *_mem_save_binary_path_0 = NULL;
6807 0 : TALLOC_CTX *_mem_save_load_order_group_0 = NULL;
6808 0 : TALLOC_CTX *_mem_save_tag_id_0 = NULL;
6809 0 : TALLOC_CTX *_mem_save_dependencies_0 = NULL;
6810 0 : TALLOC_CTX *_mem_save_service_start_name_0 = NULL;
6811 0 : TALLOC_CTX *_mem_save_password_0 = NULL;
6812 0 : TALLOC_CTX *_mem_save_display_name_0 = NULL;
6813 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6814 0 : if (flags & NDR_IN) {
6815 0 : NDR_ZERO_STRUCT(r->out);
6816 :
6817 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6818 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
6819 : }
6820 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6821 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6822 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6823 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6824 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
6825 0 : NDR_CHECK(ndr_pull_svcctl_StartType(ndr, NDR_SCALARS, &r->in.start_type));
6826 0 : NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr, NDR_SCALARS, &r->in.error_control));
6827 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_binary_path));
6828 0 : if (_ptr_binary_path) {
6829 0 : NDR_PULL_ALLOC(ndr, r->in.binary_path);
6830 : } else {
6831 0 : r->in.binary_path = NULL;
6832 : }
6833 0 : if (r->in.binary_path) {
6834 0 : _mem_save_binary_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
6835 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.binary_path, 0);
6836 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.binary_path));
6837 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.binary_path));
6838 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.binary_path, &size_binary_path_1));
6839 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.binary_path, &length_binary_path_1));
6840 0 : if (length_binary_path_1 > size_binary_path_1) {
6841 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_binary_path_1, length_binary_path_1);
6842 : }
6843 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_binary_path_1, sizeof(uint16_t)));
6844 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.binary_path, length_binary_path_1, sizeof(uint16_t), CH_UTF16));
6845 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_binary_path_0, 0);
6846 : }
6847 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_load_order_group));
6848 0 : if (_ptr_load_order_group) {
6849 0 : NDR_PULL_ALLOC(ndr, r->in.load_order_group);
6850 : } else {
6851 0 : r->in.load_order_group = NULL;
6852 : }
6853 0 : if (r->in.load_order_group) {
6854 0 : _mem_save_load_order_group_0 = NDR_PULL_GET_MEM_CTX(ndr);
6855 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.load_order_group, 0);
6856 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.load_order_group));
6857 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.load_order_group));
6858 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.load_order_group, &size_load_order_group_1));
6859 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.load_order_group, &length_load_order_group_1));
6860 0 : if (length_load_order_group_1 > size_load_order_group_1) {
6861 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_load_order_group_1, length_load_order_group_1);
6862 : }
6863 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_load_order_group_1, sizeof(uint16_t)));
6864 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.load_order_group, length_load_order_group_1, sizeof(uint16_t), CH_UTF16));
6865 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_load_order_group_0, 0);
6866 : }
6867 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
6868 0 : if (_ptr_dependencies) {
6869 0 : NDR_PULL_ALLOC(ndr, r->in.dependencies);
6870 : } else {
6871 0 : r->in.dependencies = NULL;
6872 : }
6873 0 : if (r->in.dependencies) {
6874 0 : _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
6875 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.dependencies, 0);
6876 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dependencies));
6877 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dependencies));
6878 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.dependencies, &size_dependencies_1));
6879 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.dependencies, &length_dependencies_1));
6880 0 : if (length_dependencies_1 > size_dependencies_1) {
6881 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dependencies_1, length_dependencies_1);
6882 : }
6883 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dependencies_1, sizeof(uint16_t)));
6884 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dependencies, length_dependencies_1, sizeof(uint16_t), CH_UTF16));
6885 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
6886 : }
6887 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_start_name));
6888 0 : if (_ptr_service_start_name) {
6889 0 : NDR_PULL_ALLOC(ndr, r->in.service_start_name);
6890 : } else {
6891 0 : r->in.service_start_name = NULL;
6892 : }
6893 0 : if (r->in.service_start_name) {
6894 0 : _mem_save_service_start_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6895 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.service_start_name, 0);
6896 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_start_name));
6897 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_start_name));
6898 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.service_start_name, &size_service_start_name_1));
6899 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.service_start_name, &length_service_start_name_1));
6900 0 : if (length_service_start_name_1 > size_service_start_name_1) {
6901 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_service_start_name_1, length_service_start_name_1);
6902 : }
6903 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_service_start_name_1, sizeof(uint16_t)));
6904 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_start_name, length_service_start_name_1, sizeof(uint16_t), CH_UTF16));
6905 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_start_name_0, 0);
6906 : }
6907 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
6908 0 : if (_ptr_password) {
6909 0 : NDR_PULL_ALLOC(ndr, r->in.password);
6910 : } else {
6911 0 : r->in.password = NULL;
6912 : }
6913 0 : if (r->in.password) {
6914 0 : _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
6915 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
6916 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
6917 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.password));
6918 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.password, &size_password_1));
6919 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.password, &length_password_1));
6920 0 : if (length_password_1 > size_password_1) {
6921 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_password_1, length_password_1);
6922 : }
6923 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_password_1, sizeof(uint16_t)));
6924 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.password, length_password_1, sizeof(uint16_t), CH_UTF16));
6925 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
6926 : }
6927 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
6928 0 : if (_ptr_display_name) {
6929 0 : NDR_PULL_ALLOC(ndr, r->in.display_name);
6930 : } else {
6931 0 : r->in.display_name = NULL;
6932 : }
6933 0 : if (r->in.display_name) {
6934 0 : _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6935 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name, 0);
6936 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.display_name));
6937 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.display_name));
6938 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.display_name, &size_display_name_1));
6939 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.display_name, &length_display_name_1));
6940 0 : if (length_display_name_1 > size_display_name_1) {
6941 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_display_name_1, length_display_name_1);
6942 : }
6943 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_display_name_1, sizeof(uint16_t)));
6944 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.display_name, length_display_name_1, sizeof(uint16_t), CH_UTF16));
6945 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, 0);
6946 : }
6947 0 : NDR_PULL_ALLOC(ndr, r->out.tag_id);
6948 0 : NDR_ZERO_STRUCTP(r->out.tag_id);
6949 : }
6950 0 : if (flags & NDR_OUT) {
6951 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6952 : if (r->in.handle == NULL) {
6953 : NDR_PULL_ALLOC(ndr, r->in.handle);
6954 : NDR_ZERO_STRUCTP(r->in.handle);
6955 : }
6956 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6957 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6958 0 : NDR_PULL_ALLOC(ndr, r->out.tag_id);
6959 : }
6960 0 : _mem_save_tag_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
6961 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.tag_id, LIBNDR_FLAG_REF_ALLOC);
6962 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.tag_id));
6963 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_tag_id_0, LIBNDR_FLAG_REF_ALLOC);
6964 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6965 : }
6966 0 : return NDR_ERR_SUCCESS;
6967 : }
6968 :
6969 0 : _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfigA(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_ChangeServiceConfigA *r)
6970 : {
6971 0 : ndr_print_struct(ndr, name, "svcctl_ChangeServiceConfigA");
6972 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6973 0 : ndr->depth++;
6974 0 : if (flags & NDR_SET_VALUES) {
6975 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6976 : }
6977 0 : if (flags & NDR_IN) {
6978 0 : ndr_print_struct(ndr, "in", "svcctl_ChangeServiceConfigA");
6979 0 : ndr->depth++;
6980 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
6981 0 : ndr->depth++;
6982 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
6983 0 : ndr->depth--;
6984 0 : ndr_print_uint32(ndr, "type", r->in.type);
6985 0 : ndr_print_svcctl_StartType(ndr, "start_type", r->in.start_type);
6986 0 : ndr_print_svcctl_ErrorControl(ndr, "error_control", r->in.error_control);
6987 0 : ndr_print_ptr(ndr, "binary_path", r->in.binary_path);
6988 0 : ndr->depth++;
6989 0 : if (r->in.binary_path) {
6990 0 : ndr_print_string(ndr, "binary_path", r->in.binary_path);
6991 : }
6992 0 : ndr->depth--;
6993 0 : ndr_print_ptr(ndr, "load_order_group", r->in.load_order_group);
6994 0 : ndr->depth++;
6995 0 : if (r->in.load_order_group) {
6996 0 : ndr_print_string(ndr, "load_order_group", r->in.load_order_group);
6997 : }
6998 0 : ndr->depth--;
6999 0 : ndr_print_ptr(ndr, "dependencies", r->in.dependencies);
7000 0 : ndr->depth++;
7001 0 : if (r->in.dependencies) {
7002 0 : ndr_print_string(ndr, "dependencies", r->in.dependencies);
7003 : }
7004 0 : ndr->depth--;
7005 0 : ndr_print_ptr(ndr, "service_start_name", r->in.service_start_name);
7006 0 : ndr->depth++;
7007 0 : if (r->in.service_start_name) {
7008 0 : ndr_print_string(ndr, "service_start_name", r->in.service_start_name);
7009 : }
7010 0 : ndr->depth--;
7011 0 : ndr_print_ptr(ndr, "password", r->in.password);
7012 0 : ndr->depth++;
7013 0 : if (r->in.password) {
7014 0 : ndr_print_string(ndr, "password", r->in.password);
7015 : }
7016 0 : ndr->depth--;
7017 0 : ndr_print_ptr(ndr, "display_name", r->in.display_name);
7018 0 : ndr->depth++;
7019 0 : if (r->in.display_name) {
7020 0 : ndr_print_string(ndr, "display_name", r->in.display_name);
7021 : }
7022 0 : ndr->depth--;
7023 0 : ndr->depth--;
7024 : }
7025 0 : if (flags & NDR_OUT) {
7026 0 : ndr_print_struct(ndr, "out", "svcctl_ChangeServiceConfigA");
7027 0 : ndr->depth++;
7028 0 : ndr_print_ptr(ndr, "tag_id", r->out.tag_id);
7029 0 : ndr->depth++;
7030 0 : ndr_print_uint32(ndr, "tag_id", *r->out.tag_id);
7031 0 : ndr->depth--;
7032 0 : ndr_print_WERROR(ndr, "result", r->out.result);
7033 0 : ndr->depth--;
7034 : }
7035 0 : ndr->depth--;
7036 : }
7037 :
7038 0 : static enum ndr_err_code ndr_push_svcctl_CreateServiceA(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_CreateServiceA *r)
7039 : {
7040 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7041 0 : if (flags & NDR_IN) {
7042 0 : if (r->in.handle == NULL) {
7043 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7044 : }
7045 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7046 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.ServiceName));
7047 0 : if (r->in.ServiceName) {
7048 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
7049 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7050 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
7051 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.ServiceName, ndr_charset_length(r->in.ServiceName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7052 : }
7053 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.DisplayName));
7054 0 : if (r->in.DisplayName) {
7055 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DisplayName, CH_UTF16)));
7056 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7057 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DisplayName, CH_UTF16)));
7058 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.DisplayName, ndr_charset_length(r->in.DisplayName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7059 : }
7060 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.desired_access));
7061 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
7062 0 : NDR_CHECK(ndr_push_svcctl_StartType(ndr, NDR_SCALARS, r->in.start_type));
7063 0 : NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr, NDR_SCALARS, r->in.error_control));
7064 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.binary_path));
7065 0 : if (r->in.binary_path) {
7066 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
7067 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7068 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
7069 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.binary_path, ndr_charset_length(r->in.binary_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7070 : }
7071 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.LoadOrderGroupKey));
7072 0 : if (r->in.LoadOrderGroupKey) {
7073 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16)));
7074 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7075 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16)));
7076 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.LoadOrderGroupKey, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7077 : }
7078 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dependencies));
7079 0 : if (r->in.dependencies) {
7080 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
7081 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7082 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
7083 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dependencies, ndr_charset_length(r->in.dependencies, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7084 : }
7085 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_start_name));
7086 0 : if (r->in.service_start_name) {
7087 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
7088 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7089 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
7090 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.service_start_name, ndr_charset_length(r->in.service_start_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7091 : }
7092 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
7093 0 : if (r->in.password) {
7094 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
7095 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7096 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
7097 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.password, ndr_charset_length(r->in.password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7098 : }
7099 : }
7100 0 : if (flags & NDR_OUT) {
7101 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.TagId));
7102 0 : if (r->out.TagId) {
7103 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.TagId));
7104 : }
7105 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
7106 : }
7107 0 : return NDR_ERR_SUCCESS;
7108 : }
7109 :
7110 0 : static enum ndr_err_code ndr_pull_svcctl_CreateServiceA(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_CreateServiceA *r)
7111 : {
7112 0 : uint32_t _ptr_ServiceName;
7113 0 : uint32_t size_ServiceName_1 = 0;
7114 0 : uint32_t length_ServiceName_1 = 0;
7115 0 : uint32_t _ptr_DisplayName;
7116 0 : uint32_t size_DisplayName_1 = 0;
7117 0 : uint32_t length_DisplayName_1 = 0;
7118 0 : uint32_t _ptr_binary_path;
7119 0 : uint32_t size_binary_path_1 = 0;
7120 0 : uint32_t length_binary_path_1 = 0;
7121 0 : uint32_t _ptr_LoadOrderGroupKey;
7122 0 : uint32_t size_LoadOrderGroupKey_1 = 0;
7123 0 : uint32_t length_LoadOrderGroupKey_1 = 0;
7124 0 : uint32_t _ptr_TagId;
7125 0 : uint32_t _ptr_dependencies;
7126 0 : uint32_t size_dependencies_1 = 0;
7127 0 : uint32_t length_dependencies_1 = 0;
7128 0 : uint32_t _ptr_service_start_name;
7129 0 : uint32_t size_service_start_name_1 = 0;
7130 0 : uint32_t length_service_start_name_1 = 0;
7131 0 : uint32_t _ptr_password;
7132 0 : uint32_t size_password_1 = 0;
7133 0 : uint32_t length_password_1 = 0;
7134 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
7135 0 : TALLOC_CTX *_mem_save_ServiceName_0 = NULL;
7136 0 : TALLOC_CTX *_mem_save_DisplayName_0 = NULL;
7137 0 : TALLOC_CTX *_mem_save_binary_path_0 = NULL;
7138 0 : TALLOC_CTX *_mem_save_LoadOrderGroupKey_0 = NULL;
7139 0 : TALLOC_CTX *_mem_save_TagId_0 = NULL;
7140 0 : TALLOC_CTX *_mem_save_dependencies_0 = NULL;
7141 0 : TALLOC_CTX *_mem_save_service_start_name_0 = NULL;
7142 0 : TALLOC_CTX *_mem_save_password_0 = NULL;
7143 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
7144 0 : if (flags & NDR_IN) {
7145 0 : NDR_ZERO_STRUCT(r->out);
7146 :
7147 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7148 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
7149 : }
7150 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7151 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7152 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7153 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7154 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ServiceName));
7155 0 : if (_ptr_ServiceName) {
7156 0 : NDR_PULL_ALLOC(ndr, r->in.ServiceName);
7157 : } else {
7158 0 : r->in.ServiceName = NULL;
7159 : }
7160 0 : if (r->in.ServiceName) {
7161 0 : _mem_save_ServiceName_0 = NDR_PULL_GET_MEM_CTX(ndr);
7162 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.ServiceName, 0);
7163 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.ServiceName));
7164 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.ServiceName));
7165 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.ServiceName, &size_ServiceName_1));
7166 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.ServiceName, &length_ServiceName_1));
7167 0 : if (length_ServiceName_1 > size_ServiceName_1) {
7168 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_ServiceName_1, length_ServiceName_1);
7169 : }
7170 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_ServiceName_1, sizeof(uint16_t)));
7171 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.ServiceName, length_ServiceName_1, sizeof(uint16_t), CH_UTF16));
7172 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ServiceName_0, 0);
7173 : }
7174 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DisplayName));
7175 0 : if (_ptr_DisplayName) {
7176 0 : NDR_PULL_ALLOC(ndr, r->in.DisplayName);
7177 : } else {
7178 0 : r->in.DisplayName = NULL;
7179 : }
7180 0 : if (r->in.DisplayName) {
7181 0 : _mem_save_DisplayName_0 = NDR_PULL_GET_MEM_CTX(ndr);
7182 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.DisplayName, 0);
7183 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.DisplayName));
7184 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.DisplayName));
7185 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.DisplayName, &size_DisplayName_1));
7186 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.DisplayName, &length_DisplayName_1));
7187 0 : if (length_DisplayName_1 > size_DisplayName_1) {
7188 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_DisplayName_1, length_DisplayName_1);
7189 : }
7190 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_DisplayName_1, sizeof(uint16_t)));
7191 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.DisplayName, length_DisplayName_1, sizeof(uint16_t), CH_UTF16));
7192 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DisplayName_0, 0);
7193 : }
7194 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.desired_access));
7195 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
7196 0 : NDR_CHECK(ndr_pull_svcctl_StartType(ndr, NDR_SCALARS, &r->in.start_type));
7197 0 : NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr, NDR_SCALARS, &r->in.error_control));
7198 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_binary_path));
7199 0 : if (_ptr_binary_path) {
7200 0 : NDR_PULL_ALLOC(ndr, r->in.binary_path);
7201 : } else {
7202 0 : r->in.binary_path = NULL;
7203 : }
7204 0 : if (r->in.binary_path) {
7205 0 : _mem_save_binary_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
7206 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.binary_path, 0);
7207 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.binary_path));
7208 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.binary_path));
7209 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.binary_path, &size_binary_path_1));
7210 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.binary_path, &length_binary_path_1));
7211 0 : if (length_binary_path_1 > size_binary_path_1) {
7212 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_binary_path_1, length_binary_path_1);
7213 : }
7214 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_binary_path_1, sizeof(uint16_t)));
7215 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.binary_path, length_binary_path_1, sizeof(uint16_t), CH_UTF16));
7216 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_binary_path_0, 0);
7217 : }
7218 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_LoadOrderGroupKey));
7219 0 : if (_ptr_LoadOrderGroupKey) {
7220 0 : NDR_PULL_ALLOC(ndr, r->in.LoadOrderGroupKey);
7221 : } else {
7222 0 : r->in.LoadOrderGroupKey = NULL;
7223 : }
7224 0 : if (r->in.LoadOrderGroupKey) {
7225 0 : _mem_save_LoadOrderGroupKey_0 = NDR_PULL_GET_MEM_CTX(ndr);
7226 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.LoadOrderGroupKey, 0);
7227 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.LoadOrderGroupKey));
7228 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.LoadOrderGroupKey));
7229 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.LoadOrderGroupKey, &size_LoadOrderGroupKey_1));
7230 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.LoadOrderGroupKey, &length_LoadOrderGroupKey_1));
7231 0 : if (length_LoadOrderGroupKey_1 > size_LoadOrderGroupKey_1) {
7232 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_LoadOrderGroupKey_1, length_LoadOrderGroupKey_1);
7233 : }
7234 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_LoadOrderGroupKey_1, sizeof(uint16_t)));
7235 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.LoadOrderGroupKey, length_LoadOrderGroupKey_1, sizeof(uint16_t), CH_UTF16));
7236 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_LoadOrderGroupKey_0, 0);
7237 : }
7238 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
7239 0 : if (_ptr_dependencies) {
7240 0 : NDR_PULL_ALLOC(ndr, r->in.dependencies);
7241 : } else {
7242 0 : r->in.dependencies = NULL;
7243 : }
7244 0 : if (r->in.dependencies) {
7245 0 : _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
7246 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.dependencies, 0);
7247 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dependencies));
7248 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dependencies));
7249 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.dependencies, &size_dependencies_1));
7250 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.dependencies, &length_dependencies_1));
7251 0 : if (length_dependencies_1 > size_dependencies_1) {
7252 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_dependencies_1, length_dependencies_1);
7253 : }
7254 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dependencies_1, sizeof(uint16_t)));
7255 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dependencies, length_dependencies_1, sizeof(uint16_t), CH_UTF16));
7256 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
7257 : }
7258 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_start_name));
7259 0 : if (_ptr_service_start_name) {
7260 0 : NDR_PULL_ALLOC(ndr, r->in.service_start_name);
7261 : } else {
7262 0 : r->in.service_start_name = NULL;
7263 : }
7264 0 : if (r->in.service_start_name) {
7265 0 : _mem_save_service_start_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7266 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.service_start_name, 0);
7267 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_start_name));
7268 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_start_name));
7269 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.service_start_name, &size_service_start_name_1));
7270 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.service_start_name, &length_service_start_name_1));
7271 0 : if (length_service_start_name_1 > size_service_start_name_1) {
7272 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_service_start_name_1, length_service_start_name_1);
7273 : }
7274 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_service_start_name_1, sizeof(uint16_t)));
7275 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_start_name, length_service_start_name_1, sizeof(uint16_t), CH_UTF16));
7276 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_start_name_0, 0);
7277 : }
7278 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
7279 0 : if (_ptr_password) {
7280 0 : NDR_PULL_ALLOC(ndr, r->in.password);
7281 : } else {
7282 0 : r->in.password = NULL;
7283 : }
7284 0 : if (r->in.password) {
7285 0 : _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
7286 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
7287 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
7288 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.password));
7289 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.password, &size_password_1));
7290 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.password, &length_password_1));
7291 0 : if (length_password_1 > size_password_1) {
7292 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_password_1, length_password_1);
7293 : }
7294 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_password_1, sizeof(uint16_t)));
7295 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.password, length_password_1, sizeof(uint16_t), CH_UTF16));
7296 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
7297 : }
7298 : }
7299 0 : if (flags & NDR_OUT) {
7300 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
7301 : if (r->in.handle == NULL) {
7302 : NDR_PULL_ALLOC(ndr, r->in.handle);
7303 : NDR_ZERO_STRUCTP(r->in.handle);
7304 : }
7305 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
7306 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_TagId));
7307 0 : if (_ptr_TagId) {
7308 0 : NDR_PULL_ALLOC(ndr, r->out.TagId);
7309 : } else {
7310 0 : r->out.TagId = NULL;
7311 : }
7312 0 : if (r->out.TagId) {
7313 0 : _mem_save_TagId_0 = NDR_PULL_GET_MEM_CTX(ndr);
7314 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.TagId, 0);
7315 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.TagId));
7316 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_TagId_0, 0);
7317 : }
7318 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
7319 : }
7320 0 : return NDR_ERR_SUCCESS;
7321 : }
7322 :
7323 0 : _PUBLIC_ void ndr_print_svcctl_CreateServiceA(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_CreateServiceA *r)
7324 : {
7325 0 : ndr_print_struct(ndr, name, "svcctl_CreateServiceA");
7326 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7327 0 : ndr->depth++;
7328 0 : if (flags & NDR_SET_VALUES) {
7329 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7330 : }
7331 0 : if (flags & NDR_IN) {
7332 0 : ndr_print_struct(ndr, "in", "svcctl_CreateServiceA");
7333 0 : ndr->depth++;
7334 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
7335 0 : ndr->depth++;
7336 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
7337 0 : ndr->depth--;
7338 0 : ndr_print_ptr(ndr, "ServiceName", r->in.ServiceName);
7339 0 : ndr->depth++;
7340 0 : if (r->in.ServiceName) {
7341 0 : ndr_print_string(ndr, "ServiceName", r->in.ServiceName);
7342 : }
7343 0 : ndr->depth--;
7344 0 : ndr_print_ptr(ndr, "DisplayName", r->in.DisplayName);
7345 0 : ndr->depth++;
7346 0 : if (r->in.DisplayName) {
7347 0 : ndr_print_string(ndr, "DisplayName", r->in.DisplayName);
7348 : }
7349 0 : ndr->depth--;
7350 0 : ndr_print_uint32(ndr, "desired_access", r->in.desired_access);
7351 0 : ndr_print_uint32(ndr, "type", r->in.type);
7352 0 : ndr_print_svcctl_StartType(ndr, "start_type", r->in.start_type);
7353 0 : ndr_print_svcctl_ErrorControl(ndr, "error_control", r->in.error_control);
7354 0 : ndr_print_ptr(ndr, "binary_path", r->in.binary_path);
7355 0 : ndr->depth++;
7356 0 : if (r->in.binary_path) {
7357 0 : ndr_print_string(ndr, "binary_path", r->in.binary_path);
7358 : }
7359 0 : ndr->depth--;
7360 0 : ndr_print_ptr(ndr, "LoadOrderGroupKey", r->in.LoadOrderGroupKey);
7361 0 : ndr->depth++;
7362 0 : if (r->in.LoadOrderGroupKey) {
7363 0 : ndr_print_string(ndr, "LoadOrderGroupKey", r->in.LoadOrderGroupKey);
7364 : }
7365 0 : ndr->depth--;
7366 0 : ndr_print_ptr(ndr, "dependencies", r->in.dependencies);
7367 0 : ndr->depth++;
7368 0 : if (r->in.dependencies) {
7369 0 : ndr_print_string(ndr, "dependencies", r->in.dependencies);
7370 : }
7371 0 : ndr->depth--;
7372 0 : ndr_print_ptr(ndr, "service_start_name", r->in.service_start_name);
7373 0 : ndr->depth++;
7374 0 : if (r->in.service_start_name) {
7375 0 : ndr_print_string(ndr, "service_start_name", r->in.service_start_name);
7376 : }
7377 0 : ndr->depth--;
7378 0 : ndr_print_ptr(ndr, "password", r->in.password);
7379 0 : ndr->depth++;
7380 0 : if (r->in.password) {
7381 0 : ndr_print_string(ndr, "password", r->in.password);
7382 : }
7383 0 : ndr->depth--;
7384 0 : ndr->depth--;
7385 : }
7386 0 : if (flags & NDR_OUT) {
7387 0 : ndr_print_struct(ndr, "out", "svcctl_CreateServiceA");
7388 0 : ndr->depth++;
7389 0 : ndr_print_ptr(ndr, "TagId", r->out.TagId);
7390 0 : ndr->depth++;
7391 0 : if (r->out.TagId) {
7392 0 : ndr_print_uint32(ndr, "TagId", *r->out.TagId);
7393 : }
7394 0 : ndr->depth--;
7395 0 : ndr_print_WERROR(ndr, "result", r->out.result);
7396 0 : ndr->depth--;
7397 : }
7398 0 : ndr->depth--;
7399 : }
7400 :
7401 0 : static enum ndr_err_code ndr_push_svcctl_EnumDependentServicesA(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_EnumDependentServicesA *r)
7402 : {
7403 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7404 0 : if (flags & NDR_IN) {
7405 0 : if (r->in.service == NULL) {
7406 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7407 : }
7408 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.service));
7409 0 : NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
7410 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
7411 : }
7412 0 : if (flags & NDR_OUT) {
7413 0 : if (r->out.needed == NULL) {
7414 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7415 : }
7416 0 : if (r->out.services_returned == NULL) {
7417 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7418 : }
7419 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.service_status));
7420 0 : if (r->out.service_status) {
7421 0 : NDR_CHECK(ndr_push_ENUM_SERVICE_STATUSA(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.service_status));
7422 : }
7423 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
7424 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.services_returned));
7425 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
7426 : }
7427 0 : return NDR_ERR_SUCCESS;
7428 : }
7429 :
7430 0 : static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesA(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_EnumDependentServicesA *r)
7431 : {
7432 0 : uint32_t _ptr_service_status;
7433 0 : TALLOC_CTX *_mem_save_service_0 = NULL;
7434 0 : TALLOC_CTX *_mem_save_service_status_0 = NULL;
7435 0 : TALLOC_CTX *_mem_save_needed_0 = NULL;
7436 0 : TALLOC_CTX *_mem_save_services_returned_0 = NULL;
7437 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
7438 0 : if (flags & NDR_IN) {
7439 0 : NDR_ZERO_STRUCT(r->out);
7440 :
7441 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7442 0 : NDR_PULL_ALLOC(ndr, r->in.service);
7443 : }
7444 0 : _mem_save_service_0 = NDR_PULL_GET_MEM_CTX(ndr);
7445 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.service, LIBNDR_FLAG_REF_ALLOC);
7446 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.service));
7447 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_0, LIBNDR_FLAG_REF_ALLOC);
7448 0 : NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
7449 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
7450 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
7451 0 : NDR_ZERO_STRUCTP(r->out.needed);
7452 0 : NDR_PULL_ALLOC(ndr, r->out.services_returned);
7453 0 : NDR_ZERO_STRUCTP(r->out.services_returned);
7454 : }
7455 0 : if (flags & NDR_OUT) {
7456 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
7457 : if (r->in.service == NULL) {
7458 : NDR_PULL_ALLOC(ndr, r->in.service);
7459 : NDR_ZERO_STRUCTP(r->in.service);
7460 : }
7461 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
7462 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_status));
7463 0 : if (_ptr_service_status) {
7464 0 : NDR_PULL_ALLOC(ndr, r->out.service_status);
7465 : } else {
7466 0 : r->out.service_status = NULL;
7467 : }
7468 0 : if (r->out.service_status) {
7469 0 : _mem_save_service_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
7470 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.service_status, 0);
7471 0 : NDR_CHECK(ndr_pull_ENUM_SERVICE_STATUSA(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.service_status));
7472 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_status_0, 0);
7473 : }
7474 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7475 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
7476 : }
7477 0 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
7478 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
7479 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
7480 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
7481 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7482 0 : NDR_PULL_ALLOC(ndr, r->out.services_returned);
7483 : }
7484 0 : _mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
7485 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
7486 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
7487 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
7488 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
7489 : }
7490 0 : return NDR_ERR_SUCCESS;
7491 : }
7492 :
7493 0 : _PUBLIC_ void ndr_print_svcctl_EnumDependentServicesA(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_EnumDependentServicesA *r)
7494 : {
7495 0 : ndr_print_struct(ndr, name, "svcctl_EnumDependentServicesA");
7496 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7497 0 : ndr->depth++;
7498 0 : if (flags & NDR_SET_VALUES) {
7499 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7500 : }
7501 0 : if (flags & NDR_IN) {
7502 0 : ndr_print_struct(ndr, "in", "svcctl_EnumDependentServicesA");
7503 0 : ndr->depth++;
7504 0 : ndr_print_ptr(ndr, "service", r->in.service);
7505 0 : ndr->depth++;
7506 0 : ndr_print_policy_handle(ndr, "service", r->in.service);
7507 0 : ndr->depth--;
7508 0 : ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
7509 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
7510 0 : ndr->depth--;
7511 : }
7512 0 : if (flags & NDR_OUT) {
7513 0 : ndr_print_struct(ndr, "out", "svcctl_EnumDependentServicesA");
7514 0 : ndr->depth++;
7515 0 : ndr_print_ptr(ndr, "service_status", r->out.service_status);
7516 0 : ndr->depth++;
7517 0 : if (r->out.service_status) {
7518 0 : ndr_print_ENUM_SERVICE_STATUSA(ndr, "service_status", r->out.service_status);
7519 : }
7520 0 : ndr->depth--;
7521 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
7522 0 : ndr->depth++;
7523 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
7524 0 : ndr->depth--;
7525 0 : ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
7526 0 : ndr->depth++;
7527 0 : ndr_print_uint32(ndr, "services_returned", *r->out.services_returned);
7528 0 : ndr->depth--;
7529 0 : ndr_print_WERROR(ndr, "result", r->out.result);
7530 0 : ndr->depth--;
7531 : }
7532 0 : ndr->depth--;
7533 : }
7534 :
7535 0 : static enum ndr_err_code ndr_push_svcctl_EnumServicesStatusA(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_EnumServicesStatusA *r)
7536 : {
7537 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7538 0 : if (flags & NDR_IN) {
7539 0 : if (r->in.handle == NULL) {
7540 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7541 : }
7542 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7543 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
7544 0 : NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
7545 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
7546 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
7547 0 : if (r->in.resume_handle) {
7548 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
7549 : }
7550 : }
7551 0 : if (flags & NDR_OUT) {
7552 0 : if (r->out.needed == NULL) {
7553 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7554 : }
7555 0 : if (r->out.services_returned == NULL) {
7556 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7557 : }
7558 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
7559 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.service, r->in.offered));
7560 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
7561 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.services_returned));
7562 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
7563 0 : if (r->out.resume_handle) {
7564 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
7565 : }
7566 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
7567 : }
7568 0 : return NDR_ERR_SUCCESS;
7569 : }
7570 :
7571 0 : static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusA(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_EnumServicesStatusA *r)
7572 : {
7573 0 : uint32_t size_service_0 = 0;
7574 0 : uint32_t _ptr_resume_handle;
7575 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
7576 0 : TALLOC_CTX *_mem_save_needed_0 = NULL;
7577 0 : TALLOC_CTX *_mem_save_services_returned_0 = NULL;
7578 0 : TALLOC_CTX *_mem_save_resume_handle_0 = NULL;
7579 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
7580 0 : if (flags & NDR_IN) {
7581 0 : NDR_ZERO_STRUCT(r->out);
7582 :
7583 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7584 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
7585 : }
7586 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7587 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7588 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7589 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7590 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
7591 0 : NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
7592 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
7593 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
7594 0 : if (_ptr_resume_handle) {
7595 0 : NDR_PULL_ALLOC(ndr, r->in.resume_handle);
7596 : } else {
7597 0 : r->in.resume_handle = NULL;
7598 : }
7599 0 : if (r->in.resume_handle) {
7600 0 : _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7601 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
7602 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
7603 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
7604 : }
7605 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
7606 0 : NDR_ZERO_STRUCTP(r->out.needed);
7607 0 : NDR_PULL_ALLOC(ndr, r->out.services_returned);
7608 0 : NDR_ZERO_STRUCTP(r->out.services_returned);
7609 : }
7610 0 : if (flags & NDR_OUT) {
7611 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
7612 : if (r->in.handle == NULL) {
7613 : NDR_PULL_ALLOC(ndr, r->in.handle);
7614 : NDR_ZERO_STRUCTP(r->in.handle);
7615 : }
7616 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
7617 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.service));
7618 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.service, &size_service_0));
7619 0 : NDR_PULL_ALLOC_N(ndr, r->out.service, size_service_0);
7620 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.service, size_service_0));
7621 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7622 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
7623 : }
7624 0 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
7625 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
7626 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
7627 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
7628 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7629 0 : NDR_PULL_ALLOC(ndr, r->out.services_returned);
7630 : }
7631 0 : _mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
7632 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
7633 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
7634 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
7635 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
7636 0 : if (_ptr_resume_handle) {
7637 0 : NDR_PULL_ALLOC(ndr, r->out.resume_handle);
7638 : } else {
7639 0 : r->out.resume_handle = NULL;
7640 : }
7641 0 : if (r->out.resume_handle) {
7642 0 : _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7643 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
7644 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
7645 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
7646 : }
7647 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
7648 0 : if (r->out.service) {
7649 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.service, r->in.offered));
7650 : }
7651 : }
7652 0 : return NDR_ERR_SUCCESS;
7653 : }
7654 :
7655 0 : _PUBLIC_ void ndr_print_svcctl_EnumServicesStatusA(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_EnumServicesStatusA *r)
7656 : {
7657 0 : ndr_print_struct(ndr, name, "svcctl_EnumServicesStatusA");
7658 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7659 0 : ndr->depth++;
7660 0 : if (flags & NDR_SET_VALUES) {
7661 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7662 : }
7663 0 : if (flags & NDR_IN) {
7664 0 : ndr_print_struct(ndr, "in", "svcctl_EnumServicesStatusA");
7665 0 : ndr->depth++;
7666 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
7667 0 : ndr->depth++;
7668 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
7669 0 : ndr->depth--;
7670 0 : ndr_print_uint32(ndr, "type", r->in.type);
7671 0 : ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
7672 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
7673 0 : ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
7674 0 : ndr->depth++;
7675 0 : if (r->in.resume_handle) {
7676 0 : ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
7677 : }
7678 0 : ndr->depth--;
7679 0 : ndr->depth--;
7680 : }
7681 0 : if (flags & NDR_OUT) {
7682 0 : ndr_print_struct(ndr, "out", "svcctl_EnumServicesStatusA");
7683 0 : ndr->depth++;
7684 0 : ndr_print_array_uint8(ndr, "service", r->out.service, r->in.offered);
7685 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
7686 0 : ndr->depth++;
7687 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
7688 0 : ndr->depth--;
7689 0 : ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
7690 0 : ndr->depth++;
7691 0 : ndr_print_uint32(ndr, "services_returned", *r->out.services_returned);
7692 0 : ndr->depth--;
7693 0 : ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
7694 0 : ndr->depth++;
7695 0 : if (r->out.resume_handle) {
7696 0 : ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
7697 : }
7698 0 : ndr->depth--;
7699 0 : ndr_print_WERROR(ndr, "result", r->out.result);
7700 0 : ndr->depth--;
7701 : }
7702 0 : ndr->depth--;
7703 : }
7704 :
7705 0 : static enum ndr_err_code ndr_push_svcctl_OpenSCManagerA(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_OpenSCManagerA *r)
7706 : {
7707 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7708 0 : if (flags & NDR_IN) {
7709 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.MachineName));
7710 0 : if (r->in.MachineName) {
7711 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.MachineName, CH_UTF16)));
7712 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7713 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.MachineName, CH_UTF16)));
7714 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.MachineName, ndr_charset_length(r->in.MachineName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7715 : }
7716 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.DatabaseName));
7717 0 : if (r->in.DatabaseName) {
7718 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DatabaseName, CH_UTF16)));
7719 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7720 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DatabaseName, CH_UTF16)));
7721 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.DatabaseName, ndr_charset_length(r->in.DatabaseName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7722 : }
7723 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
7724 : }
7725 0 : if (flags & NDR_OUT) {
7726 0 : if (r->out.handle == NULL) {
7727 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7728 : }
7729 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
7730 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
7731 : }
7732 0 : return NDR_ERR_SUCCESS;
7733 : }
7734 :
7735 0 : static enum ndr_err_code ndr_pull_svcctl_OpenSCManagerA(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_OpenSCManagerA *r)
7736 : {
7737 0 : uint32_t _ptr_MachineName;
7738 0 : uint32_t size_MachineName_1 = 0;
7739 0 : uint32_t length_MachineName_1 = 0;
7740 0 : uint32_t _ptr_DatabaseName;
7741 0 : uint32_t size_DatabaseName_1 = 0;
7742 0 : uint32_t length_DatabaseName_1 = 0;
7743 0 : TALLOC_CTX *_mem_save_MachineName_0 = NULL;
7744 0 : TALLOC_CTX *_mem_save_DatabaseName_0 = NULL;
7745 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
7746 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
7747 0 : if (flags & NDR_IN) {
7748 0 : NDR_ZERO_STRUCT(r->out);
7749 :
7750 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_MachineName));
7751 0 : if (_ptr_MachineName) {
7752 0 : NDR_PULL_ALLOC(ndr, r->in.MachineName);
7753 : } else {
7754 0 : r->in.MachineName = NULL;
7755 : }
7756 0 : if (r->in.MachineName) {
7757 0 : _mem_save_MachineName_0 = NDR_PULL_GET_MEM_CTX(ndr);
7758 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.MachineName, 0);
7759 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.MachineName));
7760 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.MachineName));
7761 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.MachineName, &size_MachineName_1));
7762 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.MachineName, &length_MachineName_1));
7763 0 : if (length_MachineName_1 > size_MachineName_1) {
7764 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_MachineName_1, length_MachineName_1);
7765 : }
7766 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_MachineName_1, sizeof(uint16_t)));
7767 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.MachineName, length_MachineName_1, sizeof(uint16_t), CH_UTF16));
7768 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_MachineName_0, 0);
7769 : }
7770 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DatabaseName));
7771 0 : if (_ptr_DatabaseName) {
7772 0 : NDR_PULL_ALLOC(ndr, r->in.DatabaseName);
7773 : } else {
7774 0 : r->in.DatabaseName = NULL;
7775 : }
7776 0 : if (r->in.DatabaseName) {
7777 0 : _mem_save_DatabaseName_0 = NDR_PULL_GET_MEM_CTX(ndr);
7778 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.DatabaseName, 0);
7779 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.DatabaseName));
7780 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.DatabaseName));
7781 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.DatabaseName, &size_DatabaseName_1));
7782 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.DatabaseName, &length_DatabaseName_1));
7783 0 : if (length_DatabaseName_1 > size_DatabaseName_1) {
7784 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_DatabaseName_1, length_DatabaseName_1);
7785 : }
7786 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_DatabaseName_1, sizeof(uint16_t)));
7787 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.DatabaseName, length_DatabaseName_1, sizeof(uint16_t), CH_UTF16));
7788 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DatabaseName_0, 0);
7789 : }
7790 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
7791 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
7792 0 : NDR_ZERO_STRUCTP(r->out.handle);
7793 : }
7794 0 : if (flags & NDR_OUT) {
7795 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
7796 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
7797 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7798 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
7799 : }
7800 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7801 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
7802 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
7803 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7804 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
7805 : }
7806 0 : return NDR_ERR_SUCCESS;
7807 : }
7808 :
7809 0 : _PUBLIC_ void ndr_print_svcctl_OpenSCManagerA(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_OpenSCManagerA *r)
7810 : {
7811 0 : ndr_print_struct(ndr, name, "svcctl_OpenSCManagerA");
7812 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7813 0 : ndr->depth++;
7814 0 : if (flags & NDR_SET_VALUES) {
7815 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7816 : }
7817 0 : if (flags & NDR_IN) {
7818 0 : ndr_print_struct(ndr, "in", "svcctl_OpenSCManagerA");
7819 0 : ndr->depth++;
7820 0 : ndr_print_ptr(ndr, "MachineName", r->in.MachineName);
7821 0 : ndr->depth++;
7822 0 : if (r->in.MachineName) {
7823 0 : ndr_print_string(ndr, "MachineName", r->in.MachineName);
7824 : }
7825 0 : ndr->depth--;
7826 0 : ndr_print_ptr(ndr, "DatabaseName", r->in.DatabaseName);
7827 0 : ndr->depth++;
7828 0 : if (r->in.DatabaseName) {
7829 0 : ndr_print_string(ndr, "DatabaseName", r->in.DatabaseName);
7830 : }
7831 0 : ndr->depth--;
7832 0 : ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
7833 0 : ndr->depth--;
7834 : }
7835 0 : if (flags & NDR_OUT) {
7836 0 : ndr_print_struct(ndr, "out", "svcctl_OpenSCManagerA");
7837 0 : ndr->depth++;
7838 0 : ndr_print_ptr(ndr, "handle", r->out.handle);
7839 0 : ndr->depth++;
7840 0 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
7841 0 : ndr->depth--;
7842 0 : ndr_print_WERROR(ndr, "result", r->out.result);
7843 0 : ndr->depth--;
7844 : }
7845 0 : ndr->depth--;
7846 : }
7847 :
7848 0 : static enum ndr_err_code ndr_push_svcctl_OpenServiceA(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_OpenServiceA *r)
7849 : {
7850 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7851 0 : if (flags & NDR_IN) {
7852 0 : if (r->in.scmanager_handle == NULL) {
7853 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7854 : }
7855 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
7856 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.ServiceName));
7857 0 : if (r->in.ServiceName) {
7858 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
7859 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7860 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
7861 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.ServiceName, ndr_charset_length(r->in.ServiceName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7862 : }
7863 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
7864 : }
7865 0 : if (flags & NDR_OUT) {
7866 0 : if (r->out.handle == NULL) {
7867 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7868 : }
7869 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
7870 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
7871 : }
7872 0 : return NDR_ERR_SUCCESS;
7873 : }
7874 :
7875 0 : static enum ndr_err_code ndr_pull_svcctl_OpenServiceA(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_OpenServiceA *r)
7876 : {
7877 0 : uint32_t _ptr_ServiceName;
7878 0 : uint32_t size_ServiceName_1 = 0;
7879 0 : uint32_t length_ServiceName_1 = 0;
7880 0 : TALLOC_CTX *_mem_save_scmanager_handle_0 = NULL;
7881 0 : TALLOC_CTX *_mem_save_ServiceName_0 = NULL;
7882 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
7883 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
7884 0 : if (flags & NDR_IN) {
7885 0 : NDR_ZERO_STRUCT(r->out);
7886 :
7887 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7888 0 : NDR_PULL_ALLOC(ndr, r->in.scmanager_handle);
7889 : }
7890 0 : _mem_save_scmanager_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7891 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager_handle, LIBNDR_FLAG_REF_ALLOC);
7892 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
7893 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_handle_0, LIBNDR_FLAG_REF_ALLOC);
7894 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ServiceName));
7895 0 : if (_ptr_ServiceName) {
7896 0 : NDR_PULL_ALLOC(ndr, r->in.ServiceName);
7897 : } else {
7898 0 : r->in.ServiceName = NULL;
7899 : }
7900 0 : if (r->in.ServiceName) {
7901 0 : _mem_save_ServiceName_0 = NDR_PULL_GET_MEM_CTX(ndr);
7902 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.ServiceName, 0);
7903 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.ServiceName));
7904 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.ServiceName));
7905 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.ServiceName, &size_ServiceName_1));
7906 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.ServiceName, &length_ServiceName_1));
7907 0 : if (length_ServiceName_1 > size_ServiceName_1) {
7908 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_ServiceName_1, length_ServiceName_1);
7909 : }
7910 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_ServiceName_1, sizeof(uint16_t)));
7911 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.ServiceName, length_ServiceName_1, sizeof(uint16_t), CH_UTF16));
7912 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ServiceName_0, 0);
7913 : }
7914 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
7915 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
7916 0 : NDR_ZERO_STRUCTP(r->out.handle);
7917 : }
7918 0 : if (flags & NDR_OUT) {
7919 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
7920 : if (r->in.scmanager_handle == NULL) {
7921 : NDR_PULL_ALLOC(ndr, r->in.scmanager_handle);
7922 : NDR_ZERO_STRUCTP(r->in.scmanager_handle);
7923 : }
7924 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
7925 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7926 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
7927 : }
7928 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7929 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
7930 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
7931 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7932 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
7933 : }
7934 0 : return NDR_ERR_SUCCESS;
7935 : }
7936 :
7937 0 : _PUBLIC_ void ndr_print_svcctl_OpenServiceA(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_OpenServiceA *r)
7938 : {
7939 0 : ndr_print_struct(ndr, name, "svcctl_OpenServiceA");
7940 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7941 0 : ndr->depth++;
7942 0 : if (flags & NDR_SET_VALUES) {
7943 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7944 : }
7945 0 : if (flags & NDR_IN) {
7946 0 : ndr_print_struct(ndr, "in", "svcctl_OpenServiceA");
7947 0 : ndr->depth++;
7948 0 : ndr_print_ptr(ndr, "scmanager_handle", r->in.scmanager_handle);
7949 0 : ndr->depth++;
7950 0 : ndr_print_policy_handle(ndr, "scmanager_handle", r->in.scmanager_handle);
7951 0 : ndr->depth--;
7952 0 : ndr_print_ptr(ndr, "ServiceName", r->in.ServiceName);
7953 0 : ndr->depth++;
7954 0 : if (r->in.ServiceName) {
7955 0 : ndr_print_string(ndr, "ServiceName", r->in.ServiceName);
7956 : }
7957 0 : ndr->depth--;
7958 0 : ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
7959 0 : ndr->depth--;
7960 : }
7961 0 : if (flags & NDR_OUT) {
7962 0 : ndr_print_struct(ndr, "out", "svcctl_OpenServiceA");
7963 0 : ndr->depth++;
7964 0 : ndr_print_ptr(ndr, "handle", r->out.handle);
7965 0 : ndr->depth++;
7966 0 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
7967 0 : ndr->depth--;
7968 0 : ndr_print_WERROR(ndr, "result", r->out.result);
7969 0 : ndr->depth--;
7970 : }
7971 0 : ndr->depth--;
7972 : }
7973 :
7974 0 : static enum ndr_err_code ndr_push_svcctl_QueryServiceConfigA(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_QueryServiceConfigA *r)
7975 : {
7976 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7977 0 : if (flags & NDR_IN) {
7978 0 : if (r->in.handle == NULL) {
7979 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7980 : }
7981 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7982 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
7983 : }
7984 0 : if (flags & NDR_OUT) {
7985 0 : if (r->out.needed == NULL) {
7986 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7987 : }
7988 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.query, r->in.offered));
7989 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
7990 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
7991 : }
7992 0 : return NDR_ERR_SUCCESS;
7993 : }
7994 :
7995 0 : static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfigA(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_QueryServiceConfigA *r)
7996 : {
7997 0 : uint32_t size_query_0 = 0;
7998 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
7999 0 : TALLOC_CTX *_mem_save_needed_0 = NULL;
8000 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8001 0 : if (flags & NDR_IN) {
8002 0 : NDR_ZERO_STRUCT(r->out);
8003 :
8004 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8005 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
8006 : }
8007 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8008 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8009 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8010 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8011 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
8012 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
8013 0 : NDR_ZERO_STRUCTP(r->out.needed);
8014 : }
8015 0 : if (flags & NDR_OUT) {
8016 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8017 : if (r->in.handle == NULL) {
8018 : NDR_PULL_ALLOC(ndr, r->in.handle);
8019 : NDR_ZERO_STRUCTP(r->in.handle);
8020 : }
8021 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8022 0 : size_query_0 = r->in.offered;
8023 0 : NDR_PULL_ALLOC_N(ndr, r->out.query, size_query_0);
8024 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.query, size_query_0));
8025 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8026 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
8027 : }
8028 0 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
8029 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
8030 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
8031 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
8032 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
8033 : }
8034 0 : return NDR_ERR_SUCCESS;
8035 : }
8036 :
8037 0 : _PUBLIC_ void ndr_print_svcctl_QueryServiceConfigA(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_QueryServiceConfigA *r)
8038 : {
8039 0 : ndr_print_struct(ndr, name, "svcctl_QueryServiceConfigA");
8040 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8041 0 : ndr->depth++;
8042 0 : if (flags & NDR_SET_VALUES) {
8043 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8044 : }
8045 0 : if (flags & NDR_IN) {
8046 0 : ndr_print_struct(ndr, "in", "svcctl_QueryServiceConfigA");
8047 0 : ndr->depth++;
8048 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
8049 0 : ndr->depth++;
8050 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
8051 0 : ndr->depth--;
8052 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
8053 0 : ndr->depth--;
8054 : }
8055 0 : if (flags & NDR_OUT) {
8056 0 : ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfigA");
8057 0 : ndr->depth++;
8058 0 : ndr_print_array_uint8(ndr, "query", r->out.query, r->in.offered);
8059 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
8060 0 : ndr->depth++;
8061 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
8062 0 : ndr->depth--;
8063 0 : ndr_print_WERROR(ndr, "result", r->out.result);
8064 0 : ndr->depth--;
8065 : }
8066 0 : ndr->depth--;
8067 : }
8068 :
8069 0 : static enum ndr_err_code ndr_push_svcctl_QueryServiceLockStatusA(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_QueryServiceLockStatusA *r)
8070 : {
8071 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8072 0 : if (flags & NDR_IN) {
8073 0 : if (r->in.handle == NULL) {
8074 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8075 : }
8076 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8077 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
8078 : }
8079 0 : if (flags & NDR_OUT) {
8080 0 : if (r->out.lock_status == NULL) {
8081 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8082 : }
8083 0 : if (r->out.needed == NULL) {
8084 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8085 : }
8086 0 : NDR_CHECK(ndr_push_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock_status));
8087 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
8088 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
8089 : }
8090 0 : return NDR_ERR_SUCCESS;
8091 : }
8092 :
8093 0 : static enum ndr_err_code ndr_pull_svcctl_QueryServiceLockStatusA(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_QueryServiceLockStatusA *r)
8094 : {
8095 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
8096 0 : TALLOC_CTX *_mem_save_lock_status_0 = NULL;
8097 0 : TALLOC_CTX *_mem_save_needed_0 = NULL;
8098 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8099 0 : if (flags & NDR_IN) {
8100 0 : NDR_ZERO_STRUCT(r->out);
8101 :
8102 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8103 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
8104 : }
8105 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8106 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8107 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8108 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8109 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
8110 0 : NDR_PULL_ALLOC(ndr, r->out.lock_status);
8111 0 : NDR_ZERO_STRUCTP(r->out.lock_status);
8112 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
8113 0 : NDR_ZERO_STRUCTP(r->out.needed);
8114 : }
8115 0 : if (flags & NDR_OUT) {
8116 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8117 : if (r->in.handle == NULL) {
8118 : NDR_PULL_ALLOC(ndr, r->in.handle);
8119 : NDR_ZERO_STRUCTP(r->in.handle);
8120 : }
8121 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8122 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8123 0 : NDR_PULL_ALLOC(ndr, r->out.lock_status);
8124 : }
8125 0 : _mem_save_lock_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
8126 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.lock_status, LIBNDR_FLAG_REF_ALLOC);
8127 0 : NDR_CHECK(ndr_pull_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock_status));
8128 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_status_0, LIBNDR_FLAG_REF_ALLOC);
8129 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8130 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
8131 : }
8132 0 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
8133 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
8134 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
8135 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
8136 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
8137 : }
8138 0 : return NDR_ERR_SUCCESS;
8139 : }
8140 :
8141 0 : _PUBLIC_ void ndr_print_svcctl_QueryServiceLockStatusA(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_QueryServiceLockStatusA *r)
8142 : {
8143 0 : ndr_print_struct(ndr, name, "svcctl_QueryServiceLockStatusA");
8144 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8145 0 : ndr->depth++;
8146 0 : if (flags & NDR_SET_VALUES) {
8147 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8148 : }
8149 0 : if (flags & NDR_IN) {
8150 0 : ndr_print_struct(ndr, "in", "svcctl_QueryServiceLockStatusA");
8151 0 : ndr->depth++;
8152 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
8153 0 : ndr->depth++;
8154 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
8155 0 : ndr->depth--;
8156 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
8157 0 : ndr->depth--;
8158 : }
8159 0 : if (flags & NDR_OUT) {
8160 0 : ndr_print_struct(ndr, "out", "svcctl_QueryServiceLockStatusA");
8161 0 : ndr->depth++;
8162 0 : ndr_print_ptr(ndr, "lock_status", r->out.lock_status);
8163 0 : ndr->depth++;
8164 0 : ndr_print_SERVICE_LOCK_STATUS(ndr, "lock_status", r->out.lock_status);
8165 0 : ndr->depth--;
8166 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
8167 0 : ndr->depth++;
8168 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
8169 0 : ndr->depth--;
8170 0 : ndr_print_WERROR(ndr, "result", r->out.result);
8171 0 : ndr->depth--;
8172 : }
8173 0 : ndr->depth--;
8174 : }
8175 :
8176 0 : static enum ndr_err_code ndr_push_svcctl_StartServiceA(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_StartServiceA *r)
8177 : {
8178 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8179 0 : if (flags & NDR_IN) {
8180 0 : if (r->in.handle == NULL) {
8181 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8182 : }
8183 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8184 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.NumArgs));
8185 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Arguments));
8186 0 : if (r->in.Arguments) {
8187 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Arguments, CH_UTF16)));
8188 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8189 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Arguments, CH_UTF16)));
8190 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.Arguments, ndr_charset_length(r->in.Arguments, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8191 : }
8192 : }
8193 0 : if (flags & NDR_OUT) {
8194 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
8195 : }
8196 0 : return NDR_ERR_SUCCESS;
8197 : }
8198 :
8199 0 : static enum ndr_err_code ndr_pull_svcctl_StartServiceA(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_StartServiceA *r)
8200 : {
8201 0 : uint32_t _ptr_Arguments;
8202 0 : uint32_t size_Arguments_1 = 0;
8203 0 : uint32_t length_Arguments_1 = 0;
8204 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
8205 0 : TALLOC_CTX *_mem_save_Arguments_0 = NULL;
8206 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8207 0 : if (flags & NDR_IN) {
8208 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8209 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
8210 : }
8211 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8212 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8213 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8214 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8215 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.NumArgs));
8216 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Arguments));
8217 0 : if (_ptr_Arguments) {
8218 0 : NDR_PULL_ALLOC(ndr, r->in.Arguments);
8219 : } else {
8220 0 : r->in.Arguments = NULL;
8221 : }
8222 0 : if (r->in.Arguments) {
8223 0 : _mem_save_Arguments_0 = NDR_PULL_GET_MEM_CTX(ndr);
8224 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.Arguments, 0);
8225 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.Arguments));
8226 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.Arguments));
8227 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.Arguments, &size_Arguments_1));
8228 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.Arguments, &length_Arguments_1));
8229 0 : if (length_Arguments_1 > size_Arguments_1) {
8230 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_Arguments_1, length_Arguments_1);
8231 : }
8232 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_Arguments_1, sizeof(uint16_t)));
8233 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.Arguments, length_Arguments_1, sizeof(uint16_t), CH_UTF16));
8234 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Arguments_0, 0);
8235 : }
8236 : }
8237 0 : if (flags & NDR_OUT) {
8238 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8239 : if (r->in.handle == NULL) {
8240 : NDR_PULL_ALLOC(ndr, r->in.handle);
8241 : NDR_ZERO_STRUCTP(r->in.handle);
8242 : }
8243 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8244 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
8245 : }
8246 0 : return NDR_ERR_SUCCESS;
8247 : }
8248 :
8249 0 : _PUBLIC_ void ndr_print_svcctl_StartServiceA(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_StartServiceA *r)
8250 : {
8251 0 : ndr_print_struct(ndr, name, "svcctl_StartServiceA");
8252 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8253 0 : ndr->depth++;
8254 0 : if (flags & NDR_SET_VALUES) {
8255 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8256 : }
8257 0 : if (flags & NDR_IN) {
8258 0 : ndr_print_struct(ndr, "in", "svcctl_StartServiceA");
8259 0 : ndr->depth++;
8260 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
8261 0 : ndr->depth++;
8262 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
8263 0 : ndr->depth--;
8264 0 : ndr_print_uint32(ndr, "NumArgs", r->in.NumArgs);
8265 0 : ndr_print_ptr(ndr, "Arguments", r->in.Arguments);
8266 0 : ndr->depth++;
8267 0 : if (r->in.Arguments) {
8268 0 : ndr_print_string(ndr, "Arguments", r->in.Arguments);
8269 : }
8270 0 : ndr->depth--;
8271 0 : ndr->depth--;
8272 : }
8273 0 : if (flags & NDR_OUT) {
8274 0 : ndr_print_struct(ndr, "out", "svcctl_StartServiceA");
8275 0 : ndr->depth++;
8276 0 : ndr_print_WERROR(ndr, "result", r->out.result);
8277 0 : ndr->depth--;
8278 : }
8279 0 : ndr->depth--;
8280 : }
8281 :
8282 0 : static enum ndr_err_code ndr_push_svcctl_GetServiceDisplayNameA(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_GetServiceDisplayNameA *r)
8283 : {
8284 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8285 0 : if (flags & NDR_IN) {
8286 0 : if (r->in.handle == NULL) {
8287 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8288 : }
8289 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8290 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name));
8291 0 : if (r->in.service_name) {
8292 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
8293 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8294 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
8295 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.service_name, ndr_charset_length(r->in.service_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8296 : }
8297 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name_length));
8298 0 : if (r->in.display_name_length) {
8299 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.display_name_length));
8300 : }
8301 : }
8302 0 : if (flags & NDR_OUT) {
8303 0 : if (r->out.display_name == NULL) {
8304 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8305 : }
8306 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.display_name));
8307 0 : if (*r->out.display_name) {
8308 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16)));
8309 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8310 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16)));
8311 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.display_name, ndr_charset_length(*r->out.display_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8312 : }
8313 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length));
8314 0 : if (r->out.display_name_length) {
8315 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length));
8316 : }
8317 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
8318 : }
8319 0 : return NDR_ERR_SUCCESS;
8320 : }
8321 :
8322 0 : static enum ndr_err_code ndr_pull_svcctl_GetServiceDisplayNameA(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_GetServiceDisplayNameA *r)
8323 : {
8324 0 : uint32_t _ptr_service_name;
8325 0 : uint32_t size_service_name_1 = 0;
8326 0 : uint32_t length_service_name_1 = 0;
8327 0 : uint32_t _ptr_display_name;
8328 0 : uint32_t size_display_name_2 = 0;
8329 0 : uint32_t length_display_name_2 = 0;
8330 0 : uint32_t _ptr_display_name_length;
8331 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
8332 0 : TALLOC_CTX *_mem_save_service_name_0 = NULL;
8333 0 : TALLOC_CTX *_mem_save_display_name_0 = NULL;
8334 0 : TALLOC_CTX *_mem_save_display_name_1 = NULL;
8335 0 : TALLOC_CTX *_mem_save_display_name_length_0 = NULL;
8336 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8337 0 : if (flags & NDR_IN) {
8338 0 : NDR_ZERO_STRUCT(r->out);
8339 :
8340 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8341 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
8342 : }
8343 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8344 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8345 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8346 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8347 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
8348 0 : if (_ptr_service_name) {
8349 0 : NDR_PULL_ALLOC(ndr, r->in.service_name);
8350 : } else {
8351 0 : r->in.service_name = NULL;
8352 : }
8353 0 : if (r->in.service_name) {
8354 0 : _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8355 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.service_name, 0);
8356 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_name));
8357 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_name));
8358 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.service_name, &size_service_name_1));
8359 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.service_name, &length_service_name_1));
8360 0 : if (length_service_name_1 > size_service_name_1) {
8361 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_service_name_1, length_service_name_1);
8362 : }
8363 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_service_name_1, sizeof(uint16_t)));
8364 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_name, length_service_name_1, sizeof(uint16_t), CH_UTF16));
8365 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
8366 : }
8367 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
8368 0 : if (_ptr_display_name_length) {
8369 0 : NDR_PULL_ALLOC(ndr, r->in.display_name_length);
8370 : } else {
8371 0 : r->in.display_name_length = NULL;
8372 : }
8373 0 : if (r->in.display_name_length) {
8374 0 : _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
8375 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name_length, 0);
8376 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.display_name_length));
8377 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
8378 : }
8379 0 : NDR_PULL_ALLOC(ndr, r->out.display_name);
8380 0 : NDR_ZERO_STRUCTP(r->out.display_name);
8381 : }
8382 0 : if (flags & NDR_OUT) {
8383 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8384 : if (r->in.handle == NULL) {
8385 : NDR_PULL_ALLOC(ndr, r->in.handle);
8386 : NDR_ZERO_STRUCTP(r->in.handle);
8387 : }
8388 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8389 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8390 0 : NDR_PULL_ALLOC(ndr, r->out.display_name);
8391 : }
8392 0 : _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8393 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name, LIBNDR_FLAG_REF_ALLOC);
8394 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
8395 0 : if (_ptr_display_name) {
8396 0 : NDR_PULL_ALLOC(ndr, *r->out.display_name);
8397 : } else {
8398 0 : *r->out.display_name = NULL;
8399 : }
8400 0 : if (*r->out.display_name) {
8401 0 : _mem_save_display_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
8402 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.display_name, 0);
8403 0 : NDR_CHECK(ndr_pull_array_size(ndr, r->out.display_name));
8404 0 : NDR_CHECK(ndr_pull_array_length(ndr, r->out.display_name));
8405 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)r->out.display_name, &size_display_name_2));
8406 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)r->out.display_name, &length_display_name_2));
8407 0 : if (length_display_name_2 > size_display_name_2) {
8408 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_display_name_2, length_display_name_2);
8409 : }
8410 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_display_name_2, sizeof(uint16_t)));
8411 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.display_name, length_display_name_2, sizeof(uint16_t), CH_UTF16));
8412 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_1, 0);
8413 : }
8414 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, LIBNDR_FLAG_REF_ALLOC);
8415 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
8416 0 : if (_ptr_display_name_length) {
8417 0 : NDR_PULL_ALLOC(ndr, r->out.display_name_length);
8418 : } else {
8419 0 : r->out.display_name_length = NULL;
8420 : }
8421 0 : if (r->out.display_name_length) {
8422 0 : _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
8423 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name_length, 0);
8424 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.display_name_length));
8425 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
8426 : }
8427 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
8428 : }
8429 0 : return NDR_ERR_SUCCESS;
8430 : }
8431 :
8432 0 : _PUBLIC_ void ndr_print_svcctl_GetServiceDisplayNameA(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_GetServiceDisplayNameA *r)
8433 : {
8434 0 : ndr_print_struct(ndr, name, "svcctl_GetServiceDisplayNameA");
8435 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8436 0 : ndr->depth++;
8437 0 : if (flags & NDR_SET_VALUES) {
8438 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8439 : }
8440 0 : if (flags & NDR_IN) {
8441 0 : ndr_print_struct(ndr, "in", "svcctl_GetServiceDisplayNameA");
8442 0 : ndr->depth++;
8443 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
8444 0 : ndr->depth++;
8445 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
8446 0 : ndr->depth--;
8447 0 : ndr_print_ptr(ndr, "service_name", r->in.service_name);
8448 0 : ndr->depth++;
8449 0 : if (r->in.service_name) {
8450 0 : ndr_print_string(ndr, "service_name", r->in.service_name);
8451 : }
8452 0 : ndr->depth--;
8453 0 : ndr_print_ptr(ndr, "display_name_length", r->in.display_name_length);
8454 0 : ndr->depth++;
8455 0 : if (r->in.display_name_length) {
8456 0 : ndr_print_uint32(ndr, "display_name_length", *r->in.display_name_length);
8457 : }
8458 0 : ndr->depth--;
8459 0 : ndr->depth--;
8460 : }
8461 0 : if (flags & NDR_OUT) {
8462 0 : ndr_print_struct(ndr, "out", "svcctl_GetServiceDisplayNameA");
8463 0 : ndr->depth++;
8464 0 : ndr_print_ptr(ndr, "display_name", r->out.display_name);
8465 0 : ndr->depth++;
8466 0 : ndr_print_ptr(ndr, "display_name", *r->out.display_name);
8467 0 : ndr->depth++;
8468 0 : if (*r->out.display_name) {
8469 0 : ndr_print_string(ndr, "display_name", *r->out.display_name);
8470 : }
8471 0 : ndr->depth--;
8472 0 : ndr->depth--;
8473 0 : ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length);
8474 0 : ndr->depth++;
8475 0 : if (r->out.display_name_length) {
8476 0 : ndr_print_uint32(ndr, "display_name_length", *r->out.display_name_length);
8477 : }
8478 0 : ndr->depth--;
8479 0 : ndr_print_WERROR(ndr, "result", r->out.result);
8480 0 : ndr->depth--;
8481 : }
8482 0 : ndr->depth--;
8483 : }
8484 :
8485 0 : static enum ndr_err_code ndr_push_svcctl_GetServiceKeyNameA(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_GetServiceKeyNameA *r)
8486 : {
8487 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8488 0 : if (flags & NDR_IN) {
8489 0 : if (r->in.handle == NULL) {
8490 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8491 : }
8492 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8493 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name));
8494 0 : if (r->in.service_name) {
8495 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
8496 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8497 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
8498 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.service_name, ndr_charset_length(r->in.service_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8499 : }
8500 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name_length));
8501 0 : if (r->in.display_name_length) {
8502 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.display_name_length));
8503 : }
8504 : }
8505 0 : if (flags & NDR_OUT) {
8506 0 : if (r->out.key_name == NULL) {
8507 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8508 : }
8509 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.key_name));
8510 0 : if (*r->out.key_name) {
8511 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16)));
8512 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8513 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16)));
8514 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.key_name, ndr_charset_length(*r->out.key_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8515 : }
8516 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length));
8517 0 : if (r->out.display_name_length) {
8518 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length));
8519 : }
8520 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
8521 : }
8522 0 : return NDR_ERR_SUCCESS;
8523 : }
8524 :
8525 0 : static enum ndr_err_code ndr_pull_svcctl_GetServiceKeyNameA(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_GetServiceKeyNameA *r)
8526 : {
8527 0 : uint32_t _ptr_service_name;
8528 0 : uint32_t size_service_name_1 = 0;
8529 0 : uint32_t length_service_name_1 = 0;
8530 0 : uint32_t _ptr_key_name;
8531 0 : uint32_t size_key_name_2 = 0;
8532 0 : uint32_t length_key_name_2 = 0;
8533 0 : uint32_t _ptr_display_name_length;
8534 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
8535 0 : TALLOC_CTX *_mem_save_service_name_0 = NULL;
8536 0 : TALLOC_CTX *_mem_save_key_name_0 = NULL;
8537 0 : TALLOC_CTX *_mem_save_key_name_1 = NULL;
8538 0 : TALLOC_CTX *_mem_save_display_name_length_0 = NULL;
8539 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8540 0 : if (flags & NDR_IN) {
8541 0 : NDR_ZERO_STRUCT(r->out);
8542 :
8543 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8544 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
8545 : }
8546 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8547 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8548 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8549 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8550 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
8551 0 : if (_ptr_service_name) {
8552 0 : NDR_PULL_ALLOC(ndr, r->in.service_name);
8553 : } else {
8554 0 : r->in.service_name = NULL;
8555 : }
8556 0 : if (r->in.service_name) {
8557 0 : _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8558 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.service_name, 0);
8559 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_name));
8560 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_name));
8561 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.service_name, &size_service_name_1));
8562 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.service_name, &length_service_name_1));
8563 0 : if (length_service_name_1 > size_service_name_1) {
8564 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_service_name_1, length_service_name_1);
8565 : }
8566 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_service_name_1, sizeof(uint16_t)));
8567 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_name, length_service_name_1, sizeof(uint16_t), CH_UTF16));
8568 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
8569 : }
8570 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
8571 0 : if (_ptr_display_name_length) {
8572 0 : NDR_PULL_ALLOC(ndr, r->in.display_name_length);
8573 : } else {
8574 0 : r->in.display_name_length = NULL;
8575 : }
8576 0 : if (r->in.display_name_length) {
8577 0 : _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
8578 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name_length, 0);
8579 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.display_name_length));
8580 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
8581 : }
8582 0 : NDR_PULL_ALLOC(ndr, r->out.key_name);
8583 0 : NDR_ZERO_STRUCTP(r->out.key_name);
8584 : }
8585 0 : if (flags & NDR_OUT) {
8586 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8587 : if (r->in.handle == NULL) {
8588 : NDR_PULL_ALLOC(ndr, r->in.handle);
8589 : NDR_ZERO_STRUCTP(r->in.handle);
8590 : }
8591 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8592 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8593 0 : NDR_PULL_ALLOC(ndr, r->out.key_name);
8594 : }
8595 0 : _mem_save_key_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
8596 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.key_name, LIBNDR_FLAG_REF_ALLOC);
8597 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_key_name));
8598 0 : if (_ptr_key_name) {
8599 0 : NDR_PULL_ALLOC(ndr, *r->out.key_name);
8600 : } else {
8601 0 : *r->out.key_name = NULL;
8602 : }
8603 0 : if (*r->out.key_name) {
8604 0 : _mem_save_key_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
8605 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.key_name, 0);
8606 0 : NDR_CHECK(ndr_pull_array_size(ndr, r->out.key_name));
8607 0 : NDR_CHECK(ndr_pull_array_length(ndr, r->out.key_name));
8608 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)r->out.key_name, &size_key_name_2));
8609 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)r->out.key_name, &length_key_name_2));
8610 0 : if (length_key_name_2 > size_key_name_2) {
8611 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_key_name_2, length_key_name_2);
8612 : }
8613 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_key_name_2, sizeof(uint16_t)));
8614 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.key_name, length_key_name_2, sizeof(uint16_t), CH_UTF16));
8615 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_name_1, 0);
8616 : }
8617 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_name_0, LIBNDR_FLAG_REF_ALLOC);
8618 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
8619 0 : if (_ptr_display_name_length) {
8620 0 : NDR_PULL_ALLOC(ndr, r->out.display_name_length);
8621 : } else {
8622 0 : r->out.display_name_length = NULL;
8623 : }
8624 0 : if (r->out.display_name_length) {
8625 0 : _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
8626 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name_length, 0);
8627 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.display_name_length));
8628 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
8629 : }
8630 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
8631 : }
8632 0 : return NDR_ERR_SUCCESS;
8633 : }
8634 :
8635 0 : _PUBLIC_ void ndr_print_svcctl_GetServiceKeyNameA(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_GetServiceKeyNameA *r)
8636 : {
8637 0 : ndr_print_struct(ndr, name, "svcctl_GetServiceKeyNameA");
8638 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8639 0 : ndr->depth++;
8640 0 : if (flags & NDR_SET_VALUES) {
8641 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8642 : }
8643 0 : if (flags & NDR_IN) {
8644 0 : ndr_print_struct(ndr, "in", "svcctl_GetServiceKeyNameA");
8645 0 : ndr->depth++;
8646 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
8647 0 : ndr->depth++;
8648 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
8649 0 : ndr->depth--;
8650 0 : ndr_print_ptr(ndr, "service_name", r->in.service_name);
8651 0 : ndr->depth++;
8652 0 : if (r->in.service_name) {
8653 0 : ndr_print_string(ndr, "service_name", r->in.service_name);
8654 : }
8655 0 : ndr->depth--;
8656 0 : ndr_print_ptr(ndr, "display_name_length", r->in.display_name_length);
8657 0 : ndr->depth++;
8658 0 : if (r->in.display_name_length) {
8659 0 : ndr_print_uint32(ndr, "display_name_length", *r->in.display_name_length);
8660 : }
8661 0 : ndr->depth--;
8662 0 : ndr->depth--;
8663 : }
8664 0 : if (flags & NDR_OUT) {
8665 0 : ndr_print_struct(ndr, "out", "svcctl_GetServiceKeyNameA");
8666 0 : ndr->depth++;
8667 0 : ndr_print_ptr(ndr, "key_name", r->out.key_name);
8668 0 : ndr->depth++;
8669 0 : ndr_print_ptr(ndr, "key_name", *r->out.key_name);
8670 0 : ndr->depth++;
8671 0 : if (*r->out.key_name) {
8672 0 : ndr_print_string(ndr, "key_name", *r->out.key_name);
8673 : }
8674 0 : ndr->depth--;
8675 0 : ndr->depth--;
8676 0 : ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length);
8677 0 : ndr->depth++;
8678 0 : if (r->out.display_name_length) {
8679 0 : ndr_print_uint32(ndr, "display_name_length", *r->out.display_name_length);
8680 : }
8681 0 : ndr->depth--;
8682 0 : ndr_print_WERROR(ndr, "result", r->out.result);
8683 0 : ndr->depth--;
8684 : }
8685 0 : ndr->depth--;
8686 : }
8687 :
8688 0 : static enum ndr_err_code ndr_push_svcctl_GetCurrentGroupeStateW(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_GetCurrentGroupeStateW *r)
8689 : {
8690 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8691 0 : if (flags & NDR_IN) {
8692 0 : }
8693 0 : if (flags & NDR_OUT) {
8694 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
8695 : }
8696 0 : return NDR_ERR_SUCCESS;
8697 : }
8698 :
8699 0 : static enum ndr_err_code ndr_pull_svcctl_GetCurrentGroupeStateW(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_GetCurrentGroupeStateW *r)
8700 : {
8701 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8702 0 : if (flags & NDR_IN) {
8703 0 : }
8704 0 : if (flags & NDR_OUT) {
8705 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8706 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8707 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
8708 : }
8709 0 : return NDR_ERR_SUCCESS;
8710 : }
8711 :
8712 0 : _PUBLIC_ void ndr_print_svcctl_GetCurrentGroupeStateW(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_GetCurrentGroupeStateW *r)
8713 : {
8714 0 : ndr_print_struct(ndr, name, "svcctl_GetCurrentGroupeStateW");
8715 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8716 0 : ndr->depth++;
8717 0 : if (flags & NDR_SET_VALUES) {
8718 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8719 : }
8720 0 : if (flags & NDR_IN) {
8721 0 : ndr_print_struct(ndr, "in", "svcctl_GetCurrentGroupeStateW");
8722 0 : ndr->depth++;
8723 0 : ndr->depth--;
8724 : }
8725 0 : if (flags & NDR_OUT) {
8726 0 : ndr_print_struct(ndr, "out", "svcctl_GetCurrentGroupeStateW");
8727 0 : ndr->depth++;
8728 0 : ndr_print_WERROR(ndr, "result", r->out.result);
8729 0 : ndr->depth--;
8730 : }
8731 0 : ndr->depth--;
8732 : }
8733 :
8734 0 : static enum ndr_err_code ndr_push_svcctl_EnumServiceGroupW(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_EnumServiceGroupW *r)
8735 : {
8736 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8737 0 : if (flags & NDR_IN) {
8738 0 : }
8739 0 : if (flags & NDR_OUT) {
8740 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
8741 : }
8742 0 : return NDR_ERR_SUCCESS;
8743 : }
8744 :
8745 0 : static enum ndr_err_code ndr_pull_svcctl_EnumServiceGroupW(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_EnumServiceGroupW *r)
8746 : {
8747 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8748 0 : if (flags & NDR_IN) {
8749 0 : }
8750 0 : if (flags & NDR_OUT) {
8751 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8752 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8753 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
8754 : }
8755 0 : return NDR_ERR_SUCCESS;
8756 : }
8757 :
8758 0 : _PUBLIC_ void ndr_print_svcctl_EnumServiceGroupW(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_EnumServiceGroupW *r)
8759 : {
8760 0 : ndr_print_struct(ndr, name, "svcctl_EnumServiceGroupW");
8761 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8762 0 : ndr->depth++;
8763 0 : if (flags & NDR_SET_VALUES) {
8764 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8765 : }
8766 0 : if (flags & NDR_IN) {
8767 0 : ndr_print_struct(ndr, "in", "svcctl_EnumServiceGroupW");
8768 0 : ndr->depth++;
8769 0 : ndr->depth--;
8770 : }
8771 0 : if (flags & NDR_OUT) {
8772 0 : ndr_print_struct(ndr, "out", "svcctl_EnumServiceGroupW");
8773 0 : ndr->depth++;
8774 0 : ndr_print_WERROR(ndr, "result", r->out.result);
8775 0 : ndr->depth--;
8776 : }
8777 0 : ndr->depth--;
8778 : }
8779 :
8780 0 : static enum ndr_err_code ndr_push_svcctl_ChangeServiceConfig2A(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_ChangeServiceConfig2A *r)
8781 : {
8782 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8783 0 : if (flags & NDR_IN) {
8784 0 : if (r->in.handle == NULL) {
8785 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8786 : }
8787 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8788 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
8789 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
8790 0 : if (r->in.info) {
8791 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->in.info));
8792 : }
8793 : }
8794 0 : if (flags & NDR_OUT) {
8795 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
8796 : }
8797 0 : return NDR_ERR_SUCCESS;
8798 : }
8799 :
8800 0 : static enum ndr_err_code ndr_pull_svcctl_ChangeServiceConfig2A(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_ChangeServiceConfig2A *r)
8801 : {
8802 0 : uint32_t _ptr_info;
8803 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
8804 0 : TALLOC_CTX *_mem_save_info_0 = NULL;
8805 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8806 0 : if (flags & NDR_IN) {
8807 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8808 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
8809 : }
8810 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8811 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8812 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8813 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8814 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
8815 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
8816 0 : if (_ptr_info) {
8817 0 : NDR_PULL_ALLOC(ndr, r->in.info);
8818 : } else {
8819 0 : r->in.info = NULL;
8820 : }
8821 0 : if (r->in.info) {
8822 0 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
8823 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
8824 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->in.info));
8825 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
8826 : }
8827 : }
8828 0 : if (flags & NDR_OUT) {
8829 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8830 : if (r->in.handle == NULL) {
8831 : NDR_PULL_ALLOC(ndr, r->in.handle);
8832 : NDR_ZERO_STRUCTP(r->in.handle);
8833 : }
8834 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8835 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
8836 : }
8837 0 : return NDR_ERR_SUCCESS;
8838 : }
8839 :
8840 0 : _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfig2A(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_ChangeServiceConfig2A *r)
8841 : {
8842 0 : ndr_print_struct(ndr, name, "svcctl_ChangeServiceConfig2A");
8843 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8844 0 : ndr->depth++;
8845 0 : if (flags & NDR_SET_VALUES) {
8846 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8847 : }
8848 0 : if (flags & NDR_IN) {
8849 0 : ndr_print_struct(ndr, "in", "svcctl_ChangeServiceConfig2A");
8850 0 : ndr->depth++;
8851 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
8852 0 : ndr->depth++;
8853 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
8854 0 : ndr->depth--;
8855 0 : ndr_print_uint32(ndr, "info_level", r->in.info_level);
8856 0 : ndr_print_ptr(ndr, "info", r->in.info);
8857 0 : ndr->depth++;
8858 0 : if (r->in.info) {
8859 0 : ndr_print_uint8(ndr, "info", *r->in.info);
8860 : }
8861 0 : ndr->depth--;
8862 0 : ndr->depth--;
8863 : }
8864 0 : if (flags & NDR_OUT) {
8865 0 : ndr_print_struct(ndr, "out", "svcctl_ChangeServiceConfig2A");
8866 0 : ndr->depth++;
8867 0 : ndr_print_WERROR(ndr, "result", r->out.result);
8868 0 : ndr->depth--;
8869 : }
8870 0 : ndr->depth--;
8871 : }
8872 :
8873 0 : static enum ndr_err_code ndr_push_svcctl_ChangeServiceConfig2W(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_ChangeServiceConfig2W *r)
8874 : {
8875 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8876 0 : if (flags & NDR_IN) {
8877 0 : if (r->in.handle == NULL) {
8878 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8879 : }
8880 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8881 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
8882 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
8883 0 : if (r->in.info) {
8884 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->in.info));
8885 : }
8886 : }
8887 0 : if (flags & NDR_OUT) {
8888 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
8889 : }
8890 0 : return NDR_ERR_SUCCESS;
8891 : }
8892 :
8893 0 : static enum ndr_err_code ndr_pull_svcctl_ChangeServiceConfig2W(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_ChangeServiceConfig2W *r)
8894 : {
8895 0 : uint32_t _ptr_info;
8896 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
8897 0 : TALLOC_CTX *_mem_save_info_0 = NULL;
8898 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8899 0 : if (flags & NDR_IN) {
8900 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8901 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
8902 : }
8903 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
8904 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
8905 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8906 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
8907 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
8908 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
8909 0 : if (_ptr_info) {
8910 0 : NDR_PULL_ALLOC(ndr, r->in.info);
8911 : } else {
8912 0 : r->in.info = NULL;
8913 : }
8914 0 : if (r->in.info) {
8915 0 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
8916 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
8917 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->in.info));
8918 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
8919 : }
8920 : }
8921 0 : if (flags & NDR_OUT) {
8922 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
8923 : if (r->in.handle == NULL) {
8924 : NDR_PULL_ALLOC(ndr, r->in.handle);
8925 : NDR_ZERO_STRUCTP(r->in.handle);
8926 : }
8927 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
8928 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
8929 : }
8930 0 : return NDR_ERR_SUCCESS;
8931 : }
8932 :
8933 0 : _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfig2W(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_ChangeServiceConfig2W *r)
8934 : {
8935 0 : ndr_print_struct(ndr, name, "svcctl_ChangeServiceConfig2W");
8936 0 : if (r == NULL) { ndr_print_null(ndr); return; }
8937 0 : ndr->depth++;
8938 0 : if (flags & NDR_SET_VALUES) {
8939 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
8940 : }
8941 0 : if (flags & NDR_IN) {
8942 0 : ndr_print_struct(ndr, "in", "svcctl_ChangeServiceConfig2W");
8943 0 : ndr->depth++;
8944 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
8945 0 : ndr->depth++;
8946 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
8947 0 : ndr->depth--;
8948 0 : ndr_print_uint32(ndr, "info_level", r->in.info_level);
8949 0 : ndr_print_ptr(ndr, "info", r->in.info);
8950 0 : ndr->depth++;
8951 0 : if (r->in.info) {
8952 0 : ndr_print_uint8(ndr, "info", *r->in.info);
8953 : }
8954 0 : ndr->depth--;
8955 0 : ndr->depth--;
8956 : }
8957 0 : if (flags & NDR_OUT) {
8958 0 : ndr_print_struct(ndr, "out", "svcctl_ChangeServiceConfig2W");
8959 0 : ndr->depth++;
8960 0 : ndr_print_WERROR(ndr, "result", r->out.result);
8961 0 : ndr->depth--;
8962 : }
8963 0 : ndr->depth--;
8964 : }
8965 :
8966 0 : static enum ndr_err_code ndr_push_svcctl_QueryServiceConfig2A(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_QueryServiceConfig2A *r)
8967 : {
8968 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
8969 0 : if (flags & NDR_IN) {
8970 0 : if (r->in.handle == NULL) {
8971 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8972 : }
8973 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
8974 0 : NDR_CHECK(ndr_push_svcctl_ConfigLevel(ndr, NDR_SCALARS, r->in.info_level));
8975 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
8976 : }
8977 0 : if (flags & NDR_OUT) {
8978 0 : if (r->out.needed == NULL) {
8979 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
8980 : }
8981 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
8982 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
8983 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
8984 : }
8985 0 : return NDR_ERR_SUCCESS;
8986 : }
8987 :
8988 0 : static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfig2A(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_QueryServiceConfig2A *r)
8989 : {
8990 0 : uint32_t size_buffer_0 = 0;
8991 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
8992 0 : TALLOC_CTX *_mem_save_needed_0 = NULL;
8993 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
8994 0 : if (flags & NDR_IN) {
8995 0 : NDR_ZERO_STRUCT(r->out);
8996 :
8997 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
8998 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
8999 : }
9000 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9001 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
9002 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9003 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
9004 0 : NDR_CHECK(ndr_pull_svcctl_ConfigLevel(ndr, NDR_SCALARS, &r->in.info_level));
9005 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
9006 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
9007 0 : NDR_ZERO_STRUCTP(r->out.needed);
9008 : }
9009 0 : if (flags & NDR_OUT) {
9010 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9011 : if (r->in.handle == NULL) {
9012 : NDR_PULL_ALLOC(ndr, r->in.handle);
9013 : NDR_ZERO_STRUCTP(r->in.handle);
9014 : }
9015 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9016 0 : size_buffer_0 = r->in.offered;
9017 0 : NDR_PULL_ALLOC_N(ndr, r->out.buffer, size_buffer_0);
9018 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, size_buffer_0));
9019 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9020 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
9021 : }
9022 0 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
9023 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
9024 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
9025 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
9026 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
9027 : }
9028 0 : return NDR_ERR_SUCCESS;
9029 : }
9030 :
9031 0 : _PUBLIC_ void ndr_print_svcctl_QueryServiceConfig2A(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_QueryServiceConfig2A *r)
9032 : {
9033 0 : ndr_print_struct(ndr, name, "svcctl_QueryServiceConfig2A");
9034 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9035 0 : ndr->depth++;
9036 0 : if (flags & NDR_SET_VALUES) {
9037 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9038 : }
9039 0 : if (flags & NDR_IN) {
9040 0 : ndr_print_struct(ndr, "in", "svcctl_QueryServiceConfig2A");
9041 0 : ndr->depth++;
9042 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
9043 0 : ndr->depth++;
9044 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
9045 0 : ndr->depth--;
9046 0 : ndr_print_svcctl_ConfigLevel(ndr, "info_level", r->in.info_level);
9047 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
9048 0 : ndr->depth--;
9049 : }
9050 0 : if (flags & NDR_OUT) {
9051 0 : ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfig2A");
9052 0 : ndr->depth++;
9053 0 : ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
9054 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
9055 0 : ndr->depth++;
9056 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
9057 0 : ndr->depth--;
9058 0 : ndr_print_WERROR(ndr, "result", r->out.result);
9059 0 : ndr->depth--;
9060 : }
9061 0 : ndr->depth--;
9062 : }
9063 :
9064 32 : static enum ndr_err_code ndr_push_svcctl_QueryServiceConfig2W(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_QueryServiceConfig2W *r)
9065 : {
9066 32 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9067 32 : if (flags & NDR_IN) {
9068 16 : if (r->in.handle == NULL) {
9069 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9070 : }
9071 16 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9072 16 : NDR_CHECK(ndr_push_svcctl_ConfigLevel(ndr, NDR_SCALARS, r->in.info_level));
9073 16 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
9074 : }
9075 32 : if (flags & NDR_OUT) {
9076 16 : if (r->out.buffer == NULL) {
9077 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9078 : }
9079 16 : if (r->out.needed == NULL) {
9080 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9081 : }
9082 16 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
9083 16 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
9084 16 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
9085 16 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
9086 : }
9087 32 : return NDR_ERR_SUCCESS;
9088 : }
9089 :
9090 32 : static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfig2W(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_QueryServiceConfig2W *r)
9091 : {
9092 32 : uint32_t size_buffer_1 = 0;
9093 32 : TALLOC_CTX *_mem_save_handle_0 = NULL;
9094 32 : TALLOC_CTX *_mem_save_needed_0 = NULL;
9095 32 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9096 32 : if (flags & NDR_IN) {
9097 16 : NDR_ZERO_STRUCT(r->out);
9098 :
9099 16 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9100 16 : NDR_PULL_ALLOC(ndr, r->in.handle);
9101 : }
9102 16 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9103 16 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
9104 16 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9105 16 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
9106 16 : NDR_CHECK(ndr_pull_svcctl_ConfigLevel(ndr, NDR_SCALARS, &r->in.info_level));
9107 16 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
9108 16 : if (r->in.offered > 8192) {
9109 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->in.offered), (uint32_t)(0), (uint32_t)(8192));
9110 : }
9111 16 : NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.offered);
9112 16 : memset(r->out.buffer, 0, (r->in.offered) * sizeof(*r->out.buffer));
9113 16 : NDR_PULL_ALLOC(ndr, r->out.needed);
9114 16 : NDR_ZERO_STRUCTP(r->out.needed);
9115 : }
9116 32 : if (flags & NDR_OUT) {
9117 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9118 : if (r->in.handle == NULL) {
9119 : NDR_PULL_ALLOC(ndr, r->in.handle);
9120 : NDR_ZERO_STRUCTP(r->in.handle);
9121 : }
9122 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9123 16 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
9124 16 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.buffer, &size_buffer_1));
9125 16 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9126 0 : NDR_PULL_ALLOC_N(ndr, r->out.buffer, size_buffer_1);
9127 : }
9128 16 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, size_buffer_1));
9129 16 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9130 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
9131 : }
9132 16 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
9133 16 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
9134 16 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
9135 16 : if (*r->out.needed > 8192) {
9136 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(*r->out.needed), (uint32_t)(0), (uint32_t)(8192));
9137 : }
9138 16 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
9139 16 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
9140 16 : if (r->out.buffer) {
9141 16 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.buffer, r->in.offered));
9142 : }
9143 : }
9144 32 : return NDR_ERR_SUCCESS;
9145 : }
9146 :
9147 0 : _PUBLIC_ void ndr_print_svcctl_QueryServiceConfig2W(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_QueryServiceConfig2W *r)
9148 : {
9149 0 : ndr_print_struct(ndr, name, "svcctl_QueryServiceConfig2W");
9150 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9151 0 : ndr->depth++;
9152 0 : if (flags & NDR_SET_VALUES) {
9153 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9154 : }
9155 0 : if (flags & NDR_IN) {
9156 0 : ndr_print_struct(ndr, "in", "svcctl_QueryServiceConfig2W");
9157 0 : ndr->depth++;
9158 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
9159 0 : ndr->depth++;
9160 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
9161 0 : ndr->depth--;
9162 0 : ndr_print_svcctl_ConfigLevel(ndr, "info_level", r->in.info_level);
9163 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
9164 0 : ndr->depth--;
9165 : }
9166 0 : if (flags & NDR_OUT) {
9167 0 : ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfig2W");
9168 0 : ndr->depth++;
9169 0 : ndr_print_ptr(ndr, "buffer", r->out.buffer);
9170 0 : ndr->depth++;
9171 0 : ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
9172 0 : ndr->depth--;
9173 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
9174 0 : ndr->depth++;
9175 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
9176 0 : ndr->depth--;
9177 0 : ndr_print_WERROR(ndr, "result", r->out.result);
9178 0 : ndr->depth--;
9179 : }
9180 0 : ndr->depth--;
9181 : }
9182 :
9183 16 : static enum ndr_err_code ndr_push_svcctl_QueryServiceStatusEx(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_QueryServiceStatusEx *r)
9184 : {
9185 16 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9186 16 : if (flags & NDR_IN) {
9187 8 : if (r->in.handle == NULL) {
9188 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9189 : }
9190 8 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9191 8 : NDR_CHECK(ndr_push_svcctl_StatusLevel(ndr, NDR_SCALARS, r->in.info_level));
9192 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
9193 : }
9194 16 : if (flags & NDR_OUT) {
9195 8 : if (r->out.buffer == NULL) {
9196 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9197 : }
9198 8 : if (r->out.needed == NULL) {
9199 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9200 : }
9201 8 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
9202 8 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
9203 8 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
9204 8 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
9205 : }
9206 16 : return NDR_ERR_SUCCESS;
9207 : }
9208 :
9209 16 : static enum ndr_err_code ndr_pull_svcctl_QueryServiceStatusEx(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_QueryServiceStatusEx *r)
9210 : {
9211 16 : uint32_t size_buffer_1 = 0;
9212 16 : TALLOC_CTX *_mem_save_handle_0 = NULL;
9213 16 : TALLOC_CTX *_mem_save_needed_0 = NULL;
9214 16 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9215 16 : if (flags & NDR_IN) {
9216 8 : NDR_ZERO_STRUCT(r->out);
9217 :
9218 8 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9219 8 : NDR_PULL_ALLOC(ndr, r->in.handle);
9220 : }
9221 8 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9222 8 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
9223 8 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
9224 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
9225 8 : NDR_CHECK(ndr_pull_svcctl_StatusLevel(ndr, NDR_SCALARS, &r->in.info_level));
9226 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
9227 8 : if (r->in.offered > 8192) {
9228 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->in.offered), (uint32_t)(0), (uint32_t)(8192));
9229 : }
9230 8 : NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.offered);
9231 8 : memset(r->out.buffer, 0, (r->in.offered) * sizeof(*r->out.buffer));
9232 8 : NDR_PULL_ALLOC(ndr, r->out.needed);
9233 8 : NDR_ZERO_STRUCTP(r->out.needed);
9234 : }
9235 16 : if (flags & NDR_OUT) {
9236 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9237 : if (r->in.handle == NULL) {
9238 : NDR_PULL_ALLOC(ndr, r->in.handle);
9239 : NDR_ZERO_STRUCTP(r->in.handle);
9240 : }
9241 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9242 8 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
9243 8 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.buffer, &size_buffer_1));
9244 8 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9245 0 : NDR_PULL_ALLOC_N(ndr, r->out.buffer, size_buffer_1);
9246 : }
9247 8 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, size_buffer_1));
9248 8 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9249 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
9250 : }
9251 8 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
9252 8 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
9253 8 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
9254 8 : if (*r->out.needed > 8192) {
9255 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(*r->out.needed), (uint32_t)(0), (uint32_t)(8192));
9256 : }
9257 8 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
9258 8 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
9259 8 : if (r->out.buffer) {
9260 8 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.buffer, r->in.offered));
9261 : }
9262 : }
9263 16 : return NDR_ERR_SUCCESS;
9264 : }
9265 :
9266 0 : _PUBLIC_ void ndr_print_svcctl_QueryServiceStatusEx(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_QueryServiceStatusEx *r)
9267 : {
9268 0 : ndr_print_struct(ndr, name, "svcctl_QueryServiceStatusEx");
9269 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9270 0 : ndr->depth++;
9271 0 : if (flags & NDR_SET_VALUES) {
9272 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9273 : }
9274 0 : if (flags & NDR_IN) {
9275 0 : ndr_print_struct(ndr, "in", "svcctl_QueryServiceStatusEx");
9276 0 : ndr->depth++;
9277 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
9278 0 : ndr->depth++;
9279 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
9280 0 : ndr->depth--;
9281 0 : ndr_print_svcctl_StatusLevel(ndr, "info_level", r->in.info_level);
9282 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
9283 0 : ndr->depth--;
9284 : }
9285 0 : if (flags & NDR_OUT) {
9286 0 : ndr_print_struct(ndr, "out", "svcctl_QueryServiceStatusEx");
9287 0 : ndr->depth++;
9288 0 : ndr_print_ptr(ndr, "buffer", r->out.buffer);
9289 0 : ndr->depth++;
9290 0 : ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
9291 0 : ndr->depth--;
9292 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
9293 0 : ndr->depth++;
9294 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
9295 0 : ndr->depth--;
9296 0 : ndr_print_WERROR(ndr, "result", r->out.result);
9297 0 : ndr->depth--;
9298 : }
9299 0 : ndr->depth--;
9300 : }
9301 :
9302 0 : static enum ndr_err_code ndr_push_svcctl_EnumServicesStatusExA(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_EnumServicesStatusExA *r)
9303 : {
9304 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9305 0 : if (flags & NDR_IN) {
9306 0 : if (r->in.scmanager == NULL) {
9307 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9308 : }
9309 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager));
9310 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
9311 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
9312 0 : NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
9313 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
9314 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
9315 0 : if (r->in.resume_handle) {
9316 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
9317 : }
9318 : }
9319 0 : if (flags & NDR_OUT) {
9320 0 : if (r->out.needed == NULL) {
9321 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9322 : }
9323 0 : if (r->out.service_returned == NULL) {
9324 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9325 : }
9326 0 : if (r->out.group_name == NULL) {
9327 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9328 : }
9329 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.services, r->in.offered));
9330 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
9331 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.service_returned));
9332 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
9333 0 : if (r->out.resume_handle) {
9334 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
9335 : }
9336 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.group_name));
9337 0 : if (*r->out.group_name) {
9338 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.group_name, CH_UTF16)));
9339 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9340 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.group_name, CH_UTF16)));
9341 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.group_name, ndr_charset_length(*r->out.group_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9342 : }
9343 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
9344 : }
9345 0 : return NDR_ERR_SUCCESS;
9346 : }
9347 :
9348 0 : static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusExA(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_EnumServicesStatusExA *r)
9349 : {
9350 0 : uint32_t size_services_0 = 0;
9351 0 : uint32_t _ptr_resume_handle;
9352 0 : uint32_t _ptr_group_name;
9353 0 : uint32_t size_group_name_2 = 0;
9354 0 : uint32_t length_group_name_2 = 0;
9355 0 : TALLOC_CTX *_mem_save_scmanager_0 = NULL;
9356 0 : TALLOC_CTX *_mem_save_needed_0 = NULL;
9357 0 : TALLOC_CTX *_mem_save_service_returned_0 = NULL;
9358 0 : TALLOC_CTX *_mem_save_resume_handle_0 = NULL;
9359 0 : TALLOC_CTX *_mem_save_group_name_0 = NULL;
9360 0 : TALLOC_CTX *_mem_save_group_name_1 = NULL;
9361 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9362 0 : if (flags & NDR_IN) {
9363 0 : NDR_ZERO_STRUCT(r->out);
9364 :
9365 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9366 0 : NDR_PULL_ALLOC(ndr, r->in.scmanager);
9367 : }
9368 0 : _mem_save_scmanager_0 = NDR_PULL_GET_MEM_CTX(ndr);
9369 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager, LIBNDR_FLAG_REF_ALLOC);
9370 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager));
9371 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_0, LIBNDR_FLAG_REF_ALLOC);
9372 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
9373 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
9374 0 : NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
9375 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
9376 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
9377 0 : if (_ptr_resume_handle) {
9378 0 : NDR_PULL_ALLOC(ndr, r->in.resume_handle);
9379 : } else {
9380 0 : r->in.resume_handle = NULL;
9381 : }
9382 0 : if (r->in.resume_handle) {
9383 0 : _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9384 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
9385 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
9386 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
9387 : }
9388 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
9389 0 : NDR_ZERO_STRUCTP(r->out.needed);
9390 0 : NDR_PULL_ALLOC(ndr, r->out.service_returned);
9391 0 : NDR_ZERO_STRUCTP(r->out.service_returned);
9392 0 : NDR_PULL_ALLOC(ndr, r->out.group_name);
9393 0 : NDR_ZERO_STRUCTP(r->out.group_name);
9394 : }
9395 0 : if (flags & NDR_OUT) {
9396 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9397 : if (r->in.scmanager == NULL) {
9398 : NDR_PULL_ALLOC(ndr, r->in.scmanager);
9399 : NDR_ZERO_STRUCTP(r->in.scmanager);
9400 : }
9401 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9402 0 : size_services_0 = r->in.offered;
9403 0 : NDR_PULL_ALLOC_N(ndr, r->out.services, size_services_0);
9404 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.services, size_services_0));
9405 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9406 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
9407 : }
9408 0 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
9409 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
9410 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
9411 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
9412 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9413 0 : NDR_PULL_ALLOC(ndr, r->out.service_returned);
9414 : }
9415 0 : _mem_save_service_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
9416 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.service_returned, LIBNDR_FLAG_REF_ALLOC);
9417 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.service_returned));
9418 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_returned_0, LIBNDR_FLAG_REF_ALLOC);
9419 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
9420 0 : if (_ptr_resume_handle) {
9421 0 : NDR_PULL_ALLOC(ndr, r->out.resume_handle);
9422 : } else {
9423 0 : r->out.resume_handle = NULL;
9424 : }
9425 0 : if (r->out.resume_handle) {
9426 0 : _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9427 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
9428 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
9429 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
9430 : }
9431 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9432 0 : NDR_PULL_ALLOC(ndr, r->out.group_name);
9433 : }
9434 0 : _mem_save_group_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9435 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.group_name, LIBNDR_FLAG_REF_ALLOC);
9436 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_name));
9437 0 : if (_ptr_group_name) {
9438 0 : NDR_PULL_ALLOC(ndr, *r->out.group_name);
9439 : } else {
9440 0 : *r->out.group_name = NULL;
9441 : }
9442 0 : if (*r->out.group_name) {
9443 0 : _mem_save_group_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
9444 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.group_name, 0);
9445 0 : NDR_CHECK(ndr_pull_array_size(ndr, r->out.group_name));
9446 0 : NDR_CHECK(ndr_pull_array_length(ndr, r->out.group_name));
9447 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)r->out.group_name, &size_group_name_2));
9448 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)r->out.group_name, &length_group_name_2));
9449 0 : if (length_group_name_2 > size_group_name_2) {
9450 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_group_name_2, length_group_name_2);
9451 : }
9452 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_group_name_2, sizeof(uint16_t)));
9453 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.group_name, length_group_name_2, sizeof(uint16_t), CH_UTF16));
9454 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_name_1, 0);
9455 : }
9456 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_name_0, LIBNDR_FLAG_REF_ALLOC);
9457 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
9458 : }
9459 0 : return NDR_ERR_SUCCESS;
9460 : }
9461 :
9462 0 : _PUBLIC_ void ndr_print_svcctl_EnumServicesStatusExA(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_EnumServicesStatusExA *r)
9463 : {
9464 0 : ndr_print_struct(ndr, name, "svcctl_EnumServicesStatusExA");
9465 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9466 0 : ndr->depth++;
9467 0 : if (flags & NDR_SET_VALUES) {
9468 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9469 : }
9470 0 : if (flags & NDR_IN) {
9471 0 : ndr_print_struct(ndr, "in", "svcctl_EnumServicesStatusExA");
9472 0 : ndr->depth++;
9473 0 : ndr_print_ptr(ndr, "scmanager", r->in.scmanager);
9474 0 : ndr->depth++;
9475 0 : ndr_print_policy_handle(ndr, "scmanager", r->in.scmanager);
9476 0 : ndr->depth--;
9477 0 : ndr_print_uint32(ndr, "info_level", r->in.info_level);
9478 0 : ndr_print_uint32(ndr, "type", r->in.type);
9479 0 : ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
9480 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
9481 0 : ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
9482 0 : ndr->depth++;
9483 0 : if (r->in.resume_handle) {
9484 0 : ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
9485 : }
9486 0 : ndr->depth--;
9487 0 : ndr->depth--;
9488 : }
9489 0 : if (flags & NDR_OUT) {
9490 0 : ndr_print_struct(ndr, "out", "svcctl_EnumServicesStatusExA");
9491 0 : ndr->depth++;
9492 0 : ndr_print_array_uint8(ndr, "services", r->out.services, r->in.offered);
9493 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
9494 0 : ndr->depth++;
9495 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
9496 0 : ndr->depth--;
9497 0 : ndr_print_ptr(ndr, "service_returned", r->out.service_returned);
9498 0 : ndr->depth++;
9499 0 : ndr_print_uint32(ndr, "service_returned", *r->out.service_returned);
9500 0 : ndr->depth--;
9501 0 : ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
9502 0 : ndr->depth++;
9503 0 : if (r->out.resume_handle) {
9504 0 : ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
9505 : }
9506 0 : ndr->depth--;
9507 0 : ndr_print_ptr(ndr, "group_name", r->out.group_name);
9508 0 : ndr->depth++;
9509 0 : ndr_print_ptr(ndr, "group_name", *r->out.group_name);
9510 0 : ndr->depth++;
9511 0 : if (*r->out.group_name) {
9512 0 : ndr_print_string(ndr, "group_name", *r->out.group_name);
9513 : }
9514 0 : ndr->depth--;
9515 0 : ndr->depth--;
9516 0 : ndr_print_WERROR(ndr, "result", r->out.result);
9517 0 : ndr->depth--;
9518 : }
9519 0 : ndr->depth--;
9520 : }
9521 :
9522 0 : static enum ndr_err_code ndr_push_svcctl_EnumServicesStatusExW(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_EnumServicesStatusExW *r)
9523 : {
9524 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9525 0 : if (flags & NDR_IN) {
9526 0 : if (r->in.scmanager == NULL) {
9527 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9528 : }
9529 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager));
9530 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
9531 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
9532 0 : NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
9533 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
9534 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
9535 0 : if (r->in.resume_handle) {
9536 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
9537 : }
9538 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.group_name));
9539 0 : if (r->in.group_name) {
9540 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.group_name, CH_UTF16)));
9541 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9542 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.group_name, CH_UTF16)));
9543 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.group_name, ndr_charset_length(r->in.group_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
9544 : }
9545 : }
9546 0 : if (flags & NDR_OUT) {
9547 0 : if (r->out.services == NULL) {
9548 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9549 : }
9550 0 : if (r->out.needed == NULL) {
9551 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9552 : }
9553 0 : if (r->out.service_returned == NULL) {
9554 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9555 : }
9556 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
9557 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.services, r->in.offered));
9558 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
9559 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.service_returned));
9560 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
9561 0 : if (r->out.resume_handle) {
9562 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
9563 : }
9564 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
9565 : }
9566 0 : return NDR_ERR_SUCCESS;
9567 : }
9568 :
9569 0 : static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusExW(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_EnumServicesStatusExW *r)
9570 : {
9571 0 : uint32_t size_services_1 = 0;
9572 0 : uint32_t _ptr_resume_handle;
9573 0 : uint32_t _ptr_group_name;
9574 0 : uint32_t size_group_name_1 = 0;
9575 0 : uint32_t length_group_name_1 = 0;
9576 0 : TALLOC_CTX *_mem_save_scmanager_0 = NULL;
9577 0 : TALLOC_CTX *_mem_save_needed_0 = NULL;
9578 0 : TALLOC_CTX *_mem_save_service_returned_0 = NULL;
9579 0 : TALLOC_CTX *_mem_save_resume_handle_0 = NULL;
9580 0 : TALLOC_CTX *_mem_save_group_name_0 = NULL;
9581 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9582 0 : if (flags & NDR_IN) {
9583 0 : NDR_ZERO_STRUCT(r->out);
9584 :
9585 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9586 0 : NDR_PULL_ALLOC(ndr, r->in.scmanager);
9587 : }
9588 0 : _mem_save_scmanager_0 = NDR_PULL_GET_MEM_CTX(ndr);
9589 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager, LIBNDR_FLAG_REF_ALLOC);
9590 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager));
9591 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_0, LIBNDR_FLAG_REF_ALLOC);
9592 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
9593 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
9594 0 : NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
9595 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
9596 0 : if (r->in.offered > 262144) {
9597 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->in.offered), (uint32_t)(0), (uint32_t)(262144));
9598 : }
9599 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
9600 0 : if (_ptr_resume_handle) {
9601 0 : NDR_PULL_ALLOC(ndr, r->in.resume_handle);
9602 : } else {
9603 0 : r->in.resume_handle = NULL;
9604 : }
9605 0 : if (r->in.resume_handle) {
9606 0 : _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9607 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
9608 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
9609 0 : if (*r->in.resume_handle > 262144) {
9610 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(*r->in.resume_handle), (uint32_t)(0), (uint32_t)(262144));
9611 : }
9612 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
9613 : }
9614 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_name));
9615 0 : if (_ptr_group_name) {
9616 0 : NDR_PULL_ALLOC(ndr, r->in.group_name);
9617 : } else {
9618 0 : r->in.group_name = NULL;
9619 : }
9620 0 : if (r->in.group_name) {
9621 0 : _mem_save_group_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
9622 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.group_name, 0);
9623 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.group_name));
9624 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.group_name));
9625 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.group_name, &size_group_name_1));
9626 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.group_name, &length_group_name_1));
9627 0 : if (length_group_name_1 > size_group_name_1) {
9628 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_group_name_1, length_group_name_1);
9629 : }
9630 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_group_name_1, sizeof(uint16_t)));
9631 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.group_name, length_group_name_1, sizeof(uint16_t), CH_UTF16));
9632 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_name_0, 0);
9633 : }
9634 0 : NDR_PULL_ALLOC_N(ndr, r->out.services, r->in.offered);
9635 0 : memset(r->out.services, 0, (r->in.offered) * sizeof(*r->out.services));
9636 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
9637 0 : NDR_ZERO_STRUCTP(r->out.needed);
9638 0 : NDR_PULL_ALLOC(ndr, r->out.service_returned);
9639 0 : NDR_ZERO_STRUCTP(r->out.service_returned);
9640 : }
9641 0 : if (flags & NDR_OUT) {
9642 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9643 : if (r->in.scmanager == NULL) {
9644 : NDR_PULL_ALLOC(ndr, r->in.scmanager);
9645 : NDR_ZERO_STRUCTP(r->in.scmanager);
9646 : }
9647 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9648 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.services));
9649 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.services, &size_services_1));
9650 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9651 0 : NDR_PULL_ALLOC_N(ndr, r->out.services, size_services_1);
9652 : }
9653 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.services, size_services_1));
9654 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9655 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
9656 : }
9657 0 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
9658 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
9659 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
9660 0 : if (*r->out.needed > 262144) {
9661 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(*r->out.needed), (uint32_t)(0), (uint32_t)(262144));
9662 : }
9663 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
9664 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
9665 0 : NDR_PULL_ALLOC(ndr, r->out.service_returned);
9666 : }
9667 0 : _mem_save_service_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
9668 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.service_returned, LIBNDR_FLAG_REF_ALLOC);
9669 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.service_returned));
9670 0 : if (*r->out.service_returned > 262144) {
9671 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(*r->out.service_returned), (uint32_t)(0), (uint32_t)(262144));
9672 : }
9673 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_returned_0, LIBNDR_FLAG_REF_ALLOC);
9674 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
9675 0 : if (_ptr_resume_handle) {
9676 0 : NDR_PULL_ALLOC(ndr, r->out.resume_handle);
9677 : } else {
9678 0 : r->out.resume_handle = NULL;
9679 : }
9680 0 : if (r->out.resume_handle) {
9681 0 : _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
9682 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
9683 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
9684 0 : if (*r->out.resume_handle > 262144) {
9685 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(*r->out.resume_handle), (uint32_t)(0), (uint32_t)(262144));
9686 : }
9687 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
9688 : }
9689 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
9690 0 : if (r->out.services) {
9691 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.services, r->in.offered));
9692 : }
9693 : }
9694 0 : return NDR_ERR_SUCCESS;
9695 : }
9696 :
9697 0 : _PUBLIC_ void ndr_print_svcctl_EnumServicesStatusExW(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_EnumServicesStatusExW *r)
9698 : {
9699 0 : ndr_print_struct(ndr, name, "svcctl_EnumServicesStatusExW");
9700 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9701 0 : ndr->depth++;
9702 0 : if (flags & NDR_SET_VALUES) {
9703 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9704 : }
9705 0 : if (flags & NDR_IN) {
9706 0 : ndr_print_struct(ndr, "in", "svcctl_EnumServicesStatusExW");
9707 0 : ndr->depth++;
9708 0 : ndr_print_ptr(ndr, "scmanager", r->in.scmanager);
9709 0 : ndr->depth++;
9710 0 : ndr_print_policy_handle(ndr, "scmanager", r->in.scmanager);
9711 0 : ndr->depth--;
9712 0 : ndr_print_uint32(ndr, "info_level", r->in.info_level);
9713 0 : ndr_print_uint32(ndr, "type", r->in.type);
9714 0 : ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
9715 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
9716 0 : ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
9717 0 : ndr->depth++;
9718 0 : if (r->in.resume_handle) {
9719 0 : ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
9720 : }
9721 0 : ndr->depth--;
9722 0 : ndr_print_ptr(ndr, "group_name", r->in.group_name);
9723 0 : ndr->depth++;
9724 0 : if (r->in.group_name) {
9725 0 : ndr_print_string(ndr, "group_name", r->in.group_name);
9726 : }
9727 0 : ndr->depth--;
9728 0 : ndr->depth--;
9729 : }
9730 0 : if (flags & NDR_OUT) {
9731 0 : ndr_print_struct(ndr, "out", "svcctl_EnumServicesStatusExW");
9732 0 : ndr->depth++;
9733 0 : ndr_print_ptr(ndr, "services", r->out.services);
9734 0 : ndr->depth++;
9735 0 : ndr_print_array_uint8(ndr, "services", r->out.services, r->in.offered);
9736 0 : ndr->depth--;
9737 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
9738 0 : ndr->depth++;
9739 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
9740 0 : ndr->depth--;
9741 0 : ndr_print_ptr(ndr, "service_returned", r->out.service_returned);
9742 0 : ndr->depth++;
9743 0 : ndr_print_uint32(ndr, "service_returned", *r->out.service_returned);
9744 0 : ndr->depth--;
9745 0 : ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
9746 0 : ndr->depth++;
9747 0 : if (r->out.resume_handle) {
9748 0 : ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
9749 : }
9750 0 : ndr->depth--;
9751 0 : ndr_print_WERROR(ndr, "result", r->out.result);
9752 0 : ndr->depth--;
9753 : }
9754 0 : ndr->depth--;
9755 : }
9756 :
9757 0 : static enum ndr_err_code ndr_push_svcctl_SCSendTSMessage(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_SCSendTSMessage *r)
9758 : {
9759 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9760 0 : if (flags & NDR_IN) {
9761 0 : }
9762 0 : if (flags & NDR_OUT) {
9763 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
9764 : }
9765 0 : return NDR_ERR_SUCCESS;
9766 : }
9767 :
9768 0 : static enum ndr_err_code ndr_pull_svcctl_SCSendTSMessage(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_SCSendTSMessage *r)
9769 : {
9770 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9771 0 : if (flags & NDR_IN) {
9772 0 : }
9773 0 : if (flags & NDR_OUT) {
9774 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
9775 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
9776 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
9777 : }
9778 0 : return NDR_ERR_SUCCESS;
9779 : }
9780 :
9781 0 : _PUBLIC_ void ndr_print_svcctl_SCSendTSMessage(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_SCSendTSMessage *r)
9782 : {
9783 0 : ndr_print_struct(ndr, name, "svcctl_SCSendTSMessage");
9784 0 : if (r == NULL) { ndr_print_null(ndr); return; }
9785 0 : ndr->depth++;
9786 0 : if (flags & NDR_SET_VALUES) {
9787 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
9788 : }
9789 0 : if (flags & NDR_IN) {
9790 0 : ndr_print_struct(ndr, "in", "svcctl_SCSendTSMessage");
9791 0 : ndr->depth++;
9792 0 : ndr->depth--;
9793 : }
9794 0 : if (flags & NDR_OUT) {
9795 0 : ndr_print_struct(ndr, "out", "svcctl_SCSendTSMessage");
9796 0 : ndr->depth++;
9797 0 : ndr_print_WERROR(ndr, "result", r->out.result);
9798 0 : ndr->depth--;
9799 : }
9800 0 : ndr->depth--;
9801 : }
9802 :
9803 0 : static enum ndr_err_code ndr_push_svcctl_CreateServiceWOW64A(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_CreateServiceWOW64A *r)
9804 : {
9805 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
9806 0 : if (flags & NDR_IN) {
9807 0 : if (r->in.lpServiceName == NULL) {
9808 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9809 : }
9810 0 : if (r->in.lpBinaryPathName == NULL) {
9811 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9812 : }
9813 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hSCManager));
9814 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.lpServiceName, CH_DOS)));
9815 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9816 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.lpServiceName, CH_DOS)));
9817 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.lpServiceName, ndr_charset_length(r->in.lpServiceName, CH_DOS), sizeof(uint8_t), CH_DOS));
9818 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lpDisplayName));
9819 0 : if (r->in.lpDisplayName) {
9820 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.lpDisplayName, CH_DOS)));
9821 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9822 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.lpDisplayName, CH_DOS)));
9823 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.lpDisplayName, ndr_charset_length(r->in.lpDisplayName, CH_DOS), sizeof(uint8_t), CH_DOS));
9824 : }
9825 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwDesiredAccess));
9826 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwServiceType));
9827 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwStartType));
9828 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwErrorControl));
9829 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.lpBinaryPathName, CH_DOS)));
9830 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9831 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.lpBinaryPathName, CH_DOS)));
9832 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.lpBinaryPathName, ndr_charset_length(r->in.lpBinaryPathName, CH_DOS), sizeof(uint8_t), CH_DOS));
9833 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lpLoadOrderGroup));
9834 0 : if (r->in.lpLoadOrderGroup) {
9835 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.lpLoadOrderGroup, CH_DOS)));
9836 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9837 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.lpLoadOrderGroup, CH_DOS)));
9838 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.lpLoadOrderGroup, ndr_charset_length(r->in.lpLoadOrderGroup, CH_DOS), sizeof(uint8_t), CH_DOS));
9839 : }
9840 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lpdwTagId));
9841 0 : if (r->in.lpdwTagId) {
9842 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.lpdwTagId));
9843 : }
9844 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lpDependencies));
9845 0 : if (r->in.lpDependencies) {
9846 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.dwDependSize));
9847 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.lpDependencies, r->in.dwDependSize));
9848 : }
9849 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwDependSize));
9850 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lpServiceStartName));
9851 0 : if (r->in.lpServiceStartName) {
9852 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.lpServiceStartName, CH_DOS)));
9853 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
9854 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.lpServiceStartName, CH_DOS)));
9855 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.lpServiceStartName, ndr_charset_length(r->in.lpServiceStartName, CH_DOS), sizeof(uint8_t), CH_DOS));
9856 : }
9857 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lpPassword));
9858 0 : if (r->in.lpPassword) {
9859 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.dwPwSize));
9860 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.lpPassword, r->in.dwPwSize));
9861 : }
9862 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwPwSize));
9863 : }
9864 0 : if (flags & NDR_OUT) {
9865 0 : if (r->out.lpServiceHandle == NULL) {
9866 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
9867 : }
9868 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.lpdwTagId));
9869 0 : if (r->out.lpdwTagId) {
9870 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.lpdwTagId));
9871 : }
9872 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.lpServiceHandle));
9873 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
9874 : }
9875 0 : return NDR_ERR_SUCCESS;
9876 : }
9877 :
9878 0 : static enum ndr_err_code ndr_pull_svcctl_CreateServiceWOW64A(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_CreateServiceWOW64A *r)
9879 : {
9880 0 : uint32_t size_lpServiceName_1 = 0;
9881 0 : uint32_t length_lpServiceName_1 = 0;
9882 0 : uint32_t _ptr_lpDisplayName;
9883 0 : uint32_t size_lpDisplayName_1 = 0;
9884 0 : uint32_t length_lpDisplayName_1 = 0;
9885 0 : uint32_t size_lpBinaryPathName_1 = 0;
9886 0 : uint32_t length_lpBinaryPathName_1 = 0;
9887 0 : uint32_t _ptr_lpLoadOrderGroup;
9888 0 : uint32_t size_lpLoadOrderGroup_1 = 0;
9889 0 : uint32_t length_lpLoadOrderGroup_1 = 0;
9890 0 : uint32_t _ptr_lpdwTagId;
9891 0 : uint32_t _ptr_lpDependencies;
9892 0 : uint32_t size_lpDependencies_1 = 0;
9893 0 : uint32_t _ptr_lpServiceStartName;
9894 0 : uint32_t size_lpServiceStartName_1 = 0;
9895 0 : uint32_t length_lpServiceStartName_1 = 0;
9896 0 : uint32_t _ptr_lpPassword;
9897 0 : uint32_t size_lpPassword_1 = 0;
9898 0 : TALLOC_CTX *_mem_save_lpDisplayName_0 = NULL;
9899 0 : TALLOC_CTX *_mem_save_lpLoadOrderGroup_0 = NULL;
9900 0 : TALLOC_CTX *_mem_save_lpdwTagId_0 = NULL;
9901 0 : TALLOC_CTX *_mem_save_lpDependencies_0 = NULL;
9902 0 : TALLOC_CTX *_mem_save_lpServiceStartName_0 = NULL;
9903 0 : TALLOC_CTX *_mem_save_lpPassword_0 = NULL;
9904 0 : TALLOC_CTX *_mem_save_lpServiceHandle_0 = NULL;
9905 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
9906 0 : if (flags & NDR_IN) {
9907 0 : NDR_ZERO_STRUCT(r->out);
9908 :
9909 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hSCManager));
9910 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.lpServiceName));
9911 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.lpServiceName));
9912 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.lpServiceName, &size_lpServiceName_1));
9913 0 : if (size_lpServiceName_1 > SC_MAX_NAME_LENGTH) {
9914 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_lpServiceName_1, (uint32_t)(0), (uint32_t)(SC_MAX_NAME_LENGTH));
9915 : }
9916 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.lpServiceName, &length_lpServiceName_1));
9917 0 : if (length_lpServiceName_1 > SC_MAX_NAME_LENGTH) {
9918 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_lpServiceName_1, (uint32_t)(0), (uint32_t)(SC_MAX_NAME_LENGTH));
9919 : }
9920 0 : if (length_lpServiceName_1 > size_lpServiceName_1) {
9921 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_lpServiceName_1, length_lpServiceName_1);
9922 : }
9923 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_lpServiceName_1, sizeof(uint8_t)));
9924 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.lpServiceName, length_lpServiceName_1, sizeof(uint8_t), CH_DOS));
9925 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lpDisplayName));
9926 0 : if (_ptr_lpDisplayName) {
9927 0 : NDR_PULL_ALLOC(ndr, r->in.lpDisplayName);
9928 : } else {
9929 0 : r->in.lpDisplayName = NULL;
9930 : }
9931 0 : if (r->in.lpDisplayName) {
9932 0 : _mem_save_lpDisplayName_0 = NDR_PULL_GET_MEM_CTX(ndr);
9933 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.lpDisplayName, 0);
9934 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.lpDisplayName));
9935 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.lpDisplayName));
9936 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.lpDisplayName, &size_lpDisplayName_1));
9937 0 : if (size_lpDisplayName_1 > SC_MAX_NAME_LENGTH) {
9938 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_lpDisplayName_1, (uint32_t)(0), (uint32_t)(SC_MAX_NAME_LENGTH));
9939 : }
9940 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.lpDisplayName, &length_lpDisplayName_1));
9941 0 : if (length_lpDisplayName_1 > SC_MAX_NAME_LENGTH) {
9942 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_lpDisplayName_1, (uint32_t)(0), (uint32_t)(SC_MAX_NAME_LENGTH));
9943 : }
9944 0 : if (length_lpDisplayName_1 > size_lpDisplayName_1) {
9945 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_lpDisplayName_1, length_lpDisplayName_1);
9946 : }
9947 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_lpDisplayName_1, sizeof(uint8_t)));
9948 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.lpDisplayName, length_lpDisplayName_1, sizeof(uint8_t), CH_DOS));
9949 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lpDisplayName_0, 0);
9950 : }
9951 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwDesiredAccess));
9952 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwServiceType));
9953 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwStartType));
9954 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwErrorControl));
9955 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.lpBinaryPathName));
9956 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.lpBinaryPathName));
9957 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.lpBinaryPathName, &size_lpBinaryPathName_1));
9958 0 : if (size_lpBinaryPathName_1 > SC_MAX_PATH_LENGTH) {
9959 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_lpBinaryPathName_1, (uint32_t)(0), (uint32_t)(SC_MAX_PATH_LENGTH));
9960 : }
9961 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.lpBinaryPathName, &length_lpBinaryPathName_1));
9962 0 : if (length_lpBinaryPathName_1 > SC_MAX_PATH_LENGTH) {
9963 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_lpBinaryPathName_1, (uint32_t)(0), (uint32_t)(SC_MAX_PATH_LENGTH));
9964 : }
9965 0 : if (length_lpBinaryPathName_1 > size_lpBinaryPathName_1) {
9966 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_lpBinaryPathName_1, length_lpBinaryPathName_1);
9967 : }
9968 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_lpBinaryPathName_1, sizeof(uint8_t)));
9969 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.lpBinaryPathName, length_lpBinaryPathName_1, sizeof(uint8_t), CH_DOS));
9970 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lpLoadOrderGroup));
9971 0 : if (_ptr_lpLoadOrderGroup) {
9972 0 : NDR_PULL_ALLOC(ndr, r->in.lpLoadOrderGroup);
9973 : } else {
9974 0 : r->in.lpLoadOrderGroup = NULL;
9975 : }
9976 0 : if (r->in.lpLoadOrderGroup) {
9977 0 : _mem_save_lpLoadOrderGroup_0 = NDR_PULL_GET_MEM_CTX(ndr);
9978 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.lpLoadOrderGroup, 0);
9979 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.lpLoadOrderGroup));
9980 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.lpLoadOrderGroup));
9981 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.lpLoadOrderGroup, &size_lpLoadOrderGroup_1));
9982 0 : if (size_lpLoadOrderGroup_1 > SC_MAX_NAME_LENGTH) {
9983 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_lpLoadOrderGroup_1, (uint32_t)(0), (uint32_t)(SC_MAX_NAME_LENGTH));
9984 : }
9985 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.lpLoadOrderGroup, &length_lpLoadOrderGroup_1));
9986 0 : if (length_lpLoadOrderGroup_1 > SC_MAX_NAME_LENGTH) {
9987 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_lpLoadOrderGroup_1, (uint32_t)(0), (uint32_t)(SC_MAX_NAME_LENGTH));
9988 : }
9989 0 : if (length_lpLoadOrderGroup_1 > size_lpLoadOrderGroup_1) {
9990 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_lpLoadOrderGroup_1, length_lpLoadOrderGroup_1);
9991 : }
9992 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_lpLoadOrderGroup_1, sizeof(uint8_t)));
9993 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.lpLoadOrderGroup, length_lpLoadOrderGroup_1, sizeof(uint8_t), CH_DOS));
9994 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lpLoadOrderGroup_0, 0);
9995 : }
9996 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lpdwTagId));
9997 0 : if (_ptr_lpdwTagId) {
9998 0 : NDR_PULL_ALLOC(ndr, r->in.lpdwTagId);
9999 : } else {
10000 0 : r->in.lpdwTagId = NULL;
10001 : }
10002 0 : if (r->in.lpdwTagId) {
10003 0 : _mem_save_lpdwTagId_0 = NDR_PULL_GET_MEM_CTX(ndr);
10004 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.lpdwTagId, 0);
10005 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.lpdwTagId));
10006 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lpdwTagId_0, 0);
10007 : }
10008 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lpDependencies));
10009 0 : if (_ptr_lpDependencies) {
10010 0 : NDR_PULL_ALLOC(ndr, r->in.lpDependencies);
10011 : } else {
10012 0 : r->in.lpDependencies = NULL;
10013 : }
10014 0 : if (r->in.lpDependencies) {
10015 0 : _mem_save_lpDependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
10016 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.lpDependencies, 0);
10017 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.lpDependencies));
10018 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.lpDependencies, &size_lpDependencies_1));
10019 0 : NDR_PULL_ALLOC_N(ndr, r->in.lpDependencies, size_lpDependencies_1);
10020 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.lpDependencies, size_lpDependencies_1));
10021 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lpDependencies_0, 0);
10022 : }
10023 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwDependSize));
10024 0 : if (r->in.dwDependSize > SC_MAX_DEPEND_SIZE) {
10025 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->in.dwDependSize), (uint32_t)(0), (uint32_t)(SC_MAX_DEPEND_SIZE));
10026 : }
10027 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lpServiceStartName));
10028 0 : if (_ptr_lpServiceStartName) {
10029 0 : NDR_PULL_ALLOC(ndr, r->in.lpServiceStartName);
10030 : } else {
10031 0 : r->in.lpServiceStartName = NULL;
10032 : }
10033 0 : if (r->in.lpServiceStartName) {
10034 0 : _mem_save_lpServiceStartName_0 = NDR_PULL_GET_MEM_CTX(ndr);
10035 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.lpServiceStartName, 0);
10036 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.lpServiceStartName));
10037 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.lpServiceStartName));
10038 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.lpServiceStartName, &size_lpServiceStartName_1));
10039 0 : if (size_lpServiceStartName_1 > SC_MAX_ACCOUNT_NAME_LENGTH) {
10040 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_lpServiceStartName_1, (uint32_t)(0), (uint32_t)(SC_MAX_ACCOUNT_NAME_LENGTH));
10041 : }
10042 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.lpServiceStartName, &length_lpServiceStartName_1));
10043 0 : if (length_lpServiceStartName_1 > SC_MAX_ACCOUNT_NAME_LENGTH) {
10044 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_lpServiceStartName_1, (uint32_t)(0), (uint32_t)(SC_MAX_ACCOUNT_NAME_LENGTH));
10045 : }
10046 0 : if (length_lpServiceStartName_1 > size_lpServiceStartName_1) {
10047 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_lpServiceStartName_1, length_lpServiceStartName_1);
10048 : }
10049 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_lpServiceStartName_1, sizeof(uint8_t)));
10050 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.lpServiceStartName, length_lpServiceStartName_1, sizeof(uint8_t), CH_DOS));
10051 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lpServiceStartName_0, 0);
10052 : }
10053 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lpPassword));
10054 0 : if (_ptr_lpPassword) {
10055 0 : NDR_PULL_ALLOC(ndr, r->in.lpPassword);
10056 : } else {
10057 0 : r->in.lpPassword = NULL;
10058 : }
10059 0 : if (r->in.lpPassword) {
10060 0 : _mem_save_lpPassword_0 = NDR_PULL_GET_MEM_CTX(ndr);
10061 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.lpPassword, 0);
10062 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.lpPassword));
10063 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.lpPassword, &size_lpPassword_1));
10064 0 : NDR_PULL_ALLOC_N(ndr, r->in.lpPassword, size_lpPassword_1);
10065 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.lpPassword, size_lpPassword_1));
10066 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lpPassword_0, 0);
10067 : }
10068 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwPwSize));
10069 0 : if (r->in.dwPwSize > SC_MAX_PWD_SIZE) {
10070 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->in.dwPwSize), (uint32_t)(0), (uint32_t)(SC_MAX_PWD_SIZE));
10071 : }
10072 0 : NDR_PULL_ALLOC(ndr, r->out.lpServiceHandle);
10073 0 : NDR_ZERO_STRUCTP(r->out.lpServiceHandle);
10074 0 : if (r->in.lpDependencies) {
10075 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.lpDependencies, r->in.dwDependSize));
10076 : }
10077 0 : if (r->in.lpPassword) {
10078 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.lpPassword, r->in.dwPwSize));
10079 : }
10080 : }
10081 0 : if (flags & NDR_OUT) {
10082 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10083 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10084 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lpdwTagId));
10085 0 : if (_ptr_lpdwTagId) {
10086 0 : NDR_PULL_ALLOC(ndr, r->out.lpdwTagId);
10087 : } else {
10088 0 : r->out.lpdwTagId = NULL;
10089 : }
10090 0 : if (r->out.lpdwTagId) {
10091 0 : _mem_save_lpdwTagId_0 = NDR_PULL_GET_MEM_CTX(ndr);
10092 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.lpdwTagId, 0);
10093 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.lpdwTagId));
10094 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lpdwTagId_0, 0);
10095 : }
10096 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10097 0 : NDR_PULL_ALLOC(ndr, r->out.lpServiceHandle);
10098 : }
10099 0 : _mem_save_lpServiceHandle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10100 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.lpServiceHandle, LIBNDR_FLAG_REF_ALLOC);
10101 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.lpServiceHandle));
10102 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lpServiceHandle_0, LIBNDR_FLAG_REF_ALLOC);
10103 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
10104 : }
10105 0 : return NDR_ERR_SUCCESS;
10106 : }
10107 :
10108 0 : _PUBLIC_ void ndr_print_svcctl_CreateServiceWOW64A(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_CreateServiceWOW64A *r)
10109 : {
10110 0 : ndr_print_struct(ndr, name, "svcctl_CreateServiceWOW64A");
10111 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10112 0 : ndr->depth++;
10113 0 : if (flags & NDR_SET_VALUES) {
10114 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10115 : }
10116 0 : if (flags & NDR_IN) {
10117 0 : ndr_print_struct(ndr, "in", "svcctl_CreateServiceWOW64A");
10118 0 : ndr->depth++;
10119 0 : ndr_print_policy_handle(ndr, "hSCManager", &r->in.hSCManager);
10120 0 : ndr_print_ptr(ndr, "lpServiceName", r->in.lpServiceName);
10121 0 : ndr->depth++;
10122 0 : ndr_print_string(ndr, "lpServiceName", r->in.lpServiceName);
10123 0 : ndr->depth--;
10124 0 : ndr_print_ptr(ndr, "lpDisplayName", r->in.lpDisplayName);
10125 0 : ndr->depth++;
10126 0 : if (r->in.lpDisplayName) {
10127 0 : ndr_print_string(ndr, "lpDisplayName", r->in.lpDisplayName);
10128 : }
10129 0 : ndr->depth--;
10130 0 : ndr_print_uint32(ndr, "dwDesiredAccess", r->in.dwDesiredAccess);
10131 0 : ndr_print_uint32(ndr, "dwServiceType", r->in.dwServiceType);
10132 0 : ndr_print_uint32(ndr, "dwStartType", r->in.dwStartType);
10133 0 : ndr_print_uint32(ndr, "dwErrorControl", r->in.dwErrorControl);
10134 0 : ndr_print_ptr(ndr, "lpBinaryPathName", r->in.lpBinaryPathName);
10135 0 : ndr->depth++;
10136 0 : ndr_print_string(ndr, "lpBinaryPathName", r->in.lpBinaryPathName);
10137 0 : ndr->depth--;
10138 0 : ndr_print_ptr(ndr, "lpLoadOrderGroup", r->in.lpLoadOrderGroup);
10139 0 : ndr->depth++;
10140 0 : if (r->in.lpLoadOrderGroup) {
10141 0 : ndr_print_string(ndr, "lpLoadOrderGroup", r->in.lpLoadOrderGroup);
10142 : }
10143 0 : ndr->depth--;
10144 0 : ndr_print_ptr(ndr, "lpdwTagId", r->in.lpdwTagId);
10145 0 : ndr->depth++;
10146 0 : if (r->in.lpdwTagId) {
10147 0 : ndr_print_uint32(ndr, "lpdwTagId", *r->in.lpdwTagId);
10148 : }
10149 0 : ndr->depth--;
10150 0 : ndr_print_ptr(ndr, "lpDependencies", r->in.lpDependencies);
10151 0 : ndr->depth++;
10152 0 : if (r->in.lpDependencies) {
10153 0 : ndr_print_array_uint8(ndr, "lpDependencies", r->in.lpDependencies, r->in.dwDependSize);
10154 : }
10155 0 : ndr->depth--;
10156 0 : ndr_print_uint32(ndr, "dwDependSize", r->in.dwDependSize);
10157 0 : ndr_print_ptr(ndr, "lpServiceStartName", r->in.lpServiceStartName);
10158 0 : ndr->depth++;
10159 0 : if (r->in.lpServiceStartName) {
10160 0 : ndr_print_string(ndr, "lpServiceStartName", r->in.lpServiceStartName);
10161 : }
10162 0 : ndr->depth--;
10163 0 : ndr_print_ptr(ndr, "lpPassword", r->in.lpPassword);
10164 0 : ndr->depth++;
10165 0 : if (r->in.lpPassword) {
10166 0 : ndr_print_array_uint8(ndr, "lpPassword", r->in.lpPassword, r->in.dwPwSize);
10167 : }
10168 0 : ndr->depth--;
10169 0 : ndr_print_uint32(ndr, "dwPwSize", r->in.dwPwSize);
10170 0 : ndr->depth--;
10171 : }
10172 0 : if (flags & NDR_OUT) {
10173 0 : ndr_print_struct(ndr, "out", "svcctl_CreateServiceWOW64A");
10174 0 : ndr->depth++;
10175 0 : ndr_print_ptr(ndr, "lpdwTagId", r->out.lpdwTagId);
10176 0 : ndr->depth++;
10177 0 : if (r->out.lpdwTagId) {
10178 0 : ndr_print_uint32(ndr, "lpdwTagId", *r->out.lpdwTagId);
10179 : }
10180 0 : ndr->depth--;
10181 0 : ndr_print_ptr(ndr, "lpServiceHandle", r->out.lpServiceHandle);
10182 0 : ndr->depth++;
10183 0 : ndr_print_policy_handle(ndr, "lpServiceHandle", r->out.lpServiceHandle);
10184 0 : ndr->depth--;
10185 0 : ndr_print_WERROR(ndr, "result", r->out.result);
10186 0 : ndr->depth--;
10187 : }
10188 0 : ndr->depth--;
10189 : }
10190 :
10191 0 : static enum ndr_err_code ndr_push_svcctl_CreateServiceWOW64W(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_CreateServiceWOW64W *r)
10192 : {
10193 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10194 0 : if (flags & NDR_IN) {
10195 0 : if (r->in.lpServiceName == NULL) {
10196 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10197 : }
10198 0 : if (r->in.lpBinaryPathName == NULL) {
10199 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10200 : }
10201 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hSCManager));
10202 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.lpServiceName, CH_UTF16)));
10203 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10204 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.lpServiceName, CH_UTF16)));
10205 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.lpServiceName, ndr_charset_length(r->in.lpServiceName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10206 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lpDisplayName));
10207 0 : if (r->in.lpDisplayName) {
10208 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.lpDisplayName, CH_UTF16)));
10209 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10210 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.lpDisplayName, CH_UTF16)));
10211 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.lpDisplayName, ndr_charset_length(r->in.lpDisplayName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10212 : }
10213 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwDesiredAccess));
10214 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwServiceType));
10215 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwStartType));
10216 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwErrorControl));
10217 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.lpBinaryPathName, CH_UTF16)));
10218 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10219 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.lpBinaryPathName, CH_UTF16)));
10220 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.lpBinaryPathName, ndr_charset_length(r->in.lpBinaryPathName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10221 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lpLoadOrderGroup));
10222 0 : if (r->in.lpLoadOrderGroup) {
10223 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.lpLoadOrderGroup, CH_UTF16)));
10224 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10225 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.lpLoadOrderGroup, CH_UTF16)));
10226 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.lpLoadOrderGroup, ndr_charset_length(r->in.lpLoadOrderGroup, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10227 : }
10228 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lpdwTagId));
10229 0 : if (r->in.lpdwTagId) {
10230 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.lpdwTagId));
10231 : }
10232 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lpDependencies));
10233 0 : if (r->in.lpDependencies) {
10234 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.dwDependSize));
10235 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.lpDependencies, r->in.dwDependSize));
10236 : }
10237 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwDependSize));
10238 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lpServiceStartName));
10239 0 : if (r->in.lpServiceStartName) {
10240 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.lpServiceStartName, CH_UTF16)));
10241 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
10242 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.lpServiceStartName, CH_UTF16)));
10243 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.lpServiceStartName, ndr_charset_length(r->in.lpServiceStartName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
10244 : }
10245 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lpPassword));
10246 0 : if (r->in.lpPassword) {
10247 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.dwPwSize));
10248 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.lpPassword, r->in.dwPwSize));
10249 : }
10250 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwPwSize));
10251 : }
10252 0 : if (flags & NDR_OUT) {
10253 0 : if (r->out.lpServiceHandle == NULL) {
10254 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10255 : }
10256 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.lpdwTagId));
10257 0 : if (r->out.lpdwTagId) {
10258 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.lpdwTagId));
10259 : }
10260 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.lpServiceHandle));
10261 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
10262 : }
10263 0 : return NDR_ERR_SUCCESS;
10264 : }
10265 :
10266 0 : static enum ndr_err_code ndr_pull_svcctl_CreateServiceWOW64W(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_CreateServiceWOW64W *r)
10267 : {
10268 0 : uint32_t size_lpServiceName_1 = 0;
10269 0 : uint32_t length_lpServiceName_1 = 0;
10270 0 : uint32_t _ptr_lpDisplayName;
10271 0 : uint32_t size_lpDisplayName_1 = 0;
10272 0 : uint32_t length_lpDisplayName_1 = 0;
10273 0 : uint32_t size_lpBinaryPathName_1 = 0;
10274 0 : uint32_t length_lpBinaryPathName_1 = 0;
10275 0 : uint32_t _ptr_lpLoadOrderGroup;
10276 0 : uint32_t size_lpLoadOrderGroup_1 = 0;
10277 0 : uint32_t length_lpLoadOrderGroup_1 = 0;
10278 0 : uint32_t _ptr_lpdwTagId;
10279 0 : uint32_t _ptr_lpDependencies;
10280 0 : uint32_t size_lpDependencies_1 = 0;
10281 0 : uint32_t _ptr_lpServiceStartName;
10282 0 : uint32_t size_lpServiceStartName_1 = 0;
10283 0 : uint32_t length_lpServiceStartName_1 = 0;
10284 0 : uint32_t _ptr_lpPassword;
10285 0 : uint32_t size_lpPassword_1 = 0;
10286 0 : TALLOC_CTX *_mem_save_lpDisplayName_0 = NULL;
10287 0 : TALLOC_CTX *_mem_save_lpLoadOrderGroup_0 = NULL;
10288 0 : TALLOC_CTX *_mem_save_lpdwTagId_0 = NULL;
10289 0 : TALLOC_CTX *_mem_save_lpDependencies_0 = NULL;
10290 0 : TALLOC_CTX *_mem_save_lpServiceStartName_0 = NULL;
10291 0 : TALLOC_CTX *_mem_save_lpPassword_0 = NULL;
10292 0 : TALLOC_CTX *_mem_save_lpServiceHandle_0 = NULL;
10293 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10294 0 : if (flags & NDR_IN) {
10295 0 : NDR_ZERO_STRUCT(r->out);
10296 :
10297 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hSCManager));
10298 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.lpServiceName));
10299 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.lpServiceName));
10300 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.lpServiceName, &size_lpServiceName_1));
10301 0 : if (size_lpServiceName_1 > SC_MAX_NAME_LENGTH) {
10302 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_lpServiceName_1, (uint32_t)(0), (uint32_t)(SC_MAX_NAME_LENGTH));
10303 : }
10304 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.lpServiceName, &length_lpServiceName_1));
10305 0 : if (length_lpServiceName_1 > SC_MAX_NAME_LENGTH) {
10306 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_lpServiceName_1, (uint32_t)(0), (uint32_t)(SC_MAX_NAME_LENGTH));
10307 : }
10308 0 : if (length_lpServiceName_1 > size_lpServiceName_1) {
10309 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_lpServiceName_1, length_lpServiceName_1);
10310 : }
10311 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_lpServiceName_1, sizeof(uint16_t)));
10312 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.lpServiceName, length_lpServiceName_1, sizeof(uint16_t), CH_UTF16));
10313 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lpDisplayName));
10314 0 : if (_ptr_lpDisplayName) {
10315 0 : NDR_PULL_ALLOC(ndr, r->in.lpDisplayName);
10316 : } else {
10317 0 : r->in.lpDisplayName = NULL;
10318 : }
10319 0 : if (r->in.lpDisplayName) {
10320 0 : _mem_save_lpDisplayName_0 = NDR_PULL_GET_MEM_CTX(ndr);
10321 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.lpDisplayName, 0);
10322 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.lpDisplayName));
10323 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.lpDisplayName));
10324 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.lpDisplayName, &size_lpDisplayName_1));
10325 0 : if (size_lpDisplayName_1 > SC_MAX_NAME_LENGTH) {
10326 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_lpDisplayName_1, (uint32_t)(0), (uint32_t)(SC_MAX_NAME_LENGTH));
10327 : }
10328 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.lpDisplayName, &length_lpDisplayName_1));
10329 0 : if (length_lpDisplayName_1 > SC_MAX_NAME_LENGTH) {
10330 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_lpDisplayName_1, (uint32_t)(0), (uint32_t)(SC_MAX_NAME_LENGTH));
10331 : }
10332 0 : if (length_lpDisplayName_1 > size_lpDisplayName_1) {
10333 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_lpDisplayName_1, length_lpDisplayName_1);
10334 : }
10335 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_lpDisplayName_1, sizeof(uint16_t)));
10336 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.lpDisplayName, length_lpDisplayName_1, sizeof(uint16_t), CH_UTF16));
10337 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lpDisplayName_0, 0);
10338 : }
10339 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwDesiredAccess));
10340 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwServiceType));
10341 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwStartType));
10342 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwErrorControl));
10343 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.lpBinaryPathName));
10344 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.lpBinaryPathName));
10345 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.lpBinaryPathName, &size_lpBinaryPathName_1));
10346 0 : if (size_lpBinaryPathName_1 > SC_MAX_PATH_LENGTH) {
10347 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_lpBinaryPathName_1, (uint32_t)(0), (uint32_t)(SC_MAX_PATH_LENGTH));
10348 : }
10349 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.lpBinaryPathName, &length_lpBinaryPathName_1));
10350 0 : if (length_lpBinaryPathName_1 > SC_MAX_PATH_LENGTH) {
10351 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_lpBinaryPathName_1, (uint32_t)(0), (uint32_t)(SC_MAX_PATH_LENGTH));
10352 : }
10353 0 : if (length_lpBinaryPathName_1 > size_lpBinaryPathName_1) {
10354 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_lpBinaryPathName_1, length_lpBinaryPathName_1);
10355 : }
10356 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_lpBinaryPathName_1, sizeof(uint16_t)));
10357 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.lpBinaryPathName, length_lpBinaryPathName_1, sizeof(uint16_t), CH_UTF16));
10358 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lpLoadOrderGroup));
10359 0 : if (_ptr_lpLoadOrderGroup) {
10360 0 : NDR_PULL_ALLOC(ndr, r->in.lpLoadOrderGroup);
10361 : } else {
10362 0 : r->in.lpLoadOrderGroup = NULL;
10363 : }
10364 0 : if (r->in.lpLoadOrderGroup) {
10365 0 : _mem_save_lpLoadOrderGroup_0 = NDR_PULL_GET_MEM_CTX(ndr);
10366 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.lpLoadOrderGroup, 0);
10367 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.lpLoadOrderGroup));
10368 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.lpLoadOrderGroup));
10369 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.lpLoadOrderGroup, &size_lpLoadOrderGroup_1));
10370 0 : if (size_lpLoadOrderGroup_1 > SC_MAX_NAME_LENGTH) {
10371 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_lpLoadOrderGroup_1, (uint32_t)(0), (uint32_t)(SC_MAX_NAME_LENGTH));
10372 : }
10373 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.lpLoadOrderGroup, &length_lpLoadOrderGroup_1));
10374 0 : if (length_lpLoadOrderGroup_1 > SC_MAX_NAME_LENGTH) {
10375 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_lpLoadOrderGroup_1, (uint32_t)(0), (uint32_t)(SC_MAX_NAME_LENGTH));
10376 : }
10377 0 : if (length_lpLoadOrderGroup_1 > size_lpLoadOrderGroup_1) {
10378 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_lpLoadOrderGroup_1, length_lpLoadOrderGroup_1);
10379 : }
10380 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_lpLoadOrderGroup_1, sizeof(uint16_t)));
10381 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.lpLoadOrderGroup, length_lpLoadOrderGroup_1, sizeof(uint16_t), CH_UTF16));
10382 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lpLoadOrderGroup_0, 0);
10383 : }
10384 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lpdwTagId));
10385 0 : if (_ptr_lpdwTagId) {
10386 0 : NDR_PULL_ALLOC(ndr, r->in.lpdwTagId);
10387 : } else {
10388 0 : r->in.lpdwTagId = NULL;
10389 : }
10390 0 : if (r->in.lpdwTagId) {
10391 0 : _mem_save_lpdwTagId_0 = NDR_PULL_GET_MEM_CTX(ndr);
10392 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.lpdwTagId, 0);
10393 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.lpdwTagId));
10394 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lpdwTagId_0, 0);
10395 : }
10396 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lpDependencies));
10397 0 : if (_ptr_lpDependencies) {
10398 0 : NDR_PULL_ALLOC(ndr, r->in.lpDependencies);
10399 : } else {
10400 0 : r->in.lpDependencies = NULL;
10401 : }
10402 0 : if (r->in.lpDependencies) {
10403 0 : _mem_save_lpDependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
10404 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.lpDependencies, 0);
10405 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.lpDependencies));
10406 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.lpDependencies, &size_lpDependencies_1));
10407 0 : NDR_PULL_ALLOC_N(ndr, r->in.lpDependencies, size_lpDependencies_1);
10408 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.lpDependencies, size_lpDependencies_1));
10409 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lpDependencies_0, 0);
10410 : }
10411 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwDependSize));
10412 0 : if (r->in.dwDependSize > SC_MAX_DEPEND_SIZE) {
10413 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->in.dwDependSize), (uint32_t)(0), (uint32_t)(SC_MAX_DEPEND_SIZE));
10414 : }
10415 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lpServiceStartName));
10416 0 : if (_ptr_lpServiceStartName) {
10417 0 : NDR_PULL_ALLOC(ndr, r->in.lpServiceStartName);
10418 : } else {
10419 0 : r->in.lpServiceStartName = NULL;
10420 : }
10421 0 : if (r->in.lpServiceStartName) {
10422 0 : _mem_save_lpServiceStartName_0 = NDR_PULL_GET_MEM_CTX(ndr);
10423 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.lpServiceStartName, 0);
10424 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.lpServiceStartName));
10425 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.lpServiceStartName));
10426 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.lpServiceStartName, &size_lpServiceStartName_1));
10427 0 : if (size_lpServiceStartName_1 > SC_MAX_ACCOUNT_NAME_LENGTH) {
10428 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_lpServiceStartName_1, (uint32_t)(0), (uint32_t)(SC_MAX_ACCOUNT_NAME_LENGTH));
10429 : }
10430 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.lpServiceStartName, &length_lpServiceStartName_1));
10431 0 : if (length_lpServiceStartName_1 > SC_MAX_ACCOUNT_NAME_LENGTH) {
10432 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_lpServiceStartName_1, (uint32_t)(0), (uint32_t)(SC_MAX_ACCOUNT_NAME_LENGTH));
10433 : }
10434 0 : if (length_lpServiceStartName_1 > size_lpServiceStartName_1) {
10435 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_lpServiceStartName_1, length_lpServiceStartName_1);
10436 : }
10437 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_lpServiceStartName_1, sizeof(uint16_t)));
10438 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.lpServiceStartName, length_lpServiceStartName_1, sizeof(uint16_t), CH_UTF16));
10439 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lpServiceStartName_0, 0);
10440 : }
10441 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lpPassword));
10442 0 : if (_ptr_lpPassword) {
10443 0 : NDR_PULL_ALLOC(ndr, r->in.lpPassword);
10444 : } else {
10445 0 : r->in.lpPassword = NULL;
10446 : }
10447 0 : if (r->in.lpPassword) {
10448 0 : _mem_save_lpPassword_0 = NDR_PULL_GET_MEM_CTX(ndr);
10449 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.lpPassword, 0);
10450 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.lpPassword));
10451 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.lpPassword, &size_lpPassword_1));
10452 0 : NDR_PULL_ALLOC_N(ndr, r->in.lpPassword, size_lpPassword_1);
10453 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.lpPassword, size_lpPassword_1));
10454 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lpPassword_0, 0);
10455 : }
10456 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwPwSize));
10457 0 : if (r->in.dwPwSize > SC_MAX_PWD_SIZE) {
10458 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->in.dwPwSize), (uint32_t)(0), (uint32_t)(SC_MAX_PWD_SIZE));
10459 : }
10460 0 : NDR_PULL_ALLOC(ndr, r->out.lpServiceHandle);
10461 0 : NDR_ZERO_STRUCTP(r->out.lpServiceHandle);
10462 0 : if (r->in.lpDependencies) {
10463 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.lpDependencies, r->in.dwDependSize));
10464 : }
10465 0 : if (r->in.lpPassword) {
10466 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.lpPassword, r->in.dwPwSize));
10467 : }
10468 : }
10469 0 : if (flags & NDR_OUT) {
10470 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10471 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10472 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lpdwTagId));
10473 0 : if (_ptr_lpdwTagId) {
10474 0 : NDR_PULL_ALLOC(ndr, r->out.lpdwTagId);
10475 : } else {
10476 0 : r->out.lpdwTagId = NULL;
10477 : }
10478 0 : if (r->out.lpdwTagId) {
10479 0 : _mem_save_lpdwTagId_0 = NDR_PULL_GET_MEM_CTX(ndr);
10480 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.lpdwTagId, 0);
10481 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.lpdwTagId));
10482 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lpdwTagId_0, 0);
10483 : }
10484 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10485 0 : NDR_PULL_ALLOC(ndr, r->out.lpServiceHandle);
10486 : }
10487 0 : _mem_save_lpServiceHandle_0 = NDR_PULL_GET_MEM_CTX(ndr);
10488 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.lpServiceHandle, LIBNDR_FLAG_REF_ALLOC);
10489 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.lpServiceHandle));
10490 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lpServiceHandle_0, LIBNDR_FLAG_REF_ALLOC);
10491 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
10492 : }
10493 0 : return NDR_ERR_SUCCESS;
10494 : }
10495 :
10496 0 : _PUBLIC_ void ndr_print_svcctl_CreateServiceWOW64W(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_CreateServiceWOW64W *r)
10497 : {
10498 0 : ndr_print_struct(ndr, name, "svcctl_CreateServiceWOW64W");
10499 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10500 0 : ndr->depth++;
10501 0 : if (flags & NDR_SET_VALUES) {
10502 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10503 : }
10504 0 : if (flags & NDR_IN) {
10505 0 : ndr_print_struct(ndr, "in", "svcctl_CreateServiceWOW64W");
10506 0 : ndr->depth++;
10507 0 : ndr_print_policy_handle(ndr, "hSCManager", &r->in.hSCManager);
10508 0 : ndr_print_ptr(ndr, "lpServiceName", r->in.lpServiceName);
10509 0 : ndr->depth++;
10510 0 : ndr_print_string(ndr, "lpServiceName", r->in.lpServiceName);
10511 0 : ndr->depth--;
10512 0 : ndr_print_ptr(ndr, "lpDisplayName", r->in.lpDisplayName);
10513 0 : ndr->depth++;
10514 0 : if (r->in.lpDisplayName) {
10515 0 : ndr_print_string(ndr, "lpDisplayName", r->in.lpDisplayName);
10516 : }
10517 0 : ndr->depth--;
10518 0 : ndr_print_uint32(ndr, "dwDesiredAccess", r->in.dwDesiredAccess);
10519 0 : ndr_print_uint32(ndr, "dwServiceType", r->in.dwServiceType);
10520 0 : ndr_print_uint32(ndr, "dwStartType", r->in.dwStartType);
10521 0 : ndr_print_uint32(ndr, "dwErrorControl", r->in.dwErrorControl);
10522 0 : ndr_print_ptr(ndr, "lpBinaryPathName", r->in.lpBinaryPathName);
10523 0 : ndr->depth++;
10524 0 : ndr_print_string(ndr, "lpBinaryPathName", r->in.lpBinaryPathName);
10525 0 : ndr->depth--;
10526 0 : ndr_print_ptr(ndr, "lpLoadOrderGroup", r->in.lpLoadOrderGroup);
10527 0 : ndr->depth++;
10528 0 : if (r->in.lpLoadOrderGroup) {
10529 0 : ndr_print_string(ndr, "lpLoadOrderGroup", r->in.lpLoadOrderGroup);
10530 : }
10531 0 : ndr->depth--;
10532 0 : ndr_print_ptr(ndr, "lpdwTagId", r->in.lpdwTagId);
10533 0 : ndr->depth++;
10534 0 : if (r->in.lpdwTagId) {
10535 0 : ndr_print_uint32(ndr, "lpdwTagId", *r->in.lpdwTagId);
10536 : }
10537 0 : ndr->depth--;
10538 0 : ndr_print_ptr(ndr, "lpDependencies", r->in.lpDependencies);
10539 0 : ndr->depth++;
10540 0 : if (r->in.lpDependencies) {
10541 0 : ndr_print_array_uint8(ndr, "lpDependencies", r->in.lpDependencies, r->in.dwDependSize);
10542 : }
10543 0 : ndr->depth--;
10544 0 : ndr_print_uint32(ndr, "dwDependSize", r->in.dwDependSize);
10545 0 : ndr_print_ptr(ndr, "lpServiceStartName", r->in.lpServiceStartName);
10546 0 : ndr->depth++;
10547 0 : if (r->in.lpServiceStartName) {
10548 0 : ndr_print_string(ndr, "lpServiceStartName", r->in.lpServiceStartName);
10549 : }
10550 0 : ndr->depth--;
10551 0 : ndr_print_ptr(ndr, "lpPassword", r->in.lpPassword);
10552 0 : ndr->depth++;
10553 0 : if (r->in.lpPassword) {
10554 0 : ndr_print_array_uint8(ndr, "lpPassword", r->in.lpPassword, r->in.dwPwSize);
10555 : }
10556 0 : ndr->depth--;
10557 0 : ndr_print_uint32(ndr, "dwPwSize", r->in.dwPwSize);
10558 0 : ndr->depth--;
10559 : }
10560 0 : if (flags & NDR_OUT) {
10561 0 : ndr_print_struct(ndr, "out", "svcctl_CreateServiceWOW64W");
10562 0 : ndr->depth++;
10563 0 : ndr_print_ptr(ndr, "lpdwTagId", r->out.lpdwTagId);
10564 0 : ndr->depth++;
10565 0 : if (r->out.lpdwTagId) {
10566 0 : ndr_print_uint32(ndr, "lpdwTagId", *r->out.lpdwTagId);
10567 : }
10568 0 : ndr->depth--;
10569 0 : ndr_print_ptr(ndr, "lpServiceHandle", r->out.lpServiceHandle);
10570 0 : ndr->depth++;
10571 0 : ndr_print_policy_handle(ndr, "lpServiceHandle", r->out.lpServiceHandle);
10572 0 : ndr->depth--;
10573 0 : ndr_print_WERROR(ndr, "result", r->out.result);
10574 0 : ndr->depth--;
10575 : }
10576 0 : ndr->depth--;
10577 : }
10578 :
10579 0 : static enum ndr_err_code ndr_push_Opnum46NotUsedOnWire(struct ndr_push *ndr, ndr_flags_type flags, const struct Opnum46NotUsedOnWire *r)
10580 : {
10581 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10582 0 : if (flags & NDR_IN) {
10583 : }
10584 0 : if (flags & NDR_OUT) {
10585 : }
10586 0 : return NDR_ERR_SUCCESS;
10587 : }
10588 :
10589 0 : static enum ndr_err_code ndr_pull_Opnum46NotUsedOnWire(struct ndr_pull *ndr, ndr_flags_type flags, struct Opnum46NotUsedOnWire *r)
10590 : {
10591 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10592 0 : if (flags & NDR_IN) {
10593 : }
10594 0 : if (flags & NDR_OUT) {
10595 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10596 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10597 : }
10598 0 : return NDR_ERR_SUCCESS;
10599 : }
10600 :
10601 0 : _PUBLIC_ void ndr_print_Opnum46NotUsedOnWire(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct Opnum46NotUsedOnWire *r)
10602 : {
10603 0 : ndr_print_struct(ndr, name, "Opnum46NotUsedOnWire");
10604 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10605 0 : ndr->depth++;
10606 0 : if (flags & NDR_SET_VALUES) {
10607 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10608 : }
10609 0 : if (flags & NDR_IN) {
10610 0 : ndr_print_struct(ndr, "in", "Opnum46NotUsedOnWire");
10611 0 : ndr->depth++;
10612 0 : ndr->depth--;
10613 : }
10614 0 : if (flags & NDR_OUT) {
10615 0 : ndr_print_struct(ndr, "out", "Opnum46NotUsedOnWire");
10616 0 : ndr->depth++;
10617 0 : ndr->depth--;
10618 : }
10619 0 : ndr->depth--;
10620 : }
10621 :
10622 0 : static enum ndr_err_code ndr_push_svcctl_NotifyServiceStatusChange(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_NotifyServiceStatusChange *r)
10623 : {
10624 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10625 0 : if (flags & NDR_IN) {
10626 0 : if (r->in.pClientProcessGuid == NULL) {
10627 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10628 : }
10629 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hService));
10630 0 : NDR_CHECK(ndr_push_SC_RPC_NOTIFY_PARAMS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.NotifyParams));
10631 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.pClientProcessGuid));
10632 : }
10633 0 : if (flags & NDR_OUT) {
10634 0 : if (r->out.pSCMProcessGuid == NULL) {
10635 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10636 : }
10637 0 : if (r->out.pfCreateRemoteQueue == NULL) {
10638 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10639 : }
10640 0 : if (r->out.phNotify == NULL) {
10641 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10642 : }
10643 0 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->out.pSCMProcessGuid));
10644 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pfCreateRemoteQueue));
10645 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.phNotify));
10646 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
10647 : }
10648 0 : return NDR_ERR_SUCCESS;
10649 : }
10650 :
10651 0 : static enum ndr_err_code ndr_pull_svcctl_NotifyServiceStatusChange(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_NotifyServiceStatusChange *r)
10652 : {
10653 0 : TALLOC_CTX *_mem_save_pClientProcessGuid_0 = NULL;
10654 0 : TALLOC_CTX *_mem_save_pSCMProcessGuid_0 = NULL;
10655 0 : TALLOC_CTX *_mem_save_pfCreateRemoteQueue_0 = NULL;
10656 0 : TALLOC_CTX *_mem_save_phNotify_0 = NULL;
10657 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10658 0 : if (flags & NDR_IN) {
10659 0 : NDR_ZERO_STRUCT(r->out);
10660 :
10661 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hService));
10662 0 : NDR_CHECK(ndr_pull_SC_RPC_NOTIFY_PARAMS(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.NotifyParams));
10663 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10664 0 : NDR_PULL_ALLOC(ndr, r->in.pClientProcessGuid);
10665 : }
10666 0 : _mem_save_pClientProcessGuid_0 = NDR_PULL_GET_MEM_CTX(ndr);
10667 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pClientProcessGuid, LIBNDR_FLAG_REF_ALLOC);
10668 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.pClientProcessGuid));
10669 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pClientProcessGuid_0, LIBNDR_FLAG_REF_ALLOC);
10670 0 : NDR_PULL_ALLOC(ndr, r->out.pSCMProcessGuid);
10671 0 : NDR_ZERO_STRUCTP(r->out.pSCMProcessGuid);
10672 0 : NDR_PULL_ALLOC(ndr, r->out.pfCreateRemoteQueue);
10673 0 : NDR_ZERO_STRUCTP(r->out.pfCreateRemoteQueue);
10674 0 : NDR_PULL_ALLOC(ndr, r->out.phNotify);
10675 0 : NDR_ZERO_STRUCTP(r->out.phNotify);
10676 : }
10677 0 : if (flags & NDR_OUT) {
10678 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10679 : if (r->in.pClientProcessGuid == NULL) {
10680 : NDR_PULL_ALLOC(ndr, r->in.pClientProcessGuid);
10681 : NDR_ZERO_STRUCTP(r->in.pClientProcessGuid);
10682 : }
10683 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10684 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10685 0 : NDR_PULL_ALLOC(ndr, r->out.pSCMProcessGuid);
10686 : }
10687 0 : _mem_save_pSCMProcessGuid_0 = NDR_PULL_GET_MEM_CTX(ndr);
10688 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pSCMProcessGuid, LIBNDR_FLAG_REF_ALLOC);
10689 0 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->out.pSCMProcessGuid));
10690 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pSCMProcessGuid_0, LIBNDR_FLAG_REF_ALLOC);
10691 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10692 0 : NDR_PULL_ALLOC(ndr, r->out.pfCreateRemoteQueue);
10693 : }
10694 0 : _mem_save_pfCreateRemoteQueue_0 = NDR_PULL_GET_MEM_CTX(ndr);
10695 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pfCreateRemoteQueue, LIBNDR_FLAG_REF_ALLOC);
10696 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pfCreateRemoteQueue));
10697 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pfCreateRemoteQueue_0, LIBNDR_FLAG_REF_ALLOC);
10698 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10699 0 : NDR_PULL_ALLOC(ndr, r->out.phNotify);
10700 : }
10701 0 : _mem_save_phNotify_0 = NDR_PULL_GET_MEM_CTX(ndr);
10702 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.phNotify, LIBNDR_FLAG_REF_ALLOC);
10703 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.phNotify));
10704 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_phNotify_0, LIBNDR_FLAG_REF_ALLOC);
10705 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
10706 : }
10707 0 : return NDR_ERR_SUCCESS;
10708 : }
10709 :
10710 0 : _PUBLIC_ void ndr_print_svcctl_NotifyServiceStatusChange(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_NotifyServiceStatusChange *r)
10711 : {
10712 0 : ndr_print_struct(ndr, name, "svcctl_NotifyServiceStatusChange");
10713 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10714 0 : ndr->depth++;
10715 0 : if (flags & NDR_SET_VALUES) {
10716 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10717 : }
10718 0 : if (flags & NDR_IN) {
10719 0 : ndr_print_struct(ndr, "in", "svcctl_NotifyServiceStatusChange");
10720 0 : ndr->depth++;
10721 0 : ndr_print_policy_handle(ndr, "hService", &r->in.hService);
10722 0 : ndr_print_SC_RPC_NOTIFY_PARAMS(ndr, "NotifyParams", &r->in.NotifyParams);
10723 0 : ndr_print_ptr(ndr, "pClientProcessGuid", r->in.pClientProcessGuid);
10724 0 : ndr->depth++;
10725 0 : ndr_print_GUID(ndr, "pClientProcessGuid", r->in.pClientProcessGuid);
10726 0 : ndr->depth--;
10727 0 : ndr->depth--;
10728 : }
10729 0 : if (flags & NDR_OUT) {
10730 0 : ndr_print_struct(ndr, "out", "svcctl_NotifyServiceStatusChange");
10731 0 : ndr->depth++;
10732 0 : ndr_print_ptr(ndr, "pSCMProcessGuid", r->out.pSCMProcessGuid);
10733 0 : ndr->depth++;
10734 0 : ndr_print_GUID(ndr, "pSCMProcessGuid", r->out.pSCMProcessGuid);
10735 0 : ndr->depth--;
10736 0 : ndr_print_ptr(ndr, "pfCreateRemoteQueue", r->out.pfCreateRemoteQueue);
10737 0 : ndr->depth++;
10738 0 : ndr_print_uint32(ndr, "pfCreateRemoteQueue", *r->out.pfCreateRemoteQueue);
10739 0 : ndr->depth--;
10740 0 : ndr_print_ptr(ndr, "phNotify", r->out.phNotify);
10741 0 : ndr->depth++;
10742 0 : ndr_print_policy_handle(ndr, "phNotify", r->out.phNotify);
10743 0 : ndr->depth--;
10744 0 : ndr_print_WERROR(ndr, "result", r->out.result);
10745 0 : ndr->depth--;
10746 : }
10747 0 : ndr->depth--;
10748 : }
10749 :
10750 0 : static enum ndr_err_code ndr_push_svcctl_GetNotifyResults(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_GetNotifyResults *r)
10751 : {
10752 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10753 0 : if (flags & NDR_IN) {
10754 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hNotify));
10755 : }
10756 0 : if (flags & NDR_OUT) {
10757 0 : if (r->out.ppNotifyParams == NULL) {
10758 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10759 : }
10760 0 : NDR_CHECK(ndr_push_SC_RPC_NOTIFY_PARAMS_LIST(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ppNotifyParams));
10761 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
10762 : }
10763 0 : return NDR_ERR_SUCCESS;
10764 : }
10765 :
10766 0 : static enum ndr_err_code ndr_pull_svcctl_GetNotifyResults(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_GetNotifyResults *r)
10767 : {
10768 0 : TALLOC_CTX *_mem_save_ppNotifyParams_0 = NULL;
10769 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10770 0 : if (flags & NDR_IN) {
10771 0 : NDR_ZERO_STRUCT(r->out);
10772 :
10773 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hNotify));
10774 0 : NDR_PULL_ALLOC(ndr, r->out.ppNotifyParams);
10775 0 : NDR_ZERO_STRUCTP(r->out.ppNotifyParams);
10776 : }
10777 0 : if (flags & NDR_OUT) {
10778 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10779 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10780 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10781 0 : NDR_PULL_ALLOC(ndr, r->out.ppNotifyParams);
10782 : }
10783 0 : _mem_save_ppNotifyParams_0 = NDR_PULL_GET_MEM_CTX(ndr);
10784 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ppNotifyParams, LIBNDR_FLAG_REF_ALLOC);
10785 0 : NDR_CHECK(ndr_pull_SC_RPC_NOTIFY_PARAMS_LIST(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ppNotifyParams));
10786 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ppNotifyParams_0, LIBNDR_FLAG_REF_ALLOC);
10787 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
10788 : }
10789 0 : return NDR_ERR_SUCCESS;
10790 : }
10791 :
10792 0 : _PUBLIC_ void ndr_print_svcctl_GetNotifyResults(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_GetNotifyResults *r)
10793 : {
10794 0 : ndr_print_struct(ndr, name, "svcctl_GetNotifyResults");
10795 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10796 0 : ndr->depth++;
10797 0 : if (flags & NDR_SET_VALUES) {
10798 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10799 : }
10800 0 : if (flags & NDR_IN) {
10801 0 : ndr_print_struct(ndr, "in", "svcctl_GetNotifyResults");
10802 0 : ndr->depth++;
10803 0 : ndr_print_policy_handle(ndr, "hNotify", &r->in.hNotify);
10804 0 : ndr->depth--;
10805 : }
10806 0 : if (flags & NDR_OUT) {
10807 0 : ndr_print_struct(ndr, "out", "svcctl_GetNotifyResults");
10808 0 : ndr->depth++;
10809 0 : ndr_print_ptr(ndr, "ppNotifyParams", r->out.ppNotifyParams);
10810 0 : ndr->depth++;
10811 0 : ndr_print_SC_RPC_NOTIFY_PARAMS_LIST(ndr, "ppNotifyParams", r->out.ppNotifyParams);
10812 0 : ndr->depth--;
10813 0 : ndr_print_WERROR(ndr, "result", r->out.result);
10814 0 : ndr->depth--;
10815 : }
10816 0 : ndr->depth--;
10817 : }
10818 :
10819 0 : static enum ndr_err_code ndr_push_svcctl_CloseNotifyHandle(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_CloseNotifyHandle *r)
10820 : {
10821 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10822 0 : if (flags & NDR_IN) {
10823 0 : if (r->in.phNotify == NULL) {
10824 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10825 : }
10826 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.phNotify));
10827 : }
10828 0 : if (flags & NDR_OUT) {
10829 0 : if (r->out.phNotify == NULL) {
10830 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10831 : }
10832 0 : if (r->out.pfApcFired == NULL) {
10833 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10834 : }
10835 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.phNotify));
10836 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pfApcFired));
10837 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
10838 : }
10839 0 : return NDR_ERR_SUCCESS;
10840 : }
10841 :
10842 0 : static enum ndr_err_code ndr_pull_svcctl_CloseNotifyHandle(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_CloseNotifyHandle *r)
10843 : {
10844 0 : TALLOC_CTX *_mem_save_phNotify_0 = NULL;
10845 0 : TALLOC_CTX *_mem_save_pfApcFired_0 = NULL;
10846 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10847 0 : if (flags & NDR_IN) {
10848 0 : NDR_ZERO_STRUCT(r->out);
10849 :
10850 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10851 0 : NDR_PULL_ALLOC(ndr, r->in.phNotify);
10852 : }
10853 0 : _mem_save_phNotify_0 = NDR_PULL_GET_MEM_CTX(ndr);
10854 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.phNotify, LIBNDR_FLAG_REF_ALLOC);
10855 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.phNotify));
10856 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_phNotify_0, LIBNDR_FLAG_REF_ALLOC);
10857 0 : NDR_PULL_ALLOC(ndr, r->out.phNotify);
10858 0 : *r->out.phNotify = *r->in.phNotify;
10859 0 : NDR_PULL_ALLOC(ndr, r->out.pfApcFired);
10860 0 : NDR_ZERO_STRUCTP(r->out.pfApcFired);
10861 : }
10862 0 : if (flags & NDR_OUT) {
10863 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10864 : if (r->in.phNotify == NULL) {
10865 : NDR_PULL_ALLOC(ndr, r->in.phNotify);
10866 : NDR_ZERO_STRUCTP(r->in.phNotify);
10867 : }
10868 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10869 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10870 0 : NDR_PULL_ALLOC(ndr, r->out.phNotify);
10871 : }
10872 0 : _mem_save_phNotify_0 = NDR_PULL_GET_MEM_CTX(ndr);
10873 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.phNotify, LIBNDR_FLAG_REF_ALLOC);
10874 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.phNotify));
10875 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_phNotify_0, LIBNDR_FLAG_REF_ALLOC);
10876 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10877 0 : NDR_PULL_ALLOC(ndr, r->out.pfApcFired);
10878 : }
10879 0 : _mem_save_pfApcFired_0 = NDR_PULL_GET_MEM_CTX(ndr);
10880 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pfApcFired, LIBNDR_FLAG_REF_ALLOC);
10881 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pfApcFired));
10882 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pfApcFired_0, LIBNDR_FLAG_REF_ALLOC);
10883 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
10884 : }
10885 0 : return NDR_ERR_SUCCESS;
10886 : }
10887 :
10888 0 : _PUBLIC_ void ndr_print_svcctl_CloseNotifyHandle(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_CloseNotifyHandle *r)
10889 : {
10890 0 : ndr_print_struct(ndr, name, "svcctl_CloseNotifyHandle");
10891 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10892 0 : ndr->depth++;
10893 0 : if (flags & NDR_SET_VALUES) {
10894 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10895 : }
10896 0 : if (flags & NDR_IN) {
10897 0 : ndr_print_struct(ndr, "in", "svcctl_CloseNotifyHandle");
10898 0 : ndr->depth++;
10899 0 : ndr_print_ptr(ndr, "phNotify", r->in.phNotify);
10900 0 : ndr->depth++;
10901 0 : ndr_print_policy_handle(ndr, "phNotify", r->in.phNotify);
10902 0 : ndr->depth--;
10903 0 : ndr->depth--;
10904 : }
10905 0 : if (flags & NDR_OUT) {
10906 0 : ndr_print_struct(ndr, "out", "svcctl_CloseNotifyHandle");
10907 0 : ndr->depth++;
10908 0 : ndr_print_ptr(ndr, "phNotify", r->out.phNotify);
10909 0 : ndr->depth++;
10910 0 : ndr_print_policy_handle(ndr, "phNotify", r->out.phNotify);
10911 0 : ndr->depth--;
10912 0 : ndr_print_ptr(ndr, "pfApcFired", r->out.pfApcFired);
10913 0 : ndr->depth++;
10914 0 : ndr_print_uint32(ndr, "pfApcFired", *r->out.pfApcFired);
10915 0 : ndr->depth--;
10916 0 : ndr_print_WERROR(ndr, "result", r->out.result);
10917 0 : ndr->depth--;
10918 : }
10919 0 : ndr->depth--;
10920 : }
10921 :
10922 0 : static enum ndr_err_code ndr_push_svcctl_ControlServiceExA(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_ControlServiceExA *r)
10923 : {
10924 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
10925 0 : if (flags & NDR_IN) {
10926 0 : if (r->in.pControlInParams == NULL) {
10927 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10928 : }
10929 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hService));
10930 0 : NDR_CHECK(ndr_push_SERVICE_CONTROL(ndr, NDR_SCALARS, r->in.dwControl));
10931 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwInfoLevel));
10932 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.pControlInParams, r->in.dwInfoLevel));
10933 0 : NDR_CHECK(ndr_push_SC_RPC_SERVICE_CONTROL_IN_PARAMSA(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pControlInParams));
10934 : }
10935 0 : if (flags & NDR_OUT) {
10936 0 : if (r->out.pControlOutParams == NULL) {
10937 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
10938 : }
10939 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.pControlOutParams, r->in.dwInfoLevel));
10940 0 : NDR_CHECK(ndr_push_SC_RPC_SERVICE_CONTROL_OUT_PARAMSA(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.pControlOutParams));
10941 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
10942 : }
10943 0 : return NDR_ERR_SUCCESS;
10944 : }
10945 :
10946 0 : static enum ndr_err_code ndr_pull_svcctl_ControlServiceExA(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_ControlServiceExA *r)
10947 : {
10948 0 : TALLOC_CTX *_mem_save_pControlInParams_0 = NULL;
10949 0 : TALLOC_CTX *_mem_save_pControlOutParams_0 = NULL;
10950 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
10951 0 : if (flags & NDR_IN) {
10952 0 : NDR_ZERO_STRUCT(r->out);
10953 :
10954 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hService));
10955 0 : NDR_CHECK(ndr_pull_SERVICE_CONTROL(ndr, NDR_SCALARS, &r->in.dwControl));
10956 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwInfoLevel));
10957 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10958 0 : NDR_PULL_ALLOC(ndr, r->in.pControlInParams);
10959 : }
10960 0 : _mem_save_pControlInParams_0 = NDR_PULL_GET_MEM_CTX(ndr);
10961 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pControlInParams, LIBNDR_FLAG_REF_ALLOC);
10962 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.pControlInParams, r->in.dwInfoLevel));
10963 0 : NDR_CHECK(ndr_pull_SC_RPC_SERVICE_CONTROL_IN_PARAMSA(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pControlInParams));
10964 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pControlInParams_0, LIBNDR_FLAG_REF_ALLOC);
10965 0 : NDR_PULL_ALLOC(ndr, r->out.pControlOutParams);
10966 0 : NDR_ZERO_STRUCTP(r->out.pControlOutParams);
10967 : }
10968 0 : if (flags & NDR_OUT) {
10969 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
10970 : if (r->in.pControlInParams == NULL) {
10971 : NDR_PULL_ALLOC(ndr, r->in.pControlInParams);
10972 : NDR_ZERO_STRUCTP(r->in.pControlInParams);
10973 : }
10974 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
10975 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
10976 0 : NDR_PULL_ALLOC(ndr, r->out.pControlOutParams);
10977 : }
10978 0 : _mem_save_pControlOutParams_0 = NDR_PULL_GET_MEM_CTX(ndr);
10979 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pControlOutParams, LIBNDR_FLAG_REF_ALLOC);
10980 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.pControlOutParams, r->in.dwInfoLevel));
10981 0 : NDR_CHECK(ndr_pull_SC_RPC_SERVICE_CONTROL_OUT_PARAMSA(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.pControlOutParams));
10982 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pControlOutParams_0, LIBNDR_FLAG_REF_ALLOC);
10983 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
10984 : }
10985 0 : return NDR_ERR_SUCCESS;
10986 : }
10987 :
10988 0 : _PUBLIC_ void ndr_print_svcctl_ControlServiceExA(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_ControlServiceExA *r)
10989 : {
10990 0 : ndr_print_struct(ndr, name, "svcctl_ControlServiceExA");
10991 0 : if (r == NULL) { ndr_print_null(ndr); return; }
10992 0 : ndr->depth++;
10993 0 : if (flags & NDR_SET_VALUES) {
10994 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
10995 : }
10996 0 : if (flags & NDR_IN) {
10997 0 : ndr_print_struct(ndr, "in", "svcctl_ControlServiceExA");
10998 0 : ndr->depth++;
10999 0 : ndr_print_policy_handle(ndr, "hService", &r->in.hService);
11000 0 : ndr_print_SERVICE_CONTROL(ndr, "dwControl", r->in.dwControl);
11001 0 : ndr_print_uint32(ndr, "dwInfoLevel", r->in.dwInfoLevel);
11002 0 : ndr_print_ptr(ndr, "pControlInParams", r->in.pControlInParams);
11003 0 : ndr->depth++;
11004 0 : ndr_print_set_switch_value(ndr, r->in.pControlInParams, r->in.dwInfoLevel);
11005 0 : ndr_print_SC_RPC_SERVICE_CONTROL_IN_PARAMSA(ndr, "pControlInParams", r->in.pControlInParams);
11006 0 : ndr->depth--;
11007 0 : ndr->depth--;
11008 : }
11009 0 : if (flags & NDR_OUT) {
11010 0 : ndr_print_struct(ndr, "out", "svcctl_ControlServiceExA");
11011 0 : ndr->depth++;
11012 0 : ndr_print_ptr(ndr, "pControlOutParams", r->out.pControlOutParams);
11013 0 : ndr->depth++;
11014 0 : ndr_print_set_switch_value(ndr, r->out.pControlOutParams, r->in.dwInfoLevel);
11015 0 : ndr_print_SC_RPC_SERVICE_CONTROL_OUT_PARAMSA(ndr, "pControlOutParams", r->out.pControlOutParams);
11016 0 : ndr->depth--;
11017 0 : ndr_print_WERROR(ndr, "result", r->out.result);
11018 0 : ndr->depth--;
11019 : }
11020 0 : ndr->depth--;
11021 : }
11022 :
11023 4 : static enum ndr_err_code ndr_push_svcctl_ControlServiceExW(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_ControlServiceExW *r)
11024 : {
11025 4 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11026 4 : if (flags & NDR_IN) {
11027 4 : if (r->in.pControlInParams == NULL) {
11028 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11029 : }
11030 4 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hService));
11031 4 : NDR_CHECK(ndr_push_SERVICE_CONTROL(ndr, NDR_SCALARS, r->in.dwControl));
11032 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwInfoLevel));
11033 4 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.pControlInParams, r->in.dwInfoLevel));
11034 4 : NDR_CHECK(ndr_push_SC_RPC_SERVICE_CONTROL_IN_PARAMSW(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pControlInParams));
11035 : }
11036 4 : if (flags & NDR_OUT) {
11037 0 : if (r->out.pControlOutParams == NULL) {
11038 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11039 : }
11040 0 : NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.pControlOutParams, r->in.dwInfoLevel));
11041 0 : NDR_CHECK(ndr_push_SC_RPC_SERVICE_CONTROL_OUT_PARAMSW(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.pControlOutParams));
11042 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
11043 : }
11044 4 : return NDR_ERR_SUCCESS;
11045 : }
11046 :
11047 4 : static enum ndr_err_code ndr_pull_svcctl_ControlServiceExW(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_ControlServiceExW *r)
11048 : {
11049 4 : TALLOC_CTX *_mem_save_pControlInParams_0 = NULL;
11050 4 : TALLOC_CTX *_mem_save_pControlOutParams_0 = NULL;
11051 4 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11052 4 : if (flags & NDR_IN) {
11053 4 : NDR_ZERO_STRUCT(r->out);
11054 :
11055 4 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hService));
11056 4 : NDR_CHECK(ndr_pull_SERVICE_CONTROL(ndr, NDR_SCALARS, &r->in.dwControl));
11057 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwInfoLevel));
11058 4 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11059 4 : NDR_PULL_ALLOC(ndr, r->in.pControlInParams);
11060 : }
11061 4 : _mem_save_pControlInParams_0 = NDR_PULL_GET_MEM_CTX(ndr);
11062 4 : NDR_PULL_SET_MEM_CTX(ndr, r->in.pControlInParams, LIBNDR_FLAG_REF_ALLOC);
11063 4 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.pControlInParams, r->in.dwInfoLevel));
11064 4 : NDR_CHECK(ndr_pull_SC_RPC_SERVICE_CONTROL_IN_PARAMSW(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.pControlInParams));
11065 4 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pControlInParams_0, LIBNDR_FLAG_REF_ALLOC);
11066 4 : NDR_PULL_ALLOC(ndr, r->out.pControlOutParams);
11067 4 : NDR_ZERO_STRUCTP(r->out.pControlOutParams);
11068 : }
11069 4 : if (flags & NDR_OUT) {
11070 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11071 : if (r->in.pControlInParams == NULL) {
11072 : NDR_PULL_ALLOC(ndr, r->in.pControlInParams);
11073 : NDR_ZERO_STRUCTP(r->in.pControlInParams);
11074 : }
11075 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11076 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11077 0 : NDR_PULL_ALLOC(ndr, r->out.pControlOutParams);
11078 : }
11079 0 : _mem_save_pControlOutParams_0 = NDR_PULL_GET_MEM_CTX(ndr);
11080 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pControlOutParams, LIBNDR_FLAG_REF_ALLOC);
11081 0 : NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.pControlOutParams, r->in.dwInfoLevel));
11082 0 : NDR_CHECK(ndr_pull_SC_RPC_SERVICE_CONTROL_OUT_PARAMSW(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.pControlOutParams));
11083 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pControlOutParams_0, LIBNDR_FLAG_REF_ALLOC);
11084 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
11085 : }
11086 4 : return NDR_ERR_SUCCESS;
11087 : }
11088 :
11089 0 : _PUBLIC_ void ndr_print_svcctl_ControlServiceExW(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_ControlServiceExW *r)
11090 : {
11091 0 : ndr_print_struct(ndr, name, "svcctl_ControlServiceExW");
11092 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11093 0 : ndr->depth++;
11094 0 : if (flags & NDR_SET_VALUES) {
11095 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11096 : }
11097 0 : if (flags & NDR_IN) {
11098 0 : ndr_print_struct(ndr, "in", "svcctl_ControlServiceExW");
11099 0 : ndr->depth++;
11100 0 : ndr_print_policy_handle(ndr, "hService", &r->in.hService);
11101 0 : ndr_print_SERVICE_CONTROL(ndr, "dwControl", r->in.dwControl);
11102 0 : ndr_print_uint32(ndr, "dwInfoLevel", r->in.dwInfoLevel);
11103 0 : ndr_print_ptr(ndr, "pControlInParams", r->in.pControlInParams);
11104 0 : ndr->depth++;
11105 0 : ndr_print_set_switch_value(ndr, r->in.pControlInParams, r->in.dwInfoLevel);
11106 0 : ndr_print_SC_RPC_SERVICE_CONTROL_IN_PARAMSW(ndr, "pControlInParams", r->in.pControlInParams);
11107 0 : ndr->depth--;
11108 0 : ndr->depth--;
11109 : }
11110 0 : if (flags & NDR_OUT) {
11111 0 : ndr_print_struct(ndr, "out", "svcctl_ControlServiceExW");
11112 0 : ndr->depth++;
11113 0 : ndr_print_ptr(ndr, "pControlOutParams", r->out.pControlOutParams);
11114 0 : ndr->depth++;
11115 0 : ndr_print_set_switch_value(ndr, r->out.pControlOutParams, r->in.dwInfoLevel);
11116 0 : ndr_print_SC_RPC_SERVICE_CONTROL_OUT_PARAMSW(ndr, "pControlOutParams", r->out.pControlOutParams);
11117 0 : ndr->depth--;
11118 0 : ndr_print_WERROR(ndr, "result", r->out.result);
11119 0 : ndr->depth--;
11120 : }
11121 0 : ndr->depth--;
11122 : }
11123 :
11124 0 : static enum ndr_err_code ndr_push_Opnum52NotUsedOnWire(struct ndr_push *ndr, ndr_flags_type flags, const struct Opnum52NotUsedOnWire *r)
11125 : {
11126 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11127 0 : if (flags & NDR_IN) {
11128 : }
11129 0 : if (flags & NDR_OUT) {
11130 : }
11131 0 : return NDR_ERR_SUCCESS;
11132 : }
11133 :
11134 0 : static enum ndr_err_code ndr_pull_Opnum52NotUsedOnWire(struct ndr_pull *ndr, ndr_flags_type flags, struct Opnum52NotUsedOnWire *r)
11135 : {
11136 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11137 0 : if (flags & NDR_IN) {
11138 : }
11139 0 : if (flags & NDR_OUT) {
11140 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11141 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11142 : }
11143 0 : return NDR_ERR_SUCCESS;
11144 : }
11145 :
11146 0 : _PUBLIC_ void ndr_print_Opnum52NotUsedOnWire(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct Opnum52NotUsedOnWire *r)
11147 : {
11148 0 : ndr_print_struct(ndr, name, "Opnum52NotUsedOnWire");
11149 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11150 0 : ndr->depth++;
11151 0 : if (flags & NDR_SET_VALUES) {
11152 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11153 : }
11154 0 : if (flags & NDR_IN) {
11155 0 : ndr_print_struct(ndr, "in", "Opnum52NotUsedOnWire");
11156 0 : ndr->depth++;
11157 0 : ndr->depth--;
11158 : }
11159 0 : if (flags & NDR_OUT) {
11160 0 : ndr_print_struct(ndr, "out", "Opnum52NotUsedOnWire");
11161 0 : ndr->depth++;
11162 0 : ndr->depth--;
11163 : }
11164 0 : ndr->depth--;
11165 : }
11166 :
11167 0 : static enum ndr_err_code ndr_push_Opnum53NotUsedOnWire(struct ndr_push *ndr, ndr_flags_type flags, const struct Opnum53NotUsedOnWire *r)
11168 : {
11169 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11170 0 : if (flags & NDR_IN) {
11171 : }
11172 0 : if (flags & NDR_OUT) {
11173 : }
11174 0 : return NDR_ERR_SUCCESS;
11175 : }
11176 :
11177 0 : static enum ndr_err_code ndr_pull_Opnum53NotUsedOnWire(struct ndr_pull *ndr, ndr_flags_type flags, struct Opnum53NotUsedOnWire *r)
11178 : {
11179 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11180 0 : if (flags & NDR_IN) {
11181 : }
11182 0 : if (flags & NDR_OUT) {
11183 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11184 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11185 : }
11186 0 : return NDR_ERR_SUCCESS;
11187 : }
11188 :
11189 0 : _PUBLIC_ void ndr_print_Opnum53NotUsedOnWire(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct Opnum53NotUsedOnWire *r)
11190 : {
11191 0 : ndr_print_struct(ndr, name, "Opnum53NotUsedOnWire");
11192 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11193 0 : ndr->depth++;
11194 0 : if (flags & NDR_SET_VALUES) {
11195 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11196 : }
11197 0 : if (flags & NDR_IN) {
11198 0 : ndr_print_struct(ndr, "in", "Opnum53NotUsedOnWire");
11199 0 : ndr->depth++;
11200 0 : ndr->depth--;
11201 : }
11202 0 : if (flags & NDR_OUT) {
11203 0 : ndr_print_struct(ndr, "out", "Opnum53NotUsedOnWire");
11204 0 : ndr->depth++;
11205 0 : ndr->depth--;
11206 : }
11207 0 : ndr->depth--;
11208 : }
11209 :
11210 0 : static enum ndr_err_code ndr_push_Opnum54NotUsedOnWire(struct ndr_push *ndr, ndr_flags_type flags, const struct Opnum54NotUsedOnWire *r)
11211 : {
11212 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11213 0 : if (flags & NDR_IN) {
11214 : }
11215 0 : if (flags & NDR_OUT) {
11216 : }
11217 0 : return NDR_ERR_SUCCESS;
11218 : }
11219 :
11220 0 : static enum ndr_err_code ndr_pull_Opnum54NotUsedOnWire(struct ndr_pull *ndr, ndr_flags_type flags, struct Opnum54NotUsedOnWire *r)
11221 : {
11222 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11223 0 : if (flags & NDR_IN) {
11224 : }
11225 0 : if (flags & NDR_OUT) {
11226 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11227 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11228 : }
11229 0 : return NDR_ERR_SUCCESS;
11230 : }
11231 :
11232 0 : _PUBLIC_ void ndr_print_Opnum54NotUsedOnWire(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct Opnum54NotUsedOnWire *r)
11233 : {
11234 0 : ndr_print_struct(ndr, name, "Opnum54NotUsedOnWire");
11235 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11236 0 : ndr->depth++;
11237 0 : if (flags & NDR_SET_VALUES) {
11238 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11239 : }
11240 0 : if (flags & NDR_IN) {
11241 0 : ndr_print_struct(ndr, "in", "Opnum54NotUsedOnWire");
11242 0 : ndr->depth++;
11243 0 : ndr->depth--;
11244 : }
11245 0 : if (flags & NDR_OUT) {
11246 0 : ndr_print_struct(ndr, "out", "Opnum54NotUsedOnWire");
11247 0 : ndr->depth++;
11248 0 : ndr->depth--;
11249 : }
11250 0 : ndr->depth--;
11251 : }
11252 :
11253 0 : static enum ndr_err_code ndr_push_Opnum55NotUsedOnWire(struct ndr_push *ndr, ndr_flags_type flags, const struct Opnum55NotUsedOnWire *r)
11254 : {
11255 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11256 0 : if (flags & NDR_IN) {
11257 : }
11258 0 : if (flags & NDR_OUT) {
11259 : }
11260 0 : return NDR_ERR_SUCCESS;
11261 : }
11262 :
11263 0 : static enum ndr_err_code ndr_pull_Opnum55NotUsedOnWire(struct ndr_pull *ndr, ndr_flags_type flags, struct Opnum55NotUsedOnWire *r)
11264 : {
11265 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11266 0 : if (flags & NDR_IN) {
11267 : }
11268 0 : if (flags & NDR_OUT) {
11269 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11270 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11271 : }
11272 0 : return NDR_ERR_SUCCESS;
11273 : }
11274 :
11275 0 : _PUBLIC_ void ndr_print_Opnum55NotUsedOnWire(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct Opnum55NotUsedOnWire *r)
11276 : {
11277 0 : ndr_print_struct(ndr, name, "Opnum55NotUsedOnWire");
11278 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11279 0 : ndr->depth++;
11280 0 : if (flags & NDR_SET_VALUES) {
11281 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11282 : }
11283 0 : if (flags & NDR_IN) {
11284 0 : ndr_print_struct(ndr, "in", "Opnum55NotUsedOnWire");
11285 0 : ndr->depth++;
11286 0 : ndr->depth--;
11287 : }
11288 0 : if (flags & NDR_OUT) {
11289 0 : ndr_print_struct(ndr, "out", "Opnum55NotUsedOnWire");
11290 0 : ndr->depth++;
11291 0 : ndr->depth--;
11292 : }
11293 0 : ndr->depth--;
11294 : }
11295 :
11296 4 : static enum ndr_err_code ndr_push_svcctl_QueryServiceConfigEx(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_QueryServiceConfigEx *r)
11297 : {
11298 4 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11299 4 : if (flags & NDR_IN) {
11300 4 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hService));
11301 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwInfoLevel));
11302 : }
11303 4 : if (flags & NDR_OUT) {
11304 0 : if (r->out.pInfo == NULL) {
11305 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11306 : }
11307 0 : NDR_CHECK(ndr_push_SC_RPC_CONFIG_INFOW(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.pInfo));
11308 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
11309 : }
11310 4 : return NDR_ERR_SUCCESS;
11311 : }
11312 :
11313 4 : static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfigEx(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_QueryServiceConfigEx *r)
11314 : {
11315 4 : TALLOC_CTX *_mem_save_pInfo_0 = NULL;
11316 4 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11317 4 : if (flags & NDR_IN) {
11318 4 : NDR_ZERO_STRUCT(r->out);
11319 :
11320 4 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hService));
11321 4 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwInfoLevel));
11322 4 : NDR_PULL_ALLOC(ndr, r->out.pInfo);
11323 4 : NDR_ZERO_STRUCTP(r->out.pInfo);
11324 : }
11325 4 : if (flags & NDR_OUT) {
11326 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11327 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11328 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11329 0 : NDR_PULL_ALLOC(ndr, r->out.pInfo);
11330 : }
11331 0 : _mem_save_pInfo_0 = NDR_PULL_GET_MEM_CTX(ndr);
11332 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.pInfo, LIBNDR_FLAG_REF_ALLOC);
11333 0 : NDR_CHECK(ndr_pull_SC_RPC_CONFIG_INFOW(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.pInfo));
11334 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pInfo_0, LIBNDR_FLAG_REF_ALLOC);
11335 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
11336 : }
11337 4 : return NDR_ERR_SUCCESS;
11338 : }
11339 :
11340 0 : _PUBLIC_ void ndr_print_svcctl_QueryServiceConfigEx(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_QueryServiceConfigEx *r)
11341 : {
11342 0 : ndr_print_struct(ndr, name, "svcctl_QueryServiceConfigEx");
11343 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11344 0 : ndr->depth++;
11345 0 : if (flags & NDR_SET_VALUES) {
11346 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11347 : }
11348 0 : if (flags & NDR_IN) {
11349 0 : ndr_print_struct(ndr, "in", "svcctl_QueryServiceConfigEx");
11350 0 : ndr->depth++;
11351 0 : ndr_print_policy_handle(ndr, "hService", &r->in.hService);
11352 0 : ndr_print_uint32(ndr, "dwInfoLevel", r->in.dwInfoLevel);
11353 0 : ndr->depth--;
11354 : }
11355 0 : if (flags & NDR_OUT) {
11356 0 : ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfigEx");
11357 0 : ndr->depth++;
11358 0 : ndr_print_ptr(ndr, "pInfo", r->out.pInfo);
11359 0 : ndr->depth++;
11360 0 : ndr_print_SC_RPC_CONFIG_INFOW(ndr, "pInfo", r->out.pInfo);
11361 0 : ndr->depth--;
11362 0 : ndr_print_WERROR(ndr, "result", r->out.result);
11363 0 : ndr->depth--;
11364 : }
11365 0 : ndr->depth--;
11366 : }
11367 :
11368 0 : static enum ndr_err_code ndr_push_Opnum57NotUsedOnWire(struct ndr_push *ndr, ndr_flags_type flags, const struct Opnum57NotUsedOnWire *r)
11369 : {
11370 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11371 0 : if (flags & NDR_IN) {
11372 : }
11373 0 : if (flags & NDR_OUT) {
11374 : }
11375 0 : return NDR_ERR_SUCCESS;
11376 : }
11377 :
11378 0 : static enum ndr_err_code ndr_pull_Opnum57NotUsedOnWire(struct ndr_pull *ndr, ndr_flags_type flags, struct Opnum57NotUsedOnWire *r)
11379 : {
11380 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11381 0 : if (flags & NDR_IN) {
11382 : }
11383 0 : if (flags & NDR_OUT) {
11384 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11385 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11386 : }
11387 0 : return NDR_ERR_SUCCESS;
11388 : }
11389 :
11390 0 : _PUBLIC_ void ndr_print_Opnum57NotUsedOnWire(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct Opnum57NotUsedOnWire *r)
11391 : {
11392 0 : ndr_print_struct(ndr, name, "Opnum57NotUsedOnWire");
11393 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11394 0 : ndr->depth++;
11395 0 : if (flags & NDR_SET_VALUES) {
11396 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11397 : }
11398 0 : if (flags & NDR_IN) {
11399 0 : ndr_print_struct(ndr, "in", "Opnum57NotUsedOnWire");
11400 0 : ndr->depth++;
11401 0 : ndr->depth--;
11402 : }
11403 0 : if (flags & NDR_OUT) {
11404 0 : ndr_print_struct(ndr, "out", "Opnum57NotUsedOnWire");
11405 0 : ndr->depth++;
11406 0 : ndr->depth--;
11407 : }
11408 0 : ndr->depth--;
11409 : }
11410 :
11411 0 : static enum ndr_err_code ndr_push_Opnum58NotUsedOnWire(struct ndr_push *ndr, ndr_flags_type flags, const struct Opnum58NotUsedOnWire *r)
11412 : {
11413 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11414 0 : if (flags & NDR_IN) {
11415 : }
11416 0 : if (flags & NDR_OUT) {
11417 : }
11418 0 : return NDR_ERR_SUCCESS;
11419 : }
11420 :
11421 0 : static enum ndr_err_code ndr_pull_Opnum58NotUsedOnWire(struct ndr_pull *ndr, ndr_flags_type flags, struct Opnum58NotUsedOnWire *r)
11422 : {
11423 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11424 0 : if (flags & NDR_IN) {
11425 : }
11426 0 : if (flags & NDR_OUT) {
11427 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11428 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11429 : }
11430 0 : return NDR_ERR_SUCCESS;
11431 : }
11432 :
11433 0 : _PUBLIC_ void ndr_print_Opnum58NotUsedOnWire(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct Opnum58NotUsedOnWire *r)
11434 : {
11435 0 : ndr_print_struct(ndr, name, "Opnum58NotUsedOnWire");
11436 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11437 0 : ndr->depth++;
11438 0 : if (flags & NDR_SET_VALUES) {
11439 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11440 : }
11441 0 : if (flags & NDR_IN) {
11442 0 : ndr_print_struct(ndr, "in", "Opnum58NotUsedOnWire");
11443 0 : ndr->depth++;
11444 0 : ndr->depth--;
11445 : }
11446 0 : if (flags & NDR_OUT) {
11447 0 : ndr_print_struct(ndr, "out", "Opnum58NotUsedOnWire");
11448 0 : ndr->depth++;
11449 0 : ndr->depth--;
11450 : }
11451 0 : ndr->depth--;
11452 : }
11453 :
11454 0 : static enum ndr_err_code ndr_push_Opnum59NotUsedOnWire(struct ndr_push *ndr, ndr_flags_type flags, const struct Opnum59NotUsedOnWire *r)
11455 : {
11456 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11457 0 : if (flags & NDR_IN) {
11458 : }
11459 0 : if (flags & NDR_OUT) {
11460 : }
11461 0 : return NDR_ERR_SUCCESS;
11462 : }
11463 :
11464 0 : static enum ndr_err_code ndr_pull_Opnum59NotUsedOnWire(struct ndr_pull *ndr, ndr_flags_type flags, struct Opnum59NotUsedOnWire *r)
11465 : {
11466 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11467 0 : if (flags & NDR_IN) {
11468 : }
11469 0 : if (flags & NDR_OUT) {
11470 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11471 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11472 : }
11473 0 : return NDR_ERR_SUCCESS;
11474 : }
11475 :
11476 0 : _PUBLIC_ void ndr_print_Opnum59NotUsedOnWire(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct Opnum59NotUsedOnWire *r)
11477 : {
11478 0 : ndr_print_struct(ndr, name, "Opnum59NotUsedOnWire");
11479 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11480 0 : ndr->depth++;
11481 0 : if (flags & NDR_SET_VALUES) {
11482 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11483 : }
11484 0 : if (flags & NDR_IN) {
11485 0 : ndr_print_struct(ndr, "in", "Opnum59NotUsedOnWire");
11486 0 : ndr->depth++;
11487 0 : ndr->depth--;
11488 : }
11489 0 : if (flags & NDR_OUT) {
11490 0 : ndr_print_struct(ndr, "out", "Opnum59NotUsedOnWire");
11491 0 : ndr->depth++;
11492 0 : ndr->depth--;
11493 : }
11494 0 : ndr->depth--;
11495 : }
11496 :
11497 0 : static enum ndr_err_code ndr_push_svcctl_CreateWowService(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_CreateWowService *r)
11498 : {
11499 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11500 0 : if (flags & NDR_IN) {
11501 0 : if (r->in.lpServiceName == NULL) {
11502 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11503 : }
11504 0 : if (r->in.lpBinaryPathName == NULL) {
11505 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11506 : }
11507 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.hSCManager));
11508 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.lpServiceName, CH_UTF16)));
11509 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11510 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.lpServiceName, CH_UTF16)));
11511 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.lpServiceName, ndr_charset_length(r->in.lpServiceName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11512 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lpDisplayName));
11513 0 : if (r->in.lpDisplayName) {
11514 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.lpDisplayName, CH_UTF16)));
11515 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11516 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.lpDisplayName, CH_UTF16)));
11517 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.lpDisplayName, ndr_charset_length(r->in.lpDisplayName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11518 : }
11519 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwDesiredAccess));
11520 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwServiceType));
11521 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwStartType));
11522 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwErrorControl));
11523 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.lpBinaryPathName, CH_UTF16)));
11524 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11525 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.lpBinaryPathName, CH_UTF16)));
11526 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.lpBinaryPathName, ndr_charset_length(r->in.lpBinaryPathName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11527 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lpLoadOrderGroup));
11528 0 : if (r->in.lpLoadOrderGroup) {
11529 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.lpLoadOrderGroup, CH_UTF16)));
11530 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11531 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.lpLoadOrderGroup, CH_UTF16)));
11532 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.lpLoadOrderGroup, ndr_charset_length(r->in.lpLoadOrderGroup, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11533 : }
11534 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lpdwTagId));
11535 0 : if (r->in.lpdwTagId) {
11536 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.lpdwTagId));
11537 : }
11538 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lpDependencies));
11539 0 : if (r->in.lpDependencies) {
11540 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.dwDependSize));
11541 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.lpDependencies, r->in.dwDependSize));
11542 : }
11543 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwDependSize));
11544 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lpServiceStartName));
11545 0 : if (r->in.lpServiceStartName) {
11546 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.lpServiceStartName, CH_UTF16)));
11547 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11548 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.lpServiceStartName, CH_UTF16)));
11549 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.lpServiceStartName, ndr_charset_length(r->in.lpServiceStartName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11550 : }
11551 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.lpPassword));
11552 0 : if (r->in.lpPassword) {
11553 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.dwPwSize));
11554 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.lpPassword, r->in.dwPwSize));
11555 : }
11556 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwPwSize));
11557 0 : NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.dwServiceWowType));
11558 : }
11559 0 : if (flags & NDR_OUT) {
11560 0 : if (r->out.lpServiceHandle == NULL) {
11561 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11562 : }
11563 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.lpdwTagId));
11564 0 : if (r->out.lpdwTagId) {
11565 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.lpdwTagId));
11566 : }
11567 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.lpServiceHandle));
11568 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
11569 : }
11570 0 : return NDR_ERR_SUCCESS;
11571 : }
11572 :
11573 0 : static enum ndr_err_code ndr_pull_svcctl_CreateWowService(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_CreateWowService *r)
11574 : {
11575 0 : uint32_t size_lpServiceName_1 = 0;
11576 0 : uint32_t length_lpServiceName_1 = 0;
11577 0 : uint32_t _ptr_lpDisplayName;
11578 0 : uint32_t size_lpDisplayName_1 = 0;
11579 0 : uint32_t length_lpDisplayName_1 = 0;
11580 0 : uint32_t size_lpBinaryPathName_1 = 0;
11581 0 : uint32_t length_lpBinaryPathName_1 = 0;
11582 0 : uint32_t _ptr_lpLoadOrderGroup;
11583 0 : uint32_t size_lpLoadOrderGroup_1 = 0;
11584 0 : uint32_t length_lpLoadOrderGroup_1 = 0;
11585 0 : uint32_t _ptr_lpdwTagId;
11586 0 : uint32_t _ptr_lpDependencies;
11587 0 : uint32_t size_lpDependencies_1 = 0;
11588 0 : uint32_t _ptr_lpServiceStartName;
11589 0 : uint32_t size_lpServiceStartName_1 = 0;
11590 0 : uint32_t length_lpServiceStartName_1 = 0;
11591 0 : uint32_t _ptr_lpPassword;
11592 0 : uint32_t size_lpPassword_1 = 0;
11593 0 : TALLOC_CTX *_mem_save_lpDisplayName_0 = NULL;
11594 0 : TALLOC_CTX *_mem_save_lpLoadOrderGroup_0 = NULL;
11595 0 : TALLOC_CTX *_mem_save_lpdwTagId_0 = NULL;
11596 0 : TALLOC_CTX *_mem_save_lpDependencies_0 = NULL;
11597 0 : TALLOC_CTX *_mem_save_lpServiceStartName_0 = NULL;
11598 0 : TALLOC_CTX *_mem_save_lpPassword_0 = NULL;
11599 0 : TALLOC_CTX *_mem_save_lpServiceHandle_0 = NULL;
11600 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11601 0 : if (flags & NDR_IN) {
11602 0 : NDR_ZERO_STRUCT(r->out);
11603 :
11604 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.hSCManager));
11605 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.lpServiceName));
11606 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.lpServiceName));
11607 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.lpServiceName, &size_lpServiceName_1));
11608 0 : if (size_lpServiceName_1 > SC_MAX_NAME_LENGTH) {
11609 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_lpServiceName_1, (uint32_t)(0), (uint32_t)(SC_MAX_NAME_LENGTH));
11610 : }
11611 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.lpServiceName, &length_lpServiceName_1));
11612 0 : if (length_lpServiceName_1 > SC_MAX_NAME_LENGTH) {
11613 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_lpServiceName_1, (uint32_t)(0), (uint32_t)(SC_MAX_NAME_LENGTH));
11614 : }
11615 0 : if (length_lpServiceName_1 > size_lpServiceName_1) {
11616 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_lpServiceName_1, length_lpServiceName_1);
11617 : }
11618 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_lpServiceName_1, sizeof(uint16_t)));
11619 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.lpServiceName, length_lpServiceName_1, sizeof(uint16_t), CH_UTF16));
11620 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lpDisplayName));
11621 0 : if (_ptr_lpDisplayName) {
11622 0 : NDR_PULL_ALLOC(ndr, r->in.lpDisplayName);
11623 : } else {
11624 0 : r->in.lpDisplayName = NULL;
11625 : }
11626 0 : if (r->in.lpDisplayName) {
11627 0 : _mem_save_lpDisplayName_0 = NDR_PULL_GET_MEM_CTX(ndr);
11628 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.lpDisplayName, 0);
11629 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.lpDisplayName));
11630 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.lpDisplayName));
11631 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.lpDisplayName, &size_lpDisplayName_1));
11632 0 : if (size_lpDisplayName_1 > SC_MAX_NAME_LENGTH) {
11633 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_lpDisplayName_1, (uint32_t)(0), (uint32_t)(SC_MAX_NAME_LENGTH));
11634 : }
11635 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.lpDisplayName, &length_lpDisplayName_1));
11636 0 : if (length_lpDisplayName_1 > SC_MAX_NAME_LENGTH) {
11637 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_lpDisplayName_1, (uint32_t)(0), (uint32_t)(SC_MAX_NAME_LENGTH));
11638 : }
11639 0 : if (length_lpDisplayName_1 > size_lpDisplayName_1) {
11640 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_lpDisplayName_1, length_lpDisplayName_1);
11641 : }
11642 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_lpDisplayName_1, sizeof(uint16_t)));
11643 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.lpDisplayName, length_lpDisplayName_1, sizeof(uint16_t), CH_UTF16));
11644 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lpDisplayName_0, 0);
11645 : }
11646 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwDesiredAccess));
11647 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwServiceType));
11648 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwStartType));
11649 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwErrorControl));
11650 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.lpBinaryPathName));
11651 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.lpBinaryPathName));
11652 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.lpBinaryPathName, &size_lpBinaryPathName_1));
11653 0 : if (size_lpBinaryPathName_1 > SC_MAX_PATH_LENGTH) {
11654 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_lpBinaryPathName_1, (uint32_t)(0), (uint32_t)(SC_MAX_PATH_LENGTH));
11655 : }
11656 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.lpBinaryPathName, &length_lpBinaryPathName_1));
11657 0 : if (length_lpBinaryPathName_1 > SC_MAX_PATH_LENGTH) {
11658 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_lpBinaryPathName_1, (uint32_t)(0), (uint32_t)(SC_MAX_PATH_LENGTH));
11659 : }
11660 0 : if (length_lpBinaryPathName_1 > size_lpBinaryPathName_1) {
11661 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_lpBinaryPathName_1, length_lpBinaryPathName_1);
11662 : }
11663 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_lpBinaryPathName_1, sizeof(uint16_t)));
11664 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.lpBinaryPathName, length_lpBinaryPathName_1, sizeof(uint16_t), CH_UTF16));
11665 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lpLoadOrderGroup));
11666 0 : if (_ptr_lpLoadOrderGroup) {
11667 0 : NDR_PULL_ALLOC(ndr, r->in.lpLoadOrderGroup);
11668 : } else {
11669 0 : r->in.lpLoadOrderGroup = NULL;
11670 : }
11671 0 : if (r->in.lpLoadOrderGroup) {
11672 0 : _mem_save_lpLoadOrderGroup_0 = NDR_PULL_GET_MEM_CTX(ndr);
11673 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.lpLoadOrderGroup, 0);
11674 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.lpLoadOrderGroup));
11675 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.lpLoadOrderGroup));
11676 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.lpLoadOrderGroup, &size_lpLoadOrderGroup_1));
11677 0 : if (size_lpLoadOrderGroup_1 > SC_MAX_NAME_LENGTH) {
11678 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_lpLoadOrderGroup_1, (uint32_t)(0), (uint32_t)(SC_MAX_NAME_LENGTH));
11679 : }
11680 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.lpLoadOrderGroup, &length_lpLoadOrderGroup_1));
11681 0 : if (length_lpLoadOrderGroup_1 > SC_MAX_NAME_LENGTH) {
11682 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_lpLoadOrderGroup_1, (uint32_t)(0), (uint32_t)(SC_MAX_NAME_LENGTH));
11683 : }
11684 0 : if (length_lpLoadOrderGroup_1 > size_lpLoadOrderGroup_1) {
11685 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_lpLoadOrderGroup_1, length_lpLoadOrderGroup_1);
11686 : }
11687 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_lpLoadOrderGroup_1, sizeof(uint16_t)));
11688 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.lpLoadOrderGroup, length_lpLoadOrderGroup_1, sizeof(uint16_t), CH_UTF16));
11689 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lpLoadOrderGroup_0, 0);
11690 : }
11691 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lpdwTagId));
11692 0 : if (_ptr_lpdwTagId) {
11693 0 : NDR_PULL_ALLOC(ndr, r->in.lpdwTagId);
11694 : } else {
11695 0 : r->in.lpdwTagId = NULL;
11696 : }
11697 0 : if (r->in.lpdwTagId) {
11698 0 : _mem_save_lpdwTagId_0 = NDR_PULL_GET_MEM_CTX(ndr);
11699 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.lpdwTagId, 0);
11700 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.lpdwTagId));
11701 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lpdwTagId_0, 0);
11702 : }
11703 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lpDependencies));
11704 0 : if (_ptr_lpDependencies) {
11705 0 : NDR_PULL_ALLOC(ndr, r->in.lpDependencies);
11706 : } else {
11707 0 : r->in.lpDependencies = NULL;
11708 : }
11709 0 : if (r->in.lpDependencies) {
11710 0 : _mem_save_lpDependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
11711 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.lpDependencies, 0);
11712 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.lpDependencies));
11713 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.lpDependencies, &size_lpDependencies_1));
11714 0 : NDR_PULL_ALLOC_N(ndr, r->in.lpDependencies, size_lpDependencies_1);
11715 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.lpDependencies, size_lpDependencies_1));
11716 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lpDependencies_0, 0);
11717 : }
11718 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwDependSize));
11719 0 : if (r->in.dwDependSize > SC_MAX_DEPEND_SIZE) {
11720 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->in.dwDependSize), (uint32_t)(0), (uint32_t)(SC_MAX_DEPEND_SIZE));
11721 : }
11722 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lpServiceStartName));
11723 0 : if (_ptr_lpServiceStartName) {
11724 0 : NDR_PULL_ALLOC(ndr, r->in.lpServiceStartName);
11725 : } else {
11726 0 : r->in.lpServiceStartName = NULL;
11727 : }
11728 0 : if (r->in.lpServiceStartName) {
11729 0 : _mem_save_lpServiceStartName_0 = NDR_PULL_GET_MEM_CTX(ndr);
11730 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.lpServiceStartName, 0);
11731 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.lpServiceStartName));
11732 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.lpServiceStartName));
11733 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.lpServiceStartName, &size_lpServiceStartName_1));
11734 0 : if (size_lpServiceStartName_1 > SC_MAX_ACCOUNT_NAME_LENGTH) {
11735 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_lpServiceStartName_1, (uint32_t)(0), (uint32_t)(SC_MAX_ACCOUNT_NAME_LENGTH));
11736 : }
11737 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.lpServiceStartName, &length_lpServiceStartName_1));
11738 0 : if (length_lpServiceStartName_1 > SC_MAX_ACCOUNT_NAME_LENGTH) {
11739 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_lpServiceStartName_1, (uint32_t)(0), (uint32_t)(SC_MAX_ACCOUNT_NAME_LENGTH));
11740 : }
11741 0 : if (length_lpServiceStartName_1 > size_lpServiceStartName_1) {
11742 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_lpServiceStartName_1, length_lpServiceStartName_1);
11743 : }
11744 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_lpServiceStartName_1, sizeof(uint16_t)));
11745 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.lpServiceStartName, length_lpServiceStartName_1, sizeof(uint16_t), CH_UTF16));
11746 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lpServiceStartName_0, 0);
11747 : }
11748 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lpPassword));
11749 0 : if (_ptr_lpPassword) {
11750 0 : NDR_PULL_ALLOC(ndr, r->in.lpPassword);
11751 : } else {
11752 0 : r->in.lpPassword = NULL;
11753 : }
11754 0 : if (r->in.lpPassword) {
11755 0 : _mem_save_lpPassword_0 = NDR_PULL_GET_MEM_CTX(ndr);
11756 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.lpPassword, 0);
11757 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.lpPassword));
11758 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.lpPassword, &size_lpPassword_1));
11759 0 : NDR_PULL_ALLOC_N(ndr, r->in.lpPassword, size_lpPassword_1);
11760 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.lpPassword, size_lpPassword_1));
11761 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lpPassword_0, 0);
11762 : }
11763 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwPwSize));
11764 0 : if (r->in.dwPwSize > SC_MAX_PWD_SIZE) {
11765 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->in.dwPwSize), (uint32_t)(0), (uint32_t)(SC_MAX_PWD_SIZE));
11766 : }
11767 0 : NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.dwServiceWowType));
11768 0 : NDR_PULL_ALLOC(ndr, r->out.lpServiceHandle);
11769 0 : NDR_ZERO_STRUCTP(r->out.lpServiceHandle);
11770 0 : if (r->in.lpDependencies) {
11771 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.lpDependencies, r->in.dwDependSize));
11772 : }
11773 0 : if (r->in.lpPassword) {
11774 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.lpPassword, r->in.dwPwSize));
11775 : }
11776 : }
11777 0 : if (flags & NDR_OUT) {
11778 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11779 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11780 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_lpdwTagId));
11781 0 : if (_ptr_lpdwTagId) {
11782 0 : NDR_PULL_ALLOC(ndr, r->out.lpdwTagId);
11783 : } else {
11784 0 : r->out.lpdwTagId = NULL;
11785 : }
11786 0 : if (r->out.lpdwTagId) {
11787 0 : _mem_save_lpdwTagId_0 = NDR_PULL_GET_MEM_CTX(ndr);
11788 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.lpdwTagId, 0);
11789 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.lpdwTagId));
11790 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lpdwTagId_0, 0);
11791 : }
11792 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11793 0 : NDR_PULL_ALLOC(ndr, r->out.lpServiceHandle);
11794 : }
11795 0 : _mem_save_lpServiceHandle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11796 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.lpServiceHandle, LIBNDR_FLAG_REF_ALLOC);
11797 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.lpServiceHandle));
11798 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lpServiceHandle_0, LIBNDR_FLAG_REF_ALLOC);
11799 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
11800 : }
11801 0 : return NDR_ERR_SUCCESS;
11802 : }
11803 :
11804 0 : _PUBLIC_ void ndr_print_svcctl_CreateWowService(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_CreateWowService *r)
11805 : {
11806 0 : ndr_print_struct(ndr, name, "svcctl_CreateWowService");
11807 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11808 0 : ndr->depth++;
11809 0 : if (flags & NDR_SET_VALUES) {
11810 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11811 : }
11812 0 : if (flags & NDR_IN) {
11813 0 : ndr_print_struct(ndr, "in", "svcctl_CreateWowService");
11814 0 : ndr->depth++;
11815 0 : ndr_print_policy_handle(ndr, "hSCManager", &r->in.hSCManager);
11816 0 : ndr_print_ptr(ndr, "lpServiceName", r->in.lpServiceName);
11817 0 : ndr->depth++;
11818 0 : ndr_print_string(ndr, "lpServiceName", r->in.lpServiceName);
11819 0 : ndr->depth--;
11820 0 : ndr_print_ptr(ndr, "lpDisplayName", r->in.lpDisplayName);
11821 0 : ndr->depth++;
11822 0 : if (r->in.lpDisplayName) {
11823 0 : ndr_print_string(ndr, "lpDisplayName", r->in.lpDisplayName);
11824 : }
11825 0 : ndr->depth--;
11826 0 : ndr_print_uint32(ndr, "dwDesiredAccess", r->in.dwDesiredAccess);
11827 0 : ndr_print_uint32(ndr, "dwServiceType", r->in.dwServiceType);
11828 0 : ndr_print_uint32(ndr, "dwStartType", r->in.dwStartType);
11829 0 : ndr_print_uint32(ndr, "dwErrorControl", r->in.dwErrorControl);
11830 0 : ndr_print_ptr(ndr, "lpBinaryPathName", r->in.lpBinaryPathName);
11831 0 : ndr->depth++;
11832 0 : ndr_print_string(ndr, "lpBinaryPathName", r->in.lpBinaryPathName);
11833 0 : ndr->depth--;
11834 0 : ndr_print_ptr(ndr, "lpLoadOrderGroup", r->in.lpLoadOrderGroup);
11835 0 : ndr->depth++;
11836 0 : if (r->in.lpLoadOrderGroup) {
11837 0 : ndr_print_string(ndr, "lpLoadOrderGroup", r->in.lpLoadOrderGroup);
11838 : }
11839 0 : ndr->depth--;
11840 0 : ndr_print_ptr(ndr, "lpdwTagId", r->in.lpdwTagId);
11841 0 : ndr->depth++;
11842 0 : if (r->in.lpdwTagId) {
11843 0 : ndr_print_uint32(ndr, "lpdwTagId", *r->in.lpdwTagId);
11844 : }
11845 0 : ndr->depth--;
11846 0 : ndr_print_ptr(ndr, "lpDependencies", r->in.lpDependencies);
11847 0 : ndr->depth++;
11848 0 : if (r->in.lpDependencies) {
11849 0 : ndr_print_array_uint8(ndr, "lpDependencies", r->in.lpDependencies, r->in.dwDependSize);
11850 : }
11851 0 : ndr->depth--;
11852 0 : ndr_print_uint32(ndr, "dwDependSize", r->in.dwDependSize);
11853 0 : ndr_print_ptr(ndr, "lpServiceStartName", r->in.lpServiceStartName);
11854 0 : ndr->depth++;
11855 0 : if (r->in.lpServiceStartName) {
11856 0 : ndr_print_string(ndr, "lpServiceStartName", r->in.lpServiceStartName);
11857 : }
11858 0 : ndr->depth--;
11859 0 : ndr_print_ptr(ndr, "lpPassword", r->in.lpPassword);
11860 0 : ndr->depth++;
11861 0 : if (r->in.lpPassword) {
11862 0 : ndr_print_array_uint8(ndr, "lpPassword", r->in.lpPassword, r->in.dwPwSize);
11863 : }
11864 0 : ndr->depth--;
11865 0 : ndr_print_uint32(ndr, "dwPwSize", r->in.dwPwSize);
11866 0 : ndr_print_uint16(ndr, "dwServiceWowType", r->in.dwServiceWowType);
11867 0 : ndr->depth--;
11868 : }
11869 0 : if (flags & NDR_OUT) {
11870 0 : ndr_print_struct(ndr, "out", "svcctl_CreateWowService");
11871 0 : ndr->depth++;
11872 0 : ndr_print_ptr(ndr, "lpdwTagId", r->out.lpdwTagId);
11873 0 : ndr->depth++;
11874 0 : if (r->out.lpdwTagId) {
11875 0 : ndr_print_uint32(ndr, "lpdwTagId", *r->out.lpdwTagId);
11876 : }
11877 0 : ndr->depth--;
11878 0 : ndr_print_ptr(ndr, "lpServiceHandle", r->out.lpServiceHandle);
11879 0 : ndr->depth++;
11880 0 : ndr_print_policy_handle(ndr, "lpServiceHandle", r->out.lpServiceHandle);
11881 0 : ndr->depth--;
11882 0 : ndr_print_WERROR(ndr, "result", r->out.result);
11883 0 : ndr->depth--;
11884 : }
11885 0 : ndr->depth--;
11886 : }
11887 :
11888 0 : static enum ndr_err_code ndr_push_svcctl_OpenSCManager2(struct ndr_push *ndr, ndr_flags_type flags, const struct svcctl_OpenSCManager2 *r)
11889 : {
11890 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
11891 0 : if (flags & NDR_IN) {
11892 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, &r->in.BindingHandle));
11893 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.DatabaseName));
11894 0 : if (r->in.DatabaseName) {
11895 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DatabaseName, CH_UTF16)));
11896 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11897 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DatabaseName, CH_UTF16)));
11898 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.DatabaseName, ndr_charset_length(r->in.DatabaseName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11899 : }
11900 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.DesiredAccess));
11901 : }
11902 0 : if (flags & NDR_OUT) {
11903 0 : if (r->out.ScmHandle == NULL) {
11904 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
11905 : }
11906 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.ScmHandle));
11907 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
11908 : }
11909 0 : return NDR_ERR_SUCCESS;
11910 : }
11911 :
11912 0 : static enum ndr_err_code ndr_pull_svcctl_OpenSCManager2(struct ndr_pull *ndr, ndr_flags_type flags, struct svcctl_OpenSCManager2 *r)
11913 : {
11914 0 : uint32_t _ptr_DatabaseName;
11915 0 : uint32_t size_DatabaseName_1 = 0;
11916 0 : uint32_t length_DatabaseName_1 = 0;
11917 0 : TALLOC_CTX *_mem_save_DatabaseName_0 = NULL;
11918 0 : TALLOC_CTX *_mem_save_ScmHandle_0 = NULL;
11919 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
11920 0 : if (flags & NDR_IN) {
11921 0 : NDR_ZERO_STRUCT(r->out);
11922 :
11923 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, &r->in.BindingHandle));
11924 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DatabaseName));
11925 0 : if (_ptr_DatabaseName) {
11926 0 : NDR_PULL_ALLOC(ndr, r->in.DatabaseName);
11927 : } else {
11928 0 : r->in.DatabaseName = NULL;
11929 : }
11930 0 : if (r->in.DatabaseName) {
11931 0 : _mem_save_DatabaseName_0 = NDR_PULL_GET_MEM_CTX(ndr);
11932 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.DatabaseName, 0);
11933 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.DatabaseName));
11934 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.DatabaseName));
11935 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.DatabaseName, &size_DatabaseName_1));
11936 0 : if (size_DatabaseName_1 > SC_MAX_NAME_LENGTH) {
11937 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", size_DatabaseName_1, (uint32_t)(0), (uint32_t)(SC_MAX_NAME_LENGTH));
11938 : }
11939 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.DatabaseName, &length_DatabaseName_1));
11940 0 : if (length_DatabaseName_1 > SC_MAX_NAME_LENGTH) {
11941 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", length_DatabaseName_1, (uint32_t)(0), (uint32_t)(SC_MAX_NAME_LENGTH));
11942 : }
11943 0 : if (length_DatabaseName_1 > size_DatabaseName_1) {
11944 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %"PRIu32": should exceed array length %"PRIu32"", size_DatabaseName_1, length_DatabaseName_1);
11945 : }
11946 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_DatabaseName_1, sizeof(uint16_t)));
11947 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.DatabaseName, length_DatabaseName_1, sizeof(uint16_t), CH_UTF16));
11948 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DatabaseName_0, 0);
11949 : }
11950 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.DesiredAccess));
11951 0 : NDR_PULL_ALLOC(ndr, r->out.ScmHandle);
11952 0 : NDR_ZERO_STRUCTP(r->out.ScmHandle);
11953 : }
11954 0 : if (flags & NDR_OUT) {
11955 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
11956 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
11957 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
11958 0 : NDR_PULL_ALLOC(ndr, r->out.ScmHandle);
11959 : }
11960 0 : _mem_save_ScmHandle_0 = NDR_PULL_GET_MEM_CTX(ndr);
11961 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.ScmHandle, LIBNDR_FLAG_REF_ALLOC);
11962 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.ScmHandle));
11963 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ScmHandle_0, LIBNDR_FLAG_REF_ALLOC);
11964 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
11965 : }
11966 0 : return NDR_ERR_SUCCESS;
11967 : }
11968 :
11969 0 : _PUBLIC_ void ndr_print_svcctl_OpenSCManager2(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct svcctl_OpenSCManager2 *r)
11970 : {
11971 0 : ndr_print_struct(ndr, name, "svcctl_OpenSCManager2");
11972 0 : if (r == NULL) { ndr_print_null(ndr); return; }
11973 0 : ndr->depth++;
11974 0 : if (flags & NDR_SET_VALUES) {
11975 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
11976 : }
11977 0 : if (flags & NDR_IN) {
11978 0 : ndr_print_struct(ndr, "in", "svcctl_OpenSCManager2");
11979 0 : ndr->depth++;
11980 0 : ndr_print_policy_handle(ndr, "BindingHandle", &r->in.BindingHandle);
11981 0 : ndr_print_ptr(ndr, "DatabaseName", r->in.DatabaseName);
11982 0 : ndr->depth++;
11983 0 : if (r->in.DatabaseName) {
11984 0 : ndr_print_string(ndr, "DatabaseName", r->in.DatabaseName);
11985 : }
11986 0 : ndr->depth--;
11987 0 : ndr_print_uint32(ndr, "DesiredAccess", r->in.DesiredAccess);
11988 0 : ndr->depth--;
11989 : }
11990 0 : if (flags & NDR_OUT) {
11991 0 : ndr_print_struct(ndr, "out", "svcctl_OpenSCManager2");
11992 0 : ndr->depth++;
11993 0 : ndr_print_ptr(ndr, "ScmHandle", r->out.ScmHandle);
11994 0 : ndr->depth++;
11995 0 : ndr_print_policy_handle(ndr, "ScmHandle", r->out.ScmHandle);
11996 0 : ndr->depth--;
11997 0 : ndr_print_WERROR(ndr, "result", r->out.result);
11998 0 : ndr->depth--;
11999 : }
12000 0 : ndr->depth--;
12001 : }
12002 :
12003 : #ifndef SKIP_NDR_TABLE_svcctl
12004 : static const struct ndr_interface_public_struct svcctl_public_structs[] = {
12005 : {
12006 : .name = "SERVICE_STATUS_PROCESS",
12007 : .struct_size = sizeof(struct SERVICE_STATUS_PROCESS ),
12008 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_SERVICE_STATUS_PROCESS,
12009 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_SERVICE_STATUS_PROCESS,
12010 : .ndr_print = (ndr_print_function_t) ndr_print_flags_SERVICE_STATUS_PROCESS,
12011 : },
12012 : {
12013 : .name = "ENUM_SERVICE_STATUSW",
12014 : .struct_size = sizeof(struct ENUM_SERVICE_STATUSW ),
12015 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_ENUM_SERVICE_STATUSW,
12016 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_ENUM_SERVICE_STATUSW,
12017 : .ndr_print = (ndr_print_function_t) ndr_print_flags_ENUM_SERVICE_STATUSW,
12018 : },
12019 : {
12020 : .name = "ENUM_SERVICE_STATUSA",
12021 : .struct_size = sizeof(struct ENUM_SERVICE_STATUSA ),
12022 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_ENUM_SERVICE_STATUSA,
12023 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_ENUM_SERVICE_STATUSA,
12024 : .ndr_print = (ndr_print_function_t) ndr_print_flags_ENUM_SERVICE_STATUSA,
12025 : },
12026 : {
12027 : .name = "QUERY_SERVICE_CONFIG",
12028 : .struct_size = sizeof(struct QUERY_SERVICE_CONFIG ),
12029 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_QUERY_SERVICE_CONFIG,
12030 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_QUERY_SERVICE_CONFIG,
12031 : .ndr_print = (ndr_print_function_t) ndr_print_flags_QUERY_SERVICE_CONFIG,
12032 : },
12033 : {
12034 : .name = "SERVICE_DESCRIPTION",
12035 : .struct_size = sizeof(struct SERVICE_DESCRIPTION ),
12036 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_SERVICE_DESCRIPTION,
12037 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_SERVICE_DESCRIPTION,
12038 : .ndr_print = (ndr_print_function_t) ndr_print_flags_SERVICE_DESCRIPTION,
12039 : },
12040 : {
12041 : .name = "SERVICE_FAILURE_ACTIONSW",
12042 : .struct_size = sizeof(struct SERVICE_FAILURE_ACTIONSW ),
12043 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_SERVICE_FAILURE_ACTIONSW,
12044 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_SERVICE_FAILURE_ACTIONSW,
12045 : .ndr_print = (ndr_print_function_t) ndr_print_flags_SERVICE_FAILURE_ACTIONSW,
12046 : },
12047 : { .name = NULL }
12048 : };
12049 :
12050 : static const struct ndr_interface_call svcctl_calls[] = {
12051 : {
12052 : "svcctl_CloseServiceHandle",
12053 : sizeof(struct svcctl_CloseServiceHandle),
12054 : (ndr_push_flags_fn_t) ndr_push_svcctl_CloseServiceHandle,
12055 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_CloseServiceHandle,
12056 : (ndr_print_function_t) ndr_print_svcctl_CloseServiceHandle,
12057 : { 0, NULL },
12058 : { 0, NULL },
12059 : },
12060 : {
12061 : "svcctl_ControlService",
12062 : sizeof(struct svcctl_ControlService),
12063 : (ndr_push_flags_fn_t) ndr_push_svcctl_ControlService,
12064 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_ControlService,
12065 : (ndr_print_function_t) ndr_print_svcctl_ControlService,
12066 : { 0, NULL },
12067 : { 0, NULL },
12068 : },
12069 : {
12070 : "svcctl_DeleteService",
12071 : sizeof(struct svcctl_DeleteService),
12072 : (ndr_push_flags_fn_t) ndr_push_svcctl_DeleteService,
12073 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_DeleteService,
12074 : (ndr_print_function_t) ndr_print_svcctl_DeleteService,
12075 : { 0, NULL },
12076 : { 0, NULL },
12077 : },
12078 : {
12079 : "svcctl_LockServiceDatabase",
12080 : sizeof(struct svcctl_LockServiceDatabase),
12081 : (ndr_push_flags_fn_t) ndr_push_svcctl_LockServiceDatabase,
12082 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_LockServiceDatabase,
12083 : (ndr_print_function_t) ndr_print_svcctl_LockServiceDatabase,
12084 : { 0, NULL },
12085 : { 0, NULL },
12086 : },
12087 : {
12088 : "svcctl_QueryServiceObjectSecurity",
12089 : sizeof(struct svcctl_QueryServiceObjectSecurity),
12090 : (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceObjectSecurity,
12091 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceObjectSecurity,
12092 : (ndr_print_function_t) ndr_print_svcctl_QueryServiceObjectSecurity,
12093 : { 0, NULL },
12094 : { 0, NULL },
12095 : },
12096 : {
12097 : "svcctl_SetServiceObjectSecurity",
12098 : sizeof(struct svcctl_SetServiceObjectSecurity),
12099 : (ndr_push_flags_fn_t) ndr_push_svcctl_SetServiceObjectSecurity,
12100 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_SetServiceObjectSecurity,
12101 : (ndr_print_function_t) ndr_print_svcctl_SetServiceObjectSecurity,
12102 : { 0, NULL },
12103 : { 0, NULL },
12104 : },
12105 : {
12106 : "svcctl_QueryServiceStatus",
12107 : sizeof(struct svcctl_QueryServiceStatus),
12108 : (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceStatus,
12109 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceStatus,
12110 : (ndr_print_function_t) ndr_print_svcctl_QueryServiceStatus,
12111 : { 0, NULL },
12112 : { 0, NULL },
12113 : },
12114 : {
12115 : "svcctl_SetServiceStatus",
12116 : sizeof(struct svcctl_SetServiceStatus),
12117 : (ndr_push_flags_fn_t) ndr_push_svcctl_SetServiceStatus,
12118 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_SetServiceStatus,
12119 : (ndr_print_function_t) ndr_print_svcctl_SetServiceStatus,
12120 : { 0, NULL },
12121 : { 0, NULL },
12122 : },
12123 : {
12124 : "svcctl_UnlockServiceDatabase",
12125 : sizeof(struct svcctl_UnlockServiceDatabase),
12126 : (ndr_push_flags_fn_t) ndr_push_svcctl_UnlockServiceDatabase,
12127 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_UnlockServiceDatabase,
12128 : (ndr_print_function_t) ndr_print_svcctl_UnlockServiceDatabase,
12129 : { 0, NULL },
12130 : { 0, NULL },
12131 : },
12132 : {
12133 : "svcctl_NotifyBootConfigStatus",
12134 : sizeof(struct svcctl_NotifyBootConfigStatus),
12135 : (ndr_push_flags_fn_t) ndr_push_svcctl_NotifyBootConfigStatus,
12136 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_NotifyBootConfigStatus,
12137 : (ndr_print_function_t) ndr_print_svcctl_NotifyBootConfigStatus,
12138 : { 0, NULL },
12139 : { 0, NULL },
12140 : },
12141 : {
12142 : "svcctl_SCSetServiceBitsW",
12143 : sizeof(struct svcctl_SCSetServiceBitsW),
12144 : (ndr_push_flags_fn_t) ndr_push_svcctl_SCSetServiceBitsW,
12145 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_SCSetServiceBitsW,
12146 : (ndr_print_function_t) ndr_print_svcctl_SCSetServiceBitsW,
12147 : { 0, NULL },
12148 : { 0, NULL },
12149 : },
12150 : {
12151 : "svcctl_ChangeServiceConfigW",
12152 : sizeof(struct svcctl_ChangeServiceConfigW),
12153 : (ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfigW,
12154 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfigW,
12155 : (ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfigW,
12156 : { 0, NULL },
12157 : { 0, NULL },
12158 : },
12159 : {
12160 : "svcctl_CreateServiceW",
12161 : sizeof(struct svcctl_CreateServiceW),
12162 : (ndr_push_flags_fn_t) ndr_push_svcctl_CreateServiceW,
12163 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_CreateServiceW,
12164 : (ndr_print_function_t) ndr_print_svcctl_CreateServiceW,
12165 : { 0, NULL },
12166 : { 0, NULL },
12167 : },
12168 : {
12169 : "svcctl_EnumDependentServicesW",
12170 : sizeof(struct svcctl_EnumDependentServicesW),
12171 : (ndr_push_flags_fn_t) ndr_push_svcctl_EnumDependentServicesW,
12172 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumDependentServicesW,
12173 : (ndr_print_function_t) ndr_print_svcctl_EnumDependentServicesW,
12174 : { 0, NULL },
12175 : { 0, NULL },
12176 : },
12177 : {
12178 : "svcctl_EnumServicesStatusW",
12179 : sizeof(struct svcctl_EnumServicesStatusW),
12180 : (ndr_push_flags_fn_t) ndr_push_svcctl_EnumServicesStatusW,
12181 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumServicesStatusW,
12182 : (ndr_print_function_t) ndr_print_svcctl_EnumServicesStatusW,
12183 : { 0, NULL },
12184 : { 0, NULL },
12185 : },
12186 : {
12187 : "svcctl_OpenSCManagerW",
12188 : sizeof(struct svcctl_OpenSCManagerW),
12189 : (ndr_push_flags_fn_t) ndr_push_svcctl_OpenSCManagerW,
12190 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenSCManagerW,
12191 : (ndr_print_function_t) ndr_print_svcctl_OpenSCManagerW,
12192 : { 0, NULL },
12193 : { 0, NULL },
12194 : },
12195 : {
12196 : "svcctl_OpenServiceW",
12197 : sizeof(struct svcctl_OpenServiceW),
12198 : (ndr_push_flags_fn_t) ndr_push_svcctl_OpenServiceW,
12199 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenServiceW,
12200 : (ndr_print_function_t) ndr_print_svcctl_OpenServiceW,
12201 : { 0, NULL },
12202 : { 0, NULL },
12203 : },
12204 : {
12205 : "svcctl_QueryServiceConfigW",
12206 : sizeof(struct svcctl_QueryServiceConfigW),
12207 : (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfigW,
12208 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfigW,
12209 : (ndr_print_function_t) ndr_print_svcctl_QueryServiceConfigW,
12210 : { 0, NULL },
12211 : { 0, NULL },
12212 : },
12213 : {
12214 : "svcctl_QueryServiceLockStatusW",
12215 : sizeof(struct svcctl_QueryServiceLockStatusW),
12216 : (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceLockStatusW,
12217 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceLockStatusW,
12218 : (ndr_print_function_t) ndr_print_svcctl_QueryServiceLockStatusW,
12219 : { 0, NULL },
12220 : { 0, NULL },
12221 : },
12222 : {
12223 : "svcctl_StartServiceW",
12224 : sizeof(struct svcctl_StartServiceW),
12225 : (ndr_push_flags_fn_t) ndr_push_svcctl_StartServiceW,
12226 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_StartServiceW,
12227 : (ndr_print_function_t) ndr_print_svcctl_StartServiceW,
12228 : { 0, NULL },
12229 : { 0, NULL },
12230 : },
12231 : {
12232 : "svcctl_GetServiceDisplayNameW",
12233 : sizeof(struct svcctl_GetServiceDisplayNameW),
12234 : (ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceDisplayNameW,
12235 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceDisplayNameW,
12236 : (ndr_print_function_t) ndr_print_svcctl_GetServiceDisplayNameW,
12237 : { 0, NULL },
12238 : { 0, NULL },
12239 : },
12240 : {
12241 : "svcctl_GetServiceKeyNameW",
12242 : sizeof(struct svcctl_GetServiceKeyNameW),
12243 : (ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceKeyNameW,
12244 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceKeyNameW,
12245 : (ndr_print_function_t) ndr_print_svcctl_GetServiceKeyNameW,
12246 : { 0, NULL },
12247 : { 0, NULL },
12248 : },
12249 : {
12250 : "svcctl_SCSetServiceBitsA",
12251 : sizeof(struct svcctl_SCSetServiceBitsA),
12252 : (ndr_push_flags_fn_t) ndr_push_svcctl_SCSetServiceBitsA,
12253 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_SCSetServiceBitsA,
12254 : (ndr_print_function_t) ndr_print_svcctl_SCSetServiceBitsA,
12255 : { 0, NULL },
12256 : { 0, NULL },
12257 : },
12258 : {
12259 : "svcctl_ChangeServiceConfigA",
12260 : sizeof(struct svcctl_ChangeServiceConfigA),
12261 : (ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfigA,
12262 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfigA,
12263 : (ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfigA,
12264 : { 0, NULL },
12265 : { 0, NULL },
12266 : },
12267 : {
12268 : "svcctl_CreateServiceA",
12269 : sizeof(struct svcctl_CreateServiceA),
12270 : (ndr_push_flags_fn_t) ndr_push_svcctl_CreateServiceA,
12271 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_CreateServiceA,
12272 : (ndr_print_function_t) ndr_print_svcctl_CreateServiceA,
12273 : { 0, NULL },
12274 : { 0, NULL },
12275 : },
12276 : {
12277 : "svcctl_EnumDependentServicesA",
12278 : sizeof(struct svcctl_EnumDependentServicesA),
12279 : (ndr_push_flags_fn_t) ndr_push_svcctl_EnumDependentServicesA,
12280 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumDependentServicesA,
12281 : (ndr_print_function_t) ndr_print_svcctl_EnumDependentServicesA,
12282 : { 0, NULL },
12283 : { 0, NULL },
12284 : },
12285 : {
12286 : "svcctl_EnumServicesStatusA",
12287 : sizeof(struct svcctl_EnumServicesStatusA),
12288 : (ndr_push_flags_fn_t) ndr_push_svcctl_EnumServicesStatusA,
12289 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumServicesStatusA,
12290 : (ndr_print_function_t) ndr_print_svcctl_EnumServicesStatusA,
12291 : { 0, NULL },
12292 : { 0, NULL },
12293 : },
12294 : {
12295 : "svcctl_OpenSCManagerA",
12296 : sizeof(struct svcctl_OpenSCManagerA),
12297 : (ndr_push_flags_fn_t) ndr_push_svcctl_OpenSCManagerA,
12298 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenSCManagerA,
12299 : (ndr_print_function_t) ndr_print_svcctl_OpenSCManagerA,
12300 : { 0, NULL },
12301 : { 0, NULL },
12302 : },
12303 : {
12304 : "svcctl_OpenServiceA",
12305 : sizeof(struct svcctl_OpenServiceA),
12306 : (ndr_push_flags_fn_t) ndr_push_svcctl_OpenServiceA,
12307 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenServiceA,
12308 : (ndr_print_function_t) ndr_print_svcctl_OpenServiceA,
12309 : { 0, NULL },
12310 : { 0, NULL },
12311 : },
12312 : {
12313 : "svcctl_QueryServiceConfigA",
12314 : sizeof(struct svcctl_QueryServiceConfigA),
12315 : (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfigA,
12316 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfigA,
12317 : (ndr_print_function_t) ndr_print_svcctl_QueryServiceConfigA,
12318 : { 0, NULL },
12319 : { 0, NULL },
12320 : },
12321 : {
12322 : "svcctl_QueryServiceLockStatusA",
12323 : sizeof(struct svcctl_QueryServiceLockStatusA),
12324 : (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceLockStatusA,
12325 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceLockStatusA,
12326 : (ndr_print_function_t) ndr_print_svcctl_QueryServiceLockStatusA,
12327 : { 0, NULL },
12328 : { 0, NULL },
12329 : },
12330 : {
12331 : "svcctl_StartServiceA",
12332 : sizeof(struct svcctl_StartServiceA),
12333 : (ndr_push_flags_fn_t) ndr_push_svcctl_StartServiceA,
12334 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_StartServiceA,
12335 : (ndr_print_function_t) ndr_print_svcctl_StartServiceA,
12336 : { 0, NULL },
12337 : { 0, NULL },
12338 : },
12339 : {
12340 : "svcctl_GetServiceDisplayNameA",
12341 : sizeof(struct svcctl_GetServiceDisplayNameA),
12342 : (ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceDisplayNameA,
12343 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceDisplayNameA,
12344 : (ndr_print_function_t) ndr_print_svcctl_GetServiceDisplayNameA,
12345 : { 0, NULL },
12346 : { 0, NULL },
12347 : },
12348 : {
12349 : "svcctl_GetServiceKeyNameA",
12350 : sizeof(struct svcctl_GetServiceKeyNameA),
12351 : (ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceKeyNameA,
12352 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceKeyNameA,
12353 : (ndr_print_function_t) ndr_print_svcctl_GetServiceKeyNameA,
12354 : { 0, NULL },
12355 : { 0, NULL },
12356 : },
12357 : {
12358 : "svcctl_GetCurrentGroupeStateW",
12359 : sizeof(struct svcctl_GetCurrentGroupeStateW),
12360 : (ndr_push_flags_fn_t) ndr_push_svcctl_GetCurrentGroupeStateW,
12361 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetCurrentGroupeStateW,
12362 : (ndr_print_function_t) ndr_print_svcctl_GetCurrentGroupeStateW,
12363 : { 0, NULL },
12364 : { 0, NULL },
12365 : },
12366 : {
12367 : "svcctl_EnumServiceGroupW",
12368 : sizeof(struct svcctl_EnumServiceGroupW),
12369 : (ndr_push_flags_fn_t) ndr_push_svcctl_EnumServiceGroupW,
12370 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumServiceGroupW,
12371 : (ndr_print_function_t) ndr_print_svcctl_EnumServiceGroupW,
12372 : { 0, NULL },
12373 : { 0, NULL },
12374 : },
12375 : {
12376 : "svcctl_ChangeServiceConfig2A",
12377 : sizeof(struct svcctl_ChangeServiceConfig2A),
12378 : (ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfig2A,
12379 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfig2A,
12380 : (ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfig2A,
12381 : { 0, NULL },
12382 : { 0, NULL },
12383 : },
12384 : {
12385 : "svcctl_ChangeServiceConfig2W",
12386 : sizeof(struct svcctl_ChangeServiceConfig2W),
12387 : (ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfig2W,
12388 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfig2W,
12389 : (ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfig2W,
12390 : { 0, NULL },
12391 : { 0, NULL },
12392 : },
12393 : {
12394 : "svcctl_QueryServiceConfig2A",
12395 : sizeof(struct svcctl_QueryServiceConfig2A),
12396 : (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfig2A,
12397 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfig2A,
12398 : (ndr_print_function_t) ndr_print_svcctl_QueryServiceConfig2A,
12399 : { 0, NULL },
12400 : { 0, NULL },
12401 : },
12402 : {
12403 : "svcctl_QueryServiceConfig2W",
12404 : sizeof(struct svcctl_QueryServiceConfig2W),
12405 : (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfig2W,
12406 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfig2W,
12407 : (ndr_print_function_t) ndr_print_svcctl_QueryServiceConfig2W,
12408 : { 0, NULL },
12409 : { 0, NULL },
12410 : },
12411 : {
12412 : "svcctl_QueryServiceStatusEx",
12413 : sizeof(struct svcctl_QueryServiceStatusEx),
12414 : (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceStatusEx,
12415 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceStatusEx,
12416 : (ndr_print_function_t) ndr_print_svcctl_QueryServiceStatusEx,
12417 : { 0, NULL },
12418 : { 0, NULL },
12419 : },
12420 : {
12421 : "svcctl_EnumServicesStatusExA",
12422 : sizeof(struct svcctl_EnumServicesStatusExA),
12423 : (ndr_push_flags_fn_t) ndr_push_svcctl_EnumServicesStatusExA,
12424 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumServicesStatusExA,
12425 : (ndr_print_function_t) ndr_print_svcctl_EnumServicesStatusExA,
12426 : { 0, NULL },
12427 : { 0, NULL },
12428 : },
12429 : {
12430 : "svcctl_EnumServicesStatusExW",
12431 : sizeof(struct svcctl_EnumServicesStatusExW),
12432 : (ndr_push_flags_fn_t) ndr_push_svcctl_EnumServicesStatusExW,
12433 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumServicesStatusExW,
12434 : (ndr_print_function_t) ndr_print_svcctl_EnumServicesStatusExW,
12435 : { 0, NULL },
12436 : { 0, NULL },
12437 : },
12438 : {
12439 : "svcctl_SCSendTSMessage",
12440 : sizeof(struct svcctl_SCSendTSMessage),
12441 : (ndr_push_flags_fn_t) ndr_push_svcctl_SCSendTSMessage,
12442 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_SCSendTSMessage,
12443 : (ndr_print_function_t) ndr_print_svcctl_SCSendTSMessage,
12444 : { 0, NULL },
12445 : { 0, NULL },
12446 : },
12447 : {
12448 : "svcctl_CreateServiceWOW64A",
12449 : sizeof(struct svcctl_CreateServiceWOW64A),
12450 : (ndr_push_flags_fn_t) ndr_push_svcctl_CreateServiceWOW64A,
12451 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_CreateServiceWOW64A,
12452 : (ndr_print_function_t) ndr_print_svcctl_CreateServiceWOW64A,
12453 : { 0, NULL },
12454 : { 0, NULL },
12455 : },
12456 : {
12457 : "svcctl_CreateServiceWOW64W",
12458 : sizeof(struct svcctl_CreateServiceWOW64W),
12459 : (ndr_push_flags_fn_t) ndr_push_svcctl_CreateServiceWOW64W,
12460 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_CreateServiceWOW64W,
12461 : (ndr_print_function_t) ndr_print_svcctl_CreateServiceWOW64W,
12462 : { 0, NULL },
12463 : { 0, NULL },
12464 : },
12465 : {
12466 : "Opnum46NotUsedOnWire",
12467 : sizeof(struct Opnum46NotUsedOnWire),
12468 : (ndr_push_flags_fn_t) ndr_push_Opnum46NotUsedOnWire,
12469 : (ndr_pull_flags_fn_t) ndr_pull_Opnum46NotUsedOnWire,
12470 : (ndr_print_function_t) ndr_print_Opnum46NotUsedOnWire,
12471 : { 0, NULL },
12472 : { 0, NULL },
12473 : },
12474 : {
12475 : "svcctl_NotifyServiceStatusChange",
12476 : sizeof(struct svcctl_NotifyServiceStatusChange),
12477 : (ndr_push_flags_fn_t) ndr_push_svcctl_NotifyServiceStatusChange,
12478 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_NotifyServiceStatusChange,
12479 : (ndr_print_function_t) ndr_print_svcctl_NotifyServiceStatusChange,
12480 : { 0, NULL },
12481 : { 0, NULL },
12482 : },
12483 : {
12484 : "svcctl_GetNotifyResults",
12485 : sizeof(struct svcctl_GetNotifyResults),
12486 : (ndr_push_flags_fn_t) ndr_push_svcctl_GetNotifyResults,
12487 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetNotifyResults,
12488 : (ndr_print_function_t) ndr_print_svcctl_GetNotifyResults,
12489 : { 0, NULL },
12490 : { 0, NULL },
12491 : },
12492 : {
12493 : "svcctl_CloseNotifyHandle",
12494 : sizeof(struct svcctl_CloseNotifyHandle),
12495 : (ndr_push_flags_fn_t) ndr_push_svcctl_CloseNotifyHandle,
12496 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_CloseNotifyHandle,
12497 : (ndr_print_function_t) ndr_print_svcctl_CloseNotifyHandle,
12498 : { 0, NULL },
12499 : { 0, NULL },
12500 : },
12501 : {
12502 : "svcctl_ControlServiceExA",
12503 : sizeof(struct svcctl_ControlServiceExA),
12504 : (ndr_push_flags_fn_t) ndr_push_svcctl_ControlServiceExA,
12505 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_ControlServiceExA,
12506 : (ndr_print_function_t) ndr_print_svcctl_ControlServiceExA,
12507 : { 0, NULL },
12508 : { 0, NULL },
12509 : },
12510 : {
12511 : "svcctl_ControlServiceExW",
12512 : sizeof(struct svcctl_ControlServiceExW),
12513 : (ndr_push_flags_fn_t) ndr_push_svcctl_ControlServiceExW,
12514 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_ControlServiceExW,
12515 : (ndr_print_function_t) ndr_print_svcctl_ControlServiceExW,
12516 : { 0, NULL },
12517 : { 0, NULL },
12518 : },
12519 : {
12520 : "Opnum52NotUsedOnWire",
12521 : sizeof(struct Opnum52NotUsedOnWire),
12522 : (ndr_push_flags_fn_t) ndr_push_Opnum52NotUsedOnWire,
12523 : (ndr_pull_flags_fn_t) ndr_pull_Opnum52NotUsedOnWire,
12524 : (ndr_print_function_t) ndr_print_Opnum52NotUsedOnWire,
12525 : { 0, NULL },
12526 : { 0, NULL },
12527 : },
12528 : {
12529 : "Opnum53NotUsedOnWire",
12530 : sizeof(struct Opnum53NotUsedOnWire),
12531 : (ndr_push_flags_fn_t) ndr_push_Opnum53NotUsedOnWire,
12532 : (ndr_pull_flags_fn_t) ndr_pull_Opnum53NotUsedOnWire,
12533 : (ndr_print_function_t) ndr_print_Opnum53NotUsedOnWire,
12534 : { 0, NULL },
12535 : { 0, NULL },
12536 : },
12537 : {
12538 : "Opnum54NotUsedOnWire",
12539 : sizeof(struct Opnum54NotUsedOnWire),
12540 : (ndr_push_flags_fn_t) ndr_push_Opnum54NotUsedOnWire,
12541 : (ndr_pull_flags_fn_t) ndr_pull_Opnum54NotUsedOnWire,
12542 : (ndr_print_function_t) ndr_print_Opnum54NotUsedOnWire,
12543 : { 0, NULL },
12544 : { 0, NULL },
12545 : },
12546 : {
12547 : "Opnum55NotUsedOnWire",
12548 : sizeof(struct Opnum55NotUsedOnWire),
12549 : (ndr_push_flags_fn_t) ndr_push_Opnum55NotUsedOnWire,
12550 : (ndr_pull_flags_fn_t) ndr_pull_Opnum55NotUsedOnWire,
12551 : (ndr_print_function_t) ndr_print_Opnum55NotUsedOnWire,
12552 : { 0, NULL },
12553 : { 0, NULL },
12554 : },
12555 : {
12556 : "svcctl_QueryServiceConfigEx",
12557 : sizeof(struct svcctl_QueryServiceConfigEx),
12558 : (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfigEx,
12559 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfigEx,
12560 : (ndr_print_function_t) ndr_print_svcctl_QueryServiceConfigEx,
12561 : { 0, NULL },
12562 : { 0, NULL },
12563 : },
12564 : {
12565 : "Opnum57NotUsedOnWire",
12566 : sizeof(struct Opnum57NotUsedOnWire),
12567 : (ndr_push_flags_fn_t) ndr_push_Opnum57NotUsedOnWire,
12568 : (ndr_pull_flags_fn_t) ndr_pull_Opnum57NotUsedOnWire,
12569 : (ndr_print_function_t) ndr_print_Opnum57NotUsedOnWire,
12570 : { 0, NULL },
12571 : { 0, NULL },
12572 : },
12573 : {
12574 : "Opnum58NotUsedOnWire",
12575 : sizeof(struct Opnum58NotUsedOnWire),
12576 : (ndr_push_flags_fn_t) ndr_push_Opnum58NotUsedOnWire,
12577 : (ndr_pull_flags_fn_t) ndr_pull_Opnum58NotUsedOnWire,
12578 : (ndr_print_function_t) ndr_print_Opnum58NotUsedOnWire,
12579 : { 0, NULL },
12580 : { 0, NULL },
12581 : },
12582 : {
12583 : "Opnum59NotUsedOnWire",
12584 : sizeof(struct Opnum59NotUsedOnWire),
12585 : (ndr_push_flags_fn_t) ndr_push_Opnum59NotUsedOnWire,
12586 : (ndr_pull_flags_fn_t) ndr_pull_Opnum59NotUsedOnWire,
12587 : (ndr_print_function_t) ndr_print_Opnum59NotUsedOnWire,
12588 : { 0, NULL },
12589 : { 0, NULL },
12590 : },
12591 : {
12592 : "svcctl_CreateWowService",
12593 : sizeof(struct svcctl_CreateWowService),
12594 : (ndr_push_flags_fn_t) ndr_push_svcctl_CreateWowService,
12595 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_CreateWowService,
12596 : (ndr_print_function_t) ndr_print_svcctl_CreateWowService,
12597 : { 0, NULL },
12598 : { 0, NULL },
12599 : },
12600 : {
12601 : "svcctl_OpenSCManager2",
12602 : sizeof(struct svcctl_OpenSCManager2),
12603 : (ndr_push_flags_fn_t) ndr_push_svcctl_OpenSCManager2,
12604 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenSCManager2,
12605 : (ndr_print_function_t) ndr_print_svcctl_OpenSCManager2,
12606 : { 0, NULL },
12607 : { 0, NULL },
12608 : },
12609 : { .name = NULL }
12610 : };
12611 :
12612 : static const char * const svcctl_endpoint_strings[] = {
12613 : "ncacn_np:[\\pipe\\svcctl]",
12614 : "ncalrpc:",
12615 : };
12616 :
12617 : static const struct ndr_interface_string_array svcctl_endpoints = {
12618 : .count = 2,
12619 : .names = svcctl_endpoint_strings
12620 : };
12621 :
12622 : static const char * const svcctl_authservice_strings[] = {
12623 : "host",
12624 : };
12625 :
12626 : static const struct ndr_interface_string_array svcctl_authservices = {
12627 : .count = 1,
12628 : .names = svcctl_authservice_strings
12629 : };
12630 :
12631 :
12632 : const struct ndr_interface_table ndr_table_svcctl = {
12633 : .name = "svcctl",
12634 : .syntax_id = {
12635 : {0x367abb81,0x9844,0x35f1,{0xad,0x32},{0x98,0xf0,0x38,0x00,0x10,0x03}},
12636 : NDR_SVCCTL_VERSION
12637 : },
12638 : .helpstring = NDR_SVCCTL_HELPSTRING,
12639 : .num_calls = 62,
12640 : .calls = svcctl_calls,
12641 : .num_public_structs = 6,
12642 : .public_structs = svcctl_public_structs,
12643 : .endpoints = &svcctl_endpoints,
12644 : .authservices = &svcctl_authservices
12645 : };
12646 :
12647 : #endif /* SKIP_NDR_TABLE_svcctl */
|