X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-0.9 required=5.0	tests=AWL,BAYES_20,FREEMAIL_FROM,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Message-ID: <4BE4AA62.5070302@alice.it>
Date: Sat, 08 May 2010 02:03:46 +0200
From: Angelo Graziosi <angelo.graziosi@alice.it>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4
MIME-Version: 1.0
To: cygwin <cygwin@cygwin.com>
Subject: Re: Text editor with shell integration
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Luc Hermitte wrote:
> Hello,
>
> "lood" <HIDDEN please!> wrote :

Please, read this: http://cygwin.com/acronyms/#PCYMTNQREAIYR

> I have written cyg-wrapper.sh to answer this need.
>     http://hermitte.free.fr/cygwin/#Win32

Very interesting! (That script should be added to Cygwin, as new package 
or to cygutils...)

Suppose I want a wrapper for:

runas.exe /user:pippo C:\cygwin\Cygwin.bat

to be started as

$ sudos su

I have tried this (in .bashrc):

=====================
SU_ARG="/Cygwin.bat"

sudos() {
   opt=''
   if [ `expr "$*" : 'su\>'` -gt 0 ] ; then
       opt+="`cygpath -p -w "$SU_ARG"`"
   fi
   cyg-wrapper.sh "/cygdrive/c/WINDOWS/system32/runas.exe" \
   --slashed-opt --binary-opt=-user:pippo $opt
}
=================================

but... it does not work :(

What I am missing!?

Thanks,
Angelo.


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

