delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/03/01/10:40:10

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 10:39:48 -0500
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: POSIX compliance of unlink(2)
Message-ID: <20050301153947.GA9219@trixie.casa.cgf.cx>
Reply-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.1i

On Mon, Feb 28, 2005 at 10:45:59PM +0000, 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.
>
>$ mkdir a
>$ touch a/b
>$ chmod a-w a
>$ touch a/c    # Correctly fails
>touch: cannot touch `a/c': Permission denied
>$ rm a/b       # Oops, should have failed
>$ 
>
>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.

I'm getting a little concerned that we're focusing on a corner case of
the POSIX implementation at the expense of speed.  The reality is that
the ctime setting in NTFS is not really the same thing as what is found
in UNIX and trying to make it be the same thing is going to slow down
cygwin.  And, it might even confuse native windows apps.

Unless there are actual user complaints about ctime handling, I don't think
it makes sense to pursue this any further.  OTOH, if someone wants to
implement a "CYGWIN=posixly_correct" environment option, that might be ok.

cgf

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