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: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 AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=-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 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 AT cygwin DOT com Subject: Re: Cannot exec() program outside of /bin if PATH is unset References: <5413271B DOT 1010109 AT t-online DOT de> <54134A83 DOT 80107 AT redhat DOT com> <54135451 DOT 3060902 AT t-online DOT de> <601154762 DOT 20140913012935 AT yandex DOT ru> <541378C4 DOT 6030705 AT t-online DOT de> <54137BDE DOT 6040907 AT redhat DOT com> <54137C7F DOT 1040507 AT redhat DOT com> <541415B1 DOT 8090500 AT t-online DOT de> <541698CC DOT 7090802 AT lysator DOT liu DOT se> <5416F946 DOT 7010905 AT t-online DOT de> <20141008134106 DOT GF29235 AT calimero DOT vinschen DOT 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