summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-09-25 15:59:06 -0700
committerVolker Lendecke <vl@samba.org>2010-09-26 03:29:28 +0200
commit34c0b166b6abd1d52e4c07a798f41a245d39a426 (patch)
tree520744e341a4aacdfef2e97b5e230e30747086ec /source3
parent8c55a9b459a7f54ab505954f2d1d66538dd98d1b (diff)
downloadsamba-34c0b166b6abd1d52e4c07a798f41a245d39a426.tar.gz
samba-34c0b166b6abd1d52e4c07a798f41a245d39a426.tar.bz2
samba-34c0b166b6abd1d52e4c07a798f41a245d39a426.zip
s3: Remove talloc_autofree_context() from serverid_parent_init()
Diffstat (limited to 'source3')
-rw-r--r--source3/include/serverid.h2
-rw-r--r--source3/lib/serverid.c5
-rw-r--r--source3/smbd/server.c2
3 files changed, 4 insertions, 5 deletions
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);
}