summaryrefslogtreecommitdiff
path: root/source3/lib/serverid.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/serverid.c')
-rw-r--r--source3/lib/serverid.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/lib/serverid.c b/source3/lib/serverid.c
index 5401eed974..5f97bd310f 100644
--- a/source3/lib/serverid.c
+++ b/source3/lib/serverid.c
@@ -31,6 +31,12 @@ bool serverid_parent_init(void)
{
struct tdb_wrap *db;
+ /*
+ * Open the tdb in the parent process (smbd) so that our
+ * CLEAR_IF_FIRST optimization in tdb_reopen_all can properly
+ * work.
+ */
+
db = tdb_wrap_open(talloc_autofree_context(),
lock_path("serverid.tdb"),
0, TDB_DEFAULT|TDB_CLEAR_IF_FIRST, O_RDWR|O_CREAT,