This is the mail archive of the
mailing list for the Cygwin project.
Re: [PATCH] base-files-4.2-1: Change prompt if running with admin rights
- From: Christian Franke <Christian dot Franke at t-online dot de>
- To: cygwin at cygwin dot com
- Date: Wed, 09 Apr 2014 23:50:56 +0200
- Subject: Re: [PATCH] base-files-4.2-1: Change prompt if running with admin rights
- Authentication-results: sourceware.org; auth=none
- References: <53458036 dot 1010307 at t-online dot de> <877g6ys69r dot fsf at Rainer dot invalid>
Achim Gratz wrote:
Christian Franke writes:
Attached is an updated version of:
I'll put this on hold until the AD integration has landed in Cygwin
(which will require some larger changes anyway).
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.
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.
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).
For standard local administrator users, both would work to check for
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.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple