[Patch] fhandler_disk_file::fchmod

Pierre A. Humblet pierre@phumblet.no-ip.org
Sat Aug 21 13:50:00 GMT 2004


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?

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;
 



More information about the Cygwin-patches mailing list