diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2010-09-24 12:41:33 +0000 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2010-09-24 12:41:33 +0000 |
commit | 3498f76deb52fcff5c4f8d20050ec844608d108d (patch) | |
tree | b732ab1300742d96e02ccfedcbd8cbd1a1a34585 /winsup/cygwin/path.cc | |
parent | b3755579563c2f95758702c7e8f2fc8dd1c53f76 (diff) | |
download | cygnal-3498f76deb52fcff5c4f8d20050ec844608d108d.tar.gz cygnal-3498f76deb52fcff5c4f8d20050ec844608d108d.tar.bz2 cygnal-3498f76deb52fcff5c4f8d20050ec844608d108d.zip |
* 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.
Diffstat (limited to 'winsup/cygwin/path.cc')
-rw-r--r-- | winsup/cygwin/path.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index b468e9e37..887885d22 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -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; } |