Bug 5944 - nmbd does not boot if "socket adress = " is defined in smb.conf
Summary: nmbd does not boot if "socket adress = " is defined in smb.conf
Status: RESOLVED FIXED
Alias: None
Product: Samba 3.2
Classification: Unclassified
Component: Nmbd (show other bugs)
Version: 3.2.4
Hardware: x86 Linux
: P3 normal
Target Milestone: ---
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-05 11:19 UTC by Yasuma Takeda
Modified: 2012-10-25 07:15 UTC (History)
2 users (show)

See Also:


Attachments
fix lp_socket_address() function when "socket address =" is defined. (1.87 KB, patch)
2008-12-05 11:21 UTC, Yasuma Takeda
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yasuma Takeda 2008-12-05 11:19:35 UTC
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.
Comment 1 Yasuma Takeda 2008-12-05 11:21:10 UTC
Created attachment 3782 [details]
fix lp_socket_address() function when "socket address =" is defined.
Comment 2 Jeremy Allison 2008-12-05 15:39:05 UTC
Applied to all relevent git trees. Thanks !
Jeremy.
Comment 3 Andrew Bartlett 2012-07-22 23:02:59 UTC
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?
Comment 4 Stefan Metzmacher 2012-10-25 07:15:49 UTC
(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