Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Jan 2006 15:14:23 +0100
From:      Uwe Laverenz <uwe@laverenz.de>
To:        stable@freebsd.org
Subject:   libc bug with nsswitch?
Message-ID:  <20060123141423.GD17465@laverenz.de>

next in thread | raw e-mail | index | archive | help
Hi,

there seems to be a problem with RELENG_6 in environments where nss_ldap
is used for user- and group-lookups. The problem affects different ports
that don't have very much in common, so I guess there might be a bug in
FreeBSD's libc, because that's the place, where the name-sevices are
handled (correct me if I'm wrong).

Two examples that are reproduceable here on various machines:

1. emulators/linux_base-8:

When nss_ldap is enabled in /etc/nsswitch.conf, the installation of the
port fails:

--- log ---
===>  Patching for linux_base-8-8.0_11
===>   linux_base-8-8.0_11 depends on executable: rpm - found
===>  Configuring for linux_base-8-8.0_11
--->  Installing the new version via the port
===>  Installing for linux_base-8-8.0_11
===>   Generating temporary packing list
===>  Checking if emulators/linux_base-8 already installed
kern.fallback_elf_brand: 3 -> 3
redhat-release-8.0-8.noarch.rpm
glibc-common-2.3.2-4.80.8.i386.rpm
[...list of rpms...]
sh-utils-2.0.12-3.i386.rpm
rpm-4.1-1.06.i386.rpm

You have (unsupported)
        /var/lib/rpm/packages.rpm       db1 format installed package
headers
Please install rpm-4.0.4 first, and do
        rpm --rebuilddb
to convert your database from db1 to db3 format.

var/tmp/rpm-tmp.41237: line 11: /dev/null: No such file or directory
var/tmp/rpm-tmp.41237: line 12: /dev/null: No such file or directory
Assertion failed: (cfg->ldc_uris[__session.ls_current_uri] != NULL),
function do_init, file ldap-nss.c, line 1245.
Abort trap (core dumped)
*** Error code 134

Stop in /usr/ports/emulators/linux_base-8.
*** Error code 1

Stop in /usr/ports/emulators/linux_base-8.
** Command failed [exit code 1]: /usr/bin/script -qa
/tmp/portinstall5998.0 make reinstall
** Fix the installation problem and try again.
** Listing the failed packages (*:skipped / !:failed)
        ! emulators/linux_base-8        (install error)
--- log ---

2. PHP4(5)/PEAR

This was also reported by two other users, both are using nss_ldap but
have PHP5 instead of PHP4. With nss_ldap enabled, the use of at least
two php-modules (imagick, xslt) lead to a segmentation fault in php4,
e.g. when trying to install an additional pear-module:

--- log ---
===>  Installing for pear-OLE-0.5
===>   pear-OLE-0.5 depends on file: /usr/local/share/pear/PEAR.php -
found
===>   pear-OLE-0.5 depends on executable: pear - found
===>   Generating packing list
===>   Generating temporary packing list
===>  Checking if devel/pear-OLE already installed
install ok: channel://pear.php.net/OLE-0.5
Segmentation fault (core dumped)
*** Error code 139

Stop in /usr/ports/devel/pear-OLE.
*** Error code 1

Stop in /usr/ports/textproc/pear-Spreadsheet_Excel_Writer.
** Command failed [exit code 1]: /usr/bin/script -qa
/tmp/portinstall39034.0 mak e
** Fix the problem and try again.
--- log ---

In both cases the installation works without any problem as soon as you
disable nss_ldap (renaming /etc/nsswitch.conf is sufficient).

my nsswitch.conf is as simple as this:

    passwd: files ldap
    group:  files ldap


bye,
Uwe




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060123141423.GD17465>