From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Apr 15 08:10:03 2010 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D1BA1065674 for ; Thu, 15 Apr 2010 08:10:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id EBBFF8FC1F for ; Thu, 15 Apr 2010 08:10:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o3F8A17D004635 for ; Thu, 15 Apr 2010 08:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o3F8A1SJ004634; Thu, 15 Apr 2010 08:10:01 GMT (envelope-from gnats) Resent-Date: Thu, 15 Apr 2010 08:10:01 GMT Resent-Message-Id: <201004150810.o3F8A1SJ004634@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Alexander Sanda Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F331C106566B for ; Thu, 15 Apr 2010 08:02:36 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 90EB38FC13 for ; Thu, 15 Apr 2010 08:02:36 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o3F82auu024565 for ; Thu, 15 Apr 2010 08:02:36 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o3F82a9u024564; Thu, 15 Apr 2010 08:02:36 GMT (envelope-from nobody) Message-Id: <201004150802.o3F82a9u024564@www.freebsd.org> Date: Thu, 15 Apr 2010 08:02:36 GMT From: Alexander Sanda To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: ports/145716: Possible bug in samba-3.4 port - problem when using wins to resolve host names via nsswitch.conf X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Apr 2010 08:10:03 -0000 >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@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: