delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/08/16/05:04:35

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Thu, 16 Aug 2012 11:03:44 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Question about UAC and bash/cygwin
Message-ID: <20120816090344.GD5536@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <CAG9p0OTFaLUp7c8zpOtVQ=4zt-=fAqPvURJw758FS+d2rPOtgw AT mail DOT gmail DOT com> <CE9C056E12502146A72FD81290379E9A49600AF0 AT ENFIRHMBX1 DOT datcon DOT co DOT uk> <CAG9p0OQsu08mOqGC4NkAvKE_GbjvBJk675XR6TdU5+urbNsEuQ AT mail DOT gmail DOT com> <502C6B1C DOT 5030900 AT cygwin DOT com> <CAG9p0OS3HKvaE9ye6g3vKP4kXPZGBw=uc-ELb0WcvdPefGQmFg AT mail DOT gmail DOT com>
MIME-Version: 1.0
In-Reply-To: <CAG9p0OS3HKvaE9ye6g3vKP4kXPZGBw=uc-ELb0WcvdPefGQmFg@mail.gmail.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On Aug 16 03:39, Lord Laraby wrote:
> Larry Hall (Cygwin) wrote:
> > On 8/15/2012 5:39 AM, Lord Laraby wrote:
> >
> >> Sorry if the questions are a bit too numerous. I wish I could just
> >> siphon knowledge from Corinna's brain.:)
> >
> > Then that would leave her with none!
> 
> I wouldn't need *all* of her knowledge of course. Just a small amount
> would improve my understanding immensely.
> 
> >
> > Probably the key point that you're stumbling over is the fact that
> > when you're elevating your user's privileges, you're not changing
> > from that user to 'root' but rather just enabling privileges the user
> > is allowed to use.  'whoami' will not change.  This is a difference
> > between Windows and Unix/Linux security models.
> 
> I see that, of course. But it was always my assumption (a warranted
> one I expect from some of the other posts I've read) that since
> neither su, nor sudo, nor newgrp, login allows becoming root in cygwin
> - and any administrator on a linux box can use those to become root.
> So then, privilege elevation would be the closest analogy (for WIndows
> 7 etc.). After all, there is no *real* user named root on 99.9% of
> boxes out there. An administrator gets the power to become root for a
> time. Same with UAC, etc.
> 
> So0, you see where I'm coming from with my thinking, an Administrator
> is adble to become Windows version of root. Same as on Linux. It's not
> not really possible using cygwin.

That has nothing to do with Cygwin.  It's a restriction of the
CreateProcess system call.  If you want to elevate, you have to elevate
the first process in the process chain, usually mintty.  All child
processes will be elevated as well.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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