Added patch fix detection of case-insensitive systems in MSYS2.

This commit is contained in:
Sebastian Lackner 2015-08-17 06:22:27 +02:00
parent 84aaa8ff12
commit b5534bc463
5 changed files with 83 additions and 1 deletions

View File

@ -39,10 +39,11 @@ Wine. All those differences are also documented on the
Included bug fixes and improvements
-----------------------------------
**Bug fixes and features included in the next upcoming release [11]:**
**Bug fixes and features included in the next upcoming release [12]:**
* Add IDragSourceHelper stub interface ([Wine Bug #24699](https://bugs.winehq.org/show_bug.cgi?id=24699))
* Catch invalid memory accesses in imagehlp.CheckSumMappedFile
* Fix detection of case-insensitive systems in MSYS2
* Fix implementation of ntdll.MapViewOfSection
* Implement enumeration of sound devices and basic properties to dxdiagn ([Wine Bug #32613](https://bugs.winehq.org/show_bug.cgi?id=32613))
* Implement shell32 NewMenu class with new folder item ([Wine Bug #24812](https://bugs.winehq.org/show_bug.cgi?id=24812))

1
debian/changelog vendored
View File

@ -14,6 +14,7 @@ wine-staging (1.7.50) UNRELEASED; urgency=low
* Added patch to implement shell32 NewMenu class with new folder item.
* Added patch to report correct ObjectName for NamedPipe wineserver objects
(fixes Wine Staging Bug #363).
* Added patch fix detection of case-insensitive systems in MSYS2.
* Removed patch to move security cookie initialization from memory management
to loader.
-- Sebastian Lackner <sebastian@fds-team.de> Tue, 11 Aug 2015 06:12:14 +0200

View File

@ -0,0 +1,52 @@
From 09014908dd815df48eb47e792fa5ad44ba34f5f2 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 17 Aug 2015 06:17:33 +0200
Subject: ntdll: Add special handling for \SystemRoot to satisfy MSYS2
case-insensitive system check.
---
dlls/ntdll/om.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/dlls/ntdll/om.c b/dlls/ntdll/om.c
index 6527501..566169a 100644
--- a/dlls/ntdll/om.c
+++ b/dlls/ntdll/om.c
@@ -39,6 +39,7 @@
#include "ntdll_misc.h"
#include "wine/server.h"
#include "wine/exception.h"
+#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL(ntdll);
@@ -614,7 +615,9 @@ NTSTATUS WINAPI NtQueryDirectoryObject(HANDLE handle, PDIRECTORY_BASIC_INFORMATI
NTSTATUS WINAPI NtOpenSymbolicLinkObject(OUT PHANDLE LinkHandle, IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes)
{
+ static const WCHAR SystemRootW[] = {'\\','S','y','s','t','e','m','R','o','o','t'};
NTSTATUS ret;
+
TRACE("(%p,0x%08x,%s)\n",LinkHandle, DesiredAccess, debugstr_ObjectAttributes(ObjectAttributes));
if (!LinkHandle) return STATUS_ACCESS_VIOLATION;
@@ -629,6 +632,16 @@ NTSTATUS WINAPI NtOpenSymbolicLinkObject(OUT PHANDLE LinkHandle, IN ACCESS_MASK
return STATUS_OBJECT_PATH_SYNTAX_BAD;
}
+ /* MSYS2 tries to open \\SYSTEMROOT to check for case-insensitive systems */
+ if (!DesiredAccess && !ObjectAttributes->RootDirectory &&
+ ObjectAttributes->ObjectName->Length == sizeof(SystemRootW) &&
+ !memicmpW( ObjectAttributes->ObjectName->Buffer, SystemRootW,
+ sizeof(SystemRootW)/sizeof(WCHAR) ))
+ {
+ TRACE( "returning STATUS_ACCESS_DENIED\n" );
+ return STATUS_ACCESS_DENIED;
+ }
+
SERVER_START_REQ(open_symlink)
{
req->access = DesiredAccess;
--
2.5.0

View File

@ -0,0 +1,2 @@
Fixes: Fix detection of case-insensitive systems in MSYS2
Depends: ntdll-Exception

View File

@ -182,6 +182,7 @@ patch_enable_all ()
enable_ntdll_NtSetLdtEntries="$1"
enable_ntdll_Pipe_SpecialCharacters="$1"
enable_ntdll_RtlIpStringToAddress="$1"
enable_ntdll_SystemRoot_Symlink="$1"
enable_ntdll_ThreadTime="$1"
enable_ntdll_Threading="$1"
enable_ntdll_User_Shared_Data="$1"
@ -638,6 +639,9 @@ patch_enable ()
ntdll-RtlIpStringToAddress)
enable_ntdll_RtlIpStringToAddress="$2"
;;
ntdll-SystemRoot_Symlink)
enable_ntdll_SystemRoot_Symlink="$2"
;;
ntdll-ThreadTime)
enable_ntdll_ThreadTime="$2"
;;
@ -1792,6 +1796,13 @@ if test "$enable_ntdll_WriteWatches" -eq 1; then
enable_ws2_32_WriteWatches=1
fi
if test "$enable_ntdll_SystemRoot_Symlink" -eq 1; then
if test "$enable_ntdll_Exception" -gt 1; then
abort "Patchset ntdll-Exception disabled, but ntdll-SystemRoot_Symlink depends on that."
fi
enable_ntdll_Exception=1
fi
if test "$enable_ntdll_Junction_Points" -eq 1; then
if test "$enable_ntdll_Fix_Free" -gt 1; then
abort "Patchset ntdll-Fix_Free disabled, but ntdll-Junction_Points depends on that."
@ -3964,6 +3975,21 @@ if test "$enable_ntdll_RtlIpStringToAddress" -eq 1; then
) >> "$patchlist"
fi
# Patchset ntdll-SystemRoot_Symlink
# |
# | This patchset has the following dependencies:
# | * ntdll-Exception
# |
# | Modified files:
# | * dlls/ntdll/om.c
# |
if test "$enable_ntdll_SystemRoot_Symlink" -eq 1; then
patch_apply ntdll-SystemRoot_Symlink/0001-ntdll-Add-special-handling-for-SystemRoot-to-satisfy.patch
(
echo '+ { "Sebastian Lackner", "ntdll: Add special handling for \\\\SystemRoot to satisfy MSYS2 case-insensitive system check.", 1 },';
) >> "$patchlist"
fi
# Patchset ntdll-ThreadTime
# |
# | This patchset fixes the following Wine bugs: