This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: [ANNOUNCEMENT] TEST RELEASE: Cygwin 1.7.35-0.1
- From: Andrey Repin <anrdaemon at yandex dot ru>
- To: Corinna Vinschen <cygwin at cygwin dot com>, cygwin at cygwin dot com
- Date: Sun, 15 Feb 2015 21:36:16 +0300
- Subject: Re: [ANNOUNCEMENT] TEST RELEASE: Cygwin 1.7.35-0.1
- Authentication-results: sourceware.org; auth=none
- References: <announce dot 20150212202323 dot GI7818 at calimero dot vinschen dot de> <74410B36-A057-483B-AAA3-20C15934374E at Denis-Excoffier dot org> <2F8A6D52-E4D9-48D0-BC21-13213AAC9F4B at etr-usa dot com> <A2F3E911-AA9A-4CFD-ACA7-9C5269339F92 at Denis-Excoffier dot org> <646732991 dot 20150214022454 at yandex dot ru> <54DF0337 dot 7090405 at towo dot net> <767189166 dot 20150214222127 at yandex dot ru> <20150215100515 dot GK7225 at calimero dot vinschen dot de>
- Reply-to: cygwin at cygwin dot com
Greetings, Corinna Vinschen!
>> >> I have a feeling that you have %HOME% defined before mintty starts.
>> >> I just made some tests, and it seems to be the showstopper.
>> >> If %HOME% is already set, nsswitch.conf:db_home is ineffective.
>> >> Simple check for
>> >>
>> >> SET HOME=
>> >> mintty -
>> > I think setting HOME globally, before starting cygwin, is the most
>> > straightforward way to configure one's home directory preference and
>> > should thus be supported.
>>
>> Supported, allright.
>> The issue seems to be contradiction between documented and observed behavior
>> of a specific macro. (Or specific part of the Cygwin, to that extent.)
>> Setting global %HOME% to %HOMEDRIVE%%HOMEPATH% is a natural choice, but Denis
>> seems to want a deviation of it for Cygwin specifically.
> Apples/oranges. I'm talking about the passwd entry and creating
> passwd entry requires some kind of reproducability.
> The environment of the current user has nothing to do with it.
> I hope https://cygwin.com/ml/cygwin/2015-02/msg00425.html makes that clear.
I apologize for not being thorough in my initial testing.
As you can see below, I've found that Cygwin behave exactly as described.
And in regard to bash, it also behave as intended. Or at least, the observed
behavior on Linux host I can check with is same as one observed under Cygwin.
`sudo -E -u otheruser bash -l` start using currently defined $HOME.
>> By the way,
>> getent passwd %USERNAME%
>> return homedir correctly, but bash insist on using existing HOME even if
>> started as login shell.
> Of course. All shells do that. They expect HOME to have a useful value
> because HOME is usually set by the login process before the shell is
> started. And the login process, if there is any, fetches HOME from the
> account DB.
That makes me wonder, if there's a sane way to simulate such login process
under cygwin without asking user for name/password?
Or unsetting global %HOME% is the only way to go?
--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 15.02.2015, <21:27>
Sorry for my terrible english...
--
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