* fhandler_disk_file.cc (path_conv::isgood_inode): Move to be defined
earlier. (get_ino_by_handle): Take additional path_conv argument, accommodate throughout. Only use FileId if isgood_inode check is true. (fhandler_base::open_fs): Simplify setting ino due to above change. (readdir_get_ino): Make sure to return always a non-zero inode number. (fhandler_disk_file::readdir): Always open file in dir with FILE_OPEN_REPARSE_POINT so as not to open wrong file. Drop call to isgood_inode here. * path.cc (symlink_info::check): Call fs.update in case we're fetching file information from call to NtQueryDirectoryFile.
This commit is contained in:
@@ -2191,7 +2191,7 @@ symlink_info::check (char *path, const suffix_info *suffixes, unsigned opt,
|
||||
&attr, &io, FILE_SHARE_VALID_FLAGS,
|
||||
FILE_OPEN_REPARSE_POINT
|
||||
| FILE_OPEN_FOR_BACKUP_INTENT);
|
||||
attr.Attributes = ci_flag;
|
||||
attr.Attributes = 0;
|
||||
if (NT_SUCCESS (status))
|
||||
{
|
||||
fs.update (&upath, h);
|
||||
@@ -2265,6 +2265,9 @@ symlink_info::check (char *path, const suffix_info *suffixes, unsigned opt,
|
||||
&fdi_buf, sizeof fdi_buf,
|
||||
FileDirectoryInformation,
|
||||
TRUE, &basename, TRUE);
|
||||
/* Take the opportunity to check file system while we're
|
||||
having the handle to the parent dir. */
|
||||
fs.update (&upath, h);
|
||||
NtClose (dir);
|
||||
if (!NT_SUCCESS (status))
|
||||
{
|
||||
|
Reference in New Issue
Block a user