Bug 5623 - smbd on kernel without ipv6 not resolved
smbd on kernel without ipv6 not resolved
Status: CLOSED FIXED
Product: Samba 3.2
Classification: Unclassified
Component: File services
3.2.0
x86 Linux
: P3 normal
: ---
Assigned To: Jeremy Allison
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-07-18 04:10 UTC by Aleksey Kostyuk
Modified: 2009-08-09 23:41 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 Aleksey Kostyuk 2008-07-18 04:10:53 UTC
samba-3.2.0 1 July 2008 releases. Kernel compiled without ipv6 support. Samba cconfigured an PDC controller. In logs directory name files has full dns name, not IP address, and not netbios name.

On server - Nname# smbclient -L Nname
Connection to dream failed (Error NT_STATUS_BAD_NETWORK_NAME)

on with another server - Bname# smbclient -L Nname
Enter root's password:
Receiving SMB: Server stopped responding
tree connect failed: Call returned zero bytes (EOF)

in smb.conf
in [global]

hosts allow = 192.168.11., 192.168.13.
hosts deny = ALL, 0.0.0.0/0

in logs - log.ns.Ndomain.ru
[2008/07/18 13:07:38.076654,  3, pid=31508, effective(0, 0), real(0, 0)] lib/acc
ess.c:only_ipaddrs_in_list(362)
  only_ipaddrs_in_list: list has non-ip address (192.168.11.)
[2008/07/18 13:07:38.076752,  3, pid=31508, effective(0, 0), real(0, 0)] lib/acc
ess.c:check_access(396)
  check_access: hostnames in host allow/deny list.
[2008/07/18 13:07:38.077426,  0, pid=31508, effective(0, 0), real(0, 0)] lib/acc
ess.c:check_access(410)
  Denied connection from ns.Ndomain.ru (ns.Ndomain.ru)
[2008/07/18 13:07:38.077686,  1, pid=31508, effective(0, 0), real(0, 0)] smbd/pr
ocess.c:process_smb(1539)
  Connection denied from ns.Ndomain.ru

old version samba-3.0.22 is worked.
Comment 1 Aleksey Kostyuk 2008-07-18 04:20:00 UTC
(In reply to comment #0)
> samba-3.2.0 1 July 2008 releases. Kernel compiled without ipv6 support. Samba
> cconfigured an PDC controller. In logs directory name files has full dns name,
> not IP address, and not netbios name.
> 
> On server - Nname# smbclient -L Nname
> Connection to dream failed (Error NT_STATUS_BAD_NETWORK_NAME)
> 
> on with another server - Bname# smbclient -L Nname
> Enter root's password:
> Receiving SMB: Server stopped responding
> tree connect failed: Call returned zero bytes (EOF)
> 
> in smb.conf
> in [global]
> 
> hosts allow = 192.168.11., 192.168.13.
> hosts deny = ALL, 0.0.0.0/0
> 
> in logs - log.ns.Ndomain.ru
> [2008/07/18 13:07:38.076654,  3, pid=31508, effective(0, 0), real(0, 0)]
> lib/acc
> ess.c:only_ipaddrs_in_list(362)
>   only_ipaddrs_in_list: list has non-ip address (192.168.11.)
> [2008/07/18 13:07:38.076752,  3, pid=31508, effective(0, 0), real(0, 0)]
> lib/acc
> ess.c:check_access(396)
>   check_access: hostnames in host allow/deny list.
> [2008/07/18 13:07:38.077426,  0, pid=31508, effective(0, 0), real(0, 0)]
> lib/acc
> ess.c:check_access(410)
>   Denied connection from ns.Ndomain.ru (ns.Ndomain.ru)
> [2008/07/18 13:07:38.077686,  1, pid=31508, effective(0, 0), real(0, 0)]
> smbd/pr
> ocess.c:process_smb(1539)
>   Connection denied from ns.Ndomain.ru
> 
> old version samba-3.0.22 is worked.
> 

in smb.conf in global

workgroup = GROUP1
netbios name = Nname

is plaseed
Comment 2 Jeremy Allison 2008-07-25 18:56:46 UTC
Can you get me a debug level 10 log please and also attach your complete smb.conf.
Thanks !
Jeremy.
Comment 3 Jeremy Allison 2008-07-25 19:42:01 UTC
Yes, the reason this isn't working is that get_socket_addr() is returning a DNS name, not an IP address. This calls down internally into :

        (void)sys_getnameinfo((const struct sockaddr *)psa,
                        psalen,
                        dest, destlen,
                        NULL, 0,
                        NI_NUMERICHOST);

From the man page (on Ubuntu) :

        * If the flag bit NI_NUMERICHOST is set, the numeric form of the address  contained  in
          the  socket address structure pointed to by the sa argument shall be returned instead
          of its name, under all circumstances.

What Linux/glibc are you using ? It looks like NI_NUMERICHOST isn't working in getnameinfo on this platform.

Jeremy.
Comment 4 Aleksey Kostyuk 2008-08-21 02:36:27 UTC
# uname -a
Linux 2.6.16 #2 PREEMPT Thu May 18 16:44:24 MSD 2006 i686 pentium3 i386 GNU/Linux

(GNU libc) 2.3.6

system is compiled. is not distributive.

new release samba-3.2.2 is not help in this problem...
if commented in smb.conf hosts allow options - samba-3.2.2 worked.
old version samba-3.0.22 work with hosts allow=192.168.11., 192.168.13.
Comment 5 Guenther Deschner 2009-08-06 08:37:45 UTC
Jeremy, do you know whether this is resolved now ?
Comment 6 Jeremy Allison 2009-08-06 12:57:11 UTC
This looks like it was an issue with a self-compiled glibc, not a Samba bug.
Jeremy.
Comment 7 Aleksey Kostyuk 2009-08-09 23:40:26 UTC
Distr compiled with new glibc fixed this problem.