Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2011-07-01 15:23:43 +0400
committerCorinna Vinschen <corinna@vinschen.de>2011-07-01 15:23:43 +0400
commit9780b0da3c67a6241df2e2cf3da0b5dd0e47115b (patch)
treeca59947568a2aab359d9cd85b56f40b2e8709cf1 /winsup/cygwin
parent3d938be6c5b64b33e21a1c182b60fa291215ca3e (diff)
* fhandler.cc (fhandler_base::open): Move NFS-specific code into the
code block handling FH_FS stuff.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/fhandler.cc30
2 files changed, 20 insertions, 15 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 0a71a4f0c..00d39e5ac 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2011-07-01 Corinna Vinschen <corinna@vinschen.de>
+
+ * fhandler.cc (fhandler_base::open): Move NFS-specific code into the
+ code block handling FH_FS stuff.
+
2011-06-30 Ryan Johnson <ryan.johnson@cs.utoronto.ca>
* dtable.cc (fh_oom): Remove.
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index 7e01f672b..4ea05a59e 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
@@ -539,21 +539,6 @@ fhandler_base::open (int flags, mode_t mode)
break;
}
- if (pc.fs_is_nfs ())
- {
- /* Make sure we can read EAs of files on an NFS share. Also make
- sure that we're going to act on the file itself, even if it's a
- a symlink. */
- access |= FILE_READ_EA;
- if (query_open ())
- {
- if (query_open () >= query_write_control)
- access |= FILE_WRITE_EA;
- plen = sizeof nfs_aol_ffei;
- p = (PFILE_FULL_EA_INFORMATION) &nfs_aol_ffei;
- }
- }
-
if ((flags & O_TRUNC) && ((flags & O_ACCMODE) != O_RDONLY))
{
if (flags & O_CREAT)
@@ -576,6 +561,21 @@ fhandler_base::open (int flags, mode_t mode)
if (pc.is_rep_symlink ())
options |= FILE_OPEN_REPARSE_POINT;
+ if (pc.fs_is_nfs ())
+ {
+ /* Make sure we can read EAs of files on an NFS share. Also make
+ sure that we're going to act on the file itself, even if it's a
+ a symlink. */
+ access |= FILE_READ_EA;
+ if (query_open ())
+ {
+ if (query_open () >= query_write_control)
+ access |= FILE_WRITE_EA;
+ plen = sizeof nfs_aol_ffei;
+ p = (PFILE_FULL_EA_INFORMATION) &nfs_aol_ffei;
+ }
+ }
+
/* Starting with Windows 2000, when trying to overwrite an already
existing file with FILE_ATTRIBUTE_HIDDEN and/or FILE_ATTRIBUTE_SYSTEM
attribute set, CreateFile fails with ERROR_ACCESS_DENIED.