git add -f bin/default/librpc/gen_ndr/*.{c,h,ndr,pidl} bin/default/source*/librpc...
[metze/samba/wip.git] / bin / default / librpc / gen_ndr / s3compat_svcctl.c
1 #include "includes.h"
2 #include "ntdomain.h"
3 #include "lib/util/tevent_ntstatus.h"
4 #include "librpc/rpc/dcerpc_connection.h"
5 #include "bin/default/librpc/gen_ndr/s3compat_svcctl.h"
6
7 struct _s3_compat_svcctl_CloseServiceHandle_state {
8         struct tevent_context *ev;
9         struct dcerpc_call_handle *call;
10         struct svcctl_CloseServiceHandle *r;
11 };
12
13 static struct tevent_req *_s3_compat_svcctl_CloseServiceHandle_send(TALLOC_CTX *mem_ctx,
14                                                                     struct tevent_context *ev,
15                                                                     struct dcerpc_call_handle *call,
16                                                                     struct svcctl_CloseServiceHandle *r)
17 {
18         struct tevent_req *req;
19         struct _s3_compat_svcctl_CloseServiceHandle_state *state;
20         struct pipes_struct *p;
21
22         req = tevent_req_create(mem_ctx, &state,
23                                 struct _s3_compat_svcctl_CloseServiceHandle_state);
24         if (req == NULL) {
25                 return NULL;
26         }
27         state->ev = ev;
28         state->call = call;
29         state->r = r;
30
31         p = dcerpc_call_handle_get_pipes_struct(call);
32         if (p == NULL) {
33                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
34                 return tevent_req_post(req, ev);
35         }
36
37         ZERO_STRUCT(r->out);
38         r->out.handle = r->in.handle;
39         r->out.result = _svcctl_CloseServiceHandle(p, r);
40
41         if (p->fault_state) {
42                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
43                 tevent_req_nterror(req, status);
44                 return tevent_req_post(req, ev);
45         }
46
47         tevent_req_done(req);
48         return tevent_req_post(req, ev);
49 }
50
51 static NTSTATUS _s3_compat_svcctl_CloseServiceHandle_recv(struct tevent_req *req)
52 {
53         return tevent_req_simple_recv_ntstatus(req);
54 }
55
56 struct _s3_compat_svcctl_ControlService_state {
57         struct tevent_context *ev;
58         struct dcerpc_call_handle *call;
59         struct svcctl_ControlService *r;
60 };
61
62 static struct tevent_req *_s3_compat_svcctl_ControlService_send(TALLOC_CTX *mem_ctx,
63                                                                 struct tevent_context *ev,
64                                                                 struct dcerpc_call_handle *call,
65                                                                 struct svcctl_ControlService *r)
66 {
67         struct tevent_req *req;
68         struct _s3_compat_svcctl_ControlService_state *state;
69         struct pipes_struct *p;
70
71         req = tevent_req_create(mem_ctx, &state,
72                                 struct _s3_compat_svcctl_ControlService_state);
73         if (req == NULL) {
74                 return NULL;
75         }
76         state->ev = ev;
77         state->call = call;
78         state->r = r;
79
80         p = dcerpc_call_handle_get_pipes_struct(call);
81         if (p == NULL) {
82                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
83                 return tevent_req_post(req, ev);
84         }
85
86         ZERO_STRUCT(r->out);
87         r->out.service_status = talloc_zero(r, struct SERVICE_STATUS);
88         if (tevent_req_nomem(r->out.service_status, req)) {
89                 return tevent_req_post(req, ev);
90         }
91
92         r->out.result = _svcctl_ControlService(p, r);
93
94         if (p->fault_state) {
95                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
96                 tevent_req_nterror(req, status);
97                 return tevent_req_post(req, ev);
98         }
99
100         tevent_req_done(req);
101         return tevent_req_post(req, ev);
102 }
103
104 static NTSTATUS _s3_compat_svcctl_ControlService_recv(struct tevent_req *req)
105 {
106         return tevent_req_simple_recv_ntstatus(req);
107 }
108
109 struct _s3_compat_svcctl_DeleteService_state {
110         struct tevent_context *ev;
111         struct dcerpc_call_handle *call;
112         struct svcctl_DeleteService *r;
113 };
114
115 static struct tevent_req *_s3_compat_svcctl_DeleteService_send(TALLOC_CTX *mem_ctx,
116                                                                struct tevent_context *ev,
117                                                                struct dcerpc_call_handle *call,
118                                                                struct svcctl_DeleteService *r)
119 {
120         struct tevent_req *req;
121         struct _s3_compat_svcctl_DeleteService_state *state;
122         struct pipes_struct *p;
123
124         req = tevent_req_create(mem_ctx, &state,
125                                 struct _s3_compat_svcctl_DeleteService_state);
126         if (req == NULL) {
127                 return NULL;
128         }
129         state->ev = ev;
130         state->call = call;
131         state->r = r;
132
133         p = dcerpc_call_handle_get_pipes_struct(call);
134         if (p == NULL) {
135                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
136                 return tevent_req_post(req, ev);
137         }
138
139         r->out.result = _svcctl_DeleteService(p, r);
140
141         if (p->fault_state) {
142                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
143                 tevent_req_nterror(req, status);
144                 return tevent_req_post(req, ev);
145         }
146
147         tevent_req_done(req);
148         return tevent_req_post(req, ev);
149 }
150
151 static NTSTATUS _s3_compat_svcctl_DeleteService_recv(struct tevent_req *req)
152 {
153         return tevent_req_simple_recv_ntstatus(req);
154 }
155
156 struct _s3_compat_svcctl_LockServiceDatabase_state {
157         struct tevent_context *ev;
158         struct dcerpc_call_handle *call;
159         struct svcctl_LockServiceDatabase *r;
160 };
161
162 static struct tevent_req *_s3_compat_svcctl_LockServiceDatabase_send(TALLOC_CTX *mem_ctx,
163                                                                      struct tevent_context *ev,
164                                                                      struct dcerpc_call_handle *call,
165                                                                      struct svcctl_LockServiceDatabase *r)
166 {
167         struct tevent_req *req;
168         struct _s3_compat_svcctl_LockServiceDatabase_state *state;
169         struct pipes_struct *p;
170
171         req = tevent_req_create(mem_ctx, &state,
172                                 struct _s3_compat_svcctl_LockServiceDatabase_state);
173         if (req == NULL) {
174                 return NULL;
175         }
176         state->ev = ev;
177         state->call = call;
178         state->r = r;
179
180         p = dcerpc_call_handle_get_pipes_struct(call);
181         if (p == NULL) {
182                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
183                 return tevent_req_post(req, ev);
184         }
185
186         ZERO_STRUCT(r->out);
187         r->out.lock = talloc_zero(r, struct policy_handle);
188         if (tevent_req_nomem(r->out.lock, req)) {
189                 return tevent_req_post(req, ev);
190         }
191
192         r->out.result = _svcctl_LockServiceDatabase(p, r);
193
194         if (p->fault_state) {
195                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
196                 tevent_req_nterror(req, status);
197                 return tevent_req_post(req, ev);
198         }
199
200         tevent_req_done(req);
201         return tevent_req_post(req, ev);
202 }
203
204 static NTSTATUS _s3_compat_svcctl_LockServiceDatabase_recv(struct tevent_req *req)
205 {
206         return tevent_req_simple_recv_ntstatus(req);
207 }
208
209 struct _s3_compat_svcctl_QueryServiceObjectSecurity_state {
210         struct tevent_context *ev;
211         struct dcerpc_call_handle *call;
212         struct svcctl_QueryServiceObjectSecurity *r;
213 };
214
215 static struct tevent_req *_s3_compat_svcctl_QueryServiceObjectSecurity_send(TALLOC_CTX *mem_ctx,
216                                                                             struct tevent_context *ev,
217                                                                             struct dcerpc_call_handle *call,
218                                                                             struct svcctl_QueryServiceObjectSecurity *r)
219 {
220         struct tevent_req *req;
221         struct _s3_compat_svcctl_QueryServiceObjectSecurity_state *state;
222         struct pipes_struct *p;
223
224         req = tevent_req_create(mem_ctx, &state,
225                                 struct _s3_compat_svcctl_QueryServiceObjectSecurity_state);
226         if (req == NULL) {
227                 return NULL;
228         }
229         state->ev = ev;
230         state->call = call;
231         state->r = r;
232
233         p = dcerpc_call_handle_get_pipes_struct(call);
234         if (p == NULL) {
235                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
236                 return tevent_req_post(req, ev);
237         }
238
239         ZERO_STRUCT(r->out);
240         r->out.buffer = talloc_zero_array(r, uint8_t, r->in.offered);
241         if (tevent_req_nomem(r->out.buffer, req)) {
242                 return tevent_req_post(req, ev);
243         }
244
245         r->out.needed = talloc_zero(r, uint32_t);
246         if (tevent_req_nomem(r->out.needed, req)) {
247                 return tevent_req_post(req, ev);
248         }
249
250         r->out.result = _svcctl_QueryServiceObjectSecurity(p, r);
251
252         if (p->fault_state) {
253                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
254                 tevent_req_nterror(req, status);
255                 return tevent_req_post(req, ev);
256         }
257
258         tevent_req_done(req);
259         return tevent_req_post(req, ev);
260 }
261
262 static NTSTATUS _s3_compat_svcctl_QueryServiceObjectSecurity_recv(struct tevent_req *req)
263 {
264         return tevent_req_simple_recv_ntstatus(req);
265 }
266
267 struct _s3_compat_svcctl_SetServiceObjectSecurity_state {
268         struct tevent_context *ev;
269         struct dcerpc_call_handle *call;
270         struct svcctl_SetServiceObjectSecurity *r;
271 };
272
273 static struct tevent_req *_s3_compat_svcctl_SetServiceObjectSecurity_send(TALLOC_CTX *mem_ctx,
274                                                                           struct tevent_context *ev,
275                                                                           struct dcerpc_call_handle *call,
276                                                                           struct svcctl_SetServiceObjectSecurity *r)
277 {
278         struct tevent_req *req;
279         struct _s3_compat_svcctl_SetServiceObjectSecurity_state *state;
280         struct pipes_struct *p;
281
282         req = tevent_req_create(mem_ctx, &state,
283                                 struct _s3_compat_svcctl_SetServiceObjectSecurity_state);
284         if (req == NULL) {
285                 return NULL;
286         }
287         state->ev = ev;
288         state->call = call;
289         state->r = r;
290
291         p = dcerpc_call_handle_get_pipes_struct(call);
292         if (p == NULL) {
293                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
294                 return tevent_req_post(req, ev);
295         }
296
297         r->out.result = _svcctl_SetServiceObjectSecurity(p, r);
298
299         if (p->fault_state) {
300                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
301                 tevent_req_nterror(req, status);
302                 return tevent_req_post(req, ev);
303         }
304
305         tevent_req_done(req);
306         return tevent_req_post(req, ev);
307 }
308
309 static NTSTATUS _s3_compat_svcctl_SetServiceObjectSecurity_recv(struct tevent_req *req)
310 {
311         return tevent_req_simple_recv_ntstatus(req);
312 }
313
314 struct _s3_compat_svcctl_QueryServiceStatus_state {
315         struct tevent_context *ev;
316         struct dcerpc_call_handle *call;
317         struct svcctl_QueryServiceStatus *r;
318 };
319
320 static struct tevent_req *_s3_compat_svcctl_QueryServiceStatus_send(TALLOC_CTX *mem_ctx,
321                                                                     struct tevent_context *ev,
322                                                                     struct dcerpc_call_handle *call,
323                                                                     struct svcctl_QueryServiceStatus *r)
324 {
325         struct tevent_req *req;
326         struct _s3_compat_svcctl_QueryServiceStatus_state *state;
327         struct pipes_struct *p;
328
329         req = tevent_req_create(mem_ctx, &state,
330                                 struct _s3_compat_svcctl_QueryServiceStatus_state);
331         if (req == NULL) {
332                 return NULL;
333         }
334         state->ev = ev;
335         state->call = call;
336         state->r = r;
337
338         p = dcerpc_call_handle_get_pipes_struct(call);
339         if (p == NULL) {
340                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
341                 return tevent_req_post(req, ev);
342         }
343
344         ZERO_STRUCT(r->out);
345         r->out.service_status = talloc_zero(r, struct SERVICE_STATUS);
346         if (tevent_req_nomem(r->out.service_status, req)) {
347                 return tevent_req_post(req, ev);
348         }
349
350         r->out.result = _svcctl_QueryServiceStatus(p, r);
351
352         if (p->fault_state) {
353                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
354                 tevent_req_nterror(req, status);
355                 return tevent_req_post(req, ev);
356         }
357
358         tevent_req_done(req);
359         return tevent_req_post(req, ev);
360 }
361
362 static NTSTATUS _s3_compat_svcctl_QueryServiceStatus_recv(struct tevent_req *req)
363 {
364         return tevent_req_simple_recv_ntstatus(req);
365 }
366
367 struct _s3_compat_svcctl_SetServiceStatus_state {
368         struct tevent_context *ev;
369         struct dcerpc_call_handle *call;
370         struct svcctl_SetServiceStatus *r;
371 };
372
373 static struct tevent_req *_s3_compat_svcctl_SetServiceStatus_send(TALLOC_CTX *mem_ctx,
374                                                                   struct tevent_context *ev,
375                                                                   struct dcerpc_call_handle *call,
376                                                                   struct svcctl_SetServiceStatus *r)
377 {
378         struct tevent_req *req;
379         struct _s3_compat_svcctl_SetServiceStatus_state *state;
380         struct pipes_struct *p;
381
382         req = tevent_req_create(mem_ctx, &state,
383                                 struct _s3_compat_svcctl_SetServiceStatus_state);
384         if (req == NULL) {
385                 return NULL;
386         }
387         state->ev = ev;
388         state->call = call;
389         state->r = r;
390
391         p = dcerpc_call_handle_get_pipes_struct(call);
392         if (p == NULL) {
393                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
394                 return tevent_req_post(req, ev);
395         }
396
397         r->out.result = _svcctl_SetServiceStatus(p, r);
398
399         if (p->fault_state) {
400                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
401                 tevent_req_nterror(req, status);
402                 return tevent_req_post(req, ev);
403         }
404
405         tevent_req_done(req);
406         return tevent_req_post(req, ev);
407 }
408
409 static NTSTATUS _s3_compat_svcctl_SetServiceStatus_recv(struct tevent_req *req)
410 {
411         return tevent_req_simple_recv_ntstatus(req);
412 }
413
414 struct _s3_compat_svcctl_UnlockServiceDatabase_state {
415         struct tevent_context *ev;
416         struct dcerpc_call_handle *call;
417         struct svcctl_UnlockServiceDatabase *r;
418 };
419
420 static struct tevent_req *_s3_compat_svcctl_UnlockServiceDatabase_send(TALLOC_CTX *mem_ctx,
421                                                                        struct tevent_context *ev,
422                                                                        struct dcerpc_call_handle *call,
423                                                                        struct svcctl_UnlockServiceDatabase *r)
424 {
425         struct tevent_req *req;
426         struct _s3_compat_svcctl_UnlockServiceDatabase_state *state;
427         struct pipes_struct *p;
428
429         req = tevent_req_create(mem_ctx, &state,
430                                 struct _s3_compat_svcctl_UnlockServiceDatabase_state);
431         if (req == NULL) {
432                 return NULL;
433         }
434         state->ev = ev;
435         state->call = call;
436         state->r = r;
437
438         p = dcerpc_call_handle_get_pipes_struct(call);
439         if (p == NULL) {
440                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
441                 return tevent_req_post(req, ev);
442         }
443
444         ZERO_STRUCT(r->out);
445         r->out.lock = r->in.lock;
446         r->out.result = _svcctl_UnlockServiceDatabase(p, r);
447
448         if (p->fault_state) {
449                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
450                 tevent_req_nterror(req, status);
451                 return tevent_req_post(req, ev);
452         }
453
454         tevent_req_done(req);
455         return tevent_req_post(req, ev);
456 }
457
458 static NTSTATUS _s3_compat_svcctl_UnlockServiceDatabase_recv(struct tevent_req *req)
459 {
460         return tevent_req_simple_recv_ntstatus(req);
461 }
462
463 struct _s3_compat_svcctl_NotifyBootConfigStatus_state {
464         struct tevent_context *ev;
465         struct dcerpc_call_handle *call;
466         struct svcctl_NotifyBootConfigStatus *r;
467 };
468
469 static struct tevent_req *_s3_compat_svcctl_NotifyBootConfigStatus_send(TALLOC_CTX *mem_ctx,
470                                                                         struct tevent_context *ev,
471                                                                         struct dcerpc_call_handle *call,
472                                                                         struct svcctl_NotifyBootConfigStatus *r)
473 {
474         struct tevent_req *req;
475         struct _s3_compat_svcctl_NotifyBootConfigStatus_state *state;
476         struct pipes_struct *p;
477
478         req = tevent_req_create(mem_ctx, &state,
479                                 struct _s3_compat_svcctl_NotifyBootConfigStatus_state);
480         if (req == NULL) {
481                 return NULL;
482         }
483         state->ev = ev;
484         state->call = call;
485         state->r = r;
486
487         p = dcerpc_call_handle_get_pipes_struct(call);
488         if (p == NULL) {
489                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
490                 return tevent_req_post(req, ev);
491         }
492
493         r->out.result = _svcctl_NotifyBootConfigStatus(p, r);
494
495         if (p->fault_state) {
496                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
497                 tevent_req_nterror(req, status);
498                 return tevent_req_post(req, ev);
499         }
500
501         tevent_req_done(req);
502         return tevent_req_post(req, ev);
503 }
504
505 static NTSTATUS _s3_compat_svcctl_NotifyBootConfigStatus_recv(struct tevent_req *req)
506 {
507         return tevent_req_simple_recv_ntstatus(req);
508 }
509
510 struct _s3_compat_svcctl_SCSetServiceBitsW_state {
511         struct tevent_context *ev;
512         struct dcerpc_call_handle *call;
513         struct svcctl_SCSetServiceBitsW *r;
514 };
515
516 static struct tevent_req *_s3_compat_svcctl_SCSetServiceBitsW_send(TALLOC_CTX *mem_ctx,
517                                                                    struct tevent_context *ev,
518                                                                    struct dcerpc_call_handle *call,
519                                                                    struct svcctl_SCSetServiceBitsW *r)
520 {
521         struct tevent_req *req;
522         struct _s3_compat_svcctl_SCSetServiceBitsW_state *state;
523         struct pipes_struct *p;
524
525         req = tevent_req_create(mem_ctx, &state,
526                                 struct _s3_compat_svcctl_SCSetServiceBitsW_state);
527         if (req == NULL) {
528                 return NULL;
529         }
530         state->ev = ev;
531         state->call = call;
532         state->r = r;
533
534         p = dcerpc_call_handle_get_pipes_struct(call);
535         if (p == NULL) {
536                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
537                 return tevent_req_post(req, ev);
538         }
539
540         r->out.result = _svcctl_SCSetServiceBitsW(p, r);
541
542         if (p->fault_state) {
543                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
544                 tevent_req_nterror(req, status);
545                 return tevent_req_post(req, ev);
546         }
547
548         tevent_req_done(req);
549         return tevent_req_post(req, ev);
550 }
551
552 static NTSTATUS _s3_compat_svcctl_SCSetServiceBitsW_recv(struct tevent_req *req)
553 {
554         return tevent_req_simple_recv_ntstatus(req);
555 }
556
557 struct _s3_compat_svcctl_ChangeServiceConfigW_state {
558         struct tevent_context *ev;
559         struct dcerpc_call_handle *call;
560         struct svcctl_ChangeServiceConfigW *r;
561 };
562
563 static struct tevent_req *_s3_compat_svcctl_ChangeServiceConfigW_send(TALLOC_CTX *mem_ctx,
564                                                                       struct tevent_context *ev,
565                                                                       struct dcerpc_call_handle *call,
566                                                                       struct svcctl_ChangeServiceConfigW *r)
567 {
568         struct tevent_req *req;
569         struct _s3_compat_svcctl_ChangeServiceConfigW_state *state;
570         struct pipes_struct *p;
571
572         req = tevent_req_create(mem_ctx, &state,
573                                 struct _s3_compat_svcctl_ChangeServiceConfigW_state);
574         if (req == NULL) {
575                 return NULL;
576         }
577         state->ev = ev;
578         state->call = call;
579         state->r = r;
580
581         p = dcerpc_call_handle_get_pipes_struct(call);
582         if (p == NULL) {
583                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
584                 return tevent_req_post(req, ev);
585         }
586
587         ZERO_STRUCT(r->out);
588         r->out.tag_id = talloc_zero(r, uint32_t);
589         if (tevent_req_nomem(r->out.tag_id, req)) {
590                 return tevent_req_post(req, ev);
591         }
592
593         r->out.result = _svcctl_ChangeServiceConfigW(p, r);
594
595         if (p->fault_state) {
596                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
597                 tevent_req_nterror(req, status);
598                 return tevent_req_post(req, ev);
599         }
600
601         tevent_req_done(req);
602         return tevent_req_post(req, ev);
603 }
604
605 static NTSTATUS _s3_compat_svcctl_ChangeServiceConfigW_recv(struct tevent_req *req)
606 {
607         return tevent_req_simple_recv_ntstatus(req);
608 }
609
610 struct _s3_compat_svcctl_CreateServiceW_state {
611         struct tevent_context *ev;
612         struct dcerpc_call_handle *call;
613         struct svcctl_CreateServiceW *r;
614 };
615
616 static struct tevent_req *_s3_compat_svcctl_CreateServiceW_send(TALLOC_CTX *mem_ctx,
617                                                                 struct tevent_context *ev,
618                                                                 struct dcerpc_call_handle *call,
619                                                                 struct svcctl_CreateServiceW *r)
620 {
621         struct tevent_req *req;
622         struct _s3_compat_svcctl_CreateServiceW_state *state;
623         struct pipes_struct *p;
624
625         req = tevent_req_create(mem_ctx, &state,
626                                 struct _s3_compat_svcctl_CreateServiceW_state);
627         if (req == NULL) {
628                 return NULL;
629         }
630         state->ev = ev;
631         state->call = call;
632         state->r = r;
633
634         p = dcerpc_call_handle_get_pipes_struct(call);
635         if (p == NULL) {
636                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
637                 return tevent_req_post(req, ev);
638         }
639
640         ZERO_STRUCT(r->out);
641         r->out.TagId = r->in.TagId;
642         r->out.handle = talloc_zero(r, struct policy_handle);
643         if (tevent_req_nomem(r->out.handle, req)) {
644                 return tevent_req_post(req, ev);
645         }
646
647         r->out.result = _svcctl_CreateServiceW(p, r);
648
649         if (p->fault_state) {
650                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
651                 tevent_req_nterror(req, status);
652                 return tevent_req_post(req, ev);
653         }
654
655         tevent_req_done(req);
656         return tevent_req_post(req, ev);
657 }
658
659 static NTSTATUS _s3_compat_svcctl_CreateServiceW_recv(struct tevent_req *req)
660 {
661         return tevent_req_simple_recv_ntstatus(req);
662 }
663
664 struct _s3_compat_svcctl_EnumDependentServicesW_state {
665         struct tevent_context *ev;
666         struct dcerpc_call_handle *call;
667         struct svcctl_EnumDependentServicesW *r;
668 };
669
670 static struct tevent_req *_s3_compat_svcctl_EnumDependentServicesW_send(TALLOC_CTX *mem_ctx,
671                                                                         struct tevent_context *ev,
672                                                                         struct dcerpc_call_handle *call,
673                                                                         struct svcctl_EnumDependentServicesW *r)
674 {
675         struct tevent_req *req;
676         struct _s3_compat_svcctl_EnumDependentServicesW_state *state;
677         struct pipes_struct *p;
678
679         req = tevent_req_create(mem_ctx, &state,
680                                 struct _s3_compat_svcctl_EnumDependentServicesW_state);
681         if (req == NULL) {
682                 return NULL;
683         }
684         state->ev = ev;
685         state->call = call;
686         state->r = r;
687
688         p = dcerpc_call_handle_get_pipes_struct(call);
689         if (p == NULL) {
690                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
691                 return tevent_req_post(req, ev);
692         }
693
694         ZERO_STRUCT(r->out);
695         r->out.service_status = talloc_zero_array(r, uint8_t, r->in.offered);
696         if (tevent_req_nomem(r->out.service_status, req)) {
697                 return tevent_req_post(req, ev);
698         }
699
700         r->out.needed = talloc_zero(r, uint32_t);
701         if (tevent_req_nomem(r->out.needed, req)) {
702                 return tevent_req_post(req, ev);
703         }
704
705         r->out.services_returned = talloc_zero(r, uint32_t);
706         if (tevent_req_nomem(r->out.services_returned, req)) {
707                 return tevent_req_post(req, ev);
708         }
709
710         r->out.result = _svcctl_EnumDependentServicesW(p, r);
711
712         if (p->fault_state) {
713                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
714                 tevent_req_nterror(req, status);
715                 return tevent_req_post(req, ev);
716         }
717
718         tevent_req_done(req);
719         return tevent_req_post(req, ev);
720 }
721
722 static NTSTATUS _s3_compat_svcctl_EnumDependentServicesW_recv(struct tevent_req *req)
723 {
724         return tevent_req_simple_recv_ntstatus(req);
725 }
726
727 struct _s3_compat_svcctl_EnumServicesStatusW_state {
728         struct tevent_context *ev;
729         struct dcerpc_call_handle *call;
730         struct svcctl_EnumServicesStatusW *r;
731 };
732
733 static struct tevent_req *_s3_compat_svcctl_EnumServicesStatusW_send(TALLOC_CTX *mem_ctx,
734                                                                      struct tevent_context *ev,
735                                                                      struct dcerpc_call_handle *call,
736                                                                      struct svcctl_EnumServicesStatusW *r)
737 {
738         struct tevent_req *req;
739         struct _s3_compat_svcctl_EnumServicesStatusW_state *state;
740         struct pipes_struct *p;
741
742         req = tevent_req_create(mem_ctx, &state,
743                                 struct _s3_compat_svcctl_EnumServicesStatusW_state);
744         if (req == NULL) {
745                 return NULL;
746         }
747         state->ev = ev;
748         state->call = call;
749         state->r = r;
750
751         p = dcerpc_call_handle_get_pipes_struct(call);
752         if (p == NULL) {
753                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
754                 return tevent_req_post(req, ev);
755         }
756
757         ZERO_STRUCT(r->out);
758         r->out.resume_handle = r->in.resume_handle;
759         r->out.service = talloc_zero_array(r, uint8_t, r->in.offered);
760         if (tevent_req_nomem(r->out.service, req)) {
761                 return tevent_req_post(req, ev);
762         }
763
764         r->out.needed = talloc_zero(r, uint32_t);
765         if (tevent_req_nomem(r->out.needed, req)) {
766                 return tevent_req_post(req, ev);
767         }
768
769         r->out.services_returned = talloc_zero(r, uint32_t);
770         if (tevent_req_nomem(r->out.services_returned, req)) {
771                 return tevent_req_post(req, ev);
772         }
773
774         r->out.result = _svcctl_EnumServicesStatusW(p, r);
775
776         if (p->fault_state) {
777                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
778                 tevent_req_nterror(req, status);
779                 return tevent_req_post(req, ev);
780         }
781
782         tevent_req_done(req);
783         return tevent_req_post(req, ev);
784 }
785
786 static NTSTATUS _s3_compat_svcctl_EnumServicesStatusW_recv(struct tevent_req *req)
787 {
788         return tevent_req_simple_recv_ntstatus(req);
789 }
790
791 struct _s3_compat_svcctl_OpenSCManagerW_state {
792         struct tevent_context *ev;
793         struct dcerpc_call_handle *call;
794         struct svcctl_OpenSCManagerW *r;
795 };
796
797 static struct tevent_req *_s3_compat_svcctl_OpenSCManagerW_send(TALLOC_CTX *mem_ctx,
798                                                                 struct tevent_context *ev,
799                                                                 struct dcerpc_call_handle *call,
800                                                                 struct svcctl_OpenSCManagerW *r)
801 {
802         struct tevent_req *req;
803         struct _s3_compat_svcctl_OpenSCManagerW_state *state;
804         struct pipes_struct *p;
805
806         req = tevent_req_create(mem_ctx, &state,
807                                 struct _s3_compat_svcctl_OpenSCManagerW_state);
808         if (req == NULL) {
809                 return NULL;
810         }
811         state->ev = ev;
812         state->call = call;
813         state->r = r;
814
815         p = dcerpc_call_handle_get_pipes_struct(call);
816         if (p == NULL) {
817                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
818                 return tevent_req_post(req, ev);
819         }
820
821         ZERO_STRUCT(r->out);
822         r->out.handle = talloc_zero(r, struct policy_handle);
823         if (tevent_req_nomem(r->out.handle, req)) {
824                 return tevent_req_post(req, ev);
825         }
826
827         r->out.result = _svcctl_OpenSCManagerW(p, r);
828
829         if (p->fault_state) {
830                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
831                 tevent_req_nterror(req, status);
832                 return tevent_req_post(req, ev);
833         }
834
835         tevent_req_done(req);
836         return tevent_req_post(req, ev);
837 }
838
839 static NTSTATUS _s3_compat_svcctl_OpenSCManagerW_recv(struct tevent_req *req)
840 {
841         return tevent_req_simple_recv_ntstatus(req);
842 }
843
844 struct _s3_compat_svcctl_OpenServiceW_state {
845         struct tevent_context *ev;
846         struct dcerpc_call_handle *call;
847         struct svcctl_OpenServiceW *r;
848 };
849
850 static struct tevent_req *_s3_compat_svcctl_OpenServiceW_send(TALLOC_CTX *mem_ctx,
851                                                               struct tevent_context *ev,
852                                                               struct dcerpc_call_handle *call,
853                                                               struct svcctl_OpenServiceW *r)
854 {
855         struct tevent_req *req;
856         struct _s3_compat_svcctl_OpenServiceW_state *state;
857         struct pipes_struct *p;
858
859         req = tevent_req_create(mem_ctx, &state,
860                                 struct _s3_compat_svcctl_OpenServiceW_state);
861         if (req == NULL) {
862                 return NULL;
863         }
864         state->ev = ev;
865         state->call = call;
866         state->r = r;
867
868         p = dcerpc_call_handle_get_pipes_struct(call);
869         if (p == NULL) {
870                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
871                 return tevent_req_post(req, ev);
872         }
873
874         ZERO_STRUCT(r->out);
875         r->out.handle = talloc_zero(r, struct policy_handle);
876         if (tevent_req_nomem(r->out.handle, req)) {
877                 return tevent_req_post(req, ev);
878         }
879
880         r->out.result = _svcctl_OpenServiceW(p, r);
881
882         if (p->fault_state) {
883                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
884                 tevent_req_nterror(req, status);
885                 return tevent_req_post(req, ev);
886         }
887
888         tevent_req_done(req);
889         return tevent_req_post(req, ev);
890 }
891
892 static NTSTATUS _s3_compat_svcctl_OpenServiceW_recv(struct tevent_req *req)
893 {
894         return tevent_req_simple_recv_ntstatus(req);
895 }
896
897 struct _s3_compat_svcctl_QueryServiceConfigW_state {
898         struct tevent_context *ev;
899         struct dcerpc_call_handle *call;
900         struct svcctl_QueryServiceConfigW *r;
901 };
902
903 static struct tevent_req *_s3_compat_svcctl_QueryServiceConfigW_send(TALLOC_CTX *mem_ctx,
904                                                                      struct tevent_context *ev,
905                                                                      struct dcerpc_call_handle *call,
906                                                                      struct svcctl_QueryServiceConfigW *r)
907 {
908         struct tevent_req *req;
909         struct _s3_compat_svcctl_QueryServiceConfigW_state *state;
910         struct pipes_struct *p;
911
912         req = tevent_req_create(mem_ctx, &state,
913                                 struct _s3_compat_svcctl_QueryServiceConfigW_state);
914         if (req == NULL) {
915                 return NULL;
916         }
917         state->ev = ev;
918         state->call = call;
919         state->r = r;
920
921         p = dcerpc_call_handle_get_pipes_struct(call);
922         if (p == NULL) {
923                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
924                 return tevent_req_post(req, ev);
925         }
926
927         ZERO_STRUCT(r->out);
928         r->out.query = talloc_zero(r, struct QUERY_SERVICE_CONFIG);
929         if (tevent_req_nomem(r->out.query, req)) {
930                 return tevent_req_post(req, ev);
931         }
932
933         r->out.needed = talloc_zero(r, uint32_t);
934         if (tevent_req_nomem(r->out.needed, req)) {
935                 return tevent_req_post(req, ev);
936         }
937
938         r->out.result = _svcctl_QueryServiceConfigW(p, r);
939
940         if (p->fault_state) {
941                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
942                 tevent_req_nterror(req, status);
943                 return tevent_req_post(req, ev);
944         }
945
946         tevent_req_done(req);
947         return tevent_req_post(req, ev);
948 }
949
950 static NTSTATUS _s3_compat_svcctl_QueryServiceConfigW_recv(struct tevent_req *req)
951 {
952         return tevent_req_simple_recv_ntstatus(req);
953 }
954
955 struct _s3_compat_svcctl_QueryServiceLockStatusW_state {
956         struct tevent_context *ev;
957         struct dcerpc_call_handle *call;
958         struct svcctl_QueryServiceLockStatusW *r;
959 };
960
961 static struct tevent_req *_s3_compat_svcctl_QueryServiceLockStatusW_send(TALLOC_CTX *mem_ctx,
962                                                                          struct tevent_context *ev,
963                                                                          struct dcerpc_call_handle *call,
964                                                                          struct svcctl_QueryServiceLockStatusW *r)
965 {
966         struct tevent_req *req;
967         struct _s3_compat_svcctl_QueryServiceLockStatusW_state *state;
968         struct pipes_struct *p;
969
970         req = tevent_req_create(mem_ctx, &state,
971                                 struct _s3_compat_svcctl_QueryServiceLockStatusW_state);
972         if (req == NULL) {
973                 return NULL;
974         }
975         state->ev = ev;
976         state->call = call;
977         state->r = r;
978
979         p = dcerpc_call_handle_get_pipes_struct(call);
980         if (p == NULL) {
981                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
982                 return tevent_req_post(req, ev);
983         }
984
985         ZERO_STRUCT(r->out);
986         r->out.lock_status = talloc_zero(r, struct SERVICE_LOCK_STATUS);
987         if (tevent_req_nomem(r->out.lock_status, req)) {
988                 return tevent_req_post(req, ev);
989         }
990
991         r->out.needed = talloc_zero(r, uint32_t);
992         if (tevent_req_nomem(r->out.needed, req)) {
993                 return tevent_req_post(req, ev);
994         }
995
996         r->out.result = _svcctl_QueryServiceLockStatusW(p, r);
997
998         if (p->fault_state) {
999                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
1000                 tevent_req_nterror(req, status);
1001                 return tevent_req_post(req, ev);
1002         }
1003
1004         tevent_req_done(req);
1005         return tevent_req_post(req, ev);
1006 }
1007
1008 static NTSTATUS _s3_compat_svcctl_QueryServiceLockStatusW_recv(struct tevent_req *req)
1009 {
1010         return tevent_req_simple_recv_ntstatus(req);
1011 }
1012
1013 struct _s3_compat_svcctl_StartServiceW_state {
1014         struct tevent_context *ev;
1015         struct dcerpc_call_handle *call;
1016         struct svcctl_StartServiceW *r;
1017 };
1018
1019 static struct tevent_req *_s3_compat_svcctl_StartServiceW_send(TALLOC_CTX *mem_ctx,
1020                                                                struct tevent_context *ev,
1021                                                                struct dcerpc_call_handle *call,
1022                                                                struct svcctl_StartServiceW *r)
1023 {
1024         struct tevent_req *req;
1025         struct _s3_compat_svcctl_StartServiceW_state *state;
1026         struct pipes_struct *p;
1027
1028         req = tevent_req_create(mem_ctx, &state,
1029                                 struct _s3_compat_svcctl_StartServiceW_state);
1030         if (req == NULL) {
1031                 return NULL;
1032         }
1033         state->ev = ev;
1034         state->call = call;
1035         state->r = r;
1036
1037         p = dcerpc_call_handle_get_pipes_struct(call);
1038         if (p == NULL) {
1039                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
1040                 return tevent_req_post(req, ev);
1041         }
1042
1043         r->out.result = _svcctl_StartServiceW(p, r);
1044
1045         if (p->fault_state) {
1046                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
1047                 tevent_req_nterror(req, status);
1048                 return tevent_req_post(req, ev);
1049         }
1050
1051         tevent_req_done(req);
1052         return tevent_req_post(req, ev);
1053 }
1054
1055 static NTSTATUS _s3_compat_svcctl_StartServiceW_recv(struct tevent_req *req)
1056 {
1057         return tevent_req_simple_recv_ntstatus(req);
1058 }
1059
1060 struct _s3_compat_svcctl_GetServiceDisplayNameW_state {
1061         struct tevent_context *ev;
1062         struct dcerpc_call_handle *call;
1063         struct svcctl_GetServiceDisplayNameW *r;
1064 };
1065
1066 static struct tevent_req *_s3_compat_svcctl_GetServiceDisplayNameW_send(TALLOC_CTX *mem_ctx,
1067                                                                         struct tevent_context *ev,
1068                                                                         struct dcerpc_call_handle *call,
1069                                                                         struct svcctl_GetServiceDisplayNameW *r)
1070 {
1071         struct tevent_req *req;
1072         struct _s3_compat_svcctl_GetServiceDisplayNameW_state *state;
1073         struct pipes_struct *p;
1074
1075         req = tevent_req_create(mem_ctx, &state,
1076                                 struct _s3_compat_svcctl_GetServiceDisplayNameW_state);
1077         if (req == NULL) {
1078                 return NULL;
1079         }
1080         state->ev = ev;
1081         state->call = call;
1082         state->r = r;
1083
1084         p = dcerpc_call_handle_get_pipes_struct(call);
1085         if (p == NULL) {
1086                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
1087                 return tevent_req_post(req, ev);
1088         }
1089
1090         ZERO_STRUCT(r->out);
1091         r->out.display_name_length = r->in.display_name_length;
1092         r->out.display_name = talloc_zero(r, const char *);
1093         if (tevent_req_nomem(r->out.display_name, req)) {
1094                 return tevent_req_post(req, ev);
1095         }
1096
1097         r->out.result = _svcctl_GetServiceDisplayNameW(p, r);
1098
1099         if (p->fault_state) {
1100                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
1101                 tevent_req_nterror(req, status);
1102                 return tevent_req_post(req, ev);
1103         }
1104
1105         tevent_req_done(req);
1106         return tevent_req_post(req, ev);
1107 }
1108
1109 static NTSTATUS _s3_compat_svcctl_GetServiceDisplayNameW_recv(struct tevent_req *req)
1110 {
1111         return tevent_req_simple_recv_ntstatus(req);
1112 }
1113
1114 struct _s3_compat_svcctl_GetServiceKeyNameW_state {
1115         struct tevent_context *ev;
1116         struct dcerpc_call_handle *call;
1117         struct svcctl_GetServiceKeyNameW *r;
1118 };
1119
1120 static struct tevent_req *_s3_compat_svcctl_GetServiceKeyNameW_send(TALLOC_CTX *mem_ctx,
1121                                                                     struct tevent_context *ev,
1122                                                                     struct dcerpc_call_handle *call,
1123                                                                     struct svcctl_GetServiceKeyNameW *r)
1124 {
1125         struct tevent_req *req;
1126         struct _s3_compat_svcctl_GetServiceKeyNameW_state *state;
1127         struct pipes_struct *p;
1128
1129         req = tevent_req_create(mem_ctx, &state,
1130                                 struct _s3_compat_svcctl_GetServiceKeyNameW_state);
1131         if (req == NULL) {
1132                 return NULL;
1133         }
1134         state->ev = ev;
1135         state->call = call;
1136         state->r = r;
1137
1138         p = dcerpc_call_handle_get_pipes_struct(call);
1139         if (p == NULL) {
1140                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
1141                 return tevent_req_post(req, ev);
1142         }
1143
1144         ZERO_STRUCT(r->out);
1145         r->out.display_name_length = r->in.display_name_length;
1146         r->out.key_name = talloc_zero(r, const char *);
1147         if (tevent_req_nomem(r->out.key_name, req)) {
1148                 return tevent_req_post(req, ev);
1149         }
1150
1151         r->out.result = _svcctl_GetServiceKeyNameW(p, r);
1152
1153         if (p->fault_state) {
1154                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
1155                 tevent_req_nterror(req, status);
1156                 return tevent_req_post(req, ev);
1157         }
1158
1159         tevent_req_done(req);
1160         return tevent_req_post(req, ev);
1161 }
1162
1163 static NTSTATUS _s3_compat_svcctl_GetServiceKeyNameW_recv(struct tevent_req *req)
1164 {
1165         return tevent_req_simple_recv_ntstatus(req);
1166 }
1167
1168 struct _s3_compat_svcctl_SCSetServiceBitsA_state {
1169         struct tevent_context *ev;
1170         struct dcerpc_call_handle *call;
1171         struct svcctl_SCSetServiceBitsA *r;
1172 };
1173
1174 static struct tevent_req *_s3_compat_svcctl_SCSetServiceBitsA_send(TALLOC_CTX *mem_ctx,
1175                                                                    struct tevent_context *ev,
1176                                                                    struct dcerpc_call_handle *call,
1177                                                                    struct svcctl_SCSetServiceBitsA *r)
1178 {
1179         struct tevent_req *req;
1180         struct _s3_compat_svcctl_SCSetServiceBitsA_state *state;
1181         struct pipes_struct *p;
1182
1183         req = tevent_req_create(mem_ctx, &state,
1184                                 struct _s3_compat_svcctl_SCSetServiceBitsA_state);
1185         if (req == NULL) {
1186                 return NULL;
1187         }
1188         state->ev = ev;
1189         state->call = call;
1190         state->r = r;
1191
1192         p = dcerpc_call_handle_get_pipes_struct(call);
1193         if (p == NULL) {
1194                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
1195                 return tevent_req_post(req, ev);
1196         }
1197
1198         r->out.result = _svcctl_SCSetServiceBitsA(p, r);
1199
1200         if (p->fault_state) {
1201                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
1202                 tevent_req_nterror(req, status);
1203                 return tevent_req_post(req, ev);
1204         }
1205
1206         tevent_req_done(req);
1207         return tevent_req_post(req, ev);
1208 }
1209
1210 static NTSTATUS _s3_compat_svcctl_SCSetServiceBitsA_recv(struct tevent_req *req)
1211 {
1212         return tevent_req_simple_recv_ntstatus(req);
1213 }
1214
1215 struct _s3_compat_svcctl_ChangeServiceConfigA_state {
1216         struct tevent_context *ev;
1217         struct dcerpc_call_handle *call;
1218         struct svcctl_ChangeServiceConfigA *r;
1219 };
1220
1221 static struct tevent_req *_s3_compat_svcctl_ChangeServiceConfigA_send(TALLOC_CTX *mem_ctx,
1222                                                                       struct tevent_context *ev,
1223                                                                       struct dcerpc_call_handle *call,
1224                                                                       struct svcctl_ChangeServiceConfigA *r)
1225 {
1226         struct tevent_req *req;
1227         struct _s3_compat_svcctl_ChangeServiceConfigA_state *state;
1228         struct pipes_struct *p;
1229
1230         req = tevent_req_create(mem_ctx, &state,
1231                                 struct _s3_compat_svcctl_ChangeServiceConfigA_state);
1232         if (req == NULL) {
1233                 return NULL;
1234         }
1235         state->ev = ev;
1236         state->call = call;
1237         state->r = r;
1238
1239         p = dcerpc_call_handle_get_pipes_struct(call);
1240         if (p == NULL) {
1241                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
1242                 return tevent_req_post(req, ev);
1243         }
1244
1245         ZERO_STRUCT(r->out);
1246         r->out.tag_id = talloc_zero(r, uint32_t);
1247         if (tevent_req_nomem(r->out.tag_id, req)) {
1248                 return tevent_req_post(req, ev);
1249         }
1250
1251         r->out.result = _svcctl_ChangeServiceConfigA(p, r);
1252
1253         if (p->fault_state) {
1254                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
1255                 tevent_req_nterror(req, status);
1256                 return tevent_req_post(req, ev);
1257         }
1258
1259         tevent_req_done(req);
1260         return tevent_req_post(req, ev);
1261 }
1262
1263 static NTSTATUS _s3_compat_svcctl_ChangeServiceConfigA_recv(struct tevent_req *req)
1264 {
1265         return tevent_req_simple_recv_ntstatus(req);
1266 }
1267
1268 struct _s3_compat_svcctl_CreateServiceA_state {
1269         struct tevent_context *ev;
1270         struct dcerpc_call_handle *call;
1271         struct svcctl_CreateServiceA *r;
1272 };
1273
1274 static struct tevent_req *_s3_compat_svcctl_CreateServiceA_send(TALLOC_CTX *mem_ctx,
1275                                                                 struct tevent_context *ev,
1276                                                                 struct dcerpc_call_handle *call,
1277                                                                 struct svcctl_CreateServiceA *r)
1278 {
1279         struct tevent_req *req;
1280         struct _s3_compat_svcctl_CreateServiceA_state *state;
1281         struct pipes_struct *p;
1282
1283         req = tevent_req_create(mem_ctx, &state,
1284                                 struct _s3_compat_svcctl_CreateServiceA_state);
1285         if (req == NULL) {
1286                 return NULL;
1287         }
1288         state->ev = ev;
1289         state->call = call;
1290         state->r = r;
1291
1292         p = dcerpc_call_handle_get_pipes_struct(call);
1293         if (p == NULL) {
1294                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
1295                 return tevent_req_post(req, ev);
1296         }
1297
1298         ZERO_STRUCT(r->out);
1299         r->out.TagId = talloc_zero(r, uint32_t);
1300         if (tevent_req_nomem(r->out.TagId, req)) {
1301                 return tevent_req_post(req, ev);
1302         }
1303
1304         r->out.result = _svcctl_CreateServiceA(p, r);
1305
1306         if (p->fault_state) {
1307                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
1308                 tevent_req_nterror(req, status);
1309                 return tevent_req_post(req, ev);
1310         }
1311
1312         tevent_req_done(req);
1313         return tevent_req_post(req, ev);
1314 }
1315
1316 static NTSTATUS _s3_compat_svcctl_CreateServiceA_recv(struct tevent_req *req)
1317 {
1318         return tevent_req_simple_recv_ntstatus(req);
1319 }
1320
1321 struct _s3_compat_svcctl_EnumDependentServicesA_state {
1322         struct tevent_context *ev;
1323         struct dcerpc_call_handle *call;
1324         struct svcctl_EnumDependentServicesA *r;
1325 };
1326
1327 static struct tevent_req *_s3_compat_svcctl_EnumDependentServicesA_send(TALLOC_CTX *mem_ctx,
1328                                                                         struct tevent_context *ev,
1329                                                                         struct dcerpc_call_handle *call,
1330                                                                         struct svcctl_EnumDependentServicesA *r)
1331 {
1332         struct tevent_req *req;
1333         struct _s3_compat_svcctl_EnumDependentServicesA_state *state;
1334         struct pipes_struct *p;
1335
1336         req = tevent_req_create(mem_ctx, &state,
1337                                 struct _s3_compat_svcctl_EnumDependentServicesA_state);
1338         if (req == NULL) {
1339                 return NULL;
1340         }
1341         state->ev = ev;
1342         state->call = call;
1343         state->r = r;
1344
1345         p = dcerpc_call_handle_get_pipes_struct(call);
1346         if (p == NULL) {
1347                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
1348                 return tevent_req_post(req, ev);
1349         }
1350
1351         ZERO_STRUCT(r->out);
1352         r->out.service_status = talloc_zero(r, struct ENUM_SERVICE_STATUSA);
1353         if (tevent_req_nomem(r->out.service_status, req)) {
1354                 return tevent_req_post(req, ev);
1355         }
1356
1357         r->out.needed = talloc_zero(r, uint32_t);
1358         if (tevent_req_nomem(r->out.needed, req)) {
1359                 return tevent_req_post(req, ev);
1360         }
1361
1362         r->out.services_returned = talloc_zero(r, uint32_t);
1363         if (tevent_req_nomem(r->out.services_returned, req)) {
1364                 return tevent_req_post(req, ev);
1365         }
1366
1367         r->out.result = _svcctl_EnumDependentServicesA(p, r);
1368
1369         if (p->fault_state) {
1370                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
1371                 tevent_req_nterror(req, status);
1372                 return tevent_req_post(req, ev);
1373         }
1374
1375         tevent_req_done(req);
1376         return tevent_req_post(req, ev);
1377 }
1378
1379 static NTSTATUS _s3_compat_svcctl_EnumDependentServicesA_recv(struct tevent_req *req)
1380 {
1381         return tevent_req_simple_recv_ntstatus(req);
1382 }
1383
1384 struct _s3_compat_svcctl_EnumServicesStatusA_state {
1385         struct tevent_context *ev;
1386         struct dcerpc_call_handle *call;
1387         struct svcctl_EnumServicesStatusA *r;
1388 };
1389
1390 static struct tevent_req *_s3_compat_svcctl_EnumServicesStatusA_send(TALLOC_CTX *mem_ctx,
1391                                                                      struct tevent_context *ev,
1392                                                                      struct dcerpc_call_handle *call,
1393                                                                      struct svcctl_EnumServicesStatusA *r)
1394 {
1395         struct tevent_req *req;
1396         struct _s3_compat_svcctl_EnumServicesStatusA_state *state;
1397         struct pipes_struct *p;
1398
1399         req = tevent_req_create(mem_ctx, &state,
1400                                 struct _s3_compat_svcctl_EnumServicesStatusA_state);
1401         if (req == NULL) {
1402                 return NULL;
1403         }
1404         state->ev = ev;
1405         state->call = call;
1406         state->r = r;
1407
1408         p = dcerpc_call_handle_get_pipes_struct(call);
1409         if (p == NULL) {
1410                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
1411                 return tevent_req_post(req, ev);
1412         }
1413
1414         ZERO_STRUCT(r->out);
1415         r->out.resume_handle = r->in.resume_handle;
1416         r->out.service = talloc_zero_array(r, uint8_t, r->in.offered);
1417         if (tevent_req_nomem(r->out.service, req)) {
1418                 return tevent_req_post(req, ev);
1419         }
1420
1421         r->out.needed = talloc_zero(r, uint32_t);
1422         if (tevent_req_nomem(r->out.needed, req)) {
1423                 return tevent_req_post(req, ev);
1424         }
1425
1426         r->out.services_returned = talloc_zero(r, uint32_t);
1427         if (tevent_req_nomem(r->out.services_returned, req)) {
1428                 return tevent_req_post(req, ev);
1429         }
1430
1431         r->out.result = _svcctl_EnumServicesStatusA(p, r);
1432
1433         if (p->fault_state) {
1434                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
1435                 tevent_req_nterror(req, status);
1436                 return tevent_req_post(req, ev);
1437         }
1438
1439         tevent_req_done(req);
1440         return tevent_req_post(req, ev);
1441 }
1442
1443 static NTSTATUS _s3_compat_svcctl_EnumServicesStatusA_recv(struct tevent_req *req)
1444 {
1445         return tevent_req_simple_recv_ntstatus(req);
1446 }
1447
1448 struct _s3_compat_svcctl_OpenSCManagerA_state {
1449         struct tevent_context *ev;
1450         struct dcerpc_call_handle *call;
1451         struct svcctl_OpenSCManagerA *r;
1452 };
1453
1454 static struct tevent_req *_s3_compat_svcctl_OpenSCManagerA_send(TALLOC_CTX *mem_ctx,
1455                                                                 struct tevent_context *ev,
1456                                                                 struct dcerpc_call_handle *call,
1457                                                                 struct svcctl_OpenSCManagerA *r)
1458 {
1459         struct tevent_req *req;
1460         struct _s3_compat_svcctl_OpenSCManagerA_state *state;
1461         struct pipes_struct *p;
1462
1463         req = tevent_req_create(mem_ctx, &state,
1464                                 struct _s3_compat_svcctl_OpenSCManagerA_state);
1465         if (req == NULL) {
1466                 return NULL;
1467         }
1468         state->ev = ev;
1469         state->call = call;
1470         state->r = r;
1471
1472         p = dcerpc_call_handle_get_pipes_struct(call);
1473         if (p == NULL) {
1474                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
1475                 return tevent_req_post(req, ev);
1476         }
1477
1478         ZERO_STRUCT(r->out);
1479         r->out.handle = talloc_zero(r, struct policy_handle);
1480         if (tevent_req_nomem(r->out.handle, req)) {
1481                 return tevent_req_post(req, ev);
1482         }
1483
1484         r->out.result = _svcctl_OpenSCManagerA(p, r);
1485
1486         if (p->fault_state) {
1487                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
1488                 tevent_req_nterror(req, status);
1489                 return tevent_req_post(req, ev);
1490         }
1491
1492         tevent_req_done(req);
1493         return tevent_req_post(req, ev);
1494 }
1495
1496 static NTSTATUS _s3_compat_svcctl_OpenSCManagerA_recv(struct tevent_req *req)
1497 {
1498         return tevent_req_simple_recv_ntstatus(req);
1499 }
1500
1501 struct _s3_compat_svcctl_OpenServiceA_state {
1502         struct tevent_context *ev;
1503         struct dcerpc_call_handle *call;
1504         struct svcctl_OpenServiceA *r;
1505 };
1506
1507 static struct tevent_req *_s3_compat_svcctl_OpenServiceA_send(TALLOC_CTX *mem_ctx,
1508                                                               struct tevent_context *ev,
1509                                                               struct dcerpc_call_handle *call,
1510                                                               struct svcctl_OpenServiceA *r)
1511 {
1512         struct tevent_req *req;
1513         struct _s3_compat_svcctl_OpenServiceA_state *state;
1514         struct pipes_struct *p;
1515
1516         req = tevent_req_create(mem_ctx, &state,
1517                                 struct _s3_compat_svcctl_OpenServiceA_state);
1518         if (req == NULL) {
1519                 return NULL;
1520         }
1521         state->ev = ev;
1522         state->call = call;
1523         state->r = r;
1524
1525         p = dcerpc_call_handle_get_pipes_struct(call);
1526         if (p == NULL) {
1527                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
1528                 return tevent_req_post(req, ev);
1529         }
1530
1531         ZERO_STRUCT(r->out);
1532         r->out.handle = talloc_zero(r, struct policy_handle);
1533         if (tevent_req_nomem(r->out.handle, req)) {
1534                 return tevent_req_post(req, ev);
1535         }
1536
1537         r->out.result = _svcctl_OpenServiceA(p, r);
1538
1539         if (p->fault_state) {
1540                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
1541                 tevent_req_nterror(req, status);
1542                 return tevent_req_post(req, ev);
1543         }
1544
1545         tevent_req_done(req);
1546         return tevent_req_post(req, ev);
1547 }
1548
1549 static NTSTATUS _s3_compat_svcctl_OpenServiceA_recv(struct tevent_req *req)
1550 {
1551         return tevent_req_simple_recv_ntstatus(req);
1552 }
1553
1554 struct _s3_compat_svcctl_QueryServiceConfigA_state {
1555         struct tevent_context *ev;
1556         struct dcerpc_call_handle *call;
1557         struct svcctl_QueryServiceConfigA *r;
1558 };
1559
1560 static struct tevent_req *_s3_compat_svcctl_QueryServiceConfigA_send(TALLOC_CTX *mem_ctx,
1561                                                                      struct tevent_context *ev,
1562                                                                      struct dcerpc_call_handle *call,
1563                                                                      struct svcctl_QueryServiceConfigA *r)
1564 {
1565         struct tevent_req *req;
1566         struct _s3_compat_svcctl_QueryServiceConfigA_state *state;
1567         struct pipes_struct *p;
1568
1569         req = tevent_req_create(mem_ctx, &state,
1570                                 struct _s3_compat_svcctl_QueryServiceConfigA_state);
1571         if (req == NULL) {
1572                 return NULL;
1573         }
1574         state->ev = ev;
1575         state->call = call;
1576         state->r = r;
1577
1578         p = dcerpc_call_handle_get_pipes_struct(call);
1579         if (p == NULL) {
1580                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
1581                 return tevent_req_post(req, ev);
1582         }
1583
1584         ZERO_STRUCT(r->out);
1585         r->out.query = talloc_zero_array(r, uint8_t, r->in.offered);
1586         if (tevent_req_nomem(r->out.query, req)) {
1587                 return tevent_req_post(req, ev);
1588         }
1589
1590         r->out.needed = talloc_zero(r, uint32_t);
1591         if (tevent_req_nomem(r->out.needed, req)) {
1592                 return tevent_req_post(req, ev);
1593         }
1594
1595         r->out.result = _svcctl_QueryServiceConfigA(p, r);
1596
1597         if (p->fault_state) {
1598                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
1599                 tevent_req_nterror(req, status);
1600                 return tevent_req_post(req, ev);
1601         }
1602
1603         tevent_req_done(req);
1604         return tevent_req_post(req, ev);
1605 }
1606
1607 static NTSTATUS _s3_compat_svcctl_QueryServiceConfigA_recv(struct tevent_req *req)
1608 {
1609         return tevent_req_simple_recv_ntstatus(req);
1610 }
1611
1612 struct _s3_compat_svcctl_QueryServiceLockStatusA_state {
1613         struct tevent_context *ev;
1614         struct dcerpc_call_handle *call;
1615         struct svcctl_QueryServiceLockStatusA *r;
1616 };
1617
1618 static struct tevent_req *_s3_compat_svcctl_QueryServiceLockStatusA_send(TALLOC_CTX *mem_ctx,
1619                                                                          struct tevent_context *ev,
1620                                                                          struct dcerpc_call_handle *call,
1621                                                                          struct svcctl_QueryServiceLockStatusA *r)
1622 {
1623         struct tevent_req *req;
1624         struct _s3_compat_svcctl_QueryServiceLockStatusA_state *state;
1625         struct pipes_struct *p;
1626
1627         req = tevent_req_create(mem_ctx, &state,
1628                                 struct _s3_compat_svcctl_QueryServiceLockStatusA_state);
1629         if (req == NULL) {
1630                 return NULL;
1631         }
1632         state->ev = ev;
1633         state->call = call;
1634         state->r = r;
1635
1636         p = dcerpc_call_handle_get_pipes_struct(call);
1637         if (p == NULL) {
1638                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
1639                 return tevent_req_post(req, ev);
1640         }
1641
1642         ZERO_STRUCT(r->out);
1643         r->out.lock_status = talloc_zero(r, struct SERVICE_LOCK_STATUS);
1644         if (tevent_req_nomem(r->out.lock_status, req)) {
1645                 return tevent_req_post(req, ev);
1646         }
1647
1648         r->out.needed = talloc_zero(r, uint32_t);
1649         if (tevent_req_nomem(r->out.needed, req)) {
1650                 return tevent_req_post(req, ev);
1651         }
1652
1653         r->out.result = _svcctl_QueryServiceLockStatusA(p, r);
1654
1655         if (p->fault_state) {
1656                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
1657                 tevent_req_nterror(req, status);
1658                 return tevent_req_post(req, ev);
1659         }
1660
1661         tevent_req_done(req);
1662         return tevent_req_post(req, ev);
1663 }
1664
1665 static NTSTATUS _s3_compat_svcctl_QueryServiceLockStatusA_recv(struct tevent_req *req)
1666 {
1667         return tevent_req_simple_recv_ntstatus(req);
1668 }
1669
1670 struct _s3_compat_svcctl_StartServiceA_state {
1671         struct tevent_context *ev;
1672         struct dcerpc_call_handle *call;
1673         struct svcctl_StartServiceA *r;
1674 };
1675
1676 static struct tevent_req *_s3_compat_svcctl_StartServiceA_send(TALLOC_CTX *mem_ctx,
1677                                                                struct tevent_context *ev,
1678                                                                struct dcerpc_call_handle *call,
1679                                                                struct svcctl_StartServiceA *r)
1680 {
1681         struct tevent_req *req;
1682         struct _s3_compat_svcctl_StartServiceA_state *state;
1683         struct pipes_struct *p;
1684
1685         req = tevent_req_create(mem_ctx, &state,
1686                                 struct _s3_compat_svcctl_StartServiceA_state);
1687         if (req == NULL) {
1688                 return NULL;
1689         }
1690         state->ev = ev;
1691         state->call = call;
1692         state->r = r;
1693
1694         p = dcerpc_call_handle_get_pipes_struct(call);
1695         if (p == NULL) {
1696                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
1697                 return tevent_req_post(req, ev);
1698         }
1699
1700         r->out.result = _svcctl_StartServiceA(p, r);
1701
1702         if (p->fault_state) {
1703                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
1704                 tevent_req_nterror(req, status);
1705                 return tevent_req_post(req, ev);
1706         }
1707
1708         tevent_req_done(req);
1709         return tevent_req_post(req, ev);
1710 }
1711
1712 static NTSTATUS _s3_compat_svcctl_StartServiceA_recv(struct tevent_req *req)
1713 {
1714         return tevent_req_simple_recv_ntstatus(req);
1715 }
1716
1717 struct _s3_compat_svcctl_GetServiceDisplayNameA_state {
1718         struct tevent_context *ev;
1719         struct dcerpc_call_handle *call;
1720         struct svcctl_GetServiceDisplayNameA *r;
1721 };
1722
1723 static struct tevent_req *_s3_compat_svcctl_GetServiceDisplayNameA_send(TALLOC_CTX *mem_ctx,
1724                                                                         struct tevent_context *ev,
1725                                                                         struct dcerpc_call_handle *call,
1726                                                                         struct svcctl_GetServiceDisplayNameA *r)
1727 {
1728         struct tevent_req *req;
1729         struct _s3_compat_svcctl_GetServiceDisplayNameA_state *state;
1730         struct pipes_struct *p;
1731
1732         req = tevent_req_create(mem_ctx, &state,
1733                                 struct _s3_compat_svcctl_GetServiceDisplayNameA_state);
1734         if (req == NULL) {
1735                 return NULL;
1736         }
1737         state->ev = ev;
1738         state->call = call;
1739         state->r = r;
1740
1741         p = dcerpc_call_handle_get_pipes_struct(call);
1742         if (p == NULL) {
1743                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
1744                 return tevent_req_post(req, ev);
1745         }
1746
1747         ZERO_STRUCT(r->out);
1748         r->out.display_name_length = r->in.display_name_length;
1749         r->out.display_name = talloc_zero(r, const char *);
1750         if (tevent_req_nomem(r->out.display_name, req)) {
1751                 return tevent_req_post(req, ev);
1752         }
1753
1754         r->out.result = _svcctl_GetServiceDisplayNameA(p, r);
1755
1756         if (p->fault_state) {
1757                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
1758                 tevent_req_nterror(req, status);
1759                 return tevent_req_post(req, ev);
1760         }
1761
1762         tevent_req_done(req);
1763         return tevent_req_post(req, ev);
1764 }
1765
1766 static NTSTATUS _s3_compat_svcctl_GetServiceDisplayNameA_recv(struct tevent_req *req)
1767 {
1768         return tevent_req_simple_recv_ntstatus(req);
1769 }
1770
1771 struct _s3_compat_svcctl_GetServiceKeyNameA_state {
1772         struct tevent_context *ev;
1773         struct dcerpc_call_handle *call;
1774         struct svcctl_GetServiceKeyNameA *r;
1775 };
1776
1777 static struct tevent_req *_s3_compat_svcctl_GetServiceKeyNameA_send(TALLOC_CTX *mem_ctx,
1778                                                                     struct tevent_context *ev,
1779                                                                     struct dcerpc_call_handle *call,
1780                                                                     struct svcctl_GetServiceKeyNameA *r)
1781 {
1782         struct tevent_req *req;
1783         struct _s3_compat_svcctl_GetServiceKeyNameA_state *state;
1784         struct pipes_struct *p;
1785
1786         req = tevent_req_create(mem_ctx, &state,
1787                                 struct _s3_compat_svcctl_GetServiceKeyNameA_state);
1788         if (req == NULL) {
1789                 return NULL;
1790         }
1791         state->ev = ev;
1792         state->call = call;
1793         state->r = r;
1794
1795         p = dcerpc_call_handle_get_pipes_struct(call);
1796         if (p == NULL) {
1797                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
1798                 return tevent_req_post(req, ev);
1799         }
1800
1801         ZERO_STRUCT(r->out);
1802         r->out.display_name_length = r->in.display_name_length;
1803         r->out.key_name = talloc_zero(r, const char *);
1804         if (tevent_req_nomem(r->out.key_name, req)) {
1805                 return tevent_req_post(req, ev);
1806         }
1807
1808         r->out.result = _svcctl_GetServiceKeyNameA(p, r);
1809
1810         if (p->fault_state) {
1811                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
1812                 tevent_req_nterror(req, status);
1813                 return tevent_req_post(req, ev);
1814         }
1815
1816         tevent_req_done(req);
1817         return tevent_req_post(req, ev);
1818 }
1819
1820 static NTSTATUS _s3_compat_svcctl_GetServiceKeyNameA_recv(struct tevent_req *req)
1821 {
1822         return tevent_req_simple_recv_ntstatus(req);
1823 }
1824
1825 struct _s3_compat_svcctl_GetCurrentGroupeStateW_state {
1826         struct tevent_context *ev;
1827         struct dcerpc_call_handle *call;
1828         struct svcctl_GetCurrentGroupeStateW *r;
1829 };
1830
1831 static struct tevent_req *_s3_compat_svcctl_GetCurrentGroupeStateW_send(TALLOC_CTX *mem_ctx,
1832                                                                         struct tevent_context *ev,
1833                                                                         struct dcerpc_call_handle *call,
1834                                                                         struct svcctl_GetCurrentGroupeStateW *r)
1835 {
1836         struct tevent_req *req;
1837         struct _s3_compat_svcctl_GetCurrentGroupeStateW_state *state;
1838         struct pipes_struct *p;
1839
1840         req = tevent_req_create(mem_ctx, &state,
1841                                 struct _s3_compat_svcctl_GetCurrentGroupeStateW_state);
1842         if (req == NULL) {
1843                 return NULL;
1844         }
1845         state->ev = ev;
1846         state->call = call;
1847         state->r = r;
1848
1849         p = dcerpc_call_handle_get_pipes_struct(call);
1850         if (p == NULL) {
1851                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
1852                 return tevent_req_post(req, ev);
1853         }
1854
1855         r->out.result = _svcctl_GetCurrentGroupeStateW(p, r);
1856
1857         if (p->fault_state) {
1858                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
1859                 tevent_req_nterror(req, status);
1860                 return tevent_req_post(req, ev);
1861         }
1862
1863         tevent_req_done(req);
1864         return tevent_req_post(req, ev);
1865 }
1866
1867 static NTSTATUS _s3_compat_svcctl_GetCurrentGroupeStateW_recv(struct tevent_req *req)
1868 {
1869         return tevent_req_simple_recv_ntstatus(req);
1870 }
1871
1872 struct _s3_compat_svcctl_EnumServiceGroupW_state {
1873         struct tevent_context *ev;
1874         struct dcerpc_call_handle *call;
1875         struct svcctl_EnumServiceGroupW *r;
1876 };
1877
1878 static struct tevent_req *_s3_compat_svcctl_EnumServiceGroupW_send(TALLOC_CTX *mem_ctx,
1879                                                                    struct tevent_context *ev,
1880                                                                    struct dcerpc_call_handle *call,
1881                                                                    struct svcctl_EnumServiceGroupW *r)
1882 {
1883         struct tevent_req *req;
1884         struct _s3_compat_svcctl_EnumServiceGroupW_state *state;
1885         struct pipes_struct *p;
1886
1887         req = tevent_req_create(mem_ctx, &state,
1888                                 struct _s3_compat_svcctl_EnumServiceGroupW_state);
1889         if (req == NULL) {
1890                 return NULL;
1891         }
1892         state->ev = ev;
1893         state->call = call;
1894         state->r = r;
1895
1896         p = dcerpc_call_handle_get_pipes_struct(call);
1897         if (p == NULL) {
1898                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
1899                 return tevent_req_post(req, ev);
1900         }
1901
1902         r->out.result = _svcctl_EnumServiceGroupW(p, r);
1903
1904         if (p->fault_state) {
1905                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
1906                 tevent_req_nterror(req, status);
1907                 return tevent_req_post(req, ev);
1908         }
1909
1910         tevent_req_done(req);
1911         return tevent_req_post(req, ev);
1912 }
1913
1914 static NTSTATUS _s3_compat_svcctl_EnumServiceGroupW_recv(struct tevent_req *req)
1915 {
1916         return tevent_req_simple_recv_ntstatus(req);
1917 }
1918
1919 struct _s3_compat_svcctl_ChangeServiceConfig2A_state {
1920         struct tevent_context *ev;
1921         struct dcerpc_call_handle *call;
1922         struct svcctl_ChangeServiceConfig2A *r;
1923 };
1924
1925 static struct tevent_req *_s3_compat_svcctl_ChangeServiceConfig2A_send(TALLOC_CTX *mem_ctx,
1926                                                                        struct tevent_context *ev,
1927                                                                        struct dcerpc_call_handle *call,
1928                                                                        struct svcctl_ChangeServiceConfig2A *r)
1929 {
1930         struct tevent_req *req;
1931         struct _s3_compat_svcctl_ChangeServiceConfig2A_state *state;
1932         struct pipes_struct *p;
1933
1934         req = tevent_req_create(mem_ctx, &state,
1935                                 struct _s3_compat_svcctl_ChangeServiceConfig2A_state);
1936         if (req == NULL) {
1937                 return NULL;
1938         }
1939         state->ev = ev;
1940         state->call = call;
1941         state->r = r;
1942
1943         p = dcerpc_call_handle_get_pipes_struct(call);
1944         if (p == NULL) {
1945                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
1946                 return tevent_req_post(req, ev);
1947         }
1948
1949         r->out.result = _svcctl_ChangeServiceConfig2A(p, r);
1950
1951         if (p->fault_state) {
1952                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
1953                 tevent_req_nterror(req, status);
1954                 return tevent_req_post(req, ev);
1955         }
1956
1957         tevent_req_done(req);
1958         return tevent_req_post(req, ev);
1959 }
1960
1961 static NTSTATUS _s3_compat_svcctl_ChangeServiceConfig2A_recv(struct tevent_req *req)
1962 {
1963         return tevent_req_simple_recv_ntstatus(req);
1964 }
1965
1966 struct _s3_compat_svcctl_ChangeServiceConfig2W_state {
1967         struct tevent_context *ev;
1968         struct dcerpc_call_handle *call;
1969         struct svcctl_ChangeServiceConfig2W *r;
1970 };
1971
1972 static struct tevent_req *_s3_compat_svcctl_ChangeServiceConfig2W_send(TALLOC_CTX *mem_ctx,
1973                                                                        struct tevent_context *ev,
1974                                                                        struct dcerpc_call_handle *call,
1975                                                                        struct svcctl_ChangeServiceConfig2W *r)
1976 {
1977         struct tevent_req *req;
1978         struct _s3_compat_svcctl_ChangeServiceConfig2W_state *state;
1979         struct pipes_struct *p;
1980
1981         req = tevent_req_create(mem_ctx, &state,
1982                                 struct _s3_compat_svcctl_ChangeServiceConfig2W_state);
1983         if (req == NULL) {
1984                 return NULL;
1985         }
1986         state->ev = ev;
1987         state->call = call;
1988         state->r = r;
1989
1990         p = dcerpc_call_handle_get_pipes_struct(call);
1991         if (p == NULL) {
1992                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
1993                 return tevent_req_post(req, ev);
1994         }
1995
1996         r->out.result = _svcctl_ChangeServiceConfig2W(p, r);
1997
1998         if (p->fault_state) {
1999                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
2000                 tevent_req_nterror(req, status);
2001                 return tevent_req_post(req, ev);
2002         }
2003
2004         tevent_req_done(req);
2005         return tevent_req_post(req, ev);
2006 }
2007
2008 static NTSTATUS _s3_compat_svcctl_ChangeServiceConfig2W_recv(struct tevent_req *req)
2009 {
2010         return tevent_req_simple_recv_ntstatus(req);
2011 }
2012
2013 struct _s3_compat_svcctl_QueryServiceConfig2A_state {
2014         struct tevent_context *ev;
2015         struct dcerpc_call_handle *call;
2016         struct svcctl_QueryServiceConfig2A *r;
2017 };
2018
2019 static struct tevent_req *_s3_compat_svcctl_QueryServiceConfig2A_send(TALLOC_CTX *mem_ctx,
2020                                                                       struct tevent_context *ev,
2021                                                                       struct dcerpc_call_handle *call,
2022                                                                       struct svcctl_QueryServiceConfig2A *r)
2023 {
2024         struct tevent_req *req;
2025         struct _s3_compat_svcctl_QueryServiceConfig2A_state *state;
2026         struct pipes_struct *p;
2027
2028         req = tevent_req_create(mem_ctx, &state,
2029                                 struct _s3_compat_svcctl_QueryServiceConfig2A_state);
2030         if (req == NULL) {
2031                 return NULL;
2032         }
2033         state->ev = ev;
2034         state->call = call;
2035         state->r = r;
2036
2037         p = dcerpc_call_handle_get_pipes_struct(call);
2038         if (p == NULL) {
2039                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
2040                 return tevent_req_post(req, ev);
2041         }
2042
2043         ZERO_STRUCT(r->out);
2044         r->out.buffer = talloc_zero_array(r, uint8_t, r->in.offered);
2045         if (tevent_req_nomem(r->out.buffer, req)) {
2046                 return tevent_req_post(req, ev);
2047         }
2048
2049         r->out.needed = talloc_zero(r, uint32_t);
2050         if (tevent_req_nomem(r->out.needed, req)) {
2051                 return tevent_req_post(req, ev);
2052         }
2053
2054         r->out.result = _svcctl_QueryServiceConfig2A(p, r);
2055
2056         if (p->fault_state) {
2057                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
2058                 tevent_req_nterror(req, status);
2059                 return tevent_req_post(req, ev);
2060         }
2061
2062         tevent_req_done(req);
2063         return tevent_req_post(req, ev);
2064 }
2065
2066 static NTSTATUS _s3_compat_svcctl_QueryServiceConfig2A_recv(struct tevent_req *req)
2067 {
2068         return tevent_req_simple_recv_ntstatus(req);
2069 }
2070
2071 struct _s3_compat_svcctl_QueryServiceConfig2W_state {
2072         struct tevent_context *ev;
2073         struct dcerpc_call_handle *call;
2074         struct svcctl_QueryServiceConfig2W *r;
2075 };
2076
2077 static struct tevent_req *_s3_compat_svcctl_QueryServiceConfig2W_send(TALLOC_CTX *mem_ctx,
2078                                                                       struct tevent_context *ev,
2079                                                                       struct dcerpc_call_handle *call,
2080                                                                       struct svcctl_QueryServiceConfig2W *r)
2081 {
2082         struct tevent_req *req;
2083         struct _s3_compat_svcctl_QueryServiceConfig2W_state *state;
2084         struct pipes_struct *p;
2085
2086         req = tevent_req_create(mem_ctx, &state,
2087                                 struct _s3_compat_svcctl_QueryServiceConfig2W_state);
2088         if (req == NULL) {
2089                 return NULL;
2090         }
2091         state->ev = ev;
2092         state->call = call;
2093         state->r = r;
2094
2095         p = dcerpc_call_handle_get_pipes_struct(call);
2096         if (p == NULL) {
2097                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
2098                 return tevent_req_post(req, ev);
2099         }
2100
2101         ZERO_STRUCT(r->out);
2102         r->out.buffer = talloc_zero_array(r, uint8_t, r->in.offered);
2103         if (tevent_req_nomem(r->out.buffer, req)) {
2104                 return tevent_req_post(req, ev);
2105         }
2106
2107         r->out.needed = talloc_zero(r, uint32_t);
2108         if (tevent_req_nomem(r->out.needed, req)) {
2109                 return tevent_req_post(req, ev);
2110         }
2111
2112         r->out.result = _svcctl_QueryServiceConfig2W(p, r);
2113
2114         if (p->fault_state) {
2115                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
2116                 tevent_req_nterror(req, status);
2117                 return tevent_req_post(req, ev);
2118         }
2119
2120         tevent_req_done(req);
2121         return tevent_req_post(req, ev);
2122 }
2123
2124 static NTSTATUS _s3_compat_svcctl_QueryServiceConfig2W_recv(struct tevent_req *req)
2125 {
2126         return tevent_req_simple_recv_ntstatus(req);
2127 }
2128
2129 struct _s3_compat_svcctl_QueryServiceStatusEx_state {
2130         struct tevent_context *ev;
2131         struct dcerpc_call_handle *call;
2132         struct svcctl_QueryServiceStatusEx *r;
2133 };
2134
2135 static struct tevent_req *_s3_compat_svcctl_QueryServiceStatusEx_send(TALLOC_CTX *mem_ctx,
2136                                                                       struct tevent_context *ev,
2137                                                                       struct dcerpc_call_handle *call,
2138                                                                       struct svcctl_QueryServiceStatusEx *r)
2139 {
2140         struct tevent_req *req;
2141         struct _s3_compat_svcctl_QueryServiceStatusEx_state *state;
2142         struct pipes_struct *p;
2143
2144         req = tevent_req_create(mem_ctx, &state,
2145                                 struct _s3_compat_svcctl_QueryServiceStatusEx_state);
2146         if (req == NULL) {
2147                 return NULL;
2148         }
2149         state->ev = ev;
2150         state->call = call;
2151         state->r = r;
2152
2153         p = dcerpc_call_handle_get_pipes_struct(call);
2154         if (p == NULL) {
2155                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
2156                 return tevent_req_post(req, ev);
2157         }
2158
2159         ZERO_STRUCT(r->out);
2160         r->out.buffer = talloc_zero_array(r, uint8_t, r->in.offered);
2161         if (tevent_req_nomem(r->out.buffer, req)) {
2162                 return tevent_req_post(req, ev);
2163         }
2164
2165         r->out.needed = talloc_zero(r, uint32_t);
2166         if (tevent_req_nomem(r->out.needed, req)) {
2167                 return tevent_req_post(req, ev);
2168         }
2169
2170         r->out.result = _svcctl_QueryServiceStatusEx(p, r);
2171
2172         if (p->fault_state) {
2173                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
2174                 tevent_req_nterror(req, status);
2175                 return tevent_req_post(req, ev);
2176         }
2177
2178         tevent_req_done(req);
2179         return tevent_req_post(req, ev);
2180 }
2181
2182 static NTSTATUS _s3_compat_svcctl_QueryServiceStatusEx_recv(struct tevent_req *req)
2183 {
2184         return tevent_req_simple_recv_ntstatus(req);
2185 }
2186
2187 struct _s3_compat_EnumServicesStatusExA_state {
2188         struct tevent_context *ev;
2189         struct dcerpc_call_handle *call;
2190         struct EnumServicesStatusExA *r;
2191 };
2192
2193 static struct tevent_req *_s3_compat_EnumServicesStatusExA_send(TALLOC_CTX *mem_ctx,
2194                                                                 struct tevent_context *ev,
2195                                                                 struct dcerpc_call_handle *call,
2196                                                                 struct EnumServicesStatusExA *r)
2197 {
2198         struct tevent_req *req;
2199         struct _s3_compat_EnumServicesStatusExA_state *state;
2200         struct pipes_struct *p;
2201
2202         req = tevent_req_create(mem_ctx, &state,
2203                                 struct _s3_compat_EnumServicesStatusExA_state);
2204         if (req == NULL) {
2205                 return NULL;
2206         }
2207         state->ev = ev;
2208         state->call = call;
2209         state->r = r;
2210
2211         p = dcerpc_call_handle_get_pipes_struct(call);
2212         if (p == NULL) {
2213                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
2214                 return tevent_req_post(req, ev);
2215         }
2216
2217         ZERO_STRUCT(r->out);
2218         r->out.resume_handle = r->in.resume_handle;
2219         r->out.services = talloc_zero_array(r, uint8_t, r->in.offered);
2220         if (tevent_req_nomem(r->out.services, req)) {
2221                 return tevent_req_post(req, ev);
2222         }
2223
2224         r->out.needed = talloc_zero(r, uint32_t);
2225         if (tevent_req_nomem(r->out.needed, req)) {
2226                 return tevent_req_post(req, ev);
2227         }
2228
2229         r->out.service_returned = talloc_zero(r, uint32_t);
2230         if (tevent_req_nomem(r->out.service_returned, req)) {
2231                 return tevent_req_post(req, ev);
2232         }
2233
2234         r->out.group_name = talloc_zero(r, const char *);
2235         if (tevent_req_nomem(r->out.group_name, req)) {
2236                 return tevent_req_post(req, ev);
2237         }
2238
2239         r->out.result = _EnumServicesStatusExA(p, r);
2240
2241         if (p->fault_state) {
2242                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
2243                 tevent_req_nterror(req, status);
2244                 return tevent_req_post(req, ev);
2245         }
2246
2247         tevent_req_done(req);
2248         return tevent_req_post(req, ev);
2249 }
2250
2251 static NTSTATUS _s3_compat_EnumServicesStatusExA_recv(struct tevent_req *req)
2252 {
2253         return tevent_req_simple_recv_ntstatus(req);
2254 }
2255
2256 struct _s3_compat_EnumServicesStatusExW_state {
2257         struct tevent_context *ev;
2258         struct dcerpc_call_handle *call;
2259         struct EnumServicesStatusExW *r;
2260 };
2261
2262 static struct tevent_req *_s3_compat_EnumServicesStatusExW_send(TALLOC_CTX *mem_ctx,
2263                                                                 struct tevent_context *ev,
2264                                                                 struct dcerpc_call_handle *call,
2265                                                                 struct EnumServicesStatusExW *r)
2266 {
2267         struct tevent_req *req;
2268         struct _s3_compat_EnumServicesStatusExW_state *state;
2269         struct pipes_struct *p;
2270
2271         req = tevent_req_create(mem_ctx, &state,
2272                                 struct _s3_compat_EnumServicesStatusExW_state);
2273         if (req == NULL) {
2274                 return NULL;
2275         }
2276         state->ev = ev;
2277         state->call = call;
2278         state->r = r;
2279
2280         p = dcerpc_call_handle_get_pipes_struct(call);
2281         if (p == NULL) {
2282                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
2283                 return tevent_req_post(req, ev);
2284         }
2285
2286         ZERO_STRUCT(r->out);
2287         r->out.resume_handle = r->in.resume_handle;
2288         r->out.services = talloc_zero_array(r, uint8_t, r->in.offered);
2289         if (tevent_req_nomem(r->out.services, req)) {
2290                 return tevent_req_post(req, ev);
2291         }
2292
2293         r->out.needed = talloc_zero(r, uint32_t);
2294         if (tevent_req_nomem(r->out.needed, req)) {
2295                 return tevent_req_post(req, ev);
2296         }
2297
2298         r->out.service_returned = talloc_zero(r, uint32_t);
2299         if (tevent_req_nomem(r->out.service_returned, req)) {
2300                 return tevent_req_post(req, ev);
2301         }
2302
2303         r->out.result = _EnumServicesStatusExW(p, r);
2304
2305         if (p->fault_state) {
2306                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
2307                 tevent_req_nterror(req, status);
2308                 return tevent_req_post(req, ev);
2309         }
2310
2311         tevent_req_done(req);
2312         return tevent_req_post(req, ev);
2313 }
2314
2315 static NTSTATUS _s3_compat_EnumServicesStatusExW_recv(struct tevent_req *req)
2316 {
2317         return tevent_req_simple_recv_ntstatus(req);
2318 }
2319
2320 struct _s3_compat_svcctl_SCSendTSMessage_state {
2321         struct tevent_context *ev;
2322         struct dcerpc_call_handle *call;
2323         struct svcctl_SCSendTSMessage *r;
2324 };
2325
2326 static struct tevent_req *_s3_compat_svcctl_SCSendTSMessage_send(TALLOC_CTX *mem_ctx,
2327                                                                  struct tevent_context *ev,
2328                                                                  struct dcerpc_call_handle *call,
2329                                                                  struct svcctl_SCSendTSMessage *r)
2330 {
2331         struct tevent_req *req;
2332         struct _s3_compat_svcctl_SCSendTSMessage_state *state;
2333         struct pipes_struct *p;
2334
2335         req = tevent_req_create(mem_ctx, &state,
2336                                 struct _s3_compat_svcctl_SCSendTSMessage_state);
2337         if (req == NULL) {
2338                 return NULL;
2339         }
2340         state->ev = ev;
2341         state->call = call;
2342         state->r = r;
2343
2344         p = dcerpc_call_handle_get_pipes_struct(call);
2345         if (p == NULL) {
2346                 tevent_req_nterror(req, NT_STATUS_NO_MEMORY);
2347                 return tevent_req_post(req, ev);
2348         }
2349
2350         r->out.result = _svcctl_SCSendTSMessage(p, r);
2351
2352         if (p->fault_state) {
2353                 NTSTATUS status = dcerpc_fault_to_nt_status(p->fault_state);
2354                 tevent_req_nterror(req, status);
2355                 return tevent_req_post(req, ev);
2356         }
2357
2358         tevent_req_done(req);
2359         return tevent_req_post(req, ev);
2360 }
2361
2362 static NTSTATUS _s3_compat_svcctl_SCSendTSMessage_recv(struct tevent_req *req)
2363 {
2364         return tevent_req_simple_recv_ntstatus(req);
2365 }
2366
2367
2368 static const struct dcerpc_call_entry_point_fns _s3_compat_svcctl_fns[] = {
2369         {
2370                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2371                         _s3_compat_svcctl_CloseServiceHandle_send,
2372                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2373                         _s3_compat_svcctl_CloseServiceHandle_recv,
2374         },
2375         {
2376                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2377                         _s3_compat_svcctl_ControlService_send,
2378                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2379                         _s3_compat_svcctl_ControlService_recv,
2380         },
2381         {
2382                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2383                         _s3_compat_svcctl_DeleteService_send,
2384                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2385                         _s3_compat_svcctl_DeleteService_recv,
2386         },
2387         {
2388                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2389                         _s3_compat_svcctl_LockServiceDatabase_send,
2390                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2391                         _s3_compat_svcctl_LockServiceDatabase_recv,
2392         },
2393         {
2394                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2395                         _s3_compat_svcctl_QueryServiceObjectSecurity_send,
2396                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2397                         _s3_compat_svcctl_QueryServiceObjectSecurity_recv,
2398         },
2399         {
2400                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2401                         _s3_compat_svcctl_SetServiceObjectSecurity_send,
2402                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2403                         _s3_compat_svcctl_SetServiceObjectSecurity_recv,
2404         },
2405         {
2406                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2407                         _s3_compat_svcctl_QueryServiceStatus_send,
2408                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2409                         _s3_compat_svcctl_QueryServiceStatus_recv,
2410         },
2411         {
2412                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2413                         _s3_compat_svcctl_SetServiceStatus_send,
2414                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2415                         _s3_compat_svcctl_SetServiceStatus_recv,
2416         },
2417         {
2418                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2419                         _s3_compat_svcctl_UnlockServiceDatabase_send,
2420                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2421                         _s3_compat_svcctl_UnlockServiceDatabase_recv,
2422         },
2423         {
2424                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2425                         _s3_compat_svcctl_NotifyBootConfigStatus_send,
2426                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2427                         _s3_compat_svcctl_NotifyBootConfigStatus_recv,
2428         },
2429         {
2430                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2431                         _s3_compat_svcctl_SCSetServiceBitsW_send,
2432                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2433                         _s3_compat_svcctl_SCSetServiceBitsW_recv,
2434         },
2435         {
2436                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2437                         _s3_compat_svcctl_ChangeServiceConfigW_send,
2438                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2439                         _s3_compat_svcctl_ChangeServiceConfigW_recv,
2440         },
2441         {
2442                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2443                         _s3_compat_svcctl_CreateServiceW_send,
2444                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2445                         _s3_compat_svcctl_CreateServiceW_recv,
2446         },
2447         {
2448                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2449                         _s3_compat_svcctl_EnumDependentServicesW_send,
2450                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2451                         _s3_compat_svcctl_EnumDependentServicesW_recv,
2452         },
2453         {
2454                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2455                         _s3_compat_svcctl_EnumServicesStatusW_send,
2456                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2457                         _s3_compat_svcctl_EnumServicesStatusW_recv,
2458         },
2459         {
2460                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2461                         _s3_compat_svcctl_OpenSCManagerW_send,
2462                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2463                         _s3_compat_svcctl_OpenSCManagerW_recv,
2464         },
2465         {
2466                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2467                         _s3_compat_svcctl_OpenServiceW_send,
2468                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2469                         _s3_compat_svcctl_OpenServiceW_recv,
2470         },
2471         {
2472                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2473                         _s3_compat_svcctl_QueryServiceConfigW_send,
2474                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2475                         _s3_compat_svcctl_QueryServiceConfigW_recv,
2476         },
2477         {
2478                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2479                         _s3_compat_svcctl_QueryServiceLockStatusW_send,
2480                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2481                         _s3_compat_svcctl_QueryServiceLockStatusW_recv,
2482         },
2483         {
2484                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2485                         _s3_compat_svcctl_StartServiceW_send,
2486                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2487                         _s3_compat_svcctl_StartServiceW_recv,
2488         },
2489         {
2490                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2491                         _s3_compat_svcctl_GetServiceDisplayNameW_send,
2492                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2493                         _s3_compat_svcctl_GetServiceDisplayNameW_recv,
2494         },
2495         {
2496                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2497                         _s3_compat_svcctl_GetServiceKeyNameW_send,
2498                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2499                         _s3_compat_svcctl_GetServiceKeyNameW_recv,
2500         },
2501         {
2502                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2503                         _s3_compat_svcctl_SCSetServiceBitsA_send,
2504                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2505                         _s3_compat_svcctl_SCSetServiceBitsA_recv,
2506         },
2507         {
2508                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2509                         _s3_compat_svcctl_ChangeServiceConfigA_send,
2510                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2511                         _s3_compat_svcctl_ChangeServiceConfigA_recv,
2512         },
2513         {
2514                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2515                         _s3_compat_svcctl_CreateServiceA_send,
2516                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2517                         _s3_compat_svcctl_CreateServiceA_recv,
2518         },
2519         {
2520                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2521                         _s3_compat_svcctl_EnumDependentServicesA_send,
2522                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2523                         _s3_compat_svcctl_EnumDependentServicesA_recv,
2524         },
2525         {
2526                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2527                         _s3_compat_svcctl_EnumServicesStatusA_send,
2528                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2529                         _s3_compat_svcctl_EnumServicesStatusA_recv,
2530         },
2531         {
2532                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2533                         _s3_compat_svcctl_OpenSCManagerA_send,
2534                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2535                         _s3_compat_svcctl_OpenSCManagerA_recv,
2536         },
2537         {
2538                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2539                         _s3_compat_svcctl_OpenServiceA_send,
2540                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2541                         _s3_compat_svcctl_OpenServiceA_recv,
2542         },
2543         {
2544                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2545                         _s3_compat_svcctl_QueryServiceConfigA_send,
2546                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2547                         _s3_compat_svcctl_QueryServiceConfigA_recv,
2548         },
2549         {
2550                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2551                         _s3_compat_svcctl_QueryServiceLockStatusA_send,
2552                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2553                         _s3_compat_svcctl_QueryServiceLockStatusA_recv,
2554         },
2555         {
2556                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2557                         _s3_compat_svcctl_StartServiceA_send,
2558                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2559                         _s3_compat_svcctl_StartServiceA_recv,
2560         },
2561         {
2562                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2563                         _s3_compat_svcctl_GetServiceDisplayNameA_send,
2564                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2565                         _s3_compat_svcctl_GetServiceDisplayNameA_recv,
2566         },
2567         {
2568                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2569                         _s3_compat_svcctl_GetServiceKeyNameA_send,
2570                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2571                         _s3_compat_svcctl_GetServiceKeyNameA_recv,
2572         },
2573         {
2574                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2575                         _s3_compat_svcctl_GetCurrentGroupeStateW_send,
2576                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2577                         _s3_compat_svcctl_GetCurrentGroupeStateW_recv,
2578         },
2579         {
2580                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2581                         _s3_compat_svcctl_EnumServiceGroupW_send,
2582                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2583                         _s3_compat_svcctl_EnumServiceGroupW_recv,
2584         },
2585         {
2586                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2587                         _s3_compat_svcctl_ChangeServiceConfig2A_send,
2588                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2589                         _s3_compat_svcctl_ChangeServiceConfig2A_recv,
2590         },
2591         {
2592                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2593                         _s3_compat_svcctl_ChangeServiceConfig2W_send,
2594                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2595                         _s3_compat_svcctl_ChangeServiceConfig2W_recv,
2596         },
2597         {
2598                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2599                         _s3_compat_svcctl_QueryServiceConfig2A_send,
2600                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2601                         _s3_compat_svcctl_QueryServiceConfig2A_recv,
2602         },
2603         {
2604                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2605                         _s3_compat_svcctl_QueryServiceConfig2W_send,
2606                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2607                         _s3_compat_svcctl_QueryServiceConfig2W_recv,
2608         },
2609         {
2610                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2611                         _s3_compat_svcctl_QueryServiceStatusEx_send,
2612                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2613                         _s3_compat_svcctl_QueryServiceStatusEx_recv,
2614         },
2615         {
2616                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2617                         _s3_compat_EnumServicesStatusExA_send,
2618                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2619                         _s3_compat_EnumServicesStatusExA_recv,
2620         },
2621         {
2622                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2623                         _s3_compat_EnumServicesStatusExW_send,
2624                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2625                         _s3_compat_EnumServicesStatusExW_recv,
2626         },
2627         {
2628                 .send_fn = (dcerpc_call_entry_point_send_fn_t)
2629                         _s3_compat_svcctl_SCSendTSMessage_send,
2630                 .recv_fn = (dcerpc_call_entry_point_recv_fn_t)
2631                         _s3_compat_svcctl_SCSendTSMessage_recv,
2632         },
2633         {
2634                 .send_fn = NULL,
2635                 .recv_fn = NULL,
2636         },
2637 };
2638
2639 static const struct dcerpc_call_entry_point_vector _s3_compat_svcctl_epv[] = {
2640         {
2641         .name = "_s3_compat_svcctl",
2642         .table = &ndr_table_svcctl,
2643         .num_fns = 44,
2644         .fns = _s3_compat_svcctl_fns,
2645         },
2646 };
2647
2648 NTSTATUS dcerpc_server_setup_s3compat_svcctl(struct dcerpc_server *server)
2649 {
2650         return NT_STATUS_NOT_IMPLEMENTED;
2651 }