diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2011-04-14 12:52:23 +0200 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2012-06-15 14:00:36 +0200 |
commit | 26284b4021edcbc32f703fb813e379b6d5af02ef (patch) | |
tree | 85e30ecd773998d156a4da3836f5d10d10ccde67 /ldso | |
parent | f2401c418b08ddf524c8bbf64c0892f29d12a519 (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.c | 7 |
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++; |