aboutsummaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-07-21 20:17:47 +0000
committerUlrich Drepper <drepper@redhat.com>2003-07-21 20:17:47 +0000
commitca86a763669147f4312d877b322737feb6ff7a3a (patch)
tree78e788da472202666479287817d462cd78cdfa6b /elf
parent66c79db954a8140593af322a9dc8a1a5f3ac421a (diff)
downloadglibc-ca86a763669147f4312d877b322737feb6ff7a3a.zip
glibc-ca86a763669147f4312d877b322737feb6ff7a3a.tar.gz
glibc-ca86a763669147f4312d877b322737feb6ff7a3a.tar.bz2
Update.
2003-07-21 HJ Lu <hongjiu.lu@intel.com> * elf/ldconfig.c (search_dir): Treat symlink as regular file if it won't point to itself.
Diffstat (limited to 'elf')
-rw-r--r--elf/ldconfig.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/elf/ldconfig.c b/elf/ldconfig.c
index bb9a3d4..1acacb4 100644
--- a/elf/ldconfig.c
+++ b/elf/ldconfig.c
@@ -787,11 +787,18 @@ search_dir (const struct dir_entry *entry)
if (real_name != real_file_name)
free (real_name);
- /* Links will just point to itself. */
+ /* A link may just point to itself. */
if (is_link)
{
- free (soname);
- soname = xstrdup (direntry->d_name);
+ /* If the path the link points to isn't its soname, we treat
+ it as a normal file. */
+ if (strcmp (basename (real_name), soname) != 0)
+ is_link = 0;
+ else
+ {
+ free (soname);
+ soname = xstrdup (direntry->d_name);
+ }
}
if (flag == FLAG_ELF