delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/10/25/14:15:34

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=snqfIDYkccx6omhOau52iBjn/bc06ojI/ely7nbrmepyc/0kNozsB
siy0bKyXfNBfNHvaT0UHcOP/vbDEuLZ16yTgHKZORff85I3PfKaLYD8Riyx6qa7C
WTm/5WHHCUpVWHakmVP3XLU5xju+o4C6sO+zbcLxoai3tjMrOgBvAQ=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=Wq3zrCfeKCFA99bWEFL/CnD/DIc=; b=q4f7Jof9E5pnak9ijokfypja1h/T
IFtVS2xJst0j2R/cmpaeNvpakhNFqpgKiLFXQn2PskvS1Hmi7AgCDmGaZA5LSd+g
Z0BYq3D8s6ou0OekqciQkotrsXgosmK8PFMo55GL6VTI6Hj5U3H3G+LAdQhhxWeH
BeuZNoe/4lu9Hig=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
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
Date: Sat, 25 Oct 2014 20:15:13 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: [ANNOUNCEMENT] TEST RELEASE: Cygwin 1.7.33-0.1
Message-ID: <20141025181513.GC30397@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <announce DOT 20141022092323 DOT GH32374 AT calimero DOT vinschen DOT de> <A0FD00D9-6DFB-4E3D-9FDE-44BC1CAAEEDC AT Denis-Excoffier DOT org> <20141024110209 DOT GJ20607 AT calimero DOT vinschen DOT de> <25D5C8B8-57B7-449C-95C6-CD9055816B6B AT Denis-Excoffier DOT org> <20141024193638 DOT GO20607 AT calimero DOT vinschen DOT de> <544AB396 DOT 5060300 AT t-online DOT de> <09092535-826E-4995-94E8-B4AF3E4F5089 AT Denis-Excoffier DOT org> <20141025111016 DOT GA30397 AT calimero DOT vinschen DOT de> <20141025144934 DOT GB30397 AT calimero DOT vinschen DOT de> <C5ABF401-5848-4C24-BDA0-C6EA98B3BC97 AT Denis-Excoffier DOT org>
MIME-Version: 1.0
In-Reply-To: <C5ABF401-5848-4C24-BDA0-C6EA98B3BC97@Denis-Excoffier.org>
User-Agent: Mutt/1.5.23 (2014-03-12)

--m51xatjYGsM+13rf
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Oct 25 19:29, Denis Excoffier wrote:
> On 2014-10-25 16:49, Corinna Vinschen wrote:
> > Apart from SetDllDirectory and AddDllDirectory, what about this very
> > simple solution in Cygwin:
> >=20
> > - Don't call SetDllDirectory at all, thus "." is kept in the search
> >  path.
> >=20
> > - In execve, when creating the Windows environment for the child proces=
s,
> >  check if $PATH is empty.  If so, set $PATH to /bin for the child.
> >  Or, check if /bin is in $PATH, if not, add it.
>
> Then you may add it at the beginning. People that would want it at the
> end (or elsewhere) can insert it explicitly.

Appending it to PATH doesn't change the search order, prepending does.
Also, appending is the faster technique, especially in this context in
the code.

> Also make sure to consider /usr/bin and /bin as being equivalent here.

This functionality would test the Windows path, not the POSIX path.

> However, modifying PATH behind the scenes may be considered as an
> unexpected intrusion by the user (PATH is for user consumption isn't
> it?). Aren't there any legitimate scenarios where the user would omit
> /usr/bin from the PATH?

No, not really.

> Is it possible to SetDllDirectory("/usr/bin") only if /usr/bin is
> _not_ in PATH?  This would be less intrusive.

This would potentially break your scenario again.  The /bin dir would be
search before your PATH settings again.  Yes, you always have /bin in
PATH, but I'm thinking of the general case.


Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--m51xatjYGsM+13rf
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJUS+ixAAoJEPU2Bp2uRE+ghXAP/3iwL0uuQl8I0e7IQTXA2iH7
+3A19X5ku2zf2ZkuXvW6WcecFFVw1iFZINAP7MqWKH73TZ9ruqITAvWKmK9/5Gmo
K6wEWmws9hMXC4VHeo+zSshTQXMYpn7epwIjZeBNnZFAxCz3ngBxBS4cW0QRuvft
kHyygKQ+C4Pm8DnfUKjxxNF5ZjixvdJipzuajL5upyP96tsz0enCe48XQ708bEKR
lF0rRCYZDgLlr/oUTMYD2eCbBCF8sC0XOE38TJGYDrfpCSmrXCZEJ1qJ6gtoGG4n
7/95Bc9ZAo+kWoEoG0HguH9RmdmhjKCId/wczpAdzWlrrftVBjRHxXY8SHU9OUHg
jj/bV96KnL9F+GQ8IdTkporf2t9aKe3ePV0zC8bFEbRzBmK3FDkW8oye0knGcqXB
VxPNTVaOW4dEIcuOtYOnBE9HnNQcRO7GiC9b2Ll8GmOZ4XfCc2rGw40PnuJsKPdf
8tdvUV3MUvgSmr+Cu7k7LVVPKinlxDxDgCbVBKNKt4OxecfpfkqvtbX87amyNelX
Ds/tWtZcpeDhxplzC0n9+5PUdRVTD1QyjtdsL8Pz+b4XgnN3TeB2dkE3SEMEpNHE
g/eqXRSw+ghtxHeGYeFecHnUx5sSTSfvqWypbOl+tLWBZNkYwjQClBTQa/9RCkfo
ec78eU2ylDlfMetYiAOy
=nKSr
-----END PGP SIGNATURE-----

--m51xatjYGsM+13rf--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019