X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY X-Spam-Check-By: sourceware.org Message-ID: <4DB739E6.10301@t-online.de> Date: Tue, 26 Apr 2011 23:32:22 +0200 From: Christian Franke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.17) Gecko/20110123 SeaMonkey/2.0.12 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: [PATCH] base-files-4.0.6: Change prompt if running with admin rights References: <4D964392 DOT 6080809 AT t-online DOT de> <4DB45230 DOT 4080106 AT t-online DOT de> <4DB49339 DOT 9030909 AT gmail DOT com> <4DB73858 DOT 8070401 AT t-online DOT de> In-Reply-To: <4DB73858.8070401@t-online.de> Content-Type: multipart/mixed; boundary="------------050004080304070303000501" X-IsSubscribed: yes 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 --------------050004080304070303000501 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Christian Franke wrote: > A test script for all shells is attached. Run with admin rights. > Requires cygdrop from cygutils package. > Now it is attached :-) --------------050004080304070303000501 Content-Type: text/plain; name="admtest.sh.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="admtest.sh.txt" #!/bin/sh #f=/proc/registry/HKEY_LOCAL_MACHINE/SAM/SAM f=/proc/registry/HKEY_LOCAL_MACHINE/SECURITY /bin/test -r $f || echo "test: false negative" cygdrop -- /bin/test -r $f && echo "test: false positive" for shell in bash zsh mksh posh dash; do /bin/$shell -c "[ -r $f ]" || echo "$shell: false negative" cygdrop -- /bin/$shell -c "[ -r $f ]" && echo "$shell: false positive" done --------------050004080304070303000501 Content-Type: text/plain; charset=us-ascii -- 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 --------------050004080304070303000501--