ports/145716: Possible bug in samba-3.4 port - problem when using wins to resolve host names via nsswitch.conf

Alexander Sanda silvercircle at gmail.com
Thu Apr 15 08:10:03 UTC 2010


>Number:         145716
>Category:       ports
>Synopsis:       Possible bug in samba-3.4 port - problem when using wins to resolve host names via nsswitch.conf
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr 15 08:10:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Alexander Sanda
>Release:        8.0-STABLE
>Organization:
>Environment:
FreeBSD Cily.local 8.0-STABLE FreeBSD 8.0-STABLE #2: Wed Apr 14 23:48:05 CEST 2010     root at Cily.local:/usr/src/sys/amd64/compile/CILY  amd64
>Description:
I believe there is a bug in the current version of the samba-3.4 port for FreeBSD. The problem is that the nss_wins.so module fails to load because of a missing nss_module_register() function.

So, when editing /etc/nsswitch.conf and setting hosts lookup to use wins, the following error message(s) will appear:

Apr 15 03:31:00 Cily cron[2510]: NSSWITCH(nss_load_module): wins, Undefined symbol "nss_module_register"

Googling the error message brought up a few results, but no solution and most of the hits are fairly old.


>How-To-Repeat:
Always repeatable with current port of samba-3.4. I did not test it with other (older) versions of the samba port.

My ports collection should be up-to-date (I csup frequently, at least twice a week).
>Fix:
I think, I found the reason for the problem. Inside the files directory of the port, there is a patch (patch-nsswitch__wins-freebsd.c) which (correctly) creates a nsswitch/wins_freebsd.c file providing the missing nss_module_register() function, but this file is never linked into nss_wins.so. It is compiled properly, but ignored at link-time.

To test this, I edited source3/Makefile:

WINBIND_WINS_NSS_OBJ = ../nsswitch/wins.o ../nsswitch/wins_freebsd.o $(PARAM_OBJ) \

(../nsswitch/wins_freebsd.o is the part that is missing).

After recompiling nss_wins.so, the wins lookup via nsswitch.conf works as it should (I can properly ping the hosts on my local network, using netbios names and there are no more error messages).

This is, however, only a workaround. My knowledge about autoconf/automake is a bit limited, so I've not yet figured out how to fix this the Makefile problem.

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list