This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] fhandler_disk_file::fchmod


On Sat, Aug 21, 2004 at 09:46:31AM -0400, Pierre A. Humblet wrote:
>This bug was found while investigating testsuite failures.  It occurs
>only on 9x, when ntsec is on.  An alternate (more general) solution
>would be to only set allow_ntsec (in environ.cc) on NT.  Why allow it
>on 9x?

That was my first reaction on looking at your patch before reading the
above comment.

Why don't we do that?  It seems like it would simplify things slightly
throughout cygwin.

cgf

>Pierre 
>
>2004-08-14  Pierre Humblet <pierre.humblet@ieee.org>
>
>	* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Check if Windows
>	has security when determining res.
>
>Index: fhandler_disk_file.cc
>===================================================================
>RCS file: /cvs/src/src/winsup/cygwin/fhandler_disk_file.cc,v
>retrieving revision 1.92
>diff -u -p -r1.92 fhandler_disk_file.cc
>--- fhandler_disk_file.cc       29 May 2004 00:51:16 -0000      1.92
>+++ fhandler_disk_file.cc       21 Aug 2004 02:26:21 -0000
>@@ -409,7 +409,7 @@ fhandler_disk_file::fchmod (mode_t mode)
> 
>   if (!SetFileAttributes (pc, pc))
>     __seterrno ();
>-  else if (!allow_ntsec)
>+  else if (!(allow_ntsec && wincap.has_security ()))
>     /* Correct NTFS security attributes have higher priority */
>     res = 0;
> 
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]