diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2011-07-26 17:30:41 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2011-07-26 17:30:41 +0400 |
commit | 303dc0230d1055117783d5a6b15670c59d504c3e (patch) | |
tree | b59744f8f05f603d889946e98fa3c50f0a12180b /winsup/cygwin/syscalls.cc | |
parent | f4529884e55a23b2f3a727a5cc63863d73b532af (diff) |
* fhandler_disk_file.cc (__DIR_mounts::eval_ino): Create path_conv
with PC_KEEP_HANDLE flag.
* path.h (path_conv::operator =): Duplicate UNICODE path as well.
* security.cc (check_file_access): Use path_conv handle if available.
* syscalls.cc (access): Create fhandler with PC_KEEP_HANDLE flag set.
(euidaccess): Ditto.
(faccessat): Ditto.
Diffstat (limited to 'winsup/cygwin/syscalls.cc')
-rw-r--r-- | winsup/cygwin/syscalls.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 4935ebb5e..4226a02fe 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -1677,7 +1677,8 @@ access (const char *fn, int flags) set_errno (EINVAL); else { - fhandler_base *fh = build_fh_name (fn, PC_SYM_FOLLOW, stat_suffixes); + fhandler_base *fh = build_fh_name (fn, PC_SYM_FOLLOW | PC_KEEP_HANDLE, + stat_suffixes); if (fh) { res = fh->fhaccess (flags, false); @@ -1700,7 +1701,8 @@ euidaccess (const char *fn, int flags) set_errno (EINVAL); else { - fhandler_base *fh = build_fh_name (fn, PC_SYM_FOLLOW, stat_suffixes); + fhandler_base *fh = build_fh_name (fn, PC_SYM_FOLLOW | PC_KEEP_HANDLE, + stat_suffixes); if (fh) { res = fh->fhaccess (flags, true); @@ -4152,6 +4154,7 @@ faccessat (int dirfd, const char *pathname, int mode, int flags) else { fhandler_base *fh = build_fh_name (path, + PC_KEEP_HANDLE | (flags & AT_SYMLINK_NOFOLLOW) ? PC_SYM_NOFOLLOW : PC_SYM_FOLLOW, stat_suffixes); |