s4-python: added PYTHONDIR to python search path
[Samba.git] / librpc / gen_ndr / srv_wkssvc.c
blobeab971f42b2f166898548e448212eb54562ba90e
1 /*
2 * Unix SMB/CIFS implementation.
3 * server auto-generated by pidl. DO NOT MODIFY!
4 */
6 #include "includes.h"
7 #include "../librpc/gen_ndr/srv_wkssvc.h"
9 static bool api_wkssvc_NetWkstaGetInfo(pipes_struct *p)
11 const struct ndr_interface_call *call;
12 struct ndr_pull *pull;
13 struct ndr_push *push;
14 enum ndr_err_code ndr_err;
15 DATA_BLOB blob;
16 struct wkssvc_NetWkstaGetInfo *r;
18 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETWKSTAGETINFO];
20 r = talloc(talloc_tos(), struct wkssvc_NetWkstaGetInfo);
21 if (r == NULL) {
22 return false;
25 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
26 talloc_free(r);
27 return false;
30 pull = ndr_pull_init_blob(&blob, r, NULL);
31 if (pull == NULL) {
32 talloc_free(r);
33 return false;
36 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
37 ndr_err = call->ndr_pull(pull, NDR_IN, r);
38 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
39 talloc_free(r);
40 return false;
43 if (DEBUGLEVEL >= 10) {
44 NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaGetInfo, r);
47 ZERO_STRUCT(r->out);
48 r->out.info = talloc_zero(r, union wkssvc_NetWkstaInfo);
49 if (r->out.info == NULL) {
50 talloc_free(r);
51 return false;
54 r->out.result = _wkssvc_NetWkstaGetInfo(p, r);
56 if (p->rng_fault_state) {
57 talloc_free(r);
58 /* Return true here, srv_pipe_hnd.c will take care */
59 return true;
62 if (DEBUGLEVEL >= 10) {
63 NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaGetInfo, r);
66 push = ndr_push_init_ctx(r, NULL);
67 if (push == NULL) {
68 talloc_free(r);
69 return false;
72 ndr_err = call->ndr_push(push, NDR_OUT, r);
73 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
74 talloc_free(r);
75 return false;
78 blob = ndr_push_blob(push);
79 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
80 talloc_free(r);
81 return false;
84 talloc_free(r);
86 return true;
89 static bool api_wkssvc_NetWkstaSetInfo(pipes_struct *p)
91 const struct ndr_interface_call *call;
92 struct ndr_pull *pull;
93 struct ndr_push *push;
94 enum ndr_err_code ndr_err;
95 DATA_BLOB blob;
96 struct wkssvc_NetWkstaSetInfo *r;
98 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETWKSTASETINFO];
100 r = talloc(talloc_tos(), struct wkssvc_NetWkstaSetInfo);
101 if (r == NULL) {
102 return false;
105 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
106 talloc_free(r);
107 return false;
110 pull = ndr_pull_init_blob(&blob, r, NULL);
111 if (pull == NULL) {
112 talloc_free(r);
113 return false;
116 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
117 ndr_err = call->ndr_pull(pull, NDR_IN, r);
118 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
119 talloc_free(r);
120 return false;
123 if (DEBUGLEVEL >= 10) {
124 NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaSetInfo, r);
127 ZERO_STRUCT(r->out);
128 r->out.parm_error = r->in.parm_error;
129 r->out.result = _wkssvc_NetWkstaSetInfo(p, r);
131 if (p->rng_fault_state) {
132 talloc_free(r);
133 /* Return true here, srv_pipe_hnd.c will take care */
134 return true;
137 if (DEBUGLEVEL >= 10) {
138 NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaSetInfo, r);
141 push = ndr_push_init_ctx(r, NULL);
142 if (push == NULL) {
143 talloc_free(r);
144 return false;
147 ndr_err = call->ndr_push(push, NDR_OUT, r);
148 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
149 talloc_free(r);
150 return false;
153 blob = ndr_push_blob(push);
154 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
155 talloc_free(r);
156 return false;
159 talloc_free(r);
161 return true;
164 static bool api_wkssvc_NetWkstaEnumUsers(pipes_struct *p)
166 const struct ndr_interface_call *call;
167 struct ndr_pull *pull;
168 struct ndr_push *push;
169 enum ndr_err_code ndr_err;
170 DATA_BLOB blob;
171 struct wkssvc_NetWkstaEnumUsers *r;
173 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETWKSTAENUMUSERS];
175 r = talloc(talloc_tos(), struct wkssvc_NetWkstaEnumUsers);
176 if (r == NULL) {
177 return false;
180 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
181 talloc_free(r);
182 return false;
185 pull = ndr_pull_init_blob(&blob, r, NULL);
186 if (pull == NULL) {
187 talloc_free(r);
188 return false;
191 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
192 ndr_err = call->ndr_pull(pull, NDR_IN, r);
193 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
194 talloc_free(r);
195 return false;
198 if (DEBUGLEVEL >= 10) {
199 NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaEnumUsers, r);
202 ZERO_STRUCT(r->out);
203 r->out.info = r->in.info;
204 r->out.resume_handle = r->in.resume_handle;
205 r->out.entries_read = talloc_zero(r, uint32_t);
206 if (r->out.entries_read == NULL) {
207 talloc_free(r);
208 return false;
211 r->out.result = _wkssvc_NetWkstaEnumUsers(p, r);
213 if (p->rng_fault_state) {
214 talloc_free(r);
215 /* Return true here, srv_pipe_hnd.c will take care */
216 return true;
219 if (DEBUGLEVEL >= 10) {
220 NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaEnumUsers, r);
223 push = ndr_push_init_ctx(r, NULL);
224 if (push == NULL) {
225 talloc_free(r);
226 return false;
229 ndr_err = call->ndr_push(push, NDR_OUT, r);
230 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
231 talloc_free(r);
232 return false;
235 blob = ndr_push_blob(push);
236 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
237 talloc_free(r);
238 return false;
241 talloc_free(r);
243 return true;
246 static bool api_wkssvc_NetrWkstaUserGetInfo(pipes_struct *p)
248 const struct ndr_interface_call *call;
249 struct ndr_pull *pull;
250 struct ndr_push *push;
251 enum ndr_err_code ndr_err;
252 DATA_BLOB blob;
253 struct wkssvc_NetrWkstaUserGetInfo *r;
255 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRWKSTAUSERGETINFO];
257 r = talloc(talloc_tos(), struct wkssvc_NetrWkstaUserGetInfo);
258 if (r == NULL) {
259 return false;
262 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
263 talloc_free(r);
264 return false;
267 pull = ndr_pull_init_blob(&blob, r, NULL);
268 if (pull == NULL) {
269 talloc_free(r);
270 return false;
273 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
274 ndr_err = call->ndr_pull(pull, NDR_IN, r);
275 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
276 talloc_free(r);
277 return false;
280 if (DEBUGLEVEL >= 10) {
281 NDR_PRINT_IN_DEBUG(wkssvc_NetrWkstaUserGetInfo, r);
284 ZERO_STRUCT(r->out);
285 r->out.info = talloc_zero(r, union wkssvc_NetrWkstaUserInfo);
286 if (r->out.info == NULL) {
287 talloc_free(r);
288 return false;
291 r->out.result = _wkssvc_NetrWkstaUserGetInfo(p, r);
293 if (p->rng_fault_state) {
294 talloc_free(r);
295 /* Return true here, srv_pipe_hnd.c will take care */
296 return true;
299 if (DEBUGLEVEL >= 10) {
300 NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaUserGetInfo, r);
303 push = ndr_push_init_ctx(r, NULL);
304 if (push == NULL) {
305 talloc_free(r);
306 return false;
309 ndr_err = call->ndr_push(push, NDR_OUT, r);
310 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
311 talloc_free(r);
312 return false;
315 blob = ndr_push_blob(push);
316 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
317 talloc_free(r);
318 return false;
321 talloc_free(r);
323 return true;
326 static bool api_wkssvc_NetrWkstaUserSetInfo(pipes_struct *p)
328 const struct ndr_interface_call *call;
329 struct ndr_pull *pull;
330 struct ndr_push *push;
331 enum ndr_err_code ndr_err;
332 DATA_BLOB blob;
333 struct wkssvc_NetrWkstaUserSetInfo *r;
335 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRWKSTAUSERSETINFO];
337 r = talloc(talloc_tos(), struct wkssvc_NetrWkstaUserSetInfo);
338 if (r == NULL) {
339 return false;
342 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
343 talloc_free(r);
344 return false;
347 pull = ndr_pull_init_blob(&blob, r, NULL);
348 if (pull == NULL) {
349 talloc_free(r);
350 return false;
353 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
354 ndr_err = call->ndr_pull(pull, NDR_IN, r);
355 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
356 talloc_free(r);
357 return false;
360 if (DEBUGLEVEL >= 10) {
361 NDR_PRINT_IN_DEBUG(wkssvc_NetrWkstaUserSetInfo, r);
364 ZERO_STRUCT(r->out);
365 r->out.parm_err = r->in.parm_err;
366 r->out.result = _wkssvc_NetrWkstaUserSetInfo(p, r);
368 if (p->rng_fault_state) {
369 talloc_free(r);
370 /* Return true here, srv_pipe_hnd.c will take care */
371 return true;
374 if (DEBUGLEVEL >= 10) {
375 NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaUserSetInfo, r);
378 push = ndr_push_init_ctx(r, NULL);
379 if (push == NULL) {
380 talloc_free(r);
381 return false;
384 ndr_err = call->ndr_push(push, NDR_OUT, r);
385 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
386 talloc_free(r);
387 return false;
390 blob = ndr_push_blob(push);
391 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
392 talloc_free(r);
393 return false;
396 talloc_free(r);
398 return true;
401 static bool api_wkssvc_NetWkstaTransportEnum(pipes_struct *p)
403 const struct ndr_interface_call *call;
404 struct ndr_pull *pull;
405 struct ndr_push *push;
406 enum ndr_err_code ndr_err;
407 DATA_BLOB blob;
408 struct wkssvc_NetWkstaTransportEnum *r;
410 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETWKSTATRANSPORTENUM];
412 r = talloc(talloc_tos(), struct wkssvc_NetWkstaTransportEnum);
413 if (r == NULL) {
414 return false;
417 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
418 talloc_free(r);
419 return false;
422 pull = ndr_pull_init_blob(&blob, r, NULL);
423 if (pull == NULL) {
424 talloc_free(r);
425 return false;
428 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
429 ndr_err = call->ndr_pull(pull, NDR_IN, r);
430 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
431 talloc_free(r);
432 return false;
435 if (DEBUGLEVEL >= 10) {
436 NDR_PRINT_IN_DEBUG(wkssvc_NetWkstaTransportEnum, r);
439 ZERO_STRUCT(r->out);
440 r->out.info = r->in.info;
441 r->out.resume_handle = r->in.resume_handle;
442 r->out.total_entries = talloc_zero(r, uint32_t);
443 if (r->out.total_entries == NULL) {
444 talloc_free(r);
445 return false;
448 r->out.result = _wkssvc_NetWkstaTransportEnum(p, r);
450 if (p->rng_fault_state) {
451 talloc_free(r);
452 /* Return true here, srv_pipe_hnd.c will take care */
453 return true;
456 if (DEBUGLEVEL >= 10) {
457 NDR_PRINT_OUT_DEBUG(wkssvc_NetWkstaTransportEnum, r);
460 push = ndr_push_init_ctx(r, NULL);
461 if (push == NULL) {
462 talloc_free(r);
463 return false;
466 ndr_err = call->ndr_push(push, NDR_OUT, r);
467 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
468 talloc_free(r);
469 return false;
472 blob = ndr_push_blob(push);
473 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
474 talloc_free(r);
475 return false;
478 talloc_free(r);
480 return true;
483 static bool api_wkssvc_NetrWkstaTransportAdd(pipes_struct *p)
485 const struct ndr_interface_call *call;
486 struct ndr_pull *pull;
487 struct ndr_push *push;
488 enum ndr_err_code ndr_err;
489 DATA_BLOB blob;
490 struct wkssvc_NetrWkstaTransportAdd *r;
492 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRWKSTATRANSPORTADD];
494 r = talloc(talloc_tos(), struct wkssvc_NetrWkstaTransportAdd);
495 if (r == NULL) {
496 return false;
499 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
500 talloc_free(r);
501 return false;
504 pull = ndr_pull_init_blob(&blob, r, NULL);
505 if (pull == NULL) {
506 talloc_free(r);
507 return false;
510 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
511 ndr_err = call->ndr_pull(pull, NDR_IN, r);
512 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
513 talloc_free(r);
514 return false;
517 if (DEBUGLEVEL >= 10) {
518 NDR_PRINT_IN_DEBUG(wkssvc_NetrWkstaTransportAdd, r);
521 ZERO_STRUCT(r->out);
522 r->out.parm_err = r->in.parm_err;
523 r->out.result = _wkssvc_NetrWkstaTransportAdd(p, r);
525 if (p->rng_fault_state) {
526 talloc_free(r);
527 /* Return true here, srv_pipe_hnd.c will take care */
528 return true;
531 if (DEBUGLEVEL >= 10) {
532 NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaTransportAdd, r);
535 push = ndr_push_init_ctx(r, NULL);
536 if (push == NULL) {
537 talloc_free(r);
538 return false;
541 ndr_err = call->ndr_push(push, NDR_OUT, r);
542 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
543 talloc_free(r);
544 return false;
547 blob = ndr_push_blob(push);
548 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
549 talloc_free(r);
550 return false;
553 talloc_free(r);
555 return true;
558 static bool api_wkssvc_NetrWkstaTransportDel(pipes_struct *p)
560 const struct ndr_interface_call *call;
561 struct ndr_pull *pull;
562 struct ndr_push *push;
563 enum ndr_err_code ndr_err;
564 DATA_BLOB blob;
565 struct wkssvc_NetrWkstaTransportDel *r;
567 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRWKSTATRANSPORTDEL];
569 r = talloc(talloc_tos(), struct wkssvc_NetrWkstaTransportDel);
570 if (r == NULL) {
571 return false;
574 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
575 talloc_free(r);
576 return false;
579 pull = ndr_pull_init_blob(&blob, r, NULL);
580 if (pull == NULL) {
581 talloc_free(r);
582 return false;
585 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
586 ndr_err = call->ndr_pull(pull, NDR_IN, r);
587 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
588 talloc_free(r);
589 return false;
592 if (DEBUGLEVEL >= 10) {
593 NDR_PRINT_IN_DEBUG(wkssvc_NetrWkstaTransportDel, r);
596 r->out.result = _wkssvc_NetrWkstaTransportDel(p, r);
598 if (p->rng_fault_state) {
599 talloc_free(r);
600 /* Return true here, srv_pipe_hnd.c will take care */
601 return true;
604 if (DEBUGLEVEL >= 10) {
605 NDR_PRINT_OUT_DEBUG(wkssvc_NetrWkstaTransportDel, r);
608 push = ndr_push_init_ctx(r, NULL);
609 if (push == NULL) {
610 talloc_free(r);
611 return false;
614 ndr_err = call->ndr_push(push, NDR_OUT, r);
615 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
616 talloc_free(r);
617 return false;
620 blob = ndr_push_blob(push);
621 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
622 talloc_free(r);
623 return false;
626 talloc_free(r);
628 return true;
631 static bool api_wkssvc_NetrUseAdd(pipes_struct *p)
633 const struct ndr_interface_call *call;
634 struct ndr_pull *pull;
635 struct ndr_push *push;
636 enum ndr_err_code ndr_err;
637 DATA_BLOB blob;
638 struct wkssvc_NetrUseAdd *r;
640 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRUSEADD];
642 r = talloc(talloc_tos(), struct wkssvc_NetrUseAdd);
643 if (r == NULL) {
644 return false;
647 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
648 talloc_free(r);
649 return false;
652 pull = ndr_pull_init_blob(&blob, r, NULL);
653 if (pull == NULL) {
654 talloc_free(r);
655 return false;
658 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
659 ndr_err = call->ndr_pull(pull, NDR_IN, r);
660 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
661 talloc_free(r);
662 return false;
665 if (DEBUGLEVEL >= 10) {
666 NDR_PRINT_IN_DEBUG(wkssvc_NetrUseAdd, r);
669 ZERO_STRUCT(r->out);
670 r->out.parm_err = r->in.parm_err;
671 r->out.result = _wkssvc_NetrUseAdd(p, r);
673 if (p->rng_fault_state) {
674 talloc_free(r);
675 /* Return true here, srv_pipe_hnd.c will take care */
676 return true;
679 if (DEBUGLEVEL >= 10) {
680 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseAdd, r);
683 push = ndr_push_init_ctx(r, NULL);
684 if (push == NULL) {
685 talloc_free(r);
686 return false;
689 ndr_err = call->ndr_push(push, NDR_OUT, r);
690 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
691 talloc_free(r);
692 return false;
695 blob = ndr_push_blob(push);
696 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
697 talloc_free(r);
698 return false;
701 talloc_free(r);
703 return true;
706 static bool api_wkssvc_NetrUseGetInfo(pipes_struct *p)
708 const struct ndr_interface_call *call;
709 struct ndr_pull *pull;
710 struct ndr_push *push;
711 enum ndr_err_code ndr_err;
712 DATA_BLOB blob;
713 struct wkssvc_NetrUseGetInfo *r;
715 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRUSEGETINFO];
717 r = talloc(talloc_tos(), struct wkssvc_NetrUseGetInfo);
718 if (r == NULL) {
719 return false;
722 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
723 talloc_free(r);
724 return false;
727 pull = ndr_pull_init_blob(&blob, r, NULL);
728 if (pull == NULL) {
729 talloc_free(r);
730 return false;
733 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
734 ndr_err = call->ndr_pull(pull, NDR_IN, r);
735 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
736 talloc_free(r);
737 return false;
740 if (DEBUGLEVEL >= 10) {
741 NDR_PRINT_IN_DEBUG(wkssvc_NetrUseGetInfo, r);
744 ZERO_STRUCT(r->out);
745 r->out.ctr = talloc_zero(r, union wkssvc_NetrUseGetInfoCtr);
746 if (r->out.ctr == NULL) {
747 talloc_free(r);
748 return false;
751 r->out.result = _wkssvc_NetrUseGetInfo(p, r);
753 if (p->rng_fault_state) {
754 talloc_free(r);
755 /* Return true here, srv_pipe_hnd.c will take care */
756 return true;
759 if (DEBUGLEVEL >= 10) {
760 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseGetInfo, r);
763 push = ndr_push_init_ctx(r, NULL);
764 if (push == NULL) {
765 talloc_free(r);
766 return false;
769 ndr_err = call->ndr_push(push, NDR_OUT, r);
770 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
771 talloc_free(r);
772 return false;
775 blob = ndr_push_blob(push);
776 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
777 talloc_free(r);
778 return false;
781 talloc_free(r);
783 return true;
786 static bool api_wkssvc_NetrUseDel(pipes_struct *p)
788 const struct ndr_interface_call *call;
789 struct ndr_pull *pull;
790 struct ndr_push *push;
791 enum ndr_err_code ndr_err;
792 DATA_BLOB blob;
793 struct wkssvc_NetrUseDel *r;
795 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRUSEDEL];
797 r = talloc(talloc_tos(), struct wkssvc_NetrUseDel);
798 if (r == NULL) {
799 return false;
802 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
803 talloc_free(r);
804 return false;
807 pull = ndr_pull_init_blob(&blob, r, NULL);
808 if (pull == NULL) {
809 talloc_free(r);
810 return false;
813 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
814 ndr_err = call->ndr_pull(pull, NDR_IN, r);
815 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
816 talloc_free(r);
817 return false;
820 if (DEBUGLEVEL >= 10) {
821 NDR_PRINT_IN_DEBUG(wkssvc_NetrUseDel, r);
824 r->out.result = _wkssvc_NetrUseDel(p, r);
826 if (p->rng_fault_state) {
827 talloc_free(r);
828 /* Return true here, srv_pipe_hnd.c will take care */
829 return true;
832 if (DEBUGLEVEL >= 10) {
833 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseDel, r);
836 push = ndr_push_init_ctx(r, NULL);
837 if (push == NULL) {
838 talloc_free(r);
839 return false;
842 ndr_err = call->ndr_push(push, NDR_OUT, r);
843 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
844 talloc_free(r);
845 return false;
848 blob = ndr_push_blob(push);
849 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
850 talloc_free(r);
851 return false;
854 talloc_free(r);
856 return true;
859 static bool api_wkssvc_NetrUseEnum(pipes_struct *p)
861 const struct ndr_interface_call *call;
862 struct ndr_pull *pull;
863 struct ndr_push *push;
864 enum ndr_err_code ndr_err;
865 DATA_BLOB blob;
866 struct wkssvc_NetrUseEnum *r;
868 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRUSEENUM];
870 r = talloc(talloc_tos(), struct wkssvc_NetrUseEnum);
871 if (r == NULL) {
872 return false;
875 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
876 talloc_free(r);
877 return false;
880 pull = ndr_pull_init_blob(&blob, r, NULL);
881 if (pull == NULL) {
882 talloc_free(r);
883 return false;
886 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
887 ndr_err = call->ndr_pull(pull, NDR_IN, r);
888 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
889 talloc_free(r);
890 return false;
893 if (DEBUGLEVEL >= 10) {
894 NDR_PRINT_IN_DEBUG(wkssvc_NetrUseEnum, r);
897 ZERO_STRUCT(r->out);
898 r->out.info = r->in.info;
899 r->out.resume_handle = r->in.resume_handle;
900 r->out.entries_read = talloc_zero(r, uint32_t);
901 if (r->out.entries_read == NULL) {
902 talloc_free(r);
903 return false;
906 r->out.result = _wkssvc_NetrUseEnum(p, r);
908 if (p->rng_fault_state) {
909 talloc_free(r);
910 /* Return true here, srv_pipe_hnd.c will take care */
911 return true;
914 if (DEBUGLEVEL >= 10) {
915 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUseEnum, r);
918 push = ndr_push_init_ctx(r, NULL);
919 if (push == NULL) {
920 talloc_free(r);
921 return false;
924 ndr_err = call->ndr_push(push, NDR_OUT, r);
925 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
926 talloc_free(r);
927 return false;
930 blob = ndr_push_blob(push);
931 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
932 talloc_free(r);
933 return false;
936 talloc_free(r);
938 return true;
941 static bool api_wkssvc_NetrMessageBufferSend(pipes_struct *p)
943 const struct ndr_interface_call *call;
944 struct ndr_pull *pull;
945 struct ndr_push *push;
946 enum ndr_err_code ndr_err;
947 DATA_BLOB blob;
948 struct wkssvc_NetrMessageBufferSend *r;
950 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRMESSAGEBUFFERSEND];
952 r = talloc(talloc_tos(), struct wkssvc_NetrMessageBufferSend);
953 if (r == NULL) {
954 return false;
957 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
958 talloc_free(r);
959 return false;
962 pull = ndr_pull_init_blob(&blob, r, NULL);
963 if (pull == NULL) {
964 talloc_free(r);
965 return false;
968 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
969 ndr_err = call->ndr_pull(pull, NDR_IN, r);
970 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
971 talloc_free(r);
972 return false;
975 if (DEBUGLEVEL >= 10) {
976 NDR_PRINT_IN_DEBUG(wkssvc_NetrMessageBufferSend, r);
979 r->out.result = _wkssvc_NetrMessageBufferSend(p, r);
981 if (p->rng_fault_state) {
982 talloc_free(r);
983 /* Return true here, srv_pipe_hnd.c will take care */
984 return true;
987 if (DEBUGLEVEL >= 10) {
988 NDR_PRINT_OUT_DEBUG(wkssvc_NetrMessageBufferSend, r);
991 push = ndr_push_init_ctx(r, NULL);
992 if (push == NULL) {
993 talloc_free(r);
994 return false;
997 ndr_err = call->ndr_push(push, NDR_OUT, r);
998 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
999 talloc_free(r);
1000 return false;
1003 blob = ndr_push_blob(push);
1004 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1005 talloc_free(r);
1006 return false;
1009 talloc_free(r);
1011 return true;
1014 static bool api_wkssvc_NetrWorkstationStatisticsGet(pipes_struct *p)
1016 const struct ndr_interface_call *call;
1017 struct ndr_pull *pull;
1018 struct ndr_push *push;
1019 enum ndr_err_code ndr_err;
1020 DATA_BLOB blob;
1021 struct wkssvc_NetrWorkstationStatisticsGet *r;
1023 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRWORKSTATIONSTATISTICSGET];
1025 r = talloc(talloc_tos(), struct wkssvc_NetrWorkstationStatisticsGet);
1026 if (r == NULL) {
1027 return false;
1030 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1031 talloc_free(r);
1032 return false;
1035 pull = ndr_pull_init_blob(&blob, r, NULL);
1036 if (pull == NULL) {
1037 talloc_free(r);
1038 return false;
1041 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1042 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1043 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1044 talloc_free(r);
1045 return false;
1048 if (DEBUGLEVEL >= 10) {
1049 NDR_PRINT_IN_DEBUG(wkssvc_NetrWorkstationStatisticsGet, r);
1052 ZERO_STRUCT(r->out);
1053 r->out.info = talloc_zero(r, struct wkssvc_NetrWorkstationStatistics *);
1054 if (r->out.info == NULL) {
1055 talloc_free(r);
1056 return false;
1059 r->out.result = _wkssvc_NetrWorkstationStatisticsGet(p, r);
1061 if (p->rng_fault_state) {
1062 talloc_free(r);
1063 /* Return true here, srv_pipe_hnd.c will take care */
1064 return true;
1067 if (DEBUGLEVEL >= 10) {
1068 NDR_PRINT_OUT_DEBUG(wkssvc_NetrWorkstationStatisticsGet, r);
1071 push = ndr_push_init_ctx(r, NULL);
1072 if (push == NULL) {
1073 talloc_free(r);
1074 return false;
1077 ndr_err = call->ndr_push(push, NDR_OUT, r);
1078 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1079 talloc_free(r);
1080 return false;
1083 blob = ndr_push_blob(push);
1084 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1085 talloc_free(r);
1086 return false;
1089 talloc_free(r);
1091 return true;
1094 static bool api_wkssvc_NetrLogonDomainNameAdd(pipes_struct *p)
1096 const struct ndr_interface_call *call;
1097 struct ndr_pull *pull;
1098 struct ndr_push *push;
1099 enum ndr_err_code ndr_err;
1100 DATA_BLOB blob;
1101 struct wkssvc_NetrLogonDomainNameAdd *r;
1103 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRLOGONDOMAINNAMEADD];
1105 r = talloc(talloc_tos(), struct wkssvc_NetrLogonDomainNameAdd);
1106 if (r == NULL) {
1107 return false;
1110 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1111 talloc_free(r);
1112 return false;
1115 pull = ndr_pull_init_blob(&blob, r, NULL);
1116 if (pull == NULL) {
1117 talloc_free(r);
1118 return false;
1121 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1122 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1123 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1124 talloc_free(r);
1125 return false;
1128 if (DEBUGLEVEL >= 10) {
1129 NDR_PRINT_IN_DEBUG(wkssvc_NetrLogonDomainNameAdd, r);
1132 r->out.result = _wkssvc_NetrLogonDomainNameAdd(p, r);
1134 if (p->rng_fault_state) {
1135 talloc_free(r);
1136 /* Return true here, srv_pipe_hnd.c will take care */
1137 return true;
1140 if (DEBUGLEVEL >= 10) {
1141 NDR_PRINT_OUT_DEBUG(wkssvc_NetrLogonDomainNameAdd, r);
1144 push = ndr_push_init_ctx(r, NULL);
1145 if (push == NULL) {
1146 talloc_free(r);
1147 return false;
1150 ndr_err = call->ndr_push(push, NDR_OUT, r);
1151 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1152 talloc_free(r);
1153 return false;
1156 blob = ndr_push_blob(push);
1157 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1158 talloc_free(r);
1159 return false;
1162 talloc_free(r);
1164 return true;
1167 static bool api_wkssvc_NetrLogonDomainNameDel(pipes_struct *p)
1169 const struct ndr_interface_call *call;
1170 struct ndr_pull *pull;
1171 struct ndr_push *push;
1172 enum ndr_err_code ndr_err;
1173 DATA_BLOB blob;
1174 struct wkssvc_NetrLogonDomainNameDel *r;
1176 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRLOGONDOMAINNAMEDEL];
1178 r = talloc(talloc_tos(), struct wkssvc_NetrLogonDomainNameDel);
1179 if (r == NULL) {
1180 return false;
1183 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1184 talloc_free(r);
1185 return false;
1188 pull = ndr_pull_init_blob(&blob, r, NULL);
1189 if (pull == NULL) {
1190 talloc_free(r);
1191 return false;
1194 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1195 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1196 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1197 talloc_free(r);
1198 return false;
1201 if (DEBUGLEVEL >= 10) {
1202 NDR_PRINT_IN_DEBUG(wkssvc_NetrLogonDomainNameDel, r);
1205 r->out.result = _wkssvc_NetrLogonDomainNameDel(p, r);
1207 if (p->rng_fault_state) {
1208 talloc_free(r);
1209 /* Return true here, srv_pipe_hnd.c will take care */
1210 return true;
1213 if (DEBUGLEVEL >= 10) {
1214 NDR_PRINT_OUT_DEBUG(wkssvc_NetrLogonDomainNameDel, r);
1217 push = ndr_push_init_ctx(r, NULL);
1218 if (push == NULL) {
1219 talloc_free(r);
1220 return false;
1223 ndr_err = call->ndr_push(push, NDR_OUT, r);
1224 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1225 talloc_free(r);
1226 return false;
1229 blob = ndr_push_blob(push);
1230 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1231 talloc_free(r);
1232 return false;
1235 talloc_free(r);
1237 return true;
1240 static bool api_wkssvc_NetrJoinDomain(pipes_struct *p)
1242 const struct ndr_interface_call *call;
1243 struct ndr_pull *pull;
1244 struct ndr_push *push;
1245 enum ndr_err_code ndr_err;
1246 DATA_BLOB blob;
1247 struct wkssvc_NetrJoinDomain *r;
1249 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRJOINDOMAIN];
1251 r = talloc(talloc_tos(), struct wkssvc_NetrJoinDomain);
1252 if (r == NULL) {
1253 return false;
1256 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1257 talloc_free(r);
1258 return false;
1261 pull = ndr_pull_init_blob(&blob, r, NULL);
1262 if (pull == NULL) {
1263 talloc_free(r);
1264 return false;
1267 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1268 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1269 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1270 talloc_free(r);
1271 return false;
1274 if (DEBUGLEVEL >= 10) {
1275 NDR_PRINT_IN_DEBUG(wkssvc_NetrJoinDomain, r);
1278 r->out.result = _wkssvc_NetrJoinDomain(p, r);
1280 if (p->rng_fault_state) {
1281 talloc_free(r);
1282 /* Return true here, srv_pipe_hnd.c will take care */
1283 return true;
1286 if (DEBUGLEVEL >= 10) {
1287 NDR_PRINT_OUT_DEBUG(wkssvc_NetrJoinDomain, r);
1290 push = ndr_push_init_ctx(r, NULL);
1291 if (push == NULL) {
1292 talloc_free(r);
1293 return false;
1296 ndr_err = call->ndr_push(push, NDR_OUT, r);
1297 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1298 talloc_free(r);
1299 return false;
1302 blob = ndr_push_blob(push);
1303 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1304 talloc_free(r);
1305 return false;
1308 talloc_free(r);
1310 return true;
1313 static bool api_wkssvc_NetrUnjoinDomain(pipes_struct *p)
1315 const struct ndr_interface_call *call;
1316 struct ndr_pull *pull;
1317 struct ndr_push *push;
1318 enum ndr_err_code ndr_err;
1319 DATA_BLOB blob;
1320 struct wkssvc_NetrUnjoinDomain *r;
1322 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRUNJOINDOMAIN];
1324 r = talloc(talloc_tos(), struct wkssvc_NetrUnjoinDomain);
1325 if (r == NULL) {
1326 return false;
1329 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1330 talloc_free(r);
1331 return false;
1334 pull = ndr_pull_init_blob(&blob, r, NULL);
1335 if (pull == NULL) {
1336 talloc_free(r);
1337 return false;
1340 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1341 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1342 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1343 talloc_free(r);
1344 return false;
1347 if (DEBUGLEVEL >= 10) {
1348 NDR_PRINT_IN_DEBUG(wkssvc_NetrUnjoinDomain, r);
1351 r->out.result = _wkssvc_NetrUnjoinDomain(p, r);
1353 if (p->rng_fault_state) {
1354 talloc_free(r);
1355 /* Return true here, srv_pipe_hnd.c will take care */
1356 return true;
1359 if (DEBUGLEVEL >= 10) {
1360 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUnjoinDomain, r);
1363 push = ndr_push_init_ctx(r, NULL);
1364 if (push == NULL) {
1365 talloc_free(r);
1366 return false;
1369 ndr_err = call->ndr_push(push, NDR_OUT, r);
1370 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1371 talloc_free(r);
1372 return false;
1375 blob = ndr_push_blob(push);
1376 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1377 talloc_free(r);
1378 return false;
1381 talloc_free(r);
1383 return true;
1386 static bool api_wkssvc_NetrRenameMachineInDomain(pipes_struct *p)
1388 const struct ndr_interface_call *call;
1389 struct ndr_pull *pull;
1390 struct ndr_push *push;
1391 enum ndr_err_code ndr_err;
1392 DATA_BLOB blob;
1393 struct wkssvc_NetrRenameMachineInDomain *r;
1395 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN];
1397 r = talloc(talloc_tos(), struct wkssvc_NetrRenameMachineInDomain);
1398 if (r == NULL) {
1399 return false;
1402 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1403 talloc_free(r);
1404 return false;
1407 pull = ndr_pull_init_blob(&blob, r, NULL);
1408 if (pull == NULL) {
1409 talloc_free(r);
1410 return false;
1413 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1414 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1415 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1416 talloc_free(r);
1417 return false;
1420 if (DEBUGLEVEL >= 10) {
1421 NDR_PRINT_IN_DEBUG(wkssvc_NetrRenameMachineInDomain, r);
1424 r->out.result = _wkssvc_NetrRenameMachineInDomain(p, r);
1426 if (p->rng_fault_state) {
1427 talloc_free(r);
1428 /* Return true here, srv_pipe_hnd.c will take care */
1429 return true;
1432 if (DEBUGLEVEL >= 10) {
1433 NDR_PRINT_OUT_DEBUG(wkssvc_NetrRenameMachineInDomain, r);
1436 push = ndr_push_init_ctx(r, NULL);
1437 if (push == NULL) {
1438 talloc_free(r);
1439 return false;
1442 ndr_err = call->ndr_push(push, NDR_OUT, r);
1443 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1444 talloc_free(r);
1445 return false;
1448 blob = ndr_push_blob(push);
1449 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1450 talloc_free(r);
1451 return false;
1454 talloc_free(r);
1456 return true;
1459 static bool api_wkssvc_NetrValidateName(pipes_struct *p)
1461 const struct ndr_interface_call *call;
1462 struct ndr_pull *pull;
1463 struct ndr_push *push;
1464 enum ndr_err_code ndr_err;
1465 DATA_BLOB blob;
1466 struct wkssvc_NetrValidateName *r;
1468 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRVALIDATENAME];
1470 r = talloc(talloc_tos(), struct wkssvc_NetrValidateName);
1471 if (r == NULL) {
1472 return false;
1475 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1476 talloc_free(r);
1477 return false;
1480 pull = ndr_pull_init_blob(&blob, r, NULL);
1481 if (pull == NULL) {
1482 talloc_free(r);
1483 return false;
1486 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1487 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1488 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1489 talloc_free(r);
1490 return false;
1493 if (DEBUGLEVEL >= 10) {
1494 NDR_PRINT_IN_DEBUG(wkssvc_NetrValidateName, r);
1497 r->out.result = _wkssvc_NetrValidateName(p, r);
1499 if (p->rng_fault_state) {
1500 talloc_free(r);
1501 /* Return true here, srv_pipe_hnd.c will take care */
1502 return true;
1505 if (DEBUGLEVEL >= 10) {
1506 NDR_PRINT_OUT_DEBUG(wkssvc_NetrValidateName, r);
1509 push = ndr_push_init_ctx(r, NULL);
1510 if (push == NULL) {
1511 talloc_free(r);
1512 return false;
1515 ndr_err = call->ndr_push(push, NDR_OUT, r);
1516 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1517 talloc_free(r);
1518 return false;
1521 blob = ndr_push_blob(push);
1522 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1523 talloc_free(r);
1524 return false;
1527 talloc_free(r);
1529 return true;
1532 static bool api_wkssvc_NetrGetJoinInformation(pipes_struct *p)
1534 const struct ndr_interface_call *call;
1535 struct ndr_pull *pull;
1536 struct ndr_push *push;
1537 enum ndr_err_code ndr_err;
1538 DATA_BLOB blob;
1539 struct wkssvc_NetrGetJoinInformation *r;
1541 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRGETJOININFORMATION];
1543 r = talloc(talloc_tos(), struct wkssvc_NetrGetJoinInformation);
1544 if (r == NULL) {
1545 return false;
1548 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1549 talloc_free(r);
1550 return false;
1553 pull = ndr_pull_init_blob(&blob, r, NULL);
1554 if (pull == NULL) {
1555 talloc_free(r);
1556 return false;
1559 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1560 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1561 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1562 talloc_free(r);
1563 return false;
1566 if (DEBUGLEVEL >= 10) {
1567 NDR_PRINT_IN_DEBUG(wkssvc_NetrGetJoinInformation, r);
1570 ZERO_STRUCT(r->out);
1571 r->out.name_buffer = r->in.name_buffer;
1572 r->out.name_type = talloc_zero(r, enum wkssvc_NetJoinStatus);
1573 if (r->out.name_type == NULL) {
1574 talloc_free(r);
1575 return false;
1578 r->out.result = _wkssvc_NetrGetJoinInformation(p, r);
1580 if (p->rng_fault_state) {
1581 talloc_free(r);
1582 /* Return true here, srv_pipe_hnd.c will take care */
1583 return true;
1586 if (DEBUGLEVEL >= 10) {
1587 NDR_PRINT_OUT_DEBUG(wkssvc_NetrGetJoinInformation, r);
1590 push = ndr_push_init_ctx(r, NULL);
1591 if (push == NULL) {
1592 talloc_free(r);
1593 return false;
1596 ndr_err = call->ndr_push(push, NDR_OUT, r);
1597 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1598 talloc_free(r);
1599 return false;
1602 blob = ndr_push_blob(push);
1603 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1604 talloc_free(r);
1605 return false;
1608 talloc_free(r);
1610 return true;
1613 static bool api_wkssvc_NetrGetJoinableOus(pipes_struct *p)
1615 const struct ndr_interface_call *call;
1616 struct ndr_pull *pull;
1617 struct ndr_push *push;
1618 enum ndr_err_code ndr_err;
1619 DATA_BLOB blob;
1620 struct wkssvc_NetrGetJoinableOus *r;
1622 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRGETJOINABLEOUS];
1624 r = talloc(talloc_tos(), struct wkssvc_NetrGetJoinableOus);
1625 if (r == NULL) {
1626 return false;
1629 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1630 talloc_free(r);
1631 return false;
1634 pull = ndr_pull_init_blob(&blob, r, NULL);
1635 if (pull == NULL) {
1636 talloc_free(r);
1637 return false;
1640 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1641 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1642 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1643 talloc_free(r);
1644 return false;
1647 if (DEBUGLEVEL >= 10) {
1648 NDR_PRINT_IN_DEBUG(wkssvc_NetrGetJoinableOus, r);
1651 ZERO_STRUCT(r->out);
1652 r->out.num_ous = r->in.num_ous;
1653 r->out.ous = talloc_zero(r, const char **);
1654 if (r->out.ous == NULL) {
1655 talloc_free(r);
1656 return false;
1659 r->out.result = _wkssvc_NetrGetJoinableOus(p, r);
1661 if (p->rng_fault_state) {
1662 talloc_free(r);
1663 /* Return true here, srv_pipe_hnd.c will take care */
1664 return true;
1667 if (DEBUGLEVEL >= 10) {
1668 NDR_PRINT_OUT_DEBUG(wkssvc_NetrGetJoinableOus, r);
1671 push = ndr_push_init_ctx(r, NULL);
1672 if (push == NULL) {
1673 talloc_free(r);
1674 return false;
1677 ndr_err = call->ndr_push(push, NDR_OUT, r);
1678 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1679 talloc_free(r);
1680 return false;
1683 blob = ndr_push_blob(push);
1684 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1685 talloc_free(r);
1686 return false;
1689 talloc_free(r);
1691 return true;
1694 static bool api_wkssvc_NetrJoinDomain2(pipes_struct *p)
1696 const struct ndr_interface_call *call;
1697 struct ndr_pull *pull;
1698 struct ndr_push *push;
1699 enum ndr_err_code ndr_err;
1700 DATA_BLOB blob;
1701 struct wkssvc_NetrJoinDomain2 *r;
1703 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRJOINDOMAIN2];
1705 r = talloc(talloc_tos(), struct wkssvc_NetrJoinDomain2);
1706 if (r == NULL) {
1707 return false;
1710 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1711 talloc_free(r);
1712 return false;
1715 pull = ndr_pull_init_blob(&blob, r, NULL);
1716 if (pull == NULL) {
1717 talloc_free(r);
1718 return false;
1721 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1722 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1723 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1724 talloc_free(r);
1725 return false;
1728 if (DEBUGLEVEL >= 10) {
1729 NDR_PRINT_IN_DEBUG(wkssvc_NetrJoinDomain2, r);
1732 r->out.result = _wkssvc_NetrJoinDomain2(p, r);
1734 if (p->rng_fault_state) {
1735 talloc_free(r);
1736 /* Return true here, srv_pipe_hnd.c will take care */
1737 return true;
1740 if (DEBUGLEVEL >= 10) {
1741 NDR_PRINT_OUT_DEBUG(wkssvc_NetrJoinDomain2, r);
1744 push = ndr_push_init_ctx(r, NULL);
1745 if (push == NULL) {
1746 talloc_free(r);
1747 return false;
1750 ndr_err = call->ndr_push(push, NDR_OUT, r);
1751 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1752 talloc_free(r);
1753 return false;
1756 blob = ndr_push_blob(push);
1757 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1758 talloc_free(r);
1759 return false;
1762 talloc_free(r);
1764 return true;
1767 static bool api_wkssvc_NetrUnjoinDomain2(pipes_struct *p)
1769 const struct ndr_interface_call *call;
1770 struct ndr_pull *pull;
1771 struct ndr_push *push;
1772 enum ndr_err_code ndr_err;
1773 DATA_BLOB blob;
1774 struct wkssvc_NetrUnjoinDomain2 *r;
1776 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRUNJOINDOMAIN2];
1778 r = talloc(talloc_tos(), struct wkssvc_NetrUnjoinDomain2);
1779 if (r == NULL) {
1780 return false;
1783 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1784 talloc_free(r);
1785 return false;
1788 pull = ndr_pull_init_blob(&blob, r, NULL);
1789 if (pull == NULL) {
1790 talloc_free(r);
1791 return false;
1794 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1795 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1796 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1797 talloc_free(r);
1798 return false;
1801 if (DEBUGLEVEL >= 10) {
1802 NDR_PRINT_IN_DEBUG(wkssvc_NetrUnjoinDomain2, r);
1805 r->out.result = _wkssvc_NetrUnjoinDomain2(p, r);
1807 if (p->rng_fault_state) {
1808 talloc_free(r);
1809 /* Return true here, srv_pipe_hnd.c will take care */
1810 return true;
1813 if (DEBUGLEVEL >= 10) {
1814 NDR_PRINT_OUT_DEBUG(wkssvc_NetrUnjoinDomain2, r);
1817 push = ndr_push_init_ctx(r, NULL);
1818 if (push == NULL) {
1819 talloc_free(r);
1820 return false;
1823 ndr_err = call->ndr_push(push, NDR_OUT, r);
1824 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1825 talloc_free(r);
1826 return false;
1829 blob = ndr_push_blob(push);
1830 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1831 talloc_free(r);
1832 return false;
1835 talloc_free(r);
1837 return true;
1840 static bool api_wkssvc_NetrRenameMachineInDomain2(pipes_struct *p)
1842 const struct ndr_interface_call *call;
1843 struct ndr_pull *pull;
1844 struct ndr_push *push;
1845 enum ndr_err_code ndr_err;
1846 DATA_BLOB blob;
1847 struct wkssvc_NetrRenameMachineInDomain2 *r;
1849 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN2];
1851 r = talloc(talloc_tos(), struct wkssvc_NetrRenameMachineInDomain2);
1852 if (r == NULL) {
1853 return false;
1856 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1857 talloc_free(r);
1858 return false;
1861 pull = ndr_pull_init_blob(&blob, r, NULL);
1862 if (pull == NULL) {
1863 talloc_free(r);
1864 return false;
1867 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1868 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1869 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1870 talloc_free(r);
1871 return false;
1874 if (DEBUGLEVEL >= 10) {
1875 NDR_PRINT_IN_DEBUG(wkssvc_NetrRenameMachineInDomain2, r);
1878 r->out.result = _wkssvc_NetrRenameMachineInDomain2(p, r);
1880 if (p->rng_fault_state) {
1881 talloc_free(r);
1882 /* Return true here, srv_pipe_hnd.c will take care */
1883 return true;
1886 if (DEBUGLEVEL >= 10) {
1887 NDR_PRINT_OUT_DEBUG(wkssvc_NetrRenameMachineInDomain2, r);
1890 push = ndr_push_init_ctx(r, NULL);
1891 if (push == NULL) {
1892 talloc_free(r);
1893 return false;
1896 ndr_err = call->ndr_push(push, NDR_OUT, r);
1897 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1898 talloc_free(r);
1899 return false;
1902 blob = ndr_push_blob(push);
1903 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1904 talloc_free(r);
1905 return false;
1908 talloc_free(r);
1910 return true;
1913 static bool api_wkssvc_NetrValidateName2(pipes_struct *p)
1915 const struct ndr_interface_call *call;
1916 struct ndr_pull *pull;
1917 struct ndr_push *push;
1918 enum ndr_err_code ndr_err;
1919 DATA_BLOB blob;
1920 struct wkssvc_NetrValidateName2 *r;
1922 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRVALIDATENAME2];
1924 r = talloc(talloc_tos(), struct wkssvc_NetrValidateName2);
1925 if (r == NULL) {
1926 return false;
1929 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
1930 talloc_free(r);
1931 return false;
1934 pull = ndr_pull_init_blob(&blob, r, NULL);
1935 if (pull == NULL) {
1936 talloc_free(r);
1937 return false;
1940 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
1941 ndr_err = call->ndr_pull(pull, NDR_IN, r);
1942 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1943 talloc_free(r);
1944 return false;
1947 if (DEBUGLEVEL >= 10) {
1948 NDR_PRINT_IN_DEBUG(wkssvc_NetrValidateName2, r);
1951 r->out.result = _wkssvc_NetrValidateName2(p, r);
1953 if (p->rng_fault_state) {
1954 talloc_free(r);
1955 /* Return true here, srv_pipe_hnd.c will take care */
1956 return true;
1959 if (DEBUGLEVEL >= 10) {
1960 NDR_PRINT_OUT_DEBUG(wkssvc_NetrValidateName2, r);
1963 push = ndr_push_init_ctx(r, NULL);
1964 if (push == NULL) {
1965 talloc_free(r);
1966 return false;
1969 ndr_err = call->ndr_push(push, NDR_OUT, r);
1970 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
1971 talloc_free(r);
1972 return false;
1975 blob = ndr_push_blob(push);
1976 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
1977 talloc_free(r);
1978 return false;
1981 talloc_free(r);
1983 return true;
1986 static bool api_wkssvc_NetrGetJoinableOus2(pipes_struct *p)
1988 const struct ndr_interface_call *call;
1989 struct ndr_pull *pull;
1990 struct ndr_push *push;
1991 enum ndr_err_code ndr_err;
1992 DATA_BLOB blob;
1993 struct wkssvc_NetrGetJoinableOus2 *r;
1995 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRGETJOINABLEOUS2];
1997 r = talloc(talloc_tos(), struct wkssvc_NetrGetJoinableOus2);
1998 if (r == NULL) {
1999 return false;
2002 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2003 talloc_free(r);
2004 return false;
2007 pull = ndr_pull_init_blob(&blob, r, NULL);
2008 if (pull == NULL) {
2009 talloc_free(r);
2010 return false;
2013 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2014 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2015 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2016 talloc_free(r);
2017 return false;
2020 if (DEBUGLEVEL >= 10) {
2021 NDR_PRINT_IN_DEBUG(wkssvc_NetrGetJoinableOus2, r);
2024 ZERO_STRUCT(r->out);
2025 r->out.num_ous = r->in.num_ous;
2026 r->out.ous = talloc_zero(r, const char **);
2027 if (r->out.ous == NULL) {
2028 talloc_free(r);
2029 return false;
2032 r->out.result = _wkssvc_NetrGetJoinableOus2(p, r);
2034 if (p->rng_fault_state) {
2035 talloc_free(r);
2036 /* Return true here, srv_pipe_hnd.c will take care */
2037 return true;
2040 if (DEBUGLEVEL >= 10) {
2041 NDR_PRINT_OUT_DEBUG(wkssvc_NetrGetJoinableOus2, r);
2044 push = ndr_push_init_ctx(r, NULL);
2045 if (push == NULL) {
2046 talloc_free(r);
2047 return false;
2050 ndr_err = call->ndr_push(push, NDR_OUT, r);
2051 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2052 talloc_free(r);
2053 return false;
2056 blob = ndr_push_blob(push);
2057 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2058 talloc_free(r);
2059 return false;
2062 talloc_free(r);
2064 return true;
2067 static bool api_wkssvc_NetrAddAlternateComputerName(pipes_struct *p)
2069 const struct ndr_interface_call *call;
2070 struct ndr_pull *pull;
2071 struct ndr_push *push;
2072 enum ndr_err_code ndr_err;
2073 DATA_BLOB blob;
2074 struct wkssvc_NetrAddAlternateComputerName *r;
2076 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRADDALTERNATECOMPUTERNAME];
2078 r = talloc(talloc_tos(), struct wkssvc_NetrAddAlternateComputerName);
2079 if (r == NULL) {
2080 return false;
2083 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2084 talloc_free(r);
2085 return false;
2088 pull = ndr_pull_init_blob(&blob, r, NULL);
2089 if (pull == NULL) {
2090 talloc_free(r);
2091 return false;
2094 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2095 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2096 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2097 talloc_free(r);
2098 return false;
2101 if (DEBUGLEVEL >= 10) {
2102 NDR_PRINT_IN_DEBUG(wkssvc_NetrAddAlternateComputerName, r);
2105 r->out.result = _wkssvc_NetrAddAlternateComputerName(p, r);
2107 if (p->rng_fault_state) {
2108 talloc_free(r);
2109 /* Return true here, srv_pipe_hnd.c will take care */
2110 return true;
2113 if (DEBUGLEVEL >= 10) {
2114 NDR_PRINT_OUT_DEBUG(wkssvc_NetrAddAlternateComputerName, r);
2117 push = ndr_push_init_ctx(r, NULL);
2118 if (push == NULL) {
2119 talloc_free(r);
2120 return false;
2123 ndr_err = call->ndr_push(push, NDR_OUT, r);
2124 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2125 talloc_free(r);
2126 return false;
2129 blob = ndr_push_blob(push);
2130 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2131 talloc_free(r);
2132 return false;
2135 talloc_free(r);
2137 return true;
2140 static bool api_wkssvc_NetrRemoveAlternateComputerName(pipes_struct *p)
2142 const struct ndr_interface_call *call;
2143 struct ndr_pull *pull;
2144 struct ndr_push *push;
2145 enum ndr_err_code ndr_err;
2146 DATA_BLOB blob;
2147 struct wkssvc_NetrRemoveAlternateComputerName *r;
2149 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME];
2151 r = talloc(talloc_tos(), struct wkssvc_NetrRemoveAlternateComputerName);
2152 if (r == NULL) {
2153 return false;
2156 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2157 talloc_free(r);
2158 return false;
2161 pull = ndr_pull_init_blob(&blob, r, NULL);
2162 if (pull == NULL) {
2163 talloc_free(r);
2164 return false;
2167 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2168 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2169 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2170 talloc_free(r);
2171 return false;
2174 if (DEBUGLEVEL >= 10) {
2175 NDR_PRINT_IN_DEBUG(wkssvc_NetrRemoveAlternateComputerName, r);
2178 r->out.result = _wkssvc_NetrRemoveAlternateComputerName(p, r);
2180 if (p->rng_fault_state) {
2181 talloc_free(r);
2182 /* Return true here, srv_pipe_hnd.c will take care */
2183 return true;
2186 if (DEBUGLEVEL >= 10) {
2187 NDR_PRINT_OUT_DEBUG(wkssvc_NetrRemoveAlternateComputerName, r);
2190 push = ndr_push_init_ctx(r, NULL);
2191 if (push == NULL) {
2192 talloc_free(r);
2193 return false;
2196 ndr_err = call->ndr_push(push, NDR_OUT, r);
2197 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2198 talloc_free(r);
2199 return false;
2202 blob = ndr_push_blob(push);
2203 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2204 talloc_free(r);
2205 return false;
2208 talloc_free(r);
2210 return true;
2213 static bool api_wkssvc_NetrSetPrimaryComputername(pipes_struct *p)
2215 const struct ndr_interface_call *call;
2216 struct ndr_pull *pull;
2217 struct ndr_push *push;
2218 enum ndr_err_code ndr_err;
2219 DATA_BLOB blob;
2220 struct wkssvc_NetrSetPrimaryComputername *r;
2222 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRSETPRIMARYCOMPUTERNAME];
2224 r = talloc(talloc_tos(), struct wkssvc_NetrSetPrimaryComputername);
2225 if (r == NULL) {
2226 return false;
2229 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2230 talloc_free(r);
2231 return false;
2234 pull = ndr_pull_init_blob(&blob, r, NULL);
2235 if (pull == NULL) {
2236 talloc_free(r);
2237 return false;
2240 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2241 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2242 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2243 talloc_free(r);
2244 return false;
2247 if (DEBUGLEVEL >= 10) {
2248 NDR_PRINT_IN_DEBUG(wkssvc_NetrSetPrimaryComputername, r);
2251 r->out.result = _wkssvc_NetrSetPrimaryComputername(p, r);
2253 if (p->rng_fault_state) {
2254 talloc_free(r);
2255 /* Return true here, srv_pipe_hnd.c will take care */
2256 return true;
2259 if (DEBUGLEVEL >= 10) {
2260 NDR_PRINT_OUT_DEBUG(wkssvc_NetrSetPrimaryComputername, r);
2263 push = ndr_push_init_ctx(r, NULL);
2264 if (push == NULL) {
2265 talloc_free(r);
2266 return false;
2269 ndr_err = call->ndr_push(push, NDR_OUT, r);
2270 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2271 talloc_free(r);
2272 return false;
2275 blob = ndr_push_blob(push);
2276 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2277 talloc_free(r);
2278 return false;
2281 talloc_free(r);
2283 return true;
2286 static bool api_wkssvc_NetrEnumerateComputerNames(pipes_struct *p)
2288 const struct ndr_interface_call *call;
2289 struct ndr_pull *pull;
2290 struct ndr_push *push;
2291 enum ndr_err_code ndr_err;
2292 DATA_BLOB blob;
2293 struct wkssvc_NetrEnumerateComputerNames *r;
2295 call = &ndr_table_wkssvc.calls[NDR_WKSSVC_NETRENUMERATECOMPUTERNAMES];
2297 r = talloc(talloc_tos(), struct wkssvc_NetrEnumerateComputerNames);
2298 if (r == NULL) {
2299 return false;
2302 if (!prs_data_blob(&p->in_data.data, &blob, r)) {
2303 talloc_free(r);
2304 return false;
2307 pull = ndr_pull_init_blob(&blob, r, NULL);
2308 if (pull == NULL) {
2309 talloc_free(r);
2310 return false;
2313 pull->flags |= LIBNDR_FLAG_REF_ALLOC;
2314 ndr_err = call->ndr_pull(pull, NDR_IN, r);
2315 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2316 talloc_free(r);
2317 return false;
2320 if (DEBUGLEVEL >= 10) {
2321 NDR_PRINT_IN_DEBUG(wkssvc_NetrEnumerateComputerNames, r);
2324 ZERO_STRUCT(r->out);
2325 r->out.ctr = talloc_zero(r, struct wkssvc_ComputerNamesCtr *);
2326 if (r->out.ctr == NULL) {
2327 talloc_free(r);
2328 return false;
2331 r->out.result = _wkssvc_NetrEnumerateComputerNames(p, r);
2333 if (p->rng_fault_state) {
2334 talloc_free(r);
2335 /* Return true here, srv_pipe_hnd.c will take care */
2336 return true;
2339 if (DEBUGLEVEL >= 10) {
2340 NDR_PRINT_OUT_DEBUG(wkssvc_NetrEnumerateComputerNames, r);
2343 push = ndr_push_init_ctx(r, NULL);
2344 if (push == NULL) {
2345 talloc_free(r);
2346 return false;
2349 ndr_err = call->ndr_push(push, NDR_OUT, r);
2350 if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
2351 talloc_free(r);
2352 return false;
2355 blob = ndr_push_blob(push);
2356 if (!prs_copy_data_in(&p->out_data.rdata, (const char *)blob.data, (uint32_t)blob.length)) {
2357 talloc_free(r);
2358 return false;
2361 talloc_free(r);
2363 return true;
2367 /* Tables */
2368 static struct api_struct api_wkssvc_cmds[] =
2370 {"WKSSVC_NETWKSTAGETINFO", NDR_WKSSVC_NETWKSTAGETINFO, api_wkssvc_NetWkstaGetInfo},
2371 {"WKSSVC_NETWKSTASETINFO", NDR_WKSSVC_NETWKSTASETINFO, api_wkssvc_NetWkstaSetInfo},
2372 {"WKSSVC_NETWKSTAENUMUSERS", NDR_WKSSVC_NETWKSTAENUMUSERS, api_wkssvc_NetWkstaEnumUsers},
2373 {"WKSSVC_NETRWKSTAUSERGETINFO", NDR_WKSSVC_NETRWKSTAUSERGETINFO, api_wkssvc_NetrWkstaUserGetInfo},
2374 {"WKSSVC_NETRWKSTAUSERSETINFO", NDR_WKSSVC_NETRWKSTAUSERSETINFO, api_wkssvc_NetrWkstaUserSetInfo},
2375 {"WKSSVC_NETWKSTATRANSPORTENUM", NDR_WKSSVC_NETWKSTATRANSPORTENUM, api_wkssvc_NetWkstaTransportEnum},
2376 {"WKSSVC_NETRWKSTATRANSPORTADD", NDR_WKSSVC_NETRWKSTATRANSPORTADD, api_wkssvc_NetrWkstaTransportAdd},
2377 {"WKSSVC_NETRWKSTATRANSPORTDEL", NDR_WKSSVC_NETRWKSTATRANSPORTDEL, api_wkssvc_NetrWkstaTransportDel},
2378 {"WKSSVC_NETRUSEADD", NDR_WKSSVC_NETRUSEADD, api_wkssvc_NetrUseAdd},
2379 {"WKSSVC_NETRUSEGETINFO", NDR_WKSSVC_NETRUSEGETINFO, api_wkssvc_NetrUseGetInfo},
2380 {"WKSSVC_NETRUSEDEL", NDR_WKSSVC_NETRUSEDEL, api_wkssvc_NetrUseDel},
2381 {"WKSSVC_NETRUSEENUM", NDR_WKSSVC_NETRUSEENUM, api_wkssvc_NetrUseEnum},
2382 {"WKSSVC_NETRMESSAGEBUFFERSEND", NDR_WKSSVC_NETRMESSAGEBUFFERSEND, api_wkssvc_NetrMessageBufferSend},
2383 {"WKSSVC_NETRWORKSTATIONSTATISTICSGET", NDR_WKSSVC_NETRWORKSTATIONSTATISTICSGET, api_wkssvc_NetrWorkstationStatisticsGet},
2384 {"WKSSVC_NETRLOGONDOMAINNAMEADD", NDR_WKSSVC_NETRLOGONDOMAINNAMEADD, api_wkssvc_NetrLogonDomainNameAdd},
2385 {"WKSSVC_NETRLOGONDOMAINNAMEDEL", NDR_WKSSVC_NETRLOGONDOMAINNAMEDEL, api_wkssvc_NetrLogonDomainNameDel},
2386 {"WKSSVC_NETRJOINDOMAIN", NDR_WKSSVC_NETRJOINDOMAIN, api_wkssvc_NetrJoinDomain},
2387 {"WKSSVC_NETRUNJOINDOMAIN", NDR_WKSSVC_NETRUNJOINDOMAIN, api_wkssvc_NetrUnjoinDomain},
2388 {"WKSSVC_NETRRENAMEMACHINEINDOMAIN", NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN, api_wkssvc_NetrRenameMachineInDomain},
2389 {"WKSSVC_NETRVALIDATENAME", NDR_WKSSVC_NETRVALIDATENAME, api_wkssvc_NetrValidateName},
2390 {"WKSSVC_NETRGETJOININFORMATION", NDR_WKSSVC_NETRGETJOININFORMATION, api_wkssvc_NetrGetJoinInformation},
2391 {"WKSSVC_NETRGETJOINABLEOUS", NDR_WKSSVC_NETRGETJOINABLEOUS, api_wkssvc_NetrGetJoinableOus},
2392 {"WKSSVC_NETRJOINDOMAIN2", NDR_WKSSVC_NETRJOINDOMAIN2, api_wkssvc_NetrJoinDomain2},
2393 {"WKSSVC_NETRUNJOINDOMAIN2", NDR_WKSSVC_NETRUNJOINDOMAIN2, api_wkssvc_NetrUnjoinDomain2},
2394 {"WKSSVC_NETRRENAMEMACHINEINDOMAIN2", NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN2, api_wkssvc_NetrRenameMachineInDomain2},
2395 {"WKSSVC_NETRVALIDATENAME2", NDR_WKSSVC_NETRVALIDATENAME2, api_wkssvc_NetrValidateName2},
2396 {"WKSSVC_NETRGETJOINABLEOUS2", NDR_WKSSVC_NETRGETJOINABLEOUS2, api_wkssvc_NetrGetJoinableOus2},
2397 {"WKSSVC_NETRADDALTERNATECOMPUTERNAME", NDR_WKSSVC_NETRADDALTERNATECOMPUTERNAME, api_wkssvc_NetrAddAlternateComputerName},
2398 {"WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME", NDR_WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME, api_wkssvc_NetrRemoveAlternateComputerName},
2399 {"WKSSVC_NETRSETPRIMARYCOMPUTERNAME", NDR_WKSSVC_NETRSETPRIMARYCOMPUTERNAME, api_wkssvc_NetrSetPrimaryComputername},
2400 {"WKSSVC_NETRENUMERATECOMPUTERNAMES", NDR_WKSSVC_NETRENUMERATECOMPUTERNAMES, api_wkssvc_NetrEnumerateComputerNames},
2403 void wkssvc_get_pipe_fns(struct api_struct **fns, int *n_fns)
2405 *fns = api_wkssvc_cmds;
2406 *n_fns = sizeof(api_wkssvc_cmds) / sizeof(struct api_struct);
2409 NTSTATUS rpc_wkssvc_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, const struct ndr_interface_table *table, uint32_t opnum, void *_r)
2411 if (cli->pipes_struct == NULL) {
2412 return NT_STATUS_INVALID_PARAMETER;
2415 switch (opnum)
2417 case NDR_WKSSVC_NETWKSTAGETINFO: {
2418 struct wkssvc_NetWkstaGetInfo *r = (struct wkssvc_NetWkstaGetInfo *)_r;
2419 ZERO_STRUCT(r->out);
2420 r->out.info = talloc_zero(mem_ctx, union wkssvc_NetWkstaInfo);
2421 if (r->out.info == NULL) {
2422 return NT_STATUS_NO_MEMORY;
2425 r->out.result = _wkssvc_NetWkstaGetInfo(cli->pipes_struct, r);
2426 return NT_STATUS_OK;
2429 case NDR_WKSSVC_NETWKSTASETINFO: {
2430 struct wkssvc_NetWkstaSetInfo *r = (struct wkssvc_NetWkstaSetInfo *)_r;
2431 ZERO_STRUCT(r->out);
2432 r->out.parm_error = r->in.parm_error;
2433 r->out.result = _wkssvc_NetWkstaSetInfo(cli->pipes_struct, r);
2434 return NT_STATUS_OK;
2437 case NDR_WKSSVC_NETWKSTAENUMUSERS: {
2438 struct wkssvc_NetWkstaEnumUsers *r = (struct wkssvc_NetWkstaEnumUsers *)_r;
2439 ZERO_STRUCT(r->out);
2440 r->out.info = r->in.info;
2441 r->out.resume_handle = r->in.resume_handle;
2442 r->out.entries_read = talloc_zero(mem_ctx, uint32_t);
2443 if (r->out.entries_read == NULL) {
2444 return NT_STATUS_NO_MEMORY;
2447 r->out.result = _wkssvc_NetWkstaEnumUsers(cli->pipes_struct, r);
2448 return NT_STATUS_OK;
2451 case NDR_WKSSVC_NETRWKSTAUSERGETINFO: {
2452 struct wkssvc_NetrWkstaUserGetInfo *r = (struct wkssvc_NetrWkstaUserGetInfo *)_r;
2453 ZERO_STRUCT(r->out);
2454 r->out.info = talloc_zero(mem_ctx, union wkssvc_NetrWkstaUserInfo);
2455 if (r->out.info == NULL) {
2456 return NT_STATUS_NO_MEMORY;
2459 r->out.result = _wkssvc_NetrWkstaUserGetInfo(cli->pipes_struct, r);
2460 return NT_STATUS_OK;
2463 case NDR_WKSSVC_NETRWKSTAUSERSETINFO: {
2464 struct wkssvc_NetrWkstaUserSetInfo *r = (struct wkssvc_NetrWkstaUserSetInfo *)_r;
2465 ZERO_STRUCT(r->out);
2466 r->out.parm_err = r->in.parm_err;
2467 r->out.result = _wkssvc_NetrWkstaUserSetInfo(cli->pipes_struct, r);
2468 return NT_STATUS_OK;
2471 case NDR_WKSSVC_NETWKSTATRANSPORTENUM: {
2472 struct wkssvc_NetWkstaTransportEnum *r = (struct wkssvc_NetWkstaTransportEnum *)_r;
2473 ZERO_STRUCT(r->out);
2474 r->out.info = r->in.info;
2475 r->out.resume_handle = r->in.resume_handle;
2476 r->out.total_entries = talloc_zero(mem_ctx, uint32_t);
2477 if (r->out.total_entries == NULL) {
2478 return NT_STATUS_NO_MEMORY;
2481 r->out.result = _wkssvc_NetWkstaTransportEnum(cli->pipes_struct, r);
2482 return NT_STATUS_OK;
2485 case NDR_WKSSVC_NETRWKSTATRANSPORTADD: {
2486 struct wkssvc_NetrWkstaTransportAdd *r = (struct wkssvc_NetrWkstaTransportAdd *)_r;
2487 ZERO_STRUCT(r->out);
2488 r->out.parm_err = r->in.parm_err;
2489 r->out.result = _wkssvc_NetrWkstaTransportAdd(cli->pipes_struct, r);
2490 return NT_STATUS_OK;
2493 case NDR_WKSSVC_NETRWKSTATRANSPORTDEL: {
2494 struct wkssvc_NetrWkstaTransportDel *r = (struct wkssvc_NetrWkstaTransportDel *)_r;
2495 r->out.result = _wkssvc_NetrWkstaTransportDel(cli->pipes_struct, r);
2496 return NT_STATUS_OK;
2499 case NDR_WKSSVC_NETRUSEADD: {
2500 struct wkssvc_NetrUseAdd *r = (struct wkssvc_NetrUseAdd *)_r;
2501 ZERO_STRUCT(r->out);
2502 r->out.parm_err = r->in.parm_err;
2503 r->out.result = _wkssvc_NetrUseAdd(cli->pipes_struct, r);
2504 return NT_STATUS_OK;
2507 case NDR_WKSSVC_NETRUSEGETINFO: {
2508 struct wkssvc_NetrUseGetInfo *r = (struct wkssvc_NetrUseGetInfo *)_r;
2509 ZERO_STRUCT(r->out);
2510 r->out.ctr = talloc_zero(mem_ctx, union wkssvc_NetrUseGetInfoCtr);
2511 if (r->out.ctr == NULL) {
2512 return NT_STATUS_NO_MEMORY;
2515 r->out.result = _wkssvc_NetrUseGetInfo(cli->pipes_struct, r);
2516 return NT_STATUS_OK;
2519 case NDR_WKSSVC_NETRUSEDEL: {
2520 struct wkssvc_NetrUseDel *r = (struct wkssvc_NetrUseDel *)_r;
2521 r->out.result = _wkssvc_NetrUseDel(cli->pipes_struct, r);
2522 return NT_STATUS_OK;
2525 case NDR_WKSSVC_NETRUSEENUM: {
2526 struct wkssvc_NetrUseEnum *r = (struct wkssvc_NetrUseEnum *)_r;
2527 ZERO_STRUCT(r->out);
2528 r->out.info = r->in.info;
2529 r->out.resume_handle = r->in.resume_handle;
2530 r->out.entries_read = talloc_zero(mem_ctx, uint32_t);
2531 if (r->out.entries_read == NULL) {
2532 return NT_STATUS_NO_MEMORY;
2535 r->out.result = _wkssvc_NetrUseEnum(cli->pipes_struct, r);
2536 return NT_STATUS_OK;
2539 case NDR_WKSSVC_NETRMESSAGEBUFFERSEND: {
2540 struct wkssvc_NetrMessageBufferSend *r = (struct wkssvc_NetrMessageBufferSend *)_r;
2541 r->out.result = _wkssvc_NetrMessageBufferSend(cli->pipes_struct, r);
2542 return NT_STATUS_OK;
2545 case NDR_WKSSVC_NETRWORKSTATIONSTATISTICSGET: {
2546 struct wkssvc_NetrWorkstationStatisticsGet *r = (struct wkssvc_NetrWorkstationStatisticsGet *)_r;
2547 ZERO_STRUCT(r->out);
2548 r->out.info = talloc_zero(mem_ctx, struct wkssvc_NetrWorkstationStatistics *);
2549 if (r->out.info == NULL) {
2550 return NT_STATUS_NO_MEMORY;
2553 r->out.result = _wkssvc_NetrWorkstationStatisticsGet(cli->pipes_struct, r);
2554 return NT_STATUS_OK;
2557 case NDR_WKSSVC_NETRLOGONDOMAINNAMEADD: {
2558 struct wkssvc_NetrLogonDomainNameAdd *r = (struct wkssvc_NetrLogonDomainNameAdd *)_r;
2559 r->out.result = _wkssvc_NetrLogonDomainNameAdd(cli->pipes_struct, r);
2560 return NT_STATUS_OK;
2563 case NDR_WKSSVC_NETRLOGONDOMAINNAMEDEL: {
2564 struct wkssvc_NetrLogonDomainNameDel *r = (struct wkssvc_NetrLogonDomainNameDel *)_r;
2565 r->out.result = _wkssvc_NetrLogonDomainNameDel(cli->pipes_struct, r);
2566 return NT_STATUS_OK;
2569 case NDR_WKSSVC_NETRJOINDOMAIN: {
2570 struct wkssvc_NetrJoinDomain *r = (struct wkssvc_NetrJoinDomain *)_r;
2571 r->out.result = _wkssvc_NetrJoinDomain(cli->pipes_struct, r);
2572 return NT_STATUS_OK;
2575 case NDR_WKSSVC_NETRUNJOINDOMAIN: {
2576 struct wkssvc_NetrUnjoinDomain *r = (struct wkssvc_NetrUnjoinDomain *)_r;
2577 r->out.result = _wkssvc_NetrUnjoinDomain(cli->pipes_struct, r);
2578 return NT_STATUS_OK;
2581 case NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN: {
2582 struct wkssvc_NetrRenameMachineInDomain *r = (struct wkssvc_NetrRenameMachineInDomain *)_r;
2583 r->out.result = _wkssvc_NetrRenameMachineInDomain(cli->pipes_struct, r);
2584 return NT_STATUS_OK;
2587 case NDR_WKSSVC_NETRVALIDATENAME: {
2588 struct wkssvc_NetrValidateName *r = (struct wkssvc_NetrValidateName *)_r;
2589 r->out.result = _wkssvc_NetrValidateName(cli->pipes_struct, r);
2590 return NT_STATUS_OK;
2593 case NDR_WKSSVC_NETRGETJOININFORMATION: {
2594 struct wkssvc_NetrGetJoinInformation *r = (struct wkssvc_NetrGetJoinInformation *)_r;
2595 ZERO_STRUCT(r->out);
2596 r->out.name_buffer = r->in.name_buffer;
2597 r->out.name_type = talloc_zero(mem_ctx, enum wkssvc_NetJoinStatus);
2598 if (r->out.name_type == NULL) {
2599 return NT_STATUS_NO_MEMORY;
2602 r->out.result = _wkssvc_NetrGetJoinInformation(cli->pipes_struct, r);
2603 return NT_STATUS_OK;
2606 case NDR_WKSSVC_NETRGETJOINABLEOUS: {
2607 struct wkssvc_NetrGetJoinableOus *r = (struct wkssvc_NetrGetJoinableOus *)_r;
2608 ZERO_STRUCT(r->out);
2609 r->out.num_ous = r->in.num_ous;
2610 r->out.ous = talloc_zero(mem_ctx, const char **);
2611 if (r->out.ous == NULL) {
2612 return NT_STATUS_NO_MEMORY;
2615 r->out.result = _wkssvc_NetrGetJoinableOus(cli->pipes_struct, r);
2616 return NT_STATUS_OK;
2619 case NDR_WKSSVC_NETRJOINDOMAIN2: {
2620 struct wkssvc_NetrJoinDomain2 *r = (struct wkssvc_NetrJoinDomain2 *)_r;
2621 r->out.result = _wkssvc_NetrJoinDomain2(cli->pipes_struct, r);
2622 return NT_STATUS_OK;
2625 case NDR_WKSSVC_NETRUNJOINDOMAIN2: {
2626 struct wkssvc_NetrUnjoinDomain2 *r = (struct wkssvc_NetrUnjoinDomain2 *)_r;
2627 r->out.result = _wkssvc_NetrUnjoinDomain2(cli->pipes_struct, r);
2628 return NT_STATUS_OK;
2631 case NDR_WKSSVC_NETRRENAMEMACHINEINDOMAIN2: {
2632 struct wkssvc_NetrRenameMachineInDomain2 *r = (struct wkssvc_NetrRenameMachineInDomain2 *)_r;
2633 r->out.result = _wkssvc_NetrRenameMachineInDomain2(cli->pipes_struct, r);
2634 return NT_STATUS_OK;
2637 case NDR_WKSSVC_NETRVALIDATENAME2: {
2638 struct wkssvc_NetrValidateName2 *r = (struct wkssvc_NetrValidateName2 *)_r;
2639 r->out.result = _wkssvc_NetrValidateName2(cli->pipes_struct, r);
2640 return NT_STATUS_OK;
2643 case NDR_WKSSVC_NETRGETJOINABLEOUS2: {
2644 struct wkssvc_NetrGetJoinableOus2 *r = (struct wkssvc_NetrGetJoinableOus2 *)_r;
2645 ZERO_STRUCT(r->out);
2646 r->out.num_ous = r->in.num_ous;
2647 r->out.ous = talloc_zero(mem_ctx, const char **);
2648 if (r->out.ous == NULL) {
2649 return NT_STATUS_NO_MEMORY;
2652 r->out.result = _wkssvc_NetrGetJoinableOus2(cli->pipes_struct, r);
2653 return NT_STATUS_OK;
2656 case NDR_WKSSVC_NETRADDALTERNATECOMPUTERNAME: {
2657 struct wkssvc_NetrAddAlternateComputerName *r = (struct wkssvc_NetrAddAlternateComputerName *)_r;
2658 r->out.result = _wkssvc_NetrAddAlternateComputerName(cli->pipes_struct, r);
2659 return NT_STATUS_OK;
2662 case NDR_WKSSVC_NETRREMOVEALTERNATECOMPUTERNAME: {
2663 struct wkssvc_NetrRemoveAlternateComputerName *r = (struct wkssvc_NetrRemoveAlternateComputerName *)_r;
2664 r->out.result = _wkssvc_NetrRemoveAlternateComputerName(cli->pipes_struct, r);
2665 return NT_STATUS_OK;
2668 case NDR_WKSSVC_NETRSETPRIMARYCOMPUTERNAME: {
2669 struct wkssvc_NetrSetPrimaryComputername *r = (struct wkssvc_NetrSetPrimaryComputername *)_r;
2670 r->out.result = _wkssvc_NetrSetPrimaryComputername(cli->pipes_struct, r);
2671 return NT_STATUS_OK;
2674 case NDR_WKSSVC_NETRENUMERATECOMPUTERNAMES: {
2675 struct wkssvc_NetrEnumerateComputerNames *r = (struct wkssvc_NetrEnumerateComputerNames *)_r;
2676 ZERO_STRUCT(r->out);
2677 r->out.ctr = talloc_zero(mem_ctx, struct wkssvc_ComputerNamesCtr *);
2678 if (r->out.ctr == NULL) {
2679 return NT_STATUS_NO_MEMORY;
2682 r->out.result = _wkssvc_NetrEnumerateComputerNames(cli->pipes_struct, r);
2683 return NT_STATUS_OK;
2686 default:
2687 return NT_STATUS_NOT_IMPLEMENTED;
2691 NTSTATUS rpc_wkssvc_init(void)
2693 return rpc_srv_register(SMB_RPC_INTERFACE_VERSION, "wkssvc", "wkssvc", &ndr_table_wkssvc, api_wkssvc_cmds, sizeof(api_wkssvc_cmds) / sizeof(struct api_struct));