delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/03/01/07:38:53

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Date: Tue, 1 Mar 2005 13:38:37 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: POSIX compliance of unlink(2)
Message-ID: <20050301123837.GW18314@cygbert.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <loom DOT 20050228T224243-848 AT post DOT gmane DOT org>
Mime-Version: 1.0
In-Reply-To: <loom.20050228T224243-848@post.gmane.org>
User-Agent: Mutt/1.4.2i

On Feb 28 22:45, Eric Blake wrote:
> 1.5.12 and the latest snapshots allow unlinking a file contrary to POSIX 
> rules.  The addition of CYGWIN=traverse was not enough to fix this issue.  
> Unlink is required to fail with EACCES if the file is contained in a directory 
> without write permission.

I've just tested this situation on XP SP2 and it turns out that when
deleting a file, no traverse checking seems to be performed. 

The DeleteFile function even succeeds if the parent folder's ACL
explicitely denies the permission to delete subfolders and files
for owner, group and everyone.

> Furthermore, unlink should touch the ctime of the containing directory, and the 
> ctime of the unlink'd file (if hard links remain after the unlink succeeds).  
> In general, open(O_CREAT), link, rename, mkdir, and rmdir should touch the 
> ctime of the containing directory when the directory's contents change.

If we also touch ctime on the parent directory in all these cases, that
will slow down Cygwin enourmously.  Each of these actions would require
to open the parent dir, set ctime, close parent dir.  That sounds like
a rather bad deal.


Corinna

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

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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