summaryrefslogtreecommitdiff
path: root/source4/smbd
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-10-23 14:31:07 +1100
committerAndrew Tridgell <tridge@samba.org>2009-10-23 14:52:18 +1100
commita7cc448dc232ac08bda0eef1bbc8e22b52eea5b5 (patch)
treef77da882624139207f81bf782352d63b7c6cab76 /source4/smbd
parent33756d6374fbeff15c2824c540f433ad6870e5c9 (diff)
downloadsamba-a7cc448dc232ac08bda0eef1bbc8e22b52eea5b5.tar.gz
samba-a7cc448dc232ac08bda0eef1bbc8e22b52eea5b5.tar.bz2
samba-a7cc448dc232ac08bda0eef1bbc8e22b52eea5b5.zip
s4-server: call the ldb_wrap_fork_hook() after a fork()
This will be used to allow us to cancel any pending transactions after a fork.
Diffstat (limited to 'source4/smbd')
-rw-r--r--source4/smbd/process_prefork.c2
-rw-r--r--source4/smbd/process_standard.c3
2 files changed, 5 insertions, 0 deletions
diff --git a/source4/smbd/process_prefork.c b/source4/smbd/process_prefork.c
index 979a65482e..db5633b9f2 100644
--- a/source4/smbd/process_prefork.c
+++ b/source4/smbd/process_prefork.c
@@ -32,6 +32,7 @@
#include "system/filesys.h"
#include "cluster/cluster.h"
#include "param/param.h"
+#include "lib/ldb_wrap.h"
#ifdef HAVE_SETPROCTITLE
#ifdef HAVE_SETPROCTITLE_H
@@ -60,6 +61,7 @@ static void prefork_reload_after_fork(void)
if (tdb_reopen_all(1) == -1) {
DEBUG(0,("prefork_reload_after_fork: tdb_reopen_all failed.\n"));
}
+ ldb_wrap_fork_hook();
/* Ensure that the forked children do not expose identical random streams */
set_need_random_reseed();
diff --git a/source4/smbd/process_standard.c b/source4/smbd/process_standard.c
index 49aaf8481a..6e7b714a63 100644
--- a/source4/smbd/process_standard.c
+++ b/source4/smbd/process_standard.c
@@ -28,6 +28,7 @@
#include "system/filesys.h"
#include "cluster/cluster.h"
#include "param/param.h"
+#include "lib/ldb_wrap.h"
#ifdef HAVE_SETPROCTITLE
#ifdef HAVE_SETPROCTITLE_H
@@ -127,6 +128,7 @@ static void standard_accept_connection(struct tevent_context *ev,
if (tdb_reopen_all(1) == -1) {
DEBUG(0,("standard_accept_connection: tdb_reopen_all failed.\n"));
}
+ ldb_wrap_fork_hook();
tevent_add_fd(ev2, ev2, child_pipe[0], TEVENT_FD_READ,
standard_pipe_handler, NULL);
@@ -194,6 +196,7 @@ static void standard_new_task(struct tevent_context *ev,
if (tdb_reopen_all(1) == -1) {
DEBUG(0,("standard_accept_connection: tdb_reopen_all failed.\n"));
}
+ ldb_wrap_fork_hook();
tevent_add_fd(ev2, ev2, child_pipe[0], TEVENT_FD_READ,
standard_pipe_handler, NULL);