Ask Your Question

Revision history [back]

Segmentation fault with wins in nsswitch.conf

I have this in my /etc/nsswitch.conf:

hosts:      files mdns4_minimal [NOTFOUND=return] dns wins myhostname

Pinging a valid domain works:

$ ping -c1 www.google.com
PING www.google.com (172.217.4.196) 56(84) bytes of data.
64 bytes from lga15s48-in-f196.1e100.net (172.217.4.196): icmp_seq=1 ttl=57 time=8.17 ms

--- www.google.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 8.176/8.176/8.176/0.000 ms

Pinging a non-existent domain results in a segmentation fault:

$ ping -c1 non-existent.example.com
Segmentation fault

Removing wins from hosts in /etc/nsswitch.conf resolves the issue:

$ ping -c1 non-existent.example.com
ping: non-existent.example.com: Name or service not known

This bug looks to be the same issue:

  • https://bugzilla.samba.org/show_bug.cgi?id=11775

and has been marked a duplicate of this bug:

  • https://bugzilla.samba.org/show_bug.cgi?id=12269

which says this has been fixed in Samba 4.5 a few months back, but it's not working for me:

$ smbclient -V
Version 4.5.5

Any idea if there's a solution / workaround to having wins resolution without it causing segmentation faults?