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, int 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, int ndr_flags, struct SERVICE_LOCK_STATUS *r)
30 : {
31 : 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 %u should exceed array length %u", 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 0 : static enum ndr_err_code ndr_push_svcctl_ServiceStatus(struct ndr_push *ndr, int ndr_flags, enum svcctl_ServiceStatus r)
84 : {
85 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
86 0 : return NDR_ERR_SUCCESS;
87 : }
88 :
89 0 : static enum ndr_err_code ndr_pull_svcctl_ServiceStatus(struct ndr_pull *ndr, int ndr_flags, enum svcctl_ServiceStatus *r)
90 : {
91 : uint32_t v;
92 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
93 0 : *r = v;
94 0 : 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 0 : static enum ndr_err_code ndr_push_svcctl_ControlsAccepted(struct ndr_push *ndr, int ndr_flags, uint32_t r)
115 : {
116 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
117 0 : return NDR_ERR_SUCCESS;
118 : }
119 :
120 0 : static enum ndr_err_code ndr_pull_svcctl_ControlsAccepted(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
121 : {
122 : uint32_t v;
123 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
124 0 : *r = v;
125 0 : 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 0 : static enum ndr_err_code ndr_push_SERVICE_STATUS(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_STATUS *r)
143 : {
144 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
145 0 : if (ndr_flags & NDR_SCALARS) {
146 0 : NDR_CHECK(ndr_push_align(ndr, 4));
147 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->type));
148 0 : NDR_CHECK(ndr_push_svcctl_ServiceStatus(ndr, NDR_SCALARS, r->state));
149 0 : NDR_CHECK(ndr_push_svcctl_ControlsAccepted(ndr, NDR_SCALARS, r->controls_accepted));
150 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->win32_exit_code));
151 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->service_exit_code));
152 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->check_point));
153 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->wait_hint));
154 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
155 : }
156 0 : if (ndr_flags & NDR_BUFFERS) {
157 : }
158 0 : return NDR_ERR_SUCCESS;
159 : }
160 :
161 0 : static enum ndr_err_code ndr_pull_SERVICE_STATUS(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_STATUS *r)
162 : {
163 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
164 0 : if (ndr_flags & NDR_SCALARS) {
165 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
166 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->type));
167 0 : NDR_CHECK(ndr_pull_svcctl_ServiceStatus(ndr, NDR_SCALARS, &r->state));
168 0 : NDR_CHECK(ndr_pull_svcctl_ControlsAccepted(ndr, NDR_SCALARS, &r->controls_accepted));
169 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->win32_exit_code));
170 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->service_exit_code));
171 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->check_point));
172 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->wait_hint));
173 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
174 : }
175 0 : if (ndr_flags & NDR_BUFFERS) {
176 : }
177 0 : 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 0 : _PUBLIC_ enum ndr_err_code ndr_push_SERVICE_STATUS_PROCESS(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_STATUS_PROCESS *r)
196 : {
197 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
198 0 : if (ndr_flags & NDR_SCALARS) {
199 0 : NDR_CHECK(ndr_push_align(ndr, 4));
200 0 : NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status));
201 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->process_id));
202 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->service_flags));
203 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
204 : }
205 0 : if (ndr_flags & NDR_BUFFERS) {
206 : }
207 0 : return NDR_ERR_SUCCESS;
208 : }
209 :
210 0 : _PUBLIC_ enum ndr_err_code ndr_pull_SERVICE_STATUS_PROCESS(struct ndr_pull *ndr, int 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 : }
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, int 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 0 : _PUBLIC_ enum ndr_err_code ndr_push_ENUM_SERVICE_STATUSW(struct ndr_push *ndr, int ndr_flags, const struct ENUM_SERVICE_STATUSW *r)
242 : {
243 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
244 0 : if (ndr_flags & NDR_SCALARS) {
245 0 : NDR_CHECK(ndr_push_align(ndr, 5));
246 : {
247 0 : uint32_t _flags_save_string = ndr->flags;
248 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
249 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->service_name));
250 0 : ndr->flags = _flags_save_string;
251 : }
252 : {
253 0 : uint32_t _flags_save_string = ndr->flags;
254 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
255 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->display_name));
256 0 : ndr->flags = _flags_save_string;
257 : }
258 0 : NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status));
259 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
260 : }
261 0 : if (ndr_flags & NDR_BUFFERS) {
262 : {
263 0 : uint32_t _flags_save_string = ndr->flags;
264 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
265 0 : if (r->service_name) {
266 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->service_name));
267 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->service_name));
268 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->service_name));
269 : }
270 0 : ndr->flags = _flags_save_string;
271 : }
272 : {
273 0 : uint32_t _flags_save_string = ndr->flags;
274 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
275 0 : if (r->display_name) {
276 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->display_name));
277 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->display_name));
278 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->display_name));
279 : }
280 0 : ndr->flags = _flags_save_string;
281 : }
282 : }
283 0 : return NDR_ERR_SUCCESS;
284 : }
285 :
286 0 : _PUBLIC_ enum ndr_err_code ndr_pull_ENUM_SERVICE_STATUSW(struct ndr_pull *ndr, int ndr_flags, struct ENUM_SERVICE_STATUSW *r)
287 : {
288 : uint32_t _ptr_service_name;
289 0 : TALLOC_CTX *_mem_save_service_name_0 = NULL;
290 : uint32_t _ptr_display_name;
291 0 : TALLOC_CTX *_mem_save_display_name_0 = NULL;
292 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
293 0 : if (ndr_flags & NDR_SCALARS) {
294 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
295 : {
296 0 : uint32_t _flags_save_string = ndr->flags;
297 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
298 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
299 0 : if (_ptr_service_name) {
300 0 : NDR_PULL_ALLOC(ndr, r->service_name);
301 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->service_name, _ptr_service_name));
302 : } else {
303 0 : r->service_name = NULL;
304 : }
305 0 : ndr->flags = _flags_save_string;
306 : }
307 : {
308 0 : uint32_t _flags_save_string = ndr->flags;
309 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
310 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
311 0 : if (_ptr_display_name) {
312 0 : NDR_PULL_ALLOC(ndr, r->display_name);
313 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->display_name, _ptr_display_name));
314 : } else {
315 0 : r->display_name = NULL;
316 : }
317 0 : ndr->flags = _flags_save_string;
318 : }
319 0 : NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, &r->status));
320 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
321 : }
322 0 : if (ndr_flags & NDR_BUFFERS) {
323 : {
324 0 : uint32_t _flags_save_string = ndr->flags;
325 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
326 0 : if (r->service_name) {
327 : uint32_t _relative_save_offset;
328 0 : _relative_save_offset = ndr->offset;
329 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->service_name));
330 0 : _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
331 0 : NDR_PULL_SET_MEM_CTX(ndr, r->service_name, 0);
332 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->service_name));
333 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
334 0 : if (ndr->offset > ndr->relative_highest_offset) {
335 0 : ndr->relative_highest_offset = ndr->offset;
336 : }
337 0 : ndr->offset = _relative_save_offset;
338 : }
339 0 : ndr->flags = _flags_save_string;
340 : }
341 : {
342 0 : uint32_t _flags_save_string = ndr->flags;
343 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
344 0 : if (r->display_name) {
345 : uint32_t _relative_save_offset;
346 0 : _relative_save_offset = ndr->offset;
347 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->display_name));
348 0 : _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
349 0 : NDR_PULL_SET_MEM_CTX(ndr, r->display_name, 0);
350 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->display_name));
351 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, 0);
352 0 : if (ndr->offset > ndr->relative_highest_offset) {
353 0 : ndr->relative_highest_offset = ndr->offset;
354 : }
355 0 : ndr->offset = _relative_save_offset;
356 : }
357 0 : ndr->flags = _flags_save_string;
358 : }
359 : }
360 0 : return NDR_ERR_SUCCESS;
361 : }
362 :
363 0 : static void ndr_print_flags_ENUM_SERVICE_STATUSW(struct ndr_print *ndr, const char *name, int 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 : uint32_t _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 : uint32_t _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 0 : _PUBLIC_ size_t ndr_size_ENUM_SERVICE_STATUSW(const struct ENUM_SERVICE_STATUSW *r, int flags)
400 : {
401 0 : 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, int 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 : uint32_t _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 : uint32_t _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 : uint32_t _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 : uint32_t _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, int ndr_flags, struct ENUM_SERVICE_STATUSA *r)
450 : {
451 : uint32_t _ptr_service_name;
452 0 : TALLOC_CTX *_mem_save_service_name_0 = NULL;
453 : 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 : uint32_t _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 : uint32_t _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 : uint32_t _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 : 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 : uint32_t _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 : 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, int 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 : uint32_t _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 : uint32_t _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, int flags)
563 : {
564 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_ENUM_SERVICE_STATUSA);
565 : }
566 :
567 0 : static enum ndr_err_code ndr_push_SERVICE_CONTROL(struct ndr_push *ndr, int ndr_flags, enum SERVICE_CONTROL r)
568 : {
569 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
570 0 : return NDR_ERR_SUCCESS;
571 : }
572 :
573 0 : static enum ndr_err_code ndr_pull_SERVICE_CONTROL(struct ndr_pull *ndr, int ndr_flags, enum SERVICE_CONTROL *r)
574 : {
575 : uint32_t v;
576 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
577 0 : *r = v;
578 0 : 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 : }
592 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
593 0 : }
594 :
595 0 : static enum ndr_err_code ndr_push_svcctl_ErrorControl(struct ndr_push *ndr, int ndr_flags, enum svcctl_ErrorControl r)
596 : {
597 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
598 0 : return NDR_ERR_SUCCESS;
599 : }
600 :
601 0 : static enum ndr_err_code ndr_pull_svcctl_ErrorControl(struct ndr_pull *ndr, int ndr_flags, enum svcctl_ErrorControl *r)
602 : {
603 : uint32_t v;
604 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
605 0 : *r = v;
606 0 : return NDR_ERR_SUCCESS;
607 : }
608 :
609 0 : _PUBLIC_ void ndr_print_svcctl_ErrorControl(struct ndr_print *ndr, const char *name, enum svcctl_ErrorControl r)
610 : {
611 0 : const char *val = NULL;
612 :
613 0 : switch (r) {
614 0 : case SVCCTL_SVC_ERROR_IGNORE: val = "SVCCTL_SVC_ERROR_IGNORE"; break;
615 0 : case SVCCTL_SVC_ERROR_NORMAL: val = "SVCCTL_SVC_ERROR_NORMAL"; break;
616 0 : case SVCCTL_SVC_ERROR_CRITICAL: val = "SVCCTL_SVC_ERROR_CRITICAL"; break;
617 0 : case SVCCTL_SVC_ERROR_SEVERE: val = "SVCCTL_SVC_ERROR_SEVERE"; break;
618 : }
619 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
620 0 : }
621 :
622 0 : static enum ndr_err_code ndr_push_svcctl_StartType(struct ndr_push *ndr, int ndr_flags, enum svcctl_StartType r)
623 : {
624 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
625 0 : return NDR_ERR_SUCCESS;
626 : }
627 :
628 0 : static enum ndr_err_code ndr_pull_svcctl_StartType(struct ndr_pull *ndr, int ndr_flags, enum svcctl_StartType *r)
629 : {
630 : uint32_t v;
631 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
632 0 : *r = v;
633 0 : return NDR_ERR_SUCCESS;
634 : }
635 :
636 0 : _PUBLIC_ void ndr_print_svcctl_StartType(struct ndr_print *ndr, const char *name, enum svcctl_StartType r)
637 : {
638 0 : const char *val = NULL;
639 :
640 0 : switch (r) {
641 0 : case SVCCTL_BOOT_START: val = "SVCCTL_BOOT_START"; break;
642 0 : case SVCCTL_SYSTEM_START: val = "SVCCTL_SYSTEM_START"; break;
643 0 : case SVCCTL_AUTO_START: val = "SVCCTL_AUTO_START"; break;
644 0 : case SVCCTL_DEMAND_START: val = "SVCCTL_DEMAND_START"; break;
645 0 : case SVCCTL_DISABLED: val = "SVCCTL_DISABLED"; break;
646 : }
647 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
648 0 : }
649 :
650 0 : static enum ndr_err_code ndr_push_svcctl_ServiceState(struct ndr_push *ndr, int ndr_flags, enum svcctl_ServiceState r)
651 : {
652 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
653 0 : return NDR_ERR_SUCCESS;
654 : }
655 :
656 0 : static enum ndr_err_code ndr_pull_svcctl_ServiceState(struct ndr_pull *ndr, int ndr_flags, enum svcctl_ServiceState *r)
657 : {
658 : uint32_t v;
659 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
660 0 : *r = v;
661 0 : return NDR_ERR_SUCCESS;
662 : }
663 :
664 0 : _PUBLIC_ void ndr_print_svcctl_ServiceState(struct ndr_print *ndr, const char *name, enum svcctl_ServiceState r)
665 : {
666 0 : const char *val = NULL;
667 :
668 0 : switch (r) {
669 0 : case SERVICE_STATE_ACTIVE: val = "SERVICE_STATE_ACTIVE"; break;
670 0 : case SERVICE_STATE_INACTIVE: val = "SERVICE_STATE_INACTIVE"; break;
671 0 : case SERVICE_STATE_ALL: val = "SERVICE_STATE_ALL"; break;
672 : }
673 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
674 0 : }
675 :
676 0 : static enum ndr_err_code ndr_push_svcctl_MgrAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
677 : {
678 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
679 0 : return NDR_ERR_SUCCESS;
680 : }
681 :
682 0 : static enum ndr_err_code ndr_pull_svcctl_MgrAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
683 : {
684 : uint32_t v;
685 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
686 0 : *r = v;
687 0 : return NDR_ERR_SUCCESS;
688 : }
689 :
690 0 : _PUBLIC_ void ndr_print_svcctl_MgrAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
691 : {
692 0 : ndr_print_uint32(ndr, name, r);
693 0 : ndr->depth++;
694 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_MGR_CONNECT", SC_RIGHT_MGR_CONNECT, r);
695 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_MGR_CREATE_SERVICE", SC_RIGHT_MGR_CREATE_SERVICE, r);
696 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_MGR_ENUMERATE_SERVICE", SC_RIGHT_MGR_ENUMERATE_SERVICE, r);
697 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_MGR_LOCK", SC_RIGHT_MGR_LOCK, r);
698 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_MGR_QUERY_LOCK_STATUS", SC_RIGHT_MGR_QUERY_LOCK_STATUS, r);
699 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_MGR_MODIFY_BOOT_CONFIG", SC_RIGHT_MGR_MODIFY_BOOT_CONFIG, r);
700 0 : ndr->depth--;
701 0 : }
702 :
703 0 : static enum ndr_err_code ndr_push_svcctl_ServiceAccessMask(struct ndr_push *ndr, int ndr_flags, uint32_t r)
704 : {
705 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
706 0 : return NDR_ERR_SUCCESS;
707 : }
708 :
709 0 : static enum ndr_err_code ndr_pull_svcctl_ServiceAccessMask(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
710 : {
711 : uint32_t v;
712 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
713 0 : *r = v;
714 0 : return NDR_ERR_SUCCESS;
715 : }
716 :
717 0 : _PUBLIC_ void ndr_print_svcctl_ServiceAccessMask(struct ndr_print *ndr, const char *name, uint32_t r)
718 : {
719 0 : ndr_print_uint32(ndr, name, r);
720 0 : ndr->depth++;
721 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_QUERY_CONFIG", SC_RIGHT_SVC_QUERY_CONFIG, r);
722 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_CHANGE_CONFIG", SC_RIGHT_SVC_CHANGE_CONFIG, r);
723 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_QUERY_STATUS", SC_RIGHT_SVC_QUERY_STATUS, r);
724 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_ENUMERATE_DEPENDENTS", SC_RIGHT_SVC_ENUMERATE_DEPENDENTS, r);
725 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_START", SC_RIGHT_SVC_START, r);
726 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_STOP", SC_RIGHT_SVC_STOP, r);
727 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_PAUSE_CONTINUE", SC_RIGHT_SVC_PAUSE_CONTINUE, r);
728 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_INTERROGATE", SC_RIGHT_SVC_INTERROGATE, r);
729 0 : ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SC_RIGHT_SVC_USER_DEFINED_CONTROL", SC_RIGHT_SVC_USER_DEFINED_CONTROL, r);
730 0 : ndr->depth--;
731 0 : }
732 :
733 0 : _PUBLIC_ enum ndr_err_code ndr_push_QUERY_SERVICE_CONFIG(struct ndr_push *ndr, int ndr_flags, const struct QUERY_SERVICE_CONFIG *r)
734 : {
735 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
736 0 : if (ndr_flags & NDR_SCALARS) {
737 0 : NDR_CHECK(ndr_push_align(ndr, 5));
738 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->service_type));
739 0 : NDR_CHECK(ndr_push_svcctl_StartType(ndr, NDR_SCALARS, r->start_type));
740 0 : NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr, NDR_SCALARS, r->error_control));
741 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->executablepath));
742 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->loadordergroup));
743 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->tag_id));
744 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->dependencies));
745 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->startname));
746 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->displayname));
747 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
748 : }
749 0 : if (ndr_flags & NDR_BUFFERS) {
750 0 : if (r->executablepath) {
751 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->executablepath, CH_UTF16)));
752 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
753 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->executablepath, CH_UTF16)));
754 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->executablepath, ndr_charset_length(r->executablepath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
755 : }
756 0 : if (r->loadordergroup) {
757 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->loadordergroup, CH_UTF16)));
758 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
759 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->loadordergroup, CH_UTF16)));
760 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->loadordergroup, ndr_charset_length(r->loadordergroup, CH_UTF16), sizeof(uint16_t), CH_UTF16));
761 : }
762 0 : if (r->dependencies) {
763 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dependencies, CH_UTF16)));
764 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
765 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dependencies, CH_UTF16)));
766 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dependencies, ndr_charset_length(r->dependencies, CH_UTF16), sizeof(uint16_t), CH_UTF16));
767 : }
768 0 : if (r->startname) {
769 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->startname, CH_UTF16)));
770 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
771 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->startname, CH_UTF16)));
772 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->startname, ndr_charset_length(r->startname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
773 : }
774 0 : if (r->displayname) {
775 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->displayname, CH_UTF16)));
776 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
777 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->displayname, CH_UTF16)));
778 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->displayname, ndr_charset_length(r->displayname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
779 : }
780 : }
781 0 : return NDR_ERR_SUCCESS;
782 : }
783 :
784 0 : _PUBLIC_ enum ndr_err_code ndr_pull_QUERY_SERVICE_CONFIG(struct ndr_pull *ndr, int ndr_flags, struct QUERY_SERVICE_CONFIG *r)
785 : {
786 : uint32_t _ptr_executablepath;
787 0 : uint32_t size_executablepath_1 = 0;
788 0 : uint32_t length_executablepath_1 = 0;
789 0 : TALLOC_CTX *_mem_save_executablepath_0 = NULL;
790 : uint32_t _ptr_loadordergroup;
791 0 : uint32_t size_loadordergroup_1 = 0;
792 0 : uint32_t length_loadordergroup_1 = 0;
793 0 : TALLOC_CTX *_mem_save_loadordergroup_0 = NULL;
794 : uint32_t _ptr_dependencies;
795 0 : uint32_t size_dependencies_1 = 0;
796 0 : uint32_t length_dependencies_1 = 0;
797 0 : TALLOC_CTX *_mem_save_dependencies_0 = NULL;
798 : uint32_t _ptr_startname;
799 0 : uint32_t size_startname_1 = 0;
800 0 : uint32_t length_startname_1 = 0;
801 0 : TALLOC_CTX *_mem_save_startname_0 = NULL;
802 : uint32_t _ptr_displayname;
803 0 : uint32_t size_displayname_1 = 0;
804 0 : uint32_t length_displayname_1 = 0;
805 0 : TALLOC_CTX *_mem_save_displayname_0 = NULL;
806 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
807 0 : if (ndr_flags & NDR_SCALARS) {
808 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
809 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->service_type));
810 0 : NDR_CHECK(ndr_pull_svcctl_StartType(ndr, NDR_SCALARS, &r->start_type));
811 0 : NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr, NDR_SCALARS, &r->error_control));
812 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_executablepath));
813 0 : if (_ptr_executablepath) {
814 0 : NDR_PULL_ALLOC(ndr, r->executablepath);
815 : } else {
816 0 : r->executablepath = NULL;
817 : }
818 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_loadordergroup));
819 0 : if (_ptr_loadordergroup) {
820 0 : NDR_PULL_ALLOC(ndr, r->loadordergroup);
821 : } else {
822 0 : r->loadordergroup = NULL;
823 : }
824 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->tag_id));
825 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
826 0 : if (_ptr_dependencies) {
827 0 : NDR_PULL_ALLOC(ndr, r->dependencies);
828 : } else {
829 0 : r->dependencies = NULL;
830 : }
831 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_startname));
832 0 : if (_ptr_startname) {
833 0 : NDR_PULL_ALLOC(ndr, r->startname);
834 : } else {
835 0 : r->startname = NULL;
836 : }
837 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_displayname));
838 0 : if (_ptr_displayname) {
839 0 : NDR_PULL_ALLOC(ndr, r->displayname);
840 : } else {
841 0 : r->displayname = NULL;
842 : }
843 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
844 : }
845 0 : if (ndr_flags & NDR_BUFFERS) {
846 0 : if (r->executablepath) {
847 0 : _mem_save_executablepath_0 = NDR_PULL_GET_MEM_CTX(ndr);
848 0 : NDR_PULL_SET_MEM_CTX(ndr, r->executablepath, 0);
849 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->executablepath));
850 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->executablepath));
851 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->executablepath, &size_executablepath_1));
852 0 : if (size_executablepath_1 > 8192) {
853 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
854 : }
855 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->executablepath, &length_executablepath_1));
856 0 : if (length_executablepath_1 > 8192) {
857 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
858 : }
859 0 : if (length_executablepath_1 > size_executablepath_1) {
860 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_executablepath_1, length_executablepath_1);
861 : }
862 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_executablepath_1, sizeof(uint16_t)));
863 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->executablepath, length_executablepath_1, sizeof(uint16_t), CH_UTF16));
864 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_executablepath_0, 0);
865 : }
866 0 : if (r->loadordergroup) {
867 0 : _mem_save_loadordergroup_0 = NDR_PULL_GET_MEM_CTX(ndr);
868 0 : NDR_PULL_SET_MEM_CTX(ndr, r->loadordergroup, 0);
869 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->loadordergroup));
870 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->loadordergroup));
871 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->loadordergroup, &size_loadordergroup_1));
872 0 : if (size_loadordergroup_1 > 8192) {
873 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
874 : }
875 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->loadordergroup, &length_loadordergroup_1));
876 0 : if (length_loadordergroup_1 > 8192) {
877 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
878 : }
879 0 : if (length_loadordergroup_1 > size_loadordergroup_1) {
880 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_loadordergroup_1, length_loadordergroup_1);
881 : }
882 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_loadordergroup_1, sizeof(uint16_t)));
883 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->loadordergroup, length_loadordergroup_1, sizeof(uint16_t), CH_UTF16));
884 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_loadordergroup_0, 0);
885 : }
886 0 : if (r->dependencies) {
887 0 : _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
888 0 : NDR_PULL_SET_MEM_CTX(ndr, r->dependencies, 0);
889 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->dependencies));
890 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->dependencies));
891 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->dependencies, &size_dependencies_1));
892 0 : if (size_dependencies_1 > 8192) {
893 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
894 : }
895 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->dependencies, &length_dependencies_1));
896 0 : if (length_dependencies_1 > 8192) {
897 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
898 : }
899 0 : if (length_dependencies_1 > size_dependencies_1) {
900 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dependencies_1, length_dependencies_1);
901 : }
902 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dependencies_1, sizeof(uint16_t)));
903 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dependencies, length_dependencies_1, sizeof(uint16_t), CH_UTF16));
904 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
905 : }
906 0 : if (r->startname) {
907 0 : _mem_save_startname_0 = NDR_PULL_GET_MEM_CTX(ndr);
908 0 : NDR_PULL_SET_MEM_CTX(ndr, r->startname, 0);
909 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->startname));
910 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->startname));
911 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->startname, &size_startname_1));
912 0 : if (size_startname_1 > 8192) {
913 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
914 : }
915 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->startname, &length_startname_1));
916 0 : if (length_startname_1 > 8192) {
917 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
918 : }
919 0 : if (length_startname_1 > size_startname_1) {
920 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_startname_1, length_startname_1);
921 : }
922 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_startname_1, sizeof(uint16_t)));
923 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->startname, length_startname_1, sizeof(uint16_t), CH_UTF16));
924 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_startname_0, 0);
925 : }
926 0 : if (r->displayname) {
927 0 : _mem_save_displayname_0 = NDR_PULL_GET_MEM_CTX(ndr);
928 0 : NDR_PULL_SET_MEM_CTX(ndr, r->displayname, 0);
929 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->displayname));
930 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->displayname));
931 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->displayname, &size_displayname_1));
932 0 : if (size_displayname_1 > 8192) {
933 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
934 : }
935 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->displayname, &length_displayname_1));
936 0 : if (length_displayname_1 > 8192) {
937 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
938 : }
939 0 : if (length_displayname_1 > size_displayname_1) {
940 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_displayname_1, length_displayname_1);
941 : }
942 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_displayname_1, sizeof(uint16_t)));
943 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->displayname, length_displayname_1, sizeof(uint16_t), CH_UTF16));
944 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_displayname_0, 0);
945 : }
946 : }
947 0 : return NDR_ERR_SUCCESS;
948 : }
949 :
950 0 : static void ndr_print_flags_QUERY_SERVICE_CONFIG(struct ndr_print *ndr, const char *name, int unused, const struct QUERY_SERVICE_CONFIG *r)
951 : {
952 0 : ndr_print_QUERY_SERVICE_CONFIG(ndr, name, r);
953 0 : }
954 :
955 0 : _PUBLIC_ void ndr_print_QUERY_SERVICE_CONFIG(struct ndr_print *ndr, const char *name, const struct QUERY_SERVICE_CONFIG *r)
956 : {
957 0 : ndr_print_struct(ndr, name, "QUERY_SERVICE_CONFIG");
958 0 : if (r == NULL) { ndr_print_null(ndr); return; }
959 0 : ndr->depth++;
960 0 : ndr_print_uint32(ndr, "service_type", r->service_type);
961 0 : ndr_print_svcctl_StartType(ndr, "start_type", r->start_type);
962 0 : ndr_print_svcctl_ErrorControl(ndr, "error_control", r->error_control);
963 0 : ndr_print_ptr(ndr, "executablepath", r->executablepath);
964 0 : ndr->depth++;
965 0 : if (r->executablepath) {
966 0 : ndr_print_string(ndr, "executablepath", r->executablepath);
967 : }
968 0 : ndr->depth--;
969 0 : ndr_print_ptr(ndr, "loadordergroup", r->loadordergroup);
970 0 : ndr->depth++;
971 0 : if (r->loadordergroup) {
972 0 : ndr_print_string(ndr, "loadordergroup", r->loadordergroup);
973 : }
974 0 : ndr->depth--;
975 0 : ndr_print_uint32(ndr, "tag_id", r->tag_id);
976 0 : ndr_print_ptr(ndr, "dependencies", r->dependencies);
977 0 : ndr->depth++;
978 0 : if (r->dependencies) {
979 0 : ndr_print_string(ndr, "dependencies", r->dependencies);
980 : }
981 0 : ndr->depth--;
982 0 : ndr_print_ptr(ndr, "startname", r->startname);
983 0 : ndr->depth++;
984 0 : if (r->startname) {
985 0 : ndr_print_string(ndr, "startname", r->startname);
986 : }
987 0 : ndr->depth--;
988 0 : ndr_print_ptr(ndr, "displayname", r->displayname);
989 0 : ndr->depth++;
990 0 : if (r->displayname) {
991 0 : ndr_print_string(ndr, "displayname", r->displayname);
992 : }
993 0 : ndr->depth--;
994 0 : ndr->depth--;
995 : }
996 :
997 0 : _PUBLIC_ size_t ndr_size_QUERY_SERVICE_CONFIG(const struct QUERY_SERVICE_CONFIG *r, int flags)
998 : {
999 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_QUERY_SERVICE_CONFIG);
1000 : }
1001 :
1002 0 : static enum ndr_err_code ndr_push_svcctl_ArgumentString(struct ndr_push *ndr, int ndr_flags, const struct svcctl_ArgumentString *r)
1003 : {
1004 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1005 0 : if (ndr_flags & NDR_SCALARS) {
1006 0 : NDR_CHECK(ndr_push_align(ndr, 5));
1007 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->string));
1008 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1009 : }
1010 0 : if (ndr_flags & NDR_BUFFERS) {
1011 0 : if (r->string) {
1012 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->string, CH_UTF16)));
1013 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1014 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->string, CH_UTF16)));
1015 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->string, ndr_charset_length(r->string, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1016 : }
1017 : }
1018 0 : return NDR_ERR_SUCCESS;
1019 : }
1020 :
1021 0 : static enum ndr_err_code ndr_pull_svcctl_ArgumentString(struct ndr_pull *ndr, int ndr_flags, struct svcctl_ArgumentString *r)
1022 : {
1023 : uint32_t _ptr_string;
1024 0 : uint32_t size_string_1 = 0;
1025 0 : uint32_t length_string_1 = 0;
1026 0 : TALLOC_CTX *_mem_save_string_0 = NULL;
1027 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1028 0 : if (ndr_flags & NDR_SCALARS) {
1029 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
1030 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
1031 0 : if (_ptr_string) {
1032 0 : NDR_PULL_ALLOC(ndr, r->string);
1033 : } else {
1034 0 : r->string = NULL;
1035 : }
1036 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1037 : }
1038 0 : if (ndr_flags & NDR_BUFFERS) {
1039 0 : if (r->string) {
1040 0 : _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
1041 0 : NDR_PULL_SET_MEM_CTX(ndr, r->string, 0);
1042 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->string));
1043 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->string));
1044 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->string, &size_string_1));
1045 0 : if (size_string_1 > SC_MAX_ARGUMENT_LENGTH) {
1046 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1047 : }
1048 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->string, &length_string_1));
1049 0 : if (length_string_1 > SC_MAX_ARGUMENT_LENGTH) {
1050 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1051 : }
1052 0 : if (length_string_1 > size_string_1) {
1053 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_string_1, length_string_1);
1054 : }
1055 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_string_1, sizeof(uint16_t)));
1056 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->string, length_string_1, sizeof(uint16_t), CH_UTF16));
1057 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, 0);
1058 : }
1059 : }
1060 0 : return NDR_ERR_SUCCESS;
1061 : }
1062 :
1063 0 : _PUBLIC_ void ndr_print_svcctl_ArgumentString(struct ndr_print *ndr, const char *name, const struct svcctl_ArgumentString *r)
1064 : {
1065 0 : ndr_print_struct(ndr, name, "svcctl_ArgumentString");
1066 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1067 0 : ndr->depth++;
1068 0 : ndr_print_ptr(ndr, "string", r->string);
1069 0 : ndr->depth++;
1070 0 : if (r->string) {
1071 0 : ndr_print_string(ndr, "string", r->string);
1072 : }
1073 0 : ndr->depth--;
1074 0 : ndr->depth--;
1075 : }
1076 :
1077 0 : static enum ndr_err_code ndr_push_svcctl_ConfigLevel(struct ndr_push *ndr, int ndr_flags, enum svcctl_ConfigLevel r)
1078 : {
1079 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
1080 0 : return NDR_ERR_SUCCESS;
1081 : }
1082 :
1083 0 : static enum ndr_err_code ndr_pull_svcctl_ConfigLevel(struct ndr_pull *ndr, int ndr_flags, enum svcctl_ConfigLevel *r)
1084 : {
1085 : uint32_t v;
1086 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
1087 0 : *r = v;
1088 0 : return NDR_ERR_SUCCESS;
1089 : }
1090 :
1091 0 : _PUBLIC_ void ndr_print_svcctl_ConfigLevel(struct ndr_print *ndr, const char *name, enum svcctl_ConfigLevel r)
1092 : {
1093 0 : const char *val = NULL;
1094 :
1095 0 : switch (r) {
1096 0 : case SERVICE_CONFIG_DESCRIPTION: val = "SERVICE_CONFIG_DESCRIPTION"; break;
1097 0 : case SERVICE_CONFIG_FAILURE_ACTIONS: val = "SERVICE_CONFIG_FAILURE_ACTIONS"; break;
1098 : }
1099 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
1100 0 : }
1101 :
1102 0 : _PUBLIC_ enum ndr_err_code ndr_push_SERVICE_DESCRIPTION(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_DESCRIPTION *r)
1103 : {
1104 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1105 0 : if (ndr_flags & NDR_SCALARS) {
1106 0 : NDR_CHECK(ndr_push_align(ndr, 5));
1107 : {
1108 0 : uint32_t _flags_save_string = ndr->flags;
1109 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1110 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->description));
1111 0 : ndr->flags = _flags_save_string;
1112 : }
1113 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1114 : }
1115 0 : if (ndr_flags & NDR_BUFFERS) {
1116 : {
1117 0 : uint32_t _flags_save_string = ndr->flags;
1118 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1119 0 : if (r->description) {
1120 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->description));
1121 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->description));
1122 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->description));
1123 : }
1124 0 : ndr->flags = _flags_save_string;
1125 : }
1126 : }
1127 0 : return NDR_ERR_SUCCESS;
1128 : }
1129 :
1130 0 : _PUBLIC_ enum ndr_err_code ndr_pull_SERVICE_DESCRIPTION(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_DESCRIPTION *r)
1131 : {
1132 : uint32_t _ptr_description;
1133 0 : TALLOC_CTX *_mem_save_description_0 = NULL;
1134 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1135 0 : if (ndr_flags & NDR_SCALARS) {
1136 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
1137 : {
1138 0 : uint32_t _flags_save_string = ndr->flags;
1139 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1140 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_description));
1141 0 : if (_ptr_description) {
1142 0 : NDR_PULL_ALLOC(ndr, r->description);
1143 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->description, _ptr_description));
1144 : } else {
1145 0 : r->description = NULL;
1146 : }
1147 0 : ndr->flags = _flags_save_string;
1148 : }
1149 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1150 : }
1151 0 : if (ndr_flags & NDR_BUFFERS) {
1152 : {
1153 0 : uint32_t _flags_save_string = ndr->flags;
1154 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1155 0 : if (r->description) {
1156 : uint32_t _relative_save_offset;
1157 0 : _relative_save_offset = ndr->offset;
1158 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->description));
1159 0 : _mem_save_description_0 = NDR_PULL_GET_MEM_CTX(ndr);
1160 0 : NDR_PULL_SET_MEM_CTX(ndr, r->description, 0);
1161 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->description));
1162 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_description_0, 0);
1163 0 : if (ndr->offset > ndr->relative_highest_offset) {
1164 0 : ndr->relative_highest_offset = ndr->offset;
1165 : }
1166 0 : ndr->offset = _relative_save_offset;
1167 : }
1168 0 : ndr->flags = _flags_save_string;
1169 : }
1170 : }
1171 0 : return NDR_ERR_SUCCESS;
1172 : }
1173 :
1174 0 : static void ndr_print_flags_SERVICE_DESCRIPTION(struct ndr_print *ndr, const char *name, int unused, const struct SERVICE_DESCRIPTION *r)
1175 : {
1176 0 : ndr_print_SERVICE_DESCRIPTION(ndr, name, r);
1177 0 : }
1178 :
1179 0 : _PUBLIC_ void ndr_print_SERVICE_DESCRIPTION(struct ndr_print *ndr, const char *name, const struct SERVICE_DESCRIPTION *r)
1180 : {
1181 0 : ndr_print_struct(ndr, name, "SERVICE_DESCRIPTION");
1182 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1183 0 : ndr->depth++;
1184 : {
1185 0 : uint32_t _flags_save_string = ndr->flags;
1186 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1187 0 : ndr_print_ptr(ndr, "description", r->description);
1188 0 : ndr->depth++;
1189 0 : if (r->description) {
1190 0 : ndr_print_string(ndr, "description", r->description);
1191 : }
1192 0 : ndr->depth--;
1193 0 : ndr->flags = _flags_save_string;
1194 : }
1195 0 : ndr->depth--;
1196 : }
1197 :
1198 0 : _PUBLIC_ size_t ndr_size_SERVICE_DESCRIPTION(const struct SERVICE_DESCRIPTION *r, int flags)
1199 : {
1200 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_SERVICE_DESCRIPTION);
1201 : }
1202 :
1203 0 : static enum ndr_err_code ndr_push_SC_ACTION_TYPE(struct ndr_push *ndr, int ndr_flags, enum SC_ACTION_TYPE r)
1204 : {
1205 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
1206 0 : return NDR_ERR_SUCCESS;
1207 : }
1208 :
1209 0 : static enum ndr_err_code ndr_pull_SC_ACTION_TYPE(struct ndr_pull *ndr, int ndr_flags, enum SC_ACTION_TYPE *r)
1210 : {
1211 : uint32_t v;
1212 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
1213 0 : *r = v;
1214 0 : return NDR_ERR_SUCCESS;
1215 : }
1216 :
1217 0 : _PUBLIC_ void ndr_print_SC_ACTION_TYPE(struct ndr_print *ndr, const char *name, enum SC_ACTION_TYPE r)
1218 : {
1219 0 : const char *val = NULL;
1220 :
1221 0 : switch (r) {
1222 0 : case SC_ACTION_NONE: val = "SC_ACTION_NONE"; break;
1223 0 : case SC_ACTION_RESTART: val = "SC_ACTION_RESTART"; break;
1224 0 : case SC_ACTION_REBOOT: val = "SC_ACTION_REBOOT"; break;
1225 0 : case SC_ACTION_RUN_COMMAND: val = "SC_ACTION_RUN_COMMAND"; break;
1226 : }
1227 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
1228 0 : }
1229 :
1230 0 : static enum ndr_err_code ndr_push_SC_ACTION(struct ndr_push *ndr, int ndr_flags, const struct SC_ACTION *r)
1231 : {
1232 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1233 0 : if (ndr_flags & NDR_SCALARS) {
1234 0 : NDR_CHECK(ndr_push_align(ndr, 4));
1235 0 : NDR_CHECK(ndr_push_SC_ACTION_TYPE(ndr, NDR_SCALARS, r->type));
1236 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->delay));
1237 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1238 : }
1239 0 : if (ndr_flags & NDR_BUFFERS) {
1240 : }
1241 0 : return NDR_ERR_SUCCESS;
1242 : }
1243 :
1244 0 : static enum ndr_err_code ndr_pull_SC_ACTION(struct ndr_pull *ndr, int ndr_flags, struct SC_ACTION *r)
1245 : {
1246 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1247 0 : if (ndr_flags & NDR_SCALARS) {
1248 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
1249 0 : NDR_CHECK(ndr_pull_SC_ACTION_TYPE(ndr, NDR_SCALARS, &r->type));
1250 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->delay));
1251 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1252 : }
1253 0 : if (ndr_flags & NDR_BUFFERS) {
1254 : }
1255 0 : return NDR_ERR_SUCCESS;
1256 : }
1257 :
1258 0 : _PUBLIC_ void ndr_print_SC_ACTION(struct ndr_print *ndr, const char *name, const struct SC_ACTION *r)
1259 : {
1260 0 : ndr_print_struct(ndr, name, "SC_ACTION");
1261 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1262 0 : ndr->depth++;
1263 0 : ndr_print_SC_ACTION_TYPE(ndr, "type", r->type);
1264 0 : ndr_print_uint32(ndr, "delay", r->delay);
1265 0 : ndr->depth--;
1266 : }
1267 :
1268 0 : _PUBLIC_ enum ndr_err_code ndr_push_SERVICE_FAILURE_ACTIONS(struct ndr_push *ndr, int ndr_flags, const struct SERVICE_FAILURE_ACTIONS *r)
1269 : {
1270 : uint32_t cntr_actions_1;
1271 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1272 0 : if (ndr_flags & NDR_SCALARS) {
1273 0 : NDR_CHECK(ndr_push_align(ndr, 5));
1274 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reset_period));
1275 : {
1276 0 : uint32_t _flags_save_string = ndr->flags;
1277 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1278 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->rebootmsg));
1279 0 : ndr->flags = _flags_save_string;
1280 : }
1281 : {
1282 0 : uint32_t _flags_save_string = ndr->flags;
1283 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1284 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->command));
1285 0 : ndr->flags = _flags_save_string;
1286 : }
1287 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_actions));
1288 0 : NDR_CHECK(ndr_push_relative_ptr1(ndr, r->actions));
1289 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1290 : }
1291 0 : if (ndr_flags & NDR_BUFFERS) {
1292 : {
1293 0 : uint32_t _flags_save_string = ndr->flags;
1294 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1295 0 : if (r->rebootmsg) {
1296 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->rebootmsg));
1297 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->rebootmsg));
1298 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->rebootmsg));
1299 : }
1300 0 : ndr->flags = _flags_save_string;
1301 : }
1302 : {
1303 0 : uint32_t _flags_save_string = ndr->flags;
1304 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1305 0 : if (r->command) {
1306 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->command));
1307 0 : NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->command));
1308 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->command));
1309 : }
1310 0 : ndr->flags = _flags_save_string;
1311 : }
1312 0 : if (r->actions) {
1313 0 : NDR_CHECK(ndr_push_relative_ptr2_start(ndr, r->actions));
1314 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_actions));
1315 0 : for (cntr_actions_1 = 0; cntr_actions_1 < (r->num_actions); cntr_actions_1++) {
1316 0 : NDR_CHECK(ndr_push_SC_ACTION(ndr, NDR_SCALARS, &r->actions[cntr_actions_1]));
1317 : }
1318 0 : NDR_CHECK(ndr_push_relative_ptr2_end(ndr, r->actions));
1319 : }
1320 : }
1321 0 : return NDR_ERR_SUCCESS;
1322 : }
1323 :
1324 0 : _PUBLIC_ enum ndr_err_code ndr_pull_SERVICE_FAILURE_ACTIONS(struct ndr_pull *ndr, int ndr_flags, struct SERVICE_FAILURE_ACTIONS *r)
1325 : {
1326 : uint32_t _ptr_rebootmsg;
1327 0 : TALLOC_CTX *_mem_save_rebootmsg_0 = NULL;
1328 : uint32_t _ptr_command;
1329 0 : TALLOC_CTX *_mem_save_command_0 = NULL;
1330 : uint32_t _ptr_actions;
1331 0 : uint32_t size_actions_1 = 0;
1332 : uint32_t cntr_actions_1;
1333 0 : TALLOC_CTX *_mem_save_actions_0 = NULL;
1334 0 : TALLOC_CTX *_mem_save_actions_1 = NULL;
1335 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1336 0 : if (ndr_flags & NDR_SCALARS) {
1337 0 : NDR_CHECK(ndr_pull_align(ndr, 5));
1338 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reset_period));
1339 : {
1340 0 : uint32_t _flags_save_string = ndr->flags;
1341 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1342 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_rebootmsg));
1343 0 : if (_ptr_rebootmsg) {
1344 0 : NDR_PULL_ALLOC(ndr, r->rebootmsg);
1345 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->rebootmsg, _ptr_rebootmsg));
1346 : } else {
1347 0 : r->rebootmsg = NULL;
1348 : }
1349 0 : ndr->flags = _flags_save_string;
1350 : }
1351 : {
1352 0 : uint32_t _flags_save_string = ndr->flags;
1353 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1354 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_command));
1355 0 : if (_ptr_command) {
1356 0 : NDR_PULL_ALLOC(ndr, r->command);
1357 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->command, _ptr_command));
1358 : } else {
1359 0 : r->command = NULL;
1360 : }
1361 0 : ndr->flags = _flags_save_string;
1362 : }
1363 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_actions));
1364 0 : if (r->num_actions > 1024) {
1365 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1366 : }
1367 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_actions));
1368 0 : if (_ptr_actions) {
1369 0 : NDR_PULL_ALLOC(ndr, r->actions);
1370 0 : NDR_CHECK(ndr_pull_relative_ptr1(ndr, r->actions, _ptr_actions));
1371 : } else {
1372 0 : r->actions = NULL;
1373 : }
1374 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1375 : }
1376 0 : if (ndr_flags & NDR_BUFFERS) {
1377 : {
1378 0 : uint32_t _flags_save_string = ndr->flags;
1379 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1380 0 : if (r->rebootmsg) {
1381 : uint32_t _relative_save_offset;
1382 0 : _relative_save_offset = ndr->offset;
1383 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->rebootmsg));
1384 0 : _mem_save_rebootmsg_0 = NDR_PULL_GET_MEM_CTX(ndr);
1385 0 : NDR_PULL_SET_MEM_CTX(ndr, r->rebootmsg, 0);
1386 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->rebootmsg));
1387 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_rebootmsg_0, 0);
1388 0 : if (ndr->offset > ndr->relative_highest_offset) {
1389 0 : ndr->relative_highest_offset = ndr->offset;
1390 : }
1391 0 : ndr->offset = _relative_save_offset;
1392 : }
1393 0 : ndr->flags = _flags_save_string;
1394 : }
1395 : {
1396 0 : uint32_t _flags_save_string = ndr->flags;
1397 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1398 0 : if (r->command) {
1399 : uint32_t _relative_save_offset;
1400 0 : _relative_save_offset = ndr->offset;
1401 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->command));
1402 0 : _mem_save_command_0 = NDR_PULL_GET_MEM_CTX(ndr);
1403 0 : NDR_PULL_SET_MEM_CTX(ndr, r->command, 0);
1404 0 : NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->command));
1405 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_command_0, 0);
1406 0 : if (ndr->offset > ndr->relative_highest_offset) {
1407 0 : ndr->relative_highest_offset = ndr->offset;
1408 : }
1409 0 : ndr->offset = _relative_save_offset;
1410 : }
1411 0 : ndr->flags = _flags_save_string;
1412 : }
1413 0 : if (r->actions) {
1414 : uint32_t _relative_save_offset;
1415 0 : _relative_save_offset = ndr->offset;
1416 0 : NDR_CHECK(ndr_pull_relative_ptr2(ndr, r->actions));
1417 0 : _mem_save_actions_0 = NDR_PULL_GET_MEM_CTX(ndr);
1418 0 : NDR_PULL_SET_MEM_CTX(ndr, r->actions, 0);
1419 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->actions));
1420 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->actions, &size_actions_1));
1421 0 : NDR_PULL_ALLOC_N(ndr, r->actions, size_actions_1);
1422 0 : _mem_save_actions_1 = NDR_PULL_GET_MEM_CTX(ndr);
1423 0 : NDR_PULL_SET_MEM_CTX(ndr, r->actions, 0);
1424 0 : for (cntr_actions_1 = 0; cntr_actions_1 < (size_actions_1); cntr_actions_1++) {
1425 0 : NDR_CHECK(ndr_pull_SC_ACTION(ndr, NDR_SCALARS, &r->actions[cntr_actions_1]));
1426 : }
1427 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_actions_1, 0);
1428 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_actions_0, 0);
1429 0 : if (ndr->offset > ndr->relative_highest_offset) {
1430 0 : ndr->relative_highest_offset = ndr->offset;
1431 : }
1432 0 : ndr->offset = _relative_save_offset;
1433 : }
1434 0 : if (r->actions) {
1435 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->actions, r->num_actions));
1436 : }
1437 : }
1438 0 : return NDR_ERR_SUCCESS;
1439 : }
1440 :
1441 0 : static void ndr_print_flags_SERVICE_FAILURE_ACTIONS(struct ndr_print *ndr, const char *name, int unused, const struct SERVICE_FAILURE_ACTIONS *r)
1442 : {
1443 0 : ndr_print_SERVICE_FAILURE_ACTIONS(ndr, name, r);
1444 0 : }
1445 :
1446 0 : _PUBLIC_ void ndr_print_SERVICE_FAILURE_ACTIONS(struct ndr_print *ndr, const char *name, const struct SERVICE_FAILURE_ACTIONS *r)
1447 : {
1448 : uint32_t cntr_actions_1;
1449 0 : ndr_print_struct(ndr, name, "SERVICE_FAILURE_ACTIONS");
1450 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1451 0 : ndr->depth++;
1452 0 : ndr_print_uint32(ndr, "reset_period", r->reset_period);
1453 : {
1454 0 : uint32_t _flags_save_string = ndr->flags;
1455 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1456 0 : ndr_print_ptr(ndr, "rebootmsg", r->rebootmsg);
1457 0 : ndr->depth++;
1458 0 : if (r->rebootmsg) {
1459 0 : ndr_print_string(ndr, "rebootmsg", r->rebootmsg);
1460 : }
1461 0 : ndr->depth--;
1462 0 : ndr->flags = _flags_save_string;
1463 : }
1464 : {
1465 0 : uint32_t _flags_save_string = ndr->flags;
1466 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
1467 0 : ndr_print_ptr(ndr, "command", r->command);
1468 0 : ndr->depth++;
1469 0 : if (r->command) {
1470 0 : ndr_print_string(ndr, "command", r->command);
1471 : }
1472 0 : ndr->depth--;
1473 0 : ndr->flags = _flags_save_string;
1474 : }
1475 0 : ndr_print_uint32(ndr, "num_actions", r->num_actions);
1476 0 : ndr_print_ptr(ndr, "actions", r->actions);
1477 0 : ndr->depth++;
1478 0 : if (r->actions) {
1479 0 : ndr->print(ndr, "%s: ARRAY(%d)", "actions", (int)r->num_actions);
1480 0 : ndr->depth++;
1481 0 : for (cntr_actions_1 = 0; cntr_actions_1 < (r->num_actions); cntr_actions_1++) {
1482 0 : ndr_print_SC_ACTION(ndr, "actions", &r->actions[cntr_actions_1]);
1483 : }
1484 0 : ndr->depth--;
1485 : }
1486 0 : ndr->depth--;
1487 0 : ndr->depth--;
1488 : }
1489 :
1490 0 : _PUBLIC_ size_t ndr_size_SERVICE_FAILURE_ACTIONS(const struct SERVICE_FAILURE_ACTIONS *r, int flags)
1491 : {
1492 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_SERVICE_FAILURE_ACTIONS);
1493 : }
1494 :
1495 0 : static enum ndr_err_code ndr_push_svcctl_StatusLevel(struct ndr_push *ndr, int ndr_flags, enum svcctl_StatusLevel r)
1496 : {
1497 0 : NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
1498 0 : return NDR_ERR_SUCCESS;
1499 : }
1500 :
1501 0 : static enum ndr_err_code ndr_pull_svcctl_StatusLevel(struct ndr_pull *ndr, int ndr_flags, enum svcctl_StatusLevel *r)
1502 : {
1503 : uint32_t v;
1504 0 : NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
1505 0 : *r = v;
1506 0 : return NDR_ERR_SUCCESS;
1507 : }
1508 :
1509 0 : _PUBLIC_ void ndr_print_svcctl_StatusLevel(struct ndr_print *ndr, const char *name, enum svcctl_StatusLevel r)
1510 : {
1511 0 : const char *val = NULL;
1512 :
1513 0 : switch (r) {
1514 0 : case SVC_STATUS_PROCESS_INFO: val = "SVC_STATUS_PROCESS_INFO"; break;
1515 : }
1516 0 : ndr_print_enum(ndr, name, "ENUM", val, r);
1517 0 : }
1518 :
1519 0 : static enum ndr_err_code ndr_push_svcctl_CloseServiceHandle(struct ndr_push *ndr, int flags, const struct svcctl_CloseServiceHandle *r)
1520 : {
1521 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1522 0 : if (flags & NDR_IN) {
1523 0 : if (r->in.handle == NULL) {
1524 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1525 : }
1526 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1527 : }
1528 0 : if (flags & NDR_OUT) {
1529 0 : if (r->out.handle == NULL) {
1530 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1531 : }
1532 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
1533 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1534 : }
1535 0 : return NDR_ERR_SUCCESS;
1536 : }
1537 :
1538 0 : static enum ndr_err_code ndr_pull_svcctl_CloseServiceHandle(struct ndr_pull *ndr, int flags, struct svcctl_CloseServiceHandle *r)
1539 : {
1540 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
1541 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1542 0 : if (flags & NDR_IN) {
1543 0 : NDR_ZERO_STRUCT(r->out);
1544 :
1545 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1546 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
1547 : }
1548 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1549 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1550 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1551 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1552 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
1553 0 : *r->out.handle = *r->in.handle;
1554 : }
1555 0 : if (flags & NDR_OUT) {
1556 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1557 : if (r->in.handle == NULL) {
1558 : NDR_PULL_ALLOC(ndr, r->in.handle);
1559 : NDR_ZERO_STRUCTP(r->in.handle);
1560 : }
1561 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1562 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1563 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
1564 : }
1565 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1566 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
1567 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
1568 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1569 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1570 : }
1571 0 : return NDR_ERR_SUCCESS;
1572 : }
1573 :
1574 0 : _PUBLIC_ void ndr_print_svcctl_CloseServiceHandle(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CloseServiceHandle *r)
1575 : {
1576 0 : ndr_print_struct(ndr, name, "svcctl_CloseServiceHandle");
1577 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1578 0 : ndr->depth++;
1579 0 : if (flags & NDR_SET_VALUES) {
1580 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1581 : }
1582 0 : if (flags & NDR_IN) {
1583 0 : ndr_print_struct(ndr, "in", "svcctl_CloseServiceHandle");
1584 0 : ndr->depth++;
1585 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
1586 0 : ndr->depth++;
1587 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
1588 0 : ndr->depth--;
1589 0 : ndr->depth--;
1590 : }
1591 0 : if (flags & NDR_OUT) {
1592 0 : ndr_print_struct(ndr, "out", "svcctl_CloseServiceHandle");
1593 0 : ndr->depth++;
1594 0 : ndr_print_ptr(ndr, "handle", r->out.handle);
1595 0 : ndr->depth++;
1596 0 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
1597 0 : ndr->depth--;
1598 0 : ndr_print_WERROR(ndr, "result", r->out.result);
1599 0 : ndr->depth--;
1600 : }
1601 0 : ndr->depth--;
1602 : }
1603 :
1604 0 : static enum ndr_err_code ndr_push_svcctl_ControlService(struct ndr_push *ndr, int flags, const struct svcctl_ControlService *r)
1605 : {
1606 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1607 0 : if (flags & NDR_IN) {
1608 0 : if (r->in.handle == NULL) {
1609 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1610 : }
1611 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1612 0 : NDR_CHECK(ndr_push_SERVICE_CONTROL(ndr, NDR_SCALARS, r->in.control));
1613 : }
1614 0 : if (flags & NDR_OUT) {
1615 0 : if (r->out.service_status == NULL) {
1616 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1617 : }
1618 0 : NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, r->out.service_status));
1619 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1620 : }
1621 0 : return NDR_ERR_SUCCESS;
1622 : }
1623 :
1624 0 : static enum ndr_err_code ndr_pull_svcctl_ControlService(struct ndr_pull *ndr, int flags, struct svcctl_ControlService *r)
1625 : {
1626 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
1627 0 : TALLOC_CTX *_mem_save_service_status_0 = NULL;
1628 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1629 0 : if (flags & NDR_IN) {
1630 0 : NDR_ZERO_STRUCT(r->out);
1631 :
1632 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1633 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
1634 : }
1635 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1636 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1637 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1638 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1639 0 : NDR_CHECK(ndr_pull_SERVICE_CONTROL(ndr, NDR_SCALARS, &r->in.control));
1640 0 : NDR_PULL_ALLOC(ndr, r->out.service_status);
1641 0 : NDR_ZERO_STRUCTP(r->out.service_status);
1642 : }
1643 0 : if (flags & NDR_OUT) {
1644 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1645 : if (r->in.handle == NULL) {
1646 : NDR_PULL_ALLOC(ndr, r->in.handle);
1647 : NDR_ZERO_STRUCTP(r->in.handle);
1648 : }
1649 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1650 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1651 0 : NDR_PULL_ALLOC(ndr, r->out.service_status);
1652 : }
1653 0 : _mem_save_service_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
1654 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.service_status, LIBNDR_FLAG_REF_ALLOC);
1655 0 : NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, r->out.service_status));
1656 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_status_0, LIBNDR_FLAG_REF_ALLOC);
1657 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1658 : }
1659 0 : return NDR_ERR_SUCCESS;
1660 : }
1661 :
1662 0 : _PUBLIC_ void ndr_print_svcctl_ControlService(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ControlService *r)
1663 : {
1664 0 : ndr_print_struct(ndr, name, "svcctl_ControlService");
1665 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1666 0 : ndr->depth++;
1667 0 : if (flags & NDR_SET_VALUES) {
1668 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1669 : }
1670 0 : if (flags & NDR_IN) {
1671 0 : ndr_print_struct(ndr, "in", "svcctl_ControlService");
1672 0 : ndr->depth++;
1673 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
1674 0 : ndr->depth++;
1675 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
1676 0 : ndr->depth--;
1677 0 : ndr_print_SERVICE_CONTROL(ndr, "control", r->in.control);
1678 0 : ndr->depth--;
1679 : }
1680 0 : if (flags & NDR_OUT) {
1681 0 : ndr_print_struct(ndr, "out", "svcctl_ControlService");
1682 0 : ndr->depth++;
1683 0 : ndr_print_ptr(ndr, "service_status", r->out.service_status);
1684 0 : ndr->depth++;
1685 0 : ndr_print_SERVICE_STATUS(ndr, "service_status", r->out.service_status);
1686 0 : ndr->depth--;
1687 0 : ndr_print_WERROR(ndr, "result", r->out.result);
1688 0 : ndr->depth--;
1689 : }
1690 0 : ndr->depth--;
1691 : }
1692 :
1693 0 : static enum ndr_err_code ndr_push_svcctl_DeleteService(struct ndr_push *ndr, int flags, const struct svcctl_DeleteService *r)
1694 : {
1695 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1696 0 : if (flags & NDR_IN) {
1697 0 : if (r->in.handle == NULL) {
1698 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1699 : }
1700 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1701 : }
1702 0 : if (flags & NDR_OUT) {
1703 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1704 : }
1705 0 : return NDR_ERR_SUCCESS;
1706 : }
1707 :
1708 0 : static enum ndr_err_code ndr_pull_svcctl_DeleteService(struct ndr_pull *ndr, int flags, struct svcctl_DeleteService *r)
1709 : {
1710 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
1711 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1712 0 : if (flags & NDR_IN) {
1713 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1714 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
1715 : }
1716 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1717 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1718 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1719 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1720 : }
1721 0 : if (flags & NDR_OUT) {
1722 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1723 : if (r->in.handle == NULL) {
1724 : NDR_PULL_ALLOC(ndr, r->in.handle);
1725 : NDR_ZERO_STRUCTP(r->in.handle);
1726 : }
1727 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1728 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1729 : }
1730 0 : return NDR_ERR_SUCCESS;
1731 : }
1732 :
1733 0 : _PUBLIC_ void ndr_print_svcctl_DeleteService(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_DeleteService *r)
1734 : {
1735 0 : ndr_print_struct(ndr, name, "svcctl_DeleteService");
1736 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1737 0 : ndr->depth++;
1738 0 : if (flags & NDR_SET_VALUES) {
1739 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1740 : }
1741 0 : if (flags & NDR_IN) {
1742 0 : ndr_print_struct(ndr, "in", "svcctl_DeleteService");
1743 0 : ndr->depth++;
1744 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
1745 0 : ndr->depth++;
1746 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
1747 0 : ndr->depth--;
1748 0 : ndr->depth--;
1749 : }
1750 0 : if (flags & NDR_OUT) {
1751 0 : ndr_print_struct(ndr, "out", "svcctl_DeleteService");
1752 0 : ndr->depth++;
1753 0 : ndr_print_WERROR(ndr, "result", r->out.result);
1754 0 : ndr->depth--;
1755 : }
1756 0 : ndr->depth--;
1757 : }
1758 :
1759 0 : static enum ndr_err_code ndr_push_svcctl_LockServiceDatabase(struct ndr_push *ndr, int flags, const struct svcctl_LockServiceDatabase *r)
1760 : {
1761 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1762 0 : if (flags & NDR_IN) {
1763 0 : if (r->in.handle == NULL) {
1764 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1765 : }
1766 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1767 : }
1768 0 : if (flags & NDR_OUT) {
1769 0 : if (r->out.lock == NULL) {
1770 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1771 : }
1772 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.lock));
1773 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1774 : }
1775 0 : return NDR_ERR_SUCCESS;
1776 : }
1777 :
1778 0 : static enum ndr_err_code ndr_pull_svcctl_LockServiceDatabase(struct ndr_pull *ndr, int flags, struct svcctl_LockServiceDatabase *r)
1779 : {
1780 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
1781 0 : TALLOC_CTX *_mem_save_lock_0 = NULL;
1782 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1783 0 : if (flags & NDR_IN) {
1784 0 : NDR_ZERO_STRUCT(r->out);
1785 :
1786 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1787 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
1788 : }
1789 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1790 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1791 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1792 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1793 0 : NDR_PULL_ALLOC(ndr, r->out.lock);
1794 0 : NDR_ZERO_STRUCTP(r->out.lock);
1795 : }
1796 0 : if (flags & NDR_OUT) {
1797 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1798 : if (r->in.handle == NULL) {
1799 : NDR_PULL_ALLOC(ndr, r->in.handle);
1800 : NDR_ZERO_STRUCTP(r->in.handle);
1801 : }
1802 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1803 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1804 0 : NDR_PULL_ALLOC(ndr, r->out.lock);
1805 : }
1806 0 : _mem_save_lock_0 = NDR_PULL_GET_MEM_CTX(ndr);
1807 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.lock, LIBNDR_FLAG_REF_ALLOC);
1808 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.lock));
1809 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_0, LIBNDR_FLAG_REF_ALLOC);
1810 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1811 : }
1812 0 : return NDR_ERR_SUCCESS;
1813 : }
1814 :
1815 0 : _PUBLIC_ void ndr_print_svcctl_LockServiceDatabase(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_LockServiceDatabase *r)
1816 : {
1817 0 : ndr_print_struct(ndr, name, "svcctl_LockServiceDatabase");
1818 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1819 0 : ndr->depth++;
1820 0 : if (flags & NDR_SET_VALUES) {
1821 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1822 : }
1823 0 : if (flags & NDR_IN) {
1824 0 : ndr_print_struct(ndr, "in", "svcctl_LockServiceDatabase");
1825 0 : ndr->depth++;
1826 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
1827 0 : ndr->depth++;
1828 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
1829 0 : ndr->depth--;
1830 0 : ndr->depth--;
1831 : }
1832 0 : if (flags & NDR_OUT) {
1833 0 : ndr_print_struct(ndr, "out", "svcctl_LockServiceDatabase");
1834 0 : ndr->depth++;
1835 0 : ndr_print_ptr(ndr, "lock", r->out.lock);
1836 0 : ndr->depth++;
1837 0 : ndr_print_policy_handle(ndr, "lock", r->out.lock);
1838 0 : ndr->depth--;
1839 0 : ndr_print_WERROR(ndr, "result", r->out.result);
1840 0 : ndr->depth--;
1841 : }
1842 0 : ndr->depth--;
1843 : }
1844 :
1845 0 : static enum ndr_err_code ndr_push_svcctl_QueryServiceObjectSecurity(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceObjectSecurity *r)
1846 : {
1847 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1848 0 : if (flags & NDR_IN) {
1849 0 : if (r->in.handle == NULL) {
1850 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1851 : }
1852 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1853 0 : NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.security_flags));
1854 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
1855 : }
1856 0 : if (flags & NDR_OUT) {
1857 0 : if (r->out.buffer == NULL) {
1858 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1859 : }
1860 0 : if (r->out.needed == NULL) {
1861 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1862 : }
1863 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
1864 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
1865 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
1866 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1867 : }
1868 0 : return NDR_ERR_SUCCESS;
1869 : }
1870 :
1871 0 : static enum ndr_err_code ndr_pull_svcctl_QueryServiceObjectSecurity(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceObjectSecurity *r)
1872 : {
1873 0 : uint32_t size_buffer_1 = 0;
1874 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
1875 0 : TALLOC_CTX *_mem_save_needed_0 = NULL;
1876 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1877 0 : if (flags & NDR_IN) {
1878 0 : NDR_ZERO_STRUCT(r->out);
1879 :
1880 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1881 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
1882 : }
1883 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1884 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1885 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1886 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1887 0 : NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.security_flags));
1888 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
1889 0 : if (r->in.offered > 262144) {
1890 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1891 : }
1892 0 : NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.offered);
1893 0 : memset(r->out.buffer, 0, (r->in.offered) * sizeof(*r->out.buffer));
1894 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
1895 0 : NDR_ZERO_STRUCTP(r->out.needed);
1896 : }
1897 0 : if (flags & NDR_OUT) {
1898 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1899 : if (r->in.handle == NULL) {
1900 : NDR_PULL_ALLOC(ndr, r->in.handle);
1901 : NDR_ZERO_STRUCTP(r->in.handle);
1902 : }
1903 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1904 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
1905 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.buffer, &size_buffer_1));
1906 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1907 0 : NDR_PULL_ALLOC_N(ndr, r->out.buffer, size_buffer_1);
1908 : }
1909 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, size_buffer_1));
1910 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1911 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
1912 : }
1913 0 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
1914 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
1915 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
1916 0 : if (*r->out.needed > 262144) {
1917 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1918 : }
1919 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
1920 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1921 0 : if (r->out.buffer) {
1922 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.buffer, r->in.offered));
1923 : }
1924 : }
1925 0 : return NDR_ERR_SUCCESS;
1926 : }
1927 :
1928 0 : _PUBLIC_ void ndr_print_svcctl_QueryServiceObjectSecurity(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceObjectSecurity *r)
1929 : {
1930 0 : ndr_print_struct(ndr, name, "svcctl_QueryServiceObjectSecurity");
1931 0 : if (r == NULL) { ndr_print_null(ndr); return; }
1932 0 : ndr->depth++;
1933 0 : if (flags & NDR_SET_VALUES) {
1934 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1935 : }
1936 0 : if (flags & NDR_IN) {
1937 0 : ndr_print_struct(ndr, "in", "svcctl_QueryServiceObjectSecurity");
1938 0 : ndr->depth++;
1939 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
1940 0 : ndr->depth++;
1941 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
1942 0 : ndr->depth--;
1943 0 : ndr_print_security_secinfo(ndr, "security_flags", r->in.security_flags);
1944 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
1945 0 : ndr->depth--;
1946 : }
1947 0 : if (flags & NDR_OUT) {
1948 0 : ndr_print_struct(ndr, "out", "svcctl_QueryServiceObjectSecurity");
1949 0 : ndr->depth++;
1950 0 : ndr_print_ptr(ndr, "buffer", r->out.buffer);
1951 0 : ndr->depth++;
1952 0 : ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
1953 0 : ndr->depth--;
1954 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
1955 0 : ndr->depth++;
1956 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
1957 0 : ndr->depth--;
1958 0 : ndr_print_WERROR(ndr, "result", r->out.result);
1959 0 : ndr->depth--;
1960 : }
1961 0 : ndr->depth--;
1962 : }
1963 :
1964 0 : static enum ndr_err_code ndr_push_svcctl_SetServiceObjectSecurity(struct ndr_push *ndr, int flags, const struct svcctl_SetServiceObjectSecurity *r)
1965 : {
1966 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1967 0 : if (flags & NDR_IN) {
1968 0 : if (r->in.handle == NULL) {
1969 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1970 : }
1971 0 : if (r->in.buffer == NULL) {
1972 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1973 : }
1974 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1975 0 : NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.security_flags));
1976 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
1977 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.buffer, r->in.offered));
1978 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
1979 : }
1980 0 : if (flags & NDR_OUT) {
1981 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1982 : }
1983 0 : return NDR_ERR_SUCCESS;
1984 : }
1985 :
1986 0 : static enum ndr_err_code ndr_pull_svcctl_SetServiceObjectSecurity(struct ndr_pull *ndr, int flags, struct svcctl_SetServiceObjectSecurity *r)
1987 : {
1988 0 : uint32_t size_buffer_1 = 0;
1989 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
1990 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1991 0 : if (flags & NDR_IN) {
1992 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1993 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
1994 : }
1995 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1996 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1997 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1998 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1999 0 : NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.security_flags));
2000 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.buffer));
2001 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.buffer, &size_buffer_1));
2002 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2003 0 : NDR_PULL_ALLOC_N(ndr, r->in.buffer, size_buffer_1);
2004 : }
2005 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.buffer, size_buffer_1));
2006 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
2007 0 : if (r->in.buffer) {
2008 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.buffer, r->in.offered));
2009 : }
2010 : }
2011 0 : if (flags & NDR_OUT) {
2012 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
2013 : if (r->in.handle == NULL) {
2014 : NDR_PULL_ALLOC(ndr, r->in.handle);
2015 : NDR_ZERO_STRUCTP(r->in.handle);
2016 : }
2017 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
2018 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2019 : }
2020 0 : return NDR_ERR_SUCCESS;
2021 : }
2022 :
2023 0 : _PUBLIC_ void ndr_print_svcctl_SetServiceObjectSecurity(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SetServiceObjectSecurity *r)
2024 : {
2025 0 : ndr_print_struct(ndr, name, "svcctl_SetServiceObjectSecurity");
2026 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2027 0 : ndr->depth++;
2028 0 : if (flags & NDR_SET_VALUES) {
2029 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2030 : }
2031 0 : if (flags & NDR_IN) {
2032 0 : ndr_print_struct(ndr, "in", "svcctl_SetServiceObjectSecurity");
2033 0 : ndr->depth++;
2034 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
2035 0 : ndr->depth++;
2036 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
2037 0 : ndr->depth--;
2038 0 : ndr_print_security_secinfo(ndr, "security_flags", r->in.security_flags);
2039 0 : ndr_print_ptr(ndr, "buffer", r->in.buffer);
2040 0 : ndr->depth++;
2041 0 : ndr_print_array_uint8(ndr, "buffer", r->in.buffer, r->in.offered);
2042 0 : ndr->depth--;
2043 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
2044 0 : ndr->depth--;
2045 : }
2046 0 : if (flags & NDR_OUT) {
2047 0 : ndr_print_struct(ndr, "out", "svcctl_SetServiceObjectSecurity");
2048 0 : ndr->depth++;
2049 0 : ndr_print_WERROR(ndr, "result", r->out.result);
2050 0 : ndr->depth--;
2051 : }
2052 0 : ndr->depth--;
2053 : }
2054 :
2055 0 : static enum ndr_err_code ndr_push_svcctl_QueryServiceStatus(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceStatus *r)
2056 : {
2057 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2058 0 : if (flags & NDR_IN) {
2059 0 : if (r->in.handle == NULL) {
2060 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2061 : }
2062 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2063 : }
2064 0 : if (flags & NDR_OUT) {
2065 0 : if (r->out.service_status == NULL) {
2066 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2067 : }
2068 0 : NDR_CHECK(ndr_push_SERVICE_STATUS(ndr, NDR_SCALARS, r->out.service_status));
2069 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2070 : }
2071 0 : return NDR_ERR_SUCCESS;
2072 : }
2073 :
2074 0 : static enum ndr_err_code ndr_pull_svcctl_QueryServiceStatus(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceStatus *r)
2075 : {
2076 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
2077 0 : TALLOC_CTX *_mem_save_service_status_0 = NULL;
2078 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2079 0 : if (flags & NDR_IN) {
2080 0 : NDR_ZERO_STRUCT(r->out);
2081 :
2082 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2083 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
2084 : }
2085 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2086 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2087 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2088 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2089 0 : NDR_PULL_ALLOC(ndr, r->out.service_status);
2090 0 : NDR_ZERO_STRUCTP(r->out.service_status);
2091 : }
2092 0 : if (flags & NDR_OUT) {
2093 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
2094 : if (r->in.handle == NULL) {
2095 : NDR_PULL_ALLOC(ndr, r->in.handle);
2096 : NDR_ZERO_STRUCTP(r->in.handle);
2097 : }
2098 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
2099 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2100 0 : NDR_PULL_ALLOC(ndr, r->out.service_status);
2101 : }
2102 0 : _mem_save_service_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
2103 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.service_status, LIBNDR_FLAG_REF_ALLOC);
2104 0 : NDR_CHECK(ndr_pull_SERVICE_STATUS(ndr, NDR_SCALARS, r->out.service_status));
2105 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_status_0, LIBNDR_FLAG_REF_ALLOC);
2106 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2107 : }
2108 0 : return NDR_ERR_SUCCESS;
2109 : }
2110 :
2111 0 : _PUBLIC_ void ndr_print_svcctl_QueryServiceStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceStatus *r)
2112 : {
2113 0 : ndr_print_struct(ndr, name, "svcctl_QueryServiceStatus");
2114 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2115 0 : ndr->depth++;
2116 0 : if (flags & NDR_SET_VALUES) {
2117 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2118 : }
2119 0 : if (flags & NDR_IN) {
2120 0 : ndr_print_struct(ndr, "in", "svcctl_QueryServiceStatus");
2121 0 : ndr->depth++;
2122 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
2123 0 : ndr->depth++;
2124 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
2125 0 : ndr->depth--;
2126 0 : ndr->depth--;
2127 : }
2128 0 : if (flags & NDR_OUT) {
2129 0 : ndr_print_struct(ndr, "out", "svcctl_QueryServiceStatus");
2130 0 : ndr->depth++;
2131 0 : ndr_print_ptr(ndr, "service_status", r->out.service_status);
2132 0 : ndr->depth++;
2133 0 : ndr_print_SERVICE_STATUS(ndr, "service_status", r->out.service_status);
2134 0 : ndr->depth--;
2135 0 : ndr_print_WERROR(ndr, "result", r->out.result);
2136 0 : ndr->depth--;
2137 : }
2138 0 : ndr->depth--;
2139 : }
2140 :
2141 0 : static enum ndr_err_code ndr_push_svcctl_SetServiceStatus(struct ndr_push *ndr, int flags, const struct svcctl_SetServiceStatus *r)
2142 : {
2143 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2144 0 : if (flags & NDR_IN) {
2145 : }
2146 0 : if (flags & NDR_OUT) {
2147 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2148 : }
2149 0 : return NDR_ERR_SUCCESS;
2150 : }
2151 :
2152 0 : static enum ndr_err_code ndr_pull_svcctl_SetServiceStatus(struct ndr_pull *ndr, int flags, struct svcctl_SetServiceStatus *r)
2153 : {
2154 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2155 0 : if (flags & NDR_IN) {
2156 : }
2157 0 : if (flags & NDR_OUT) {
2158 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
2159 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
2160 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2161 : }
2162 0 : return NDR_ERR_SUCCESS;
2163 : }
2164 :
2165 0 : _PUBLIC_ void ndr_print_svcctl_SetServiceStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SetServiceStatus *r)
2166 : {
2167 0 : ndr_print_struct(ndr, name, "svcctl_SetServiceStatus");
2168 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2169 0 : ndr->depth++;
2170 0 : if (flags & NDR_SET_VALUES) {
2171 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2172 : }
2173 0 : if (flags & NDR_IN) {
2174 0 : ndr_print_struct(ndr, "in", "svcctl_SetServiceStatus");
2175 0 : ndr->depth++;
2176 0 : ndr->depth--;
2177 : }
2178 0 : if (flags & NDR_OUT) {
2179 0 : ndr_print_struct(ndr, "out", "svcctl_SetServiceStatus");
2180 0 : ndr->depth++;
2181 0 : ndr_print_WERROR(ndr, "result", r->out.result);
2182 0 : ndr->depth--;
2183 : }
2184 0 : ndr->depth--;
2185 : }
2186 :
2187 0 : static enum ndr_err_code ndr_push_svcctl_UnlockServiceDatabase(struct ndr_push *ndr, int flags, const struct svcctl_UnlockServiceDatabase *r)
2188 : {
2189 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2190 0 : if (flags & NDR_IN) {
2191 0 : if (r->in.lock == NULL) {
2192 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2193 : }
2194 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.lock));
2195 : }
2196 0 : if (flags & NDR_OUT) {
2197 0 : if (r->out.lock == NULL) {
2198 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2199 : }
2200 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.lock));
2201 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2202 : }
2203 0 : return NDR_ERR_SUCCESS;
2204 : }
2205 :
2206 0 : static enum ndr_err_code ndr_pull_svcctl_UnlockServiceDatabase(struct ndr_pull *ndr, int flags, struct svcctl_UnlockServiceDatabase *r)
2207 : {
2208 0 : TALLOC_CTX *_mem_save_lock_0 = NULL;
2209 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2210 0 : if (flags & NDR_IN) {
2211 0 : NDR_ZERO_STRUCT(r->out);
2212 :
2213 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2214 0 : NDR_PULL_ALLOC(ndr, r->in.lock);
2215 : }
2216 0 : _mem_save_lock_0 = NDR_PULL_GET_MEM_CTX(ndr);
2217 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.lock, LIBNDR_FLAG_REF_ALLOC);
2218 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.lock));
2219 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_0, LIBNDR_FLAG_REF_ALLOC);
2220 0 : NDR_PULL_ALLOC(ndr, r->out.lock);
2221 0 : *r->out.lock = *r->in.lock;
2222 : }
2223 0 : if (flags & NDR_OUT) {
2224 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
2225 : if (r->in.lock == NULL) {
2226 : NDR_PULL_ALLOC(ndr, r->in.lock);
2227 : NDR_ZERO_STRUCTP(r->in.lock);
2228 : }
2229 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
2230 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2231 0 : NDR_PULL_ALLOC(ndr, r->out.lock);
2232 : }
2233 0 : _mem_save_lock_0 = NDR_PULL_GET_MEM_CTX(ndr);
2234 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.lock, LIBNDR_FLAG_REF_ALLOC);
2235 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.lock));
2236 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_0, LIBNDR_FLAG_REF_ALLOC);
2237 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2238 : }
2239 0 : return NDR_ERR_SUCCESS;
2240 : }
2241 :
2242 0 : _PUBLIC_ void ndr_print_svcctl_UnlockServiceDatabase(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_UnlockServiceDatabase *r)
2243 : {
2244 0 : ndr_print_struct(ndr, name, "svcctl_UnlockServiceDatabase");
2245 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2246 0 : ndr->depth++;
2247 0 : if (flags & NDR_SET_VALUES) {
2248 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2249 : }
2250 0 : if (flags & NDR_IN) {
2251 0 : ndr_print_struct(ndr, "in", "svcctl_UnlockServiceDatabase");
2252 0 : ndr->depth++;
2253 0 : ndr_print_ptr(ndr, "lock", r->in.lock);
2254 0 : ndr->depth++;
2255 0 : ndr_print_policy_handle(ndr, "lock", r->in.lock);
2256 0 : ndr->depth--;
2257 0 : ndr->depth--;
2258 : }
2259 0 : if (flags & NDR_OUT) {
2260 0 : ndr_print_struct(ndr, "out", "svcctl_UnlockServiceDatabase");
2261 0 : ndr->depth++;
2262 0 : ndr_print_ptr(ndr, "lock", r->out.lock);
2263 0 : ndr->depth++;
2264 0 : ndr_print_policy_handle(ndr, "lock", r->out.lock);
2265 0 : ndr->depth--;
2266 0 : ndr_print_WERROR(ndr, "result", r->out.result);
2267 0 : ndr->depth--;
2268 : }
2269 0 : ndr->depth--;
2270 : }
2271 :
2272 0 : static enum ndr_err_code ndr_push_svcctl_NotifyBootConfigStatus(struct ndr_push *ndr, int flags, const struct svcctl_NotifyBootConfigStatus *r)
2273 : {
2274 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2275 0 : if (flags & NDR_IN) {
2276 : }
2277 0 : if (flags & NDR_OUT) {
2278 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2279 : }
2280 0 : return NDR_ERR_SUCCESS;
2281 : }
2282 :
2283 0 : static enum ndr_err_code ndr_pull_svcctl_NotifyBootConfigStatus(struct ndr_pull *ndr, int flags, struct svcctl_NotifyBootConfigStatus *r)
2284 : {
2285 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2286 0 : if (flags & NDR_IN) {
2287 : }
2288 0 : if (flags & NDR_OUT) {
2289 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
2290 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
2291 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2292 : }
2293 0 : return NDR_ERR_SUCCESS;
2294 : }
2295 :
2296 0 : _PUBLIC_ void ndr_print_svcctl_NotifyBootConfigStatus(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_NotifyBootConfigStatus *r)
2297 : {
2298 0 : ndr_print_struct(ndr, name, "svcctl_NotifyBootConfigStatus");
2299 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2300 0 : ndr->depth++;
2301 0 : if (flags & NDR_SET_VALUES) {
2302 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2303 : }
2304 0 : if (flags & NDR_IN) {
2305 0 : ndr_print_struct(ndr, "in", "svcctl_NotifyBootConfigStatus");
2306 0 : ndr->depth++;
2307 0 : ndr->depth--;
2308 : }
2309 0 : if (flags & NDR_OUT) {
2310 0 : ndr_print_struct(ndr, "out", "svcctl_NotifyBootConfigStatus");
2311 0 : ndr->depth++;
2312 0 : ndr_print_WERROR(ndr, "result", r->out.result);
2313 0 : ndr->depth--;
2314 : }
2315 0 : ndr->depth--;
2316 : }
2317 :
2318 0 : static enum ndr_err_code ndr_push_svcctl_SCSetServiceBitsW(struct ndr_push *ndr, int flags, const struct svcctl_SCSetServiceBitsW *r)
2319 : {
2320 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2321 0 : if (flags & NDR_IN) {
2322 0 : if (r->in.handle == NULL) {
2323 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2324 : }
2325 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2326 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bits));
2327 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bitson));
2328 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.immediate));
2329 : }
2330 0 : if (flags & NDR_OUT) {
2331 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2332 : }
2333 0 : return NDR_ERR_SUCCESS;
2334 : }
2335 :
2336 0 : static enum ndr_err_code ndr_pull_svcctl_SCSetServiceBitsW(struct ndr_pull *ndr, int flags, struct svcctl_SCSetServiceBitsW *r)
2337 : {
2338 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
2339 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2340 0 : if (flags & NDR_IN) {
2341 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2342 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
2343 : }
2344 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2345 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2346 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2347 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2348 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bits));
2349 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bitson));
2350 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.immediate));
2351 : }
2352 0 : if (flags & NDR_OUT) {
2353 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
2354 : if (r->in.handle == NULL) {
2355 : NDR_PULL_ALLOC(ndr, r->in.handle);
2356 : NDR_ZERO_STRUCTP(r->in.handle);
2357 : }
2358 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
2359 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2360 : }
2361 0 : return NDR_ERR_SUCCESS;
2362 : }
2363 :
2364 0 : _PUBLIC_ void ndr_print_svcctl_SCSetServiceBitsW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSetServiceBitsW *r)
2365 : {
2366 0 : ndr_print_struct(ndr, name, "svcctl_SCSetServiceBitsW");
2367 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2368 0 : ndr->depth++;
2369 0 : if (flags & NDR_SET_VALUES) {
2370 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2371 : }
2372 0 : if (flags & NDR_IN) {
2373 0 : ndr_print_struct(ndr, "in", "svcctl_SCSetServiceBitsW");
2374 0 : ndr->depth++;
2375 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
2376 0 : ndr->depth++;
2377 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
2378 0 : ndr->depth--;
2379 0 : ndr_print_uint32(ndr, "bits", r->in.bits);
2380 0 : ndr_print_uint32(ndr, "bitson", r->in.bitson);
2381 0 : ndr_print_uint32(ndr, "immediate", r->in.immediate);
2382 0 : ndr->depth--;
2383 : }
2384 0 : if (flags & NDR_OUT) {
2385 0 : ndr_print_struct(ndr, "out", "svcctl_SCSetServiceBitsW");
2386 0 : ndr->depth++;
2387 0 : ndr_print_WERROR(ndr, "result", r->out.result);
2388 0 : ndr->depth--;
2389 : }
2390 0 : ndr->depth--;
2391 : }
2392 :
2393 0 : _PUBLIC_ enum ndr_err_code ndr_push_svcctl_ChangeServiceConfigW(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfigW *r)
2394 : {
2395 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2396 0 : if (flags & NDR_IN) {
2397 0 : if (r->in.handle == NULL) {
2398 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2399 : }
2400 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2401 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
2402 0 : NDR_CHECK(ndr_push_svcctl_StartType(ndr, NDR_SCALARS, r->in.start_type));
2403 0 : NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr, NDR_SCALARS, r->in.error_control));
2404 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.binary_path));
2405 0 : if (r->in.binary_path) {
2406 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
2407 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2408 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
2409 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));
2410 : }
2411 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.load_order_group));
2412 0 : if (r->in.load_order_group) {
2413 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.load_order_group, CH_UTF16)));
2414 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2415 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.load_order_group, CH_UTF16)));
2416 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));
2417 : }
2418 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.tag_id));
2419 0 : if (r->in.tag_id) {
2420 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.tag_id));
2421 : }
2422 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dependencies));
2423 0 : if (r->in.dependencies) {
2424 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.dwDependSize));
2425 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2426 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.dwDependSize));
2427 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dependencies, r->in.dwDependSize, sizeof(uint16_t), CH_UTF16));
2428 : }
2429 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwDependSize));
2430 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_start_name));
2431 0 : if (r->in.service_start_name) {
2432 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
2433 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2434 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
2435 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));
2436 : }
2437 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
2438 0 : if (r->in.password) {
2439 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.dwPwSize));
2440 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2441 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.dwPwSize));
2442 0 : NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.password, r->in.dwPwSize, sizeof(uint16_t), CH_UTF16));
2443 : }
2444 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dwPwSize));
2445 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name));
2446 0 : if (r->in.display_name) {
2447 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.display_name, CH_UTF16)));
2448 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2449 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.display_name, CH_UTF16)));
2450 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));
2451 : }
2452 : }
2453 0 : if (flags & NDR_OUT) {
2454 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.tag_id));
2455 0 : if (r->out.tag_id) {
2456 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.tag_id));
2457 : }
2458 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2459 : }
2460 0 : return NDR_ERR_SUCCESS;
2461 : }
2462 :
2463 0 : _PUBLIC_ enum ndr_err_code ndr_pull_svcctl_ChangeServiceConfigW(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfigW *r)
2464 : {
2465 : uint32_t _ptr_binary_path;
2466 0 : uint32_t size_binary_path_1 = 0;
2467 0 : uint32_t length_binary_path_1 = 0;
2468 : uint32_t _ptr_load_order_group;
2469 0 : uint32_t size_load_order_group_1 = 0;
2470 0 : uint32_t length_load_order_group_1 = 0;
2471 : uint32_t _ptr_tag_id;
2472 : uint32_t _ptr_dependencies;
2473 0 : uint32_t size_dependencies_1 = 0;
2474 0 : uint32_t length_dependencies_1 = 0;
2475 : uint32_t _ptr_service_start_name;
2476 0 : uint32_t size_service_start_name_1 = 0;
2477 0 : uint32_t length_service_start_name_1 = 0;
2478 : uint32_t _ptr_password;
2479 0 : uint32_t size_password_1 = 0;
2480 0 : uint32_t length_password_1 = 0;
2481 : uint32_t _ptr_display_name;
2482 0 : uint32_t size_display_name_1 = 0;
2483 0 : uint32_t length_display_name_1 = 0;
2484 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
2485 0 : TALLOC_CTX *_mem_save_binary_path_0 = NULL;
2486 0 : TALLOC_CTX *_mem_save_load_order_group_0 = NULL;
2487 0 : TALLOC_CTX *_mem_save_tag_id_0 = NULL;
2488 0 : TALLOC_CTX *_mem_save_dependencies_0 = NULL;
2489 0 : TALLOC_CTX *_mem_save_service_start_name_0 = NULL;
2490 0 : TALLOC_CTX *_mem_save_password_0 = NULL;
2491 0 : TALLOC_CTX *_mem_save_display_name_0 = NULL;
2492 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2493 0 : if (flags & NDR_IN) {
2494 0 : NDR_ZERO_STRUCT(r->out);
2495 :
2496 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2497 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
2498 : }
2499 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2500 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2501 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2502 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2503 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
2504 0 : NDR_CHECK(ndr_pull_svcctl_StartType(ndr, NDR_SCALARS, &r->in.start_type));
2505 0 : NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr, NDR_SCALARS, &r->in.error_control));
2506 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_binary_path));
2507 0 : if (_ptr_binary_path) {
2508 0 : NDR_PULL_ALLOC(ndr, r->in.binary_path);
2509 : } else {
2510 0 : r->in.binary_path = NULL;
2511 : }
2512 0 : if (r->in.binary_path) {
2513 0 : _mem_save_binary_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
2514 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.binary_path, 0);
2515 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.binary_path));
2516 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.binary_path));
2517 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.binary_path, &size_binary_path_1));
2518 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.binary_path, &length_binary_path_1));
2519 0 : if (length_binary_path_1 > size_binary_path_1) {
2520 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_binary_path_1, length_binary_path_1);
2521 : }
2522 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_binary_path_1, sizeof(uint16_t)));
2523 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.binary_path, length_binary_path_1, sizeof(uint16_t), CH_UTF16));
2524 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_binary_path_0, 0);
2525 : }
2526 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_load_order_group));
2527 0 : if (_ptr_load_order_group) {
2528 0 : NDR_PULL_ALLOC(ndr, r->in.load_order_group);
2529 : } else {
2530 0 : r->in.load_order_group = NULL;
2531 : }
2532 0 : if (r->in.load_order_group) {
2533 0 : _mem_save_load_order_group_0 = NDR_PULL_GET_MEM_CTX(ndr);
2534 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.load_order_group, 0);
2535 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.load_order_group));
2536 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.load_order_group));
2537 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.load_order_group, &size_load_order_group_1));
2538 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.load_order_group, &length_load_order_group_1));
2539 0 : if (length_load_order_group_1 > size_load_order_group_1) {
2540 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_load_order_group_1, length_load_order_group_1);
2541 : }
2542 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_load_order_group_1, sizeof(uint16_t)));
2543 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.load_order_group, length_load_order_group_1, sizeof(uint16_t), CH_UTF16));
2544 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_load_order_group_0, 0);
2545 : }
2546 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_tag_id));
2547 0 : if (_ptr_tag_id) {
2548 0 : NDR_PULL_ALLOC(ndr, r->in.tag_id);
2549 : } else {
2550 0 : r->in.tag_id = NULL;
2551 : }
2552 0 : if (r->in.tag_id) {
2553 0 : _mem_save_tag_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
2554 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.tag_id, 0);
2555 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.tag_id));
2556 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_tag_id_0, 0);
2557 : }
2558 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
2559 0 : if (_ptr_dependencies) {
2560 0 : NDR_PULL_ALLOC(ndr, r->in.dependencies);
2561 : } else {
2562 0 : r->in.dependencies = NULL;
2563 : }
2564 0 : if (r->in.dependencies) {
2565 0 : _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
2566 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.dependencies, 0);
2567 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dependencies));
2568 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dependencies));
2569 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.dependencies, &size_dependencies_1));
2570 0 : NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->in.dependencies, &length_dependencies_1));
2571 0 : if (length_dependencies_1 > size_dependencies_1) {
2572 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dependencies_1, length_dependencies_1);
2573 : }
2574 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dependencies_1, sizeof(uint16_t)));
2575 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dependencies, length_dependencies_1, sizeof(uint16_t), CH_UTF16));
2576 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
2577 : }
2578 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwDependSize));
2579 0 : if (r->in.dwDependSize > SC_MAX_DEPEND_SIZE) {
2580 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2581 : }
2582 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_start_name));
2583 0 : if (_ptr_service_start_name) {
2584 0 : NDR_PULL_ALLOC(ndr, r->in.service_start_name);
2585 : } else {
2586 0 : r->in.service_start_name = NULL;
2587 : }
2588 0 : if (r->in.service_start_name) {
2589 0 : _mem_save_service_start_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
2590 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.service_start_name, 0);
2591 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_start_name));
2592 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_start_name));
2593 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.service_start_name, &size_service_start_name_1));
2594 0 : if (size_service_start_name_1 > SC_MAX_ACCOUNT_NAME_LENGTH) {
2595 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2596 : }
2597 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.service_start_name, &length_service_start_name_1));
2598 0 : if (length_service_start_name_1 > SC_MAX_ACCOUNT_NAME_LENGTH) {
2599 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2600 : }
2601 0 : if (length_service_start_name_1 > size_service_start_name_1) {
2602 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_service_start_name_1, length_service_start_name_1);
2603 : }
2604 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_service_start_name_1, sizeof(uint16_t)));
2605 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_start_name, length_service_start_name_1, sizeof(uint16_t), CH_UTF16));
2606 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_start_name_0, 0);
2607 : }
2608 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
2609 0 : if (_ptr_password) {
2610 0 : NDR_PULL_ALLOC(ndr, r->in.password);
2611 : } else {
2612 0 : r->in.password = NULL;
2613 : }
2614 0 : if (r->in.password) {
2615 0 : _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
2616 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
2617 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
2618 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.password));
2619 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.password, &size_password_1));
2620 0 : NDR_CHECK(ndr_get_array_length(ndr, (void*)&r->in.password, &length_password_1));
2621 0 : if (length_password_1 > size_password_1) {
2622 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_password_1, length_password_1);
2623 : }
2624 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_password_1, sizeof(uint16_t)));
2625 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.password, length_password_1, sizeof(uint16_t), CH_UTF16));
2626 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
2627 : }
2628 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dwPwSize));
2629 0 : if (r->in.dwPwSize > SC_MAX_PWD_SIZE) {
2630 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2631 : }
2632 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
2633 0 : if (_ptr_display_name) {
2634 0 : NDR_PULL_ALLOC(ndr, r->in.display_name);
2635 : } else {
2636 0 : r->in.display_name = NULL;
2637 : }
2638 0 : if (r->in.display_name) {
2639 0 : _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
2640 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name, 0);
2641 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.display_name));
2642 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.display_name));
2643 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.display_name, &size_display_name_1));
2644 0 : if (size_display_name_1 > SC_MAX_NAME_LENGTH) {
2645 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2646 : }
2647 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.display_name, &length_display_name_1));
2648 0 : if (length_display_name_1 > SC_MAX_NAME_LENGTH) {
2649 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2650 : }
2651 0 : if (length_display_name_1 > size_display_name_1) {
2652 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_display_name_1, length_display_name_1);
2653 : }
2654 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_display_name_1, sizeof(uint16_t)));
2655 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.display_name, length_display_name_1, sizeof(uint16_t), CH_UTF16));
2656 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, 0);
2657 : }
2658 0 : if (r->in.dependencies) {
2659 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.dependencies, r->in.dwDependSize));
2660 : }
2661 0 : if (r->in.dependencies) {
2662 0 : NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->in.dependencies, r->in.dwDependSize));
2663 : }
2664 0 : if (r->in.password) {
2665 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.password, r->in.dwPwSize));
2666 : }
2667 0 : if (r->in.password) {
2668 0 : NDR_CHECK(ndr_check_steal_array_length(ndr, (void*)&r->in.password, r->in.dwPwSize));
2669 : }
2670 : }
2671 0 : if (flags & NDR_OUT) {
2672 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
2673 : if (r->in.handle == NULL) {
2674 : NDR_PULL_ALLOC(ndr, r->in.handle);
2675 : NDR_ZERO_STRUCTP(r->in.handle);
2676 : }
2677 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
2678 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_tag_id));
2679 0 : if (_ptr_tag_id) {
2680 0 : NDR_PULL_ALLOC(ndr, r->out.tag_id);
2681 : } else {
2682 0 : r->out.tag_id = NULL;
2683 : }
2684 0 : if (r->out.tag_id) {
2685 0 : _mem_save_tag_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
2686 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.tag_id, 0);
2687 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.tag_id));
2688 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_tag_id_0, 0);
2689 : }
2690 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2691 : }
2692 0 : return NDR_ERR_SUCCESS;
2693 : }
2694 :
2695 0 : _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfigW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfigW *r)
2696 : {
2697 0 : ndr_print_struct(ndr, name, "svcctl_ChangeServiceConfigW");
2698 0 : if (r == NULL) { ndr_print_null(ndr); return; }
2699 0 : ndr->depth++;
2700 0 : if (flags & NDR_SET_VALUES) {
2701 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2702 : }
2703 0 : if (flags & NDR_IN) {
2704 0 : ndr_print_struct(ndr, "in", "svcctl_ChangeServiceConfigW");
2705 0 : ndr->depth++;
2706 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
2707 0 : ndr->depth++;
2708 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
2709 0 : ndr->depth--;
2710 0 : ndr_print_uint32(ndr, "type", r->in.type);
2711 0 : ndr_print_svcctl_StartType(ndr, "start_type", r->in.start_type);
2712 0 : ndr_print_svcctl_ErrorControl(ndr, "error_control", r->in.error_control);
2713 0 : ndr_print_ptr(ndr, "binary_path", r->in.binary_path);
2714 0 : ndr->depth++;
2715 0 : if (r->in.binary_path) {
2716 0 : ndr_print_string(ndr, "binary_path", r->in.binary_path);
2717 : }
2718 0 : ndr->depth--;
2719 0 : ndr_print_ptr(ndr, "load_order_group", r->in.load_order_group);
2720 0 : ndr->depth++;
2721 0 : if (r->in.load_order_group) {
2722 0 : ndr_print_string(ndr, "load_order_group", r->in.load_order_group);
2723 : }
2724 0 : ndr->depth--;
2725 0 : ndr_print_ptr(ndr, "tag_id", r->in.tag_id);
2726 0 : ndr->depth++;
2727 0 : if (r->in.tag_id) {
2728 0 : ndr_print_uint32(ndr, "tag_id", *r->in.tag_id);
2729 : }
2730 0 : ndr->depth--;
2731 0 : ndr_print_ptr(ndr, "dependencies", r->in.dependencies);
2732 0 : ndr->depth++;
2733 0 : if (r->in.dependencies) {
2734 0 : ndr_print_string(ndr, "dependencies", r->in.dependencies);
2735 : }
2736 0 : ndr->depth--;
2737 0 : ndr_print_uint32(ndr, "dwDependSize", r->in.dwDependSize);
2738 0 : ndr_print_ptr(ndr, "service_start_name", r->in.service_start_name);
2739 0 : ndr->depth++;
2740 0 : if (r->in.service_start_name) {
2741 0 : ndr_print_string(ndr, "service_start_name", r->in.service_start_name);
2742 : }
2743 0 : ndr->depth--;
2744 0 : ndr_print_ptr(ndr, "password", r->in.password);
2745 0 : ndr->depth++;
2746 0 : if (r->in.password) {
2747 0 : ndr_print_string(ndr, "password", r->in.password);
2748 : }
2749 0 : ndr->depth--;
2750 0 : ndr_print_uint32(ndr, "dwPwSize", r->in.dwPwSize);
2751 0 : ndr_print_ptr(ndr, "display_name", r->in.display_name);
2752 0 : ndr->depth++;
2753 0 : if (r->in.display_name) {
2754 0 : ndr_print_string(ndr, "display_name", r->in.display_name);
2755 : }
2756 0 : ndr->depth--;
2757 0 : ndr->depth--;
2758 : }
2759 0 : if (flags & NDR_OUT) {
2760 0 : ndr_print_struct(ndr, "out", "svcctl_ChangeServiceConfigW");
2761 0 : ndr->depth++;
2762 0 : ndr_print_ptr(ndr, "tag_id", r->out.tag_id);
2763 0 : ndr->depth++;
2764 0 : if (r->out.tag_id) {
2765 0 : ndr_print_uint32(ndr, "tag_id", *r->out.tag_id);
2766 : }
2767 0 : ndr->depth--;
2768 0 : ndr_print_WERROR(ndr, "result", r->out.result);
2769 0 : ndr->depth--;
2770 : }
2771 0 : ndr->depth--;
2772 : }
2773 :
2774 0 : static enum ndr_err_code ndr_push_svcctl_CreateServiceW(struct ndr_push *ndr, int flags, const struct svcctl_CreateServiceW *r)
2775 : {
2776 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2777 0 : if (flags & NDR_IN) {
2778 0 : if (r->in.scmanager_handle == NULL) {
2779 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2780 : }
2781 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
2782 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
2783 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2784 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
2785 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));
2786 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.DisplayName));
2787 0 : if (r->in.DisplayName) {
2788 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DisplayName, CH_UTF16)));
2789 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2790 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DisplayName, CH_UTF16)));
2791 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));
2792 : }
2793 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.desired_access));
2794 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
2795 0 : NDR_CHECK(ndr_push_svcctl_StartType(ndr, NDR_SCALARS, r->in.start_type));
2796 0 : NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr, NDR_SCALARS, r->in.error_control));
2797 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
2798 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2799 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
2800 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));
2801 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.LoadOrderGroupKey));
2802 0 : if (r->in.LoadOrderGroupKey) {
2803 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16)));
2804 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2805 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16)));
2806 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));
2807 : }
2808 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.TagId));
2809 0 : if (r->in.TagId) {
2810 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.TagId));
2811 : }
2812 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dependencies));
2813 0 : if (r->in.dependencies) {
2814 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.dependencies_size));
2815 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.dependencies, r->in.dependencies_size));
2816 : }
2817 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.dependencies_size));
2818 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_start_name));
2819 0 : if (r->in.service_start_name) {
2820 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
2821 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2822 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
2823 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));
2824 : }
2825 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
2826 0 : if (r->in.password) {
2827 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.password_size));
2828 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.password, r->in.password_size));
2829 : }
2830 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.password_size));
2831 : }
2832 0 : if (flags & NDR_OUT) {
2833 0 : if (r->out.handle == NULL) {
2834 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2835 : }
2836 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.TagId));
2837 0 : if (r->out.TagId) {
2838 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.TagId));
2839 : }
2840 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
2841 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2842 : }
2843 0 : return NDR_ERR_SUCCESS;
2844 : }
2845 :
2846 0 : static enum ndr_err_code ndr_pull_svcctl_CreateServiceW(struct ndr_pull *ndr, int flags, struct svcctl_CreateServiceW *r)
2847 : {
2848 0 : uint32_t size_ServiceName_0 = 0;
2849 0 : uint32_t length_ServiceName_0 = 0;
2850 : uint32_t _ptr_DisplayName;
2851 0 : uint32_t size_DisplayName_1 = 0;
2852 0 : uint32_t length_DisplayName_1 = 0;
2853 0 : uint32_t size_binary_path_0 = 0;
2854 0 : uint32_t length_binary_path_0 = 0;
2855 : uint32_t _ptr_LoadOrderGroupKey;
2856 0 : uint32_t size_LoadOrderGroupKey_1 = 0;
2857 0 : uint32_t length_LoadOrderGroupKey_1 = 0;
2858 : uint32_t _ptr_TagId;
2859 : uint32_t _ptr_dependencies;
2860 0 : uint32_t size_dependencies_1 = 0;
2861 : uint32_t _ptr_service_start_name;
2862 0 : uint32_t size_service_start_name_1 = 0;
2863 0 : uint32_t length_service_start_name_1 = 0;
2864 : uint32_t _ptr_password;
2865 0 : uint32_t size_password_1 = 0;
2866 0 : TALLOC_CTX *_mem_save_scmanager_handle_0 = NULL;
2867 0 : TALLOC_CTX *_mem_save_DisplayName_0 = NULL;
2868 0 : TALLOC_CTX *_mem_save_LoadOrderGroupKey_0 = NULL;
2869 0 : TALLOC_CTX *_mem_save_TagId_0 = NULL;
2870 0 : TALLOC_CTX *_mem_save_dependencies_0 = NULL;
2871 0 : TALLOC_CTX *_mem_save_service_start_name_0 = NULL;
2872 0 : TALLOC_CTX *_mem_save_password_0 = NULL;
2873 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
2874 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2875 0 : if (flags & NDR_IN) {
2876 0 : NDR_ZERO_STRUCT(r->out);
2877 :
2878 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2879 0 : NDR_PULL_ALLOC(ndr, r->in.scmanager_handle);
2880 : }
2881 0 : _mem_save_scmanager_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2882 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager_handle, LIBNDR_FLAG_REF_ALLOC);
2883 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
2884 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_handle_0, LIBNDR_FLAG_REF_ALLOC);
2885 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.ServiceName));
2886 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.ServiceName));
2887 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.ServiceName, &size_ServiceName_0));
2888 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.ServiceName, &length_ServiceName_0));
2889 0 : if (length_ServiceName_0 > size_ServiceName_0) {
2890 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_ServiceName_0, length_ServiceName_0);
2891 : }
2892 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_ServiceName_0, sizeof(uint16_t)));
2893 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.ServiceName, length_ServiceName_0, sizeof(uint16_t), CH_UTF16));
2894 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DisplayName));
2895 0 : if (_ptr_DisplayName) {
2896 0 : NDR_PULL_ALLOC(ndr, r->in.DisplayName);
2897 : } else {
2898 0 : r->in.DisplayName = NULL;
2899 : }
2900 0 : if (r->in.DisplayName) {
2901 0 : _mem_save_DisplayName_0 = NDR_PULL_GET_MEM_CTX(ndr);
2902 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.DisplayName, 0);
2903 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.DisplayName));
2904 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.DisplayName));
2905 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.DisplayName, &size_DisplayName_1));
2906 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.DisplayName, &length_DisplayName_1));
2907 0 : if (length_DisplayName_1 > size_DisplayName_1) {
2908 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_DisplayName_1, length_DisplayName_1);
2909 : }
2910 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_DisplayName_1, sizeof(uint16_t)));
2911 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.DisplayName, length_DisplayName_1, sizeof(uint16_t), CH_UTF16));
2912 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DisplayName_0, 0);
2913 : }
2914 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.desired_access));
2915 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
2916 0 : NDR_CHECK(ndr_pull_svcctl_StartType(ndr, NDR_SCALARS, &r->in.start_type));
2917 0 : NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr, NDR_SCALARS, &r->in.error_control));
2918 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.binary_path));
2919 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.binary_path));
2920 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.binary_path, &size_binary_path_0));
2921 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.binary_path, &length_binary_path_0));
2922 0 : if (length_binary_path_0 > size_binary_path_0) {
2923 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_binary_path_0, length_binary_path_0);
2924 : }
2925 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_binary_path_0, sizeof(uint16_t)));
2926 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.binary_path, length_binary_path_0, sizeof(uint16_t), CH_UTF16));
2927 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_LoadOrderGroupKey));
2928 0 : if (_ptr_LoadOrderGroupKey) {
2929 0 : NDR_PULL_ALLOC(ndr, r->in.LoadOrderGroupKey);
2930 : } else {
2931 0 : r->in.LoadOrderGroupKey = NULL;
2932 : }
2933 0 : if (r->in.LoadOrderGroupKey) {
2934 0 : _mem_save_LoadOrderGroupKey_0 = NDR_PULL_GET_MEM_CTX(ndr);
2935 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.LoadOrderGroupKey, 0);
2936 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.LoadOrderGroupKey));
2937 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.LoadOrderGroupKey));
2938 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.LoadOrderGroupKey, &size_LoadOrderGroupKey_1));
2939 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.LoadOrderGroupKey, &length_LoadOrderGroupKey_1));
2940 0 : if (length_LoadOrderGroupKey_1 > size_LoadOrderGroupKey_1) {
2941 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_LoadOrderGroupKey_1, length_LoadOrderGroupKey_1);
2942 : }
2943 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_LoadOrderGroupKey_1, sizeof(uint16_t)));
2944 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.LoadOrderGroupKey, length_LoadOrderGroupKey_1, sizeof(uint16_t), CH_UTF16));
2945 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_LoadOrderGroupKey_0, 0);
2946 : }
2947 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_TagId));
2948 0 : if (_ptr_TagId) {
2949 0 : NDR_PULL_ALLOC(ndr, r->in.TagId);
2950 : } else {
2951 0 : r->in.TagId = NULL;
2952 : }
2953 0 : if (r->in.TagId) {
2954 0 : _mem_save_TagId_0 = NDR_PULL_GET_MEM_CTX(ndr);
2955 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.TagId, 0);
2956 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.TagId));
2957 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_TagId_0, 0);
2958 : }
2959 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
2960 0 : if (_ptr_dependencies) {
2961 0 : NDR_PULL_ALLOC(ndr, r->in.dependencies);
2962 : } else {
2963 0 : r->in.dependencies = NULL;
2964 : }
2965 0 : if (r->in.dependencies) {
2966 0 : _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
2967 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.dependencies, 0);
2968 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dependencies));
2969 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.dependencies, &size_dependencies_1));
2970 0 : NDR_PULL_ALLOC_N(ndr, r->in.dependencies, size_dependencies_1);
2971 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.dependencies, size_dependencies_1));
2972 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
2973 : }
2974 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.dependencies_size));
2975 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_start_name));
2976 0 : if (_ptr_service_start_name) {
2977 0 : NDR_PULL_ALLOC(ndr, r->in.service_start_name);
2978 : } else {
2979 0 : r->in.service_start_name = NULL;
2980 : }
2981 0 : if (r->in.service_start_name) {
2982 0 : _mem_save_service_start_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
2983 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.service_start_name, 0);
2984 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_start_name));
2985 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_start_name));
2986 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.service_start_name, &size_service_start_name_1));
2987 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.service_start_name, &length_service_start_name_1));
2988 0 : if (length_service_start_name_1 > size_service_start_name_1) {
2989 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_service_start_name_1, length_service_start_name_1);
2990 : }
2991 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_service_start_name_1, sizeof(uint16_t)));
2992 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_start_name, length_service_start_name_1, sizeof(uint16_t), CH_UTF16));
2993 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_start_name_0, 0);
2994 : }
2995 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
2996 0 : if (_ptr_password) {
2997 0 : NDR_PULL_ALLOC(ndr, r->in.password);
2998 : } else {
2999 0 : r->in.password = NULL;
3000 : }
3001 0 : if (r->in.password) {
3002 0 : _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
3003 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
3004 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
3005 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.password, &size_password_1));
3006 0 : NDR_PULL_ALLOC_N(ndr, r->in.password, size_password_1);
3007 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.password, size_password_1));
3008 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
3009 : }
3010 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.password_size));
3011 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
3012 0 : NDR_ZERO_STRUCTP(r->out.handle);
3013 0 : if (r->in.dependencies) {
3014 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.dependencies, r->in.dependencies_size));
3015 : }
3016 0 : if (r->in.password) {
3017 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.password, r->in.password_size));
3018 : }
3019 : }
3020 0 : if (flags & NDR_OUT) {
3021 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3022 : if (r->in.scmanager_handle == NULL) {
3023 : NDR_PULL_ALLOC(ndr, r->in.scmanager_handle);
3024 : NDR_ZERO_STRUCTP(r->in.scmanager_handle);
3025 : }
3026 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3027 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_TagId));
3028 0 : if (_ptr_TagId) {
3029 0 : NDR_PULL_ALLOC(ndr, r->out.TagId);
3030 : } else {
3031 0 : r->out.TagId = NULL;
3032 : }
3033 0 : if (r->out.TagId) {
3034 0 : _mem_save_TagId_0 = NDR_PULL_GET_MEM_CTX(ndr);
3035 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.TagId, 0);
3036 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.TagId));
3037 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_TagId_0, 0);
3038 : }
3039 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3040 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
3041 : }
3042 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3043 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
3044 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
3045 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3046 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3047 : }
3048 0 : return NDR_ERR_SUCCESS;
3049 : }
3050 :
3051 0 : _PUBLIC_ void ndr_print_svcctl_CreateServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CreateServiceW *r)
3052 : {
3053 0 : ndr_print_struct(ndr, name, "svcctl_CreateServiceW");
3054 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3055 0 : ndr->depth++;
3056 0 : if (flags & NDR_SET_VALUES) {
3057 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3058 : }
3059 0 : if (flags & NDR_IN) {
3060 0 : ndr_print_struct(ndr, "in", "svcctl_CreateServiceW");
3061 0 : ndr->depth++;
3062 0 : ndr_print_ptr(ndr, "scmanager_handle", r->in.scmanager_handle);
3063 0 : ndr->depth++;
3064 0 : ndr_print_policy_handle(ndr, "scmanager_handle", r->in.scmanager_handle);
3065 0 : ndr->depth--;
3066 0 : ndr_print_string(ndr, "ServiceName", r->in.ServiceName);
3067 0 : ndr_print_ptr(ndr, "DisplayName", r->in.DisplayName);
3068 0 : ndr->depth++;
3069 0 : if (r->in.DisplayName) {
3070 0 : ndr_print_string(ndr, "DisplayName", r->in.DisplayName);
3071 : }
3072 0 : ndr->depth--;
3073 0 : ndr_print_uint32(ndr, "desired_access", r->in.desired_access);
3074 0 : ndr_print_uint32(ndr, "type", r->in.type);
3075 0 : ndr_print_svcctl_StartType(ndr, "start_type", r->in.start_type);
3076 0 : ndr_print_svcctl_ErrorControl(ndr, "error_control", r->in.error_control);
3077 0 : ndr_print_string(ndr, "binary_path", r->in.binary_path);
3078 0 : ndr_print_ptr(ndr, "LoadOrderGroupKey", r->in.LoadOrderGroupKey);
3079 0 : ndr->depth++;
3080 0 : if (r->in.LoadOrderGroupKey) {
3081 0 : ndr_print_string(ndr, "LoadOrderGroupKey", r->in.LoadOrderGroupKey);
3082 : }
3083 0 : ndr->depth--;
3084 0 : ndr_print_ptr(ndr, "TagId", r->in.TagId);
3085 0 : ndr->depth++;
3086 0 : if (r->in.TagId) {
3087 0 : ndr_print_uint32(ndr, "TagId", *r->in.TagId);
3088 : }
3089 0 : ndr->depth--;
3090 0 : ndr_print_ptr(ndr, "dependencies", r->in.dependencies);
3091 0 : ndr->depth++;
3092 0 : if (r->in.dependencies) {
3093 0 : ndr_print_array_uint8(ndr, "dependencies", r->in.dependencies, r->in.dependencies_size);
3094 : }
3095 0 : ndr->depth--;
3096 0 : ndr_print_uint32(ndr, "dependencies_size", r->in.dependencies_size);
3097 0 : ndr_print_ptr(ndr, "service_start_name", r->in.service_start_name);
3098 0 : ndr->depth++;
3099 0 : if (r->in.service_start_name) {
3100 0 : ndr_print_string(ndr, "service_start_name", r->in.service_start_name);
3101 : }
3102 0 : ndr->depth--;
3103 0 : ndr_print_ptr(ndr, "password", r->in.password);
3104 0 : ndr->depth++;
3105 0 : if (r->in.password) {
3106 0 : ndr_print_array_uint8(ndr, "password", r->in.password, r->in.password_size);
3107 : }
3108 0 : ndr->depth--;
3109 0 : ndr_print_uint32(ndr, "password_size", r->in.password_size);
3110 0 : ndr->depth--;
3111 : }
3112 0 : if (flags & NDR_OUT) {
3113 0 : ndr_print_struct(ndr, "out", "svcctl_CreateServiceW");
3114 0 : ndr->depth++;
3115 0 : ndr_print_ptr(ndr, "TagId", r->out.TagId);
3116 0 : ndr->depth++;
3117 0 : if (r->out.TagId) {
3118 0 : ndr_print_uint32(ndr, "TagId", *r->out.TagId);
3119 : }
3120 0 : ndr->depth--;
3121 0 : ndr_print_ptr(ndr, "handle", r->out.handle);
3122 0 : ndr->depth++;
3123 0 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
3124 0 : ndr->depth--;
3125 0 : ndr_print_WERROR(ndr, "result", r->out.result);
3126 0 : ndr->depth--;
3127 : }
3128 0 : ndr->depth--;
3129 : }
3130 :
3131 0 : static enum ndr_err_code ndr_push_svcctl_EnumDependentServicesW(struct ndr_push *ndr, int flags, const struct svcctl_EnumDependentServicesW *r)
3132 : {
3133 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3134 0 : if (flags & NDR_IN) {
3135 0 : if (r->in.service == NULL) {
3136 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3137 : }
3138 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.service));
3139 0 : NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
3140 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
3141 : }
3142 0 : if (flags & NDR_OUT) {
3143 0 : if (r->out.service_status == NULL) {
3144 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3145 : }
3146 0 : if (r->out.needed == NULL) {
3147 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3148 : }
3149 0 : if (r->out.services_returned == NULL) {
3150 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3151 : }
3152 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
3153 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.service_status, r->in.offered));
3154 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
3155 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.services_returned));
3156 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3157 : }
3158 0 : return NDR_ERR_SUCCESS;
3159 : }
3160 :
3161 0 : static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesW(struct ndr_pull *ndr, int flags, struct svcctl_EnumDependentServicesW *r)
3162 : {
3163 0 : uint32_t size_service_status_1 = 0;
3164 0 : TALLOC_CTX *_mem_save_service_0 = NULL;
3165 0 : TALLOC_CTX *_mem_save_needed_0 = NULL;
3166 0 : TALLOC_CTX *_mem_save_services_returned_0 = NULL;
3167 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3168 0 : if (flags & NDR_IN) {
3169 0 : NDR_ZERO_STRUCT(r->out);
3170 :
3171 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3172 0 : NDR_PULL_ALLOC(ndr, r->in.service);
3173 : }
3174 0 : _mem_save_service_0 = NDR_PULL_GET_MEM_CTX(ndr);
3175 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.service, LIBNDR_FLAG_REF_ALLOC);
3176 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.service));
3177 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_0, LIBNDR_FLAG_REF_ALLOC);
3178 0 : NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
3179 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
3180 0 : if (r->in.offered > 262144) {
3181 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3182 : }
3183 0 : NDR_PULL_ALLOC_N(ndr, r->out.service_status, r->in.offered);
3184 0 : memset(r->out.service_status, 0, (r->in.offered) * sizeof(*r->out.service_status));
3185 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
3186 0 : NDR_ZERO_STRUCTP(r->out.needed);
3187 0 : NDR_PULL_ALLOC(ndr, r->out.services_returned);
3188 0 : NDR_ZERO_STRUCTP(r->out.services_returned);
3189 : }
3190 0 : if (flags & NDR_OUT) {
3191 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3192 : if (r->in.service == NULL) {
3193 : NDR_PULL_ALLOC(ndr, r->in.service);
3194 : NDR_ZERO_STRUCTP(r->in.service);
3195 : }
3196 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3197 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.service_status));
3198 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.service_status, &size_service_status_1));
3199 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3200 0 : NDR_PULL_ALLOC_N(ndr, r->out.service_status, size_service_status_1);
3201 : }
3202 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.service_status, size_service_status_1));
3203 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3204 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
3205 : }
3206 0 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
3207 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
3208 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
3209 0 : if (*r->out.needed > 262144) {
3210 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3211 : }
3212 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
3213 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3214 0 : NDR_PULL_ALLOC(ndr, r->out.services_returned);
3215 : }
3216 0 : _mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
3217 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
3218 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
3219 0 : if (*r->out.services_returned > 262144) {
3220 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3221 : }
3222 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
3223 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3224 0 : if (r->out.service_status) {
3225 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.service_status, r->in.offered));
3226 : }
3227 : }
3228 0 : return NDR_ERR_SUCCESS;
3229 : }
3230 :
3231 0 : _PUBLIC_ void ndr_print_svcctl_EnumDependentServicesW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumDependentServicesW *r)
3232 : {
3233 0 : ndr_print_struct(ndr, name, "svcctl_EnumDependentServicesW");
3234 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3235 0 : ndr->depth++;
3236 0 : if (flags & NDR_SET_VALUES) {
3237 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3238 : }
3239 0 : if (flags & NDR_IN) {
3240 0 : ndr_print_struct(ndr, "in", "svcctl_EnumDependentServicesW");
3241 0 : ndr->depth++;
3242 0 : ndr_print_ptr(ndr, "service", r->in.service);
3243 0 : ndr->depth++;
3244 0 : ndr_print_policy_handle(ndr, "service", r->in.service);
3245 0 : ndr->depth--;
3246 0 : ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
3247 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
3248 0 : ndr->depth--;
3249 : }
3250 0 : if (flags & NDR_OUT) {
3251 0 : ndr_print_struct(ndr, "out", "svcctl_EnumDependentServicesW");
3252 0 : ndr->depth++;
3253 0 : ndr_print_ptr(ndr, "service_status", r->out.service_status);
3254 0 : ndr->depth++;
3255 0 : ndr_print_array_uint8(ndr, "service_status", r->out.service_status, r->in.offered);
3256 0 : ndr->depth--;
3257 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
3258 0 : ndr->depth++;
3259 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
3260 0 : ndr->depth--;
3261 0 : ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
3262 0 : ndr->depth++;
3263 0 : ndr_print_uint32(ndr, "services_returned", *r->out.services_returned);
3264 0 : ndr->depth--;
3265 0 : ndr_print_WERROR(ndr, "result", r->out.result);
3266 0 : ndr->depth--;
3267 : }
3268 0 : ndr->depth--;
3269 : }
3270 :
3271 0 : static enum ndr_err_code ndr_push_svcctl_EnumServicesStatusW(struct ndr_push *ndr, int flags, const struct svcctl_EnumServicesStatusW *r)
3272 : {
3273 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3274 0 : if (flags & NDR_IN) {
3275 0 : if (r->in.handle == NULL) {
3276 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3277 : }
3278 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3279 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
3280 0 : NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
3281 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
3282 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
3283 0 : if (r->in.resume_handle) {
3284 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
3285 : }
3286 : }
3287 0 : if (flags & NDR_OUT) {
3288 0 : if (r->out.service == NULL) {
3289 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3290 : }
3291 0 : if (r->out.needed == NULL) {
3292 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3293 : }
3294 0 : if (r->out.services_returned == NULL) {
3295 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3296 : }
3297 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
3298 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.service, r->in.offered));
3299 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
3300 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.services_returned));
3301 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
3302 0 : if (r->out.resume_handle) {
3303 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
3304 : }
3305 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3306 : }
3307 0 : return NDR_ERR_SUCCESS;
3308 : }
3309 :
3310 0 : static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusW(struct ndr_pull *ndr, int flags, struct svcctl_EnumServicesStatusW *r)
3311 : {
3312 0 : uint32_t size_service_1 = 0;
3313 : uint32_t _ptr_resume_handle;
3314 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
3315 0 : TALLOC_CTX *_mem_save_needed_0 = NULL;
3316 0 : TALLOC_CTX *_mem_save_services_returned_0 = NULL;
3317 0 : TALLOC_CTX *_mem_save_resume_handle_0 = NULL;
3318 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3319 0 : if (flags & NDR_IN) {
3320 0 : NDR_ZERO_STRUCT(r->out);
3321 :
3322 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3323 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
3324 : }
3325 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3326 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3327 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3328 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3329 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
3330 0 : NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
3331 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
3332 0 : if (r->in.offered > 262144) {
3333 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3334 : }
3335 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
3336 0 : if (_ptr_resume_handle) {
3337 0 : NDR_PULL_ALLOC(ndr, r->in.resume_handle);
3338 : } else {
3339 0 : r->in.resume_handle = NULL;
3340 : }
3341 0 : if (r->in.resume_handle) {
3342 0 : _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3343 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
3344 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
3345 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
3346 : }
3347 0 : NDR_PULL_ALLOC_N(ndr, r->out.service, r->in.offered);
3348 0 : memset(r->out.service, 0, (r->in.offered) * sizeof(*r->out.service));
3349 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
3350 0 : NDR_ZERO_STRUCTP(r->out.needed);
3351 0 : NDR_PULL_ALLOC(ndr, r->out.services_returned);
3352 0 : NDR_ZERO_STRUCTP(r->out.services_returned);
3353 : }
3354 0 : if (flags & NDR_OUT) {
3355 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3356 : if (r->in.handle == NULL) {
3357 : NDR_PULL_ALLOC(ndr, r->in.handle);
3358 : NDR_ZERO_STRUCTP(r->in.handle);
3359 : }
3360 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3361 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.service));
3362 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.service, &size_service_1));
3363 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3364 0 : NDR_PULL_ALLOC_N(ndr, r->out.service, size_service_1);
3365 : }
3366 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.service, size_service_1));
3367 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3368 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
3369 : }
3370 0 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
3371 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
3372 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
3373 0 : if (*r->out.needed > 262144) {
3374 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3375 : }
3376 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
3377 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3378 0 : NDR_PULL_ALLOC(ndr, r->out.services_returned);
3379 : }
3380 0 : _mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
3381 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
3382 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
3383 0 : if (*r->out.services_returned > 262144) {
3384 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3385 : }
3386 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
3387 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
3388 0 : if (_ptr_resume_handle) {
3389 0 : NDR_PULL_ALLOC(ndr, r->out.resume_handle);
3390 : } else {
3391 0 : r->out.resume_handle = NULL;
3392 : }
3393 0 : if (r->out.resume_handle) {
3394 0 : _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3395 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
3396 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
3397 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
3398 : }
3399 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3400 0 : if (r->out.service) {
3401 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.service, r->in.offered));
3402 : }
3403 : }
3404 0 : return NDR_ERR_SUCCESS;
3405 : }
3406 :
3407 0 : _PUBLIC_ void ndr_print_svcctl_EnumServicesStatusW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServicesStatusW *r)
3408 : {
3409 0 : ndr_print_struct(ndr, name, "svcctl_EnumServicesStatusW");
3410 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3411 0 : ndr->depth++;
3412 0 : if (flags & NDR_SET_VALUES) {
3413 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3414 : }
3415 0 : if (flags & NDR_IN) {
3416 0 : ndr_print_struct(ndr, "in", "svcctl_EnumServicesStatusW");
3417 0 : ndr->depth++;
3418 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
3419 0 : ndr->depth++;
3420 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
3421 0 : ndr->depth--;
3422 0 : ndr_print_uint32(ndr, "type", r->in.type);
3423 0 : ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
3424 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
3425 0 : ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
3426 0 : ndr->depth++;
3427 0 : if (r->in.resume_handle) {
3428 0 : ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
3429 : }
3430 0 : ndr->depth--;
3431 0 : ndr->depth--;
3432 : }
3433 0 : if (flags & NDR_OUT) {
3434 0 : ndr_print_struct(ndr, "out", "svcctl_EnumServicesStatusW");
3435 0 : ndr->depth++;
3436 0 : ndr_print_ptr(ndr, "service", r->out.service);
3437 0 : ndr->depth++;
3438 0 : ndr_print_array_uint8(ndr, "service", r->out.service, r->in.offered);
3439 0 : ndr->depth--;
3440 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
3441 0 : ndr->depth++;
3442 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
3443 0 : ndr->depth--;
3444 0 : ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
3445 0 : ndr->depth++;
3446 0 : ndr_print_uint32(ndr, "services_returned", *r->out.services_returned);
3447 0 : ndr->depth--;
3448 0 : ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
3449 0 : ndr->depth++;
3450 0 : if (r->out.resume_handle) {
3451 0 : ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
3452 : }
3453 0 : ndr->depth--;
3454 0 : ndr_print_WERROR(ndr, "result", r->out.result);
3455 0 : ndr->depth--;
3456 : }
3457 0 : ndr->depth--;
3458 : }
3459 :
3460 0 : static enum ndr_err_code ndr_push_svcctl_OpenSCManagerW(struct ndr_push *ndr, int flags, const struct svcctl_OpenSCManagerW *r)
3461 : {
3462 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3463 0 : if (flags & NDR_IN) {
3464 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.MachineName));
3465 0 : if (r->in.MachineName) {
3466 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.MachineName, CH_UTF16)));
3467 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3468 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.MachineName, CH_UTF16)));
3469 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));
3470 : }
3471 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.DatabaseName));
3472 0 : if (r->in.DatabaseName) {
3473 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DatabaseName, CH_UTF16)));
3474 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3475 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DatabaseName, CH_UTF16)));
3476 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));
3477 : }
3478 0 : NDR_CHECK(ndr_push_svcctl_MgrAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
3479 : }
3480 0 : if (flags & NDR_OUT) {
3481 0 : if (r->out.handle == NULL) {
3482 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3483 : }
3484 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
3485 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3486 : }
3487 0 : return NDR_ERR_SUCCESS;
3488 : }
3489 :
3490 0 : static enum ndr_err_code ndr_pull_svcctl_OpenSCManagerW(struct ndr_pull *ndr, int flags, struct svcctl_OpenSCManagerW *r)
3491 : {
3492 : uint32_t _ptr_MachineName;
3493 0 : uint32_t size_MachineName_1 = 0;
3494 0 : uint32_t length_MachineName_1 = 0;
3495 : uint32_t _ptr_DatabaseName;
3496 0 : uint32_t size_DatabaseName_1 = 0;
3497 0 : uint32_t length_DatabaseName_1 = 0;
3498 0 : TALLOC_CTX *_mem_save_MachineName_0 = NULL;
3499 0 : TALLOC_CTX *_mem_save_DatabaseName_0 = NULL;
3500 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
3501 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3502 0 : if (flags & NDR_IN) {
3503 0 : NDR_ZERO_STRUCT(r->out);
3504 :
3505 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_MachineName));
3506 0 : if (_ptr_MachineName) {
3507 0 : NDR_PULL_ALLOC(ndr, r->in.MachineName);
3508 : } else {
3509 0 : r->in.MachineName = NULL;
3510 : }
3511 0 : if (r->in.MachineName) {
3512 0 : _mem_save_MachineName_0 = NDR_PULL_GET_MEM_CTX(ndr);
3513 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.MachineName, 0);
3514 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.MachineName));
3515 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.MachineName));
3516 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.MachineName, &size_MachineName_1));
3517 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.MachineName, &length_MachineName_1));
3518 0 : if (length_MachineName_1 > size_MachineName_1) {
3519 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_MachineName_1, length_MachineName_1);
3520 : }
3521 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_MachineName_1, sizeof(uint16_t)));
3522 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.MachineName, length_MachineName_1, sizeof(uint16_t), CH_UTF16));
3523 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_MachineName_0, 0);
3524 : }
3525 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DatabaseName));
3526 0 : if (_ptr_DatabaseName) {
3527 0 : NDR_PULL_ALLOC(ndr, r->in.DatabaseName);
3528 : } else {
3529 0 : r->in.DatabaseName = NULL;
3530 : }
3531 0 : if (r->in.DatabaseName) {
3532 0 : _mem_save_DatabaseName_0 = NDR_PULL_GET_MEM_CTX(ndr);
3533 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.DatabaseName, 0);
3534 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.DatabaseName));
3535 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.DatabaseName));
3536 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.DatabaseName, &size_DatabaseName_1));
3537 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.DatabaseName, &length_DatabaseName_1));
3538 0 : if (length_DatabaseName_1 > size_DatabaseName_1) {
3539 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_DatabaseName_1, length_DatabaseName_1);
3540 : }
3541 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_DatabaseName_1, sizeof(uint16_t)));
3542 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.DatabaseName, length_DatabaseName_1, sizeof(uint16_t), CH_UTF16));
3543 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DatabaseName_0, 0);
3544 : }
3545 0 : NDR_CHECK(ndr_pull_svcctl_MgrAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
3546 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
3547 0 : NDR_ZERO_STRUCTP(r->out.handle);
3548 : }
3549 0 : if (flags & NDR_OUT) {
3550 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3551 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3552 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3553 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
3554 : }
3555 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3556 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
3557 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
3558 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3559 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3560 : }
3561 0 : return NDR_ERR_SUCCESS;
3562 : }
3563 :
3564 0 : _PUBLIC_ void ndr_print_svcctl_OpenSCManagerW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenSCManagerW *r)
3565 : {
3566 0 : ndr_print_struct(ndr, name, "svcctl_OpenSCManagerW");
3567 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3568 0 : ndr->depth++;
3569 0 : if (flags & NDR_SET_VALUES) {
3570 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3571 : }
3572 0 : if (flags & NDR_IN) {
3573 0 : ndr_print_struct(ndr, "in", "svcctl_OpenSCManagerW");
3574 0 : ndr->depth++;
3575 0 : ndr_print_ptr(ndr, "MachineName", r->in.MachineName);
3576 0 : ndr->depth++;
3577 0 : if (r->in.MachineName) {
3578 0 : ndr_print_string(ndr, "MachineName", r->in.MachineName);
3579 : }
3580 0 : ndr->depth--;
3581 0 : ndr_print_ptr(ndr, "DatabaseName", r->in.DatabaseName);
3582 0 : ndr->depth++;
3583 0 : if (r->in.DatabaseName) {
3584 0 : ndr_print_string(ndr, "DatabaseName", r->in.DatabaseName);
3585 : }
3586 0 : ndr->depth--;
3587 0 : ndr_print_svcctl_MgrAccessMask(ndr, "access_mask", r->in.access_mask);
3588 0 : ndr->depth--;
3589 : }
3590 0 : if (flags & NDR_OUT) {
3591 0 : ndr_print_struct(ndr, "out", "svcctl_OpenSCManagerW");
3592 0 : ndr->depth++;
3593 0 : ndr_print_ptr(ndr, "handle", r->out.handle);
3594 0 : ndr->depth++;
3595 0 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
3596 0 : ndr->depth--;
3597 0 : ndr_print_WERROR(ndr, "result", r->out.result);
3598 0 : ndr->depth--;
3599 : }
3600 0 : ndr->depth--;
3601 : }
3602 :
3603 0 : static enum ndr_err_code ndr_push_svcctl_OpenServiceW(struct ndr_push *ndr, int flags, const struct svcctl_OpenServiceW *r)
3604 : {
3605 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3606 0 : if (flags & NDR_IN) {
3607 0 : if (r->in.scmanager_handle == NULL) {
3608 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3609 : }
3610 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
3611 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
3612 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3613 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
3614 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));
3615 0 : NDR_CHECK(ndr_push_svcctl_ServiceAccessMask(ndr, NDR_SCALARS, r->in.access_mask));
3616 : }
3617 0 : if (flags & NDR_OUT) {
3618 0 : if (r->out.handle == NULL) {
3619 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3620 : }
3621 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
3622 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3623 : }
3624 0 : return NDR_ERR_SUCCESS;
3625 : }
3626 :
3627 0 : static enum ndr_err_code ndr_pull_svcctl_OpenServiceW(struct ndr_pull *ndr, int flags, struct svcctl_OpenServiceW *r)
3628 : {
3629 0 : uint32_t size_ServiceName_0 = 0;
3630 0 : uint32_t length_ServiceName_0 = 0;
3631 0 : TALLOC_CTX *_mem_save_scmanager_handle_0 = NULL;
3632 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
3633 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3634 0 : if (flags & NDR_IN) {
3635 0 : NDR_ZERO_STRUCT(r->out);
3636 :
3637 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3638 0 : NDR_PULL_ALLOC(ndr, r->in.scmanager_handle);
3639 : }
3640 0 : _mem_save_scmanager_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3641 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager_handle, LIBNDR_FLAG_REF_ALLOC);
3642 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
3643 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_handle_0, LIBNDR_FLAG_REF_ALLOC);
3644 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.ServiceName));
3645 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.ServiceName));
3646 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.ServiceName, &size_ServiceName_0));
3647 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.ServiceName, &length_ServiceName_0));
3648 0 : if (length_ServiceName_0 > size_ServiceName_0) {
3649 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_ServiceName_0, length_ServiceName_0);
3650 : }
3651 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_ServiceName_0, sizeof(uint16_t)));
3652 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.ServiceName, length_ServiceName_0, sizeof(uint16_t), CH_UTF16));
3653 0 : NDR_CHECK(ndr_pull_svcctl_ServiceAccessMask(ndr, NDR_SCALARS, &r->in.access_mask));
3654 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
3655 0 : NDR_ZERO_STRUCTP(r->out.handle);
3656 : }
3657 0 : if (flags & NDR_OUT) {
3658 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3659 : if (r->in.scmanager_handle == NULL) {
3660 : NDR_PULL_ALLOC(ndr, r->in.scmanager_handle);
3661 : NDR_ZERO_STRUCTP(r->in.scmanager_handle);
3662 : }
3663 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3664 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3665 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
3666 : }
3667 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3668 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
3669 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
3670 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3671 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3672 : }
3673 0 : return NDR_ERR_SUCCESS;
3674 : }
3675 :
3676 0 : _PUBLIC_ void ndr_print_svcctl_OpenServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenServiceW *r)
3677 : {
3678 0 : ndr_print_struct(ndr, name, "svcctl_OpenServiceW");
3679 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3680 0 : ndr->depth++;
3681 0 : if (flags & NDR_SET_VALUES) {
3682 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3683 : }
3684 0 : if (flags & NDR_IN) {
3685 0 : ndr_print_struct(ndr, "in", "svcctl_OpenServiceW");
3686 0 : ndr->depth++;
3687 0 : ndr_print_ptr(ndr, "scmanager_handle", r->in.scmanager_handle);
3688 0 : ndr->depth++;
3689 0 : ndr_print_policy_handle(ndr, "scmanager_handle", r->in.scmanager_handle);
3690 0 : ndr->depth--;
3691 0 : ndr_print_string(ndr, "ServiceName", r->in.ServiceName);
3692 0 : ndr_print_svcctl_ServiceAccessMask(ndr, "access_mask", r->in.access_mask);
3693 0 : ndr->depth--;
3694 : }
3695 0 : if (flags & NDR_OUT) {
3696 0 : ndr_print_struct(ndr, "out", "svcctl_OpenServiceW");
3697 0 : ndr->depth++;
3698 0 : ndr_print_ptr(ndr, "handle", r->out.handle);
3699 0 : ndr->depth++;
3700 0 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
3701 0 : ndr->depth--;
3702 0 : ndr_print_WERROR(ndr, "result", r->out.result);
3703 0 : ndr->depth--;
3704 : }
3705 0 : ndr->depth--;
3706 : }
3707 :
3708 0 : static enum ndr_err_code ndr_push_svcctl_QueryServiceConfigW(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfigW *r)
3709 : {
3710 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3711 0 : if (flags & NDR_IN) {
3712 0 : if (r->in.handle == NULL) {
3713 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3714 : }
3715 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3716 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
3717 : }
3718 0 : if (flags & NDR_OUT) {
3719 0 : if (r->out.query == NULL) {
3720 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3721 : }
3722 0 : if (r->out.needed == NULL) {
3723 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3724 : }
3725 0 : NDR_CHECK(ndr_push_QUERY_SERVICE_CONFIG(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
3726 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
3727 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3728 : }
3729 0 : return NDR_ERR_SUCCESS;
3730 : }
3731 :
3732 0 : static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfigW(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfigW *r)
3733 : {
3734 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
3735 0 : TALLOC_CTX *_mem_save_query_0 = NULL;
3736 0 : TALLOC_CTX *_mem_save_needed_0 = NULL;
3737 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3738 0 : if (flags & NDR_IN) {
3739 0 : NDR_ZERO_STRUCT(r->out);
3740 :
3741 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3742 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
3743 : }
3744 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3745 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3746 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3747 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3748 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
3749 0 : if (r->in.offered > 8192) {
3750 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3751 : }
3752 0 : NDR_PULL_ALLOC(ndr, r->out.query);
3753 0 : NDR_ZERO_STRUCTP(r->out.query);
3754 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
3755 0 : NDR_ZERO_STRUCTP(r->out.needed);
3756 : }
3757 0 : if (flags & NDR_OUT) {
3758 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3759 : if (r->in.handle == NULL) {
3760 : NDR_PULL_ALLOC(ndr, r->in.handle);
3761 : NDR_ZERO_STRUCTP(r->in.handle);
3762 : }
3763 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3764 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3765 0 : NDR_PULL_ALLOC(ndr, r->out.query);
3766 : }
3767 0 : _mem_save_query_0 = NDR_PULL_GET_MEM_CTX(ndr);
3768 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.query, LIBNDR_FLAG_REF_ALLOC);
3769 0 : NDR_CHECK(ndr_pull_QUERY_SERVICE_CONFIG(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.query));
3770 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_query_0, LIBNDR_FLAG_REF_ALLOC);
3771 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3772 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
3773 : }
3774 0 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
3775 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
3776 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
3777 0 : if (*r->out.needed > 8192) {
3778 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3779 : }
3780 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
3781 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3782 : }
3783 0 : return NDR_ERR_SUCCESS;
3784 : }
3785 :
3786 0 : _PUBLIC_ void ndr_print_svcctl_QueryServiceConfigW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfigW *r)
3787 : {
3788 0 : ndr_print_struct(ndr, name, "svcctl_QueryServiceConfigW");
3789 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3790 0 : ndr->depth++;
3791 0 : if (flags & NDR_SET_VALUES) {
3792 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3793 : }
3794 0 : if (flags & NDR_IN) {
3795 0 : ndr_print_struct(ndr, "in", "svcctl_QueryServiceConfigW");
3796 0 : ndr->depth++;
3797 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
3798 0 : ndr->depth++;
3799 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
3800 0 : ndr->depth--;
3801 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
3802 0 : ndr->depth--;
3803 : }
3804 0 : if (flags & NDR_OUT) {
3805 0 : ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfigW");
3806 0 : ndr->depth++;
3807 0 : ndr_print_ptr(ndr, "query", r->out.query);
3808 0 : ndr->depth++;
3809 0 : ndr_print_QUERY_SERVICE_CONFIG(ndr, "query", r->out.query);
3810 0 : ndr->depth--;
3811 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
3812 0 : ndr->depth++;
3813 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
3814 0 : ndr->depth--;
3815 0 : ndr_print_WERROR(ndr, "result", r->out.result);
3816 0 : ndr->depth--;
3817 : }
3818 0 : ndr->depth--;
3819 : }
3820 :
3821 0 : static enum ndr_err_code ndr_push_svcctl_QueryServiceLockStatusW(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceLockStatusW *r)
3822 : {
3823 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3824 0 : if (flags & NDR_IN) {
3825 0 : if (r->in.handle == NULL) {
3826 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3827 : }
3828 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3829 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
3830 : }
3831 0 : if (flags & NDR_OUT) {
3832 0 : if (r->out.lock_status == NULL) {
3833 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3834 : }
3835 0 : if (r->out.needed == NULL) {
3836 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3837 : }
3838 0 : NDR_CHECK(ndr_push_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock_status));
3839 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
3840 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3841 : }
3842 0 : return NDR_ERR_SUCCESS;
3843 : }
3844 :
3845 0 : static enum ndr_err_code ndr_pull_svcctl_QueryServiceLockStatusW(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceLockStatusW *r)
3846 : {
3847 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
3848 0 : TALLOC_CTX *_mem_save_lock_status_0 = NULL;
3849 0 : TALLOC_CTX *_mem_save_needed_0 = NULL;
3850 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3851 0 : if (flags & NDR_IN) {
3852 0 : NDR_ZERO_STRUCT(r->out);
3853 :
3854 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3855 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
3856 : }
3857 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3858 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3859 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3860 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3861 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
3862 0 : NDR_PULL_ALLOC(ndr, r->out.lock_status);
3863 0 : NDR_ZERO_STRUCTP(r->out.lock_status);
3864 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
3865 0 : NDR_ZERO_STRUCTP(r->out.needed);
3866 : }
3867 0 : if (flags & NDR_OUT) {
3868 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
3869 : if (r->in.handle == NULL) {
3870 : NDR_PULL_ALLOC(ndr, r->in.handle);
3871 : NDR_ZERO_STRUCTP(r->in.handle);
3872 : }
3873 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
3874 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3875 0 : NDR_PULL_ALLOC(ndr, r->out.lock_status);
3876 : }
3877 0 : _mem_save_lock_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
3878 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.lock_status, LIBNDR_FLAG_REF_ALLOC);
3879 0 : NDR_CHECK(ndr_pull_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock_status));
3880 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_status_0, LIBNDR_FLAG_REF_ALLOC);
3881 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3882 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
3883 : }
3884 0 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
3885 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
3886 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
3887 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
3888 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3889 : }
3890 0 : return NDR_ERR_SUCCESS;
3891 : }
3892 :
3893 0 : _PUBLIC_ void ndr_print_svcctl_QueryServiceLockStatusW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceLockStatusW *r)
3894 : {
3895 0 : ndr_print_struct(ndr, name, "svcctl_QueryServiceLockStatusW");
3896 0 : if (r == NULL) { ndr_print_null(ndr); return; }
3897 0 : ndr->depth++;
3898 0 : if (flags & NDR_SET_VALUES) {
3899 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3900 : }
3901 0 : if (flags & NDR_IN) {
3902 0 : ndr_print_struct(ndr, "in", "svcctl_QueryServiceLockStatusW");
3903 0 : ndr->depth++;
3904 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
3905 0 : ndr->depth++;
3906 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
3907 0 : ndr->depth--;
3908 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
3909 0 : ndr->depth--;
3910 : }
3911 0 : if (flags & NDR_OUT) {
3912 0 : ndr_print_struct(ndr, "out", "svcctl_QueryServiceLockStatusW");
3913 0 : ndr->depth++;
3914 0 : ndr_print_ptr(ndr, "lock_status", r->out.lock_status);
3915 0 : ndr->depth++;
3916 0 : ndr_print_SERVICE_LOCK_STATUS(ndr, "lock_status", r->out.lock_status);
3917 0 : ndr->depth--;
3918 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
3919 0 : ndr->depth++;
3920 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
3921 0 : ndr->depth--;
3922 0 : ndr_print_WERROR(ndr, "result", r->out.result);
3923 0 : ndr->depth--;
3924 : }
3925 0 : ndr->depth--;
3926 : }
3927 :
3928 0 : static enum ndr_err_code ndr_push_svcctl_StartServiceW(struct ndr_push *ndr, int flags, const struct svcctl_StartServiceW *r)
3929 : {
3930 : uint32_t cntr_Arguments_1;
3931 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3932 0 : if (flags & NDR_IN) {
3933 0 : if (r->in.handle == NULL) {
3934 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3935 : }
3936 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3937 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.NumArgs));
3938 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Arguments));
3939 0 : if (r->in.Arguments) {
3940 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.NumArgs));
3941 0 : for (cntr_Arguments_1 = 0; cntr_Arguments_1 < (r->in.NumArgs); cntr_Arguments_1++) {
3942 0 : NDR_CHECK(ndr_push_svcctl_ArgumentString(ndr, NDR_SCALARS, &r->in.Arguments[cntr_Arguments_1]));
3943 : }
3944 0 : for (cntr_Arguments_1 = 0; cntr_Arguments_1 < (r->in.NumArgs); cntr_Arguments_1++) {
3945 0 : NDR_CHECK(ndr_push_svcctl_ArgumentString(ndr, NDR_BUFFERS, &r->in.Arguments[cntr_Arguments_1]));
3946 : }
3947 : }
3948 : }
3949 0 : if (flags & NDR_OUT) {
3950 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3951 : }
3952 0 : return NDR_ERR_SUCCESS;
3953 : }
3954 :
3955 0 : static enum ndr_err_code ndr_pull_svcctl_StartServiceW(struct ndr_pull *ndr, int flags, struct svcctl_StartServiceW *r)
3956 : {
3957 : uint32_t _ptr_Arguments;
3958 0 : uint32_t size_Arguments_1 = 0;
3959 : uint32_t cntr_Arguments_1;
3960 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
3961 0 : TALLOC_CTX *_mem_save_Arguments_0 = NULL;
3962 0 : TALLOC_CTX *_mem_save_Arguments_1 = NULL;
3963 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3964 0 : if (flags & NDR_IN) {
3965 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3966 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
3967 : }
3968 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3969 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3970 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3971 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3972 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.NumArgs));
3973 0 : if (r->in.NumArgs > SC_MAX_ARGUMENTS) {
3974 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3975 : }
3976 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Arguments));
3977 0 : if (_ptr_Arguments) {
3978 0 : NDR_PULL_ALLOC(ndr, r->in.Arguments);
3979 : } else {
3980 0 : r->in.Arguments = NULL;
3981 : }
3982 0 : if (r->in.Arguments) {
3983 0 : _mem_save_Arguments_0 = NDR_PULL_GET_MEM_CTX(ndr);
3984 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.Arguments, 0);
3985 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.Arguments));
3986 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.Arguments, &size_Arguments_1));
3987 0 : NDR_PULL_ALLOC_N(ndr, r->in.Arguments, size_Arguments_1);
3988 0 : _mem_save_Arguments_1 = NDR_PULL_GET_MEM_CTX(ndr);
3989 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.Arguments, 0);
3990 0 : for (cntr_Arguments_1 = 0; cntr_Arguments_1 < (size_Arguments_1); cntr_Arguments_1++) {
3991 0 : NDR_CHECK(ndr_pull_svcctl_ArgumentString(ndr, NDR_SCALARS, &r->in.Arguments[cntr_Arguments_1]));
3992 : }
3993 0 : for (cntr_Arguments_1 = 0; cntr_Arguments_1 < (size_Arguments_1); cntr_Arguments_1++) {
3994 0 : NDR_CHECK(ndr_pull_svcctl_ArgumentString(ndr, NDR_BUFFERS, &r->in.Arguments[cntr_Arguments_1]));
3995 : }
3996 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Arguments_1, 0);
3997 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Arguments_0, 0);
3998 : }
3999 0 : if (r->in.Arguments) {
4000 0 : NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.Arguments, r->in.NumArgs));
4001 : }
4002 0 : for (cntr_Arguments_1 = 0; cntr_Arguments_1 < (size_Arguments_1); cntr_Arguments_1++) {
4003 : }
4004 : }
4005 0 : if (flags & NDR_OUT) {
4006 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4007 : if (r->in.handle == NULL) {
4008 : NDR_PULL_ALLOC(ndr, r->in.handle);
4009 : NDR_ZERO_STRUCTP(r->in.handle);
4010 : }
4011 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4012 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4013 : }
4014 0 : return NDR_ERR_SUCCESS;
4015 : }
4016 :
4017 0 : _PUBLIC_ void ndr_print_svcctl_StartServiceW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_StartServiceW *r)
4018 : {
4019 : uint32_t cntr_Arguments_1;
4020 0 : ndr_print_struct(ndr, name, "svcctl_StartServiceW");
4021 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4022 0 : ndr->depth++;
4023 0 : if (flags & NDR_SET_VALUES) {
4024 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4025 : }
4026 0 : if (flags & NDR_IN) {
4027 0 : ndr_print_struct(ndr, "in", "svcctl_StartServiceW");
4028 0 : ndr->depth++;
4029 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
4030 0 : ndr->depth++;
4031 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
4032 0 : ndr->depth--;
4033 0 : ndr_print_uint32(ndr, "NumArgs", r->in.NumArgs);
4034 0 : ndr_print_ptr(ndr, "Arguments", r->in.Arguments);
4035 0 : ndr->depth++;
4036 0 : if (r->in.Arguments) {
4037 0 : ndr->print(ndr, "%s: ARRAY(%d)", "Arguments", (int)r->in.NumArgs);
4038 0 : ndr->depth++;
4039 0 : for (cntr_Arguments_1 = 0; cntr_Arguments_1 < (r->in.NumArgs); cntr_Arguments_1++) {
4040 0 : ndr_print_svcctl_ArgumentString(ndr, "Arguments", &r->in.Arguments[cntr_Arguments_1]);
4041 : }
4042 0 : ndr->depth--;
4043 : }
4044 0 : ndr->depth--;
4045 0 : ndr->depth--;
4046 : }
4047 0 : if (flags & NDR_OUT) {
4048 0 : ndr_print_struct(ndr, "out", "svcctl_StartServiceW");
4049 0 : ndr->depth++;
4050 0 : ndr_print_WERROR(ndr, "result", r->out.result);
4051 0 : ndr->depth--;
4052 : }
4053 0 : ndr->depth--;
4054 : }
4055 :
4056 0 : static enum ndr_err_code ndr_push_svcctl_GetServiceDisplayNameW(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceDisplayNameW *r)
4057 : {
4058 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4059 0 : if (flags & NDR_IN) {
4060 0 : if (r->in.handle == NULL) {
4061 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4062 : }
4063 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4064 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name));
4065 0 : if (r->in.service_name) {
4066 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
4067 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4068 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
4069 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));
4070 : }
4071 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name_length));
4072 0 : if (r->in.display_name_length) {
4073 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.display_name_length));
4074 : }
4075 : }
4076 0 : if (flags & NDR_OUT) {
4077 0 : if (r->out.display_name == NULL) {
4078 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4079 : }
4080 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.display_name));
4081 0 : if (*r->out.display_name) {
4082 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16)));
4083 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4084 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16)));
4085 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));
4086 : }
4087 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length));
4088 0 : if (r->out.display_name_length) {
4089 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length));
4090 : }
4091 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4092 : }
4093 0 : return NDR_ERR_SUCCESS;
4094 : }
4095 :
4096 0 : static enum ndr_err_code ndr_pull_svcctl_GetServiceDisplayNameW(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceDisplayNameW *r)
4097 : {
4098 : uint32_t _ptr_service_name;
4099 0 : uint32_t size_service_name_1 = 0;
4100 0 : uint32_t length_service_name_1 = 0;
4101 : uint32_t _ptr_display_name;
4102 0 : uint32_t size_display_name_2 = 0;
4103 0 : uint32_t length_display_name_2 = 0;
4104 : uint32_t _ptr_display_name_length;
4105 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
4106 0 : TALLOC_CTX *_mem_save_service_name_0 = NULL;
4107 0 : TALLOC_CTX *_mem_save_display_name_0 = NULL;
4108 0 : TALLOC_CTX *_mem_save_display_name_1 = NULL;
4109 0 : TALLOC_CTX *_mem_save_display_name_length_0 = NULL;
4110 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4111 0 : if (flags & NDR_IN) {
4112 0 : NDR_ZERO_STRUCT(r->out);
4113 :
4114 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4115 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
4116 : }
4117 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4118 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
4119 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4120 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4121 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
4122 0 : if (_ptr_service_name) {
4123 0 : NDR_PULL_ALLOC(ndr, r->in.service_name);
4124 : } else {
4125 0 : r->in.service_name = NULL;
4126 : }
4127 0 : if (r->in.service_name) {
4128 0 : _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4129 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.service_name, 0);
4130 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_name));
4131 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_name));
4132 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.service_name, &size_service_name_1));
4133 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.service_name, &length_service_name_1));
4134 0 : if (length_service_name_1 > size_service_name_1) {
4135 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_service_name_1, length_service_name_1);
4136 : }
4137 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_service_name_1, sizeof(uint16_t)));
4138 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_name, length_service_name_1, sizeof(uint16_t), CH_UTF16));
4139 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
4140 : }
4141 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
4142 0 : if (_ptr_display_name_length) {
4143 0 : NDR_PULL_ALLOC(ndr, r->in.display_name_length);
4144 : } else {
4145 0 : r->in.display_name_length = NULL;
4146 : }
4147 0 : if (r->in.display_name_length) {
4148 0 : _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
4149 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name_length, 0);
4150 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.display_name_length));
4151 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
4152 : }
4153 0 : NDR_PULL_ALLOC(ndr, r->out.display_name);
4154 0 : NDR_ZERO_STRUCTP(r->out.display_name);
4155 : }
4156 0 : if (flags & NDR_OUT) {
4157 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4158 : if (r->in.handle == NULL) {
4159 : NDR_PULL_ALLOC(ndr, r->in.handle);
4160 : NDR_ZERO_STRUCTP(r->in.handle);
4161 : }
4162 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4163 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4164 0 : NDR_PULL_ALLOC(ndr, r->out.display_name);
4165 : }
4166 0 : _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4167 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name, LIBNDR_FLAG_REF_ALLOC);
4168 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
4169 0 : if (_ptr_display_name) {
4170 0 : NDR_PULL_ALLOC(ndr, *r->out.display_name);
4171 : } else {
4172 0 : *r->out.display_name = NULL;
4173 : }
4174 0 : if (*r->out.display_name) {
4175 0 : _mem_save_display_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
4176 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.display_name, 0);
4177 0 : NDR_CHECK(ndr_pull_array_size(ndr, r->out.display_name));
4178 0 : NDR_CHECK(ndr_pull_array_length(ndr, r->out.display_name));
4179 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)r->out.display_name, &size_display_name_2));
4180 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)r->out.display_name, &length_display_name_2));
4181 0 : if (length_display_name_2 > size_display_name_2) {
4182 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_display_name_2, length_display_name_2);
4183 : }
4184 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_display_name_2, sizeof(uint16_t)));
4185 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.display_name, length_display_name_2, sizeof(uint16_t), CH_UTF16));
4186 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_1, 0);
4187 : }
4188 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, LIBNDR_FLAG_REF_ALLOC);
4189 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
4190 0 : if (_ptr_display_name_length) {
4191 0 : NDR_PULL_ALLOC(ndr, r->out.display_name_length);
4192 : } else {
4193 0 : r->out.display_name_length = NULL;
4194 : }
4195 0 : if (r->out.display_name_length) {
4196 0 : _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
4197 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name_length, 0);
4198 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.display_name_length));
4199 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
4200 : }
4201 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4202 : }
4203 0 : return NDR_ERR_SUCCESS;
4204 : }
4205 :
4206 0 : _PUBLIC_ void ndr_print_svcctl_GetServiceDisplayNameW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceDisplayNameW *r)
4207 : {
4208 0 : ndr_print_struct(ndr, name, "svcctl_GetServiceDisplayNameW");
4209 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4210 0 : ndr->depth++;
4211 0 : if (flags & NDR_SET_VALUES) {
4212 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4213 : }
4214 0 : if (flags & NDR_IN) {
4215 0 : ndr_print_struct(ndr, "in", "svcctl_GetServiceDisplayNameW");
4216 0 : ndr->depth++;
4217 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
4218 0 : ndr->depth++;
4219 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
4220 0 : ndr->depth--;
4221 0 : ndr_print_ptr(ndr, "service_name", r->in.service_name);
4222 0 : ndr->depth++;
4223 0 : if (r->in.service_name) {
4224 0 : ndr_print_string(ndr, "service_name", r->in.service_name);
4225 : }
4226 0 : ndr->depth--;
4227 0 : ndr_print_ptr(ndr, "display_name_length", r->in.display_name_length);
4228 0 : ndr->depth++;
4229 0 : if (r->in.display_name_length) {
4230 0 : ndr_print_uint32(ndr, "display_name_length", *r->in.display_name_length);
4231 : }
4232 0 : ndr->depth--;
4233 0 : ndr->depth--;
4234 : }
4235 0 : if (flags & NDR_OUT) {
4236 0 : ndr_print_struct(ndr, "out", "svcctl_GetServiceDisplayNameW");
4237 0 : ndr->depth++;
4238 0 : ndr_print_ptr(ndr, "display_name", r->out.display_name);
4239 0 : ndr->depth++;
4240 0 : ndr_print_ptr(ndr, "display_name", *r->out.display_name);
4241 0 : ndr->depth++;
4242 0 : if (*r->out.display_name) {
4243 0 : ndr_print_string(ndr, "display_name", *r->out.display_name);
4244 : }
4245 0 : ndr->depth--;
4246 0 : ndr->depth--;
4247 0 : ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length);
4248 0 : ndr->depth++;
4249 0 : if (r->out.display_name_length) {
4250 0 : ndr_print_uint32(ndr, "display_name_length", *r->out.display_name_length);
4251 : }
4252 0 : ndr->depth--;
4253 0 : ndr_print_WERROR(ndr, "result", r->out.result);
4254 0 : ndr->depth--;
4255 : }
4256 0 : ndr->depth--;
4257 : }
4258 :
4259 0 : static enum ndr_err_code ndr_push_svcctl_GetServiceKeyNameW(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceKeyNameW *r)
4260 : {
4261 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4262 0 : if (flags & NDR_IN) {
4263 0 : if (r->in.handle == NULL) {
4264 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4265 : }
4266 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4267 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name));
4268 0 : if (r->in.service_name) {
4269 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
4270 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4271 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
4272 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));
4273 : }
4274 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name_length));
4275 0 : if (r->in.display_name_length) {
4276 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.display_name_length));
4277 : }
4278 : }
4279 0 : if (flags & NDR_OUT) {
4280 0 : if (r->out.key_name == NULL) {
4281 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4282 : }
4283 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.key_name));
4284 0 : if (*r->out.key_name) {
4285 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16)));
4286 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4287 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16)));
4288 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));
4289 : }
4290 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length));
4291 0 : if (r->out.display_name_length) {
4292 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length));
4293 : }
4294 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4295 : }
4296 0 : return NDR_ERR_SUCCESS;
4297 : }
4298 :
4299 0 : static enum ndr_err_code ndr_pull_svcctl_GetServiceKeyNameW(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceKeyNameW *r)
4300 : {
4301 : uint32_t _ptr_service_name;
4302 0 : uint32_t size_service_name_1 = 0;
4303 0 : uint32_t length_service_name_1 = 0;
4304 : uint32_t _ptr_key_name;
4305 0 : uint32_t size_key_name_2 = 0;
4306 0 : uint32_t length_key_name_2 = 0;
4307 : uint32_t _ptr_display_name_length;
4308 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
4309 0 : TALLOC_CTX *_mem_save_service_name_0 = NULL;
4310 0 : TALLOC_CTX *_mem_save_key_name_0 = NULL;
4311 0 : TALLOC_CTX *_mem_save_key_name_1 = NULL;
4312 0 : TALLOC_CTX *_mem_save_display_name_length_0 = NULL;
4313 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4314 0 : if (flags & NDR_IN) {
4315 0 : NDR_ZERO_STRUCT(r->out);
4316 :
4317 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4318 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
4319 : }
4320 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4321 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
4322 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4323 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4324 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
4325 0 : if (_ptr_service_name) {
4326 0 : NDR_PULL_ALLOC(ndr, r->in.service_name);
4327 : } else {
4328 0 : r->in.service_name = NULL;
4329 : }
4330 0 : if (r->in.service_name) {
4331 0 : _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4332 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.service_name, 0);
4333 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_name));
4334 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_name));
4335 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.service_name, &size_service_name_1));
4336 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.service_name, &length_service_name_1));
4337 0 : if (length_service_name_1 > size_service_name_1) {
4338 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_service_name_1, length_service_name_1);
4339 : }
4340 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_service_name_1, sizeof(uint16_t)));
4341 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_name, length_service_name_1, sizeof(uint16_t), CH_UTF16));
4342 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
4343 : }
4344 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
4345 0 : if (_ptr_display_name_length) {
4346 0 : NDR_PULL_ALLOC(ndr, r->in.display_name_length);
4347 : } else {
4348 0 : r->in.display_name_length = NULL;
4349 : }
4350 0 : if (r->in.display_name_length) {
4351 0 : _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
4352 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name_length, 0);
4353 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.display_name_length));
4354 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
4355 : }
4356 0 : NDR_PULL_ALLOC(ndr, r->out.key_name);
4357 0 : NDR_ZERO_STRUCTP(r->out.key_name);
4358 : }
4359 0 : if (flags & NDR_OUT) {
4360 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4361 : if (r->in.handle == NULL) {
4362 : NDR_PULL_ALLOC(ndr, r->in.handle);
4363 : NDR_ZERO_STRUCTP(r->in.handle);
4364 : }
4365 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4366 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4367 0 : NDR_PULL_ALLOC(ndr, r->out.key_name);
4368 : }
4369 0 : _mem_save_key_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4370 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.key_name, LIBNDR_FLAG_REF_ALLOC);
4371 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_key_name));
4372 0 : if (_ptr_key_name) {
4373 0 : NDR_PULL_ALLOC(ndr, *r->out.key_name);
4374 : } else {
4375 0 : *r->out.key_name = NULL;
4376 : }
4377 0 : if (*r->out.key_name) {
4378 0 : _mem_save_key_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
4379 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.key_name, 0);
4380 0 : NDR_CHECK(ndr_pull_array_size(ndr, r->out.key_name));
4381 0 : NDR_CHECK(ndr_pull_array_length(ndr, r->out.key_name));
4382 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)r->out.key_name, &size_key_name_2));
4383 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)r->out.key_name, &length_key_name_2));
4384 0 : if (length_key_name_2 > size_key_name_2) {
4385 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_key_name_2, length_key_name_2);
4386 : }
4387 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_key_name_2, sizeof(uint16_t)));
4388 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.key_name, length_key_name_2, sizeof(uint16_t), CH_UTF16));
4389 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_name_1, 0);
4390 : }
4391 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_name_0, LIBNDR_FLAG_REF_ALLOC);
4392 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
4393 0 : if (_ptr_display_name_length) {
4394 0 : NDR_PULL_ALLOC(ndr, r->out.display_name_length);
4395 : } else {
4396 0 : r->out.display_name_length = NULL;
4397 : }
4398 0 : if (r->out.display_name_length) {
4399 0 : _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
4400 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name_length, 0);
4401 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.display_name_length));
4402 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
4403 : }
4404 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4405 : }
4406 0 : return NDR_ERR_SUCCESS;
4407 : }
4408 :
4409 0 : _PUBLIC_ void ndr_print_svcctl_GetServiceKeyNameW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceKeyNameW *r)
4410 : {
4411 0 : ndr_print_struct(ndr, name, "svcctl_GetServiceKeyNameW");
4412 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4413 0 : ndr->depth++;
4414 0 : if (flags & NDR_SET_VALUES) {
4415 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4416 : }
4417 0 : if (flags & NDR_IN) {
4418 0 : ndr_print_struct(ndr, "in", "svcctl_GetServiceKeyNameW");
4419 0 : ndr->depth++;
4420 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
4421 0 : ndr->depth++;
4422 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
4423 0 : ndr->depth--;
4424 0 : ndr_print_ptr(ndr, "service_name", r->in.service_name);
4425 0 : ndr->depth++;
4426 0 : if (r->in.service_name) {
4427 0 : ndr_print_string(ndr, "service_name", r->in.service_name);
4428 : }
4429 0 : ndr->depth--;
4430 0 : ndr_print_ptr(ndr, "display_name_length", r->in.display_name_length);
4431 0 : ndr->depth++;
4432 0 : if (r->in.display_name_length) {
4433 0 : ndr_print_uint32(ndr, "display_name_length", *r->in.display_name_length);
4434 : }
4435 0 : ndr->depth--;
4436 0 : ndr->depth--;
4437 : }
4438 0 : if (flags & NDR_OUT) {
4439 0 : ndr_print_struct(ndr, "out", "svcctl_GetServiceKeyNameW");
4440 0 : ndr->depth++;
4441 0 : ndr_print_ptr(ndr, "key_name", r->out.key_name);
4442 0 : ndr->depth++;
4443 0 : ndr_print_ptr(ndr, "key_name", *r->out.key_name);
4444 0 : ndr->depth++;
4445 0 : if (*r->out.key_name) {
4446 0 : ndr_print_string(ndr, "key_name", *r->out.key_name);
4447 : }
4448 0 : ndr->depth--;
4449 0 : ndr->depth--;
4450 0 : ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length);
4451 0 : ndr->depth++;
4452 0 : if (r->out.display_name_length) {
4453 0 : ndr_print_uint32(ndr, "display_name_length", *r->out.display_name_length);
4454 : }
4455 0 : ndr->depth--;
4456 0 : ndr_print_WERROR(ndr, "result", r->out.result);
4457 0 : ndr->depth--;
4458 : }
4459 0 : ndr->depth--;
4460 : }
4461 :
4462 0 : static enum ndr_err_code ndr_push_svcctl_SCSetServiceBitsA(struct ndr_push *ndr, int flags, const struct svcctl_SCSetServiceBitsA *r)
4463 : {
4464 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4465 0 : if (flags & NDR_IN) {
4466 0 : if (r->in.handle == NULL) {
4467 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4468 : }
4469 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4470 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bits));
4471 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bitson));
4472 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.immediate));
4473 : }
4474 0 : if (flags & NDR_OUT) {
4475 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4476 : }
4477 0 : return NDR_ERR_SUCCESS;
4478 : }
4479 :
4480 0 : static enum ndr_err_code ndr_pull_svcctl_SCSetServiceBitsA(struct ndr_pull *ndr, int flags, struct svcctl_SCSetServiceBitsA *r)
4481 : {
4482 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
4483 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4484 0 : if (flags & NDR_IN) {
4485 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4486 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
4487 : }
4488 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4489 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
4490 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4491 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4492 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bits));
4493 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bitson));
4494 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.immediate));
4495 : }
4496 0 : if (flags & NDR_OUT) {
4497 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4498 : if (r->in.handle == NULL) {
4499 : NDR_PULL_ALLOC(ndr, r->in.handle);
4500 : NDR_ZERO_STRUCTP(r->in.handle);
4501 : }
4502 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4503 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4504 : }
4505 0 : return NDR_ERR_SUCCESS;
4506 : }
4507 :
4508 0 : _PUBLIC_ void ndr_print_svcctl_SCSetServiceBitsA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSetServiceBitsA *r)
4509 : {
4510 0 : ndr_print_struct(ndr, name, "svcctl_SCSetServiceBitsA");
4511 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4512 0 : ndr->depth++;
4513 0 : if (flags & NDR_SET_VALUES) {
4514 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4515 : }
4516 0 : if (flags & NDR_IN) {
4517 0 : ndr_print_struct(ndr, "in", "svcctl_SCSetServiceBitsA");
4518 0 : ndr->depth++;
4519 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
4520 0 : ndr->depth++;
4521 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
4522 0 : ndr->depth--;
4523 0 : ndr_print_uint32(ndr, "bits", r->in.bits);
4524 0 : ndr_print_uint32(ndr, "bitson", r->in.bitson);
4525 0 : ndr_print_uint32(ndr, "immediate", r->in.immediate);
4526 0 : ndr->depth--;
4527 : }
4528 0 : if (flags & NDR_OUT) {
4529 0 : ndr_print_struct(ndr, "out", "svcctl_SCSetServiceBitsA");
4530 0 : ndr->depth++;
4531 0 : ndr_print_WERROR(ndr, "result", r->out.result);
4532 0 : ndr->depth--;
4533 : }
4534 0 : ndr->depth--;
4535 : }
4536 :
4537 0 : static enum ndr_err_code ndr_push_svcctl_ChangeServiceConfigA(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfigA *r)
4538 : {
4539 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4540 0 : if (flags & NDR_IN) {
4541 0 : if (r->in.handle == NULL) {
4542 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4543 : }
4544 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4545 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
4546 0 : NDR_CHECK(ndr_push_svcctl_StartType(ndr, NDR_SCALARS, r->in.start_type));
4547 0 : NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr, NDR_SCALARS, r->in.error_control));
4548 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.binary_path));
4549 0 : if (r->in.binary_path) {
4550 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
4551 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4552 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
4553 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));
4554 : }
4555 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.load_order_group));
4556 0 : if (r->in.load_order_group) {
4557 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.load_order_group, CH_UTF16)));
4558 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4559 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.load_order_group, CH_UTF16)));
4560 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));
4561 : }
4562 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dependencies));
4563 0 : if (r->in.dependencies) {
4564 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
4565 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4566 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
4567 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));
4568 : }
4569 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_start_name));
4570 0 : if (r->in.service_start_name) {
4571 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
4572 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4573 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
4574 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));
4575 : }
4576 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
4577 0 : if (r->in.password) {
4578 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
4579 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4580 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
4581 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));
4582 : }
4583 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name));
4584 0 : if (r->in.display_name) {
4585 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.display_name, CH_UTF16)));
4586 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4587 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.display_name, CH_UTF16)));
4588 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));
4589 : }
4590 : }
4591 0 : if (flags & NDR_OUT) {
4592 0 : if (r->out.tag_id == NULL) {
4593 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4594 : }
4595 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.tag_id));
4596 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4597 : }
4598 0 : return NDR_ERR_SUCCESS;
4599 : }
4600 :
4601 0 : static enum ndr_err_code ndr_pull_svcctl_ChangeServiceConfigA(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfigA *r)
4602 : {
4603 : uint32_t _ptr_binary_path;
4604 0 : uint32_t size_binary_path_1 = 0;
4605 0 : uint32_t length_binary_path_1 = 0;
4606 : uint32_t _ptr_load_order_group;
4607 0 : uint32_t size_load_order_group_1 = 0;
4608 0 : uint32_t length_load_order_group_1 = 0;
4609 : uint32_t _ptr_dependencies;
4610 0 : uint32_t size_dependencies_1 = 0;
4611 0 : uint32_t length_dependencies_1 = 0;
4612 : uint32_t _ptr_service_start_name;
4613 0 : uint32_t size_service_start_name_1 = 0;
4614 0 : uint32_t length_service_start_name_1 = 0;
4615 : uint32_t _ptr_password;
4616 0 : uint32_t size_password_1 = 0;
4617 0 : uint32_t length_password_1 = 0;
4618 : uint32_t _ptr_display_name;
4619 0 : uint32_t size_display_name_1 = 0;
4620 0 : uint32_t length_display_name_1 = 0;
4621 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
4622 0 : TALLOC_CTX *_mem_save_binary_path_0 = NULL;
4623 0 : TALLOC_CTX *_mem_save_load_order_group_0 = NULL;
4624 0 : TALLOC_CTX *_mem_save_tag_id_0 = NULL;
4625 0 : TALLOC_CTX *_mem_save_dependencies_0 = NULL;
4626 0 : TALLOC_CTX *_mem_save_service_start_name_0 = NULL;
4627 0 : TALLOC_CTX *_mem_save_password_0 = NULL;
4628 0 : TALLOC_CTX *_mem_save_display_name_0 = NULL;
4629 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4630 0 : if (flags & NDR_IN) {
4631 0 : NDR_ZERO_STRUCT(r->out);
4632 :
4633 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4634 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
4635 : }
4636 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4637 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
4638 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4639 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4640 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
4641 0 : NDR_CHECK(ndr_pull_svcctl_StartType(ndr, NDR_SCALARS, &r->in.start_type));
4642 0 : NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr, NDR_SCALARS, &r->in.error_control));
4643 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_binary_path));
4644 0 : if (_ptr_binary_path) {
4645 0 : NDR_PULL_ALLOC(ndr, r->in.binary_path);
4646 : } else {
4647 0 : r->in.binary_path = NULL;
4648 : }
4649 0 : if (r->in.binary_path) {
4650 0 : _mem_save_binary_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
4651 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.binary_path, 0);
4652 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.binary_path));
4653 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.binary_path));
4654 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.binary_path, &size_binary_path_1));
4655 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.binary_path, &length_binary_path_1));
4656 0 : if (length_binary_path_1 > size_binary_path_1) {
4657 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_binary_path_1, length_binary_path_1);
4658 : }
4659 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_binary_path_1, sizeof(uint16_t)));
4660 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.binary_path, length_binary_path_1, sizeof(uint16_t), CH_UTF16));
4661 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_binary_path_0, 0);
4662 : }
4663 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_load_order_group));
4664 0 : if (_ptr_load_order_group) {
4665 0 : NDR_PULL_ALLOC(ndr, r->in.load_order_group);
4666 : } else {
4667 0 : r->in.load_order_group = NULL;
4668 : }
4669 0 : if (r->in.load_order_group) {
4670 0 : _mem_save_load_order_group_0 = NDR_PULL_GET_MEM_CTX(ndr);
4671 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.load_order_group, 0);
4672 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.load_order_group));
4673 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.load_order_group));
4674 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.load_order_group, &size_load_order_group_1));
4675 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.load_order_group, &length_load_order_group_1));
4676 0 : if (length_load_order_group_1 > size_load_order_group_1) {
4677 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_load_order_group_1, length_load_order_group_1);
4678 : }
4679 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_load_order_group_1, sizeof(uint16_t)));
4680 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.load_order_group, length_load_order_group_1, sizeof(uint16_t), CH_UTF16));
4681 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_load_order_group_0, 0);
4682 : }
4683 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
4684 0 : if (_ptr_dependencies) {
4685 0 : NDR_PULL_ALLOC(ndr, r->in.dependencies);
4686 : } else {
4687 0 : r->in.dependencies = NULL;
4688 : }
4689 0 : if (r->in.dependencies) {
4690 0 : _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
4691 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.dependencies, 0);
4692 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dependencies));
4693 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dependencies));
4694 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.dependencies, &size_dependencies_1));
4695 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.dependencies, &length_dependencies_1));
4696 0 : if (length_dependencies_1 > size_dependencies_1) {
4697 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dependencies_1, length_dependencies_1);
4698 : }
4699 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dependencies_1, sizeof(uint16_t)));
4700 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dependencies, length_dependencies_1, sizeof(uint16_t), CH_UTF16));
4701 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
4702 : }
4703 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_start_name));
4704 0 : if (_ptr_service_start_name) {
4705 0 : NDR_PULL_ALLOC(ndr, r->in.service_start_name);
4706 : } else {
4707 0 : r->in.service_start_name = NULL;
4708 : }
4709 0 : if (r->in.service_start_name) {
4710 0 : _mem_save_service_start_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4711 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.service_start_name, 0);
4712 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_start_name));
4713 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_start_name));
4714 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.service_start_name, &size_service_start_name_1));
4715 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.service_start_name, &length_service_start_name_1));
4716 0 : if (length_service_start_name_1 > size_service_start_name_1) {
4717 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_service_start_name_1, length_service_start_name_1);
4718 : }
4719 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_service_start_name_1, sizeof(uint16_t)));
4720 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_start_name, length_service_start_name_1, sizeof(uint16_t), CH_UTF16));
4721 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_start_name_0, 0);
4722 : }
4723 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
4724 0 : if (_ptr_password) {
4725 0 : NDR_PULL_ALLOC(ndr, r->in.password);
4726 : } else {
4727 0 : r->in.password = NULL;
4728 : }
4729 0 : if (r->in.password) {
4730 0 : _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
4731 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
4732 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
4733 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.password));
4734 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.password, &size_password_1));
4735 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.password, &length_password_1));
4736 0 : if (length_password_1 > size_password_1) {
4737 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_password_1, length_password_1);
4738 : }
4739 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_password_1, sizeof(uint16_t)));
4740 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.password, length_password_1, sizeof(uint16_t), CH_UTF16));
4741 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
4742 : }
4743 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
4744 0 : if (_ptr_display_name) {
4745 0 : NDR_PULL_ALLOC(ndr, r->in.display_name);
4746 : } else {
4747 0 : r->in.display_name = NULL;
4748 : }
4749 0 : if (r->in.display_name) {
4750 0 : _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4751 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name, 0);
4752 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.display_name));
4753 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.display_name));
4754 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.display_name, &size_display_name_1));
4755 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.display_name, &length_display_name_1));
4756 0 : if (length_display_name_1 > size_display_name_1) {
4757 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_display_name_1, length_display_name_1);
4758 : }
4759 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_display_name_1, sizeof(uint16_t)));
4760 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.display_name, length_display_name_1, sizeof(uint16_t), CH_UTF16));
4761 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, 0);
4762 : }
4763 0 : NDR_PULL_ALLOC(ndr, r->out.tag_id);
4764 0 : NDR_ZERO_STRUCTP(r->out.tag_id);
4765 : }
4766 0 : if (flags & NDR_OUT) {
4767 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
4768 : if (r->in.handle == NULL) {
4769 : NDR_PULL_ALLOC(ndr, r->in.handle);
4770 : NDR_ZERO_STRUCTP(r->in.handle);
4771 : }
4772 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
4773 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4774 0 : NDR_PULL_ALLOC(ndr, r->out.tag_id);
4775 : }
4776 0 : _mem_save_tag_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
4777 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.tag_id, LIBNDR_FLAG_REF_ALLOC);
4778 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.tag_id));
4779 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_tag_id_0, LIBNDR_FLAG_REF_ALLOC);
4780 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4781 : }
4782 0 : return NDR_ERR_SUCCESS;
4783 : }
4784 :
4785 0 : _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfigA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfigA *r)
4786 : {
4787 0 : ndr_print_struct(ndr, name, "svcctl_ChangeServiceConfigA");
4788 0 : if (r == NULL) { ndr_print_null(ndr); return; }
4789 0 : ndr->depth++;
4790 0 : if (flags & NDR_SET_VALUES) {
4791 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4792 : }
4793 0 : if (flags & NDR_IN) {
4794 0 : ndr_print_struct(ndr, "in", "svcctl_ChangeServiceConfigA");
4795 0 : ndr->depth++;
4796 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
4797 0 : ndr->depth++;
4798 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
4799 0 : ndr->depth--;
4800 0 : ndr_print_uint32(ndr, "type", r->in.type);
4801 0 : ndr_print_svcctl_StartType(ndr, "start_type", r->in.start_type);
4802 0 : ndr_print_svcctl_ErrorControl(ndr, "error_control", r->in.error_control);
4803 0 : ndr_print_ptr(ndr, "binary_path", r->in.binary_path);
4804 0 : ndr->depth++;
4805 0 : if (r->in.binary_path) {
4806 0 : ndr_print_string(ndr, "binary_path", r->in.binary_path);
4807 : }
4808 0 : ndr->depth--;
4809 0 : ndr_print_ptr(ndr, "load_order_group", r->in.load_order_group);
4810 0 : ndr->depth++;
4811 0 : if (r->in.load_order_group) {
4812 0 : ndr_print_string(ndr, "load_order_group", r->in.load_order_group);
4813 : }
4814 0 : ndr->depth--;
4815 0 : ndr_print_ptr(ndr, "dependencies", r->in.dependencies);
4816 0 : ndr->depth++;
4817 0 : if (r->in.dependencies) {
4818 0 : ndr_print_string(ndr, "dependencies", r->in.dependencies);
4819 : }
4820 0 : ndr->depth--;
4821 0 : ndr_print_ptr(ndr, "service_start_name", r->in.service_start_name);
4822 0 : ndr->depth++;
4823 0 : if (r->in.service_start_name) {
4824 0 : ndr_print_string(ndr, "service_start_name", r->in.service_start_name);
4825 : }
4826 0 : ndr->depth--;
4827 0 : ndr_print_ptr(ndr, "password", r->in.password);
4828 0 : ndr->depth++;
4829 0 : if (r->in.password) {
4830 0 : ndr_print_string(ndr, "password", r->in.password);
4831 : }
4832 0 : ndr->depth--;
4833 0 : ndr_print_ptr(ndr, "display_name", r->in.display_name);
4834 0 : ndr->depth++;
4835 0 : if (r->in.display_name) {
4836 0 : ndr_print_string(ndr, "display_name", r->in.display_name);
4837 : }
4838 0 : ndr->depth--;
4839 0 : ndr->depth--;
4840 : }
4841 0 : if (flags & NDR_OUT) {
4842 0 : ndr_print_struct(ndr, "out", "svcctl_ChangeServiceConfigA");
4843 0 : ndr->depth++;
4844 0 : ndr_print_ptr(ndr, "tag_id", r->out.tag_id);
4845 0 : ndr->depth++;
4846 0 : ndr_print_uint32(ndr, "tag_id", *r->out.tag_id);
4847 0 : ndr->depth--;
4848 0 : ndr_print_WERROR(ndr, "result", r->out.result);
4849 0 : ndr->depth--;
4850 : }
4851 0 : ndr->depth--;
4852 : }
4853 :
4854 0 : static enum ndr_err_code ndr_push_svcctl_CreateServiceA(struct ndr_push *ndr, int flags, const struct svcctl_CreateServiceA *r)
4855 : {
4856 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4857 0 : if (flags & NDR_IN) {
4858 0 : if (r->in.handle == NULL) {
4859 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4860 : }
4861 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4862 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.ServiceName));
4863 0 : if (r->in.ServiceName) {
4864 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
4865 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4866 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
4867 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));
4868 : }
4869 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.DisplayName));
4870 0 : if (r->in.DisplayName) {
4871 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DisplayName, CH_UTF16)));
4872 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4873 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DisplayName, CH_UTF16)));
4874 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));
4875 : }
4876 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.desired_access));
4877 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
4878 0 : NDR_CHECK(ndr_push_svcctl_StartType(ndr, NDR_SCALARS, r->in.start_type));
4879 0 : NDR_CHECK(ndr_push_svcctl_ErrorControl(ndr, NDR_SCALARS, r->in.error_control));
4880 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.binary_path));
4881 0 : if (r->in.binary_path) {
4882 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
4883 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4884 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.binary_path, CH_UTF16)));
4885 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));
4886 : }
4887 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.LoadOrderGroupKey));
4888 0 : if (r->in.LoadOrderGroupKey) {
4889 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16)));
4890 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4891 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.LoadOrderGroupKey, CH_UTF16)));
4892 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));
4893 : }
4894 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.dependencies));
4895 0 : if (r->in.dependencies) {
4896 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
4897 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4898 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dependencies, CH_UTF16)));
4899 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));
4900 : }
4901 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_start_name));
4902 0 : if (r->in.service_start_name) {
4903 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
4904 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4905 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_start_name, CH_UTF16)));
4906 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));
4907 : }
4908 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.password));
4909 0 : if (r->in.password) {
4910 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
4911 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4912 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.password, CH_UTF16)));
4913 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));
4914 : }
4915 : }
4916 0 : if (flags & NDR_OUT) {
4917 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.TagId));
4918 0 : if (r->out.TagId) {
4919 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.TagId));
4920 : }
4921 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4922 : }
4923 0 : return NDR_ERR_SUCCESS;
4924 : }
4925 :
4926 0 : static enum ndr_err_code ndr_pull_svcctl_CreateServiceA(struct ndr_pull *ndr, int flags, struct svcctl_CreateServiceA *r)
4927 : {
4928 : uint32_t _ptr_ServiceName;
4929 0 : uint32_t size_ServiceName_1 = 0;
4930 0 : uint32_t length_ServiceName_1 = 0;
4931 : uint32_t _ptr_DisplayName;
4932 0 : uint32_t size_DisplayName_1 = 0;
4933 0 : uint32_t length_DisplayName_1 = 0;
4934 : uint32_t _ptr_binary_path;
4935 0 : uint32_t size_binary_path_1 = 0;
4936 0 : uint32_t length_binary_path_1 = 0;
4937 : uint32_t _ptr_LoadOrderGroupKey;
4938 0 : uint32_t size_LoadOrderGroupKey_1 = 0;
4939 0 : uint32_t length_LoadOrderGroupKey_1 = 0;
4940 : uint32_t _ptr_TagId;
4941 : uint32_t _ptr_dependencies;
4942 0 : uint32_t size_dependencies_1 = 0;
4943 0 : uint32_t length_dependencies_1 = 0;
4944 : uint32_t _ptr_service_start_name;
4945 0 : uint32_t size_service_start_name_1 = 0;
4946 0 : uint32_t length_service_start_name_1 = 0;
4947 : uint32_t _ptr_password;
4948 0 : uint32_t size_password_1 = 0;
4949 0 : uint32_t length_password_1 = 0;
4950 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
4951 0 : TALLOC_CTX *_mem_save_ServiceName_0 = NULL;
4952 0 : TALLOC_CTX *_mem_save_DisplayName_0 = NULL;
4953 0 : TALLOC_CTX *_mem_save_binary_path_0 = NULL;
4954 0 : TALLOC_CTX *_mem_save_LoadOrderGroupKey_0 = NULL;
4955 0 : TALLOC_CTX *_mem_save_TagId_0 = NULL;
4956 0 : TALLOC_CTX *_mem_save_dependencies_0 = NULL;
4957 0 : TALLOC_CTX *_mem_save_service_start_name_0 = NULL;
4958 0 : TALLOC_CTX *_mem_save_password_0 = NULL;
4959 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4960 0 : if (flags & NDR_IN) {
4961 0 : NDR_ZERO_STRUCT(r->out);
4962 :
4963 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4964 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
4965 : }
4966 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4967 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
4968 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
4969 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4970 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ServiceName));
4971 0 : if (_ptr_ServiceName) {
4972 0 : NDR_PULL_ALLOC(ndr, r->in.ServiceName);
4973 : } else {
4974 0 : r->in.ServiceName = NULL;
4975 : }
4976 0 : if (r->in.ServiceName) {
4977 0 : _mem_save_ServiceName_0 = NDR_PULL_GET_MEM_CTX(ndr);
4978 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.ServiceName, 0);
4979 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.ServiceName));
4980 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.ServiceName));
4981 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.ServiceName, &size_ServiceName_1));
4982 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.ServiceName, &length_ServiceName_1));
4983 0 : if (length_ServiceName_1 > size_ServiceName_1) {
4984 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_ServiceName_1, length_ServiceName_1);
4985 : }
4986 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_ServiceName_1, sizeof(uint16_t)));
4987 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.ServiceName, length_ServiceName_1, sizeof(uint16_t), CH_UTF16));
4988 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ServiceName_0, 0);
4989 : }
4990 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DisplayName));
4991 0 : if (_ptr_DisplayName) {
4992 0 : NDR_PULL_ALLOC(ndr, r->in.DisplayName);
4993 : } else {
4994 0 : r->in.DisplayName = NULL;
4995 : }
4996 0 : if (r->in.DisplayName) {
4997 0 : _mem_save_DisplayName_0 = NDR_PULL_GET_MEM_CTX(ndr);
4998 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.DisplayName, 0);
4999 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.DisplayName));
5000 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.DisplayName));
5001 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.DisplayName, &size_DisplayName_1));
5002 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.DisplayName, &length_DisplayName_1));
5003 0 : if (length_DisplayName_1 > size_DisplayName_1) {
5004 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_DisplayName_1, length_DisplayName_1);
5005 : }
5006 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_DisplayName_1, sizeof(uint16_t)));
5007 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.DisplayName, length_DisplayName_1, sizeof(uint16_t), CH_UTF16));
5008 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DisplayName_0, 0);
5009 : }
5010 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.desired_access));
5011 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
5012 0 : NDR_CHECK(ndr_pull_svcctl_StartType(ndr, NDR_SCALARS, &r->in.start_type));
5013 0 : NDR_CHECK(ndr_pull_svcctl_ErrorControl(ndr, NDR_SCALARS, &r->in.error_control));
5014 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_binary_path));
5015 0 : if (_ptr_binary_path) {
5016 0 : NDR_PULL_ALLOC(ndr, r->in.binary_path);
5017 : } else {
5018 0 : r->in.binary_path = NULL;
5019 : }
5020 0 : if (r->in.binary_path) {
5021 0 : _mem_save_binary_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
5022 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.binary_path, 0);
5023 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.binary_path));
5024 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.binary_path));
5025 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.binary_path, &size_binary_path_1));
5026 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.binary_path, &length_binary_path_1));
5027 0 : if (length_binary_path_1 > size_binary_path_1) {
5028 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_binary_path_1, length_binary_path_1);
5029 : }
5030 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_binary_path_1, sizeof(uint16_t)));
5031 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.binary_path, length_binary_path_1, sizeof(uint16_t), CH_UTF16));
5032 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_binary_path_0, 0);
5033 : }
5034 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_LoadOrderGroupKey));
5035 0 : if (_ptr_LoadOrderGroupKey) {
5036 0 : NDR_PULL_ALLOC(ndr, r->in.LoadOrderGroupKey);
5037 : } else {
5038 0 : r->in.LoadOrderGroupKey = NULL;
5039 : }
5040 0 : if (r->in.LoadOrderGroupKey) {
5041 0 : _mem_save_LoadOrderGroupKey_0 = NDR_PULL_GET_MEM_CTX(ndr);
5042 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.LoadOrderGroupKey, 0);
5043 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.LoadOrderGroupKey));
5044 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.LoadOrderGroupKey));
5045 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.LoadOrderGroupKey, &size_LoadOrderGroupKey_1));
5046 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.LoadOrderGroupKey, &length_LoadOrderGroupKey_1));
5047 0 : if (length_LoadOrderGroupKey_1 > size_LoadOrderGroupKey_1) {
5048 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_LoadOrderGroupKey_1, length_LoadOrderGroupKey_1);
5049 : }
5050 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_LoadOrderGroupKey_1, sizeof(uint16_t)));
5051 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.LoadOrderGroupKey, length_LoadOrderGroupKey_1, sizeof(uint16_t), CH_UTF16));
5052 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_LoadOrderGroupKey_0, 0);
5053 : }
5054 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dependencies));
5055 0 : if (_ptr_dependencies) {
5056 0 : NDR_PULL_ALLOC(ndr, r->in.dependencies);
5057 : } else {
5058 0 : r->in.dependencies = NULL;
5059 : }
5060 0 : if (r->in.dependencies) {
5061 0 : _mem_save_dependencies_0 = NDR_PULL_GET_MEM_CTX(ndr);
5062 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.dependencies, 0);
5063 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dependencies));
5064 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dependencies));
5065 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.dependencies, &size_dependencies_1));
5066 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.dependencies, &length_dependencies_1));
5067 0 : if (length_dependencies_1 > size_dependencies_1) {
5068 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dependencies_1, length_dependencies_1);
5069 : }
5070 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_dependencies_1, sizeof(uint16_t)));
5071 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dependencies, length_dependencies_1, sizeof(uint16_t), CH_UTF16));
5072 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dependencies_0, 0);
5073 : }
5074 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_start_name));
5075 0 : if (_ptr_service_start_name) {
5076 0 : NDR_PULL_ALLOC(ndr, r->in.service_start_name);
5077 : } else {
5078 0 : r->in.service_start_name = NULL;
5079 : }
5080 0 : if (r->in.service_start_name) {
5081 0 : _mem_save_service_start_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5082 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.service_start_name, 0);
5083 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_start_name));
5084 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_start_name));
5085 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.service_start_name, &size_service_start_name_1));
5086 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.service_start_name, &length_service_start_name_1));
5087 0 : if (length_service_start_name_1 > size_service_start_name_1) {
5088 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_service_start_name_1, length_service_start_name_1);
5089 : }
5090 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_service_start_name_1, sizeof(uint16_t)));
5091 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_start_name, length_service_start_name_1, sizeof(uint16_t), CH_UTF16));
5092 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_start_name_0, 0);
5093 : }
5094 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
5095 0 : if (_ptr_password) {
5096 0 : NDR_PULL_ALLOC(ndr, r->in.password);
5097 : } else {
5098 0 : r->in.password = NULL;
5099 : }
5100 0 : if (r->in.password) {
5101 0 : _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
5102 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.password, 0);
5103 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.password));
5104 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.password));
5105 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.password, &size_password_1));
5106 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.password, &length_password_1));
5107 0 : if (length_password_1 > size_password_1) {
5108 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_password_1, length_password_1);
5109 : }
5110 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_password_1, sizeof(uint16_t)));
5111 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.password, length_password_1, sizeof(uint16_t), CH_UTF16));
5112 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
5113 : }
5114 : }
5115 0 : if (flags & NDR_OUT) {
5116 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
5117 : if (r->in.handle == NULL) {
5118 : NDR_PULL_ALLOC(ndr, r->in.handle);
5119 : NDR_ZERO_STRUCTP(r->in.handle);
5120 : }
5121 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
5122 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_TagId));
5123 0 : if (_ptr_TagId) {
5124 0 : NDR_PULL_ALLOC(ndr, r->out.TagId);
5125 : } else {
5126 0 : r->out.TagId = NULL;
5127 : }
5128 0 : if (r->out.TagId) {
5129 0 : _mem_save_TagId_0 = NDR_PULL_GET_MEM_CTX(ndr);
5130 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.TagId, 0);
5131 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.TagId));
5132 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_TagId_0, 0);
5133 : }
5134 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5135 : }
5136 0 : return NDR_ERR_SUCCESS;
5137 : }
5138 :
5139 0 : _PUBLIC_ void ndr_print_svcctl_CreateServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_CreateServiceA *r)
5140 : {
5141 0 : ndr_print_struct(ndr, name, "svcctl_CreateServiceA");
5142 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5143 0 : ndr->depth++;
5144 0 : if (flags & NDR_SET_VALUES) {
5145 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5146 : }
5147 0 : if (flags & NDR_IN) {
5148 0 : ndr_print_struct(ndr, "in", "svcctl_CreateServiceA");
5149 0 : ndr->depth++;
5150 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
5151 0 : ndr->depth++;
5152 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
5153 0 : ndr->depth--;
5154 0 : ndr_print_ptr(ndr, "ServiceName", r->in.ServiceName);
5155 0 : ndr->depth++;
5156 0 : if (r->in.ServiceName) {
5157 0 : ndr_print_string(ndr, "ServiceName", r->in.ServiceName);
5158 : }
5159 0 : ndr->depth--;
5160 0 : ndr_print_ptr(ndr, "DisplayName", r->in.DisplayName);
5161 0 : ndr->depth++;
5162 0 : if (r->in.DisplayName) {
5163 0 : ndr_print_string(ndr, "DisplayName", r->in.DisplayName);
5164 : }
5165 0 : ndr->depth--;
5166 0 : ndr_print_uint32(ndr, "desired_access", r->in.desired_access);
5167 0 : ndr_print_uint32(ndr, "type", r->in.type);
5168 0 : ndr_print_svcctl_StartType(ndr, "start_type", r->in.start_type);
5169 0 : ndr_print_svcctl_ErrorControl(ndr, "error_control", r->in.error_control);
5170 0 : ndr_print_ptr(ndr, "binary_path", r->in.binary_path);
5171 0 : ndr->depth++;
5172 0 : if (r->in.binary_path) {
5173 0 : ndr_print_string(ndr, "binary_path", r->in.binary_path);
5174 : }
5175 0 : ndr->depth--;
5176 0 : ndr_print_ptr(ndr, "LoadOrderGroupKey", r->in.LoadOrderGroupKey);
5177 0 : ndr->depth++;
5178 0 : if (r->in.LoadOrderGroupKey) {
5179 0 : ndr_print_string(ndr, "LoadOrderGroupKey", r->in.LoadOrderGroupKey);
5180 : }
5181 0 : ndr->depth--;
5182 0 : ndr_print_ptr(ndr, "dependencies", r->in.dependencies);
5183 0 : ndr->depth++;
5184 0 : if (r->in.dependencies) {
5185 0 : ndr_print_string(ndr, "dependencies", r->in.dependencies);
5186 : }
5187 0 : ndr->depth--;
5188 0 : ndr_print_ptr(ndr, "service_start_name", r->in.service_start_name);
5189 0 : ndr->depth++;
5190 0 : if (r->in.service_start_name) {
5191 0 : ndr_print_string(ndr, "service_start_name", r->in.service_start_name);
5192 : }
5193 0 : ndr->depth--;
5194 0 : ndr_print_ptr(ndr, "password", r->in.password);
5195 0 : ndr->depth++;
5196 0 : if (r->in.password) {
5197 0 : ndr_print_string(ndr, "password", r->in.password);
5198 : }
5199 0 : ndr->depth--;
5200 0 : ndr->depth--;
5201 : }
5202 0 : if (flags & NDR_OUT) {
5203 0 : ndr_print_struct(ndr, "out", "svcctl_CreateServiceA");
5204 0 : ndr->depth++;
5205 0 : ndr_print_ptr(ndr, "TagId", r->out.TagId);
5206 0 : ndr->depth++;
5207 0 : if (r->out.TagId) {
5208 0 : ndr_print_uint32(ndr, "TagId", *r->out.TagId);
5209 : }
5210 0 : ndr->depth--;
5211 0 : ndr_print_WERROR(ndr, "result", r->out.result);
5212 0 : ndr->depth--;
5213 : }
5214 0 : ndr->depth--;
5215 : }
5216 :
5217 0 : static enum ndr_err_code ndr_push_svcctl_EnumDependentServicesA(struct ndr_push *ndr, int flags, const struct svcctl_EnumDependentServicesA *r)
5218 : {
5219 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
5220 0 : if (flags & NDR_IN) {
5221 0 : if (r->in.service == NULL) {
5222 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5223 : }
5224 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.service));
5225 0 : NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
5226 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
5227 : }
5228 0 : if (flags & NDR_OUT) {
5229 0 : if (r->out.needed == NULL) {
5230 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5231 : }
5232 0 : if (r->out.services_returned == NULL) {
5233 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5234 : }
5235 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.service_status));
5236 0 : if (r->out.service_status) {
5237 0 : NDR_CHECK(ndr_push_ENUM_SERVICE_STATUSA(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.service_status));
5238 : }
5239 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
5240 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.services_returned));
5241 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5242 : }
5243 0 : return NDR_ERR_SUCCESS;
5244 : }
5245 :
5246 0 : static enum ndr_err_code ndr_pull_svcctl_EnumDependentServicesA(struct ndr_pull *ndr, int flags, struct svcctl_EnumDependentServicesA *r)
5247 : {
5248 : uint32_t _ptr_service_status;
5249 0 : TALLOC_CTX *_mem_save_service_0 = NULL;
5250 0 : TALLOC_CTX *_mem_save_service_status_0 = NULL;
5251 0 : TALLOC_CTX *_mem_save_needed_0 = NULL;
5252 0 : TALLOC_CTX *_mem_save_services_returned_0 = NULL;
5253 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
5254 0 : if (flags & NDR_IN) {
5255 0 : NDR_ZERO_STRUCT(r->out);
5256 :
5257 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5258 0 : NDR_PULL_ALLOC(ndr, r->in.service);
5259 : }
5260 0 : _mem_save_service_0 = NDR_PULL_GET_MEM_CTX(ndr);
5261 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.service, LIBNDR_FLAG_REF_ALLOC);
5262 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.service));
5263 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_0, LIBNDR_FLAG_REF_ALLOC);
5264 0 : NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
5265 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
5266 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
5267 0 : NDR_ZERO_STRUCTP(r->out.needed);
5268 0 : NDR_PULL_ALLOC(ndr, r->out.services_returned);
5269 0 : NDR_ZERO_STRUCTP(r->out.services_returned);
5270 : }
5271 0 : if (flags & NDR_OUT) {
5272 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
5273 : if (r->in.service == NULL) {
5274 : NDR_PULL_ALLOC(ndr, r->in.service);
5275 : NDR_ZERO_STRUCTP(r->in.service);
5276 : }
5277 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
5278 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_status));
5279 0 : if (_ptr_service_status) {
5280 0 : NDR_PULL_ALLOC(ndr, r->out.service_status);
5281 : } else {
5282 0 : r->out.service_status = NULL;
5283 : }
5284 0 : if (r->out.service_status) {
5285 0 : _mem_save_service_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
5286 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.service_status, 0);
5287 0 : NDR_CHECK(ndr_pull_ENUM_SERVICE_STATUSA(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.service_status));
5288 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_status_0, 0);
5289 : }
5290 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5291 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
5292 : }
5293 0 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
5294 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
5295 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
5296 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
5297 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5298 0 : NDR_PULL_ALLOC(ndr, r->out.services_returned);
5299 : }
5300 0 : _mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
5301 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
5302 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
5303 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
5304 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5305 : }
5306 0 : return NDR_ERR_SUCCESS;
5307 : }
5308 :
5309 0 : _PUBLIC_ void ndr_print_svcctl_EnumDependentServicesA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumDependentServicesA *r)
5310 : {
5311 0 : ndr_print_struct(ndr, name, "svcctl_EnumDependentServicesA");
5312 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5313 0 : ndr->depth++;
5314 0 : if (flags & NDR_SET_VALUES) {
5315 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5316 : }
5317 0 : if (flags & NDR_IN) {
5318 0 : ndr_print_struct(ndr, "in", "svcctl_EnumDependentServicesA");
5319 0 : ndr->depth++;
5320 0 : ndr_print_ptr(ndr, "service", r->in.service);
5321 0 : ndr->depth++;
5322 0 : ndr_print_policy_handle(ndr, "service", r->in.service);
5323 0 : ndr->depth--;
5324 0 : ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
5325 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
5326 0 : ndr->depth--;
5327 : }
5328 0 : if (flags & NDR_OUT) {
5329 0 : ndr_print_struct(ndr, "out", "svcctl_EnumDependentServicesA");
5330 0 : ndr->depth++;
5331 0 : ndr_print_ptr(ndr, "service_status", r->out.service_status);
5332 0 : ndr->depth++;
5333 0 : if (r->out.service_status) {
5334 0 : ndr_print_ENUM_SERVICE_STATUSA(ndr, "service_status", r->out.service_status);
5335 : }
5336 0 : ndr->depth--;
5337 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
5338 0 : ndr->depth++;
5339 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
5340 0 : ndr->depth--;
5341 0 : ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
5342 0 : ndr->depth++;
5343 0 : ndr_print_uint32(ndr, "services_returned", *r->out.services_returned);
5344 0 : ndr->depth--;
5345 0 : ndr_print_WERROR(ndr, "result", r->out.result);
5346 0 : ndr->depth--;
5347 : }
5348 0 : ndr->depth--;
5349 : }
5350 :
5351 0 : static enum ndr_err_code ndr_push_svcctl_EnumServicesStatusA(struct ndr_push *ndr, int flags, const struct svcctl_EnumServicesStatusA *r)
5352 : {
5353 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
5354 0 : if (flags & NDR_IN) {
5355 0 : if (r->in.handle == NULL) {
5356 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5357 : }
5358 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5359 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
5360 0 : NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
5361 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
5362 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
5363 0 : if (r->in.resume_handle) {
5364 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
5365 : }
5366 : }
5367 0 : if (flags & NDR_OUT) {
5368 0 : if (r->out.needed == NULL) {
5369 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5370 : }
5371 0 : if (r->out.services_returned == NULL) {
5372 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5373 : }
5374 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
5375 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.service, r->in.offered));
5376 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
5377 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.services_returned));
5378 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
5379 0 : if (r->out.resume_handle) {
5380 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
5381 : }
5382 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5383 : }
5384 0 : return NDR_ERR_SUCCESS;
5385 : }
5386 :
5387 0 : static enum ndr_err_code ndr_pull_svcctl_EnumServicesStatusA(struct ndr_pull *ndr, int flags, struct svcctl_EnumServicesStatusA *r)
5388 : {
5389 0 : uint32_t size_service_0 = 0;
5390 : uint32_t _ptr_resume_handle;
5391 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
5392 0 : TALLOC_CTX *_mem_save_needed_0 = NULL;
5393 0 : TALLOC_CTX *_mem_save_services_returned_0 = NULL;
5394 0 : TALLOC_CTX *_mem_save_resume_handle_0 = NULL;
5395 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
5396 0 : if (flags & NDR_IN) {
5397 0 : NDR_ZERO_STRUCT(r->out);
5398 :
5399 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5400 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
5401 : }
5402 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5403 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5404 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5405 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5406 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
5407 0 : NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
5408 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
5409 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
5410 0 : if (_ptr_resume_handle) {
5411 0 : NDR_PULL_ALLOC(ndr, r->in.resume_handle);
5412 : } else {
5413 0 : r->in.resume_handle = NULL;
5414 : }
5415 0 : if (r->in.resume_handle) {
5416 0 : _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5417 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
5418 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
5419 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
5420 : }
5421 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
5422 0 : NDR_ZERO_STRUCTP(r->out.needed);
5423 0 : NDR_PULL_ALLOC(ndr, r->out.services_returned);
5424 0 : NDR_ZERO_STRUCTP(r->out.services_returned);
5425 : }
5426 0 : if (flags & NDR_OUT) {
5427 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
5428 : if (r->in.handle == NULL) {
5429 : NDR_PULL_ALLOC(ndr, r->in.handle);
5430 : NDR_ZERO_STRUCTP(r->in.handle);
5431 : }
5432 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
5433 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.service));
5434 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.service, &size_service_0));
5435 0 : NDR_PULL_ALLOC_N(ndr, r->out.service, size_service_0);
5436 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.service, size_service_0));
5437 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5438 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
5439 : }
5440 0 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
5441 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
5442 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
5443 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
5444 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5445 0 : NDR_PULL_ALLOC(ndr, r->out.services_returned);
5446 : }
5447 0 : _mem_save_services_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
5448 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.services_returned, LIBNDR_FLAG_REF_ALLOC);
5449 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.services_returned));
5450 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_services_returned_0, LIBNDR_FLAG_REF_ALLOC);
5451 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
5452 0 : if (_ptr_resume_handle) {
5453 0 : NDR_PULL_ALLOC(ndr, r->out.resume_handle);
5454 : } else {
5455 0 : r->out.resume_handle = NULL;
5456 : }
5457 0 : if (r->out.resume_handle) {
5458 0 : _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5459 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
5460 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
5461 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
5462 : }
5463 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5464 0 : if (r->out.service) {
5465 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.service, r->in.offered));
5466 : }
5467 : }
5468 0 : return NDR_ERR_SUCCESS;
5469 : }
5470 :
5471 0 : _PUBLIC_ void ndr_print_svcctl_EnumServicesStatusA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServicesStatusA *r)
5472 : {
5473 0 : ndr_print_struct(ndr, name, "svcctl_EnumServicesStatusA");
5474 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5475 0 : ndr->depth++;
5476 0 : if (flags & NDR_SET_VALUES) {
5477 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5478 : }
5479 0 : if (flags & NDR_IN) {
5480 0 : ndr_print_struct(ndr, "in", "svcctl_EnumServicesStatusA");
5481 0 : ndr->depth++;
5482 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
5483 0 : ndr->depth++;
5484 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
5485 0 : ndr->depth--;
5486 0 : ndr_print_uint32(ndr, "type", r->in.type);
5487 0 : ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
5488 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
5489 0 : ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
5490 0 : ndr->depth++;
5491 0 : if (r->in.resume_handle) {
5492 0 : ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
5493 : }
5494 0 : ndr->depth--;
5495 0 : ndr->depth--;
5496 : }
5497 0 : if (flags & NDR_OUT) {
5498 0 : ndr_print_struct(ndr, "out", "svcctl_EnumServicesStatusA");
5499 0 : ndr->depth++;
5500 0 : ndr_print_array_uint8(ndr, "service", r->out.service, r->in.offered);
5501 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
5502 0 : ndr->depth++;
5503 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
5504 0 : ndr->depth--;
5505 0 : ndr_print_ptr(ndr, "services_returned", r->out.services_returned);
5506 0 : ndr->depth++;
5507 0 : ndr_print_uint32(ndr, "services_returned", *r->out.services_returned);
5508 0 : ndr->depth--;
5509 0 : ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
5510 0 : ndr->depth++;
5511 0 : if (r->out.resume_handle) {
5512 0 : ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
5513 : }
5514 0 : ndr->depth--;
5515 0 : ndr_print_WERROR(ndr, "result", r->out.result);
5516 0 : ndr->depth--;
5517 : }
5518 0 : ndr->depth--;
5519 : }
5520 :
5521 0 : static enum ndr_err_code ndr_push_svcctl_OpenSCManagerA(struct ndr_push *ndr, int flags, const struct svcctl_OpenSCManagerA *r)
5522 : {
5523 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
5524 0 : if (flags & NDR_IN) {
5525 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.MachineName));
5526 0 : if (r->in.MachineName) {
5527 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.MachineName, CH_UTF16)));
5528 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5529 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.MachineName, CH_UTF16)));
5530 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));
5531 : }
5532 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.DatabaseName));
5533 0 : if (r->in.DatabaseName) {
5534 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DatabaseName, CH_UTF16)));
5535 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5536 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.DatabaseName, CH_UTF16)));
5537 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));
5538 : }
5539 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
5540 : }
5541 0 : if (flags & NDR_OUT) {
5542 0 : if (r->out.handle == NULL) {
5543 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5544 : }
5545 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5546 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5547 : }
5548 0 : return NDR_ERR_SUCCESS;
5549 : }
5550 :
5551 0 : static enum ndr_err_code ndr_pull_svcctl_OpenSCManagerA(struct ndr_pull *ndr, int flags, struct svcctl_OpenSCManagerA *r)
5552 : {
5553 : uint32_t _ptr_MachineName;
5554 0 : uint32_t size_MachineName_1 = 0;
5555 0 : uint32_t length_MachineName_1 = 0;
5556 : uint32_t _ptr_DatabaseName;
5557 0 : uint32_t size_DatabaseName_1 = 0;
5558 0 : uint32_t length_DatabaseName_1 = 0;
5559 0 : TALLOC_CTX *_mem_save_MachineName_0 = NULL;
5560 0 : TALLOC_CTX *_mem_save_DatabaseName_0 = NULL;
5561 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
5562 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
5563 0 : if (flags & NDR_IN) {
5564 0 : NDR_ZERO_STRUCT(r->out);
5565 :
5566 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_MachineName));
5567 0 : if (_ptr_MachineName) {
5568 0 : NDR_PULL_ALLOC(ndr, r->in.MachineName);
5569 : } else {
5570 0 : r->in.MachineName = NULL;
5571 : }
5572 0 : if (r->in.MachineName) {
5573 0 : _mem_save_MachineName_0 = NDR_PULL_GET_MEM_CTX(ndr);
5574 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.MachineName, 0);
5575 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.MachineName));
5576 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.MachineName));
5577 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.MachineName, &size_MachineName_1));
5578 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.MachineName, &length_MachineName_1));
5579 0 : if (length_MachineName_1 > size_MachineName_1) {
5580 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_MachineName_1, length_MachineName_1);
5581 : }
5582 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_MachineName_1, sizeof(uint16_t)));
5583 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.MachineName, length_MachineName_1, sizeof(uint16_t), CH_UTF16));
5584 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_MachineName_0, 0);
5585 : }
5586 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_DatabaseName));
5587 0 : if (_ptr_DatabaseName) {
5588 0 : NDR_PULL_ALLOC(ndr, r->in.DatabaseName);
5589 : } else {
5590 0 : r->in.DatabaseName = NULL;
5591 : }
5592 0 : if (r->in.DatabaseName) {
5593 0 : _mem_save_DatabaseName_0 = NDR_PULL_GET_MEM_CTX(ndr);
5594 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.DatabaseName, 0);
5595 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.DatabaseName));
5596 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.DatabaseName));
5597 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.DatabaseName, &size_DatabaseName_1));
5598 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.DatabaseName, &length_DatabaseName_1));
5599 0 : if (length_DatabaseName_1 > size_DatabaseName_1) {
5600 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_DatabaseName_1, length_DatabaseName_1);
5601 : }
5602 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_DatabaseName_1, sizeof(uint16_t)));
5603 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.DatabaseName, length_DatabaseName_1, sizeof(uint16_t), CH_UTF16));
5604 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_DatabaseName_0, 0);
5605 : }
5606 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
5607 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
5608 0 : NDR_ZERO_STRUCTP(r->out.handle);
5609 : }
5610 0 : if (flags & NDR_OUT) {
5611 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
5612 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
5613 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5614 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
5615 : }
5616 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5617 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
5618 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5619 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5620 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5621 : }
5622 0 : return NDR_ERR_SUCCESS;
5623 : }
5624 :
5625 0 : _PUBLIC_ void ndr_print_svcctl_OpenSCManagerA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenSCManagerA *r)
5626 : {
5627 0 : ndr_print_struct(ndr, name, "svcctl_OpenSCManagerA");
5628 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5629 0 : ndr->depth++;
5630 0 : if (flags & NDR_SET_VALUES) {
5631 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5632 : }
5633 0 : if (flags & NDR_IN) {
5634 0 : ndr_print_struct(ndr, "in", "svcctl_OpenSCManagerA");
5635 0 : ndr->depth++;
5636 0 : ndr_print_ptr(ndr, "MachineName", r->in.MachineName);
5637 0 : ndr->depth++;
5638 0 : if (r->in.MachineName) {
5639 0 : ndr_print_string(ndr, "MachineName", r->in.MachineName);
5640 : }
5641 0 : ndr->depth--;
5642 0 : ndr_print_ptr(ndr, "DatabaseName", r->in.DatabaseName);
5643 0 : ndr->depth++;
5644 0 : if (r->in.DatabaseName) {
5645 0 : ndr_print_string(ndr, "DatabaseName", r->in.DatabaseName);
5646 : }
5647 0 : ndr->depth--;
5648 0 : ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
5649 0 : ndr->depth--;
5650 : }
5651 0 : if (flags & NDR_OUT) {
5652 0 : ndr_print_struct(ndr, "out", "svcctl_OpenSCManagerA");
5653 0 : ndr->depth++;
5654 0 : ndr_print_ptr(ndr, "handle", r->out.handle);
5655 0 : ndr->depth++;
5656 0 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
5657 0 : ndr->depth--;
5658 0 : ndr_print_WERROR(ndr, "result", r->out.result);
5659 0 : ndr->depth--;
5660 : }
5661 0 : ndr->depth--;
5662 : }
5663 :
5664 0 : static enum ndr_err_code ndr_push_svcctl_OpenServiceA(struct ndr_push *ndr, int flags, const struct svcctl_OpenServiceA *r)
5665 : {
5666 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
5667 0 : if (flags & NDR_IN) {
5668 0 : if (r->in.scmanager_handle == NULL) {
5669 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5670 : }
5671 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
5672 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.ServiceName));
5673 0 : if (r->in.ServiceName) {
5674 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
5675 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5676 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.ServiceName, CH_UTF16)));
5677 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));
5678 : }
5679 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.access_mask));
5680 : }
5681 0 : if (flags & NDR_OUT) {
5682 0 : if (r->out.handle == NULL) {
5683 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5684 : }
5685 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5686 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5687 : }
5688 0 : return NDR_ERR_SUCCESS;
5689 : }
5690 :
5691 0 : static enum ndr_err_code ndr_pull_svcctl_OpenServiceA(struct ndr_pull *ndr, int flags, struct svcctl_OpenServiceA *r)
5692 : {
5693 : uint32_t _ptr_ServiceName;
5694 0 : uint32_t size_ServiceName_1 = 0;
5695 0 : uint32_t length_ServiceName_1 = 0;
5696 0 : TALLOC_CTX *_mem_save_scmanager_handle_0 = NULL;
5697 0 : TALLOC_CTX *_mem_save_ServiceName_0 = NULL;
5698 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
5699 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
5700 0 : if (flags & NDR_IN) {
5701 0 : NDR_ZERO_STRUCT(r->out);
5702 :
5703 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5704 0 : NDR_PULL_ALLOC(ndr, r->in.scmanager_handle);
5705 : }
5706 0 : _mem_save_scmanager_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5707 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager_handle, LIBNDR_FLAG_REF_ALLOC);
5708 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager_handle));
5709 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_handle_0, LIBNDR_FLAG_REF_ALLOC);
5710 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ServiceName));
5711 0 : if (_ptr_ServiceName) {
5712 0 : NDR_PULL_ALLOC(ndr, r->in.ServiceName);
5713 : } else {
5714 0 : r->in.ServiceName = NULL;
5715 : }
5716 0 : if (r->in.ServiceName) {
5717 0 : _mem_save_ServiceName_0 = NDR_PULL_GET_MEM_CTX(ndr);
5718 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.ServiceName, 0);
5719 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.ServiceName));
5720 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.ServiceName));
5721 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.ServiceName, &size_ServiceName_1));
5722 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.ServiceName, &length_ServiceName_1));
5723 0 : if (length_ServiceName_1 > size_ServiceName_1) {
5724 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_ServiceName_1, length_ServiceName_1);
5725 : }
5726 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_ServiceName_1, sizeof(uint16_t)));
5727 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.ServiceName, length_ServiceName_1, sizeof(uint16_t), CH_UTF16));
5728 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ServiceName_0, 0);
5729 : }
5730 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.access_mask));
5731 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
5732 0 : NDR_ZERO_STRUCTP(r->out.handle);
5733 : }
5734 0 : if (flags & NDR_OUT) {
5735 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
5736 : if (r->in.scmanager_handle == NULL) {
5737 : NDR_PULL_ALLOC(ndr, r->in.scmanager_handle);
5738 : NDR_ZERO_STRUCTP(r->in.scmanager_handle);
5739 : }
5740 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
5741 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5742 0 : NDR_PULL_ALLOC(ndr, r->out.handle);
5743 : }
5744 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5745 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
5746 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
5747 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5748 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5749 : }
5750 0 : return NDR_ERR_SUCCESS;
5751 : }
5752 :
5753 0 : _PUBLIC_ void ndr_print_svcctl_OpenServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_OpenServiceA *r)
5754 : {
5755 0 : ndr_print_struct(ndr, name, "svcctl_OpenServiceA");
5756 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5757 0 : ndr->depth++;
5758 0 : if (flags & NDR_SET_VALUES) {
5759 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5760 : }
5761 0 : if (flags & NDR_IN) {
5762 0 : ndr_print_struct(ndr, "in", "svcctl_OpenServiceA");
5763 0 : ndr->depth++;
5764 0 : ndr_print_ptr(ndr, "scmanager_handle", r->in.scmanager_handle);
5765 0 : ndr->depth++;
5766 0 : ndr_print_policy_handle(ndr, "scmanager_handle", r->in.scmanager_handle);
5767 0 : ndr->depth--;
5768 0 : ndr_print_ptr(ndr, "ServiceName", r->in.ServiceName);
5769 0 : ndr->depth++;
5770 0 : if (r->in.ServiceName) {
5771 0 : ndr_print_string(ndr, "ServiceName", r->in.ServiceName);
5772 : }
5773 0 : ndr->depth--;
5774 0 : ndr_print_uint32(ndr, "access_mask", r->in.access_mask);
5775 0 : ndr->depth--;
5776 : }
5777 0 : if (flags & NDR_OUT) {
5778 0 : ndr_print_struct(ndr, "out", "svcctl_OpenServiceA");
5779 0 : ndr->depth++;
5780 0 : ndr_print_ptr(ndr, "handle", r->out.handle);
5781 0 : ndr->depth++;
5782 0 : ndr_print_policy_handle(ndr, "handle", r->out.handle);
5783 0 : ndr->depth--;
5784 0 : ndr_print_WERROR(ndr, "result", r->out.result);
5785 0 : ndr->depth--;
5786 : }
5787 0 : ndr->depth--;
5788 : }
5789 :
5790 0 : static enum ndr_err_code ndr_push_svcctl_QueryServiceConfigA(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfigA *r)
5791 : {
5792 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
5793 0 : if (flags & NDR_IN) {
5794 0 : if (r->in.handle == NULL) {
5795 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5796 : }
5797 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5798 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
5799 : }
5800 0 : if (flags & NDR_OUT) {
5801 0 : if (r->out.needed == NULL) {
5802 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5803 : }
5804 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.query, r->in.offered));
5805 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
5806 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5807 : }
5808 0 : return NDR_ERR_SUCCESS;
5809 : }
5810 :
5811 0 : static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfigA(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfigA *r)
5812 : {
5813 0 : uint32_t size_query_0 = 0;
5814 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
5815 0 : TALLOC_CTX *_mem_save_needed_0 = NULL;
5816 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
5817 0 : if (flags & NDR_IN) {
5818 0 : NDR_ZERO_STRUCT(r->out);
5819 :
5820 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5821 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
5822 : }
5823 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5824 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5825 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5826 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5827 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
5828 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
5829 0 : NDR_ZERO_STRUCTP(r->out.needed);
5830 : }
5831 0 : if (flags & NDR_OUT) {
5832 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
5833 : if (r->in.handle == NULL) {
5834 : NDR_PULL_ALLOC(ndr, r->in.handle);
5835 : NDR_ZERO_STRUCTP(r->in.handle);
5836 : }
5837 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
5838 0 : size_query_0 = r->in.offered;
5839 0 : NDR_PULL_ALLOC_N(ndr, r->out.query, size_query_0);
5840 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.query, size_query_0));
5841 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5842 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
5843 : }
5844 0 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
5845 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
5846 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
5847 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
5848 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5849 : }
5850 0 : return NDR_ERR_SUCCESS;
5851 : }
5852 :
5853 0 : _PUBLIC_ void ndr_print_svcctl_QueryServiceConfigA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfigA *r)
5854 : {
5855 0 : ndr_print_struct(ndr, name, "svcctl_QueryServiceConfigA");
5856 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5857 0 : ndr->depth++;
5858 0 : if (flags & NDR_SET_VALUES) {
5859 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5860 : }
5861 0 : if (flags & NDR_IN) {
5862 0 : ndr_print_struct(ndr, "in", "svcctl_QueryServiceConfigA");
5863 0 : ndr->depth++;
5864 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
5865 0 : ndr->depth++;
5866 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
5867 0 : ndr->depth--;
5868 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
5869 0 : ndr->depth--;
5870 : }
5871 0 : if (flags & NDR_OUT) {
5872 0 : ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfigA");
5873 0 : ndr->depth++;
5874 0 : ndr_print_array_uint8(ndr, "query", r->out.query, r->in.offered);
5875 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
5876 0 : ndr->depth++;
5877 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
5878 0 : ndr->depth--;
5879 0 : ndr_print_WERROR(ndr, "result", r->out.result);
5880 0 : ndr->depth--;
5881 : }
5882 0 : ndr->depth--;
5883 : }
5884 :
5885 0 : static enum ndr_err_code ndr_push_svcctl_QueryServiceLockStatusA(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceLockStatusA *r)
5886 : {
5887 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
5888 0 : if (flags & NDR_IN) {
5889 0 : if (r->in.handle == NULL) {
5890 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5891 : }
5892 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5893 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
5894 : }
5895 0 : if (flags & NDR_OUT) {
5896 0 : if (r->out.lock_status == NULL) {
5897 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5898 : }
5899 0 : if (r->out.needed == NULL) {
5900 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5901 : }
5902 0 : NDR_CHECK(ndr_push_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock_status));
5903 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
5904 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5905 : }
5906 0 : return NDR_ERR_SUCCESS;
5907 : }
5908 :
5909 0 : static enum ndr_err_code ndr_pull_svcctl_QueryServiceLockStatusA(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceLockStatusA *r)
5910 : {
5911 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
5912 0 : TALLOC_CTX *_mem_save_lock_status_0 = NULL;
5913 0 : TALLOC_CTX *_mem_save_needed_0 = NULL;
5914 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
5915 0 : if (flags & NDR_IN) {
5916 0 : NDR_ZERO_STRUCT(r->out);
5917 :
5918 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5919 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
5920 : }
5921 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5922 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5923 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5924 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5925 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
5926 0 : NDR_PULL_ALLOC(ndr, r->out.lock_status);
5927 0 : NDR_ZERO_STRUCTP(r->out.lock_status);
5928 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
5929 0 : NDR_ZERO_STRUCTP(r->out.needed);
5930 : }
5931 0 : if (flags & NDR_OUT) {
5932 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
5933 : if (r->in.handle == NULL) {
5934 : NDR_PULL_ALLOC(ndr, r->in.handle);
5935 : NDR_ZERO_STRUCTP(r->in.handle);
5936 : }
5937 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
5938 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5939 0 : NDR_PULL_ALLOC(ndr, r->out.lock_status);
5940 : }
5941 0 : _mem_save_lock_status_0 = NDR_PULL_GET_MEM_CTX(ndr);
5942 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.lock_status, LIBNDR_FLAG_REF_ALLOC);
5943 0 : NDR_CHECK(ndr_pull_SERVICE_LOCK_STATUS(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.lock_status));
5944 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_lock_status_0, LIBNDR_FLAG_REF_ALLOC);
5945 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5946 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
5947 : }
5948 0 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
5949 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
5950 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
5951 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
5952 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5953 : }
5954 0 : return NDR_ERR_SUCCESS;
5955 : }
5956 :
5957 0 : _PUBLIC_ void ndr_print_svcctl_QueryServiceLockStatusA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceLockStatusA *r)
5958 : {
5959 0 : ndr_print_struct(ndr, name, "svcctl_QueryServiceLockStatusA");
5960 0 : if (r == NULL) { ndr_print_null(ndr); return; }
5961 0 : ndr->depth++;
5962 0 : if (flags & NDR_SET_VALUES) {
5963 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5964 : }
5965 0 : if (flags & NDR_IN) {
5966 0 : ndr_print_struct(ndr, "in", "svcctl_QueryServiceLockStatusA");
5967 0 : ndr->depth++;
5968 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
5969 0 : ndr->depth++;
5970 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
5971 0 : ndr->depth--;
5972 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
5973 0 : ndr->depth--;
5974 : }
5975 0 : if (flags & NDR_OUT) {
5976 0 : ndr_print_struct(ndr, "out", "svcctl_QueryServiceLockStatusA");
5977 0 : ndr->depth++;
5978 0 : ndr_print_ptr(ndr, "lock_status", r->out.lock_status);
5979 0 : ndr->depth++;
5980 0 : ndr_print_SERVICE_LOCK_STATUS(ndr, "lock_status", r->out.lock_status);
5981 0 : ndr->depth--;
5982 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
5983 0 : ndr->depth++;
5984 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
5985 0 : ndr->depth--;
5986 0 : ndr_print_WERROR(ndr, "result", r->out.result);
5987 0 : ndr->depth--;
5988 : }
5989 0 : ndr->depth--;
5990 : }
5991 :
5992 0 : static enum ndr_err_code ndr_push_svcctl_StartServiceA(struct ndr_push *ndr, int flags, const struct svcctl_StartServiceA *r)
5993 : {
5994 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
5995 0 : if (flags & NDR_IN) {
5996 0 : if (r->in.handle == NULL) {
5997 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5998 : }
5999 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6000 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.NumArgs));
6001 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.Arguments));
6002 0 : if (r->in.Arguments) {
6003 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Arguments, CH_UTF16)));
6004 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6005 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.Arguments, CH_UTF16)));
6006 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));
6007 : }
6008 : }
6009 0 : if (flags & NDR_OUT) {
6010 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6011 : }
6012 0 : return NDR_ERR_SUCCESS;
6013 : }
6014 :
6015 0 : static enum ndr_err_code ndr_pull_svcctl_StartServiceA(struct ndr_pull *ndr, int flags, struct svcctl_StartServiceA *r)
6016 : {
6017 : uint32_t _ptr_Arguments;
6018 0 : uint32_t size_Arguments_1 = 0;
6019 0 : uint32_t length_Arguments_1 = 0;
6020 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
6021 0 : TALLOC_CTX *_mem_save_Arguments_0 = NULL;
6022 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6023 0 : if (flags & NDR_IN) {
6024 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6025 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
6026 : }
6027 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6028 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6029 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6030 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6031 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.NumArgs));
6032 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_Arguments));
6033 0 : if (_ptr_Arguments) {
6034 0 : NDR_PULL_ALLOC(ndr, r->in.Arguments);
6035 : } else {
6036 0 : r->in.Arguments = NULL;
6037 : }
6038 0 : if (r->in.Arguments) {
6039 0 : _mem_save_Arguments_0 = NDR_PULL_GET_MEM_CTX(ndr);
6040 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.Arguments, 0);
6041 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.Arguments));
6042 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.Arguments));
6043 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.Arguments, &size_Arguments_1));
6044 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.Arguments, &length_Arguments_1));
6045 0 : if (length_Arguments_1 > size_Arguments_1) {
6046 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_Arguments_1, length_Arguments_1);
6047 : }
6048 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_Arguments_1, sizeof(uint16_t)));
6049 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.Arguments, length_Arguments_1, sizeof(uint16_t), CH_UTF16));
6050 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Arguments_0, 0);
6051 : }
6052 : }
6053 0 : if (flags & NDR_OUT) {
6054 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6055 : if (r->in.handle == NULL) {
6056 : NDR_PULL_ALLOC(ndr, r->in.handle);
6057 : NDR_ZERO_STRUCTP(r->in.handle);
6058 : }
6059 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6060 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6061 : }
6062 0 : return NDR_ERR_SUCCESS;
6063 : }
6064 :
6065 0 : _PUBLIC_ void ndr_print_svcctl_StartServiceA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_StartServiceA *r)
6066 : {
6067 0 : ndr_print_struct(ndr, name, "svcctl_StartServiceA");
6068 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6069 0 : ndr->depth++;
6070 0 : if (flags & NDR_SET_VALUES) {
6071 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6072 : }
6073 0 : if (flags & NDR_IN) {
6074 0 : ndr_print_struct(ndr, "in", "svcctl_StartServiceA");
6075 0 : ndr->depth++;
6076 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
6077 0 : ndr->depth++;
6078 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
6079 0 : ndr->depth--;
6080 0 : ndr_print_uint32(ndr, "NumArgs", r->in.NumArgs);
6081 0 : ndr_print_ptr(ndr, "Arguments", r->in.Arguments);
6082 0 : ndr->depth++;
6083 0 : if (r->in.Arguments) {
6084 0 : ndr_print_string(ndr, "Arguments", r->in.Arguments);
6085 : }
6086 0 : ndr->depth--;
6087 0 : ndr->depth--;
6088 : }
6089 0 : if (flags & NDR_OUT) {
6090 0 : ndr_print_struct(ndr, "out", "svcctl_StartServiceA");
6091 0 : ndr->depth++;
6092 0 : ndr_print_WERROR(ndr, "result", r->out.result);
6093 0 : ndr->depth--;
6094 : }
6095 0 : ndr->depth--;
6096 : }
6097 :
6098 0 : static enum ndr_err_code ndr_push_svcctl_GetServiceDisplayNameA(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceDisplayNameA *r)
6099 : {
6100 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6101 0 : if (flags & NDR_IN) {
6102 0 : if (r->in.handle == NULL) {
6103 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6104 : }
6105 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6106 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name));
6107 0 : if (r->in.service_name) {
6108 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
6109 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6110 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
6111 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));
6112 : }
6113 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name_length));
6114 0 : if (r->in.display_name_length) {
6115 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.display_name_length));
6116 : }
6117 : }
6118 0 : if (flags & NDR_OUT) {
6119 0 : if (r->out.display_name == NULL) {
6120 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6121 : }
6122 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.display_name));
6123 0 : if (*r->out.display_name) {
6124 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16)));
6125 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6126 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.display_name, CH_UTF16)));
6127 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));
6128 : }
6129 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length));
6130 0 : if (r->out.display_name_length) {
6131 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length));
6132 : }
6133 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6134 : }
6135 0 : return NDR_ERR_SUCCESS;
6136 : }
6137 :
6138 0 : static enum ndr_err_code ndr_pull_svcctl_GetServiceDisplayNameA(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceDisplayNameA *r)
6139 : {
6140 : uint32_t _ptr_service_name;
6141 0 : uint32_t size_service_name_1 = 0;
6142 0 : uint32_t length_service_name_1 = 0;
6143 : uint32_t _ptr_display_name;
6144 0 : uint32_t size_display_name_2 = 0;
6145 0 : uint32_t length_display_name_2 = 0;
6146 : uint32_t _ptr_display_name_length;
6147 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
6148 0 : TALLOC_CTX *_mem_save_service_name_0 = NULL;
6149 0 : TALLOC_CTX *_mem_save_display_name_0 = NULL;
6150 0 : TALLOC_CTX *_mem_save_display_name_1 = NULL;
6151 0 : TALLOC_CTX *_mem_save_display_name_length_0 = NULL;
6152 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6153 0 : if (flags & NDR_IN) {
6154 0 : NDR_ZERO_STRUCT(r->out);
6155 :
6156 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6157 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
6158 : }
6159 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6160 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6161 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6162 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6163 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
6164 0 : if (_ptr_service_name) {
6165 0 : NDR_PULL_ALLOC(ndr, r->in.service_name);
6166 : } else {
6167 0 : r->in.service_name = NULL;
6168 : }
6169 0 : if (r->in.service_name) {
6170 0 : _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6171 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.service_name, 0);
6172 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_name));
6173 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_name));
6174 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.service_name, &size_service_name_1));
6175 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.service_name, &length_service_name_1));
6176 0 : if (length_service_name_1 > size_service_name_1) {
6177 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_service_name_1, length_service_name_1);
6178 : }
6179 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_service_name_1, sizeof(uint16_t)));
6180 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_name, length_service_name_1, sizeof(uint16_t), CH_UTF16));
6181 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
6182 : }
6183 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
6184 0 : if (_ptr_display_name_length) {
6185 0 : NDR_PULL_ALLOC(ndr, r->in.display_name_length);
6186 : } else {
6187 0 : r->in.display_name_length = NULL;
6188 : }
6189 0 : if (r->in.display_name_length) {
6190 0 : _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
6191 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name_length, 0);
6192 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.display_name_length));
6193 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
6194 : }
6195 0 : NDR_PULL_ALLOC(ndr, r->out.display_name);
6196 0 : NDR_ZERO_STRUCTP(r->out.display_name);
6197 : }
6198 0 : if (flags & NDR_OUT) {
6199 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6200 : if (r->in.handle == NULL) {
6201 : NDR_PULL_ALLOC(ndr, r->in.handle);
6202 : NDR_ZERO_STRUCTP(r->in.handle);
6203 : }
6204 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6205 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6206 0 : NDR_PULL_ALLOC(ndr, r->out.display_name);
6207 : }
6208 0 : _mem_save_display_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6209 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name, LIBNDR_FLAG_REF_ALLOC);
6210 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name));
6211 0 : if (_ptr_display_name) {
6212 0 : NDR_PULL_ALLOC(ndr, *r->out.display_name);
6213 : } else {
6214 0 : *r->out.display_name = NULL;
6215 : }
6216 0 : if (*r->out.display_name) {
6217 0 : _mem_save_display_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
6218 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.display_name, 0);
6219 0 : NDR_CHECK(ndr_pull_array_size(ndr, r->out.display_name));
6220 0 : NDR_CHECK(ndr_pull_array_length(ndr, r->out.display_name));
6221 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)r->out.display_name, &size_display_name_2));
6222 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)r->out.display_name, &length_display_name_2));
6223 0 : if (length_display_name_2 > size_display_name_2) {
6224 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_display_name_2, length_display_name_2);
6225 : }
6226 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_display_name_2, sizeof(uint16_t)));
6227 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.display_name, length_display_name_2, sizeof(uint16_t), CH_UTF16));
6228 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_1, 0);
6229 : }
6230 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_0, LIBNDR_FLAG_REF_ALLOC);
6231 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
6232 0 : if (_ptr_display_name_length) {
6233 0 : NDR_PULL_ALLOC(ndr, r->out.display_name_length);
6234 : } else {
6235 0 : r->out.display_name_length = NULL;
6236 : }
6237 0 : if (r->out.display_name_length) {
6238 0 : _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
6239 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name_length, 0);
6240 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.display_name_length));
6241 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
6242 : }
6243 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6244 : }
6245 0 : return NDR_ERR_SUCCESS;
6246 : }
6247 :
6248 0 : _PUBLIC_ void ndr_print_svcctl_GetServiceDisplayNameA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceDisplayNameA *r)
6249 : {
6250 0 : ndr_print_struct(ndr, name, "svcctl_GetServiceDisplayNameA");
6251 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6252 0 : ndr->depth++;
6253 0 : if (flags & NDR_SET_VALUES) {
6254 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6255 : }
6256 0 : if (flags & NDR_IN) {
6257 0 : ndr_print_struct(ndr, "in", "svcctl_GetServiceDisplayNameA");
6258 0 : ndr->depth++;
6259 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
6260 0 : ndr->depth++;
6261 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
6262 0 : ndr->depth--;
6263 0 : ndr_print_ptr(ndr, "service_name", r->in.service_name);
6264 0 : ndr->depth++;
6265 0 : if (r->in.service_name) {
6266 0 : ndr_print_string(ndr, "service_name", r->in.service_name);
6267 : }
6268 0 : ndr->depth--;
6269 0 : ndr_print_ptr(ndr, "display_name_length", r->in.display_name_length);
6270 0 : ndr->depth++;
6271 0 : if (r->in.display_name_length) {
6272 0 : ndr_print_uint32(ndr, "display_name_length", *r->in.display_name_length);
6273 : }
6274 0 : ndr->depth--;
6275 0 : ndr->depth--;
6276 : }
6277 0 : if (flags & NDR_OUT) {
6278 0 : ndr_print_struct(ndr, "out", "svcctl_GetServiceDisplayNameA");
6279 0 : ndr->depth++;
6280 0 : ndr_print_ptr(ndr, "display_name", r->out.display_name);
6281 0 : ndr->depth++;
6282 0 : ndr_print_ptr(ndr, "display_name", *r->out.display_name);
6283 0 : ndr->depth++;
6284 0 : if (*r->out.display_name) {
6285 0 : ndr_print_string(ndr, "display_name", *r->out.display_name);
6286 : }
6287 0 : ndr->depth--;
6288 0 : ndr->depth--;
6289 0 : ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length);
6290 0 : ndr->depth++;
6291 0 : if (r->out.display_name_length) {
6292 0 : ndr_print_uint32(ndr, "display_name_length", *r->out.display_name_length);
6293 : }
6294 0 : ndr->depth--;
6295 0 : ndr_print_WERROR(ndr, "result", r->out.result);
6296 0 : ndr->depth--;
6297 : }
6298 0 : ndr->depth--;
6299 : }
6300 :
6301 0 : static enum ndr_err_code ndr_push_svcctl_GetServiceKeyNameA(struct ndr_push *ndr, int flags, const struct svcctl_GetServiceKeyNameA *r)
6302 : {
6303 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6304 0 : if (flags & NDR_IN) {
6305 0 : if (r->in.handle == NULL) {
6306 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6307 : }
6308 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6309 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service_name));
6310 0 : if (r->in.service_name) {
6311 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
6312 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6313 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service_name, CH_UTF16)));
6314 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));
6315 : }
6316 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.display_name_length));
6317 0 : if (r->in.display_name_length) {
6318 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.display_name_length));
6319 : }
6320 : }
6321 0 : if (flags & NDR_OUT) {
6322 0 : if (r->out.key_name == NULL) {
6323 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6324 : }
6325 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.key_name));
6326 0 : if (*r->out.key_name) {
6327 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16)));
6328 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6329 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.key_name, CH_UTF16)));
6330 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));
6331 : }
6332 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.display_name_length));
6333 0 : if (r->out.display_name_length) {
6334 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.display_name_length));
6335 : }
6336 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6337 : }
6338 0 : return NDR_ERR_SUCCESS;
6339 : }
6340 :
6341 0 : static enum ndr_err_code ndr_pull_svcctl_GetServiceKeyNameA(struct ndr_pull *ndr, int flags, struct svcctl_GetServiceKeyNameA *r)
6342 : {
6343 : uint32_t _ptr_service_name;
6344 0 : uint32_t size_service_name_1 = 0;
6345 0 : uint32_t length_service_name_1 = 0;
6346 : uint32_t _ptr_key_name;
6347 0 : uint32_t size_key_name_2 = 0;
6348 0 : uint32_t length_key_name_2 = 0;
6349 : uint32_t _ptr_display_name_length;
6350 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
6351 0 : TALLOC_CTX *_mem_save_service_name_0 = NULL;
6352 0 : TALLOC_CTX *_mem_save_key_name_0 = NULL;
6353 0 : TALLOC_CTX *_mem_save_key_name_1 = NULL;
6354 0 : TALLOC_CTX *_mem_save_display_name_length_0 = NULL;
6355 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6356 0 : if (flags & NDR_IN) {
6357 0 : NDR_ZERO_STRUCT(r->out);
6358 :
6359 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6360 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
6361 : }
6362 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6363 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6364 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6365 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6366 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service_name));
6367 0 : if (_ptr_service_name) {
6368 0 : NDR_PULL_ALLOC(ndr, r->in.service_name);
6369 : } else {
6370 0 : r->in.service_name = NULL;
6371 : }
6372 0 : if (r->in.service_name) {
6373 0 : _mem_save_service_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6374 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.service_name, 0);
6375 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service_name));
6376 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service_name));
6377 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.service_name, &size_service_name_1));
6378 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.service_name, &length_service_name_1));
6379 0 : if (length_service_name_1 > size_service_name_1) {
6380 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_service_name_1, length_service_name_1);
6381 : }
6382 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_service_name_1, sizeof(uint16_t)));
6383 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service_name, length_service_name_1, sizeof(uint16_t), CH_UTF16));
6384 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_name_0, 0);
6385 : }
6386 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
6387 0 : if (_ptr_display_name_length) {
6388 0 : NDR_PULL_ALLOC(ndr, r->in.display_name_length);
6389 : } else {
6390 0 : r->in.display_name_length = NULL;
6391 : }
6392 0 : if (r->in.display_name_length) {
6393 0 : _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
6394 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.display_name_length, 0);
6395 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.display_name_length));
6396 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
6397 : }
6398 0 : NDR_PULL_ALLOC(ndr, r->out.key_name);
6399 0 : NDR_ZERO_STRUCTP(r->out.key_name);
6400 : }
6401 0 : if (flags & NDR_OUT) {
6402 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6403 : if (r->in.handle == NULL) {
6404 : NDR_PULL_ALLOC(ndr, r->in.handle);
6405 : NDR_ZERO_STRUCTP(r->in.handle);
6406 : }
6407 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6408 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6409 0 : NDR_PULL_ALLOC(ndr, r->out.key_name);
6410 : }
6411 0 : _mem_save_key_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6412 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.key_name, LIBNDR_FLAG_REF_ALLOC);
6413 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_key_name));
6414 0 : if (_ptr_key_name) {
6415 0 : NDR_PULL_ALLOC(ndr, *r->out.key_name);
6416 : } else {
6417 0 : *r->out.key_name = NULL;
6418 : }
6419 0 : if (*r->out.key_name) {
6420 0 : _mem_save_key_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
6421 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.key_name, 0);
6422 0 : NDR_CHECK(ndr_pull_array_size(ndr, r->out.key_name));
6423 0 : NDR_CHECK(ndr_pull_array_length(ndr, r->out.key_name));
6424 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)r->out.key_name, &size_key_name_2));
6425 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)r->out.key_name, &length_key_name_2));
6426 0 : if (length_key_name_2 > size_key_name_2) {
6427 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_key_name_2, length_key_name_2);
6428 : }
6429 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_key_name_2, sizeof(uint16_t)));
6430 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.key_name, length_key_name_2, sizeof(uint16_t), CH_UTF16));
6431 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_name_1, 0);
6432 : }
6433 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_key_name_0, LIBNDR_FLAG_REF_ALLOC);
6434 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_display_name_length));
6435 0 : if (_ptr_display_name_length) {
6436 0 : NDR_PULL_ALLOC(ndr, r->out.display_name_length);
6437 : } else {
6438 0 : r->out.display_name_length = NULL;
6439 : }
6440 0 : if (r->out.display_name_length) {
6441 0 : _mem_save_display_name_length_0 = NDR_PULL_GET_MEM_CTX(ndr);
6442 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.display_name_length, 0);
6443 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.display_name_length));
6444 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_display_name_length_0, 0);
6445 : }
6446 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6447 : }
6448 0 : return NDR_ERR_SUCCESS;
6449 : }
6450 :
6451 0 : _PUBLIC_ void ndr_print_svcctl_GetServiceKeyNameA(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetServiceKeyNameA *r)
6452 : {
6453 0 : ndr_print_struct(ndr, name, "svcctl_GetServiceKeyNameA");
6454 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6455 0 : ndr->depth++;
6456 0 : if (flags & NDR_SET_VALUES) {
6457 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6458 : }
6459 0 : if (flags & NDR_IN) {
6460 0 : ndr_print_struct(ndr, "in", "svcctl_GetServiceKeyNameA");
6461 0 : ndr->depth++;
6462 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
6463 0 : ndr->depth++;
6464 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
6465 0 : ndr->depth--;
6466 0 : ndr_print_ptr(ndr, "service_name", r->in.service_name);
6467 0 : ndr->depth++;
6468 0 : if (r->in.service_name) {
6469 0 : ndr_print_string(ndr, "service_name", r->in.service_name);
6470 : }
6471 0 : ndr->depth--;
6472 0 : ndr_print_ptr(ndr, "display_name_length", r->in.display_name_length);
6473 0 : ndr->depth++;
6474 0 : if (r->in.display_name_length) {
6475 0 : ndr_print_uint32(ndr, "display_name_length", *r->in.display_name_length);
6476 : }
6477 0 : ndr->depth--;
6478 0 : ndr->depth--;
6479 : }
6480 0 : if (flags & NDR_OUT) {
6481 0 : ndr_print_struct(ndr, "out", "svcctl_GetServiceKeyNameA");
6482 0 : ndr->depth++;
6483 0 : ndr_print_ptr(ndr, "key_name", r->out.key_name);
6484 0 : ndr->depth++;
6485 0 : ndr_print_ptr(ndr, "key_name", *r->out.key_name);
6486 0 : ndr->depth++;
6487 0 : if (*r->out.key_name) {
6488 0 : ndr_print_string(ndr, "key_name", *r->out.key_name);
6489 : }
6490 0 : ndr->depth--;
6491 0 : ndr->depth--;
6492 0 : ndr_print_ptr(ndr, "display_name_length", r->out.display_name_length);
6493 0 : ndr->depth++;
6494 0 : if (r->out.display_name_length) {
6495 0 : ndr_print_uint32(ndr, "display_name_length", *r->out.display_name_length);
6496 : }
6497 0 : ndr->depth--;
6498 0 : ndr_print_WERROR(ndr, "result", r->out.result);
6499 0 : ndr->depth--;
6500 : }
6501 0 : ndr->depth--;
6502 : }
6503 :
6504 0 : static enum ndr_err_code ndr_push_svcctl_GetCurrentGroupeStateW(struct ndr_push *ndr, int flags, const struct svcctl_GetCurrentGroupeStateW *r)
6505 : {
6506 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6507 0 : if (flags & NDR_IN) {
6508 : }
6509 0 : if (flags & NDR_OUT) {
6510 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6511 : }
6512 0 : return NDR_ERR_SUCCESS;
6513 : }
6514 :
6515 0 : static enum ndr_err_code ndr_pull_svcctl_GetCurrentGroupeStateW(struct ndr_pull *ndr, int flags, struct svcctl_GetCurrentGroupeStateW *r)
6516 : {
6517 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6518 0 : if (flags & NDR_IN) {
6519 : }
6520 0 : if (flags & NDR_OUT) {
6521 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6522 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6523 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6524 : }
6525 0 : return NDR_ERR_SUCCESS;
6526 : }
6527 :
6528 0 : _PUBLIC_ void ndr_print_svcctl_GetCurrentGroupeStateW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_GetCurrentGroupeStateW *r)
6529 : {
6530 0 : ndr_print_struct(ndr, name, "svcctl_GetCurrentGroupeStateW");
6531 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6532 0 : ndr->depth++;
6533 0 : if (flags & NDR_SET_VALUES) {
6534 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6535 : }
6536 0 : if (flags & NDR_IN) {
6537 0 : ndr_print_struct(ndr, "in", "svcctl_GetCurrentGroupeStateW");
6538 0 : ndr->depth++;
6539 0 : ndr->depth--;
6540 : }
6541 0 : if (flags & NDR_OUT) {
6542 0 : ndr_print_struct(ndr, "out", "svcctl_GetCurrentGroupeStateW");
6543 0 : ndr->depth++;
6544 0 : ndr_print_WERROR(ndr, "result", r->out.result);
6545 0 : ndr->depth--;
6546 : }
6547 0 : ndr->depth--;
6548 : }
6549 :
6550 0 : static enum ndr_err_code ndr_push_svcctl_EnumServiceGroupW(struct ndr_push *ndr, int flags, const struct svcctl_EnumServiceGroupW *r)
6551 : {
6552 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6553 0 : if (flags & NDR_IN) {
6554 : }
6555 0 : if (flags & NDR_OUT) {
6556 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6557 : }
6558 0 : return NDR_ERR_SUCCESS;
6559 : }
6560 :
6561 0 : static enum ndr_err_code ndr_pull_svcctl_EnumServiceGroupW(struct ndr_pull *ndr, int flags, struct svcctl_EnumServiceGroupW *r)
6562 : {
6563 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6564 0 : if (flags & NDR_IN) {
6565 : }
6566 0 : if (flags & NDR_OUT) {
6567 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6568 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6569 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6570 : }
6571 0 : return NDR_ERR_SUCCESS;
6572 : }
6573 :
6574 0 : _PUBLIC_ void ndr_print_svcctl_EnumServiceGroupW(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_EnumServiceGroupW *r)
6575 : {
6576 0 : ndr_print_struct(ndr, name, "svcctl_EnumServiceGroupW");
6577 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6578 0 : ndr->depth++;
6579 0 : if (flags & NDR_SET_VALUES) {
6580 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6581 : }
6582 0 : if (flags & NDR_IN) {
6583 0 : ndr_print_struct(ndr, "in", "svcctl_EnumServiceGroupW");
6584 0 : ndr->depth++;
6585 0 : ndr->depth--;
6586 : }
6587 0 : if (flags & NDR_OUT) {
6588 0 : ndr_print_struct(ndr, "out", "svcctl_EnumServiceGroupW");
6589 0 : ndr->depth++;
6590 0 : ndr_print_WERROR(ndr, "result", r->out.result);
6591 0 : ndr->depth--;
6592 : }
6593 0 : ndr->depth--;
6594 : }
6595 :
6596 0 : static enum ndr_err_code ndr_push_svcctl_ChangeServiceConfig2A(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfig2A *r)
6597 : {
6598 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6599 0 : if (flags & NDR_IN) {
6600 0 : if (r->in.handle == NULL) {
6601 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6602 : }
6603 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6604 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
6605 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
6606 0 : if (r->in.info) {
6607 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->in.info));
6608 : }
6609 : }
6610 0 : if (flags & NDR_OUT) {
6611 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6612 : }
6613 0 : return NDR_ERR_SUCCESS;
6614 : }
6615 :
6616 0 : static enum ndr_err_code ndr_pull_svcctl_ChangeServiceConfig2A(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfig2A *r)
6617 : {
6618 : uint32_t _ptr_info;
6619 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
6620 0 : TALLOC_CTX *_mem_save_info_0 = NULL;
6621 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6622 0 : if (flags & NDR_IN) {
6623 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6624 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
6625 : }
6626 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6627 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6628 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6629 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6630 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
6631 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
6632 0 : if (_ptr_info) {
6633 0 : NDR_PULL_ALLOC(ndr, r->in.info);
6634 : } else {
6635 0 : r->in.info = NULL;
6636 : }
6637 0 : if (r->in.info) {
6638 0 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
6639 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
6640 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->in.info));
6641 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
6642 : }
6643 : }
6644 0 : if (flags & NDR_OUT) {
6645 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6646 : if (r->in.handle == NULL) {
6647 : NDR_PULL_ALLOC(ndr, r->in.handle);
6648 : NDR_ZERO_STRUCTP(r->in.handle);
6649 : }
6650 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6651 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6652 : }
6653 0 : return NDR_ERR_SUCCESS;
6654 : }
6655 :
6656 0 : _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfig2A(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfig2A *r)
6657 : {
6658 0 : ndr_print_struct(ndr, name, "svcctl_ChangeServiceConfig2A");
6659 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6660 0 : ndr->depth++;
6661 0 : if (flags & NDR_SET_VALUES) {
6662 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6663 : }
6664 0 : if (flags & NDR_IN) {
6665 0 : ndr_print_struct(ndr, "in", "svcctl_ChangeServiceConfig2A");
6666 0 : ndr->depth++;
6667 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
6668 0 : ndr->depth++;
6669 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
6670 0 : ndr->depth--;
6671 0 : ndr_print_uint32(ndr, "info_level", r->in.info_level);
6672 0 : ndr_print_ptr(ndr, "info", r->in.info);
6673 0 : ndr->depth++;
6674 0 : if (r->in.info) {
6675 0 : ndr_print_uint8(ndr, "info", *r->in.info);
6676 : }
6677 0 : ndr->depth--;
6678 0 : ndr->depth--;
6679 : }
6680 0 : if (flags & NDR_OUT) {
6681 0 : ndr_print_struct(ndr, "out", "svcctl_ChangeServiceConfig2A");
6682 0 : ndr->depth++;
6683 0 : ndr_print_WERROR(ndr, "result", r->out.result);
6684 0 : ndr->depth--;
6685 : }
6686 0 : ndr->depth--;
6687 : }
6688 :
6689 0 : static enum ndr_err_code ndr_push_svcctl_ChangeServiceConfig2W(struct ndr_push *ndr, int flags, const struct svcctl_ChangeServiceConfig2W *r)
6690 : {
6691 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6692 0 : if (flags & NDR_IN) {
6693 0 : if (r->in.handle == NULL) {
6694 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6695 : }
6696 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6697 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
6698 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
6699 0 : if (r->in.info) {
6700 0 : NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->in.info));
6701 : }
6702 : }
6703 0 : if (flags & NDR_OUT) {
6704 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6705 : }
6706 0 : return NDR_ERR_SUCCESS;
6707 : }
6708 :
6709 0 : static enum ndr_err_code ndr_pull_svcctl_ChangeServiceConfig2W(struct ndr_pull *ndr, int flags, struct svcctl_ChangeServiceConfig2W *r)
6710 : {
6711 : uint32_t _ptr_info;
6712 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
6713 0 : TALLOC_CTX *_mem_save_info_0 = NULL;
6714 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6715 0 : if (flags & NDR_IN) {
6716 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6717 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
6718 : }
6719 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6720 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6721 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6722 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6723 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
6724 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
6725 0 : if (_ptr_info) {
6726 0 : NDR_PULL_ALLOC(ndr, r->in.info);
6727 : } else {
6728 0 : r->in.info = NULL;
6729 : }
6730 0 : if (r->in.info) {
6731 0 : _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
6732 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
6733 0 : NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->in.info));
6734 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
6735 : }
6736 : }
6737 0 : if (flags & NDR_OUT) {
6738 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6739 : if (r->in.handle == NULL) {
6740 : NDR_PULL_ALLOC(ndr, r->in.handle);
6741 : NDR_ZERO_STRUCTP(r->in.handle);
6742 : }
6743 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6744 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6745 : }
6746 0 : return NDR_ERR_SUCCESS;
6747 : }
6748 :
6749 0 : _PUBLIC_ void ndr_print_svcctl_ChangeServiceConfig2W(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_ChangeServiceConfig2W *r)
6750 : {
6751 0 : ndr_print_struct(ndr, name, "svcctl_ChangeServiceConfig2W");
6752 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6753 0 : ndr->depth++;
6754 0 : if (flags & NDR_SET_VALUES) {
6755 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6756 : }
6757 0 : if (flags & NDR_IN) {
6758 0 : ndr_print_struct(ndr, "in", "svcctl_ChangeServiceConfig2W");
6759 0 : ndr->depth++;
6760 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
6761 0 : ndr->depth++;
6762 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
6763 0 : ndr->depth--;
6764 0 : ndr_print_uint32(ndr, "info_level", r->in.info_level);
6765 0 : ndr_print_ptr(ndr, "info", r->in.info);
6766 0 : ndr->depth++;
6767 0 : if (r->in.info) {
6768 0 : ndr_print_uint8(ndr, "info", *r->in.info);
6769 : }
6770 0 : ndr->depth--;
6771 0 : ndr->depth--;
6772 : }
6773 0 : if (flags & NDR_OUT) {
6774 0 : ndr_print_struct(ndr, "out", "svcctl_ChangeServiceConfig2W");
6775 0 : ndr->depth++;
6776 0 : ndr_print_WERROR(ndr, "result", r->out.result);
6777 0 : ndr->depth--;
6778 : }
6779 0 : ndr->depth--;
6780 : }
6781 :
6782 0 : static enum ndr_err_code ndr_push_svcctl_QueryServiceConfig2A(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfig2A *r)
6783 : {
6784 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6785 0 : if (flags & NDR_IN) {
6786 0 : if (r->in.handle == NULL) {
6787 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6788 : }
6789 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6790 0 : NDR_CHECK(ndr_push_svcctl_ConfigLevel(ndr, NDR_SCALARS, r->in.info_level));
6791 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
6792 : }
6793 0 : if (flags & NDR_OUT) {
6794 0 : if (r->out.needed == NULL) {
6795 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6796 : }
6797 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
6798 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
6799 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6800 : }
6801 0 : return NDR_ERR_SUCCESS;
6802 : }
6803 :
6804 0 : static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfig2A(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfig2A *r)
6805 : {
6806 0 : uint32_t size_buffer_0 = 0;
6807 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
6808 0 : TALLOC_CTX *_mem_save_needed_0 = NULL;
6809 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6810 0 : if (flags & NDR_IN) {
6811 0 : NDR_ZERO_STRUCT(r->out);
6812 :
6813 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6814 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
6815 : }
6816 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6817 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6818 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6819 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6820 0 : NDR_CHECK(ndr_pull_svcctl_ConfigLevel(ndr, NDR_SCALARS, &r->in.info_level));
6821 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
6822 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
6823 0 : NDR_ZERO_STRUCTP(r->out.needed);
6824 : }
6825 0 : if (flags & NDR_OUT) {
6826 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6827 : if (r->in.handle == NULL) {
6828 : NDR_PULL_ALLOC(ndr, r->in.handle);
6829 : NDR_ZERO_STRUCTP(r->in.handle);
6830 : }
6831 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6832 0 : size_buffer_0 = r->in.offered;
6833 0 : NDR_PULL_ALLOC_N(ndr, r->out.buffer, size_buffer_0);
6834 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, size_buffer_0));
6835 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6836 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
6837 : }
6838 0 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
6839 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
6840 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
6841 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
6842 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6843 : }
6844 0 : return NDR_ERR_SUCCESS;
6845 : }
6846 :
6847 0 : _PUBLIC_ void ndr_print_svcctl_QueryServiceConfig2A(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfig2A *r)
6848 : {
6849 0 : ndr_print_struct(ndr, name, "svcctl_QueryServiceConfig2A");
6850 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6851 0 : ndr->depth++;
6852 0 : if (flags & NDR_SET_VALUES) {
6853 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6854 : }
6855 0 : if (flags & NDR_IN) {
6856 0 : ndr_print_struct(ndr, "in", "svcctl_QueryServiceConfig2A");
6857 0 : ndr->depth++;
6858 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
6859 0 : ndr->depth++;
6860 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
6861 0 : ndr->depth--;
6862 0 : ndr_print_svcctl_ConfigLevel(ndr, "info_level", r->in.info_level);
6863 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
6864 0 : ndr->depth--;
6865 : }
6866 0 : if (flags & NDR_OUT) {
6867 0 : ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfig2A");
6868 0 : ndr->depth++;
6869 0 : ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
6870 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
6871 0 : ndr->depth++;
6872 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
6873 0 : ndr->depth--;
6874 0 : ndr_print_WERROR(ndr, "result", r->out.result);
6875 0 : ndr->depth--;
6876 : }
6877 0 : ndr->depth--;
6878 : }
6879 :
6880 0 : static enum ndr_err_code ndr_push_svcctl_QueryServiceConfig2W(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceConfig2W *r)
6881 : {
6882 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
6883 0 : if (flags & NDR_IN) {
6884 0 : if (r->in.handle == NULL) {
6885 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6886 : }
6887 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6888 0 : NDR_CHECK(ndr_push_svcctl_ConfigLevel(ndr, NDR_SCALARS, r->in.info_level));
6889 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
6890 : }
6891 0 : if (flags & NDR_OUT) {
6892 0 : if (r->out.buffer == NULL) {
6893 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6894 : }
6895 0 : if (r->out.needed == NULL) {
6896 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
6897 : }
6898 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
6899 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
6900 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
6901 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
6902 : }
6903 0 : return NDR_ERR_SUCCESS;
6904 : }
6905 :
6906 0 : static enum ndr_err_code ndr_pull_svcctl_QueryServiceConfig2W(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceConfig2W *r)
6907 : {
6908 0 : uint32_t size_buffer_1 = 0;
6909 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
6910 0 : TALLOC_CTX *_mem_save_needed_0 = NULL;
6911 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
6912 0 : if (flags & NDR_IN) {
6913 0 : NDR_ZERO_STRUCT(r->out);
6914 :
6915 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6916 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
6917 : }
6918 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
6919 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
6920 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
6921 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
6922 0 : NDR_CHECK(ndr_pull_svcctl_ConfigLevel(ndr, NDR_SCALARS, &r->in.info_level));
6923 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
6924 0 : if (r->in.offered > 8192) {
6925 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6926 : }
6927 0 : NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.offered);
6928 0 : memset(r->out.buffer, 0, (r->in.offered) * sizeof(*r->out.buffer));
6929 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
6930 0 : NDR_ZERO_STRUCTP(r->out.needed);
6931 : }
6932 0 : if (flags & NDR_OUT) {
6933 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
6934 : if (r->in.handle == NULL) {
6935 : NDR_PULL_ALLOC(ndr, r->in.handle);
6936 : NDR_ZERO_STRUCTP(r->in.handle);
6937 : }
6938 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
6939 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
6940 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.buffer, &size_buffer_1));
6941 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6942 0 : NDR_PULL_ALLOC_N(ndr, r->out.buffer, size_buffer_1);
6943 : }
6944 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, size_buffer_1));
6945 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
6946 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
6947 : }
6948 0 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
6949 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
6950 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
6951 0 : if (*r->out.needed > 8192) {
6952 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
6953 : }
6954 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
6955 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
6956 0 : if (r->out.buffer) {
6957 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.buffer, r->in.offered));
6958 : }
6959 : }
6960 0 : return NDR_ERR_SUCCESS;
6961 : }
6962 :
6963 0 : _PUBLIC_ void ndr_print_svcctl_QueryServiceConfig2W(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceConfig2W *r)
6964 : {
6965 0 : ndr_print_struct(ndr, name, "svcctl_QueryServiceConfig2W");
6966 0 : if (r == NULL) { ndr_print_null(ndr); return; }
6967 0 : ndr->depth++;
6968 0 : if (flags & NDR_SET_VALUES) {
6969 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
6970 : }
6971 0 : if (flags & NDR_IN) {
6972 0 : ndr_print_struct(ndr, "in", "svcctl_QueryServiceConfig2W");
6973 0 : ndr->depth++;
6974 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
6975 0 : ndr->depth++;
6976 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
6977 0 : ndr->depth--;
6978 0 : ndr_print_svcctl_ConfigLevel(ndr, "info_level", r->in.info_level);
6979 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
6980 0 : ndr->depth--;
6981 : }
6982 0 : if (flags & NDR_OUT) {
6983 0 : ndr_print_struct(ndr, "out", "svcctl_QueryServiceConfig2W");
6984 0 : ndr->depth++;
6985 0 : ndr_print_ptr(ndr, "buffer", r->out.buffer);
6986 0 : ndr->depth++;
6987 0 : ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
6988 0 : ndr->depth--;
6989 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
6990 0 : ndr->depth++;
6991 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
6992 0 : ndr->depth--;
6993 0 : ndr_print_WERROR(ndr, "result", r->out.result);
6994 0 : ndr->depth--;
6995 : }
6996 0 : ndr->depth--;
6997 : }
6998 :
6999 0 : static enum ndr_err_code ndr_push_svcctl_QueryServiceStatusEx(struct ndr_push *ndr, int flags, const struct svcctl_QueryServiceStatusEx *r)
7000 : {
7001 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7002 0 : if (flags & NDR_IN) {
7003 0 : if (r->in.handle == NULL) {
7004 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7005 : }
7006 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7007 0 : NDR_CHECK(ndr_push_svcctl_StatusLevel(ndr, NDR_SCALARS, r->in.info_level));
7008 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
7009 : }
7010 0 : if (flags & NDR_OUT) {
7011 0 : if (r->out.buffer == NULL) {
7012 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7013 : }
7014 0 : if (r->out.needed == NULL) {
7015 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7016 : }
7017 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
7018 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.offered));
7019 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
7020 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
7021 : }
7022 0 : return NDR_ERR_SUCCESS;
7023 : }
7024 :
7025 0 : static enum ndr_err_code ndr_pull_svcctl_QueryServiceStatusEx(struct ndr_pull *ndr, int flags, struct svcctl_QueryServiceStatusEx *r)
7026 : {
7027 0 : uint32_t size_buffer_1 = 0;
7028 0 : TALLOC_CTX *_mem_save_handle_0 = NULL;
7029 0 : TALLOC_CTX *_mem_save_needed_0 = NULL;
7030 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
7031 0 : if (flags & NDR_IN) {
7032 0 : NDR_ZERO_STRUCT(r->out);
7033 :
7034 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7035 0 : NDR_PULL_ALLOC(ndr, r->in.handle);
7036 : }
7037 0 : _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7038 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
7039 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
7040 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
7041 0 : NDR_CHECK(ndr_pull_svcctl_StatusLevel(ndr, NDR_SCALARS, &r->in.info_level));
7042 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
7043 0 : if (r->in.offered > 8192) {
7044 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
7045 : }
7046 0 : NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.offered);
7047 0 : memset(r->out.buffer, 0, (r->in.offered) * sizeof(*r->out.buffer));
7048 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
7049 0 : NDR_ZERO_STRUCTP(r->out.needed);
7050 : }
7051 0 : if (flags & NDR_OUT) {
7052 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
7053 : if (r->in.handle == NULL) {
7054 : NDR_PULL_ALLOC(ndr, r->in.handle);
7055 : NDR_ZERO_STRUCTP(r->in.handle);
7056 : }
7057 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
7058 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
7059 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.buffer, &size_buffer_1));
7060 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7061 0 : NDR_PULL_ALLOC_N(ndr, r->out.buffer, size_buffer_1);
7062 : }
7063 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, size_buffer_1));
7064 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7065 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
7066 : }
7067 0 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
7068 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
7069 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
7070 0 : if (*r->out.needed > 8192) {
7071 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
7072 : }
7073 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
7074 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
7075 0 : if (r->out.buffer) {
7076 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.buffer, r->in.offered));
7077 : }
7078 : }
7079 0 : return NDR_ERR_SUCCESS;
7080 : }
7081 :
7082 0 : _PUBLIC_ void ndr_print_svcctl_QueryServiceStatusEx(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_QueryServiceStatusEx *r)
7083 : {
7084 0 : ndr_print_struct(ndr, name, "svcctl_QueryServiceStatusEx");
7085 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7086 0 : ndr->depth++;
7087 0 : if (flags & NDR_SET_VALUES) {
7088 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7089 : }
7090 0 : if (flags & NDR_IN) {
7091 0 : ndr_print_struct(ndr, "in", "svcctl_QueryServiceStatusEx");
7092 0 : ndr->depth++;
7093 0 : ndr_print_ptr(ndr, "handle", r->in.handle);
7094 0 : ndr->depth++;
7095 0 : ndr_print_policy_handle(ndr, "handle", r->in.handle);
7096 0 : ndr->depth--;
7097 0 : ndr_print_svcctl_StatusLevel(ndr, "info_level", r->in.info_level);
7098 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
7099 0 : ndr->depth--;
7100 : }
7101 0 : if (flags & NDR_OUT) {
7102 0 : ndr_print_struct(ndr, "out", "svcctl_QueryServiceStatusEx");
7103 0 : ndr->depth++;
7104 0 : ndr_print_ptr(ndr, "buffer", r->out.buffer);
7105 0 : ndr->depth++;
7106 0 : ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.offered);
7107 0 : ndr->depth--;
7108 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
7109 0 : ndr->depth++;
7110 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
7111 0 : ndr->depth--;
7112 0 : ndr_print_WERROR(ndr, "result", r->out.result);
7113 0 : ndr->depth--;
7114 : }
7115 0 : ndr->depth--;
7116 : }
7117 :
7118 0 : static enum ndr_err_code ndr_push_EnumServicesStatusExA(struct ndr_push *ndr, int flags, const struct EnumServicesStatusExA *r)
7119 : {
7120 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7121 0 : if (flags & NDR_IN) {
7122 0 : if (r->in.scmanager == NULL) {
7123 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7124 : }
7125 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager));
7126 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
7127 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
7128 0 : NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
7129 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
7130 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
7131 0 : if (r->in.resume_handle) {
7132 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
7133 : }
7134 : }
7135 0 : if (flags & NDR_OUT) {
7136 0 : if (r->out.needed == NULL) {
7137 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7138 : }
7139 0 : if (r->out.service_returned == NULL) {
7140 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7141 : }
7142 0 : if (r->out.group_name == NULL) {
7143 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7144 : }
7145 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.services, r->in.offered));
7146 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
7147 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.service_returned));
7148 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
7149 0 : if (r->out.resume_handle) {
7150 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
7151 : }
7152 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.group_name));
7153 0 : if (*r->out.group_name) {
7154 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.group_name, CH_UTF16)));
7155 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7156 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.group_name, CH_UTF16)));
7157 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));
7158 : }
7159 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
7160 : }
7161 0 : return NDR_ERR_SUCCESS;
7162 : }
7163 :
7164 0 : static enum ndr_err_code ndr_pull_EnumServicesStatusExA(struct ndr_pull *ndr, int flags, struct EnumServicesStatusExA *r)
7165 : {
7166 0 : uint32_t size_services_0 = 0;
7167 : uint32_t _ptr_resume_handle;
7168 : uint32_t _ptr_group_name;
7169 0 : uint32_t size_group_name_2 = 0;
7170 0 : uint32_t length_group_name_2 = 0;
7171 0 : TALLOC_CTX *_mem_save_scmanager_0 = NULL;
7172 0 : TALLOC_CTX *_mem_save_needed_0 = NULL;
7173 0 : TALLOC_CTX *_mem_save_service_returned_0 = NULL;
7174 0 : TALLOC_CTX *_mem_save_resume_handle_0 = NULL;
7175 0 : TALLOC_CTX *_mem_save_group_name_0 = NULL;
7176 0 : TALLOC_CTX *_mem_save_group_name_1 = NULL;
7177 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
7178 0 : if (flags & NDR_IN) {
7179 0 : NDR_ZERO_STRUCT(r->out);
7180 :
7181 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7182 0 : NDR_PULL_ALLOC(ndr, r->in.scmanager);
7183 : }
7184 0 : _mem_save_scmanager_0 = NDR_PULL_GET_MEM_CTX(ndr);
7185 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager, LIBNDR_FLAG_REF_ALLOC);
7186 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager));
7187 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_0, LIBNDR_FLAG_REF_ALLOC);
7188 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
7189 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
7190 0 : NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
7191 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
7192 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
7193 0 : if (_ptr_resume_handle) {
7194 0 : NDR_PULL_ALLOC(ndr, r->in.resume_handle);
7195 : } else {
7196 0 : r->in.resume_handle = NULL;
7197 : }
7198 0 : if (r->in.resume_handle) {
7199 0 : _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7200 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
7201 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
7202 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
7203 : }
7204 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
7205 0 : NDR_ZERO_STRUCTP(r->out.needed);
7206 0 : NDR_PULL_ALLOC(ndr, r->out.service_returned);
7207 0 : NDR_ZERO_STRUCTP(r->out.service_returned);
7208 0 : NDR_PULL_ALLOC(ndr, r->out.group_name);
7209 0 : NDR_ZERO_STRUCTP(r->out.group_name);
7210 : }
7211 0 : if (flags & NDR_OUT) {
7212 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
7213 : if (r->in.scmanager == NULL) {
7214 : NDR_PULL_ALLOC(ndr, r->in.scmanager);
7215 : NDR_ZERO_STRUCTP(r->in.scmanager);
7216 : }
7217 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
7218 0 : size_services_0 = r->in.offered;
7219 0 : NDR_PULL_ALLOC_N(ndr, r->out.services, size_services_0);
7220 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.services, size_services_0));
7221 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7222 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
7223 : }
7224 0 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
7225 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
7226 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
7227 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
7228 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7229 0 : NDR_PULL_ALLOC(ndr, r->out.service_returned);
7230 : }
7231 0 : _mem_save_service_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
7232 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.service_returned, LIBNDR_FLAG_REF_ALLOC);
7233 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.service_returned));
7234 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_returned_0, LIBNDR_FLAG_REF_ALLOC);
7235 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
7236 0 : if (_ptr_resume_handle) {
7237 0 : NDR_PULL_ALLOC(ndr, r->out.resume_handle);
7238 : } else {
7239 0 : r->out.resume_handle = NULL;
7240 : }
7241 0 : if (r->out.resume_handle) {
7242 0 : _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7243 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
7244 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
7245 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
7246 : }
7247 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7248 0 : NDR_PULL_ALLOC(ndr, r->out.group_name);
7249 : }
7250 0 : _mem_save_group_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7251 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.group_name, LIBNDR_FLAG_REF_ALLOC);
7252 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_name));
7253 0 : if (_ptr_group_name) {
7254 0 : NDR_PULL_ALLOC(ndr, *r->out.group_name);
7255 : } else {
7256 0 : *r->out.group_name = NULL;
7257 : }
7258 0 : if (*r->out.group_name) {
7259 0 : _mem_save_group_name_1 = NDR_PULL_GET_MEM_CTX(ndr);
7260 0 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.group_name, 0);
7261 0 : NDR_CHECK(ndr_pull_array_size(ndr, r->out.group_name));
7262 0 : NDR_CHECK(ndr_pull_array_length(ndr, r->out.group_name));
7263 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)r->out.group_name, &size_group_name_2));
7264 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)r->out.group_name, &length_group_name_2));
7265 0 : if (length_group_name_2 > size_group_name_2) {
7266 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_group_name_2, length_group_name_2);
7267 : }
7268 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_group_name_2, sizeof(uint16_t)));
7269 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.group_name, length_group_name_2, sizeof(uint16_t), CH_UTF16));
7270 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_name_1, 0);
7271 : }
7272 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_name_0, LIBNDR_FLAG_REF_ALLOC);
7273 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
7274 : }
7275 0 : return NDR_ERR_SUCCESS;
7276 : }
7277 :
7278 0 : _PUBLIC_ void ndr_print_EnumServicesStatusExA(struct ndr_print *ndr, const char *name, int flags, const struct EnumServicesStatusExA *r)
7279 : {
7280 0 : ndr_print_struct(ndr, name, "EnumServicesStatusExA");
7281 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7282 0 : ndr->depth++;
7283 0 : if (flags & NDR_SET_VALUES) {
7284 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7285 : }
7286 0 : if (flags & NDR_IN) {
7287 0 : ndr_print_struct(ndr, "in", "EnumServicesStatusExA");
7288 0 : ndr->depth++;
7289 0 : ndr_print_ptr(ndr, "scmanager", r->in.scmanager);
7290 0 : ndr->depth++;
7291 0 : ndr_print_policy_handle(ndr, "scmanager", r->in.scmanager);
7292 0 : ndr->depth--;
7293 0 : ndr_print_uint32(ndr, "info_level", r->in.info_level);
7294 0 : ndr_print_uint32(ndr, "type", r->in.type);
7295 0 : ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
7296 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
7297 0 : ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
7298 0 : ndr->depth++;
7299 0 : if (r->in.resume_handle) {
7300 0 : ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
7301 : }
7302 0 : ndr->depth--;
7303 0 : ndr->depth--;
7304 : }
7305 0 : if (flags & NDR_OUT) {
7306 0 : ndr_print_struct(ndr, "out", "EnumServicesStatusExA");
7307 0 : ndr->depth++;
7308 0 : ndr_print_array_uint8(ndr, "services", r->out.services, r->in.offered);
7309 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
7310 0 : ndr->depth++;
7311 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
7312 0 : ndr->depth--;
7313 0 : ndr_print_ptr(ndr, "service_returned", r->out.service_returned);
7314 0 : ndr->depth++;
7315 0 : ndr_print_uint32(ndr, "service_returned", *r->out.service_returned);
7316 0 : ndr->depth--;
7317 0 : ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
7318 0 : ndr->depth++;
7319 0 : if (r->out.resume_handle) {
7320 0 : ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
7321 : }
7322 0 : ndr->depth--;
7323 0 : ndr_print_ptr(ndr, "group_name", r->out.group_name);
7324 0 : ndr->depth++;
7325 0 : ndr_print_ptr(ndr, "group_name", *r->out.group_name);
7326 0 : ndr->depth++;
7327 0 : if (*r->out.group_name) {
7328 0 : ndr_print_string(ndr, "group_name", *r->out.group_name);
7329 : }
7330 0 : ndr->depth--;
7331 0 : ndr->depth--;
7332 0 : ndr_print_WERROR(ndr, "result", r->out.result);
7333 0 : ndr->depth--;
7334 : }
7335 0 : ndr->depth--;
7336 : }
7337 :
7338 0 : static enum ndr_err_code ndr_push_EnumServicesStatusExW(struct ndr_push *ndr, int flags, const struct EnumServicesStatusExW *r)
7339 : {
7340 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7341 0 : if (flags & NDR_IN) {
7342 0 : if (r->in.scmanager == NULL) {
7343 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7344 : }
7345 0 : NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.scmanager));
7346 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.info_level));
7347 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.type));
7348 0 : NDR_CHECK(ndr_push_svcctl_ServiceState(ndr, NDR_SCALARS, r->in.state));
7349 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offered));
7350 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
7351 0 : if (r->in.resume_handle) {
7352 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
7353 : }
7354 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.group_name));
7355 0 : if (r->in.group_name) {
7356 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.group_name, CH_UTF16)));
7357 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7358 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.group_name, CH_UTF16)));
7359 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));
7360 : }
7361 : }
7362 0 : if (flags & NDR_OUT) {
7363 0 : if (r->out.services == NULL) {
7364 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7365 : }
7366 0 : if (r->out.needed == NULL) {
7367 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7368 : }
7369 0 : if (r->out.service_returned == NULL) {
7370 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
7371 : }
7372 0 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.offered));
7373 0 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.services, r->in.offered));
7374 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.needed));
7375 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.service_returned));
7376 0 : NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
7377 0 : if (r->out.resume_handle) {
7378 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
7379 : }
7380 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
7381 : }
7382 0 : return NDR_ERR_SUCCESS;
7383 : }
7384 :
7385 0 : static enum ndr_err_code ndr_pull_EnumServicesStatusExW(struct ndr_pull *ndr, int flags, struct EnumServicesStatusExW *r)
7386 : {
7387 0 : uint32_t size_services_1 = 0;
7388 : uint32_t _ptr_resume_handle;
7389 : uint32_t _ptr_group_name;
7390 0 : uint32_t size_group_name_1 = 0;
7391 0 : uint32_t length_group_name_1 = 0;
7392 0 : TALLOC_CTX *_mem_save_scmanager_0 = NULL;
7393 0 : TALLOC_CTX *_mem_save_needed_0 = NULL;
7394 0 : TALLOC_CTX *_mem_save_service_returned_0 = NULL;
7395 0 : TALLOC_CTX *_mem_save_resume_handle_0 = NULL;
7396 0 : TALLOC_CTX *_mem_save_group_name_0 = NULL;
7397 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
7398 0 : if (flags & NDR_IN) {
7399 0 : NDR_ZERO_STRUCT(r->out);
7400 :
7401 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7402 0 : NDR_PULL_ALLOC(ndr, r->in.scmanager);
7403 : }
7404 0 : _mem_save_scmanager_0 = NDR_PULL_GET_MEM_CTX(ndr);
7405 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.scmanager, LIBNDR_FLAG_REF_ALLOC);
7406 0 : NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.scmanager));
7407 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_scmanager_0, LIBNDR_FLAG_REF_ALLOC);
7408 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.info_level));
7409 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.type));
7410 0 : NDR_CHECK(ndr_pull_svcctl_ServiceState(ndr, NDR_SCALARS, &r->in.state));
7411 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offered));
7412 0 : if (r->in.offered > 262144) {
7413 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
7414 : }
7415 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
7416 0 : if (_ptr_resume_handle) {
7417 0 : NDR_PULL_ALLOC(ndr, r->in.resume_handle);
7418 : } else {
7419 0 : r->in.resume_handle = NULL;
7420 : }
7421 0 : if (r->in.resume_handle) {
7422 0 : _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7423 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
7424 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
7425 0 : if (*r->in.resume_handle > 262144) {
7426 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
7427 : }
7428 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
7429 : }
7430 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_group_name));
7431 0 : if (_ptr_group_name) {
7432 0 : NDR_PULL_ALLOC(ndr, r->in.group_name);
7433 : } else {
7434 0 : r->in.group_name = NULL;
7435 : }
7436 0 : if (r->in.group_name) {
7437 0 : _mem_save_group_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
7438 0 : NDR_PULL_SET_MEM_CTX(ndr, r->in.group_name, 0);
7439 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.group_name));
7440 0 : NDR_CHECK(ndr_pull_array_length(ndr, &r->in.group_name));
7441 0 : NDR_CHECK(ndr_steal_array_size(ndr, (void*)&r->in.group_name, &size_group_name_1));
7442 0 : NDR_CHECK(ndr_steal_array_length(ndr, (void*)&r->in.group_name, &length_group_name_1));
7443 0 : if (length_group_name_1 > size_group_name_1) {
7444 0 : return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_group_name_1, length_group_name_1);
7445 : }
7446 0 : NDR_CHECK(ndr_check_string_terminator(ndr, length_group_name_1, sizeof(uint16_t)));
7447 0 : NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.group_name, length_group_name_1, sizeof(uint16_t), CH_UTF16));
7448 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_group_name_0, 0);
7449 : }
7450 0 : NDR_PULL_ALLOC_N(ndr, r->out.services, r->in.offered);
7451 0 : memset(r->out.services, 0, (r->in.offered) * sizeof(*r->out.services));
7452 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
7453 0 : NDR_ZERO_STRUCTP(r->out.needed);
7454 0 : NDR_PULL_ALLOC(ndr, r->out.service_returned);
7455 0 : NDR_ZERO_STRUCTP(r->out.service_returned);
7456 : }
7457 0 : if (flags & NDR_OUT) {
7458 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
7459 : if (r->in.scmanager == NULL) {
7460 : NDR_PULL_ALLOC(ndr, r->in.scmanager);
7461 : NDR_ZERO_STRUCTP(r->in.scmanager);
7462 : }
7463 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
7464 0 : NDR_CHECK(ndr_pull_array_size(ndr, &r->out.services));
7465 0 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->out.services, &size_services_1));
7466 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7467 0 : NDR_PULL_ALLOC_N(ndr, r->out.services, size_services_1);
7468 : }
7469 0 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.services, size_services_1));
7470 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7471 0 : NDR_PULL_ALLOC(ndr, r->out.needed);
7472 : }
7473 0 : _mem_save_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
7474 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.needed, LIBNDR_FLAG_REF_ALLOC);
7475 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.needed));
7476 0 : if (*r->out.needed > 262144) {
7477 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
7478 : }
7479 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_needed_0, LIBNDR_FLAG_REF_ALLOC);
7480 0 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
7481 0 : NDR_PULL_ALLOC(ndr, r->out.service_returned);
7482 : }
7483 0 : _mem_save_service_returned_0 = NDR_PULL_GET_MEM_CTX(ndr);
7484 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.service_returned, LIBNDR_FLAG_REF_ALLOC);
7485 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.service_returned));
7486 0 : if (*r->out.service_returned > 262144) {
7487 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
7488 : }
7489 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_returned_0, LIBNDR_FLAG_REF_ALLOC);
7490 0 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
7491 0 : if (_ptr_resume_handle) {
7492 0 : NDR_PULL_ALLOC(ndr, r->out.resume_handle);
7493 : } else {
7494 0 : r->out.resume_handle = NULL;
7495 : }
7496 0 : if (r->out.resume_handle) {
7497 0 : _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
7498 0 : NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
7499 0 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
7500 0 : if (*r->out.resume_handle > 262144) {
7501 0 : return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
7502 : }
7503 0 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
7504 : }
7505 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
7506 0 : if (r->out.services) {
7507 0 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->out.services, r->in.offered));
7508 : }
7509 : }
7510 0 : return NDR_ERR_SUCCESS;
7511 : }
7512 :
7513 0 : _PUBLIC_ void ndr_print_EnumServicesStatusExW(struct ndr_print *ndr, const char *name, int flags, const struct EnumServicesStatusExW *r)
7514 : {
7515 0 : ndr_print_struct(ndr, name, "EnumServicesStatusExW");
7516 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7517 0 : ndr->depth++;
7518 0 : if (flags & NDR_SET_VALUES) {
7519 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7520 : }
7521 0 : if (flags & NDR_IN) {
7522 0 : ndr_print_struct(ndr, "in", "EnumServicesStatusExW");
7523 0 : ndr->depth++;
7524 0 : ndr_print_ptr(ndr, "scmanager", r->in.scmanager);
7525 0 : ndr->depth++;
7526 0 : ndr_print_policy_handle(ndr, "scmanager", r->in.scmanager);
7527 0 : ndr->depth--;
7528 0 : ndr_print_uint32(ndr, "info_level", r->in.info_level);
7529 0 : ndr_print_uint32(ndr, "type", r->in.type);
7530 0 : ndr_print_svcctl_ServiceState(ndr, "state", r->in.state);
7531 0 : ndr_print_uint32(ndr, "offered", r->in.offered);
7532 0 : ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
7533 0 : ndr->depth++;
7534 0 : if (r->in.resume_handle) {
7535 0 : ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
7536 : }
7537 0 : ndr->depth--;
7538 0 : ndr_print_ptr(ndr, "group_name", r->in.group_name);
7539 0 : ndr->depth++;
7540 0 : if (r->in.group_name) {
7541 0 : ndr_print_string(ndr, "group_name", r->in.group_name);
7542 : }
7543 0 : ndr->depth--;
7544 0 : ndr->depth--;
7545 : }
7546 0 : if (flags & NDR_OUT) {
7547 0 : ndr_print_struct(ndr, "out", "EnumServicesStatusExW");
7548 0 : ndr->depth++;
7549 0 : ndr_print_ptr(ndr, "services", r->out.services);
7550 0 : ndr->depth++;
7551 0 : ndr_print_array_uint8(ndr, "services", r->out.services, r->in.offered);
7552 0 : ndr->depth--;
7553 0 : ndr_print_ptr(ndr, "needed", r->out.needed);
7554 0 : ndr->depth++;
7555 0 : ndr_print_uint32(ndr, "needed", *r->out.needed);
7556 0 : ndr->depth--;
7557 0 : ndr_print_ptr(ndr, "service_returned", r->out.service_returned);
7558 0 : ndr->depth++;
7559 0 : ndr_print_uint32(ndr, "service_returned", *r->out.service_returned);
7560 0 : ndr->depth--;
7561 0 : ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
7562 0 : ndr->depth++;
7563 0 : if (r->out.resume_handle) {
7564 0 : ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
7565 : }
7566 0 : ndr->depth--;
7567 0 : ndr_print_WERROR(ndr, "result", r->out.result);
7568 0 : ndr->depth--;
7569 : }
7570 0 : ndr->depth--;
7571 : }
7572 :
7573 0 : static enum ndr_err_code ndr_push_svcctl_SCSendTSMessage(struct ndr_push *ndr, int flags, const struct svcctl_SCSendTSMessage *r)
7574 : {
7575 0 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
7576 0 : if (flags & NDR_IN) {
7577 : }
7578 0 : if (flags & NDR_OUT) {
7579 0 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
7580 : }
7581 0 : return NDR_ERR_SUCCESS;
7582 : }
7583 :
7584 0 : static enum ndr_err_code ndr_pull_svcctl_SCSendTSMessage(struct ndr_pull *ndr, int flags, struct svcctl_SCSendTSMessage *r)
7585 : {
7586 0 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
7587 0 : if (flags & NDR_IN) {
7588 : }
7589 0 : if (flags & NDR_OUT) {
7590 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
7591 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
7592 0 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
7593 : }
7594 0 : return NDR_ERR_SUCCESS;
7595 : }
7596 :
7597 0 : _PUBLIC_ void ndr_print_svcctl_SCSendTSMessage(struct ndr_print *ndr, const char *name, int flags, const struct svcctl_SCSendTSMessage *r)
7598 : {
7599 0 : ndr_print_struct(ndr, name, "svcctl_SCSendTSMessage");
7600 0 : if (r == NULL) { ndr_print_null(ndr); return; }
7601 0 : ndr->depth++;
7602 0 : if (flags & NDR_SET_VALUES) {
7603 0 : ndr->flags |= LIBNDR_PRINT_SET_VALUES;
7604 : }
7605 0 : if (flags & NDR_IN) {
7606 0 : ndr_print_struct(ndr, "in", "svcctl_SCSendTSMessage");
7607 0 : ndr->depth++;
7608 0 : ndr->depth--;
7609 : }
7610 0 : if (flags & NDR_OUT) {
7611 0 : ndr_print_struct(ndr, "out", "svcctl_SCSendTSMessage");
7612 0 : ndr->depth++;
7613 0 : ndr_print_WERROR(ndr, "result", r->out.result);
7614 0 : ndr->depth--;
7615 : }
7616 0 : ndr->depth--;
7617 : }
7618 :
7619 : #ifndef SKIP_NDR_TABLE_svcctl
7620 : static const struct ndr_interface_public_struct svcctl_public_structs[] = {
7621 : {
7622 : .name = "SERVICE_STATUS_PROCESS",
7623 : .struct_size = sizeof(struct SERVICE_STATUS_PROCESS ),
7624 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_SERVICE_STATUS_PROCESS,
7625 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_SERVICE_STATUS_PROCESS,
7626 : .ndr_print = (ndr_print_function_t) ndr_print_flags_SERVICE_STATUS_PROCESS,
7627 : },
7628 : {
7629 : .name = "ENUM_SERVICE_STATUSW",
7630 : .struct_size = sizeof(struct ENUM_SERVICE_STATUSW ),
7631 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_ENUM_SERVICE_STATUSW,
7632 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_ENUM_SERVICE_STATUSW,
7633 : .ndr_print = (ndr_print_function_t) ndr_print_flags_ENUM_SERVICE_STATUSW,
7634 : },
7635 : {
7636 : .name = "ENUM_SERVICE_STATUSA",
7637 : .struct_size = sizeof(struct ENUM_SERVICE_STATUSA ),
7638 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_ENUM_SERVICE_STATUSA,
7639 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_ENUM_SERVICE_STATUSA,
7640 : .ndr_print = (ndr_print_function_t) ndr_print_flags_ENUM_SERVICE_STATUSA,
7641 : },
7642 : {
7643 : .name = "QUERY_SERVICE_CONFIG",
7644 : .struct_size = sizeof(struct QUERY_SERVICE_CONFIG ),
7645 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_QUERY_SERVICE_CONFIG,
7646 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_QUERY_SERVICE_CONFIG,
7647 : .ndr_print = (ndr_print_function_t) ndr_print_flags_QUERY_SERVICE_CONFIG,
7648 : },
7649 : {
7650 : .name = "SERVICE_DESCRIPTION",
7651 : .struct_size = sizeof(struct SERVICE_DESCRIPTION ),
7652 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_SERVICE_DESCRIPTION,
7653 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_SERVICE_DESCRIPTION,
7654 : .ndr_print = (ndr_print_function_t) ndr_print_flags_SERVICE_DESCRIPTION,
7655 : },
7656 : {
7657 : .name = "SERVICE_FAILURE_ACTIONS",
7658 : .struct_size = sizeof(struct SERVICE_FAILURE_ACTIONS ),
7659 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_SERVICE_FAILURE_ACTIONS,
7660 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_SERVICE_FAILURE_ACTIONS,
7661 : .ndr_print = (ndr_print_function_t) ndr_print_flags_SERVICE_FAILURE_ACTIONS,
7662 : },
7663 : { .name = NULL }
7664 : };
7665 :
7666 : static const struct ndr_interface_call svcctl_calls[] = {
7667 : {
7668 : "svcctl_CloseServiceHandle",
7669 : sizeof(struct svcctl_CloseServiceHandle),
7670 : (ndr_push_flags_fn_t) ndr_push_svcctl_CloseServiceHandle,
7671 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_CloseServiceHandle,
7672 : (ndr_print_function_t) ndr_print_svcctl_CloseServiceHandle,
7673 : { 0, NULL },
7674 : { 0, NULL },
7675 : },
7676 : {
7677 : "svcctl_ControlService",
7678 : sizeof(struct svcctl_ControlService),
7679 : (ndr_push_flags_fn_t) ndr_push_svcctl_ControlService,
7680 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_ControlService,
7681 : (ndr_print_function_t) ndr_print_svcctl_ControlService,
7682 : { 0, NULL },
7683 : { 0, NULL },
7684 : },
7685 : {
7686 : "svcctl_DeleteService",
7687 : sizeof(struct svcctl_DeleteService),
7688 : (ndr_push_flags_fn_t) ndr_push_svcctl_DeleteService,
7689 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_DeleteService,
7690 : (ndr_print_function_t) ndr_print_svcctl_DeleteService,
7691 : { 0, NULL },
7692 : { 0, NULL },
7693 : },
7694 : {
7695 : "svcctl_LockServiceDatabase",
7696 : sizeof(struct svcctl_LockServiceDatabase),
7697 : (ndr_push_flags_fn_t) ndr_push_svcctl_LockServiceDatabase,
7698 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_LockServiceDatabase,
7699 : (ndr_print_function_t) ndr_print_svcctl_LockServiceDatabase,
7700 : { 0, NULL },
7701 : { 0, NULL },
7702 : },
7703 : {
7704 : "svcctl_QueryServiceObjectSecurity",
7705 : sizeof(struct svcctl_QueryServiceObjectSecurity),
7706 : (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceObjectSecurity,
7707 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceObjectSecurity,
7708 : (ndr_print_function_t) ndr_print_svcctl_QueryServiceObjectSecurity,
7709 : { 0, NULL },
7710 : { 0, NULL },
7711 : },
7712 : {
7713 : "svcctl_SetServiceObjectSecurity",
7714 : sizeof(struct svcctl_SetServiceObjectSecurity),
7715 : (ndr_push_flags_fn_t) ndr_push_svcctl_SetServiceObjectSecurity,
7716 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_SetServiceObjectSecurity,
7717 : (ndr_print_function_t) ndr_print_svcctl_SetServiceObjectSecurity,
7718 : { 0, NULL },
7719 : { 0, NULL },
7720 : },
7721 : {
7722 : "svcctl_QueryServiceStatus",
7723 : sizeof(struct svcctl_QueryServiceStatus),
7724 : (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceStatus,
7725 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceStatus,
7726 : (ndr_print_function_t) ndr_print_svcctl_QueryServiceStatus,
7727 : { 0, NULL },
7728 : { 0, NULL },
7729 : },
7730 : {
7731 : "svcctl_SetServiceStatus",
7732 : sizeof(struct svcctl_SetServiceStatus),
7733 : (ndr_push_flags_fn_t) ndr_push_svcctl_SetServiceStatus,
7734 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_SetServiceStatus,
7735 : (ndr_print_function_t) ndr_print_svcctl_SetServiceStatus,
7736 : { 0, NULL },
7737 : { 0, NULL },
7738 : },
7739 : {
7740 : "svcctl_UnlockServiceDatabase",
7741 : sizeof(struct svcctl_UnlockServiceDatabase),
7742 : (ndr_push_flags_fn_t) ndr_push_svcctl_UnlockServiceDatabase,
7743 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_UnlockServiceDatabase,
7744 : (ndr_print_function_t) ndr_print_svcctl_UnlockServiceDatabase,
7745 : { 0, NULL },
7746 : { 0, NULL },
7747 : },
7748 : {
7749 : "svcctl_NotifyBootConfigStatus",
7750 : sizeof(struct svcctl_NotifyBootConfigStatus),
7751 : (ndr_push_flags_fn_t) ndr_push_svcctl_NotifyBootConfigStatus,
7752 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_NotifyBootConfigStatus,
7753 : (ndr_print_function_t) ndr_print_svcctl_NotifyBootConfigStatus,
7754 : { 0, NULL },
7755 : { 0, NULL },
7756 : },
7757 : {
7758 : "svcctl_SCSetServiceBitsW",
7759 : sizeof(struct svcctl_SCSetServiceBitsW),
7760 : (ndr_push_flags_fn_t) ndr_push_svcctl_SCSetServiceBitsW,
7761 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_SCSetServiceBitsW,
7762 : (ndr_print_function_t) ndr_print_svcctl_SCSetServiceBitsW,
7763 : { 0, NULL },
7764 : { 0, NULL },
7765 : },
7766 : {
7767 : "svcctl_ChangeServiceConfigW",
7768 : sizeof(struct svcctl_ChangeServiceConfigW),
7769 : (ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfigW,
7770 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfigW,
7771 : (ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfigW,
7772 : { 0, NULL },
7773 : { 0, NULL },
7774 : },
7775 : {
7776 : "svcctl_CreateServiceW",
7777 : sizeof(struct svcctl_CreateServiceW),
7778 : (ndr_push_flags_fn_t) ndr_push_svcctl_CreateServiceW,
7779 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_CreateServiceW,
7780 : (ndr_print_function_t) ndr_print_svcctl_CreateServiceW,
7781 : { 0, NULL },
7782 : { 0, NULL },
7783 : },
7784 : {
7785 : "svcctl_EnumDependentServicesW",
7786 : sizeof(struct svcctl_EnumDependentServicesW),
7787 : (ndr_push_flags_fn_t) ndr_push_svcctl_EnumDependentServicesW,
7788 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumDependentServicesW,
7789 : (ndr_print_function_t) ndr_print_svcctl_EnumDependentServicesW,
7790 : { 0, NULL },
7791 : { 0, NULL },
7792 : },
7793 : {
7794 : "svcctl_EnumServicesStatusW",
7795 : sizeof(struct svcctl_EnumServicesStatusW),
7796 : (ndr_push_flags_fn_t) ndr_push_svcctl_EnumServicesStatusW,
7797 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumServicesStatusW,
7798 : (ndr_print_function_t) ndr_print_svcctl_EnumServicesStatusW,
7799 : { 0, NULL },
7800 : { 0, NULL },
7801 : },
7802 : {
7803 : "svcctl_OpenSCManagerW",
7804 : sizeof(struct svcctl_OpenSCManagerW),
7805 : (ndr_push_flags_fn_t) ndr_push_svcctl_OpenSCManagerW,
7806 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenSCManagerW,
7807 : (ndr_print_function_t) ndr_print_svcctl_OpenSCManagerW,
7808 : { 0, NULL },
7809 : { 0, NULL },
7810 : },
7811 : {
7812 : "svcctl_OpenServiceW",
7813 : sizeof(struct svcctl_OpenServiceW),
7814 : (ndr_push_flags_fn_t) ndr_push_svcctl_OpenServiceW,
7815 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenServiceW,
7816 : (ndr_print_function_t) ndr_print_svcctl_OpenServiceW,
7817 : { 0, NULL },
7818 : { 0, NULL },
7819 : },
7820 : {
7821 : "svcctl_QueryServiceConfigW",
7822 : sizeof(struct svcctl_QueryServiceConfigW),
7823 : (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfigW,
7824 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfigW,
7825 : (ndr_print_function_t) ndr_print_svcctl_QueryServiceConfigW,
7826 : { 0, NULL },
7827 : { 0, NULL },
7828 : },
7829 : {
7830 : "svcctl_QueryServiceLockStatusW",
7831 : sizeof(struct svcctl_QueryServiceLockStatusW),
7832 : (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceLockStatusW,
7833 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceLockStatusW,
7834 : (ndr_print_function_t) ndr_print_svcctl_QueryServiceLockStatusW,
7835 : { 0, NULL },
7836 : { 0, NULL },
7837 : },
7838 : {
7839 : "svcctl_StartServiceW",
7840 : sizeof(struct svcctl_StartServiceW),
7841 : (ndr_push_flags_fn_t) ndr_push_svcctl_StartServiceW,
7842 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_StartServiceW,
7843 : (ndr_print_function_t) ndr_print_svcctl_StartServiceW,
7844 : { 0, NULL },
7845 : { 0, NULL },
7846 : },
7847 : {
7848 : "svcctl_GetServiceDisplayNameW",
7849 : sizeof(struct svcctl_GetServiceDisplayNameW),
7850 : (ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceDisplayNameW,
7851 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceDisplayNameW,
7852 : (ndr_print_function_t) ndr_print_svcctl_GetServiceDisplayNameW,
7853 : { 0, NULL },
7854 : { 0, NULL },
7855 : },
7856 : {
7857 : "svcctl_GetServiceKeyNameW",
7858 : sizeof(struct svcctl_GetServiceKeyNameW),
7859 : (ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceKeyNameW,
7860 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceKeyNameW,
7861 : (ndr_print_function_t) ndr_print_svcctl_GetServiceKeyNameW,
7862 : { 0, NULL },
7863 : { 0, NULL },
7864 : },
7865 : {
7866 : "svcctl_SCSetServiceBitsA",
7867 : sizeof(struct svcctl_SCSetServiceBitsA),
7868 : (ndr_push_flags_fn_t) ndr_push_svcctl_SCSetServiceBitsA,
7869 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_SCSetServiceBitsA,
7870 : (ndr_print_function_t) ndr_print_svcctl_SCSetServiceBitsA,
7871 : { 0, NULL },
7872 : { 0, NULL },
7873 : },
7874 : {
7875 : "svcctl_ChangeServiceConfigA",
7876 : sizeof(struct svcctl_ChangeServiceConfigA),
7877 : (ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfigA,
7878 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfigA,
7879 : (ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfigA,
7880 : { 0, NULL },
7881 : { 0, NULL },
7882 : },
7883 : {
7884 : "svcctl_CreateServiceA",
7885 : sizeof(struct svcctl_CreateServiceA),
7886 : (ndr_push_flags_fn_t) ndr_push_svcctl_CreateServiceA,
7887 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_CreateServiceA,
7888 : (ndr_print_function_t) ndr_print_svcctl_CreateServiceA,
7889 : { 0, NULL },
7890 : { 0, NULL },
7891 : },
7892 : {
7893 : "svcctl_EnumDependentServicesA",
7894 : sizeof(struct svcctl_EnumDependentServicesA),
7895 : (ndr_push_flags_fn_t) ndr_push_svcctl_EnumDependentServicesA,
7896 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumDependentServicesA,
7897 : (ndr_print_function_t) ndr_print_svcctl_EnumDependentServicesA,
7898 : { 0, NULL },
7899 : { 0, NULL },
7900 : },
7901 : {
7902 : "svcctl_EnumServicesStatusA",
7903 : sizeof(struct svcctl_EnumServicesStatusA),
7904 : (ndr_push_flags_fn_t) ndr_push_svcctl_EnumServicesStatusA,
7905 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumServicesStatusA,
7906 : (ndr_print_function_t) ndr_print_svcctl_EnumServicesStatusA,
7907 : { 0, NULL },
7908 : { 0, NULL },
7909 : },
7910 : {
7911 : "svcctl_OpenSCManagerA",
7912 : sizeof(struct svcctl_OpenSCManagerA),
7913 : (ndr_push_flags_fn_t) ndr_push_svcctl_OpenSCManagerA,
7914 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenSCManagerA,
7915 : (ndr_print_function_t) ndr_print_svcctl_OpenSCManagerA,
7916 : { 0, NULL },
7917 : { 0, NULL },
7918 : },
7919 : {
7920 : "svcctl_OpenServiceA",
7921 : sizeof(struct svcctl_OpenServiceA),
7922 : (ndr_push_flags_fn_t) ndr_push_svcctl_OpenServiceA,
7923 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_OpenServiceA,
7924 : (ndr_print_function_t) ndr_print_svcctl_OpenServiceA,
7925 : { 0, NULL },
7926 : { 0, NULL },
7927 : },
7928 : {
7929 : "svcctl_QueryServiceConfigA",
7930 : sizeof(struct svcctl_QueryServiceConfigA),
7931 : (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfigA,
7932 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfigA,
7933 : (ndr_print_function_t) ndr_print_svcctl_QueryServiceConfigA,
7934 : { 0, NULL },
7935 : { 0, NULL },
7936 : },
7937 : {
7938 : "svcctl_QueryServiceLockStatusA",
7939 : sizeof(struct svcctl_QueryServiceLockStatusA),
7940 : (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceLockStatusA,
7941 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceLockStatusA,
7942 : (ndr_print_function_t) ndr_print_svcctl_QueryServiceLockStatusA,
7943 : { 0, NULL },
7944 : { 0, NULL },
7945 : },
7946 : {
7947 : "svcctl_StartServiceA",
7948 : sizeof(struct svcctl_StartServiceA),
7949 : (ndr_push_flags_fn_t) ndr_push_svcctl_StartServiceA,
7950 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_StartServiceA,
7951 : (ndr_print_function_t) ndr_print_svcctl_StartServiceA,
7952 : { 0, NULL },
7953 : { 0, NULL },
7954 : },
7955 : {
7956 : "svcctl_GetServiceDisplayNameA",
7957 : sizeof(struct svcctl_GetServiceDisplayNameA),
7958 : (ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceDisplayNameA,
7959 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceDisplayNameA,
7960 : (ndr_print_function_t) ndr_print_svcctl_GetServiceDisplayNameA,
7961 : { 0, NULL },
7962 : { 0, NULL },
7963 : },
7964 : {
7965 : "svcctl_GetServiceKeyNameA",
7966 : sizeof(struct svcctl_GetServiceKeyNameA),
7967 : (ndr_push_flags_fn_t) ndr_push_svcctl_GetServiceKeyNameA,
7968 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetServiceKeyNameA,
7969 : (ndr_print_function_t) ndr_print_svcctl_GetServiceKeyNameA,
7970 : { 0, NULL },
7971 : { 0, NULL },
7972 : },
7973 : {
7974 : "svcctl_GetCurrentGroupeStateW",
7975 : sizeof(struct svcctl_GetCurrentGroupeStateW),
7976 : (ndr_push_flags_fn_t) ndr_push_svcctl_GetCurrentGroupeStateW,
7977 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_GetCurrentGroupeStateW,
7978 : (ndr_print_function_t) ndr_print_svcctl_GetCurrentGroupeStateW,
7979 : { 0, NULL },
7980 : { 0, NULL },
7981 : },
7982 : {
7983 : "svcctl_EnumServiceGroupW",
7984 : sizeof(struct svcctl_EnumServiceGroupW),
7985 : (ndr_push_flags_fn_t) ndr_push_svcctl_EnumServiceGroupW,
7986 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_EnumServiceGroupW,
7987 : (ndr_print_function_t) ndr_print_svcctl_EnumServiceGroupW,
7988 : { 0, NULL },
7989 : { 0, NULL },
7990 : },
7991 : {
7992 : "svcctl_ChangeServiceConfig2A",
7993 : sizeof(struct svcctl_ChangeServiceConfig2A),
7994 : (ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfig2A,
7995 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfig2A,
7996 : (ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfig2A,
7997 : { 0, NULL },
7998 : { 0, NULL },
7999 : },
8000 : {
8001 : "svcctl_ChangeServiceConfig2W",
8002 : sizeof(struct svcctl_ChangeServiceConfig2W),
8003 : (ndr_push_flags_fn_t) ndr_push_svcctl_ChangeServiceConfig2W,
8004 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_ChangeServiceConfig2W,
8005 : (ndr_print_function_t) ndr_print_svcctl_ChangeServiceConfig2W,
8006 : { 0, NULL },
8007 : { 0, NULL },
8008 : },
8009 : {
8010 : "svcctl_QueryServiceConfig2A",
8011 : sizeof(struct svcctl_QueryServiceConfig2A),
8012 : (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfig2A,
8013 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfig2A,
8014 : (ndr_print_function_t) ndr_print_svcctl_QueryServiceConfig2A,
8015 : { 0, NULL },
8016 : { 0, NULL },
8017 : },
8018 : {
8019 : "svcctl_QueryServiceConfig2W",
8020 : sizeof(struct svcctl_QueryServiceConfig2W),
8021 : (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceConfig2W,
8022 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceConfig2W,
8023 : (ndr_print_function_t) ndr_print_svcctl_QueryServiceConfig2W,
8024 : { 0, NULL },
8025 : { 0, NULL },
8026 : },
8027 : {
8028 : "svcctl_QueryServiceStatusEx",
8029 : sizeof(struct svcctl_QueryServiceStatusEx),
8030 : (ndr_push_flags_fn_t) ndr_push_svcctl_QueryServiceStatusEx,
8031 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_QueryServiceStatusEx,
8032 : (ndr_print_function_t) ndr_print_svcctl_QueryServiceStatusEx,
8033 : { 0, NULL },
8034 : { 0, NULL },
8035 : },
8036 : {
8037 : "EnumServicesStatusExA",
8038 : sizeof(struct EnumServicesStatusExA),
8039 : (ndr_push_flags_fn_t) ndr_push_EnumServicesStatusExA,
8040 : (ndr_pull_flags_fn_t) ndr_pull_EnumServicesStatusExA,
8041 : (ndr_print_function_t) ndr_print_EnumServicesStatusExA,
8042 : { 0, NULL },
8043 : { 0, NULL },
8044 : },
8045 : {
8046 : "EnumServicesStatusExW",
8047 : sizeof(struct EnumServicesStatusExW),
8048 : (ndr_push_flags_fn_t) ndr_push_EnumServicesStatusExW,
8049 : (ndr_pull_flags_fn_t) ndr_pull_EnumServicesStatusExW,
8050 : (ndr_print_function_t) ndr_print_EnumServicesStatusExW,
8051 : { 0, NULL },
8052 : { 0, NULL },
8053 : },
8054 : {
8055 : "svcctl_SCSendTSMessage",
8056 : sizeof(struct svcctl_SCSendTSMessage),
8057 : (ndr_push_flags_fn_t) ndr_push_svcctl_SCSendTSMessage,
8058 : (ndr_pull_flags_fn_t) ndr_pull_svcctl_SCSendTSMessage,
8059 : (ndr_print_function_t) ndr_print_svcctl_SCSendTSMessage,
8060 : { 0, NULL },
8061 : { 0, NULL },
8062 : },
8063 : { .name = NULL }
8064 : };
8065 :
8066 : static const char * const svcctl_endpoint_strings[] = {
8067 : "ncacn_np:[\\pipe\\svcctl]",
8068 : "ncalrpc:",
8069 : };
8070 :
8071 : static const struct ndr_interface_string_array svcctl_endpoints = {
8072 : .count = 2,
8073 : .names = svcctl_endpoint_strings
8074 : };
8075 :
8076 : static const char * const svcctl_authservice_strings[] = {
8077 : "host",
8078 : };
8079 :
8080 : static const struct ndr_interface_string_array svcctl_authservices = {
8081 : .count = 1,
8082 : .names = svcctl_authservice_strings
8083 : };
8084 :
8085 :
8086 : const struct ndr_interface_table ndr_table_svcctl = {
8087 : .name = "svcctl",
8088 : .syntax_id = {
8089 : {0x367abb81,0x9844,0x35f1,{0xad,0x32},{0x98,0xf0,0x38,0x00,0x10,0x03}},
8090 : NDR_SVCCTL_VERSION
8091 : },
8092 : .helpstring = NDR_SVCCTL_HELPSTRING,
8093 : .num_calls = 44,
8094 : .calls = svcctl_calls,
8095 : .num_public_structs = 6,
8096 : .public_structs = svcctl_public_structs,
8097 : .endpoints = &svcctl_endpoints,
8098 : .authservices = &svcctl_authservices
8099 : };
8100 :
8101 : #endif /* SKIP_NDR_TABLE_svcctl */
|