This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] nss_files: Fix /etc/aliases null pointer dereference [BZ #24059]
- From: Szabolcs Nagy <Szabolcs dot Nagy at arm dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: nd <nd at arm dot com>, Szabolcs Nagy <nsz at port70 dot net>, "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>
- Date: Thu, 14 Mar 2019 14:09:43 +0000
- Subject: Re: [PATCH] nss_files: Fix /etc/aliases null pointer dereference [BZ #24059]
- References: <87a7k1531v.fsf@oldenburg2.str.redhat.com> <723b2509-9df4-315e-6e02-18be9d1beb42@arm.com> <874l9na6as.fsf@oldenburg2.str.redhat.com> <ce1dd533-a737-19f6-7fb5-1eadfea121b9@arm.com> <87ef8r8leg.fsf@oldenburg2.str.redhat.com> <20190202160154.GL21289@port70.net> <87y35ibujy.fsf@oldenburg2.str.redhat.com> <1204d7b1-d2d2-9369-9f7d-56857ad0a379@arm.com> <87k1h15z7g.fsf@oldenburg2.str.redhat.com>
On 14/03/2019 14:04, Florian Weimer wrote:
> * Szabolcs Nagy:
>> ideally the chroot should have all the runtime libs that
>> may be loaded, if that's too big hassle, then i'd fix
>> the test (to enforce DT_NEEDED or use dlopen before chroot).
>
> Let's do it via dlopen. See below.
>
> Thanks,
> Florian
>
> nss: Fix tst-nss-files-alias-truncated for default --as-needed linking
>
> Linking to the NSS module directly does not work if the linker defaults
> to --as-needed because it will remove the apparently unused DSO
> reference and not generate a DT_NEEDED entry. Use an explicit dlopen
> call, like in the other chroot tests involving NSS modules.
>
> 2019-03-14 Florian Weimer <fweimer@redhat.com>
>
> * nss/tst-nss-files-alias-truncated.c (do_test): Load
> libnss_files.
> * nss/Makefile (tst-nss-files-alias-truncated): Link with -ldl,
> but not with libnss_files.
> (tst-nss-files-alias-truncated.out): Depend on libnss_files.
looks reasonable.
thanks.