bin/171604: LD_PRELOAD set to not absolute path crashes rtld
Mark Johnston
markjdb at gmail.com
Thu Sep 13 18:00:17 UTC 2012
The following reply was made to PR bin/171604; it has been noted by GNATS.
From: Mark Johnston <markjdb at gmail.com>
To: bug-followup at FreeBSD.org, simon at comsys.ntu-kpi.kiev.ua
Cc:
Subject: Re: bin/171604: LD_PRELOAD set to not absolute path crashes rtld
Date: Thu, 13 Sep 2012 13:52:55 -0400
--tVmo9FyGdCe4F4YN
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi Andrey,
Could you give the attached patch a try?
Thanks,
-Mark
--tVmo9FyGdCe4F4YN
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="rtld_crash.patch"
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index 050adbb..7272eea 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -1471,8 +1471,9 @@ find_library(const char *xname, const Obj_Entry *refobj)
(pathname = search_library_path(name, ld_library_path)) != NULL ||
(objgiven &&
(pathname = search_library_path(name, refobj->runpath)) != NULL) ||
+ (objgiven &&
(pathname = search_library_path(name, gethints(refobj->z_nodeflib)))
- != NULL ||
+ != NULL) ||
(objgiven && !refobj->z_nodeflib &&
(pathname = search_library_path(name, STANDARD_LIBRARY_PATH)) != NULL))
return (pathname);
--tVmo9FyGdCe4F4YN--
More information about the freebsd-bugs
mailing list