* fhandler.cc (fhandler_base::open): Always open NFS files with
FILE_READ_EA, even when opening with O_WRONLY to allow fstat. * fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): Call FlushFileBuffers if file has been opened for writing. Explain why. (fhandler_base::fstat_by_handle): Renew content of pc.fnoi if called via fstat. Explain why. Fix formatting. * path.cc (symlink_info::check): Try to open file the second time with FILE_READ_EA permissions since it's needed in later calls to fhandler_base::fstat_by_nfs_ea.
This commit is contained in:
@@ -2296,10 +2296,11 @@ restart:
|
||||
FILE_OPEN_REPARSE_POINT
|
||||
| FILE_OPEN_FOR_BACKUP_INTENT,
|
||||
eabuf, easize);
|
||||
if (status == STATUS_ACCESS_DENIED)
|
||||
if (status == STATUS_ACCESS_DENIED && eabuf)
|
||||
{
|
||||
status = NtCreateFile (&h, access = MIN_STAT_ACCESS, &attr, &io,
|
||||
NULL, 0, FILE_SHARE_VALID_FLAGS, FILE_OPEN,
|
||||
status = NtCreateFile (&h, access = MIN_STAT_ACCESS | FILE_READ_EA,
|
||||
&attr, &io, NULL, 0, FILE_SHARE_VALID_FLAGS,
|
||||
FILE_OPEN,
|
||||
FILE_OPEN_REPARSE_POINT
|
||||
| FILE_OPEN_FOR_BACKUP_INTENT,
|
||||
eabuf, easize);
|
||||
|
Reference in New Issue
Block a user