From 34c0b166b6abd1d52e4c07a798f41a245d39a426 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 25 Sep 2010 15:59:06 -0700 Subject: s3: Remove talloc_autofree_context() from serverid_parent_init() --- source3/include/serverid.h | 2 +- source3/lib/serverid.c | 5 ++--- source3/smbd/server.c | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) (limited to 'source3') diff --git a/source3/include/serverid.h b/source3/include/serverid.h index 3fcb5548d6..62bf638214 100644 --- a/source3/include/serverid.h +++ b/source3/include/serverid.h @@ -62,6 +62,6 @@ bool serverid_traverse_read(int (*fn)(const struct server_id *id, /* * Ensure CLEAR_IF_FIRST works fine, to be called from the parent smbd */ -bool serverid_parent_init(void); +bool serverid_parent_init(TALLOC_CTX *mem_ctx); #endif diff --git a/source3/lib/serverid.c b/source3/lib/serverid.c index fefcc5df7c..3c86701596 100644 --- a/source3/lib/serverid.c +++ b/source3/lib/serverid.c @@ -33,7 +33,7 @@ struct serverid_data { uint32_t msg_flags; }; -bool serverid_parent_init(void) +bool serverid_parent_init(TALLOC_CTX *mem_ctx) { struct tdb_wrap *db; @@ -43,8 +43,7 @@ bool serverid_parent_init(void) * work. */ - db = tdb_wrap_open(talloc_autofree_context(), - lock_path("serverid.tdb"), + db = tdb_wrap_open(mem_ctx, lock_path("serverid.tdb"), 0, TDB_DEFAULT|TDB_CLEAR_IF_FIRST, O_RDWR|O_CREAT, 0644); if (db == NULL) { diff --git a/source3/smbd/server.c b/source3/smbd/server.c index 6ae678dbde..2322d1fb4e 100644 --- a/source3/smbd/server.c +++ b/source3/smbd/server.c @@ -1134,7 +1134,7 @@ extern void build_options(bool screen); exit(1); } - if (!serverid_parent_init()) { + if (!serverid_parent_init(smbd_event_context())) { exit(1); } -- cgit