* errno.cc (errmap): Map ERROR_BAD_NET_RESP to ENOSYS.
* fhandler_disk_file.cc (fhandler_disk_file::facl): Handle ENOSYS and point to the explanation. * ntdll.h (STATUS_NOT_IMPLEMENTED): Define. * path.cc (symlink_info::check): Handle the inability of NT4 to use FileNetworkOpenInformation on share root dirs in either direction. * path.h (slash_unc_prefix_p): Remove unused declaration. * security.cc (get_info_from_sd): Handle ENOSYS from get_file_sd. Explain when this happens.
This commit is contained in:
@ -2421,6 +2421,23 @@ restart:
|
||||
{
|
||||
status = NtQueryInformationFile (h, &io, pfnoi, sizeof *pfnoi,
|
||||
FileNetworkOpenInformation);
|
||||
if ((status == STATUS_INVALID_PARAMETER
|
||||
|| status == STATUS_NOT_IMPLEMENTED)
|
||||
&& RtlEqualUnicodePathPrefix (&upath, &ro_u_uncp, FALSE))
|
||||
{
|
||||
/* This occurs when accessing SMB share root dirs hosted on
|
||||
NT4 (STATUS_INVALID_PARAMETER), or when trying to access
|
||||
SMB share root dirs from NT4 (STATUS_NOT_IMPLEMENTED). */
|
||||
status = NtQueryInformationFile (h, &io, &fbi, sizeof fbi,
|
||||
FileBasicInformation);
|
||||
if (NT_SUCCESS (status))
|
||||
{
|
||||
memcpy (pfnoi, &fbi, 4 * sizeof (LARGE_INTEGER));
|
||||
pfnoi->EndOfFile.QuadPart
|
||||
= pfnoi->AllocationSize.QuadPart = 0;
|
||||
pfnoi->FileAttributes = fbi.FileAttributes;
|
||||
}
|
||||
}
|
||||
if (NT_SUCCESS (status))
|
||||
fileattr = pfnoi->FileAttributes;
|
||||
}
|
||||
|
Reference in New Issue
Block a user