Bug 82039 - dlopen() of /lib/libnss_wins.so fails
Summary: dlopen() of /lib/libnss_wins.so fails
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: samba (Show other bugs)
(Show other bugs)
Version: 9
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Jay Fenlason
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 79578
TreeView+ depends on / blocked
 
Reported: 2003-01-16 18:01 UTC by Tim Powers
Modified: 2014-08-31 23:24 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-04-08 19:18:39 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
test for dlopen() on libnss_*.so libs (1.02 KB, text/plain)
2003-01-16 18:03 UTC, Tim Powers
no flags Details

Description Tim Powers 2003-01-16 18:01:08 UTC
/lib/libnss_wins.so is included in the samba-common-2.2.7a-1 package (in
Phoebe-re0116-Beta4-RC1). I have a test that is run to check to see if
libnss_*.so will dlopen() correctly. The output of the test on
/lib/libnss_wins.so is as follows:

dlopen() of "/lib/libnss_wins.so" failed: /lib/libnss_wins.so: undefined symbol:
yperr_string

I will attach the test script next.

Comment 1 Tim Powers 2003-01-16 18:03:00 UTC
Created attachment 89411 [details]
test for dlopen() on libnss_*.so libs

Comment 2 Jay Fenlason 2003-02-04 22:30:52 UTC
libnss_wins.so needs the shared library -lnsl  If you insert
 dlopen ( "/lib/libnsl.so.1", RTLD_NOW | RTLD_GLOBAL )
before the dlopen of libnss_wins, the wins library dlopens successfully.  I
haven't figured out how you list this dependency in the .so file.

So the real question now is what programs dlopen libnss_wins, and will they have
libnsl loaded?

Comment 3 Nalin Dahyabhai 2003-02-20 04:09:28 UTC
Jay: from the list of exported symbols, any application which calls
gethostbyname() (and, depending on how glibc's internals are set up, possibly
getaddrinfo() as well) may end up loading the wins module (in cases where "wins"
is listed on the "hosts:" line in /etc/nsswitch.conf).

Certainly "finger" doesn't link with libnsl.  A general rule of thumb is that
nss modules must be linked against all of their dependencies, the library which
itself loads the modules (libc) excepted.

For example, modules intended for use by pam must be linked against any of their
dependencies so that they can be used by apps like login, but needn't be linked
with libpam, because any application which would load the module would also be
linked against libpam.

Comment 4 Nalin Dahyabhai 2003-02-20 06:54:01 UTC
Should be fixed in samba-common-2.2.7a-4.

Comment 5 Jay Fenlason 2003-04-08 19:18:39 UTC
Confirmed fixed in current samba-2.2.7a-9.9.0


Note You need to log in before you can comment on or make changes to this bug.