summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2011-02-01 11:50:10 +0100
committerGünther Deschner <gd@samba.org>2011-02-07 12:32:01 +0100
commitb2ddfc642d0d6a39e6962c61dd178c69f0cd801b (patch)
tree184d511a78bcdaad64ec79731c7c06f2eedcd817
parentf1d5cea322f26aae23ee5fb57207648ec15f8218 (diff)
downloadsamba-b2ddfc642d0d6a39e6962c61dd178c69f0cd801b.tar.gz
samba-b2ddfc642d0d6a39e6962c61dd178c69f0cd801b.tar.bz2
samba-b2ddfc642d0d6a39e6962c61dd178c69f0cd801b.zip
s3-smbd: Init the svcctl registry keys on service startup.
Signed-off-by: Günther Deschner <gd@samba.org>
-rw-r--r--source3/registry/reg_init_full.c2
-rw-r--r--source3/rpc_server/srv_rpc_register.c17
2 files changed, 16 insertions, 3 deletions
diff --git a/source3/registry/reg_init_full.c b/source3/registry/reg_init_full.c
index 39ce8f348b..f14ffd0709 100644
--- a/source3/registry/reg_init_full.c
+++ b/source3/registry/reg_init_full.c
@@ -96,8 +96,6 @@ WERROR registry_init_full(void)
reghook_dump_cache(20);
/* add any keys for other services */
-
- svcctl_init_keys();
perfcount_init_keys();
fail:
diff --git a/source3/rpc_server/srv_rpc_register.c b/source3/rpc_server/srv_rpc_register.c
index 1e938622c2..8cb6e8e334 100644
--- a/source3/rpc_server/srv_rpc_register.c
+++ b/source3/rpc_server/srv_rpc_register.c
@@ -39,6 +39,7 @@
#include "printing/nt_printing_migrate.h"
#include "rpc_server/srv_eventlog_reg.h"
+#include "rpc_server/srv_svcctl_reg.h"
#include "librpc/rpc/dcerpc_ep.h"
@@ -192,11 +193,25 @@ static bool spoolss_shutdown_cb(void *ptr)
static bool svcctl_init_cb(void *ptr)
{
+ struct messaging_context *msg_ctx = talloc_get_type_abort(
+ ptr, struct messaging_context);
+ bool ok;
+
+ ok = svcctl_init_winreg(msg_ctx);
+ if (!ok) {
+ return false;
+ }
+
+ /* initialize the control hooks */
+ init_service_op_table();
+
return NT_STATUS_IS_OK(_rpc_ep_register(&ndr_table_svcctl, "svcctl"));
}
static bool svcctl_shutdown_cb(void *ptr)
{
+ shutdown_service_op_table();
+
return NT_STATUS_IS_OK(_rpc_ep_unregister(&ndr_table_svcctl));
}
@@ -351,7 +366,7 @@ bool srv_rpc_register(struct messaging_context *msg_ctx) {
svcctl_cb.init = svcctl_init_cb;
svcctl_cb.shutdown = svcctl_shutdown_cb;
- svcctl_cb.private_data = NULL;
+ svcctl_cb.private_data = msg_ctx;
if (!NT_STATUS_IS_OK(rpc_svcctl_init(&svcctl_cb))) {
return false;
}