From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12421 Path: news.gmane.org!.POSTED!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: BUG: $ORIGIN does not seem to work Date: Sun, 28 Jan 2018 01:54:25 +0100 Message-ID: <20180128005425.GK4418@port70.net> References: <17b31628-04b5-3181-4623-046ffc4c0cab@petroprogram.com> <20180126142137.GH4418@port70.net> <20180127110722.GI4418@port70.net> <20180127192621.GJ4418@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1517100772 21840 195.159.176.226 (28 Jan 2018 00:52:52 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 28 Jan 2018 00:52:52 +0000 (UTC) User-Agent: Mutt/1.9.1 (2017-09-22) Cc: musl@lists.openwall.com To: Stefan =?iso-8859-1?Q?Fr=F6berg?= Original-X-From: musl-return-12437-gllmg-musl=m.gmane.org@lists.openwall.com Sun Jan 28 01:52:48 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1efbD1-0004et-5F for gllmg-musl@m.gmane.org; Sun, 28 Jan 2018 01:52:35 +0100 Original-Received: (qmail 11951 invoked by uid 550); 28 Jan 2018 00:54:37 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 11933 invoked from network); 28 Jan 2018 00:54:37 -0000 Mail-Followup-To: Stefan =?iso-8859-1?Q?Fr=F6berg?= , musl@lists.openwall.com Content-Disposition: inline In-Reply-To: Xref: news.gmane.org gmane.linux.lib.musl.general:12421 Archived-At: * Stefan Fr=F6berg [2018-01-28 00:07:33 += 0200]: > strace ./x =2E.. > open("/root/batman/lib/libcrypto.so.1.1", O_RDONLY|O_CLOEXEC) =3D 3 =2E.. > ldd x > =A0=A0=A0 /lib/ld-musl-x86_64.so.1 (0x7f22efa03000) > =A0=A0=A0 libcrypto.so.1.1 =3D> /usr/lib/libcrypto.so.1.1 (0x7f22ef352000) > =A0=A0=A0 libc.so =3D> /lib/ld-musl-x86_64.so.1 (0x7f22efa03000) this is a bug in musl ldd: if the executable path has no / then it assumes origin is /, try ldd ./x then origin is ./ so it works as expected.