diff options
author | Alexander Bokovoy <ab@samba.org> | 2008-04-21 11:38:20 +0400 |
---|---|---|
committer | Alexander Bokovoy <ab@samba.org> | 2008-04-21 11:38:20 +0400 |
commit | ff615f232968979f57a31f43a4f668c2c4fd20df (patch) | |
tree | 8e4d6e1181001dd35e32008a3401020c013e288b /source3/nmbd | |
parent | 09caab9f37d6ecd4fd6fe9ce3c284730b232651a (diff) | |
parent | 0db7aba8af80a01150d1061a4192ab814e4234b7 (diff) | |
download | samba-ff615f232968979f57a31f43a4f668c2c4fd20df.tar.gz samba-ff615f232968979f57a31f43a4f668c2c4fd20df.tar.bz2 samba-ff615f232968979f57a31f43a4f668c2c4fd20df.zip |
Merge branch 'v3-2-test' of ssh://git.samba.org/data/git/samba into v3-2-test
(This used to be commit 2c3ffc1c53550c8e6feeca8fc0270ef9ac1ec70a)
Diffstat (limited to 'source3/nmbd')
-rw-r--r-- | source3/nmbd/asyncdns.c | 5 | ||||
-rw-r--r-- | source3/nmbd/nmbd.c | 20 |
2 files changed, 22 insertions, 3 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..9396219ea7 100644 --- a/source3/nmbd/nmbd.c +++ b/source3/nmbd/nmbd.c @@ -762,6 +762,8 @@ static bool open_sockets(bool isdaemon, int port) }; TALLOC_CTX *frame = talloc_stackframe(); /* Setup tos. */ + db_tdb2_setup_messaging(NULL, false); + load_case_tables(); global_nmb_port = NMB_PORT; @@ -847,7 +849,16 @@ static bool open_sockets(bool isdaemon, int port) DEBUG(0,("nmbd version %s started.\n", SAMBA_VERSION_STRING)); DEBUGADD(0,("%s\n", COPYRIGHT_STARTUP_MESSAGE)); - db_tdb2_setup_messaging(NULL, false); + if (!lp_load_initial_only(get_dyn_CONFIGFILE())) { + DEBUG(0, ("error opening config file\n")); + exit(1); + } + + if (nmbd_messaging_context() == NULL) { + return 1; + } + + db_tdb2_setup_messaging(nmbd_messaging_context(), true); if ( !reload_nmbd_services(False) ) return(-1); @@ -901,6 +912,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); @@ -918,8 +934,6 @@ static bool open_sockets(bool isdaemon, int port) messaging_register(nmbd_messaging_context(), NULL, MSG_SEND_PACKET, msg_nmbd_send_packet); - db_tdb2_setup_messaging(nmbd_messaging_context(), true); - TimeInit(); DEBUG( 3, ( "Opening sockets %d\n", global_nmb_port ) ); |