On samba 3.2.4, if I define "socket address =" in smb.conf, the nmbd does not boot. Because getaddrinfo() fails. Following is the log of nmbd. [2008/12/05 09:57:35, 2] nmbd/nmbd.c:main(884) Becoming a daemon. [2008/12/05 09:57:35, 5] smbd/connection.c:claim_connection(142) claiming [] [2008/12/05 09:57:35, 4] lib/time.c:TimeInit(1287) TimeInit: Serverzone is -32400 [2008/12/05 09:57:35, 3] nmbd/nmbd.c:main(939) Opening sockets 137 [2008/12/05 09:57:35, 3] lib/util_sock.c:interpret_string_addr_internal(122) interpret_string_addr_internal: getaddrinfo failed for name [Name or service not known] [2008/12/05 09:57:35, 0] nmbd/nmbd.c:open_sockets(683) BTW, samba 3.0.31 has no problem if "socket address =" is defined in smb.conf. And smb.conf(5) explains the default value is "socket address =". So, I think this behaviour should be fixed. I will attach a patch.
Created attachment 3782 [details] fix lp_socket_address() function when "socket address =" is defined.
Applied to all relevent git trees. Thanks ! Jeremy.
I would like to revert this change, and instead consider this a documentation error (ie fix the smb.conf manpage) There are many other parameters that, if set to the the wrong values simply cause Samba to fail, and we don't override the empty string as the default value in general. We should instead just document that the default for socket address is '0.0.0.0' (which it is). The reason this comes up is that this is one of a small number of special cases in our loadparm code, and I am trying to reduce these where possible. This will in turn allow as much auto-generation as possible. This is part of the effort to merge the two loadparm systems. What do you think?
(In reply to comment #3) > I would like to revert this change, and instead consider this a documentation > error (ie fix the smb.conf manpage) > > There are many other parameters that, if set to the the wrong values simply > cause Samba to fail, and we don't override the empty string as the default > value in general. > > We should instead just document that the default for socket address is > '0.0.0.0' (which it is). > > The reason this comes up is that this is one of a small number of special cases > in our loadparm code, and I am trying to reduce these where possible. This > will in turn allow as much auto-generation as possible. This is part of the > effort to merge the two loadparm systems. > > What do you think? I think we can close this after commit dc00df2adddfe23e5ebb61f9f7c16ec7d3f2c03e Author: Andrew Bartlett <abartlet@samba.org> Date: Fri Jul 27 12:56:22 2012 +1000 lib/param: Rename "socket address" to "nbt client socket address" to clarify role This parameter is only used in our NBT client code and in nmbd as a fallback when we fail to select a better interface from "interfaces" to use directly. Andrew Bartlett Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Jul 27 12:16:25 CEST 2012 on sn-devel-104