summaryrefslogtreecommitdiffstats
path: root/meta/packages/glibc/glibc-cvs/ldconfig.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/packages/glibc/glibc-cvs/ldconfig.patch')
-rw-r--r--meta/packages/glibc/glibc-cvs/ldconfig.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/meta/packages/glibc/glibc-cvs/ldconfig.patch b/meta/packages/glibc/glibc-cvs/ldconfig.patch
new file mode 100644
index 0000000000..c60b9b1432
--- /dev/null
+++ b/meta/packages/glibc/glibc-cvs/ldconfig.patch
@@ -0,0 +1,37 @@
1--- elf/ldconfig.c 2003-07-08 23:26:27.000000000 +0900
2+++ elf/ldconfig.c.debian 2003-07-08 23:29:43.000000000 +0900
3@@ -920,26 +920,24 @@
4 {
5 FILE *file = NULL;
6 char *line = NULL;
7- const char *canon;
8+ const char *canon = filename;
9 size_t len = 0;
10+ int file_fd;
11
12 if (opt_chroot)
13 {
14 canon = chroot_canon (opt_chroot, filename);
15- if (canon)
16- file = fopen (canon, "r");
17- else
18+ if (!canon)
19 canon = filename;
20 }
21- else
22- {
23- canon = filename;
24- file = fopen (filename, "r");
25- }
26+
27+ if ((file_fd = open(canon, O_RDONLY | O_EXCL, 0022)) != -1)
28+ file = fdopen (file_fd, "r");
29
30 if (file == NULL)
31 {
32- error (0, errno, _("Can't open configuration file %s"), canon);
33+ if (opt_verbose)
34+ error (0, errno, _("Can't open configuration file %s"), canon);
35 if (canon != filename)
36 free ((char *) canon);
37 return;