delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/05/12/09:15:57

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=O8SLvyxs3ULJColaJBwPDh9pQD3T8pMjJylwC1iZfvisEV9oAgXyE
rVEf2IxrCm2NaNsU2Wq+oAlFHwfn/PWVHP9pJoJNpJ2ApmAKtDwpORYOQR8YN96a
2asglqqNUyMB8C6oQbUvUJdC9mHUeDWpklLyR3YHj4nysSKzHzG8iY=
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=c//eVoWKzHbsKrKAy9/kCcOP960=; b=Ah+kfzkDoBuybYjyPyacxXfZkNbI
4A8ZxOzSkGgJO9obQ3nB9sLT9lM+mkrJLk6GoggKHsUe/7Nf0gb1l5l6tBgSOr/G
kIn08caCplYiFrhNWrUtt/UXpuibKw6d7wLGnun2U4BmNiMGTTtXO68vGAzqUb69
7QVWz6PNXl4WNcI=
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=-5.2 required=5.0 tests=AWL,BAYES_05,WEIRD_QUOTING autolearn=ham version=3.3.2
X-HELO: calimero.vinschen.de
Date: Mon, 12 May 2014 15:15:37 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Baffled: is it Cygwin (64-bits) or Windows that causes the invocation of regedit (from bash) to fail?
Message-ID: <20140512131537.GD2436@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <849f1f5420ebf77d7a591d6c9b6bfa4b DOT squirrel AT webmail DOT xs4all DOT nl> <536E339A DOT 6030200 AT breisch DOT org> <6f9d939cc604437def11828435a67f96 DOT squirrel AT webmail DOT xs4all DOT nl> <20140512125054 DOT GC2436 AT calimero DOT vinschen DOT de> <5370C60B DOT 6080304 AT shaddybaddah DOT name>
MIME-Version: 1.0
In-Reply-To: <5370C60B.6080304@shaddybaddah.name>
User-Agent: Mutt/1.5.23 (2014-03-12)

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

On May 12 23:00, Shaddy Baddah wrote:
> On 2014-05-12 22:50+1000, Corinna Vinschen wrote:
> >On May 12 14:20, Houder wrote:
> >>  - furthermore, using secpol.msc, I have set the ConsentPromptBehavior=
Admin field in
> >>
> >>    HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System (key=
 in registry)
> >>
> >>    to zero, meaning 'elevate without prompting'
> >
> >Doesn't matter.  The problem is that elevating is a special procedure,
> >requiring a special form of ShellExecuteEx function, which doesn't
> >integrate well with the requirements of POSIX fork/exec.  Therefore
> >Cygwin never calls ShellExecuteEx to fork/exec an application, rather it
> >calls CreateProcess/CreateProcessAsUser, both of which don't provide a
> >way to elevate a process.  Therefore, to elevate a process from a Cygwin
> >shell, the shell must already run elevated (e.g., right click on "Cygwin
> >Terminal" -> "Run as Administrator...").
> >
> >What's really annoying:  RegEdit's mainfest does not request "asAdmin"
> >rights.  Rather it only requests "MaximumAllowed".  One would think this
> >means that a CreateProcess call would simply continue with the current
> >permissions of the user.  Not so, unfortunately.
>=20
> I am not sure which Edition it started in, but I believe regedit opens
> as the invoking user from Windows 8.1 at least (perhaps 8, I have a
> vague recollection).

Not on my Windows 8.1.  Here's the excerpt from regedit's manifest:

  "<trustInfo xmlns=3D""urn:schemas-microsoft-com:asm.v3"">\r\n"
  "    <security>\r\n"
  "        <requestedPrivileges>\r\n"
  "            <requestedExecutionLevel\r\n"
  "                level=3D""highestAvailable""\r\n"
  "                uiAccess=3D""false""\r\n"
  "            />\r\n"
  "        </requestedPrivileges>\r\n"
  "    </security>\r\n"
  "</trustInfo>\r\n"

Ok, so it's called "highestAvailable", not "MaximumAllowed", but you
get the idea.  If I call regedit from the non-elevated command line
I get:

  $ regedit
  /cygdrive/c/WINDOWS/regedit: Permission denied.


Corinna

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

--2Z2K0IlrPCVsbNpk
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBAgAGBQJTcMl5AAoJEPU2Bp2uRE+gEiEP/A8l8lxUbB8UChE037mPbJMR
Nhd+jLqL9BeKwxlzCGhUDMvMMULrqPlrN/5l857IcG/G9PW2uvr2UazXb4CLBD6k
NtXQamOSYeZcm8Qmtk+27I6ZvYHaOjyE8w55lj3ksmppHp67IW7eOJCrWFa7yX4V
hIw2ws6MnCYPIfEN6PP+zeKUsLig8UKf4l+FMp5IkfE+UbLSdjnV/NvO4TQENTBI
3NM6gxfEX1VEwwxhIjN4Yd6zSRafv9b0ebORcXa2QE8KwpxFYjAkG8xEIMWlZH69
OFjmBm2mNrm70HLOaS57wDKJb2lF42NnyGxLotiEokIHkO8YyEl83k+x+jlriTyh
yNXxIFWf0LCm1Yah0NDN90FPEhT7sUL9tTU9HeCw6FlLzKWuE2unTaaCzcQ04zEW
+I7wbHgILwguhWMtWurbNg1naxXXpe5qI07Zc7ABiRok3yTHYtzDYb9kOjQ983AX
66tUVHrw6OSQDWH0qjtQ2IvI4StUZ8m3CH8Jien8+gAglLTJ1wyxOfwmdKXN2/go
vTYYxcZjE/TKPSllwJZCcdDtvqYHW0rQfuysUM4JCxqg0FFXZ7xGS6uTpOjr9oOA
fd4tZtuu4MXpKyXHnC3GuLD9CV+YgrfLyo/8/29TROMDs8HDrW4Mq324RhKxgi8u
rAsZ/Gr5w+lb2UZXdonh
=cHeB
-----END PGP SIGNATURE-----

--2Z2K0IlrPCVsbNpk--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019