This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
[Patch] fhandler_disk_file::fchmod
- From: "Pierre A. Humblet" <pierre at phumblet dot no-ip dot org>
- To: cygwin-patches at cygwin dot com
- Date: Sat, 21 Aug 2004 09:46:31 -0400
- Subject: [Patch] fhandler_disk_file::fchmod
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;