X-Recipient: archive-cygwin@delorie.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:message-id:date:from:mime-version:to:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	 q=dns; s=default; b=WSJ0yM2/dYJx0MCVSsVaSHp47tsm/gBqKMIcdRTlTO9
	vcVD5BrYh9t8y+CTPAYGmFxrOcN+W0xcUyUMjdKvB5Lp5oZASgHt0ZC4MNFxB0od
	VbRacmFHYBbKDEe7oaI/TIL6/cjQ/zDui/0y0StPhUZeDM4jsi1RaiaW0rRobv5I
	=
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:message-id:date:from:mime-version:to:subject
	:references:in-reply-to:content-type:content-transfer-encoding;
	 s=default; bh=Kio0fRwtcChE8Zo5WO/gDVnYED0=; b=va0nf+ULDjAV8UXi5
	EenxtnuUxO7Z+XPINGSlbMRR5Z7FBJb78quT9RJizWacd6V7/qzB4M+7hgv8UUkj
	KkFJlJjum3NK76i5TMRP/pQ6YxPncBK8xeV6WAxC18TZ2AjQZrfZeh2/sDk7sv/3
	5d8Lm0fxnYodv79J8pecoMExAY=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2
X-HELO: mailout06.t-online.de
Message-ID: <5435714D.6060206@t-online.de>
Date: Wed, 08 Oct 2014 19:15:57 +0200
From: Christian Franke <Christian.Franke@t-online.de>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0 SeaMonkey/2.26.1
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Cannot exec() program outside of /bin if PATH is unset
References: <5413271B.1010109@t-online.de> <54134A83.80107@redhat.com> <54135451.3060902@t-online.de> <601154762.20140913012935@yandex.ru> <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>
In-Reply-To: <20141008134106.GF29235@calimero.vinschen.de>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

Corinna Vinschen wrote:
> On Sep 15 16:35, Christian Franke wrote:
>> ...
> I'm somewhat reluctant to add a call to SetDllDirectory to the Cygwin
> DLL for two reasons.
>
> - Calling SetDllDirectory with an explicit dir doesn't just add this dir
>    to the search path, it also removes the CWD from the search path.
>    While I agree that this is a good thing from a security POV, can we be
>    sure that this behaviour isn't needed somewhere, by somebody?
>
> - The fact that SetDllDirectory affects searching linked DLLs in calls
>    to CreateProcess is undocumented.  Per the original MSDN pages,
>    SetDllDirectory affects calls to LoadLibrary and LoadLibraryEx, but
>    not linked DLLs when starting a child process.  The latter is only
>    mentioned in a Community Addition:
>
>    http://msdn.microsoft.com/en-us/library/windows/desktop/ms686203%28v=vs.85%29.aspx
>
> Having said that, we can certainly test this, but I'm wondering
> if an upstream Cygwin patch might be ok.  Something similar has been
> applied to the portable OpenSSH repository years ago, so there's
> precedent.

We could leave this open for now. I already added an easy workaround to 
postfix
(add PATH=/usr/bin to import/export_environment default settings).

Christian


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

