From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/4724 Path: news.gmane.org!not-for-mail From: Alexander Monakov Newsgroups: gmane.linux.lib.musl.general Subject: Re: be able to break inheritance of LD_LIBRARY_PATH Date: Fri, 28 Mar 2014 16:27:05 +0400 (MSK) Message-ID: 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 1396009631 13213 80.91.229.3 (28 Mar 2014 12:27:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Mar 2014 12:27:11 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-4728-gllmg-musl=m.gmane.org@lists.openwall.com Fri Mar 28 13:27:21 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 1WTVsV-0005Sh-Of for gllmg-musl@plane.gmane.org; Fri, 28 Mar 2014 13:27:19 +0100 Original-Received: (qmail 24093 invoked by uid 550); 28 Mar 2014 12:27:19 -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 24083 invoked from network); 28 Mar 2014 12:27:19 -0000 In-Reply-To: <20140328104208.GZ8221@example.net> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) Xref: news.gmane.org gmane.linux.lib.musl.general:4724 Archived-At: Instead of patching the dynamic loader, you can supply an LD_PRELOAD module that would remove/modify LD_LIBRARY_PATH appropriately at startup: #include void __attribute__((constructor)) remove_ld_l_p(void) { unsetenv("LD_LIBRARY_PATH"); unsetenv("LD_PRELOAD"); } HTH. Alexander