summaryrefslogtreecommitdiffstats
path: root/libexec
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1997-01-14 17:53:55 +0000
committerjdp <jdp@FreeBSD.org>1997-01-14 17:53:55 +0000
commitdcd41564c56a83c203fdff6649a1c223cbef7e70 (patch)
tree895f3dae3888457f6e92d7259f23b9a6fc8c94a2 /libexec
parent911d47a567c8ed7442d311f0e2e1e6451cc497ae (diff)
downloadFreeBSD-src-dcd41564c56a83c203fdff6649a1c223cbef7e70.zip
FreeBSD-src-dcd41564c56a83c203fdff6649a1c223cbef7e70.tar.gz
If a library is found in the hints file, but the library doesn't exist,
ignore the hint. This is a straightforward fix, and it should go into 2.2 after a burn-in period of a few days. Noticed by: bde
Diffstat (limited to 'libexec')
-rw-r--r--libexec/rtld-aout/rtld.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libexec/rtld-aout/rtld.c b/libexec/rtld-aout/rtld.c
index cbba78e..6321a11 100644
--- a/libexec/rtld-aout/rtld.c
+++ b/libexec/rtld-aout/rtld.c
@@ -1711,6 +1711,10 @@ findhint(name, major, minorp)
*/
if (strcmp(name, hstrtab + bp->hi_namex) == 0 &&
bp->hi_major == major) {
+ struct stat s;
+
+ if (stat(hstrtab + bp->hi_pathx, &s) == -1)
+ return NULL; /* Doesn't actually exist */
*minorp = bp->hi_ndewey >= 2 ? bp->hi_minor : -1;
return strdup(hstrtab + bp->hi_pathx);
}
OpenPOWER on IntegriCloud