Mail Archives: cygwin/2016/08/08/03:06:02
X-Recipient: | archive-cygwin AT delorie DOT 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:subject:message-id:reply-to
|
| :references:mime-version:content-type:in-reply-to; q=dns; s=
|
| default; b=nBdq6lR/WwsN0qvwaGLgQsaDl3Gq8TRk62xLnK3yRcoQhr83tI34a
|
| 6sgMxboPCaeSVg4+ZX6pB/+cp6R+NVYl+aLz/WUCZKqcC47skAjxV1bvO0N2Y9wm
|
| z308crafDcMDcfnD6ShkvobofMdzkmgtSMkTzX6b9Oqs6IoWMBCb44=
|
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:subject:message-id:reply-to
|
| :references:mime-version:content-type:in-reply-to; s=default;
|
| bh=DN5M4+4GKTcqnLe8NDKfhQu6kd4=; b=CSkyZNYpvMQZELiy0R0Z7gTQ+dsA
|
| Mfc8nSIX9JEjjxgbJeBu1I0s6qfNa7VXS+WTpsdQED3TrKR5QH37O2akqLUKUjml
|
| VvimTvrw3wRbmtGhX4k/1tMrYM20TBQZrufwws2RLw89i/+XpvgltLw7pFkIzL2r
|
| 84AM3XVbMkVbUpU=
|
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm
|
List-Id: | <cygwin.cygwin.com>
|
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com>
|
List-Archive: | <http://sourceware.org/ml/cygwin/>
|
List-Post: | <mailto:cygwin AT cygwin DOT com>
|
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
|
Sender: | cygwin-owner AT cygwin DOT com
|
Mail-Followup-To: | cygwin AT cygwin DOT com
|
Delivered-To: | mailing list cygwin AT cygwin DOT com
|
Authentication-Results: | sourceware.org; auth=none
|
X-Virus-Found: | No
|
X-Spam-SWARE-Status: | No, score=-95.0 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_BRBL_LASTEXT,RCVD_IN_PBL,RCVD_IN_SORBS_DUL,RDNS_DYNAMIC autolearn=ham version=3.3.2 spammy=Duncan, duncan, corrina, Roe
|
X-HELO: | calimero.vinschen.de
|
Date: | Mon, 8 Aug 2016 09:05:27 +0200
|
From: | Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
|
To: | cygwin AT cygwin DOT com
|
Subject: | Re: /dev/ptmx fails with Azure accounts
|
Message-ID: | <20160808070527.GB32150@calimero.vinschen.de>
|
Reply-To: | cygwin AT cygwin DOT com
|
Mail-Followup-To: | cygwin AT cygwin DOT com
|
References: | <1470156870 DOT 684316691 AT apps DOT rackspace DOT com> <20160803143207 DOT GB17526 AT calimero DOT vinschen DOT de> <1470243211 DOT 01868925 AT apps DOT rackspace DOT com> <20160803180012 DOT GC25811 AT calimero DOT vinschen DOT de> <20160803181649 DOT GD25811 AT calimero DOT vinschen DOT de> <1470251109 DOT 311822327 AT apps DOT rackspace DOT com> <20160804070058 DOT GA2333 AT calimero DOT vinschen DOT de> <20160805102751 DOT GK25811 AT calimero DOT vinschen DOT de> <20160807032711 DOT GC31990 AT dimstar DOT local DOT net>
|
MIME-Version: | 1.0
|
In-Reply-To: | <20160807032711.GC31990@dimstar.local.net>
|
User-Agent: | Mutt/1.6.2 (2016-07-01)
|
--jho1yZJdad60DJr+
Content-Type: multipart/mixed; boundary="OgqxwSJOaUobr8KG"
Content-Disposition: inline
--OgqxwSJOaUobr8KG
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Aug 7 13:27, Duncan Roe wrote:
> On Fri, Aug 05, 2016 at 12:27:51PM +0200, Corinna Vinschen wrote:
> > On Aug 4 09:00, Corinna Vinschen wrote:
> > > On Aug 3 15:05, rmora AT aboutgolf DOT com wrote:
> > > > [...]
> > > > Unknown+User AT Lenovo-PC /cygdrive/c/cygwin64
> > > > $ ./azure-check2
> > > > Sid: S-1-12-1-2043906341-1249388050-2635137163-399631282
> > > > Dom\Name: AzureAD\RussellMora
> > > > Primary Group:
> > > > Sid: S-1-12-1-2043906341-1249388050-2635137163-399631282
> > > > Dom\Name: AzureAD\RussellMora
> > > > NetUserGetInfo: 53
> > > >
> > > > Unknown+User AT Lenovo-PC /cygdrive/c/cygwin64
> > > > $
> > > >
> > > > (As an aside, I assume that the fact that the permissions on the
> > > > compiled executable are totally messed up, and thus the executable
> > > > won't run until I fix them via Windows, is incidental to the fact t=
hat
> > > > I am running under "Unknown+User" and thus you don't want any
> > > > information on that as well.....)
> > >
> > > Good thinking :)
> > >
> > > Can you please try the attached testcase? Probably my last straw. If
> > > that doesn't work as desired, support for AzureAD accounts will be ve=
ry
> > > limited.
> >
> > I guess you're already on vacation, but never mind.
> >
> > I improved my testcase a bit and attached it to this mail. Can you ple=
ase
> > try this one when you're back?
> >[...]
> Hi Corrina,
s/rr/in/rinn/ :)
> I've been trying your tests out of interest (no Axure accounts here), and=
they all worked except this last one which segfaults:
That you, I think I see where I made the mistake. Can you try the=20
attached?
Thanks,
Corinna
--=20
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
--OgqxwSJOaUobr8KG
Content-Type: text/plain; charset=utf-8
Content-Disposition: attachment; filename="azure-check2.c"
Content-Transfer-Encoding: quoted-printable
#include <stdio.h>
#include <wchar.h>
#define _WIN32_WINNT 0x0a00
#define WINVER 0x0a00
#include <windows.h>
#include <lm.h>
#include <dsgetdc.h>
#include <sddl.h>
int
main ()
{
HANDLE tok;
PTOKEN_USER tp =3D (PTOKEN_USER) malloc (65536);
DWORD ret;
LPSTR str;
WCHAR name[256];
WCHAR dom[256];
DWORD nlen, dlen;
SID_NAME_USE type;
PDOMAIN_CONTROLLER_INFOW pci;
NET_API_STATUS status;
PUSER_INFO_3 ui3;
PUSER_INFO_24 ui24;
if (!OpenProcessToken (GetCurrentProcess (), TOKEN_QUERY, &tok))
{
printf ("OpenProcessToken: %u\n", GetLastError ());
return 1;
}
if (!GetTokenInformation (tok, TokenUser, tp, 65536, &ret))
{
printf ("GetTokenInformation(user): %u\n", GetLastError ());
return 1;
}
ConvertSidToStringSidA (tp->User.Sid, &str);
printf (" Sid: %s\n", str);
LocalFree (str);
nlen =3D dlen =3D 256;
if (LookupAccountSidW (NULL, tp->User.Sid, name, &nlen,=20
dom, &dlen, &type))
printf ("Dom\\Name: %ls\\%ls\n", dom, name);
else
printf ("LookupAccountSidW: %u\n", GetLastError ());
ret =3D DsGetDcNameW (NULL, dom, NULL, NULL,
DS_IS_FLAT_NAME | DS_RETURN_DNS_NAME, &pci);
if (ret !=3D ERROR_SUCCESS)
{
printf ("DsGetDcNameW: %u\n", status);
pci =3D NULL;
}
status =3D NetUserGetInfo (NULL, name, 3, (PBYTE *) &ui3);
if (status !=3D NERR_Success)
printf ("NetUserGetInfo(NULL, 3): %u\n", status);
else
{
printf ("UserInfo NULL, 3:\n");
printf (" Name: %ls\n", ui3->usri3_name);
NetApiBufferFree (ui3);
}
status =3D NetUserGetInfo (NULL, name, 24, (PBYTE *) &ui24);
if (status !=3D NERR_Success)
printf ("NetUserGetInfo(NULL, 24): %u\n", status);
else
{
printf ("UserInfo NULL, 24:\n");
printf (" InternetIdentity: %d\n", ui24->usri24_internet_identity);
printf (" Flags: 0x%08x\n", ui24->usri24_flags);
printf (" ProviderName: %ls\n", ui24->usri24_internet_provider_name);
printf (" PrincipalName: %ls\n", ui24->usri24_internet_principal_nam=
e);
ConvertSidToStringSidA (ui24->usri24_user_sid, &str);
printf (" Sid: %s\n", str);
LocalFree (str);
NetApiBufferFree (ui24);
}
if (pci)
{
status =3D NetUserGetInfo (pci->DomainControllerName, name,
3, (PBYTE *) &ui3);
if (status !=3D NERR_Success)
printf ("NetUserGetInfo(%ls, 3): %u\n", pci->DomainControllerName, status);
else
{
printf ("UserInfo %ls, 3:\n", pci->DomainControllerName);
printf (" Name: %ls\n", ui3->usri3_name);
NetApiBufferFree (ui3);
}
status =3D NetUserGetInfo (pci->DomainControllerName, name,
24, (PBYTE *) &ui24);
if (status !=3D NERR_Success)
printf ("NetUserGetInfo(%ls, 24): %u\n",
pci->DomainControllerName, status);
else
{
printf ("UserInfo %ls, 24:\n", pci->DomainControllerName);
printf (" InternetIdentity: %d\n", ui24->usri24_internet_identity);
printf (" Flags: 0x%08x\n", ui24->usri24_flags);
printf (" ProviderName: %ls\n", ui24->usri24_internet_provider_name);
printf (" PrincipalName: %ls\n", ui24->usri24_internet_principal_name);
ConvertSidToStringSidA (ui24->usri24_user_sid, &str);
printf (" Sid: %s\n", str);
LocalFree (str);
NetApiBufferFree (ui24);
}
}
return 0;
}
--OgqxwSJOaUobr8KG--
--jho1yZJdad60DJr+
Content-Type: application/pgp-signature; name="signature.asc"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJXqC83AAoJEPU2Bp2uRE+gOz4P/1G1P1AIn9jIQIAYtvs9GdZs
IZRzL2SZypvdA7myLm6y3lmvnE0c5DxPP+64OHe0/JYhm5XN5KUMKVDUgDDdv8z8
Rot6qP8MtiQhnvbbP+4bMNImajEb3E16wuZvGRNDEtT0Iw70UxopRzpWZKLExxXN
XSVlpzpRo0MUIYvM/nRBHcC7w0OgUFVGQ0lAaqsdM8EztBVC+bvUvajzHTGY/fmM
8gB8TM5E0rLfcKUMmcJgv8MuOJ8v33/gnDwBYyoFCWmEVdZseGFttP5fjFZKxmX5
Ihgk2IAueg3oakV3pc0CJxZQTmfMBE3FrQ3jSfrGc4x6DF83oLTI0UF+zmcep+JW
sv+m79/fQBlyUsjEm9MQ/dxDgtKwdDq47HcGzJoStWaxmWyx/7Dwe5TOO03Qy7z7
5Rl+Zk93INK6LaH306MNG6IQ7c52aXgcnEIIlt8BTYBrWfGgzyQnmXvNIj4oYM6z
sOoED7tIFLdfEV+91VWPzr9WfGDEh1FYBmbb3eUde0b2uplsXU8dg3BooE1fQD7J
guJaUy6qXmsMpsbMHwtiuPPoId8joFdHITExXA/GVb29CJF3rr+dYtYMLA/1PJPV
TBNNmk+2joG402HwRogzGL3rvlSNVJqvwuqKcAUrJa9G0nc24w3WBdHcK21umAZP
9duCL3Bp+WyiXYeTbJYY
=1DHb
-----END PGP SIGNATURE-----
--jho1yZJdad60DJr+--
- Raw text -