delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/10/16/17:51:38

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=rjdjf/Hf6End0LbskHITgbHCIEJDGzuVVwi+w0zneJH
lckOJU85iesZ/OOSCRDGRgL/atjttjsIraTQciIfNl5rxT1JPYzIWNyxrJqVAH2t
ML6vniZEHdoc3Fuw2vkH6q4D93PYhOj/R3ONZe0awhxhVYBUnhFN37ou7i6BiE0Q
=
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=RhWmjU9rNWckDKDqYUrPPox4acM=; b=DkO8sFcLMecOBvJrg
1RHdMUOgrKgzQ6uHd9d2aAZ+lL+hRdWuNtv3kxHinVgAEFM1BWlo3r+GnGWG4TCw
tGadN0Kl12x0smX65BJRGkbE8ZpkTy/NklUPaFuytaxv4fWM/HlNIX3vEwfFZxsX
TLG/3B0ilJSr8WxTnm4NpGPpCA=
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=-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: mailout10.t-online.de
Message-ID: <54403DCD.7090107@t-online.de>
Date: Thu, 16 Oct 2014 23:51:09 +0200
From: Christian Franke <Christian DOT Franke AT t-online DOT 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 AT cygwin DOT com
Subject: Re: Cannot exec() program outside of /bin if PATH is unset
References: <20141009100317 DOT GI29235 AT calimero DOT vinschen DOT de> <54369ADE DOT 7060201 AT redhat DOT com> <20141009162906 DOT GA25389 AT calimero DOT vinschen DOT de> <571726 DOT 85545 DOT bm AT smtp112 DOT sbc DOT mail DOT ne1 DOT yahoo DOT com> <20141010103446 DOT GJ2681 AT calimero DOT vinschen DOT de> <CAO1jNwt5UyB9CDKJdotXUND--mg1sY-5Fu+-ZHf2atM5_=HArA AT mail DOT gmail DOT com> <CAMCbSMrar1Zu4p6gN=gc8-XqE-8RUTmP3er0ujeN--CHKzCNAQ AT mail DOT gmail DOT com> <816144 DOT 8551 DOT bm AT smtp119 DOT sbc DOT mail DOT ne1 DOT yahoo DOT com> <CAMCbSMpWKbSVhVu85_02fN3sgWXiFBkUzjOOAJ6+Jxot8X6E=Q AT mail DOT gmail DOT com> <20141010153925 DOT GL2681 AT calimero DOT vinschen DOT de> <20141014193045 DOT GF2681 AT calimero DOT vinschen DOT de>
In-Reply-To: <20141014193045.GF2681@calimero.vinschen.de>
X-IsSubscribed: yes

Corinna Vinschen wrote:
> ...
> I implemented this in the latest snapshot.  It calls SetDllDirectory
> on Cygwin's /bin, and dlopen addiotnally tries to load the DLL with
> LoadLibraryEx(LOAD_WITH_ALTERED_SEARCH_PATH) if all else failed.

For some reason, the SetDllDirectory() call has no effect for exec():

Testcase:

$ unset PATH

$ uname -srvm
-bash: uname: No such file or directory

$ /bin/uname -srvm
CYGWIN_NT-6.1-WOW64 1.7.33s(0.277/5/3) 20141014 19:44:03 i686

$ /usr/sbin/alternatives
/usr/sbin/alternatives: error while loading shared libraries: ?: cannot 
open shared object file: No such file or directory

$ PATH=/bin /usr/sbin/alternatives
alternatives version 1.3.30c - ...

$ cd /bin

$ /usr/sbin/alternatives
alternatives version 1.3.30c - ...



> Please give the latest snapshot from https://cygwin.com/snapshots/
> a try.

No regressions found yet :-)

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

- Raw text -


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