diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2010-10-07 14:03:26 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2010-10-07 14:03:26 +0000 |
commit | dd0821e345930f91ab6984a442950d51bb6c9b4c (patch) | |
tree | c3ca7aca3de5cdee9e43b0731e0d1f8e473c1dca /winsup/cygwin/path.h | |
parent | ca11a4f34f763483b1f18b6e7147272af9f8f697 (diff) | |
download | cygnal-dd0821e345930f91ab6984a442950d51bb6c9b4c.tar.gz cygnal-dd0821e345930f91ab6984a442950d51bb6c9b4c.tar.bz2 cygnal-dd0821e345930f91ab6984a442950d51bb6c9b4c.zip |
* fhandler.h (fhandler_base::get_stat_access): Delete.
* fhandler_disk_file.cc (fhandler_base::fstat_helper): Always check
executable suffix to get x-bits for .exe files also in notexec case.
Always reopen file when checking for file header.
* ntdll.h (wait_pending): Delete.
* path.cc (symlink_info::check_shortcut): Drop call to wait_pending
since file is always opened for sync IO.
(symlink_info::check_sysfile): Ditto.
(MIN_STAT_ACCESS): Remove.
(FULL_STAT_ACCESS): Remove.
(symlink_info::check): Drop access flag. Revert to open file with
just read attributes access. Reorder symlink check to check for
reparse points first. Don't check reparse points for anything else,
even on remote drives. Open file for GENERIC_READ when trying to
read shortcuts or system-bit symlinks. Accommodate dropped access
flag in call to path_conv_handle::set.
* path.h (class path_conv_handle): Drop access flag and accommodate
all related methods.
Diffstat (limited to 'winsup/cygwin/path.h')
-rw-r--r-- | winsup/cygwin/path.h | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h index 877334f55..c5b10e3c7 100644 --- a/winsup/cygwin/path.h +++ b/winsup/cygwin/path.h @@ -95,7 +95,6 @@ struct _FILE_NETWORK_OPEN_INFORMATION; class path_conv_handle { HANDLE hdl; - ACCESS_MASK acc; union { /* Identical to FILE_NETWORK_OPEN_INFORMATION. We don't want to pull in ntdll.h here, though. */ @@ -112,26 +111,22 @@ class path_conv_handle fattr3 _fattr3; } attribs; public: - path_conv_handle () : hdl (NULL), acc (0) {} - inline void set (HANDLE h, ACCESS_MASK a) { hdl = h; acc = a; } + path_conv_handle () : hdl (NULL) {} + inline void set (HANDLE h) { hdl = h; } inline void close () { if (hdl) CloseHandle (hdl); - set (NULL, 0); + set (NULL); } inline void dup (path_conv_handle &pch) { if (!DuplicateHandle (GetCurrentProcess (), pch.handle (), GetCurrentProcess (), &hdl, 0, TRUE, DUPLICATE_SAME_ACCESS)) - { - hdl = NULL; - acc = 0; - } + hdl = NULL; } inline HANDLE handle () const { return hdl; } - inline ACCESS_MASK access () const { return acc; } inline struct _FILE_NETWORK_OPEN_INFORMATION *fnoi () { return (struct _FILE_NETWORK_OPEN_INFORMATION *) &attribs._fnoi; } inline struct fattr3 *nfsattr () @@ -325,10 +320,9 @@ class path_conv bool is_binary (); HANDLE handle () const { return conv_handle.handle (); } - ACCESS_MASK access () const { return conv_handle.access (); } struct _FILE_NETWORK_OPEN_INFORMATION *fnoi () { return conv_handle.fnoi (); } struct fattr3 *nfsattr () { return conv_handle.nfsattr (); } - void reset_conv_handle () { conv_handle.set (NULL, 0); } + void reset_conv_handle () { conv_handle.set (NULL); } void close_conv_handle () { conv_handle.close (); } __ino64_t get_ino_by_handle (HANDLE h); |