This is the mail archive of the
mailing list for the Cygwin project.
Re: /dev/ptmx fails with Azure accounts
On Tuesday, August 16, 2016 05:12, "Corinna Vinschen" <email@example.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!
$ gcc -W azure-check5.c -l Netapi32 -o azure-check5
Reverse Sid (RussellMora): S-1-12-1-2043906341-1249388050-2635137163-399631282
Reverse Sid (AzureAD\RussellMora): S-1-12-1-2043906341-1249388050-2635137163-399631282
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple