diff options
Diffstat (limited to 'source3/nmbd/nmbd.c')
-rw-r--r-- | source3/nmbd/nmbd.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c index d30efb550c..051991f46d 100644 --- a/source3/nmbd/nmbd.c +++ b/source3/nmbd/nmbd.c @@ -53,8 +53,8 @@ static void terminate(void) /* Write out wins.dat file if samba is a WINS server */ wins_write_database(False); - /* Remove all SELF registered names from WINS */ - release_wins_names(); + /* Remove all SELF registered names. */ + release_my_names(); /* Announce all server entries as 0 time-to-live, 0 type. */ announce_my_servers_removed(); @@ -78,7 +78,7 @@ static void nmbd_terminate(int msg_type, pid_t src, void *buf, size_t len) Catch a SIGTERM signal. **************************************************************************** */ -static SIG_ATOMIC_T got_sig_term; +static VOLATILE sig_atomic_t got_sig_term; static void sig_term(int sig) { @@ -90,7 +90,7 @@ static void sig_term(int sig) Catch a SIGHUP signal. **************************************************************************** */ -static SIG_ATOMIC_T reload_after_sighup; +static VOLATILE sig_atomic_t reload_after_sighup; static void sig_hup(int sig) { @@ -293,6 +293,15 @@ static BOOL reload_nmbd_services(BOOL test) reload_nmbd_services( True ); } + /* Do a sanity check for a misconfigured nmbd */ + if( lp_wins_support() && wins_srv_count() ) { + if( DEBUGLVL(0) ) { + dbgtext( "ERROR: 'wins support = true' and 'wins server = <server>'\n" ); + dbgtext( "are conflicting settings. nmbd aborting.\n" ); + } + exit(10); + } + return(ret); } @@ -844,7 +853,7 @@ static void usage(char *pname) #ifndef SYNC_DNS /* Setup the async dns. We do it here so it doesn't have all the other stuff initialised and thus chewing memory and sockets */ - if(lp_we_are_a_wins_server() && lp_dns_proxy()) { + if(lp_we_are_a_wins_server()) { start_async_dns(); } #endif |