Bug 123330 - [nsswitch.conf] Enabling samba wins in nsswitch.conf causes sshd, ftpd, etc services to die
Summary: [nsswitch.conf] Enabling samba wins in nsswitch.conf causes sshd, ftpd, etc s...
Status: Closed Feedback Timeout
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-net (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-02 15:30 UTC by Shelby Cain
Modified: 2018-05-28 21:06 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shelby Cain 2008-05-02 15:30:02 UTC
Background:  I have a mixed home network of Windows, Linux and (now) FreeBSD.  In order to facilitate easy communication between the systems I install Samaba and enable wins resolution in nsswitch.conf on all non-windows boxes so that netbios name resolution can occur.

Problem:  Once I've added "hosts: files dns wins" to my nsswitch.conf on FreeBSD any system service that appears to rely on name resolution will segfault when it attempts to handle incoming connections.

I realize that netbios name resolution functionality probably isn't a super high priority but causing a denial of service by enabling something that should work without issue strikes me as a serious bug so I marked it as such.  I also tried getting a backtrace from one of the ftpd.core files and gdb listed thousands of stack frames which I assume means some form of stack corruption has occurred.

How-To-Repeat: 1) Install FreeBSD 7.0-i386.
2) Enable various network services such as sshd and ftpd.
3) Establish ssh session to the server.
4) Build and install Samba3 from ports.
5) Change hosts line in /etc/nsswitch.conf to read "hosts: files dns wins"
6) Verify that you can resolve windows netbios names via a tool like ping.  Do not close your existing ssh session at this point as you'll be unable to log back in!
7) Attempt to create a new ssh or ftp session.  The attempt will fail and a message about the (I assume forked) process being terminated with signal 11 will be logged in /var/log/messages.  This will continue for as long as "wins" is left in /etc/nsswitch.conf.
8) Removing the "wins" entry will restore normal behavior.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2008-05-02 21:55:46 UTC
Responsible Changed
From-To: freebsd-i386->freebsd-net

Over to maintainer(s).
Comment 2 julian 2008-11-30 05:25:27 UTC
This problem still occurs in 7.1-BETA2.

e.g
'netstat -ap tcp'   dies saying "segmentation fault" when the wins entry is in place.  (netstat -anp tcp  works ok)

This stops the system from being used as a samba server whilst also using centralized wins for netbios name resolution.
Comment 3 Timur I. Bakeyev freebsd_committer freebsd_triage 2015-09-04 22:24:19 UTC
Is this still relevant? Any tries with recent Samba versions?
Comment 4 Eitan Adler freebsd_committer freebsd_triage 2018-05-28 19:47:36 UTC
batch change:

For bugs that match the following
-  Status Is In progress 
AND
- Untouched since 2018-01-01.
AND
- Affects Base System OR Documentation

DO:

Reset to open status.


Note:
I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.