diff options
author | Luke Leighton <lkcl@samba.org> | 2000-01-16 04:01:59 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 2000-01-16 04:01:59 +0000 |
commit | 66b5e490dea571e0d3d635ce5cb342078c3a1f61 (patch) | |
tree | bd1cf0019b27bbc50113a88a8ea8cfb7c2227511 /source/nmbd/nmbd.c | |
parent | 315f30e03fb784c2ae8fb57a30a0f9c420ca9968 (diff) | |
download | samba-66b5e490dea571e0d3d635ce5cb342078c3a1f61.tar.gz samba-66b5e490dea571e0d3d635ce5cb342078c3a1f61.tar.xz samba-66b5e490dea571e0d3d635ce5cb342078c3a1f61.zip |
higher order function table to set up msrpc services.
Diffstat (limited to 'source/nmbd/nmbd.c')
-rw-r--r-- | source/nmbd/nmbd.c | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/source/nmbd/nmbd.c b/source/nmbd/nmbd.c index 1471254b4ea..b1f3d77150d 100644 --- a/source/nmbd/nmbd.c +++ b/source/nmbd/nmbd.c @@ -59,6 +59,50 @@ time_t StartupTime = 0; extern struct in_addr ipzero; /**************************************************************************** ** + reload the services file + **************************************************************************** */ +static BOOL reload_services(BOOL test) +{ + BOOL ret; + extern fstring remote_machine; + + fstrcpy( remote_machine, "nmb" ); + + if ( lp_loaded() ) + { + pstring fname; + pstrcpy( fname,lp_configfile()); + if (file_exist(fname,NULL) && !strcsequal(fname,servicesf)) + { + pstrcpy(servicesf,fname); + test = False; + } + } + + if ( test && !lp_file_list_changed() ) + return(True); + + ret = lp_load( servicesf, True , False, False); + + /* perhaps the config filename is now set */ + if ( !test ) + { + DEBUG( 3, ( "services not loaded\n" ) ); + reload_services( True ); + } + + /* Do a sanity check for a misconfigured nmbd */ + if( lp_wins_support() && *lp_wins_server() ) + { + DEBUG(0,("ERROR: both 'wins support = true' and 'wins server = <server>' \ +cannot be set in the smb.conf file. nmbd aborting.\n")); + exit(10); + } + + return(ret); +} /* reload_services */ + +/**************************************************************************** ** catch a sigterm **************************************************************************** */ static void sig_term(int sig) @@ -185,50 +229,6 @@ static void expire_names_and_servers(time_t t) } /* expire_names_and_servers */ /**************************************************************************** ** - reload the services file - **************************************************************************** */ -BOOL reload_services(BOOL test) -{ - BOOL ret; - extern fstring remote_machine; - - fstrcpy( remote_machine, "nmb" ); - - if ( lp_loaded() ) - { - pstring fname; - pstrcpy( fname,lp_configfile()); - if (file_exist(fname,NULL) && !strcsequal(fname,servicesf)) - { - pstrcpy(servicesf,fname); - test = False; - } - } - - if ( test && !lp_file_list_changed() ) - return(True); - - ret = lp_load( servicesf, True , False, False); - - /* perhaps the config filename is now set */ - if ( !test ) - { - DEBUG( 3, ( "services not loaded\n" ) ); - reload_services( True ); - } - - /* Do a sanity check for a misconfigured nmbd */ - if( lp_wins_support() && *lp_wins_server() ) - { - DEBUG(0,("ERROR: both 'wins support = true' and 'wins server = <server>' \ -cannot be set in the smb.conf file. nmbd aborting.\n")); - exit(10); - } - - return(ret); -} /* reload_services */ - -/**************************************************************************** ** The main select loop. **************************************************************************** */ static void process(void) |