Added patch to implement FileNamesInformation class support for NtQueryDirectoryFile.

This commit is contained in:
Sebastian Lackner 2015-10-22 22:57:30 +02:00
parent e64c3bff30
commit 8adf60dc8e
5 changed files with 74 additions and 1 deletions

View File

@ -34,9 +34,10 @@ Wine. All those differences are also documented on the
Included bug fixes and improvements
-----------------------------------
**Bug fixes and features included in the next upcoming release [2]:**
**Bug fixes and features included in the next upcoming release [3]:**
* Do not allow interruption of system APC in server_select ([Wine Bug #14697](https://bugs.winehq.org/show_bug.cgi?id=14697))
* Implement FileNamesInformation class support for NtQueryDirectoryFile
* Implement stub for ProcessQuotaLimits info class

2
debian/changelog vendored
View File

@ -4,6 +4,8 @@ wine-staging (1.7.54) UNRELEASED; urgency=low
* Added patch to implement stub for ProcessQuotaLimits info class.
* Added patch to release capture before sending WM_COMMAND.
* Added patch to block interruption of system APC in server_select.
* Added patch to implement FileNamesInformation class support for
NtQueryDirectoryFile.
* Removed patch to implement kernel32.GetPhysicallyInstalledSystemMemory
(accepted upstream).
* Partially removed patches for ws2_32 TransmitFile (accepted upstream).

View File

@ -0,0 +1,53 @@
From d9292d6db7d1096596339c6b831e7e0c405c7559 Mon Sep 17 00:00:00 2001
From: Qian Hong <qhong@codeweavers.com>
Date: Thu, 22 Oct 2015 15:54:30 +0800
Subject: ntdll: Implement FileNamesInformation class support.
---
dlls/ntdll/directory.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c
index 4faafe9..39e5465 100644
--- a/dlls/ntdll/directory.c
+++ b/dlls/ntdll/directory.c
@@ -173,6 +173,7 @@ union file_directory_info
FILE_FULL_DIRECTORY_INFORMATION full;
FILE_ID_BOTH_DIRECTORY_INFORMATION id_both;
FILE_ID_FULL_DIRECTORY_INFORMATION id_full;
+ FILE_NAMES_INFORMATION names;
};
static BOOL show_dot_files;
@@ -255,6 +256,8 @@ static inline unsigned int dir_info_size( FILE_INFORMATION_CLASS class, unsigned
return (FIELD_OFFSET( FILE_ID_BOTH_DIRECTORY_INFORMATION, FileName[len] ) + 7) & ~7;
case FileIdFullDirectoryInformation:
return (FIELD_OFFSET( FILE_ID_FULL_DIRECTORY_INFORMATION, FileName[len] ) + 7) & ~7;
+ case FileNamesInformation:
+ return (FIELD_OFFSET( FILE_NAMES_INFORMATION, FileName[len] ) + 7) & ~7;
default:
assert(0);
return 0;
@@ -1492,6 +1495,11 @@ static union file_directory_info *append_entry( void *info_ptr, IO_STATUS_BLOCK
filename = info->id_both.FileName;
break;
+ case FileNamesInformation:
+ info->names.FileNameLength = long_len * sizeof(WCHAR);
+ filename = info->names.FileName;
+ break;
+
default:
assert(0);
return NULL;
@@ -2264,6 +2272,7 @@ NTSTATUS WINAPI NtQueryDirectoryFile( HANDLE handle, HANDLE event,
case FileFullDirectoryInformation:
case FileIdBothDirectoryInformation:
case FileIdFullDirectoryInformation:
+ case FileNamesInformation:
if (length < dir_info_size( info_class, 1 )) return io->u.Status = STATUS_INFO_LENGTH_MISMATCH;
if (!buffer) return io->u.Status = STATUS_ACCESS_VIOLATION;
break;
--
2.6.1

View File

@ -0,0 +1 @@
Fixes: Implement FileNamesInformation class support for NtQueryDirectoryFile

View File

@ -188,6 +188,7 @@ patch_enable_all ()
enable_ntdll_FileDispositionInformation="$1"
enable_ntdll_FileFsFullSizeInformation="$1"
enable_ntdll_FileFsVolumeInformation="$1"
enable_ntdll_FileNamesInformation="$1"
enable_ntdll_Fix_Alignment="$1"
enable_ntdll_Fix_Free="$1"
enable_ntdll_FreeBSD_Directory="$1"
@ -659,6 +660,9 @@ patch_enable ()
ntdll-FileFsVolumeInformation)
enable_ntdll_FileFsVolumeInformation="$2"
;;
ntdll-FileNamesInformation)
enable_ntdll_FileNamesInformation="$2"
;;
ntdll-Fix_Alignment)
enable_ntdll_Fix_Alignment="$2"
;;
@ -4061,6 +4065,18 @@ if test "$enable_ntdll_FileFsVolumeInformation" -eq 1; then
) >> "$patchlist"
fi
# Patchset ntdll-FileNamesInformation
# |
# | Modified files:
# | * dlls/ntdll/directory.c
# |
if test "$enable_ntdll_FileNamesInformation" -eq 1; then
patch_apply ntdll-FileNamesInformation/0001-ntdll-Implement-FileNamesInformation-class-support.patch
(
echo '+ { "Qian Hong", "ntdll: Implement FileNamesInformation class support.", 1 },';
) >> "$patchlist"
fi
# Patchset ntdll-Fix_Alignment
# |
# | This patchset has the following (direct or indirect) dependencies: