delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2001/08/15/07:05:53

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-developers-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin-developers AT sources DOT redhat DOT com
Date: Wed, 15 Aug 2001 13:05:38 +0200
From: Corinna Vinschen <vinschen AT redhat DOT com>
To: Tim Van Holder <tim DOT van DOT holder AT pandora DOT be>
Cc: cygwin AT cygwin DOT com, automake AT gnu DOT org, cygdev <cygwin-developers AT cygwin DOT com>
Subject: Re: Automake 1.4l released
Message-ID: <20010815130538.T17709@cygbert.vinschen.de>
Mail-Followup-To: Tim Van Holder <tim DOT van DOT holder AT pandora DOT be>,
cygwin AT cygwin DOT com, automake AT gnu DOT org,
cygdev <cygwin-developers AT cygwin DOT com>
References: <3B79D55F DOT 9010300 AT ece DOT gatech DOT edu> <CAEGKOHJKAAFPKOCLHDIMEKKCGAA DOT tim DOT van DOT holder AT pandora DOT be>
Mime-Version: 1.0
User-Agent: Mutt/1.2.5i
In-Reply-To: <CAEGKOHJKAAFPKOCLHDIMEKKCGAA.tim.van.holder@pandora.be>; from tim.van.holder@pandora.be on Wed, Aug 15, 2001 at 11:30:26AM +0200

On Wed, Aug 15, 2001 at 11:30:26AM +0200, Tim Van Holder wrote:
> > > It actually doesn't work very well on non-NTFS filesystems.  That's
> > > known.  We use what Microsoft provides us and we don't have much
> > > to work with on anything besides NTFS.
> 
> That's odd though - regular DOS calls (both the standard and LFN APIs)
> that set a files timestamp work just fine on read-only files (looking
> in the source for utime on DJGPP, there is no code to chmod +w/-w).
> Strange that the Windows APIs work differently.

That's simply not correctly explained.

The problem is only raised when using NTFS security to get POSIX
compliant file attributes (that's called `ntsec' in Cygwin). It's
no problem on FAT, FAT32 or even on NTFS if `ntsec' isn't used.

MSDN states, that it's neccessary to open a file with GENERIC_WRITE
access to be able to change the timestamps. So far the MSDN.

Actually it's sufficient to have the permission to set the so called
"file attributes" which is Microsofts naming convention for a
specific part of the file's metadata. The timestamps are part of
these "file attributes" Unfortunately that wasn't a known fact
when `utime(s)' was implemented in Cygwin.

I have changed `utime(s)' in the current developers version of Cygwin
a few minutes ago. On NT/W2K it opens the file now claiming only
FILE_WRITE_ATTRIBUTES instead of GENERIC_WRITE as desired access.
That works for a simple reason. Even if the owner has no write
access to the file's data, (s)he always has write access to the
file's attributes, extended attributes and security descriptors
(which altogether are the sum of the file's metadata).


However, that doesn't change the need for automake to care for
Cygwin versions prior to 1.3.3, apparently.


Corinna

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

- Raw text -


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