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

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:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
q=dns; s=default; b=UinYsa6d/osYiBiaUd7Rqabqfh3Qz17d/1GmTaeqYbq
E6M3zGBu775R3VYJaRXOxxjW8zhYwEqlIrFd7uIoMSd7VnLz1nFnsfcXPlcMuxd+
ENvFprRS0hem5s3936pSlar3E0dN5xh+UFbv6ipCE3oLQsvGTv8Y5+MmqfvqDdYg
=
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:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
s=default; bh=oaxfhM9oFcku7v7Rc3im8LDAs/8=; b=a+1e1fUZbpTgmHyxI
aXh9EjTZ1uPLULotdWCTNkDd+N52Ol4+AGVYklJxAxb44e9EZflDizRL6JrQD88Y
kRfHu+mzUMcv1reHw5R9gN3+nuHVCZJzooexyb8WRllQQOvJFDHvWVQnDPC58ahw
W5aKsuS+/lTPw9d1W9yF3sgWdw=
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=-1.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2
X-HELO: mail6.worldispnetwork.com
Message-ID: <5370C60B.6080304@shaddybaddah.name>
Date: Mon, 12 May 2014 23:00:59 +1000
From: Shaddy Baddah <lithium-cygwin AT shaddybaddah DOT name>
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Icedove/24.4.0
MIME-Version: 1.0
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?
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>
In-Reply-To: <20140512125054.GC2436@calimero.vinschen.de>
X-IsSubscribed: yes

Hi,

On 2014-05-12 22:50+1000, Corinna Vinschen wrote:
> On May 12 14:20, Houder wrote:
>> Of course, it is not really a problem, that regedit cannot be invoked from Cygwin, as it can
>> be invoked from the Windows interface ...
>>
>> However, in some of the "harder" cases of using Gygwin, one needs to have a "mental" model of
>> how Cygwin "integrates" with Windows (is my belief) ... and as far I understand the matter, I
>> was surprised to find that I could not invoke regedit from bash.
>>
>> Consequently, I decided to investigate why I got the denial (64-bits Cygwin) at my end.
>>
>> First of all, some more info about my "environment":
>>
>>   - I am using Cygwin from Windows 7 ...
>>   - I am using Cygwin from an administrative account ...
>>   - furthermore, using secpol.msc, I have set the ConsentPromptBehaviorAdmin 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.

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

-- 
Regards,
Shaddy


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

- Raw text -


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