1 --- a/source3/librpc/rpc/rpc_common.c
2 +++ b/source3/librpc/rpc/rpc_common.c
3 @@ -131,6 +131,7 @@ static bool initialize_interfaces(void)
4 if (!smb_register_ndr_interface(&ndr_table_initshutdown)) {
8 if (!smb_register_ndr_interface(&ndr_table_svcctl)) {
11 @@ -140,6 +141,7 @@ static bool initialize_interfaces(void)
12 if (!smb_register_ndr_interface(&ndr_table_ntsvcs)) {
16 if (!smb_register_ndr_interface(&ndr_table_epmapper)) {
19 --- a/source3/rpc_server/rpc_ep_setup.c
20 +++ b/source3/rpc_server/rpc_ep_setup.c
21 @@ -697,6 +697,7 @@ static bool spoolss_shutdown_cb(void *pt
25 +#ifdef EXTRA_SERVICES
26 static bool svcctl_init_cb(void *ptr)
28 struct dcesrv_ep_context *ep_ctx =
29 @@ -733,6 +734,7 @@ static bool svcctl_init_cb(void *ptr)
35 static bool svcctl_shutdown_cb(void *ptr)
37 @@ -741,6 +743,8 @@ static bool svcctl_shutdown_cb(void *ptr
41 +#ifdef EXTRA_SERVICES
43 static bool ntsvcs_init_cb(void *ptr)
45 struct dcesrv_ep_context *ep_ctx =
46 @@ -802,6 +806,7 @@ static bool eventlog_init_cb(void *ptr)
52 static bool initshutdown_init_cb(void *ptr)
54 @@ -1130,6 +1135,7 @@ bool dcesrv_ep_setup(struct tevent_conte
58 +#ifdef EXTRA_SERVICES
59 svcctl_cb.init = svcctl_init_cb;
60 svcctl_cb.shutdown = svcctl_shutdown_cb;
61 svcctl_cb.private_data = ep_ctx;
62 @@ -1150,6 +1156,7 @@ bool dcesrv_ep_setup(struct tevent_conte
63 if (!NT_STATUS_IS_OK(rpc_eventlog_init(&eventlog_cb))) {
68 initshutdown_cb.init = initshutdown_init_cb;
69 initshutdown_cb.shutdown = NULL;
70 --- a/source3/smbd/server_exit.c
71 +++ b/source3/smbd/server_exit.c
72 @@ -140,9 +140,11 @@ static void exit_server_common(enum serv
74 rpc_netdfs_shutdown();
75 rpc_initshutdown_shutdown();
76 +#ifdef EXTRA_SERVICES
77 rpc_eventlog_shutdown();
78 - rpc_ntsvcs_shutdown();
79 rpc_svcctl_shutdown();
80 + rpc_ntsvcs_shutdown();
82 #ifdef PRINTER_SUPPORT
83 rpc_spoolss_shutdown();
85 --- a/source3/rpcclient/rpcclient.c
86 +++ b/source3/rpcclient/rpcclient.c
87 @@ -637,9 +637,11 @@ static struct cmd_set *rpcclient_command
91 +#ifdef EXTRA_SERVICES