artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
70a14bb
)
do a cache lookup as well in case a full pathname is passed to dlopen
author
robert
<robert@openbsd.org>
Mon, 24 Apr 2023 08:59:09 +0000
(08:59 +0000)
committer
robert
<robert@openbsd.org>
Mon, 24 Apr 2023 08:59:09 +0000
(08:59 +0000)
libexec/ld.so/library_subr.c
patch
|
blob
|
history
diff --git
a/libexec/ld.so/library_subr.c
b/libexec/ld.so/library_subr.c
index
c7826c3
..
1eefbce
100644
(file)
--- a/
libexec/ld.so/library_subr.c
+++ b/
libexec/ld.so/library_subr.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: library_subr.c,v 1.5
3 2022/11/07 10:35:26 deraad
t Exp $ */
+/* $OpenBSD: library_subr.c,v 1.5
4 2023/04/24 08:59:09 rober
t Exp $ */
/*
* Copyright (c) 2002 Dale Rahn
@@
-344,6
+344,13
@@
_dl_load_shlib(const char *libname, elf_object_t *parent, int type, int flags,
_dl_build_sod(lname, &sod);
req_sod = sod;
+ object = _dl_find_loaded_shlib(lname, req_sod, flags);
+ if (object) {
+ _dl_free((char *)sod.sod_name);
+ _dl_free(lpath);
+ return (object);
+ }
+
paths[0] = lpath;
paths[1] = NULL;
fullpathagain: