[PATCH][BZ #17250] Static dlopen default library search path fix
Mike Frysinger
vapier@gentoo.org
Fri Aug 7 03:15:00 GMT 2015
On 06 Aug 2015 22:52, Maciej W. Rozycki wrote:
> On Thu, 6 Aug 2015, Mike Frysinger wrote:
> > > I'm not prepared to properly regression-test a change right away, but
> > > meanwhile can you try the below as a proposed fix? Also I'm not sure
> > > offhand how to make a test case that covers this issue, but I'll be happy
> > > to accept ideas and implement them.
> >
> > two were posted to the bug. if you use tests-static in the Makefile,
> > should be fairly easy to add to the tree and check the result.
>
> Except that they cover the usual system-installed use case and we run our
> test suite over uninstalled libraries. Normally that does not matter, but
> here it does. Unless I'm missing something that is, am I?
the test requires:
- it be statically linked
-> use tests-static in the makefile
- the db accessed contains the data we request
-> nptl/tst-setuid1.c seems to already assume "nobody" is a valid acct
- it have access to the nss libs to load
-> set LD_LIBRARY_PATH to the local paths using the xxx-env hooks if
existing run logic doesn't already do it
what other external deps did you have in mind ?
i just tested it over here and it semed fine:
$ gcc test.c -B. -static
$ LD_LIBRARY_PATH=$PWD/nis:$PWD/nss:$PWD:$PWD/elf strace -e file ./a.out
<all libs are loaded from $PWD>
/etc/nsswitch.conf & /etc/passwd are read, but i think our tests already
rely on that ...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20150807/ba1928b9/attachment.sig>
More information about the Libc-alpha
mailing list