From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4065 invoked by alias); 9 Oct 2014 16:29:10 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 3944 invoked by uid 89); 9 Oct 2014 16:29:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: calimero.vinschen.de Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 09 Oct 2014 16:29:08 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id A37968E0A26; Thu, 9 Oct 2014 18:29:06 +0200 (CEST) Date: Thu, 09 Oct 2014 16:29:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: Cannot exec() program outside of /bin if PATH is unset Message-ID: <20141009162906.GA25389@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <541378C4.6030705@t-online.de> <54137BDE.6040907@redhat.com> <54137C7F.1040507@redhat.com> <541415B1.8090500@t-online.de> <541698CC.7090802@lysator.liu.se> <5416F946.7010905@t-online.de> <20141008134106.GF29235@calimero.vinschen.de> <5435714D.6060206@t-online.de> <20141009100317.GI29235@calimero.vinschen.de> <54369ADE.7060201@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="XsQoSWH+UP9D9v3l" Content-Disposition: inline In-Reply-To: <54369ADE.7060201@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2014-10/txt/msg00102.txt.bz2 --XsQoSWH+UP9D9v3l Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1134 On Oct 9 08:25, Eric Blake wrote: > On 10/09/2014 04:03 AM, Corinna Vinschen wrote: >=20 > > Ok. Or... hmm. The fact that using SetDllDirectory disallows searching > > the CWD got me thinking twice. Security-wise it would really be the > > right thing to do. Usually DLLs are in defined search paths: > >=20 > > - Application dir > > - Application defined dirs > > - System dirs > >=20 > > So, what scenario would actually break by removing CWD from the search > > path? Running tests in an libtoolized project dir, perhaps? Is that a > > valid concern or did libtool already take care of this? >=20 > Running a libtool project is probably unimpacted - libtool builds > in-tree dlls into a subdirectory, which is not usually the CWD. Right, and AFAICS a wrapper is created which adds the path to the DLLs to $PATH before starting the actual executable. So this is no problem at all. Any other idea what *might* be broken if we remove CWD from the=20 DLL search path? Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --XsQoSWH+UP9D9v3l Content-Type: application/pgp-signature Content-length: 819 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJUNrfSAAoJEPU2Bp2uRE+g2rMP/i/NS9DQgJ1eFfXduDMY+8ZQ ZiDclpue9WnW9h3KMnnjxaYAS8L/hG09InaPdbC5ichz65xZop3/zUMB2nipoYnN 5y7VXAnCWnYzMfF8hfi1ZGs4Q+4S3hE86Q44nOBBwxCLQqj0HHUmxzEP0iv2U5RV ivVoAfTYXwK3g+whtEOgSxvnzKetw43nDqLdbhXriJUOpq8elRQZwG/gkZni9/y0 NVg5txW50JS4z9vjNpkNIKShFou+DWzC5N8ASx7Dk2zfqNOSKYND50vRmld+mOW3 EILPdH3GP1oUhGApxcaklCbXNb5ZpRDEr7ADe50YDh3dkJaJoJb/rdWDVmxOKloG WX6Y2yXCVWG3I43EJH2nW+I8qJg7btlE8rJOWvfXBZ6rBgwDD0Cp5v8jFi/jR3ll 2ApL8cySr2/gz8CwA24oAqHxP2EWIhI5Xt31m50bPWhIz6dkRb6iDHzbMuWB/lWI FDdsUbd2sC2w5oDA7lRCzbhwZchNLVrfue3XMQxr0LcwbysdG/coWuSYMo8b7R2w y49ilhavTAMMJJPWJzUoT2577QCA0838AlPm9mSbj3QniUlCOd51msuz/oqz4GvU 1qoJADIiE5wFe8bZpnn9bejBzmRfSZ1apq9+BwMS8QqtpcWAcM6Jj++HzGs+lMkb vA1QvnfjJ1qp22CS8TuR =AgQ5 -----END PGP SIGNATURE----- --XsQoSWH+UP9D9v3l--