dsdb: Use correct memory context for imessaging_client_init() in audit logging
authorAndrew Bartlett <abartlet@samba.org>
Mon, 25 Jun 2018 03:42:42 +0000 (15:42 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 26 Jun 2018 01:27:20 +0000 (03:27 +0200)
This is only used for selftest, to send out the log messages for checking.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
source4/dsdb/samdb/ldb_modules/audit_log.c
source4/dsdb/samdb/ldb_modules/group_audit.c

index fc2eb50236142bf5d753333c03ad2f399c2890f6..6ad39270d2af23a92aaf4e729e6e42b97bb610a9 100644 (file)
@@ -1566,7 +1566,9 @@ static int log_init(struct ldb_module *module)
        if (sdb_events || pwd_events) {
                context->send_samdb_events = sdb_events;
                context->send_password_events = pwd_events;
-               context->msg_ctx = imessaging_client_init(ec, lp_ctx, ec);
+               context->msg_ctx = imessaging_client_init(context,
+                                                         lp_ctx,
+                                                         ec);
        }
 
        ldb_module_set_private(module, context);
index bbd124af156c19ee1438cedf24f1756b1bac5493..31819a3a25836fe7283e279780a419c32c016de7 100644 (file)
@@ -1341,7 +1341,9 @@ static int group_init(struct ldb_module *module)
 
        if (lp_ctx && lpcfg_dsdb_group_change_notification(lp_ctx)) {
                context->send_events = true;
-               context->msg_ctx = imessaging_client_init(ec, lp_ctx, ec);
+               context->msg_ctx = imessaging_client_init(context,
+                                                         lp_ctx,
+                                                         ec);
        }
 
        ldb_module_set_private(module, context);