summaryrefslogtreecommitdiff
path: root/source3/param
diff options
context:
space:
mode:
authorYasuma Takeda <yasuma@osstech.co.jp>2008-12-05 13:37:51 -0800
committerJeremy Allison <jra@samba.org>2008-12-05 13:37:51 -0800
commit611ef42053eb99f4c29d4efa86eaea9f1ca06286 (patch)
treef7715a5e3f80fd5cf7ba804dd88662bd7f200c05 /source3/param
parentac4a77ccca08b73f828938a0cfaece66b1c9deea (diff)
downloadsamba-611ef42053eb99f4c29d4efa86eaea9f1ca06286.tar.gz
samba-611ef42053eb99f4c29d4efa86eaea9f1ca06286.tar.bz2
samba-611ef42053eb99f4c29d4efa86eaea9f1ca06286.zip
Fix bug #5944 - nmbd does not boot if socket adress = "" is defined in smb.conf
Diffstat (limited to 'source3/param')
-rw-r--r--source3/param/loadparm.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 217957ab37..c743b89680 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -5063,7 +5063,6 @@ FN_GLOBAL_STRING(lp_remote_announce, &Globals.szRemoteAnnounce)
FN_GLOBAL_STRING(lp_remote_browse_sync, &Globals.szRemoteBrowseSync)
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)
static FN_GLOBAL_STRING(lp_announce_version, &Globals.szAnnounceVersion)
FN_GLOBAL_LIST(lp_netbios_aliases, &Globals.szNetbiosAliases)
@@ -9468,3 +9467,18 @@ int lp_min_receive_file_size(void)
}
return MIN(Globals.iminreceivefile, BUFFER_SIZE);
}
+
+/*******************************************************************
+ If socket address is an empty character string, it is necessary to
+ define it as "0.0.0.0".
+********************************************************************/
+
+const char *lp_socket_address(void)
+{
+ char *sock_addr = Globals.szSocketAddress;
+
+ if (sock_addr[0] == '\0'){
+ string_set(&Globals.szSocketAddress, "0.0.0.0");
+ }
+ return Globals.szSocketAddress;
+}