summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2008-04-15 10:38:21 +0200
committerStefan Metzmacher <metze@samba.org>2008-04-18 15:00:19 +0200
commitc5d1a3c710472711baeb8d1b74951f3006f48aaa (patch)
tree67a14549b696aaf9f441da005daca213dcb1ffd3
parentc5615c6113a72b2665efab1c1fcf50f0a85dfc8f (diff)
downloadsamba-c5d1a3c710472711baeb8d1b74951f3006f48aaa.tar.gz
samba-c5d1a3c710472711baeb8d1b74951f3006f48aaa.tar.bz2
samba-c5d1a3c710472711baeb8d1b74951f3006f48aaa.zip
nmbd: call reinit_after_fork() in all needed cases
metze (This used to be commit f68829ff14c457bfa98cb2ef9e8ec2e1a0b1d64d)
-rw-r--r--source3/nmbd/asyncdns.c5
-rw-r--r--source3/nmbd/nmbd.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/source3/nmbd/asyncdns.c b/source3/nmbd/asyncdns.c
index 5e5565991e..0329491c4a 100644
--- a/source3/nmbd/asyncdns.c
+++ b/source3/nmbd/asyncdns.c
@@ -164,6 +164,11 @@ void start_async_dns(void)
CatchSignal(SIGHUP, SIG_IGN);
CatchSignal(SIGTERM, SIGNAL_CAST sig_term );
+ if (!reinit_after_fork(nmbd_messaging_context())) {
+ DEBUG(0,("reinit_after_fork() failed\n"));
+ smb_panic("reinit_after_fork() failed");
+ }
+
asyncdns_process();
}
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index 01fdbbc5a4..e765fcb725 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -901,6 +901,11 @@ static bool open_sockets(bool isdaemon, int port)
pidfile_create("nmbd");
+ if (!reinit_after_fork(nmbd_messaging_context())) {
+ DEBUG(0,("reinit_after_fork() failed\n"));
+ exit(1);
+ }
+
/* get broadcast messages */
claim_connection(NULL,"",FLAG_MSG_GENERAL|FLAG_MSG_DBWRAP);