about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2010-05-03 10:40:30 -0700
committerPetr Baudis <pasky@ucw.cz>2010-05-12 03:21:21 +0200
commit8ef4dbaf6d8faa91ff42a5d7b8b2c29f1c22bed0 (patch)
treeaa2017e32b151ac35f82b0390f55f21b6bea0ca2
parent850121f39d8b0bcf1e5bb2bddd4b50aae708b661 (diff)
downloadglibc-8ef4dbaf6d8faa91ff42a5d7b8b2c29f1c22bed0.tar.gz
glibc-8ef4dbaf6d8faa91ff42a5d7b8b2c29f1c22bed0.tar.xz
glibc-8ef4dbaf6d8faa91ff42a5d7b8b2c29f1c22bed0.zip
One more bug in ldconfig -r handling.
(cherry picked from commit 49bd556d43f55d0bb6d76d57e846af85f0c986c9)
-rw-r--r--ChangeLog5
-rw-r--r--elf/ldconfig.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index eb9a577918..48f9aa9339 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-05-03  Ulrich Drepper  <drepper@redhat.com>
+
+	* elf/ldconfig.c (parse_conf_include): Don't fall back to
+	directories named in config file outside the chroot.
+
 2010-05-02  Ulrich Drepper  <drepper@redhat.com>
 
 	* misc/mntent_r.c (encode_name): The slow loop handles newlines so we
diff --git a/elf/ldconfig.c b/elf/ldconfig.c
index 76075278c0..0d07a6075a 100644
--- a/elf/ldconfig.c
+++ b/elf/ldconfig.c
@@ -1174,7 +1174,9 @@ parse_conf_include (const char *config_file, unsigned int lineno,
   if (do_chroot && opt_chroot)
     {
       char *canon = chroot_canon (opt_chroot, pattern);
-      result = glob64 (canon ?: pattern, 0, NULL, &gl);
+      if (canon == NULL)
+	return;
+      result = glob64 (canon, 0, NULL, &gl);
       free (canon);
     }
   else