From a3a38fdb553f978ae58bc0b62db93e1ca2908658 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 28 Jan 2011 12:33:20 +0100 Subject: s3-smbd: Init the eventlog registry on service startup. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Günther Deschner --- source3/registry/reg_init_full.c | 1 - source3/rpc_server/srv_rpc_register.c | 16 +++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/source3/registry/reg_init_full.c b/source3/registry/reg_init_full.c index fca07b1693..dabc9683f3 100644 --- a/source3/registry/reg_init_full.c +++ b/source3/registry/reg_init_full.c @@ -99,7 +99,6 @@ WERROR registry_init_full(void) /* add any keys for other services */ svcctl_init_keys(); - eventlog_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 73e2dc766d..1e938622c2 100644 --- a/source3/rpc_server/srv_rpc_register.c +++ b/source3/rpc_server/srv_rpc_register.c @@ -38,6 +38,7 @@ #include "../librpc/gen_ndr/srv_wkssvc.h" #include "printing/nt_printing_migrate.h" +#include "rpc_server/srv_eventlog_reg.h" #include "librpc/rpc/dcerpc_ep.h" @@ -211,8 +212,17 @@ static bool ntsvcs_shutdown_cb(void *ptr) static bool eventlog_init_cb(void *ptr) { - return NT_STATUS_IS_OK(_rpc_ep_register(&ndr_table_eventlog, - "eventlog")); + struct messaging_context *msg_ctx = talloc_get_type_abort( + ptr, struct messaging_context); + NTSTATUS status; + + status =_rpc_ep_register(&ndr_table_eventlog, + "eventlog"); + if (!NT_STATUS_IS_OK(status)) { + return false; + } + + return eventlog_init_winreg(msg_ctx); } static bool eventlog_shutdown_cb(void *ptr) @@ -355,7 +365,7 @@ bool srv_rpc_register(struct messaging_context *msg_ctx) { eventlog_cb.init = eventlog_init_cb; eventlog_cb.shutdown = eventlog_shutdown_cb; - eventlog_cb.private_data = NULL; + eventlog_cb.private_data = msg_ctx; if (!NT_STATUS_IS_OK(rpc_eventlog_init(&eventlog_cb))) { return false; } -- cgit