rm -rf cannot delete the upmost directory level anymore on a Novell share

Franz Sirl Franz.Sirl-kernel@lauterbach.com
Mon Oct 24 10:12:00 GMT 2011

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

>> FILE_SHARE_WRITE | FILE_SHARE_DELETE) should succeed and the
> ... and that therefore this second NtCreateFile works as expected?
>> following SetFileInformationByHandle(DELETE) should succeed too
> Yes.  It should not be required to open the dir with delete-on-close,
> just because it's still open elsewhere.  After all, the meaning of
> "setting the delete disposition" is not that the dir has to be deleted
> immediately if it's still in use.
>> This is what I came up with after looking what happens against a
>> samba-3.4.3 and WinXP share. Does that sound right?
> More or less, yes.  I'll check in my changes shortly.

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

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


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rm-8.4-20111023dll.log
URL: <http://cygwin.com/pipermail/cygwin/attachments/20111024/6ded07eb/attachment.log>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: TestOpenDirDelete_with_NovellClient.cpp
URL: <http://cygwin.com/pipermail/cygwin/attachments/20111024/6ded07eb/attachment.ksh>
-------------- next part --------------
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

More information about the Cygwin mailing list