From c5d1a3c710472711baeb8d1b74951f3006f48aaa Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 15 Apr 2008 10:38:21 +0200 Subject: nmbd: call reinit_after_fork() in all needed cases metze (This used to be commit f68829ff14c457bfa98cb2ef9e8ec2e1a0b1d64d) --- source3/nmbd/asyncdns.c | 5 +++++ source3/nmbd/nmbd.c | 5 +++++ 2 files changed, 10 insertions(+) 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); -- cgit