diff options
author | Andrew Tridgell <tridge@samba.org> | 2002-06-26 06:44:37 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2002-06-26 06:44:37 +0000 |
commit | 07f35f68e00b48ad6ec4d18c628d0bb57bad85ef (patch) | |
tree | c275131d8156d06f06c83421ffe30eb5056cc586 /source3/param/loadparm.c | |
parent | 788c2c655baab3bf87cd984a8599b0829029f6c2 (diff) | |
download | samba-07f35f68e00b48ad6ec4d18c628d0bb57bad85ef.tar.gz samba-07f35f68e00b48ad6ec4d18c628d0bb57bad85ef.tar.bz2 samba-07f35f68e00b48ad6ec4d18c628d0bb57bad85ef.zip |
- completely rewrote the wins_srv.c code. It is now much simpler, and
gives us a good grounding to properly support multiple wins servers
for different interfaces (which will be coming soon ...)
- fixed our wins registration failover code to actually do failover!
We were not trying to register with a secondary wins server at all
when the primary was down. We now fallback correctly.
- fixed the multi-homed name registration packets so that they work
even in a non-connected network (ie. when one of our interfaces is not
routable from the wins server. Yes, this really happens in the real
world).
(This used to be commit a049360d5b0d95a935b06aad43efc17d34de46dc)
Diffstat (limited to 'source3/param/loadparm.c')
-rw-r--r-- | source3/param/loadparm.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 4aa7d3b656..5051d67d34 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -121,7 +121,7 @@ typedef struct char *szLogonPath; char *szLogonDrive; char *szLogonHome; - char *szWINSserver; + char **szWINSservers; char **szInterfaces; char *szRemoteAnnounce; char *szRemoteBrowseSync; @@ -521,7 +521,6 @@ static BOOL handle_netbios_name(char *pszParmValue, char **ptr); static BOOL handle_winbind_uid(char *pszParmValue, char **ptr); static BOOL handle_winbind_gid(char *pszParmValue, char **ptr); static BOOL handle_non_unix_account_range(char *pszParmValue, char **ptr); -static BOOL handle_wins_server_list(char *pszParmValue, char **ptr); static BOOL handle_debug_list( char *pszParmValue, char **ptr ); static BOOL handle_ldap_machine_suffix ( char *pszParmValue, char **ptr ); @@ -927,7 +926,7 @@ static struct parm_struct parm_table[] = { {"dns proxy", P_BOOL, P_GLOBAL, &Globals.bDNSproxy, NULL, NULL, 0}, {"wins proxy", P_BOOL, P_GLOBAL, &Globals.bWINSproxy, NULL, NULL, 0}, - {"wins server", P_STRING, P_GLOBAL, &Globals.szWINSserver, handle_wins_server_list, NULL, FLAG_BASIC}, + {"wins server", P_LIST, P_GLOBAL, &Globals.szWINSservers, NULL, NULL, FLAG_BASIC}, {"wins support", P_BOOL, P_GLOBAL, &Globals.bWINSsupport, NULL, NULL, FLAG_BASIC}, {"wins hook", P_STRING, P_GLOBAL, &Globals.szWINSHook, NULL, NULL, 0}, {"wins partners", P_STRING, P_GLOBAL, &Globals.szWINSPartners, NULL, NULL, 0}, @@ -1488,7 +1487,7 @@ FN_GLOBAL_CONST_STRING(lp_logon_drive, &Globals.szLogonDrive) FN_GLOBAL_CONST_STRING(lp_logon_home, &Globals.szLogonHome) FN_GLOBAL_STRING(lp_remote_announce, &Globals.szRemoteAnnounce) FN_GLOBAL_STRING(lp_remote_browse_sync, &Globals.szRemoteBrowseSync) -FN_GLOBAL_STRING(lp_wins_server_list, &Globals.szWINSserver) +FN_GLOBAL_LIST(lp_wins_server_list, &Globals.szWINSservers) FN_GLOBAL_LIST(lp_interfaces, &Globals.szInterfaces) FN_GLOBAL_STRING(lp_socket_address, &Globals.szSocketAddress) FN_GLOBAL_STRING(lp_nis_home_map_name, &Globals.szNISHomeMapName) @@ -2614,19 +2613,6 @@ static BOOL handle_non_unix_account_range(char *pszParmValue, char **ptr) } /*************************************************************************** - Handle the WINS SERVER list -***************************************************************************/ -static BOOL handle_wins_server_list( char *pszParmValue, char **ptr ) - { - if( !wins_srv_load_list( pszParmValue ) ) - return( False ); /* Parse failed. */ - - string_set( ptr, pszParmValue ); - return( True ); - } - - -/*************************************************************************** Handle the DEBUG level list ***************************************************************************/ static BOOL handle_debug_list( char *pszParmValueIn, char **ptr ) @@ -3588,7 +3574,7 @@ BOOL lp_load(const char *pszFname, BOOL global_only, BOOL save_defaults, /* Now we check bWINSsupport and set szWINSserver to 127.0.0.1 */ /* if bWINSsupport is true and we are in the client */ if (in_client && Globals.bWINSsupport) { - string_set(&Globals.szWINSserver, "127.0.0.1"); + lp_do_parameter(-1, "wins server", "127.0.0.1"); } init_iconv(); |