delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/12/12/03:01:48

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-3.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,TW_RX
X-Spam-Check-By: sourceware.org
Date: Mon, 12 Dec 2011 02:01:04 -0600
From: Mike Brown <brown AT mrvideo DOT vidiot DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Latest cygwin.bat - need one
Message-ID: <20111212080104.GH4028@mrvideo.vidiot.com>
References: <20111212054801 DOT GD4028 AT mrvideo DOT vidiot DOT com> <20111212063131 DOT GE4028 AT mrvideo DOT vidiot DOT com> <Pine DOT NEB DOT 4 DOT 64 DOT 1112120101590 DOT 29339 AT panix1 DOT panix DOT com>
MIME-Version: 1.0
In-Reply-To: <Pine.NEB.4.64.1112120101590.29339@panix1.panix.com>
User-Agent: Mutt/1.5.17 (2007-11-01)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On Mon, Dec 12, 2011 at 01:13:02AM -0600, Tim McDaniel wrote:
> On Mon, 12 Dec 2011, Mike Brown wrote:
>> Doing some more digging I found
>> the following posting (via google):
>>
>>    > Does changing 'bash' to '/bin/bash' make a difference?
>>
>>    Answering my own question: yes.
>>
>>    There was a change in execvp()'s behaviour to no longer look up
>>    an executable in the current working directory, wasn't there? I
>>    can't find it in the ChangeLog though.
>>
>> You've got to be kidding.  Why was the looking into CWD removed?
>
> PATH specifies the list of directories to search for executables.
> So if execvp() ever used "." unconditionally regardless of PATH,
> then it violated one of the most long-standing UNIXy rules.

Yes, I know all about the "." security hole and have cleaned many things
that used it.

Even if execvp() was changed to no longer use ".", it should still use the
default path for system executables.  Cygwin does have a default, does it not?
It would seem not, otherwise the absolute path to the shell wouldn't be
required.

Funny thing is that the rxvt program was found.  Ya, I know, Windblows found
it, because it does look in the CWD.  But, once rxvt was started, wouldn't
the default cygwin PATH be brought in so that executables can be found?
Therefore execvp() shouldn't have an issue finding system executables.

So, based upon what actually happens and the user doc, it seems that at
startup, cygwin is deaf, dumb and blind regarding the executables in /bin.
You'd think that cygwin would at least know that when it starts.

Any particular reason why cygwin can't build itself a default PATH for
system executables?

MB
-- 
e-mail: vidiot AT vidiot DOT com | vidiot AT vidiot DOT net            /~\ The ASCII
[I've been to Earth.  I know where it is.         ]      \ / Ribbon Campaign
[And I'm gonna take us there.    Starbuck  3/25/07]       X  Against
Visit - URL: http://vidiot.com/ | http://vidiot.net/     / \ HTML Email

--
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