This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, master, updated. glibc-2.11-397-g7dee266
- From: drepper at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 3 May 2010 21:05:17 -0000
- Subject: GNU C Library master sources branch, master, updated. glibc-2.11-397-g7dee266
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 7dee26605bf8627f0673f81635c38c8a565dd2b7 (commit)
from f2976023940a8ef3bbe0c7e593897e1b612370f1 (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://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=7dee26605bf8627f0673f81635c38c8a565dd2b7
commit 7dee26605bf8627f0673f81635c38c8a565dd2b7
Author: Ulrich Drepper <drepper@redhat.com>
Date: Mon May 3 14:04:52 2010 -0700
Fix ldconfig to handle symlinks in chroot correctly.
diff --git a/ChangeLog b/ChangeLog
index d332b32..064dbf9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2010-05-03 Ulrich Drepper <drepper@redhat.com>
+ [BZ #11149]
+ * elf/ldconfig.c (search_dir): Fix handling of symlinks in chroot.
+
* elf/chroot_canon.c (chroot_canon): Use xmalloc and xrealloc.
* elf/ldconfig.c (parse_conf_include): Don't fall back to
diff --git a/elf/ldconfig.c b/elf/ldconfig.c
index 4b9c435..00664e6 100644
--- a/elf/ldconfig.c
+++ b/elf/ldconfig.c
@@ -773,7 +773,18 @@ search_dir (const struct dir_entry *entry)
{
/* In case of symlink, we check if the symlink refers to
a directory. */
- if (__builtin_expect (stat64 (real_file_name, &stat_buf), 0))
+ char *target_name = real_file_name;
+ if (opt_chroot)
+ {
+ target_name = chroot_canon (opt_chroot, file_name);
+ if (target_name == NULL)
+ {
+ if (strstr (file_name, ".so") == NULL)
+ error (0, 0, _("Input file %s not found.\n"), file_name);
+ continue;
+ }
+ }
+ if (__builtin_expect (stat64 (target_name, &stat_buf), 0))
{
if (opt_verbose)
error (0, errno, _("Cannot stat %s"), file_name);
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 3 +++
elf/ldconfig.c | 13 ++++++++++++-
2 files changed, 15 insertions(+), 1 deletions(-)
hooks/post-receive
--
GNU C Library master sources