delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/10/24/06:32:40

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Mon, 24 Oct 2011 12:31:36 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: rm -rf cannot delete the upmost directory level anymore on a Novell share
Message-ID: <20111024103136.GC14623@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <4E9EFE31 DOT 20809 AT lauterbach DOT com> <20111020092033 DOT GA5988 AT calimero DOT vinschen DOT de> <4EA00B16 DOT 1030400 AT lauterbach DOT com> <20111020130941 DOT GB13505 AT calimero DOT vinschen DOT de> <4EA028C9 DOT 1040300 AT lauterbach DOT com> <20111020172937 DOT GD13505 AT calimero DOT vinschen DOT de> <20111021091056 DOT GH13505 AT calimero DOT vinschen DOT de> <4EA18882 DOT 8040705 AT lauterbach DOT com> <20111021153543 DOT GH2976 AT calimero DOT vinschen DOT de> <4EA539E9 DOT 5080502 AT lauterbach DOT com>
MIME-Version: 1.0
In-Reply-To: <4EA539E9.5080502@lauterbach.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Oct 24 12:11, Franz Sirl wrote:
> Am 2011-10-21 17:35, schrieb Corinna Vinschen:
> >On Oct 21 16:58, Franz Sirl wrote:
> >>I will create a support case with Novell. To make my understanding
> >>clear, I think there are actually 2 problems here (Win32 calls for
> >>illustration, assuming the directory is already opened):
> >>
> >
> >   0. The directory has been opened with all sharing modes allowed "elsewhere".
> >
> >>1. CreateFile(FILE_READ_ATTRIBUTES | DELETE, FILE_SHARE_DELETE)
> >>should not succeed, but fail with STATUS_SHARING_VIOLATION
> >
> >I didn't see a full strace from W7.  Did you check that this doesn't
> >happen anyway?
> 
> strace attached. Succeeding here depends on the access modes of the
> open handle(s) or if the directory is not open at all.

That's why I added the step 0.  But if the file is open elsewhere,
this step should not succeed based on the access modes, but only
based on the sharing modes allowed by the other handle.

> Your changes work, I just tried the 20111023 snapshot. See the
> attached strace on Win7/64.

Thanks, it looks like expected now, given NcFsd's behaviour.  Note
that this can't be fixed on NWFS.  On NWFS, only the changes to
upstream coreutils as outlined in
http://cygwin.com/ml/cygwin/2011-10/msg00481.html will help.

> I also attached the simple testcase I'll submit to Novell. Please
> let me know if you think something is wrong with the testcase.

Looks good to me.  For completeness, maybe you should note that
delete-on-close works in this scenario, but it's desired that both
methods work, just as on NTFS, for instance.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019