summaryrefslogtreecommitdiff
path: root/source4/param
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-04-17 15:21:08 +0200
committerAndrew Tridgell <tridge@samba.org>2008-04-17 15:21:08 +0200
commitdc74e0fad683cb0ef9ee5996aedadd4c377a0f00 (patch)
treee33375abeb4ec70f646e420adfe9221e1bb87a2d /source4/param
parent11703b298685c9984a6a3c3a64eddb8a1a516b90 (diff)
parentef457187b4372f039f84fbb4f6e4f0fcffd67b5b (diff)
downloadsamba-dc74e0fad683cb0ef9ee5996aedadd4c377a0f00.tar.gz
samba-dc74e0fad683cb0ef9ee5996aedadd4c377a0f00.tar.bz2
samba-dc74e0fad683cb0ef9ee5996aedadd4c377a0f00.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-test
(This used to be commit 3ab9abf40605a4a6b220faeebaef81546a8d87a0)
Diffstat (limited to 'source4/param')
-rw-r--r--source4/param/share.c3
-rw-r--r--source4/param/share.h5
-rw-r--r--source4/param/share_classic.c1
-rw-r--r--source4/param/share_ldb.c6
-rw-r--r--source4/param/tests/share.c4
5 files changed, 13 insertions, 6 deletions
diff --git a/source4/param/share.c b/source4/param/share.c
index 51134d8970..f8ee468054 100644
--- a/source4/param/share.c
+++ b/source4/param/share.c
@@ -127,6 +127,7 @@ NTSTATUS share_register(const struct share_ops *ops)
}
NTSTATUS share_get_context_by_name(TALLOC_CTX *mem_ctx, const char *backend_name,
+ struct event_context *event_ctx,
struct loadparm_context *lp_ctx,
struct share_context **ctx)
{
@@ -138,7 +139,7 @@ NTSTATUS share_get_context_by_name(TALLOC_CTX *mem_ctx, const char *backend_name
return NT_STATUS_INTERNAL_ERROR;
}
- return ops->init(mem_ctx, ops, lp_ctx, ctx);
+ return ops->init(mem_ctx, ops, event_ctx, lp_ctx, ctx);
}
/*
diff --git a/source4/param/share.h b/source4/param/share.h
index 9f9cbdce5b..2a85fd4fbb 100644
--- a/source4/param/share.h
+++ b/source4/param/share.h
@@ -47,9 +47,12 @@ struct share_info {
void *value;
};
+struct event_context;
+
struct share_ops {
const char *name;
- NTSTATUS (*init)(TALLOC_CTX *, const struct share_ops*, struct loadparm_context *lp_ctx,
+ NTSTATUS (*init)(TALLOC_CTX *, const struct share_ops*, struct event_context *ev_ctx,
+ struct loadparm_context *lp_ctx,
struct share_context **);
const char *(*string_option)(struct share_config *, const char *, const char *);
int (*int_option)(struct share_config *, const char *, int);
diff --git a/source4/param/share_classic.c b/source4/param/share_classic.c
index c3adc4473c..bac1aac2d7 100644
--- a/source4/param/share_classic.c
+++ b/source4/param/share_classic.c
@@ -25,6 +25,7 @@
static NTSTATUS sclassic_init(TALLOC_CTX *mem_ctx,
const struct share_ops *ops,
+ struct event_context *event_ctx,
struct loadparm_context *lp_ctx,
struct share_context **ctx)
{
diff --git a/source4/param/share_ldb.c b/source4/param/share_ldb.c
index fb40f1e9bf..eba1665cc9 100644
--- a/source4/param/share_ldb.c
+++ b/source4/param/share_ldb.c
@@ -27,7 +27,9 @@
#include "param/share.h"
#include "param/param.h"
-static NTSTATUS sldb_init(TALLOC_CTX *mem_ctx, const struct share_ops *ops, struct loadparm_context *lp_ctx,
+static NTSTATUS sldb_init(TALLOC_CTX *mem_ctx, const struct share_ops *ops,
+ struct event_context *ev_ctx,
+ struct loadparm_context *lp_ctx,
struct share_context **ctx)
{
struct ldb_context *sdb;
@@ -38,7 +40,7 @@ static NTSTATUS sldb_init(TALLOC_CTX *mem_ctx, const struct share_ops *ops, stru
return NT_STATUS_NO_MEMORY;
}
- sdb = ldb_wrap_connect(*ctx, lp_ctx,
+ sdb = ldb_wrap_connect(*ctx, ev_ctx, lp_ctx,
private_path(*ctx, lp_ctx, "share.ldb"),
system_session(*ctx, lp_ctx),
NULL, 0, NULL);
diff --git a/source4/param/tests/share.c b/source4/param/tests/share.c
index 6d03b4e049..c64b5c607a 100644
--- a/source4/param/tests/share.c
+++ b/source4/param/tests/share.c
@@ -182,12 +182,12 @@ static void tcase_add_share_tests(struct torture_tcase *tcase)
static bool setup_ldb(struct torture_context *tctx, void **data)
{
- return NT_STATUS_IS_OK(share_get_context_by_name(tctx, "ldb", tctx->lp_ctx, (struct share_context **)data));
+ return NT_STATUS_IS_OK(share_get_context_by_name(tctx, "ldb", tctx->ev, tctx->lp_ctx, (struct share_context **)data));
}
static bool setup_classic(struct torture_context *tctx, void **data)
{
- return NT_STATUS_IS_OK(share_get_context_by_name(tctx, "classic", tctx->lp_ctx, (struct share_context **)data));
+ return NT_STATUS_IS_OK(share_get_context_by_name(tctx, "classic", tctx->ev, tctx->lp_ctx, (struct share_context **)data));
}
static bool teardown(struct torture_context *tctx, void *data)