about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-12-27 16:21:07 +0000
committerJakub Jelinek <jakub@redhat.com>2005-12-27 16:21:07 +0000
commit6b7af0b98b394c10882d125d6ba5786682d7e1d4 (patch)
tree482ce3e053571f6438dfe1c4f1ab7546c76c99e5
parentef35bd89ffe1e107616b49a276a93e208344f93d (diff)
downloadglibc-6b7af0b98b394c10882d125d6ba5786682d7e1d4.tar.gz
glibc-6b7af0b98b394c10882d125d6ba5786682d7e1d4.tar.xz
glibc-6b7af0b98b394c10882d125d6ba5786682d7e1d4.zip
* elf/ldconfig.c (search_dir): Skip prelink temporaries. cvs/fedora-glibc-2_3_90-23
-rw-r--r--ChangeLog4
-rw-r--r--elf/ldconfig.c13
2 files changed, 16 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 4bc4bb12fc..8d7a003cc0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2005-12-27  Jakub Jelinek  <jakub@redhat.com>
+
+	* elf/ldconfig.c (search_dir): Skip prelink temporaries.
+
 2005-12-27  Ulrich Drepper  <drepper@redhat.com>
 
 	* sysdeps/unix/sysv/linux/sparc/bits/errno.h: Define EOWNERDEAD
diff --git a/elf/ldconfig.c b/elf/ldconfig.c
index e5a931913f..beece51ad8 100644
--- a/elf/ldconfig.c
+++ b/elf/ldconfig.c
@@ -693,7 +693,18 @@ search_dir (const struct dir_entry *entry)
 #endif
 	      !is_hwcap_platform (direntry->d_name)))
 	continue;
-      len = strlen (entry->path) + strlen (direntry->d_name);
+      len = strlen (direntry->d_name);
+      if (len >= sizeof (".#prelink#") - 1)
+	{
+	  if (strcmp (direntry->d_name + len - sizeof (".#prelink#") + 1,
+		      ".#prelink#") == 0)
+	    continue;
+	  if (len >= sizeof (".#prelink#.XXXXXX") - 1
+	      && memcmp (direntry->d_name + len - sizeof (".#prelink#.XXXXXX")
+			 + 1, ".#prelink#.", sizeof (".#prelink#.") - 1) == 0)
+	    continue;
+	}
+      len += strlen (entry->path);
       if (len > file_name_len)
 	{
 	  file_name_len = len + 1;