/*
* 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
uint32_t msg_flags;
};
-bool serverid_parent_init(void)
+bool serverid_parent_init(TALLOC_CTX *mem_ctx)
{
struct tdb_wrap *db;
* 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) {