From owner-freebsd-bugs@FreeBSD.ORG Wed Sep 19 05:20:12 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 037F3106566C for ; Wed, 19 Sep 2012 05:20:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C94368FC0A for ; Wed, 19 Sep 2012 05:20:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q8J5KBLV046748 for ; Wed, 19 Sep 2012 05:20:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q8J5KBAd046747; Wed, 19 Sep 2012 05:20:11 GMT (envelope-from gnats) Date: Wed, 19 Sep 2012 05:20:11 GMT Message-Id: <201209190520.q8J5KBAd046747@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: bin/171604: commit references a PR X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2012 05:20:12 -0000 The following reply was made to PR bin/171604; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: bin/171604: commit references a PR Date: Wed, 19 Sep 2012 05:11:37 +0000 (UTC) Author: kib Date: Wed Sep 19 05:11:25 2012 New Revision: 240686 URL: http://svn.freebsd.org/changeset/base/240686 Log: Do not reference z_nodeflib for !objgiven case, thus fixing LD_PRELOAD for a non-absolute path. PR: bin/171604 MFC after: 3 days Modified: head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Wed Sep 19 00:27:50 2012 (r240685) +++ head/libexec/rtld-elf/rtld.c Wed Sep 19 05:11:25 2012 (r240686) @@ -1429,7 +1429,7 @@ find_library(const char *xname, const Ob { char *pathname; char *name; - bool objgiven; + bool nodeflib, objgiven; objgiven = refobj != NULL; if (strchr(xname, '/') != NULL) { /* Hard coded pathname */ @@ -1464,6 +1464,7 @@ find_library(const char *xname, const Ob (pathname = search_library_path(name, STANDARD_LIBRARY_PATH)) != NULL) return (pathname); } else { + nodeflib = objgiven ? refobj->z_nodeflib : false; if ((objgiven && (pathname = search_library_path(name, refobj->rpath)) != NULL) || (objgiven && refobj->runpath == NULL && refobj != obj_main && @@ -1471,9 +1472,8 @@ find_library(const char *xname, const Ob (pathname = search_library_path(name, ld_library_path)) != NULL || (objgiven && (pathname = search_library_path(name, refobj->runpath)) != NULL) || - (pathname = search_library_path(name, gethints(refobj->z_nodeflib))) - != NULL || - (objgiven && !refobj->z_nodeflib && + (pathname = search_library_path(name, gethints(nodeflib))) != NULL || + (objgiven && !nodeflib && (pathname = search_library_path(name, STANDARD_LIBRARY_PATH)) != NULL)) return (pathname); } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"