X-Recipient: archive-cygwin@delorie.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:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:content-type; q=dns; s=default; b=Zj
	9OeiAMR2viSKQlDMrd7fsdvRWbfO9Fo2hsPzGf7fr2KjD1VOEWs+4sL+gLlsKlym
	bgODjya4zg5lrV4NNw0fO0IRcKlKn90/grDq8lE2T8YtQO1POWx9D2bAlkUGdiFm
	CPSepeBzIwDVTSis1WScvKKnUSuNA0VzrVdHMHNCo=
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:mime-version:in-reply-to:references:date
	:message-id:subject:from:to:content-type; s=default; bh=eQuOsoNi
	UOcez/qmfW4pmv/M+DU=; b=QgVlApxHrCGUU0uxLV1weKUMvuRwtVSG9ZOiFIxq
	8nopuuT0oQ+qakJ4nnWUcTn2dcDx41E+Lro1cmT2VgDiGw+m5+pd1emCEyMm6APV
	K10Glf6E+82/BSm2zzmACxAORvyadOrulPdfD5KH4VVPaBhMHAs3BQSWcdRhkuGX
	TaY=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=0.3 required=5.0 tests=BAYES_50,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-wm0-f53.google.com
MIME-Version: 1.0
X-Received: by 10.194.8.35 with SMTP id o3mr16844953wja.153.1448844181394; Sun, 29 Nov 2015 16:43:01 -0800 (PST)
In-Reply-To: <20151129201458.GD2755@calimero.vinschen.de>
References: <CABPLASTKt3uKcAbeLNjVa89wrWi_LO6MnPD0Fd=T0FxJG0r5mA@mail.gmail.com>	<20151126131633.GL2755@calimero.vinschen.de>	<CABPLASTpsNA4vGtONb14dQ87UV1gY=UAeHBgEXUmgztDeny_mg@mail.gmail.com>	<CABPLASRpe+ey=dzuzkKYhu4UV=A10y9RkOzLxxA7v4o5CPtSag@mail.gmail.com>	<20151128155421.GX2755@calimero.vinschen.de>	<CABPLASSAabDkMK8ZwF0Q+a1N7enDW5SwuPu3_rnAFNdNZqfXmw@mail.gmail.com>	<1352387525.20151129021637@yandex.ru>	<20151129125921.GA2755@calimero.vinschen.de>	<CABPLASTWGXVXf+YVx5Uwp6wqZqBmWRmkrFdoKCPR30QEV+4BVA@mail.gmail.com>	<20151129171043.GC2755@calimero.vinschen.de>	<20151129201458.GD2755@calimero.vinschen.de>
Date: Mon, 30 Nov 2015 01:43:01 +0100
Message-ID: <CABPLAST44rqZZSXHVswHY2XX3EC7qsSP7OidDt8pt5usmVBqPQ@mail.gmail.com>
Subject: Re: [ANNOUNCEMENT] TEST RELEASE: Cygwin 2.4.0-0.4
From: Kacper Michajlow <kasper93@gmail.com>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=UTF-8
X-IsSubscribed: yes

2015-11-29 21:14 GMT+01:00 Corinna Vinschen <corinna-cygwin@cygwin.com>:
> On Nov 29 18:10, Corinna Vinschen wrote:
>> On Nov 29 15:10, Kacper Michajlow wrote:
>> > 2015-11-29 13:59 GMT+01:00 Corinna Vinschen <corinna-cygwin@cygwin.com>:
>> > > Status 0xC0000078 aka Win32 error 1337 means "invalid SID".  And the
>> > > SID 1-5-32-1001 is in fact invalid.  The S-1-5-32 prefix denotes a builtin
>> > > account, but the RID 1001 is invalid for a builtin group.  1001 is the
>> > > RID of your user account, though, but that would be prefixed by the SID
>> > > of your machine, which looks like S-1-5-21-XXXXXXXX-YYYYYYYY-ZZZZZZZZ.
>> > > I don't see how this broken SID came into life, unless your /etc/passwd
>> > > and/or /etc/group files are broken (hand edited perhaps?).
>> >
>> > I guess I only changed shell to zsh in /etc/passwd, but no other
>> > changes were made. So I have no idea how they could get corrupted
>> > either.
>>
>> They aren't.  There is no 1-5-32-1001 SID in those files and both files
>> look entirely insuspicious.  Given that Cygwin doesn't create any such
>> SID from scratch, I'm totally puzzled where this SID is coming from.
>> Your mkdir trace output doesn't show this SID anywhere else either.
>> This definitely requires more debugging...
>
> I think I found it.  The problem was the handling of Microsoft Accounts
> on machines still using passwd and group files.  And the additional
> group entry for the user with a gid different from the user's uid was
> required to uncover this problem.  This is fortunately a border case,
> but the fix seemed to be simple so I applied it and added a comment
> so as not to forget why we have to do that.
>
>> > Works.
>>
>> Ok, that's good to know.  Now I just have to find out where this
>> weird SID was created :-P
>
> That fall into place after I realized what was happening.  The gid
> 1001 didn't exist in /etc/group so Cygwin calls the function to
> evaluate a SID from a computed UID/GID, and this in turn generated
> the invalid 1-5-32-1001 SID.  WHile writing this I realized that
> I should harden this part of the code to accept only RIDs < 1000...
>
>> > I personally am fine with abandoning /etc/passwd and /etc/group. This
>> > is good enough solution for me. Though there might be other people
>> > with the same issue.
>>
>> This seems to be a bug in Cygwin, and with the content of your files I
>> finally managed to reproduce the issue.  I'm planning to debug this next
>> week and, hopefully, come up with a patch.  It would be nice if you
>> could do another test then in your environment :}
>
> I just uploaded new developer snapshots to https://cygwin.com/snapshots/
> and a new test release 2.4.0-0.6 with the aforementioned patch.  Please
> give any of them a try.

I can confirm that the issue is fixed in 2.4.0-0.6. Thanks for great support!

-Kacper

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

