aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/path.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2008-08-15 10:19:12 +0000
committerCorinna Vinschen <corinna@vinschen.de>2008-08-15 10:19:12 +0000
commit2b41d940ca494e132cbc8653edcfc8fb1b5b8cab (patch)
tree04653efa5c59079d42f0a186c4b5e4893ccd0d40 /winsup/cygwin/path.cc
parent84132c9d9fd8dfd7020673e1cebcad0bb60ffd84 (diff)
downloadnewlib-2b41d940ca494e132cbc8653edcfc8fb1b5b8cab.zip
newlib-2b41d940ca494e132cbc8653edcfc8fb1b5b8cab.tar.gz
newlib-2b41d940ca494e132cbc8653edcfc8fb1b5b8cab.tar.bz2
* path.cc (symlink_info::check): Don't use eabuf when trying to open
file a second time. Call NtOpenFile instead of NtCreateFile in this case.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r--winsup/cygwin/path.cc14
1 files changed, 6 insertions, 8 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 4a91ff8..454efad 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -2356,8 +2356,8 @@ symlink_info::check (char *path, const suffix_info *suffixes, unsigned opt,
to special case NFS too much. */
status = NtCreateFile (&h,
READ_CONTROL | FILE_READ_ATTRIBUTES | FILE_READ_EA,
- &attr, &io, NULL, FILE_ATTRIBUTE_NORMAL,
- FILE_SHARE_VALID_FLAGS, FILE_OPEN,
+ &attr, &io, NULL, 0, FILE_SHARE_VALID_FLAGS,
+ FILE_OPEN,
FILE_OPEN_REPARSE_POINT
| FILE_OPEN_FOR_BACKUP_INTENT,
eabuf, easize);
@@ -2372,12 +2372,10 @@ symlink_info::check (char *path, const suffix_info *suffixes, unsigned opt,
eabuf = NULL;
easize = 0;
}
- status = NtCreateFile (&h, READ_CONTROL | FILE_READ_ATTRIBUTES,
- &attr, &io, NULL, FILE_ATTRIBUTE_NORMAL,
- FILE_SHARE_VALID_FLAGS, FILE_OPEN,
- FILE_OPEN_REPARSE_POINT
- | FILE_OPEN_FOR_BACKUP_INTENT,
- eabuf, easize);
+ status = NtOpenFile (&h, READ_CONTROL | FILE_READ_ATTRIBUTES,
+ &attr, &io, FILE_SHARE_VALID_FLAGS,
+ FILE_OPEN_REPARSE_POINT
+ | FILE_OPEN_FOR_BACKUP_INTENT);
}
if (NT_SUCCESS (status)
&& NT_SUCCESS (status