summaryrefslogtreecommitdiff
path: root/ldso
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2011-04-14 12:52:23 +0200
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2012-06-15 14:00:36 +0200
commit26284b4021edcbc32f703fb813e379b6d5af02ef (patch)
tree85e30ecd773998d156a4da3836f5d10d10ccde67 /ldso
parentf2401c418b08ddf524c8bbf64c0892f29d12a519 (diff)
add LDSO_SAFE_RUNPATH config option
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'ldso')
-rw-r--r--ldso/ldso/dl-elf.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ldso/ldso/dl-elf.c b/ldso/ldso/dl-elf.c
index 55ff31e4f..02e59a349 100644
--- a/ldso/ldso/dl-elf.c
+++ b/ldso/ldso/dl-elf.c
@@ -174,8 +174,11 @@ search_for_named_library(const char *name, unsigned rflags, const char *path_lis
_dl_strcpy(mylibname, "."); /* Assume current dir if empty path */
_dl_strcat(mylibname, "/");
_dl_strcat(mylibname, name);
- if ((tpnt = _dl_load_elf_shared_library(rflags, rpnt, mylibname)) != NULL)
- return tpnt;
+#ifdef __LDSO_SAFE_RUNPATH__
+ if (*mylibname == '/')
+#endif
+ if ((tpnt = _dl_load_elf_shared_library(rflags, rpnt, mylibname)) != NULL)
+ return tpnt;
path_n = path+1;
}
path++;