From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4725 Path: news.gmane.org!not-for-mail From: u-igbb@aetey.se Newsgroups: gmane.linux.lib.musl.general Subject: Re: be able to break inheritance of LD_LIBRARY_PATH Date: Fri, 28 Mar 2014 12:52:48 +0000 Message-ID: <20140328125143.GA8221@example.net> References: <20140328104208.GZ8221@example.net> <60c9e4b3-184e-4fae-9160-e83d1bb643a7@email.android.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1396011185 32394 80.91.229.3 (28 Mar 2014 12:53:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Mar 2014 12:53:05 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4729-gllmg-musl=m.gmane.org@lists.openwall.com Fri Mar 28 13:53:15 2014 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1WTWHa-0004gm-So for gllmg-musl@plane.gmane.org; Fri, 28 Mar 2014 13:53:14 +0100 Original-Received: (qmail 5536 invoked by uid 550); 28 Mar 2014 12:53:13 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 5528 invoked from network); 28 Mar 2014 12:53:13 -0000 X-T2-Spam-Status: No, hits=0.0 required=5.0 Received-SPF: none receiver=mailfe07.swip.net; client-ip=31.172.30.3; envelope-from=u-igbb@aetey.se Content-Disposition: inline In-Reply-To: <60c9e4b3-184e-4fae-9160-e83d1bb643a7@email.android.com> User-Agent: Mutt/1.5.23 (2014-03-12) Xref: news.gmane.org gmane.linux.lib.musl.general:4725 Archived-At: On Fri, Mar 28, 2014 at 08:18:28PM +0800, orc wrote: > >As a simpler approach I might suggest simply being able to drop > >LD_LIBRARY_PATH as soon as it has been read. An extra environment > >variable as a flag would do. > Such change should be maintained locally by you probably. It is what I'd very much like to avoid. Local patches need to be maintained and make it painful to upgrade. The functionality which I ask for is otherwise quite general and useful (otherwise neither glibc nor uclibc would bother implementing it). > While LD_PRELOAD/LD_LIBRARY_PATH environment variables are "standard" > enough (widely known), introduction of extra variables that control > various aspects of dynamic linker internals is becoming a pain, especially Sure. I would prefer standalone execution. LD_LIBRARY_PATH is pretty much broken by design anyway. > maintain such a local change that introduces LD_NORPATH (disables reading > DT_RPATHs from executable, and forces it for all setuids). Yes, rpath is bad. My "locally patched" uclibc dynamic loader ignores it unconditionally, as a precaution. Even though the decision to use rpath (or not) should be on the one who compiles, it is virtually impossible to cope with endless variations of build tools which either hardcode rpath presence or even lie about "not using" rpath. Regards, Rune