aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2008-02-29 16:38:02 +0000
committerCorinna Vinschen <corinna@vinschen.de>2008-02-29 16:38:02 +0000
commit3b5d09c6a57fa7d4ca175370fb6bac662b9455c1 (patch)
treeef6cda211bd2e3d6cb491f13a19d5ccfc41a0b6c
parent18368f26cd14c1a4b43c28d19e0c50cae57082e9 (diff)
downloadnewlib-3b5d09c6a57fa7d4ca175370fb6bac662b9455c1.zip
newlib-3b5d09c6a57fa7d4ca175370fb6bac662b9455c1.tar.gz
newlib-3b5d09c6a57fa7d4ca175370fb6bac662b9455c1.tar.bz2
* fhandler_disk_file.cc (fhandler_disk_file::fchmod): Call close_fs
instead of close to avoid calling close from wrong class when changing a file system based device node. (fhandler_disk_file::fchown): Ditto. (fhandler_disk_file::facl): Ditto. (fhandler_base::utimes_fs): Ditto.
-rw-r--r--winsup/cygwin/ChangeLog9
-rw-r--r--winsup/cygwin/fhandler_disk_file.cc8
2 files changed, 13 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 8cc1649..ef73223 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,12 @@
+2008-02-29 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Call close_fs
+ instead of close to avoid calling close from wrong class when changing
+ a file system based device node.
+ (fhandler_disk_file::fchown): Ditto.
+ (fhandler_disk_file::facl): Ditto.
+ (fhandler_base::utimes_fs): Ditto.
+
2008-02-28 Corinna Vinschen <corinna@vinschen.de>
* exceptions.cc (_cygtls::handle_exceptions): When being debugged,
diff --git a/winsup/cygwin/fhandler_disk_file.cc b/winsup/cygwin/fhandler_disk_file.cc
index 91d4237..0dc3122 100644
--- a/winsup/cygwin/fhandler_disk_file.cc
+++ b/winsup/cygwin/fhandler_disk_file.cc
@@ -620,7 +620,7 @@ fhandler_disk_file::fchmod (mode_t mode)
has_changed (true);
if (oret)
- close ();
+ close_fs ();
return res;
}
@@ -663,7 +663,7 @@ fhandler_disk_file::fchown (__uid32_t uid, __gid32_t gid)
uid, gid, attrib);
}
if (oret)
- close ();
+ close_fs ();
return res;
}
@@ -756,7 +756,7 @@ fhandler_disk_file::facl (int cmd, int nentries, __aclent32_t *aclbufp)
}
if (oret)
- close ();
+ close_fs ();
return res;
}
@@ -1040,7 +1040,7 @@ fhandler_base::utimes_fs (const struct timeval *tvp)
}
if (closeit)
- close ();
+ close_fs ();
return 0;
}