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:subject:message-id:reply-to
	:references:mime-version:content-type:in-reply-to; q=dns; s=
	default; b=HKTz9i9D7WW/HEGvuU0C4ZzYytybMQ6W5mh2G9izrpEMgtkOjVBNc
	Ws1SfoLfljVBeUpogqPOGlDivVWWCsttzT5/1h+Diz1oRmDJwJTUyIEx4joOsVFi
	8qSh07p6aFtK1RWaWjdKQ3C9FrCoucUqLYjpCbpHNG6En0DS4TzZOs=
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=TSNlcduTUNmXuEnP5ZtCcOAKu5c=; b=oU6qtPkOjbX8Cx/U2LQbr6opqy7c
	QK/0gkQ2h+cL54DDVgsCXBdkJwM1QX+h5wS0Xa5CqZvml/FYocQopPk0T0uJT8Yr
	qThOrYyG9oZnmwulEGULPspxkz5qMWpFi6z6iNT9ykFtJK43q3i4A2AFby+IqGwD
	tU8J9oWLU377+es=
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=-5.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2
X-HELO: calimero.vinschen.de
Date: Thu, 5 Feb 2015 15:53:09 +0100
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: how to determine if a shell is running as Administrator?
Message-ID: <20150205145309.GV2635@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <slc6da9aq8g9e7h0aegafhfa86eahfd53p@4ax.com> <20150205100349.GS2635@calimero.vinschen.de> <gjubtwz05tno.fsf@W0144758.usac.mmm.com> <87fvakh1p6.fsf@Rainer.invalid>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha1;	protocol="application/pgp-signature"; boundary="p/1JFEOz/hVXxMAZ"
Content-Disposition: inline
In-Reply-To: <87fvakh1p6.fsf@Rainer.invalid>
User-Agent: Mutt/1.5.23 (2014-03-12)

--p/1JFEOz/hVXxMAZ
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Feb  5 15:28, Achim Gratz wrote:
> J. David Boyd writes:
> > This doesn't seem to tell me if my shell has been started with 'Run As
> > Administrator', it just tells me if my user is contained in the Adminis=
trator
> > group.
>=20
> No, you're not in that group unless you have actual administrator
> privileges.
>=20
> > I can start a cygwin shell, and start a cygwin shell with run as admin,=
 and I
> > get the same results from the above command.
>=20
> Then you have UAC switched off or the place you're starting the cygwin
> shell from already is elevated.

Right.  Group 544 is not in a user token of a non-elevated process(*).


Corinna


(*) More exactly, it is in the token, but with the "Deny only" attribute
    and missing the "Enabled" attribute.  Therefore it will not show up
    as part of the token's group list in Cygwin, because Cygwin skips
    all non-enabled groups.

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--p/1JFEOz/hVXxMAZ
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBAgAGBQJU04PUAAoJEPU2Bp2uRE+gx0cQAJvCkYoKG/FyAL26PkNBt/ps
Jr02Fu075Tn3WdUWbJvJn1mq0Atl0s9CKgqo/JEZHleHc6jfMEzRJGUBqIQ4KWVX
lqy6YyGbl/gJPKhLWe+n78wyqHH161l0Mh5VslfwnHxE2C39bKhrEcfbhMi7jDEh
YQSxuGfLFCOoQkVZ/K7rzM8ErWWwv+WZhBxQdEPwULYg03dKIFhCmq1GTRtm835i
+tdcZOgoLzmGXRxVhbaxU8A5Ts9WBmv9p9EtEvTbK8Ba9H5yYJ1a8x386laMU16v
JZvixvJ/Wt904qpAf/NbJzzWSSUytcwk+H3/2DG8a/zTJCkjbv069ZzReKML0dMl
lVEH2CLrucWALTB28hcgxLzLI1nfm04udlB8ABTX9wH+rfmFVJrK8p4oZfML6tJO
ibvizofk3qvWNqXvroPkAgeBxYvuWjKP+9mvaEu7uHZBXkM1dlm6QiKyDgYSAxKT
n7pbNlNRJoZPw9YMQMt6iphz3i6kXbusgzm3hClY2fxZtZ2S0CXbWb4Q7DEf9ctg
THqPZUZvIS+ZYlPnY1+iIPQexHkeNIujV4A7sq9+GUD0yU6dOOmlvpnGQn6JIsJW
bVfo8gtk9dRW15QR6n6Du155z7haEZwHAIJ5m+gzxQAeHYEeIkS5Wxgw3Kxzob1M
eB5t34mDQEo7og+GyWJ/
=ugGh
-----END PGP SIGNATURE-----

--p/1JFEOz/hVXxMAZ--
