From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4726 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 13:04:17 +0000 Message-ID: <20140328130417.GB8221@example.net> References: <20140328104208.GZ8221@example.net> 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 1396011880 8435 80.91.229.3 (28 Mar 2014 13:04:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Mar 2014 13:04:40 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4730-gllmg-musl=m.gmane.org@lists.openwall.com Fri Mar 28 14:04:51 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 1WTWSo-0003Tg-0u for gllmg-musl@plane.gmane.org; Fri, 28 Mar 2014 14:04:50 +0100 Original-Received: (qmail 11406 invoked by uid 550); 28 Mar 2014 13:04:48 -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 11398 invoked from network); 28 Mar 2014 13:04:48 -0000 X-T2-Spam-Status: No, hits=0.8 required=5.0 tests=BAYES_50 Received-SPF: none receiver=mailfe03.swip.net; client-ip=96.47.226.22; envelope-from=u-igbb@aetey.se Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Xref: news.gmane.org gmane.linux.lib.musl.general:4726 Archived-At: On Fri, Mar 28, 2014 at 04:27:05PM +0400, Alexander Monakov wrote: > Instead of patching the dynamic loader, you can supply an LD_PRELOAD module > that would remove/modify LD_LIBRARY_PATH appropriately at startup: Thanks for the suggestion Alexander, but I do not feel this would be "good enough". What you propose is to mix together two otherwise distinct mechanisms. I like to keep things orthogonal, to avoid keeping in mind unrelated constraints. A separate flag variable is both easier and safer to use than handling LD_PRELOAD depending on whether/how it is used for other purposes at the same time. This would neither cover a situation when the dynamic loader would look for "LD_LIBRARY_PATH" again _after_ having run preload. This is afaik not the case with musl now and probably will never be but yet the assumption relies on looking at the internals - conceptually as bad/good as patching in the first hand. Regards, Rune