net/nss-pam-ldapd breaks top(1) on 8.2/i386

John Marshall john.marshall at riverwillow.com.au
Tue Oct 11 03:55:51 UTC 2011


I've recently started using net/nss-pam-ldapd (0.7.13_2).  The systems
on which it is deployed are all i386, either 8.2-RELEASE or recent
8-STABLE.

It works well for me except that it breaks top(1) - obviously at the
point where top translates uid's to names.  Forcing top(1) to skip the
uid/username translation with 'top -u' keeps top(1) happy; but without
passing -u, top(1) segfaults as shown below.  Thus far top(1) appears to
be the only utility affected: other utilities like finger(1), getent(1)
and id(1) are fine; login and general work via console, sshd or X all
work fine.

My /etc/nsswitch.conf files include the following.  Removing 'ldap' from
the 'passwd' line makes top(1) happy but, of course, only local uid's
resolve in that case.

  group: files ldap
  passwd: files ldap

I have tried stripping /usr/local/etc/nslcd.conf all the way back to
just the following 3 lines to rule out any other custom configuration
but top(1) still dies (but, hey, this proves that the config defaults
are magic).

  uid nslcd
  gid nslcd
  uri DNS

Here is what top(1) does.

  ----------------
  Copyright 2004 Free Software Foundation, Inc.
  GDB is free software, covered by the GNU General Public License, and you are
  welcome to change it and/or distribute copies of it under certain conditions.
  Type "show copying" to see the conditions.
  There is absolutely no warranty for GDB.  Type "show warranty" for details.
  This GDB was configured as "i386-marcel-freebsd"...(no debugging symbols found)...
  Core was generated by `top'.
  Program terminated with signal 11, Segmentation fault.
  Reading symbols from /lib/libncurses.so.8...(no debugging symbols found)...done.
  Loaded symbols for /lib/libncurses.so.8
  Reading symbols from /lib/libm.so.5...(no debugging symbols found)...done.
  Loaded symbols for /lib/libm.so.5
  Reading symbols from /lib/libkvm.so.5...(no debugging symbols found)...done.
  Loaded symbols for /lib/libkvm.so.5
  Reading symbols from /lib/libc.so.7...(no debugging symbols found)...done.
  Loaded symbols for /lib/libc.so.7
  Reading symbols from /usr/local/lib/nss_ldap.so.1...(no debugging symbols found)...done.
  Loaded symbols for /usr/local/lib/nss_ldap.so.1
  Reading symbols from /libexec/ld-elf.so.1...(no debugging symbols found)...done.
  Loaded symbols for /libexec/ld-elf.so.1
  #0  0x2820eef9 in __nss_compat_gethostbyname () from /usr/local/lib/nss_ldap.so.1
  (gdb) bt
  #0  0x2820eef9 in __nss_compat_gethostbyname () from /usr/local/lib/nss_ldap.so.1
  #1  0x2820b60f in _nss_ldap_getpwent_r () from /usr/local/lib/nss_ldap.so.1
  #2  0x28125815 in __nss_compat_getpwent_r () from /lib/libc.so.7
  #3  0x281b1aad in nsdispatch () from /lib/libc.so.7
  #4  0x2819fcaa in getpwent_r () from /lib/libc.so.7
  #5  0x2819fcf3 in getpwent_r () from /lib/libc.so.7
  #6  0x2819f794 in acl_get_brand_np () from /lib/libc.so.7
  #7  0x2819f84b in getpwent () from /lib/libc.so.7
  #8  0x0804e51b in ?? ()
  #9  0x08051cc6 in ?? ()
  #10 0x08055360 in optind ()
  #11 0xbfbfe808 in ?? ()
  #12 0x00000000 in ?? ()
  #13 0x00000000 in ?? ()
  #14 0xbfbfe978 in ?? ()
  #15 0x28054639 in ?? () from /libexec/ld-elf.so.1
  #16 0x2808f000 in ?? ()
  #17 0x00000120 in ?? ()
  #18 0x00000054 in ?? ()
  #19 0x00000004 in ?? ()
  #20 0x00000000 in ?? ()
  #21 0x00000002 in ?? ()
  #22 0x00000000 in ?? ()
  #23 0xbfbfe978 in ?? ()
  #24 0x0804f594 in winch ()
  Previous frame identical to this frame (corrupt stack?)
  (gdb) q
  ----------------

If I'm the only one seeing this, can anybody spot what I'm doing wrong?

This looks a lot like what I found in a thread in -stable@ from January
2010 which was seen on 8.0/amd64, but the fix proffered there is already
applied in the version of the port I'm using.

<http://lists.freebsd.org/pipermail/freebsd-stable/2010-January/054379.html>

Thanks.

-- 
John Marshall
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20111011/9e3e4c2b/attachment.pgp


More information about the freebsd-ports mailing list