Bug 3960 - Ignores bind interfaces only when running via inetd
Summary: Ignores bind interfaces only when running via inetd
Status: RESOLVED INVALID
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: File Services (show other bugs)
Version: 3.0.23
Hardware: x86 FreeBSD
: P3 normal
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-25 02:15 UTC by Max Katsev
Modified: 2007-05-14 23:08 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Max Katsev 2006-07-25 02:15:02 UTC
When i ran samba using inetd it listens to all interfaces, even if interfaces and bind intefaces only lines are present in smb.conf.

Steps to reproduce:

Computer has 2 interfaces:
rl0 (10.1.0.1/24) and rl1 (192.168.1.8/24)

I run samba using inetd:
/etc/inetd.conf:
...
netbios-ssn stream tcp  nowait          root    /usr/local/sbin/smbd    smbd
netbios-ns dgram udp    wait            root    /usr/local/sbin/nmbd    nmbd
swat    stream  tcp     nowait/400      root    /usr/local/sbin/swat    swat
...

/usr/local/etc/smb.conf:
...
        interfaces = rl0
        bind interfaces only = Yes
...

However it uses ip 192.168.1.8 as well:
[root@server ~]# smbclient -L 192.168.1.8 -U%
Domain=[_OP] OS=[Unix] Server=[Samba 3.0.23]

        Sharename       Type      Comment
        ---------       ----      -------
        incoming        Disk      incoming
        IPC$            IPC       IPC Service (Samba Server)
Domain=[_OP] OS=[Unix] Server=[Samba 3.0.23]

        Server               Comment
        ---------            -------
        SERVER               Samba Server

        Workgroup            Master
        ---------            -------
        _OP                  SERVER

If i stop inetd and run samba manually it works as expected:
[root@server ~]# /etc/rc.d/inetd stop
Stopping inetd.
[root@server ~]# /usr/local/etc/rc.d/samba forcestart
Starting SAMBA: removing stale tdbs :
/var/db/samba/connections.tdb
/var/db/samba/messages.tdb
/var/db/samba/sessionid.tdb
/var/db/samba/brlock.tdb
/var/db/samba/locking.tdb
Starting nmbd.
Starting smbd.
Starting winbindd.
[root@server ~]# smbclient -L 192.168.1.8 -U%
Error connecting to 192.168.1.8 (Connection refused)
Connection to 192.168.1.8 failed

Also this lines appear in log.nmbd when using inetd:
[2006/07/25 09:14:46, 0] nmbd/nmbd_browsesync.c:get_domain_master_name_node_status_fail(486)
  get_domain_master_name_node_status_fail:
  Doing a node status request to the domain master browser at IP 192.168.1.8 failed.
  Cannot get workgroup name.
Comment 1 James Peach 2007-05-14 23:08:38 UTC
In inetd mode, it is inetd that manages which interfaces are listened on. You need to find some way of doing the equivalent of "bind interfaces only" in your indetd configuration.