X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.4 required=5.0	tests=AWL,BAYES_00,FREEMAIL_FROM,SPF_HELO_PASS,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
connect(): No such file or directory
From: Matthias Meyer <matthias.meyer@gmx.li>
Subject: Re: V1.7 and endless loops triggerd by junction points
Date: Thu, 06 May 2010 19:06:11 +0200
Lines: 58
Message-ID: <hrusu6$2gg$1@dough.gmane.org>
References: <hrpqso$d9f$1@dough.gmane.org> <u2y416096c61005042221o11adc9e9k9a1012491e672880@mail.gmail.com> <20100505083010.GS1845@calimero.vinschen.de> <hrsg3t$os1$1@dough.gmane.org> <20100506084102.GV1845@calimero.vinschen.de> <20100506095711.GA7865@calimero.vinschen.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
User-Agent: KNode/0.10.9
X-IsSubscribed: yes
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

Corinna Vinschen wrote:

> On May  6 10:41, Corinna Vinschen wrote:
>> On May  5 21:15, Matthias Meyer wrote:
>> > Corinna Vinschen wrote:
>> > > Otherwise, the only difference as far as I can see is the fact that
>> > > the user token attrib inherited from the Cygwin shell has more user
>> > > rights
>> > > enabled.  Namely the backup and restore rights, which allows to
>> > > access
>> > > files and directories which are not available by default.  However,
>> > > this only works in an elevated shell, too.
>> > > 
>> > > However, it's not Cygwin's fault that attrib is not up to speed with
>> > > circular symlinks on an OS which allows them.
>> > > 
>> > It seems to be the backup and restore rights. I can run a cmd as
>> > administrator and attrib don't run into the endless loop.
>> > Also I can run sh from a normal user and attrib will work right.
>> > Only if I run attrib within a process with the backup and restore
>> > rights attrib will run into this endless loop :-(
>> 
>> There's a workaround for you, the cygdrop tool, part of the cygutils
>> package.
>> 
>> Here's an example:
>> 
>>   elevated bash$ cd /cygdrive/c/Users/All\ Users
>> 
>>   elevated bash$ attrib Desktop
>>       HR       C:\ProgramData\Desktop
>> 
>>   elevated bash$ attrib Desktop\\Cygwin.lnk
>>   A            C:\ProgramData\Desktop\Cygwin.lnk
>> 
>>   elevated bash$ cygdrop -p SeBackupPrivilege
>>   /cygdrive/c/Windows/System32/attrib -p Desktop\\Cygwin.lnk File not
>>   found - Desktop\Cygwin.lnk
>> 
>> Unfortunately you have to use the full path to attrib to make it work
>> since cygdrop doesn't perform a path search.
> 
> Sorry about that.  It appears I just stumbled over a Cygwin bug in terms
> of casesensitivity when using the execp family of functions.  Just
> calling `cygdrop -p SeBackupPrivilege attrib' without full path should
> be fine, but it only works on systems which are not configured for
> casesensitivity.  I'll fix that in CVS.
> 
> 
> Corinna
> 
Thank you very much. I will try it after solving my feature number one
(cursor/backspace) ;-)

br
Matthias
-- 
Don't Panic


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

