summaryrefslogtreecommitdiff
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2000-01-11 21:38:48 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2000-01-11 21:38:48 +0000
commitb5b1ca8efd2d0418614cc1e9c176fec1909f83ac (patch)
tree07ce5f0bd8db3e44a1b374bb76bc854e70c2e9d7 /gnu/usr.bin
parent19ed2e2ba9336043abf65a43020ae656056274c0 (diff)
Fix the logic that determines whether or not a dlopen()'d name should
be looked for in the libary search path. If a name has a '/' in it, treat it as a pathname, even if it starts with "lib"; gsar@ActiveState.com
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/ld/rtld/rtld.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gnu/usr.bin/ld/rtld/rtld.c b/gnu/usr.bin/ld/rtld/rtld.c
index e53d78dc9be..00291ea92f6 100644
--- a/gnu/usr.bin/ld/rtld/rtld.c
+++ b/gnu/usr.bin/ld/rtld/rtld.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtld.c,v 1.13 1999/12/10 00:11:02 deraadt Exp $ */
+/* $OpenBSD: rtld.c,v 1.14 2000/01/11 21:38:47 millert Exp $ */
/* $NetBSD: rtld.c,v 1.43 1996/01/14 00:35:17 pk Exp $ */
/*
* Copyright (c) 1993 Paul Kranenburg
@@ -1420,7 +1420,11 @@ build_sod(name, sodp)
sodp->sod_library = 0;
sodp->sod_major = sodp->sod_minor = 0;
- /* asking for lookup? */
+ /* is this a filename? */
+ if (strchr((char *)sodp->sod_name, '/'))
+ return;
+
+ /* does it look like /^lib/ ? */
if (strncmp((char *)sodp->sod_name, "lib", 3) != 0)
return;