aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2004-04-15 15:56:52 +0000
committerCorinna Vinschen <corinna@vinschen.de>2004-04-15 15:56:52 +0000
commit703b16e3ab18de843b5dee7a8c2cf552b2f7540e (patch)
tree3c24cebb49dde7efba52b142ff24f65038515a4a /winsup/cygwin
parent7af28dc49a515b7213fae1b731140e01a1f56cf3 (diff)
downloadnewlib-703b16e3ab18de843b5dee7a8c2cf552b2f7540e.zip
newlib-703b16e3ab18de843b5dee7a8c2cf552b2f7540e.tar.gz
newlib-703b16e3ab18de843b5dee7a8c2cf552b2f7540e.tar.bz2
* 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.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/fhandler_disk_file.cc18
2 files changed, 22 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index c2913ee..982b4cf 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 b330a96..9b1d769 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)