summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2008-04-21 19:53:29 -0400
committerSimo Sorce <idra@samba.org>2008-04-21 19:53:29 -0400
commit7dddab3f6cdb36a537ca3ed9c9f3461993d1c11c (patch)
tree9a1c8079bbaab506b6f14775e8a9a525b4568415 /source4/dsdb
parentc8eb82816f3ce5eea3855dbfa878a1c383e5d16f (diff)
downloadsamba-7dddab3f6cdb36a537ca3ed9c9f3461993d1c11c.tar.gz
samba-7dddab3f6cdb36a537ca3ed9c9f3461993d1c11c.tar.bz2
samba-7dddab3f6cdb36a537ca3ed9c9f3461993d1c11c.zip
Make sure we have an event context available
(This used to be commit b7c96e0cc270bd3b1c9bd117a22df3f657b6acd5)
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/samdb/samdb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/samdb.c b/source4/dsdb/samdb/samdb.c
index 4af7fb7963..9154f5382b 100644
--- a/source4/dsdb/samdb/samdb.c
+++ b/source4/dsdb/samdb/samdb.c
@@ -37,6 +37,7 @@
#include "dsdb/samdb/samdb.h"
#include "dsdb/common/flags.h"
#include "param/param.h"
+#include "lib/events/events.h"
char *samdb_relative_path(struct ldb_context *ldb,
TALLOC_CTX *mem_ctx,
@@ -116,6 +117,12 @@ int samdb_copy_template(struct ldb_context *ldb,
event_ctx = (struct event_context *)ldb_get_opaque(ldb, "EventContext");
lp_ctx = (struct loadparm_context *)ldb_get_opaque(ldb, "loadparm");
+ /* FIXME: need to remove this wehn we finally pass the event
+ * context around in ldb */
+ if (event_ctx == NULL) {
+ event_ctx = event_context_init(templates_ldb);
+ }
+
templates_ldb = ldb_wrap_connect(ldb, event_ctx, lp_ctx,
templates_ldb_path, NULL,
NULL, 0, NULL);