diff options
author | Andreas Schneider <asn@samba.org> | 2011-01-28 12:33:20 +0100 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2011-02-07 12:32:00 +0100 |
commit | a3a38fdb553f978ae58bc0b62db93e1ca2908658 (patch) | |
tree | 39d84f08e913a14a00bf51b474c4ce0d59bcd174 | |
parent | 34e8a50e5a71ab0d31bd0c5375a84d3b3ecf61e9 (diff) | |
download | samba-a3a38fdb553f978ae58bc0b62db93e1ca2908658.tar.gz samba-a3a38fdb553f978ae58bc0b62db93e1ca2908658.tar.bz2 samba-a3a38fdb553f978ae58bc0b62db93e1ca2908658.zip |
s3-smbd: Init the eventlog registry on service startup.
Signed-off-by: Günther Deschner <gd@samba.org>
-rw-r--r-- | source3/registry/reg_init_full.c | 1 | ||||
-rw-r--r-- | 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; } |