This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.29.9000-131-g081bdf9


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  081bdf942126b7d4a368d09438a06fd831c14dad (commit)
      from  97f8225d22ef727ae9935cc231643efdc430d530 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=081bdf942126b7d4a368d09438a06fd831c14dad

commit 081bdf942126b7d4a368d09438a06fd831c14dad
Author: Florian Weimer <fweimer@redhat.com>
Date:   Thu Mar 14 15:02:52 2019 +0100

    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.

diff --git a/ChangeLog b/ChangeLog
index f0281e5..72a1495 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+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.
+
 2019-03-14  Zack Weinberg  <zackw@panix.com>
 
 	* scripts/check-obsolete-constructs.py (HeaderChecker.check):
diff --git a/nss/Makefile b/nss/Makefile
index a8caa8a..95081bd 100644
--- a/nss/Makefile
+++ b/nss/Makefile
@@ -178,4 +178,5 @@ $(objpfx)tst-nss-files-hosts-multi: $(libdl)
 $(objpfx)tst-nss-files-hosts-getent: $(libdl)
 $(objpfx)tst-nss-files-alias-leak: $(libdl)
 $(objpfx)tst-nss-files-alias-leak.out: $(objpfx)/libnss_files.so
-$(objpfx)tst-nss-files-alias-truncated: $(objpfx)/libnss_files.so
+$(objpfx)tst-nss-files-alias-truncated: $(libdl)
+$(objpfx)tst-nss-files-alias-truncated.out: $(objpfx)/libnss_files.so
diff --git a/nss/tst-nss-files-alias-truncated.c b/nss/tst-nss-files-alias-truncated.c
index 2d6aba3..029ae6a 100644
--- a/nss/tst-nss-files-alias-truncated.c
+++ b/nss/tst-nss-files-alias-truncated.c
@@ -17,11 +17,13 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <aliases.h>
+#include <gnu/lib-names.h>
 #include <nss.h>
 #include <stddef.h>
 #include <support/check.h>
 #include <support/namespace.h>
 #include <support/test-driver.h>
+#include <support/xdlfcn.h>
 #include <support/xunistd.h>
 
 static void
@@ -42,8 +44,9 @@ in_chroot (void *closure)
 static int
 do_test (void)
 {
-  /* nss_files has already been loaded via DT_NEEDED, outside the
-     chroot.  */
+  /* Make sure we don't try to load the module in the chroot.  */
+  xdlopen (LIBNSS_FILES_SO, RTLD_NOW);
+
   __nss_configure_lookup ("aliases", "files");
 
   support_become_root ();

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                           |    8 ++++++++
 nss/Makefile                        |    3 ++-
 nss/tst-nss-files-alias-truncated.c |    7 +++++--
 3 files changed, 15 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]