diff options
-rw-r--r-- | winsup/cygwin/ChangeLog | 7 | ||||
-rw-r--r-- | winsup/cygwin/fhandler_disk_file.cc | 18 |
2 files changed, 22 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index c2913ee07..982b4cf68 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,10 @@ +2004-04-15 Corinna Vinschen <corinna@vinschen.de> + + * fhandler_disk_file.cc (fhandler_disk_file::fchmo): Try opening + in query_read mode if query_write fails. + * fhandler_disk_file.cc (fhandler_disk_file::fchown): Ditto. + * fhandler_disk_file.cc (fhandler_disk_file::facl): Ditto. + 2004-04-14 Corinna Vinschen <corinna@vinschen.de> * ntdll.h: Fix copyright date. diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc index b330a96e6..9b1d769c8 100644 --- a/winsup/cygwin/fhandler_disk_file.cc +++ b/winsup/cygwin/fhandler_disk_file.cc @@ -382,7 +382,11 @@ fhandler_disk_file::fchmod (mode_t mode) { query_open (query_write_control); if (!(oret = open_fs (O_BINARY, 0))) - return -1; + { + query_open (query_read_control); + if (!(oret = open_fs (O_BINARY, 0))) + return -1; + } } if (!allow_ntsec && allow_ntea) /* Not necessary when manipulating SD. */ @@ -423,7 +427,11 @@ fhandler_disk_file::fchown (__uid32_t uid, __gid32_t gid) { query_open (query_write_control); if (!(oret = open_fs (O_BINARY, 0))) - return -1; + { + query_open (query_read_control); + if (!(oret = open_fs (O_BINARY, 0))) + return -1; + } } mode_t attrib = 0; @@ -456,7 +464,11 @@ fhandler_disk_file::facl (int cmd, int nentries, __aclent32_t *aclbufp) { query_open (query_write_control); if (!(oret = open_fs (O_BINARY, 0))) - return -1; + { + query_open (query_read_control); + if (!(oret = open_fs (O_BINARY, 0))) + return -1; + } } if (!pc.has_acls () || !allow_ntsec) |