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=piC/174FPzc3xBagN96JnV+XI4zPVV5u86YsNsYlvVP XDhwSu+UUmXe3fjtqc84wb/JWxOzCXVVIZ/JLf17SP4/+N1kSTjpv1fWITmmw0yE nRBh6G9oNwXMSo0/L1HVN5AOV8USikyowEt71mIf7+VSKEyyCJW0X7OfoU+yHb7w = 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=od905kttrS5MqFpI+LW+CXdFwkQ=; b=O5Xk+L+eI80ziQ7YB zARWsjrwxSv6tcdIsfGKrDW13Jdh2mkGTRJ5AVRsVoTuESlJtbRc5AhG9BN6uxmX sOamhkFHwQ9eS9+a+XxCxMRDSuAKS/I6nKS02yp86Uwvu3KW5eK0jVRNsM4ayl72 vbCZvaYXIyNFG750Vq6EQ8iaGE= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , 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=-0.6 required=5.0 tests=AWL,BAYES_20,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mailout06.t-online.de Message-ID: <5345C0C0.5010908@t-online.de> Date: Wed, 09 Apr 2014 23:50:56 +0200 From: Christian Franke User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0 SeaMonkey/2.25 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: [PATCH] base-files-4.2-1: Change prompt if running with admin rights References: <53458036 DOT 1010307 AT t-online DOT de> <877g6ys69r DOT fsf AT Rainer DOT invalid> In-Reply-To: <877g6ys69r.fsf@Rainer.invalid> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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). Agree. > 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 privilege elevation. 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. Christian -- 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