delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/08/05/05:09: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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=TTV3PqZ0vvBgmTqx
zLJnU/5HiafnReIwvEfItdf5/qgn7hWMb9TczIwv71udVV9JIsoP0mtmqC7O0iyl
TrBXVnHQmO8AniOphOviBZYPuMyyEvXX9y85mobPCkCKBt8oKdSWCIqMqjztUmGn
ZL2/Fj7uZqw7+YO+9svTpo9bb+M=
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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=qa0pU3bbnJE+8FUXNm8Ow1
kUnKE=; b=JqOcO7WnmiDmlcfdEHv8IHtR7lnxsLNC16e7zqQ4ASDRUhkHGRtpRV
yvNwL565KXngyOwY90lKrC11b536Zhc+N3e3Q8taIspzaFBBC234iTb535fplR6V
tio8ULDyhKIqIelAjJvIlVFalRtSzub/R0DbM5zz4X74ik8R6huok=
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: Yes, score=6.7 required=5.0 tests=AWL,BAYES_50,FOREIGN_BODY,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2
X-HELO: mout.kundenserver.de
Subject: Re: [ANNOUNCEMENT] Updated: Cygwin 2.2.0-1
To: cygwin AT cygwin DOT com
References: <announce DOT 20150803131950 DOT GA18878 AT calimero DOT vinschen DOT de> <55BFB64C DOT 1010802 AT towo DOT net> <20150803192940 DOT GA19315 AT calimero DOT vinschen DOT de> <loom DOT 20150804T094839-714 AT post DOT gmane DOT org> <895515CC-6BB7-41E7-AEA5-30FBBE071153 AT etr-usa DOT com> <87wpxac2bj DOT fsf AT Rainer DOT invalid> <20150805075435 DOT GP17917 AT calimero DOT vinschen DOT de>
From: Thomas Wolff <towo AT towo DOT net>
Message-ID: <55C1D2BC.60507@towo.net>
Date: Wed, 5 Aug 2015 11:09:16 +0200
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Thunderbird/38.1.0
MIME-Version: 1.0
In-Reply-To: <20150805075435.GP17917@calimero.vinschen.de>
X-UI-Out-Filterresults: notjunk:1;V01:K0:KUg6KTqMNLs=:4KeUY0++rcOMNAJ6RRxlFs 6mW6S+rc6THj5e0OR55FoWhFgNoaZum/4x5j5ZeT382O0V5v+/Eque/yvfj555ulnBNaSQqT9 tGtRw9DMyD0Yi8EmWLaGbNnSRRuve/6qDW55Q75tOf5cSwd5xASEPGrcD6b82eA+d/rAp1K0B fFwC6FBOFOV1uynxB3wbc4QXdSHKhllcS8GiAKCqLRw/OFS/6TgLmzZAJJVMx07oooIc8x4Em OUjxND6qvGMy+hR5QZXi01Qckbniub7WYsTJg2PPzEh1QUVOHKQGbPR/TrYOvnfpGuzIJAvNS 0eQgHtf3fcDAyFsQoIHcqj7dO3BRlXAmz0fp2C3axlDRAhqsBtLQmwBIraTnjf1VMp3bfCR/X aELRYpxpFxI5wfIYxHa1QeyXAh+rJivl5FG7dbDEukVCx7RPbkJdluYvC+q2yKdDm6VCWRbg0 jo86PUQznC55RiKLGTMHTYqmjLZ7P8eBCdTsBAGXdocBDSFTT04xP8mciRovDT3cQLZlcouD7 LPiUeCHzltU6FIAEeukR7DVdXFlxjLKFmF7r44jMUTL6a5hTz3CSVLgH0p15WUkVBybNxYylW kh9bPUismarSWaR5HDyObI2ICdT8s/S14zffKu/WB8H82BsH0uOA90sT9ZgKHqKW2k8fyJy1J SCySG3i5HmHjzsWUBNhZBIXJmxD7/nD8HqMzyU1sgLI2VUw==
X-IsSubscribed: yes

Am 05.08.2015 um 09:54 schrieb Corinna Vinschen:
> On Aug  4 20:53, Achim Gratz wrote:
>> Warren Young writes:
>>> Here’s an interesting experiment to try on your non-Cygwin POSIX boxes:
>>>
>>>      $ HOME=/dfjkshkds bash -l
>>>      $ echo $HOME
>>>
>>> Guess what it prints.
>>>
>>> Hint: It isn’t the second-to-last field in /etc/passwd. :)
> This is correct behaviour, of course.
>
>>> Spoiler: Apparently Cygwin is already doing the standard thing.
> No, it's not.  Or, to phrase it a bit differently, it doesn't perform
> thr action it was supposed to do.  My testing seemed to be a teeny bit
> half-hearted...
>
> The problem the fix was *supposed* to fix (but it didn't) was to disallow
> incoming $HOME values which are non-POSIX or non-absolute paths.  These
> $HOME values should be disregarded.
Why?
> So the idea was:
>
>    set HOME=foo		<- ignored, set HOME from passwd DB entry
>    set HOME=C:/foo	<- same
No, please don't!
>    set HOME=//foo/bar	<- same
>    set HOME=/foo/bar	<- valid, taken
>
> Right now, when started from a non-Cygwin process, Cygwin takes the
> value of $HOME and simply calls the Win32->POSIX conversion function.
> It does so for a long time, but is that right?  Especially if %HOME% is
> a non-absolute == relative path, the resulting POSIX value of $HOME
> depends on the current directory when starting Cygwin.
Other POSIX systems don't handle this situation well either, so I don't 
see a need to act here.
> This sounds like a terrible idea to me.  Together with cases like
> https://cygwin.com/ml/cygwin/2015-07/msg00344.html, and the fact that
> $HOME has no meaning in native Windows (HOMEPATH/HOMEDRIVE instead) I'm
> inclined to think that any incoming $HOME should make sense from a POSIX
> POV, otherwise we take the value from the passwd DB as defined by
> /etc/nsswitch.conf.
>
> Does anybody have a *good* reason *not* to change this?
Yes, other Windows software ported or inspired from POSIX may also check 
for HOME just in case (e.g. my editor does...).
Also, if somebody sets HOME in Windows, it is more intuitive to use 
Windows path syntax, so this case should be handled gracefully, just 
like PATH is converted.
Thomas

---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus


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