[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

SegFault when statically linked, No segfault otherwise, withNSS_LDAP



Hi all!

I ran into a very troublesome issue a few days ago.  Turns out, I need
to setup LDAP for centralized authentication.  This is done, working and
all we expected. But on a particular scenario (specifically, during the
exploration phases), I encountered the following:

While migrating ALL users in /etc/passwd into LDAP (as an experiment,
mind you ... before flames start flying! :) ), I noticed that RPM would
not work anymore - it would consistently segfault when attempting to
either add or remove a package.  Other operations seemed to work
correctly, but I didn't test them extensively.

It turned out that this was due to using nss_ldap.  I.e. the
nsswitch.conf line for "passwd" database reads "files ldap".  But, since
the /etc/passwd is empty, it's just as well it should read "ldap" (same
effect).

Just for kicks, I kept the configuration as was (files, nss_ldap), and
re-added the root user into /etc/passwd.  Voila!  Problem solved.  Upon
further examination (and a some interaction with the folks from
padl.com), I was unable to locate the problem.  Then, while trying to
build a version that could more easily be debugged, I rebuilt RPM to NOT
link statically, but link dynamically with glibc.

I again tried removing root from /etc/passwd, and it still worked!  So,
here's my question: what significant differences would cause this
behavior?  Failure when statically linked, but no failure when
dynamically linked?

The distribution is Mandrake 8.2, with some updates, but none really
significant (base kernel, glibc, etc.).

I understand the usefulness of RPM being statically linked.

As an FYI: running nscd ALSO cured the problem (both static and
dynamically-linked), but I had hoped to avoid that.

Best

Diego





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []