aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2015-10-21 12:01:11 +0200
committerCorinna Vinschen <corinna@vinschen.de>2015-10-22 17:32:11 +0200
commit77df52e5fc07ceece2dfe590a25f8f80a0bf9fe2 (patch)
treed35e654fc2e51e74b710fe2261b364493f0f6393
parentf15f539e7006ca8f84c07b19c354da136075a94c (diff)
downloadnewlib-77df52e5fc07ceece2dfe590a25f8f80a0bf9fe2.zip
newlib-77df52e5fc07ceece2dfe590a25f8f80a0bf9fe2.tar.gz
newlib-77df52e5fc07ceece2dfe590a25f8f80a0bf9fe2.tar.bz2
Fix EIO error accessing certain (OS X SMB?) drives
* path.cc (symlink_info::check_reparse_point): Don't generate an EIO error if NtFsControlFile returns STATUS_NOT_A_REPARSE_POINT. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/path.cc8
-rw-r--r--winsup/cygwin/release/2.3.03
3 files changed, 15 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index d5170d7..b883cb4 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-21 Corinna Vinschen <corinna@vinschen.de>
+
+ * path.cc (symlink_info::check_reparse_point): Don't generate an EIO
+ error if NtFsControlFile returns STATUS_NOT_A_REPARSE_POINT.
+
2015-09-23 Evgeny Grin <k2k@yandex.ru>
* fhandler_socket.cc (fhandler_socket::wait_for_events): Fix compiler
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index a7feb31..c65c1ca 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -2288,7 +2288,13 @@ symlink_info::check_reparse_point (HANDLE h, bool remote)
{
debug_printf ("NtFsControlFile(FSCTL_GET_REPARSE_POINT) failed, %y",
status);
- set_error (EIO);
+ /* When accessing the root dir of some remote drives (observed with
+ OS X shares), the FILE_ATTRIBUTE_REPARSE_POINT flag is set, but
+ the followup call to NtFsControlFile(FSCTL_GET_REPARSE_POINT)
+ returns with STATUS_NOT_A_REPARSE_POINT. That's quite buggy, but
+ we cope here with this scenario by not setting an error code. */
+ if (status != STATUS_NOT_A_REPARSE_POINT)
+ set_error (EIO);
return 0;
}
if (rp->ReparseTag == IO_REPARSE_TAG_SYMLINK)
diff --git a/winsup/cygwin/release/2.3.0 b/winsup/cygwin/release/2.3.0
index 7b0cb61..ad34671 100644
--- a/winsup/cygwin/release/2.3.0
+++ b/winsup/cygwin/release/2.3.0
@@ -39,3 +39,6 @@ Bug Fixes
- Fix a potential crash in advisory file locking due to usage of stack space
out of scope.
Addresses: https://cygwin.com/ml/cygwin/2015-09/msg00079.html
+
+- Fix EIO error accessing certain (OS X SMB?) drives
+ Addresses: https://cygwin.com/ml/cygwin/2015-09/msg00229.html