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/path.h | |
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/path.h')
-rw-r--r-- | winsup/cygwin/path.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h index 5ebd1f5eb..439bfd264 100644 --- a/winsup/cygwin/path.h +++ b/winsup/cygwin/path.h @@ -282,7 +282,13 @@ class path_conv path = cstrdup (pc.path); conv_handle.dup (pc.conv_handle); normalized_path = cstrdup(pc.normalized_path); - wide_path = NULL; + if (pc.wide_path) + { + wide_path = cwcsdup (uni_path.Buffer); + if (!wide_path) + api_fatal ("cwcsdup would have returned NULL"); + uni_path.Buffer = wide_path; + } return *this; } void free_strings () |