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:subject:from:to:cc:mime-version
	:content-type:content-transfer-encoding:in-reply-to:references
	:message-id; q=dns; s=default; b=m/m8W/aQQC/2ofl+J6XY5XoBaE6VDte
	84eGbgS2tA2+MBefpbQLgwC9WS6cptw0yOJbNU5yPkg1Zyp4u0ISSJfMSBdk+9yG
	v0JRmAloW71hQaLSADVOdNwEQqE8m0Nx01UPeVxQl5vbd9/jJxzKVSY0MJMrQpXL
	gmW+AqNXLMQI=
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:subject:from:to:cc:mime-version
	:content-type:content-transfer-encoding:in-reply-to:references
	:message-id; s=default; bh=eHf5jauqevaafIRthXaXFbO1Khw=; b=aTT7B
	6kroJTwsv69mgBY5DQk+RPD9IAUyEq9d0ClaLNx6u7JBYOr53E+RfUFrDtoW/Mg+
	VW3nwAlm6I/s9zNsZWysaBfW/7mtzoN4cM5N2L0iKxEUptn4TwiMJ4fhjfQkheUx
	v5okdthF4KKqrXjw4kraCVPepOgwD5iZsDQwkc=
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=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-spam-relays-external:sk:smtp27., H*RU:sk:smtp27., HX-Priority:Normal, HImportance:Normal
X-HELO: smtp82.iad3a.emailsrvr.com
X-SMTPDoctor-Processed: csmtpprox beta
X-Sender-Id: rmora@aboutgolf.com
Date: Tue, 16 Aug 2016 11:27:35 -0400 (EDT)
Subject: Re: /dev/ptmx fails with Azure accounts
From: "rmora@aboutgolf.com" <rmora@aboutgolf.com>
To: cygwin@cygwin.com
Cc: cygwin@cygwin.com
MIME-Version: 1.0
Content-Type: text/plain;charset=UTF-8
X-Type: plain
In-Reply-To: <20160816091236.yws3hk3o5fihlbe7@calimero.vinschen.de>
References: <20160803181649.GD25811@calimero.vinschen.de>  <1470251109.311822327@apps.rackspace.com>  <20160804070058.GA2333@calimero.vinschen.de>  <20160805102751.GK25811@calimero.vinschen.de>  <20160807032711.GC31990@dimstar.local.net>  <20160808070527.GB32150@calimero.vinschen.de>  <20160808114807.GD31990@dimstar.local.net>  <20160808115840.GG32150@calimero.vinschen.de>  <1471278569.482829599@apps.rackspace.com>  <1471279732.794730680@apps.rackspace.com>  <20160816091236.yws3hk3o5fihlbe7@calimero.vinschen.de>
X-Auth-ID: rmora@aboutgolf.com
Message-ID: <1471361255.019511497@apps.rackspace.com>
X-IsSubscribed: yes
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id u7GFRw4M018633

Hi Corinna

On Tuesday, August 16, 2016 05:12, "Corinna Vinschen" <corinna-cygwin@cygwin.com> said:

> Hi Russell,
> 
> This is as bad as I feared.  Apart from the username and the Windows
> home dir, there are no other information which could be fetched by
> the usual means.  Quite apart from the fact that there are no means to
> *store* this information somewhere, other than creating an explicit
> /etc/passwd and matching /etc/group entry.
> 
> But, anyway, I prepared some code for the Cygwin DLL to handle these
> accounts even if no /etc/passwd and /etc/group entries are present.  It
> still needs some work, though, and for that I'd ask you to perform a
> last test.
> 
> I attached a short testcase.  We know that LookupAccountSid from the
> user SID in the user token returns a name (RussellMora) and a domain
> (AzureAD).  However, the open question is if the reverse operation
> LookupAccountName works as desired when feeding it the domain name
> and the user name.  Actually, for completeness the testcase tries it
> two ways:  Once only with the username, once with dom\username.
> 
> The reason for testing this is, if the reverse lookup works with only
> the name we *could* go ahead and omit the domain from the Cygwin
> username.  I'm not yet sure if that's feasible, but it's certainly worth
> a try.
> 

Both seem to work. I guess what you are proposing makes sense - the AzureAD domain is like a single domain with multiple tenants (yeah, I don't really know what I'm talking about with respect to AD....). Anyway, let me know if you want me to do any more testing, I'm still very willing to be a Guinea Pig (squeek squeek) - thanks for figuring this out for me!

Unknown+User@Lenovo-PC /cygdrive/c/cygwin64
$ gcc -W azure-check5.c -l Netapi32 -o azure-check5

Unknown+User@Lenovo-PC /cygdrive/c/cygwin64
$ ./azure-check5
Sid: S-1-12-1-2043906341-1249388050-2635137163-399631282
Dom\Name: AzureAD\RussellMora
Reverse Sid (RussellMora): S-1-12-1-2043906341-1249388050-2635137163-399631282
Reverse Sid (AzureAD\RussellMora): S-1-12-1-2043906341-1249388050-2635137163-399631282

Unknown+User@Lenovo-PC /cygdrive/c/cygwin64
$

HTH

Cheers,
Russell.



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


