* 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.
This commit is contained in:
@@ -52,7 +52,7 @@ class __DIR_mounts
|
||||
*c++ = '/';
|
||||
sys_wcstombs (c, mounts[idx].Length + 1,
|
||||
mounts[idx].Buffer, mounts[idx].Length / sizeof (WCHAR));
|
||||
path_conv pc (fname, PC_SYM_NOFOLLOW | PC_POSIX);
|
||||
path_conv pc (fname, PC_SYM_NOFOLLOW | PC_POSIX | PC_KEEP_HANDLE);
|
||||
if (!stat_worker (pc, &st))
|
||||
ino = st.st_ino;
|
||||
return ino;
|
||||
|
Reference in New Issue
Block a user