delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/08/05/06:13:25

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:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=rpHiT8uv8Od1lon52C8VW1+UnuDjd5EqRVl8bz2ZCOTI1kHjbSB+8
sflCSdS1xgpJcpo11z8T8PENXwCvhqVUNQo5oWs2cpoMuUkJdml8aH5HCMNBC+VC
s4uyCeYf+emEHWlc+jyNuTXIPOKn/NXMgIG27Q6xHkq3CJ5nsqHHh0=
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:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=FRj+9VGuedTrIKZb3/44ITvF9ng=; b=AbWvTV7Wk87INrf3Y1NLXva74R3F
iGCPAeQA8LtsdfAFopMip/4vUgr4FcNTaWUVo0LXLWk/h4mGNQKCEyqpoDNqeMYY
Y371YbCU6tJKBYhw+nXaenOd8Xl4XlR6O1nWe8IFxy8xPqXAY5h1DsSJFmWIHmkO
u38T3aEl6CHza6Y=
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=-4.1 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2
X-HELO: calimero.vinschen.de
Date: Wed, 5 Aug 2015 12:12:52 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: [ANNOUNCEMENT] Updated: Cygwin 2.2.0-1
Message-ID: <20150805101252.GV17917@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-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> <55C1D2BC DOT 60507 AT towo DOT net>
MIME-Version: 1.0
In-Reply-To: <55C1D2BC.60507@towo.net>
User-Agent: Mutt/1.5.23 (2014-03-12)

--1R6ZDISWaA1muLP0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Aug  5 11:09, Thomas Wolff wrote:
> Am 05.08.2015 um 09:54 schrieb Corinna Vinschen:
> >On Aug  4 20:53, Achim Gratz wrote:
> >>Warren Young writes:
> >>>Here=E2=80=99s an interesting experiment to try on your non-Cygwin POS=
IX boxes:
> >>>
> >>>     $ HOME=3D/dfjkshkds bash -l
> >>>     $ echo $HOME
> >>>
> >>>Guess what it prints.
> >>>
> >>>Hint: It isn=E2=80=99t 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=3Dfoo		<- ignored, set HOME from passwd DB entry
> >   set HOME=3DC:/foo	<- same
> No, please don't!
> >   set HOME=3D//foo/bar	<- same
> >   set HOME=3D/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 =3D=3D 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 s=
ee
> a need to act here.

Other POSIX systems don't usually get a broken path.  The path is set
by the login process with the value taken from the passwd DB.  That's
what should be the default for Cygwin processes started from non-Cygwin
processes as well.  Of course Cygwin has to use $HOME because it could
be set for a reason.  But typically we don't need $HOME from Win32
processes, unless it's propagated from another Cygwin parent process.

The general idea is to make sure the passwd DB contains the correct
home dir and then use that.


Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--1R6ZDISWaA1muLP0
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJVweGkAAoJEPU2Bp2uRE+gZ5AP/RHIPaQ03CGktGm1/NROqVCB
ughtghxJjJ/M3kltz1Fr89ixvkI5hIR0+k9Ta7iaeuaEX7I64P9StqhbdzztEzxU
SIlHjzwi6M6x9lLZyAl+VNmi8lXwftZHgMkBfiLu4c9StX+NxWBXct0slqXky3Cb
bPe5MS9ThVNnC/K486PGszUBjHUgo7jTqsx5G9Wdjx8MQd+kKTa//qay6K7pcOMM
xeswpE10Pr1MmFXPlKU7tDfI5IixTs2YVGDoBwC5Yaf6XyVkP2ajYN2dQBNv6zIR
wDCdxRzpphhYrTah5nDXQsBQP1jSmveE1l6vdVtx5Ovf92YW22fNaDEycDYGCiRp
+vWsgcCS1+dxvkyfEX7UokJfDLhLqVhZzUOT767uN2qdgHQ+8BlW+Stvh1JhjCn5
2Pbhd1ghTGQwax3FDXYQmdxOxAqFtfcpq7FIMQvLMXIyoGuzbRTW0dNh3H5wNmYt
0qdz4t4l5FNsA3rdbydjTglLtkdbhL5HyHnkwneAQAgjjf3vP3rM/Sxd6I/g8T7T
hWIq2LJLmc9MbkouYK6EpdsRWVyPcnHL91hfqGy7Q4x7jkma7ejcpA8DP858cbdZ
69Ct6PCCqRWggVrfLFFMGRWwnB8s2bUpHvUQvQJpZ++Ki7auG5SgM2f5vkty9q5b
AL55xM7rLNxOlO+Hbu6r
=gQPN
-----END PGP SIGNATURE-----

--1R6ZDISWaA1muLP0--

- Raw text -


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