1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
|
--- a/source3/rpc_server/rpc_ep_setup.c
+++ b/source3/rpc_server/rpc_ep_setup.c
@@ -409,6 +409,7 @@ static bool epmapper_shutdown_cb(void *p
return true;
}
+#ifdef WINREG_SUPPORT
static bool winreg_init_cb(void *ptr)
{
struct dcesrv_ep_context *ep_ctx =
@@ -456,6 +457,7 @@ static bool winreg_init_cb(void *ptr)
return true;
}
+#endif
static bool srvsvc_init_cb(void *ptr)
{
@@ -710,10 +712,12 @@ static bool svcctl_init_cb(void *ptr)
"epmapper",
"none");
+#ifdef WINREG_SUPPORT
ok = svcctl_init_winreg(ep_ctx->msg_ctx);
if (!ok) {
return false;
}
+#endif
/* initialize the control hooks */
init_service_op_table();
@@ -785,10 +789,12 @@ static bool eventlog_init_cb(void *ptr)
"epmapper",
"none");
+#ifdef WINREG_SUPPORT
ok = eventlog_init_winreg(ep_ctx->msg_ctx);
if (!ok) {
return false;
}
+#endif
if (StrCaseCmp(rpcsrv_type, "embedded") == 0 ||
StrCaseCmp(rpcsrv_type, "daemon") == 0) {
@@ -1077,12 +1083,14 @@ bool dcesrv_ep_setup(struct tevent_conte
}
}
+#ifdef WINREG_SUPPORT
winreg_cb.init = winreg_init_cb;
winreg_cb.shutdown = NULL;
winreg_cb.private_data = ep_ctx;
if (!NT_STATUS_IS_OK(rpc_winreg_init(&winreg_cb))) {
return false;
}
+#endif
srvsvc_cb.init = srvsvc_init_cb;
srvsvc_cb.shutdown = NULL;
--- a/source3/smbd/server_exit.c
+++ b/source3/smbd/server_exit.c
@@ -150,7 +150,9 @@ static void exit_server_common(enum serv
#endif
rpc_srvsvc_shutdown();
+#ifdef WINREG_SUPPORT
rpc_winreg_shutdown();
+#endif
rpc_netlogon_shutdown();
rpc_samr_shutdown();
--- a/source3/librpc/rpc/rpc_common.c
+++ b/source3/librpc/rpc/rpc_common.c
@@ -112,9 +112,11 @@ static bool initialize_interfaces(void)
if (!smb_register_ndr_interface(&ndr_table_wkssvc)) {
return false;
}
+#ifdef WINREG_SUPPORT
if (!smb_register_ndr_interface(&ndr_table_winreg)) {
return false;
}
+#endif
#ifdef PRINTER_SUPPORT
if (!smb_register_ndr_interface(&ndr_table_spoolss)) {
return false;
--- a/source3/rpc_server/svcctl/srv_svcctl_nt.c
+++ b/source3/rpc_server/svcctl/srv_svcctl_nt.c
@@ -95,9 +95,11 @@ bool init_service_op_table( void )
svcctl_ops[i].ops = &netlogon_svc_ops;
i++;
+#ifdef WINREG_SUPPORT
svcctl_ops[i].name = talloc_strdup( svcctl_ops, "RemoteRegistry" );
svcctl_ops[i].ops = &winreg_svc_ops;
i++;
+#endif
svcctl_ops[i].name = talloc_strdup( svcctl_ops, "WINS" );
svcctl_ops[i].ops = &wins_svc_ops;
--- a/source3/services/svc_winreg_glue.c
+++ b/source3/services/svc_winreg_glue.c
@@ -88,6 +88,10 @@ struct security_descriptor *svcctl_get_s
NTSTATUS status;
WERROR result = WERR_OK;
+#ifndef WINREG_SUPPORT
+ return NULL;
+#endif
+
key = talloc_asprintf(mem_ctx,
"%s\\%s\\Security",
TOP_LEVEL_SERVICES_KEY, name);
@@ -161,6 +165,10 @@ bool svcctl_set_secdesc(struct messaging
NTSTATUS status;
WERROR result = WERR_OK;
+#ifndef WINREG_SUPPORT
+ return false;
+#endif
+
tmp_ctx = talloc_stackframe();
if (tmp_ctx == NULL) {
return false;
@@ -272,6 +280,10 @@ const char *svcctl_get_string_value(TALL
NTSTATUS status;
WERROR result = WERR_OK;
+#ifndef WINREG_SUPPORT
+ return NULL;
+#endif
+
tmp_ctx = talloc_stackframe();
if (tmp_ctx == NULL) {
return NULL;
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -642,7 +642,9 @@ static struct cmd_set *rpcclient_command
drsuapi_commands,
eventlog_commands,
#endif
+#ifdef WINREG_SUPPORT
winreg_commands,
+#endif
NULL
};
|