2 * Unix SMB/CIFS implementation.
4 * SMBD RPC service callbacks
6 * Copyright (c) 2011 Andreas Schneider <asn@samba.org>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 3 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, see <http://www.gnu.org/licenses/>.
24 #include "../librpc/gen_ndr/srv_epmapper.h"
25 #include "../librpc/gen_ndr/srv_srvsvc.h"
26 #include "../librpc/gen_ndr/srv_winreg.h"
27 #include "../librpc/gen_ndr/srv_dfs.h"
28 #include "../librpc/gen_ndr/srv_dssetup.h"
29 #include "../librpc/gen_ndr/srv_echo.h"
30 #include "../librpc/gen_ndr/srv_eventlog.h"
31 #include "../librpc/gen_ndr/srv_initshutdown.h"
32 #include "../librpc/gen_ndr/srv_lsa.h"
33 #include "../librpc/gen_ndr/srv_netlogon.h"
34 #include "../librpc/gen_ndr/srv_ntsvcs.h"
35 #include "../librpc/gen_ndr/srv_samr.h"
36 #include "../librpc/gen_ndr/srv_spoolss.h"
37 #include "../librpc/gen_ndr/srv_svcctl.h"
38 #include "../librpc/gen_ndr/srv_wkssvc.h"
40 #include "printing/nt_printing_migrate.h"
41 #include "rpc_server/eventlog/srv_eventlog_reg.h"
42 #include "rpc_server/svcctl/srv_svcctl_reg.h"
44 #include "librpc/rpc/dcerpc_ep.h"
46 #include "rpc_server/rpc_ep_setup.h"
47 #include "rpc_server/rpc_server.h"
49 struct dcesrv_ep_context {
50 struct tevent_context *ev_ctx;
51 struct messaging_context *msg_ctx;
54 static uint16_t _open_sockets(struct tevent_context *ev_ctx,
55 struct messaging_context *msg_ctx,
56 struct ndr_syntax_id syntax_id,
59 uint32_t num_ifs = iface_count();
63 if (lp_interfaces() && lp_bind_interfaces_only()) {
65 * We have been given an interfaces line, and been told to only
66 * bind to those interfaces. Create a socket per interface and
70 /* Now open a listen socket for each of the interfaces. */
71 for(i = 0; i < num_ifs; i++) {
72 const struct sockaddr_storage *ifss =
73 iface_n_sockaddr_storage(i);
75 p = setup_dcerpc_ncacn_tcpip_socket(ev_ctx,
86 const char *sock_addr = lp_socket_address();
90 for (sock_ptr = sock_addr;
91 next_token_talloc(talloc_tos(), &sock_ptr, &sock_tok, " \t,");
93 struct sockaddr_storage ss;
95 /* open an incoming socket */
96 if (!interpret_string_addr(&ss,
98 AI_NUMERICHOST|AI_PASSIVE)) {
102 p = setup_dcerpc_ncacn_tcpip_socket(ev_ctx,
117 static NTSTATUS _rpc_ep_register(struct tevent_context *ev_ctx,
118 struct messaging_context *msg_ctx,
119 const struct ndr_interface_table *iface,
123 struct dcerpc_binding_vector *v = NULL;
126 status = dcerpc_binding_vector_create(talloc_tos(),
131 if (!NT_STATUS_IS_OK(status)) {
135 status = dcerpc_ep_register(iface,
137 &iface->syntax_id.uuid,
139 if (!NT_STATUS_IS_OK(status)) {
146 static NTSTATUS _rpc_ep_unregister(const struct ndr_interface_table *iface)
148 struct dcerpc_binding_vector *v = NULL;
151 status = dcerpc_binding_vector_create(talloc_tos(),
156 if (!NT_STATUS_IS_OK(status)) {
160 status = dcerpc_ep_unregister(iface,
162 &iface->syntax_id.uuid);
163 if (!NT_STATUS_IS_OK(status)) {
170 static bool epmapper_init_cb(void *ptr)
172 struct dcesrv_ep_context *ep_ctx =
173 talloc_get_type_abort(ptr, struct dcesrv_ep_context);
176 port = _open_sockets(ep_ctx->ev_ctx,
178 ndr_table_epmapper.syntax_id,
187 static bool winreg_init_cb(void *ptr)
189 struct dcesrv_ep_context *ep_ctx =
190 talloc_get_type_abort(ptr, struct dcesrv_ep_context);
191 struct ndr_syntax_id abstract_syntax = ndr_table_winreg.syntax_id;
192 const char *pipe_name = "winreg";
193 const char *rpcsrv_type;
196 rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
201 if (StrCaseCmp(rpcsrv_type, "embedded") == 0 ||
202 StrCaseCmp(rpcsrv_type, "daemon") == 0) {
206 ok = setup_dcerpc_ncalrpc_socket(ep_ctx->ev_ctx,
213 port = _open_sockets(ep_ctx->ev_ctx,
221 status = _rpc_ep_register(ep_ctx->ev_ctx,
226 if (!NT_STATUS_IS_OK(status)) {
234 static bool winreg_shutdown_cb(void *ptr)
236 const char *rpcsrv_type;
238 rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
243 if (StrCaseCmp(rpcsrv_type, "embedded") == 0 ||
244 StrCaseCmp(rpcsrv_type, "daemon") == 0) {
247 status = _rpc_ep_unregister(&ndr_table_winreg);
248 if (!NT_STATUS_IS_OK(status)) {
256 static bool srvsvc_init_cb(void *ptr)
258 struct dcesrv_ep_context *ep_ctx =
259 talloc_get_type_abort(ptr, struct dcesrv_ep_context);
260 struct ndr_syntax_id abstract_syntax = ndr_table_srvsvc.syntax_id;
261 const char *pipe_name = "srvsvc";
262 const char *rpcsrv_type;
265 rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
270 if (StrCaseCmp(rpcsrv_type, "embedded") == 0 ||
271 StrCaseCmp(rpcsrv_type, "daemon") == 0) {
275 ok = setup_dcerpc_ncalrpc_socket(ep_ctx->ev_ctx,
283 port = _open_sockets(ep_ctx->ev_ctx,
291 status = _rpc_ep_register(ep_ctx->ev_ctx,
296 if (!NT_STATUS_IS_OK(status)) {
304 static bool srvsvc_shutdown_cb(void *ptr)
306 const char *rpcsrv_type;
308 rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
313 if (StrCaseCmp(rpcsrv_type, "embedded") == 0 ||
314 StrCaseCmp(rpcsrv_type, "daemon") == 0) {
317 status =_rpc_ep_unregister(&ndr_table_srvsvc);
318 if (!NT_STATUS_IS_OK(status)) {
326 static bool lsarpc_init_cb(void *ptr)
328 struct dcesrv_ep_context *ep_ctx =
329 talloc_get_type_abort(ptr, struct dcesrv_ep_context);
330 struct ndr_syntax_id abstract_syntax = ndr_table_lsarpc.syntax_id;
331 const char *pipe_name = "lsarpc";
332 const char *rpcsrv_type;
335 rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
340 if (StrCaseCmp(rpcsrv_type, "embedded") == 0 ||
341 StrCaseCmp(rpcsrv_type, "daemon") == 0) {
345 ok = setup_dcerpc_ncalrpc_socket(ep_ctx->ev_ctx,
353 port = _open_sockets(ep_ctx->ev_ctx,
361 status = _rpc_ep_register(ep_ctx->ev_ctx,
366 if (!NT_STATUS_IS_OK(status)) {
374 static bool lsarpc_shutdown_cb(void *ptr)
376 const char *rpcsrv_type;
378 rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
383 if (StrCaseCmp(rpcsrv_type, "embedded") == 0 ||
384 StrCaseCmp(rpcsrv_type, "daemon") == 0) {
387 status = _rpc_ep_unregister(&ndr_table_lsarpc);
388 if (!NT_STATUS_IS_OK(status)) {
396 static bool samr_init_cb(void *ptr)
398 struct dcesrv_ep_context *ep_ctx =
399 talloc_get_type_abort(ptr, struct dcesrv_ep_context);
400 struct ndr_syntax_id abstract_syntax = ndr_table_samr.syntax_id;
401 const char *pipe_name = "samr";
402 const char *rpcsrv_type;
405 rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
410 if (StrCaseCmp(rpcsrv_type, "embedded") == 0 ||
411 StrCaseCmp(rpcsrv_type, "daemon") == 0) {
415 ok = setup_dcerpc_ncalrpc_socket(ep_ctx->ev_ctx,
423 port = _open_sockets(ep_ctx->ev_ctx,
431 status = _rpc_ep_register(ep_ctx->ev_ctx,
436 if (!NT_STATUS_IS_OK(status)) {
444 static bool samr_shutdown_cb(void *ptr)
446 const char *rpcsrv_type;
448 rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
453 if (StrCaseCmp(rpcsrv_type, "embedded") == 0 ||
454 StrCaseCmp(rpcsrv_type, "daemon") == 0) {
457 status = _rpc_ep_unregister(&ndr_table_samr);
458 if (!NT_STATUS_IS_OK(status)) {
466 static bool netlogon_init_cb(void *ptr)
468 struct dcesrv_ep_context *ep_ctx =
469 talloc_get_type_abort(ptr, struct dcesrv_ep_context);
470 struct ndr_syntax_id abstract_syntax = ndr_table_netlogon.syntax_id;
471 const char *pipe_name = "netlogon";
472 const char *rpcsrv_type;
475 rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
480 if (StrCaseCmp(rpcsrv_type, "embedded") == 0 ||
481 StrCaseCmp(rpcsrv_type, "daemon") == 0) {
485 ok = setup_dcerpc_ncalrpc_socket(ep_ctx->ev_ctx,
493 port = _open_sockets(ep_ctx->ev_ctx,
501 status = _rpc_ep_register(ep_ctx->ev_ctx,
506 if (!NT_STATUS_IS_OK(status)) {
514 static bool netlogon_shutdown_cb(void *ptr)
516 const char *rpcsrv_type;
518 rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
523 if (StrCaseCmp(rpcsrv_type, "embedded") == 0 ||
524 StrCaseCmp(rpcsrv_type, "daemon") == 0) {
527 status = _rpc_ep_unregister(&ndr_table_netlogon);
528 if (!NT_STATUS_IS_OK(status)) {
536 static bool spoolss_init_cb(void *ptr)
538 struct dcesrv_ep_context *ep_ctx =
539 talloc_get_type_abort(ptr, struct dcesrv_ep_context);
540 const char *rpcsrv_type;
543 rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
549 * Migrate the printers first.
551 ok = nt_printing_tdb_migrate(ep_ctx->msg_ctx);
556 if (StrCaseCmp(rpcsrv_type, "embedded") == 0 ||
557 StrCaseCmp(rpcsrv_type, "daemon") == 0) {
560 status =_rpc_ep_register(ep_ctx->ev_ctx,
565 if (!NT_STATUS_IS_OK(status)) {
573 static bool spoolss_shutdown_cb(void *ptr)
575 const char *rpcsrv_type;
577 rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
582 srv_spoolss_cleanup();
584 if (StrCaseCmp(rpcsrv_type, "embedded") == 0 ||
585 StrCaseCmp(rpcsrv_type, "daemon") == 0) {
588 status = _rpc_ep_unregister(&ndr_table_spoolss);
589 if (!NT_STATUS_IS_OK(status)) {
597 static bool svcctl_init_cb(void *ptr)
599 struct dcesrv_ep_context *ep_ctx =
600 talloc_get_type_abort(ptr, struct dcesrv_ep_context);
601 const char *rpcsrv_type;
604 rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
609 ok = svcctl_init_winreg(ep_ctx->msg_ctx);
614 /* initialize the control hooks */
615 init_service_op_table();
617 if (StrCaseCmp(rpcsrv_type, "embedded") == 0 ||
618 StrCaseCmp(rpcsrv_type, "daemon") == 0) {
621 status = _rpc_ep_register(ep_ctx->ev_ctx,
626 if (!NT_STATUS_IS_OK(status)) {
634 static bool svcctl_shutdown_cb(void *ptr)
636 const char *rpcsrv_type;
638 rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
642 shutdown_service_op_table();
644 if (StrCaseCmp(rpcsrv_type, "embedded") == 0 ||
645 StrCaseCmp(rpcsrv_type, "daemon") == 0) {
648 status = _rpc_ep_unregister(&ndr_table_svcctl);
649 if (!NT_STATUS_IS_OK(status)) {
657 static bool ntsvcs_init_cb(void *ptr)
659 struct dcesrv_ep_context *ep_ctx =
660 talloc_get_type_abort(ptr, struct dcesrv_ep_context);
661 const char *rpcsrv_type;
663 rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
668 if (StrCaseCmp(rpcsrv_type, "embedded") == 0 ||
669 StrCaseCmp(rpcsrv_type, "daemon") == 0) {
672 status = _rpc_ep_register(ep_ctx->ev_ctx,
677 if (!NT_STATUS_IS_OK(status)) {
685 static bool ntsvcs_shutdown_cb(void *ptr)
687 const char *rpcsrv_type;
689 rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
694 if (StrCaseCmp(rpcsrv_type, "embedded") == 0 ||
695 StrCaseCmp(rpcsrv_type, "daemon") == 0) {
698 status = _rpc_ep_unregister(&ndr_table_ntsvcs);
699 if (!NT_STATUS_IS_OK(status)) {
707 static bool eventlog_init_cb(void *ptr)
709 struct dcesrv_ep_context *ep_ctx =
710 talloc_get_type_abort(ptr, struct dcesrv_ep_context);
711 const char *rpcsrv_type;
714 rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
719 ok = eventlog_init_winreg(ep_ctx->msg_ctx);
724 if (StrCaseCmp(rpcsrv_type, "embedded") == 0 ||
725 StrCaseCmp(rpcsrv_type, "daemon") == 0) {
728 status =_rpc_ep_register(ep_ctx->ev_ctx,
733 if (!NT_STATUS_IS_OK(status)) {
741 static bool eventlog_shutdown_cb(void *ptr)
743 const char *rpcsrv_type;
745 rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
750 if (StrCaseCmp(rpcsrv_type, "embedded") == 0 ||
751 StrCaseCmp(rpcsrv_type, "daemon") == 0) {
754 status = _rpc_ep_unregister(&ndr_table_eventlog);
755 if (!NT_STATUS_IS_OK(status)) {
763 static bool initshutdown_init_cb(void *ptr)
765 struct dcesrv_ep_context *ep_ctx =
766 talloc_get_type_abort(ptr, struct dcesrv_ep_context);
767 const char *rpcsrv_type;
769 rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
774 if (StrCaseCmp(rpcsrv_type, "embedded") == 0 ||
775 StrCaseCmp(rpcsrv_type, "daemon") == 0) {
778 status = _rpc_ep_register(ep_ctx->ev_ctx,
780 &ndr_table_initshutdown,
783 if (!NT_STATUS_IS_OK(status)) {
791 static bool initshutdown_shutdown_cb(void *ptr)
793 const char *rpcsrv_type;
795 rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
800 if (StrCaseCmp(rpcsrv_type, "embedded") == 0 ||
801 StrCaseCmp(rpcsrv_type, "daemon") == 0) {
804 status = _rpc_ep_unregister(&ndr_table_initshutdown);
805 if (!NT_STATUS_IS_OK(status)) {
814 static bool rpcecho_init_cb(void *ptr) {
815 struct dcesrv_ep_context *ep_ctx =
816 talloc_get_type_abort(ptr, struct dcesrv_ep_context);
817 const char *rpcsrv_type;
820 rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
825 if (StrCaseCmp(rpcsrv_type, "embedded") == 0 ||
826 StrCaseCmp(rpcsrv_type, "daemon") == 0) {
829 port = _open_sockets(ep_ctx->ev_ctx,
831 ndr_table_rpcecho.syntax_id,
837 status = _rpc_ep_register(ep_ctx->ev_ctx,
842 if (!NT_STATUS_IS_OK(status)) {
850 static bool rpcecho_shutdown_cb(void *ptr)
852 const char *rpcsrv_type;
854 rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
859 if (StrCaseCmp(rpcsrv_type, "embedded") == 0 ||
860 StrCaseCmp(rpcsrv_type, "daemon") == 0) {
863 status = _rpc_ep_unregister(&ndr_table_rpcecho);
864 if (!NT_STATUS_IS_OK(status)) {
873 static bool netdfs_init_cb(void *ptr)
875 struct dcesrv_ep_context *ep_ctx =
876 talloc_get_type_abort(ptr, struct dcesrv_ep_context);
877 struct ndr_syntax_id abstract_syntax = ndr_table_netdfs.syntax_id;
878 const char *pipe_name = "netdfs";
879 const char *rpcsrv_type;
882 rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
886 if (StrCaseCmp(rpcsrv_type, "embedded") == 0 ||
887 StrCaseCmp(rpcsrv_type, "daemon") == 0) {
891 ok = setup_dcerpc_ncalrpc_socket(ep_ctx->ev_ctx,
899 port = _open_sockets(ep_ctx->ev_ctx,
907 status = _rpc_ep_register(ep_ctx->ev_ctx,
912 if (!NT_STATUS_IS_OK(status)) {
920 static bool netdfs_shutdown_cb(void *ptr) {
921 const char *rpcsrv_type;
923 rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
928 if (StrCaseCmp(rpcsrv_type, "embedded") == 0 ||
929 StrCaseCmp(rpcsrv_type, "daemon") == 0) {
932 status = _rpc_ep_unregister(&ndr_table_netdfs);
933 if (!NT_STATUS_IS_OK(status)) {
941 static bool dssetup_init_cb(void *ptr)
943 struct dcesrv_ep_context *ep_ctx =
944 talloc_get_type_abort(ptr, struct dcesrv_ep_context);
945 struct ndr_syntax_id abstract_syntax = ndr_table_dssetup.syntax_id;
946 const char *pipe_name = "dssetup";
947 const char *rpcsrv_type;
950 rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
955 if (StrCaseCmp(rpcsrv_type, "embedded") == 0 ||
956 StrCaseCmp(rpcsrv_type, "daemon") == 0) {
960 ok = setup_dcerpc_ncalrpc_socket(ep_ctx->ev_ctx,
968 port = _open_sockets(ep_ctx->ev_ctx,
976 status = _rpc_ep_register(ep_ctx->ev_ctx,
981 if (!NT_STATUS_IS_OK(status)) {
989 static bool dssetup_shutdown_cb(void *ptr) {
990 const char *rpcsrv_type;
992 rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
997 if (StrCaseCmp(rpcsrv_type, "embedded") == 0 ||
998 StrCaseCmp(rpcsrv_type, "daemon") == 0) {
1001 status = _rpc_ep_unregister(&ndr_table_dssetup);
1002 if (!NT_STATUS_IS_OK(status)) {
1010 static bool wkssvc_init_cb(void *ptr)
1012 struct dcesrv_ep_context *ep_ctx =
1013 talloc_get_type_abort(ptr, struct dcesrv_ep_context);
1014 struct ndr_syntax_id abstract_syntax = ndr_table_wkssvc.syntax_id;
1015 const char *pipe_name = "wkssvc";
1016 const char *rpcsrv_type;
1019 rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
1023 if (StrCaseCmp(rpcsrv_type, "embedded") == 0 ||
1024 StrCaseCmp(rpcsrv_type, "daemon") == 0) {
1028 ok = setup_dcerpc_ncalrpc_socket(ep_ctx->ev_ctx,
1036 port = _open_sockets(ep_ctx->ev_ctx,
1044 status = _rpc_ep_register(ep_ctx->ev_ctx,
1049 if (!NT_STATUS_IS_OK(status)) {
1057 static bool wkssvc_shutdown_cb(void *ptr) {
1058 return NT_STATUS_IS_OK(_rpc_ep_unregister(&ndr_table_wkssvc));
1061 bool dcesrv_ep_setup(struct tevent_context *ev_ctx,
1062 struct messaging_context *msg_ctx)
1064 struct dcesrv_ep_context *ep_ctx;
1066 struct rpc_srv_callbacks epmapper_cb;
1068 struct rpc_srv_callbacks winreg_cb;
1069 struct rpc_srv_callbacks srvsvc_cb;
1071 struct rpc_srv_callbacks lsarpc_cb;
1072 struct rpc_srv_callbacks samr_cb;
1073 struct rpc_srv_callbacks netlogon_cb;
1075 struct rpc_srv_callbacks spoolss_cb;
1076 struct rpc_srv_callbacks svcctl_cb;
1077 struct rpc_srv_callbacks ntsvcs_cb;
1078 struct rpc_srv_callbacks eventlog_cb;
1079 struct rpc_srv_callbacks initshutdown_cb;
1080 struct rpc_srv_callbacks netdfs_cb;
1082 struct rpc_srv_callbacks rpcecho_cb;
1084 struct rpc_srv_callbacks dssetup_cb;
1085 struct rpc_srv_callbacks wkssvc_cb;
1087 const char *rpcsrv_type;
1089 ep_ctx = talloc(ev_ctx, struct dcesrv_ep_context);
1090 if (ep_ctx == NULL) {
1094 ep_ctx->ev_ctx = ev_ctx;
1095 ep_ctx->msg_ctx = msg_ctx;
1097 /* start endpoint mapper only if enabled */
1098 rpcsrv_type = lp_parm_const_string(GLOBAL_SECTION_SNUM,
1102 if (StrCaseCmp(rpcsrv_type, "embedded") == 0) {
1103 epmapper_cb.init = epmapper_init_cb;
1104 epmapper_cb.shutdown = NULL;
1105 epmapper_cb.private_data = ep_ctx;
1107 if (!NT_STATUS_IS_OK(rpc_epmapper_init(&epmapper_cb))) {
1112 winreg_cb.init = winreg_init_cb;
1113 winreg_cb.shutdown = winreg_shutdown_cb;
1114 winreg_cb.private_data = ep_ctx;
1115 if (!NT_STATUS_IS_OK(rpc_winreg_init(&winreg_cb))) {
1119 srvsvc_cb.init = srvsvc_init_cb;
1120 srvsvc_cb.shutdown = srvsvc_shutdown_cb;
1121 srvsvc_cb.private_data = ep_ctx;
1122 if (!NT_STATUS_IS_OK(rpc_srvsvc_init(&srvsvc_cb))) {
1127 lsarpc_cb.init = lsarpc_init_cb;
1128 lsarpc_cb.shutdown = lsarpc_shutdown_cb;
1129 lsarpc_cb.private_data = ep_ctx;
1130 if (!NT_STATUS_IS_OK(rpc_lsarpc_init(&lsarpc_cb))) {
1134 samr_cb.init = samr_init_cb;
1135 samr_cb.shutdown = samr_shutdown_cb;
1136 samr_cb.private_data = ep_ctx;
1137 if (!NT_STATUS_IS_OK(rpc_samr_init(&samr_cb))) {
1141 netlogon_cb.init = netlogon_init_cb;
1142 netlogon_cb.shutdown = netlogon_shutdown_cb;
1143 netlogon_cb.private_data = ep_ctx;
1144 if (!NT_STATUS_IS_OK(rpc_netlogon_init(&netlogon_cb))) {
1148 spoolss_cb.init = spoolss_init_cb;
1149 spoolss_cb.shutdown = spoolss_shutdown_cb;
1150 spoolss_cb.private_data = ep_ctx;
1151 if (!NT_STATUS_IS_OK(rpc_spoolss_init(&spoolss_cb))) {
1156 svcctl_cb.init = svcctl_init_cb;
1157 svcctl_cb.shutdown = svcctl_shutdown_cb;
1158 svcctl_cb.private_data = ep_ctx;
1159 if (!NT_STATUS_IS_OK(rpc_svcctl_init(&svcctl_cb))) {
1163 ntsvcs_cb.init = ntsvcs_init_cb;
1164 ntsvcs_cb.shutdown = ntsvcs_shutdown_cb;
1165 ntsvcs_cb.private_data = ep_ctx;
1166 if (!NT_STATUS_IS_OK(rpc_ntsvcs_init(&ntsvcs_cb))) {
1170 eventlog_cb.init = eventlog_init_cb;
1171 eventlog_cb.shutdown = eventlog_shutdown_cb;
1172 eventlog_cb.private_data = ep_ctx;
1173 if (!NT_STATUS_IS_OK(rpc_eventlog_init(&eventlog_cb))) {
1177 initshutdown_cb.init = initshutdown_init_cb;
1178 initshutdown_cb.shutdown = initshutdown_shutdown_cb;
1179 initshutdown_cb.private_data = ep_ctx;
1180 if (!NT_STATUS_IS_OK(rpc_initshutdown_init(&initshutdown_cb))) {
1184 netdfs_cb.init = netdfs_init_cb;
1185 netdfs_cb.shutdown = netdfs_shutdown_cb;
1186 netdfs_cb.private_data = ep_ctx;
1187 if (!NT_STATUS_IS_OK(rpc_netdfs_init(&netdfs_cb))) {
1192 rpcecho_cb.init = rpcecho_init_cb;
1193 rpcecho_cb.shutdown = rpcecho_shutdown_cb;
1194 rpcecho_cb.private_data = ep_ctx;
1195 if (!NT_STATUS_IS_OK(rpc_rpcecho_init(&rpcecho_cb))) {
1200 dssetup_cb.init = dssetup_init_cb;
1201 dssetup_cb.shutdown = dssetup_shutdown_cb;
1202 dssetup_cb.private_data = ep_ctx;
1203 if (!NT_STATUS_IS_OK(rpc_dssetup_init(&dssetup_cb))) {
1207 wkssvc_cb.init = wkssvc_init_cb;
1208 wkssvc_cb.shutdown = wkssvc_shutdown_cb;
1209 wkssvc_cb.private_data = ep_ctx;
1210 if (!NT_STATUS_IS_OK(rpc_wkssvc_init(&wkssvc_cb))) {
1217 /* vim: set ts=8 sw=8 noet cindent ft=c.doxygen: */