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:date:from:to:cc:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; q=dns; s=
	default; b=O3kL2fuDY1y5Y3lR6zPOMUEkmAooKwcTIOMHYMlk8hlE2Mo+jOu0t
	0LH1X5J4uwcie8yKgk9MoeXfaI+THdHBgilKmUxtsIlU9ARTGn2lu6RmOEICKT13
	qZRPbCSExskasmBCR4pW38j9fRffubeNBjk0qpuhbb/6/JT3spGO2Q=
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:cc:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; s=default;
	 bh=Fx9dafnrrDMvKAjlqz39duCVvIM=; b=VLyubH/r8yINHJyLCwHnfNksxh7N
	8fBqWitHkZTj++AcYtGmNsAFeXku2yCU+71pKDGCoEwyQ08MRFs/N93l+6XSDiFo
	yVnLfeaOcDAQ5B6bkFnDUiuvpAltabw1MLLdkJxHQhZGRzZygxKa1X1E7D5cbMta
	eE6lxFPz2I97WFc=
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-Spam-SWARE-Status: No, score=-104.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GOOD_FROM_CORINNA_CYGWIN,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=anybody, virus, interaction, H*F:D*cygwin.com
X-HELO: mout.kundenserver.de
Date: Thu, 24 Oct 2019 16:06:11 +0200
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: Maayan Apelboim <Maayan.Apelboim@clarizen.com>
Cc: cygwin@cygwin.com
Subject: Re: getent doesn't work properly
Message-ID: <20191024140611.GG16240@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: Maayan Apelboim <Maayan.Apelboim@clarizen.com>,	cygwin@cygwin.com
References: <20191018105229.GE16240@calimero.vinschen.de> <AM4PR07MB34731435DFE766479991C050956B0@AM4PR07MB3473.eurprd07.prod.outlook.com> <20191023114234.GZ16240@calimero.vinschen.de> <AM4PR07MB347382AE0B09286C8E8190C8956B0@AM4PR07MB3473.eurprd07.prod.outlook.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha256;	protocol="application/pgp-signature"; boundary="ufMBWnG1WFkAvCRz"
Content-Disposition: inline
In-Reply-To: <AM4PR07MB347382AE0B09286C8E8190C8956B0@AM4PR07MB3473.eurprd07.prod.outlook.com>
User-Agent: Mutt/1.12.1 (2019-06-15)

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

On Oct 23 13:33, Maayan Apelboim wrote:
>=20
>=20
> Since I can't reproduce this problem, would you mind trying to run getent=
 under strace?  It would be helpful to get 2 strace outputs for the same ac=
count, one working, one failing.  Call it like this:
>=20
>   $ strace -o getent-1.trace getent passwd <account>
>=20
>=20
> Thanks,
> Corinna
>=20
> --
> Corinna Vinschen
> Cygwin Maintainer
>=20
>=20
> ---------------
>=20
> Attached.

Thanks.  What happens is that in the non-working scenario the user
name is refused by Cygwin because it's apparently not in the primary
domain of the machine.  I.e., if the machine's primary domain is
"dom0", and "user1" is in "dom1", then the account has to be called
"dom1+user1".  The name only is forbidden in this case.

However, this doesn't explain why this happens at all since apparently
"user1" is in the primary domain of the machine, and why it only fails
intermittendly.  In both cases, working and non-working, the domain is
returned by the same Windows call LookupAccountNameW.

What's really strange is that in the working case a lot of network
related Windows DLLs are loaded into the process, e.g. wshqos.dll,
WSHTCPIP.DLL, wship6.dll etc., while this does not happen in the
non-working case.  None of these DLLs is requested by Cygwin, so this is
something occuring in the native Windows background.  This is a bit
suspicious and may point to some interaction with a virus scanner or
something along these lines, and which for some reason doesn't always
work as desired (Avast, anybody?)  Can you check this, perhaps?

Apart from that first question is, is the domain really called "dom"
and is the user account name really "user1"?  I'm asking because
the name may collide with another account name from a builtin or
second domain, and sometimes the wrong user account is returned by the
Windows functions for whatever reason.

Second question is, can I send you the URL to a Cygwin test DLL with
extended debug info in private email?  In this case I'd only need
the non-working trace, preferredly verbatim, and you can return the
trace by private email as well.


Thanks,
Corinna

--=20
Corinna Vinschen
Cygwin Maintainer

--ufMBWnG1WFkAvCRz
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl2xr9MACgkQ9TYGna5E
T6BkPg/9GxAC3RFfq/tkoupFpNIDCZL+rNtfcemUJ2CVf7zOJGknWYHt+/2SdopX
6tnHczQUamSqZI8KSdGT24r3YsxckuecEiYdqz8+G1NQR83R+YvBXaGdfQ+scWCe
IuUT5aDBXZ6BQSmDf/mPYvHU1Ve2QF/lMQBVDfgdx9uDo5a1eyGq+qOPYgyez7V8
R+yc18VmayZ1+/P/0CLEAQZHTMkx7kRfxmBORmE+sVsCAs+XbacFTF7qKTkMduL+
PJM9gRI6YzBY8NhnW6u4FjTwv6A54Zs51JATcUJiuW0eWFodauLqbmQfm/BGJs/x
DxoY8TWt3DlLAqdPq2Ql13+VwIhaxvGQzDKdHSMdzCfkrbYi8CZKwdW42LY1i92R
VjcAwD8mLQIoI02OhhaY7Y+NKZj9+twgfrauTezqqRdBMJEz2QILHav2LCm190Xa
XjDWoYLCKpH+HQal8PIkYU9CitLljSUWkBseBhkqV5ritvbcBpXyFQ0Iv26BPWlr
igI6GXcfK+j9CLfXagXIQTQARqgsEsGPKbGSf1fu4y/S2b876YbnL5s3Q7fg+hxW
DIfmysebNuu2xYyS3DX5mQAHeePap/tE5cex9yR62wfhori/3ob/+a/6T9eUsz9e
pIgur0xU7kTogxI3GdGjqdWJ1ewcP6tPIamW/cSKkfd+YO0y0/g=
=ziIS
-----END PGP SIGNATURE-----

--ufMBWnG1WFkAvCRz--
