From e4aa966cf25e83cd0c72f34f7855a995ff93944d Mon Sep 17 00:00:00 2001 From: Carmelo Amoroso Date: Tue, 25 Oct 2011 12:28:51 +0200 Subject: ldso: let people disable to lookup into LD_LIBRARY_PATH On hardened system it could be useful to disable the use of LD_LIBRARY_PATH. Signed-off-by: Carmelo Amoroso --- ldso/ldso/dl-elf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ldso/ldso/dl-elf.c') diff --git a/ldso/ldso/dl-elf.c b/ldso/ldso/dl-elf.c index db2872cd0..308a66c63 100644 --- a/ldso/ldso/dl-elf.c +++ b/ldso/ldso/dl-elf.c @@ -236,6 +236,7 @@ struct elf_resolve *_dl_load_shared_library(int secure, struct dyn_elf **rpnt, } #endif +#ifdef __LDSO_LD_LIBRARY_PATH__ /* Check in LD_{ELF_}LIBRARY_PATH, if specified and allowed */ if (_dl_library_path) { _dl_if_debug_dprint("\tsearching LD_LIBRARY_PATH='%s'\n", _dl_library_path); @@ -244,7 +245,7 @@ struct elf_resolve *_dl_load_shared_library(int secure, struct dyn_elf **rpnt, return tpnt1; } } - +#endif /* * The ABI specifies that RUNPATH is searched after LD_LIBRARY_PATH. */ -- cgit v1.2.3