public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: Automake 1.4l released
@ 2001-08-15 13:18 Heribert Dahms
  2001-08-15 13:39 ` Corinna Vinschen
  0 siblings, 1 reply; 33+ messages in thread
From: Heribert Dahms @ 2001-08-15 13:18 UTC (permalink / raw)
  To: cygwin, Tim Van Holder; +Cc: automake, cygdev

Hi Corinna,

works always? Even on readonly media?

Bye, Heribert (heribert_dahms@icon-gmbh.de)

> -----Original Message-----
> From:	Corinna Vinschen [SMTP:vinschen@redhat.com]
> Sent:	Wednesday, August 15, 2001 13:06
> To:	Tim Van Holder
> Cc:	cygwin@cygwin.com; automake@gnu.org; cygdev
> Subject:	Re: Automake 1.4l released
> 
	[Heribert]  [snip]

> 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).
> 
	[Heribert]  [snip]


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 33+ messages in thread
* RE: Automake 1.4l released
@ 2001-08-14  2:16 Bernard Dautrevaux
  0 siblings, 0 replies; 33+ messages in thread
From: Bernard Dautrevaux @ 2001-08-14  2:16 UTC (permalink / raw)
  To: 'Tim Van Holder', Charles Wilson
  Cc: automake, 'cygwin@cygwin.com'

> -----Original Message-----
> From: Tim Van Holder [ mailto:tim.van.holder@pandora.be ]
> Sent: Monday, August 13, 2001 10:44 PM
> To: Charles Wilson
> Cc: automake@gnu.org
> Subject: Re: Automake 1.4l released
> 
> 
> > > So IMHO, cygwin should recognize the "unusual" behaviour 
> of NTFS, and
> > > perhaps internally do 'chmod +w; touch; chmod -w' when 
> changing the
> > > timestamp of a read-only file.
> > 
> > Omygod.  You have NO idea how much overhead the necessary 
> checks would
> > add -- it would slow down file access on cygwin to a crawl.
> 
> Come on - does adding the code below to the utime() function 
> add that much
> overhead?  Getting the attributes should amount to a single 
> system call;
> the same goes for setting them, and that is only needed if 
> the file isn't
> writeable (if the overhead is noticeable, it might be 
> necessary to check
> for NTFS-ness of the target, but I suspect always doing the 
> chmod would
> be less overhead).
> 
>   curr_attr = GetFileAttr ("file");
>   if (!WRITABLE(curr_attr))
>     SetFileAttr ("file", WRITEABLE_ATTR);
>   ...
>   if (!WRITABLE(curr_attr))
>     SetFileAttr ("file", curr_attr);
>     
> (note: function names are mock-ups, but you get the idea)

I'd rather, still using mock-up function names :-) :

	result = TouchFile("file")
	if (result < 0 && errno == EACCESS) {
	   curr_attr = GetFileAttr ("file");
	   if (!WRITABLE(curr_attr)) {
		if (SetFileAttr ("file", WRITEABLE_ATTR)) 
		   result = -1;
	      else {
		   result = TouchFile("file");
	         SetFileAttr ("file", curr_attr);
		}
	   }
	}
	return result;
		
This way I don't see which overhead we will have under CygWin (or any OS
where we will do the same): just one more test if all works OK and some more
work to have it work when it fails erroneously...

> 
> Anyway, this is really something that should be talked over on the
> cygwin mailing list (maybe you could make it a PR?) - 

Agreed; I forward this to cygwin ML, but keep it also on automake as it is
important for the distcheck users to know what happens.

> my point was
> merely that I consider the cygwin/NTFS behaviour unusual, as a file's
> readonly attribute generally applies to the file, not the metadata
> kept by the file system for that file.


I should agree here; ANY case where cygwin is different from traditional
UNIX practice is disturbing.

Regards,

		Bernard

--------------------------------------------
Bernard Dautrevaux
Microprocess Ingenierie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel:	+33 (0) 1 47 68 80 80
Fax:	+33 (0) 1 47 88 97 85
e-mail:	dautrevaux@microprocess.com
		b.dautrevaux@usa.net
-------------------------------------------- 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2001-08-20 10:19 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <3B7974C6.83934084@yahoo.com>
2001-08-14 10:26 ` Automake 1.4l released Earnie Boyd
2001-08-14 15:35   ` Tom Tromey
2001-08-14 16:59     ` Christopher Faylor
2001-08-14 17:32       ` Tom Tromey
2001-08-14 18:16         ` Christopher Faylor
2001-08-14 18:40           ` Raja R Harinath
2001-08-14 18:48             ` Christopher Faylor
2001-08-14 18:50           ` Charles Wilson
2001-08-14 19:23             ` Charles Wilson
2001-08-15  2:36             ` Tim Van Holder
2001-08-15  4:05               ` Corinna Vinschen
2001-08-14 18:43         ` Robert Collins
2001-08-14 19:31           ` Charles Wilson
2001-08-14 19:47             ` Robert Collins
2001-08-15 15:25             ` Tom Tromey
2001-08-15 15:25               ` Automake 1.4l released -- show of hands from cygwin/automake maintainers? Christopher Faylor
2001-08-15 19:30                 ` Automake 1.4l released -- show of hands from cygwin/automakemaintainers? Robert Collins
2001-08-15 20:04                   ` Automake 1.4l released -- show of hands from cygwin/automake maintainers? Charles Wilson
2001-08-15 19:33                 ` Charles Wilson
2001-08-15 19:33                 ` David Carter
2001-08-15 19:53                 ` Norman Vine
2001-08-20  7:24                   ` Help please Jordan Halsey
2001-08-20  9:23                     ` Larry Hall (RFK Partners, Inc)
2001-08-20 10:19                     ` any one got latex2html working in cygwin? nasser abbasi
2001-08-17  1:14                 ` Automake 1.4l released -- show of hands from cygwin/automake maintainers? Ronald Landheer
2001-08-15 15:25               ` Automake 1.4l released Charles Wilson
2001-08-15 20:16                 ` Charles Wilson
2001-08-15 21:26                   ` Charles Wilson
2001-08-14 18:24       ` Charles Wilson
2001-08-15  5:37     ` Earnie Boyd
2001-08-15 13:18 Heribert Dahms
2001-08-15 13:39 ` Corinna Vinschen
  -- strict thread matches above, loose matches on Subject: below --
2001-08-14  2:16 Bernard Dautrevaux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).