param: Make socket_address common, Revert 611ef42053eb99f4c29d4efa86eaea9f1ca06286
authorAndrew Bartlett <abartlet@samba.org>
Sun, 22 Jul 2012 23:23:04 +0000 (09:23 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 27 Jul 2012 01:34:23 +0000 (03:34 +0200)
This essentially reverts the commit 611ef42053eb99f4c29d4efa86eaea9f1ca06286
Author: Yasuma Takeda <yasuma@osstech.co.jp>
Date:   Fri Dec 5 13:37:51 2008 -0800

    Fix bug #5944 - nmbd does not boot if socket adress = "" is defined in smb.conf

Intead, the documentation is fixed so that the correct default is
recorded.  Removing the special case handling here allows this to be
dealt with in the same way as all other parameters.

Andrew Bartlett

docs-xml/smbdotconf/misc/socketaddress.xml
lib/param/loadparm.c
lib/param/param_functions.c
source3/param/loadparm.c

index 17018efd40a682e344cc3f21cd88db27addf379a..b3a81f2ec32d4d7d87c2f86fa32b095bb1e29ee2 100644 (file)
@@ -15,6 +15,6 @@
                address.</para>
 </description>
 
-<value type="default"></value>
+<value type="default">0.0.0.0</value>
 <value type="example">192.168.2.20</value>
 </samba:parameter>
index 373df385d7c225269e7a7b74a3c55c16eca8ff7f..e9765521f8b4497f232fd8c9dabce61cc74eb890 100644 (file)
@@ -328,7 +328,6 @@ static struct loadparm_context *global_loadparm_context;
 FN_GLOBAL_BOOL(readraw, bReadRaw)
 FN_GLOBAL_BOOL(writeraw, bWriteRaw)
 FN_GLOBAL_STRING(cachedir, szCacheDir)
-FN_GLOBAL_STRING(socket_address, szSocketAddress)
 FN_GLOBAL_STRING(statedir, szStateDir)
 
 /* local prototypes */
index d7e09ffafdc40e2dd84907380c4a54fd0ddf84fc..c1e50f4105fd6392bb7968a961dc1d117853dfb6 100644 (file)
@@ -260,6 +260,7 @@ FN_GLOBAL_CONST_STRING(piddir, szPidDir)
 FN_GLOBAL_CONST_STRING(private_dir, szPrivateDir)
 FN_GLOBAL_CONST_STRING(realm, szRealm_upper)
 FN_GLOBAL_CONST_STRING(smb_passwd_file, szSMBPasswdFile)
+FN_GLOBAL_CONST_STRING(socket_address, szSocketAddress)
 FN_GLOBAL_CONST_STRING(socket_options, socket_options)
 FN_GLOBAL_CONST_STRING(template_homedir, szTemplateHomedir)
 FN_GLOBAL_CONST_STRING(template_shell, szTemplateShell)
index 768fa419246b07d333536dccba9da7fb2aa9e8a5..990831b1cfb5536db207b1ed29f16ad7d1155cb2 100644 (file)
@@ -122,7 +122,6 @@ static bool defaults_saved = false;
        char *szLdapGroupSuffix;                                        \
        char *szStateDir;                                               \
        char *szCacheDir;                                               \
-       char *szSocketAddress;                                          \
        char *szUsershareTemplateShare;                                 \
        char *szIdmapUID;                                               \
        char *szIdmapGID;                                               \
@@ -5358,21 +5357,6 @@ 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;
-}
-
 /*******************************************************************
  Safe wide links checks.
  This helper function always verify the validity of wide links,