mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +03:00
Update.
* elf/dl-load.c (open_path): Don't exit loop early if we didn't use a directory at all.
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
2000-10-29 Ulrich Drepper <drepper@redhat.com>
|
2000-10-29 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* elf/dl-load.c (open_path): Don't exit loop early if we didn't
|
||||||
|
use a directory at all.
|
||||||
|
|
||||||
* elf/Makefile: Add rules to build and run tst-pathopt.
|
* elf/Makefile: Add rules to build and run tst-pathopt.
|
||||||
* elf/tst-pathopt.c: New file.
|
* elf/tst-pathopt.c: New file.
|
||||||
* elf/tst-pathopt.sh: New file.
|
* elf/tst-pathopt.sh: New file.
|
||||||
|
@@ -1334,6 +1334,7 @@ open_path (const char *name, size_t namelen, int preloaded,
|
|||||||
size_t buflen = 0;
|
size_t buflen = 0;
|
||||||
size_t cnt;
|
size_t cnt;
|
||||||
char *edp;
|
char *edp;
|
||||||
|
int here_any = 0;
|
||||||
|
|
||||||
/* If we are debugging the search for libraries print the path
|
/* If we are debugging the search for libraries print the path
|
||||||
now if it hasn't happened now. */
|
now if it hasn't happened now. */
|
||||||
@@ -1384,7 +1385,7 @@ open_path (const char *name, size_t namelen, int preloaded,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Remember whether we found any existing directory. */
|
/* Remember whether we found any existing directory. */
|
||||||
any |= this_dir->status[cnt] == existing;
|
here_any |= this_dir->status[cnt] == existing;
|
||||||
|
|
||||||
if (fd != -1 && preloaded && __libc_enable_secure)
|
if (fd != -1 && preloaded && __libc_enable_secure)
|
||||||
{
|
{
|
||||||
@@ -1424,9 +1425,12 @@ open_path (const char *name, size_t namelen, int preloaded,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (errno != ENOENT && errno != EACCES)
|
if (here_any && errno != ENOENT && errno != EACCES)
|
||||||
/* The file exists and is readable, but something went wrong. */
|
/* The file exists and is readable, but something went wrong. */
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
/* Remember whether we found anything. */
|
||||||
|
any |= here_any;
|
||||||
}
|
}
|
||||||
while (*++dirs != NULL);
|
while (*++dirs != NULL);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user