From 54bd30f70632b8fcbe164133d2479092b7262a29 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 25 Oct 2009 17:19:03 +1100 Subject: s4-samdb: reduce the number of samdb opens at startup Using common parameters means that the ldb_wrap code can return a reference rather than a new database --- source4/smb_server/smb_server.c | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'source4/smb_server/smb_server.c') diff --git a/source4/smb_server/smb_server.c b/source4/smb_server/smb_server.c index 9b10f66b2c..b0a37adba0 100644 --- a/source4/smb_server/smb_server.c +++ b/source4/smb_server/smb_server.c @@ -199,18 +199,6 @@ _PUBLIC_ NTSTATUS smbsrv_add_socket(struct tevent_context *event_context, } -/* - pre-open some of our ldb databases, to prevent an explosion of memory usage - when we fork - */ -static void smbsrv_preopen_ldb(struct task_server *task) -{ - /* yes, this looks strange. It is a hack to preload the - schema. I'd like to share most of the ldb context with the - child too. That will come later */ - talloc_free(samdb_connect(task, task->event_ctx, task->lp_ctx, NULL)); -} - /* open the smb server sockets */ @@ -245,8 +233,6 @@ static void smbsrv_task_init(struct task_server *task) if (!NT_STATUS_IS_OK(status)) goto failed; } - smbsrv_preopen_ldb(task); - return; failed: task_server_terminate(task, "Failed to startup smb server task", true); -- cgit