You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Added patch fix detection of case-insensitive systems in MSYS2.
This commit is contained in:
@ -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
|
||||
|
2
patches/ntdll-SystemRoot_Symlink/definition
Normal file
2
patches/ntdll-SystemRoot_Symlink/definition
Normal file
@ -0,0 +1,2 @@
|
||||
Fixes: Fix detection of case-insensitive systems in MSYS2
|
||||
Depends: ntdll-Exception
|
Reference in New Issue
Block a user