delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/04/10/04:11:51

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=O41Q9HiR/3TYwD9m6FJmunInRAjeCFkF+H8jGFyNBccTPussP21ex
X4HJco3Z6/FaRbIID53Y2y8Uh3fV/UI9Pfi0VtANqXY3ptCDiB04WQnyijW+yMf/
p/V4rV0PLzXzchfDG6WXbu+GrDqt+YojtvwGjB3G3qITqO4QgHYric=
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=v9QrRvRD6Mg6XikQuSabKYnbI5Q=; b=oY04RrtGpC2nNFQnBbVJzqfk5PhN
JfSMqLG8BqYZv892jdX5Wk3YGdgqiqhiPLeEG5wm+F2lbYuIm2q2ndtAK7xvtdWz
tTe44EOgGWA1gERwsmuHkA/mWUYsevkiLEAs6yPmyfk0sH/Rpw8HGVPxb9uIOrR6
7Gpb3WOcSMIctAA=
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.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2
X-HELO: calimero.vinschen.de
Date: Thu, 10 Apr 2014 10:11:30 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: [PATCH] base-files-4.2-1: Change prompt if running with admin rights
Message-ID: <20140410081130.GW2437@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <53458036 DOT 1010307 AT t-online DOT de> <877g6ys69r DOT fsf AT Rainer DOT invalid> <5345C0C0 DOT 5010908 AT t-online DOT de>
MIME-Version: 1.0
In-Reply-To: <5345C0C0.5010908@t-online.de>
User-Agent: Mutt/1.5.21 (2010-09-15)

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

On Apr  9 23:50, Christian Franke wrote:
> Achim Gratz wrote:
> >Christian Franke writes:
> >>Attached is an updated version of:
> >>https://sourceware.org/ml/cygwin/2012-02/msg00806.html
> >I'll put this on hold until the AD integration has landed in Cygwin
> >(which will require some larger changes anyway).
>=20
> Agree.
>=20
> >Generally I'd prefer to move such things that depend on personal
> >preferences like setting up prompts into profile.d where they are easier
> >to change and maintain independently from core system functionality.
>=20
> The user could disable the root prompt by an "unset PS1a" in a
> profile.d script. The default behavior of Cygwin should IMO be close
> to traditional *nix behavior: Use a special (#) prompt if
> root(-like) privileges are effective.
>=20
>=20
> >Using the registry to check for administrative privileges is clever,
> >however I'm wondering why we shouldn't simply check via id (that's what
> >I'm doing personally at the moment).
>=20
> For standard local administrator users, both would work to check for
> privilege elevation.
>=20
> I used the registry check in the past because it only uses shell
> builtins and does not rely on specific SID->gid mappings in
> /etc/group.

Especially given that in future there might be no /etc/group to begin
with.

But even without /etc/group, the administrator's group will have the
gid 544.  I think such a test should be sufficient?


Corinna

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

--oIlomvtVtXAVxSKT
Content-Type: application/pgp-signature

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

iQIcBAEBAgAGBQJTRlIyAAoJEPU2Bp2uRE+gYt8P/2Z0YzZ1hMjb6sUPx2Pi9vnj
OYzmuDF826eTXv6T6rqcrOWHMnlg8bWxHermTbbC+Ka/kIYBDhW97uMo/oFvRXCy
86+kYF8dzT1OmMoTDtdGrGz1U5+tb2wA/0iQybdTktoRIvYN4SYLmCFyUW8zw4H0
S/IDzQh8nNEbc9Y5nHbj+fERiT3xFIbCLacvEBpKdaWWCFI0bel/89KysvPJYZaC
6y8ryjLi4d0bfNNv8PACL0WHpFbta9xjSAIfF7oWhOwjB949BDbNMC8vENTLbnXN
8xL/FXXWGm7hAi6MCwa8MBH+dF/VFADps1upTWnmLO4HvN4+gMrpR3MJb3EiBsqJ
xa8qQwKO6KjBwv/bwwX/Bz3SsamczhA0mMiEfFJwtDY7K10fkcusFeiRO2L6WD24
irjyygeCyzCqkaslpgqtECCG9PdfvxhbKUDvfoF6h4e6pKMi/S0HicG9XpUy/KYT
k6KiqlAmDl0XKtYgCTrcjl7owO85EzMd/LJzXPfXDa58CP116jhKWOGyyocxLkYc
07ufpoqN0A202j7UtVC46DxdVfXPGSFWna/qhXqkgzBeE257VFyNnQcGBw2bqc0E
U4aSpfgIUEk+YCoRtmZ1haDLG2Eo4wTcq5N1Lj9PQdOpHbmdfRMZyyZyrUKpc+Xy
ynmBWHf3azfdAF65b+25
=9pGo
-----END PGP SIGNATURE-----

--oIlomvtVtXAVxSKT--

- Raw text -


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