mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Rebase against fe0924625fc138d84dccb056f86f46ce23c346d9.
[ntdll-NtOpenSection] Removed patch to avoid crash in om tests when NULL attr is passed to NtOpenSection (fixed upstream).
This commit is contained in:
parent
558b4dcc4b
commit
164e63ad82
@ -1,26 +0,0 @@
|
||||
From 6f76b7fd20b384f64ba58c61b9a3d51ea72fb846 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Fri, 29 Jan 2016 07:04:23 +0100
|
||||
Subject: ntdll: Avoid crash in om tests when NULL attr is passed to
|
||||
NtOpenSection.
|
||||
|
||||
---
|
||||
dlls/ntdll/virtual.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
|
||||
index 81a08cd..d8a13fc 100644
|
||||
--- a/dlls/ntdll/virtual.c
|
||||
+++ b/dlls/ntdll/virtual.c
|
||||
@@ -2507,7 +2507,7 @@ NTSTATUS WINAPI NtOpenSection( HANDLE *handle, ACCESS_MASK access, const OBJECT_
|
||||
req->access = access;
|
||||
req->attributes = attr->Attributes;
|
||||
req->rootdir = wine_server_obj_handle( attr->RootDirectory );
|
||||
- wine_server_add_data( req, attr->ObjectName->Buffer, len );
|
||||
+ if (attr && attr->ObjectName) wine_server_add_data( req, attr->ObjectName->Buffer, len );
|
||||
if (!(ret = wine_server_call( req ))) *handle = wine_server_ptr_handle( reply->handle );
|
||||
}
|
||||
SERVER_END_REQ;
|
||||
--
|
||||
2.7.0
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,15 +1,15 @@
|
||||
From fc9e2809d5ace76166250a4af312f167c7d40af7 Mon Sep 17 00:00:00 2001
|
||||
From c3a457db84cd6c95bbce802329840befdbe9057f 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(+)
|
||||
dlls/ntdll/om.c | 12 ++++++++++++
|
||||
1 file changed, 12 insertions(+)
|
||||
|
||||
diff --git a/dlls/ntdll/om.c b/dlls/ntdll/om.c
|
||||
index c28a82a..ef17b1d 100644
|
||||
index a45de9c..0c3f69e 100644
|
||||
--- a/dlls/ntdll/om.c
|
||||
+++ b/dlls/ntdll/om.c
|
||||
@@ -39,6 +39,7 @@
|
||||
@ -20,24 +20,22 @@ index c28a82a..ef17b1d 100644
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ntdll);
|
||||
|
||||
@@ -623,7 +624,9 @@ DEFINE_SYSCALL_ENTRYPOINT( NtOpenSymbolicLinkObject, 3 );
|
||||
NTSTATUS WINAPI SYSCALL(NtOpenSymbolicLinkObject)(OUT PHANDLE LinkHandle, IN ACCESS_MASK DesiredAccess,
|
||||
IN POBJECT_ATTRIBUTES ObjectAttributes)
|
||||
@@ -615,6 +616,7 @@ DEFINE_SYSCALL_ENTRYPOINT( NtOpenSymbolicLinkObject, 3 );
|
||||
NTSTATUS WINAPI SYSCALL(NtOpenSymbolicLinkObject)( HANDLE *handle, ACCESS_MASK access,
|
||||
const OBJECT_ATTRIBUTES *attr)
|
||||
{
|
||||
+ 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;
|
||||
@@ -638,6 +641,16 @@ NTSTATUS WINAPI SYSCALL(NtOpenSymbolicLinkObject)(OUT PHANDLE LinkHandle, IN ACC
|
||||
return STATUS_OBJECT_PATH_SYNTAX_BAD;
|
||||
}
|
||||
TRACE("(%p,0x%08x,%s)\n", handle, access, debugstr_ObjectAttributes(attr));
|
||||
@@ -622,6 +624,16 @@ NTSTATUS WINAPI SYSCALL(NtOpenSymbolicLinkObject)( HANDLE *handle, ACCESS_MASK a
|
||||
if (!handle) return STATUS_ACCESS_VIOLATION;
|
||||
if ((ret = validate_open_object_attributes( attr ))) return ret;
|
||||
|
||||
+ /* 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,
|
||||
+ if (!access && !attr->RootDirectory &&
|
||||
+ attr->ObjectName->Length == sizeof(SystemRootW) &&
|
||||
+ !memicmpW( attr->ObjectName->Buffer, SystemRootW,
|
||||
+ sizeof(SystemRootW)/sizeof(WCHAR) ))
|
||||
+ {
|
||||
+ TRACE( "returning STATUS_ACCESS_DENIED\n" );
|
||||
@ -46,7 +44,7 @@ index c28a82a..ef17b1d 100644
|
||||
+
|
||||
SERVER_START_REQ(open_symlink)
|
||||
{
|
||||
req->access = DesiredAccess;
|
||||
req->access = access;
|
||||
--
|
||||
2.6.1
|
||||
2.7.0
|
||||
|
||||
|
@ -51,7 +51,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "b3064d748b1cab6464e8b92a558b2d4ba4fe3909"
|
||||
echo "fe0924625fc138d84dccb056f86f46ce23c346d9"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -208,7 +208,6 @@ patch_enable_all ()
|
||||
enable_ntdll_Hide_Wine_Exports="$1"
|
||||
enable_ntdll_Junction_Points="$1"
|
||||
enable_ntdll_Loader_Machine_Type="$1"
|
||||
enable_ntdll_NtOpenSection="$1"
|
||||
enable_ntdll_NtQueryEaFile="$1"
|
||||
enable_ntdll_NtQuerySection="$1"
|
||||
enable_ntdll_NtSetLdtEntries="$1"
|
||||
@ -765,9 +764,6 @@ patch_enable ()
|
||||
ntdll-Loader_Machine_Type)
|
||||
enable_ntdll_Loader_Machine_Type="$2"
|
||||
;;
|
||||
ntdll-NtOpenSection)
|
||||
enable_ntdll_NtOpenSection="$2"
|
||||
;;
|
||||
ntdll-NtQueryEaFile)
|
||||
enable_ntdll_NtQueryEaFile="$2"
|
||||
;;
|
||||
@ -4702,18 +4698,6 @@ if test "$enable_ntdll_Junction_Points" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset ntdll-NtOpenSection
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/ntdll/virtual.c
|
||||
# |
|
||||
if test "$enable_ntdll_NtOpenSection" -eq 1; then
|
||||
patch_apply ntdll-NtOpenSection/0001-ntdll-Avoid-crash-in-om-tests-when-NULL-attr-is-pass.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "ntdll: Avoid crash in om tests when NULL attr is passed to NtOpenSection.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset ntdll-NtQuerySection
|
||||
# |
|
||||
# | This patchset has the following (direct or indirect) dependencies:
|
||||
|
@ -1,4 +1,4 @@
|
||||
From cc8a09773c259881d21c67f3b99b07208bee2cbe Mon Sep 17 00:00:00 2001
|
||||
From 0d5c923e97bebd777846bfb736319646f248e01a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Thu, 19 Mar 2015 01:22:34 +0100
|
||||
Subject: server: Implement support for global and local shared memory blocks
|
||||
@ -20,13 +20,13 @@ Subject: server: Implement support for global and local shared memory blocks
|
||||
12 files changed, 215 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
|
||||
index 539944e..493246c 100644
|
||||
index 6e24ac3..7fe8189 100644
|
||||
--- a/dlls/ntdll/ntdll_misc.h
|
||||
+++ b/dlls/ntdll/ntdll_misc.h
|
||||
@@ -99,6 +99,7 @@ extern int server_get_unix_fd( HANDLE handle, unsigned int access, int *unix_fd,
|
||||
extern int server_pipe( int fd[2] ) DECLSPEC_HIDDEN;
|
||||
@@ -100,6 +100,7 @@ extern int server_pipe( int fd[2] ) DECLSPEC_HIDDEN;
|
||||
extern NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_attributes **ret,
|
||||
data_size_t *ret_len ) DECLSPEC_HIDDEN;
|
||||
extern NTSTATUS validate_open_object_attributes( const OBJECT_ATTRIBUTES *attr ) DECLSPEC_HIDDEN;
|
||||
+extern void *server_get_shared_memory( HANDLE thread ) DECLSPEC_HIDDEN;
|
||||
|
||||
/* module handling */
|
||||
@ -114,7 +114,7 @@ index 356d631..a91e478 100644
|
||||
ntdll_get_thread_data()->wow64_redir = is_wow64;
|
||||
|
||||
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
|
||||
index 9f8e909..c91b27a 100644
|
||||
index 08275dd..ce19a34 100644
|
||||
--- a/dlls/ntdll/thread.c
|
||||
+++ b/dlls/ntdll/thread.c
|
||||
@@ -376,6 +376,7 @@ void terminate_thread( int status )
|
||||
@ -158,7 +158,7 @@ index d573d1f..695389a 100644
|
||||
/* macros for server requests */
|
||||
|
||||
diff --git a/include/winternl.h b/include/winternl.h
|
||||
index 3494c00..b733f78 100644
|
||||
index 51320f2..5d0aa54 100644
|
||||
--- a/include/winternl.h
|
||||
+++ b/include/winternl.h
|
||||
@@ -366,7 +366,7 @@ typedef struct _TEB
|
||||
@ -171,7 +171,7 @@ index 3494c00..b733f78 100644
|
||||
ULONG ImpersonationLocale; /* f98/1788 */
|
||||
ULONG IsImpersonating; /* f9c/178c */
|
||||
diff --git a/server/fd.c b/server/fd.c
|
||||
index e3fe292..00731d1 100644
|
||||
index 559a737..603cef4 100644
|
||||
--- a/server/fd.c
|
||||
+++ b/server/fd.c
|
||||
@@ -2481,6 +2481,33 @@ DECL_HANDLER(write)
|
||||
@ -240,7 +240,7 @@ index 7aed338..f984bfc 100644
|
||||
return 0;
|
||||
}
|
||||
diff --git a/server/mapping.c b/server/mapping.c
|
||||
index 16e7c1c..c180ae5 100644
|
||||
index f66f326..75fda15 100644
|
||||
--- a/server/mapping.c
|
||||
+++ b/server/mapping.c
|
||||
@@ -29,8 +29,32 @@
|
||||
@ -341,7 +341,7 @@ index 16e7c1c..c180ae5 100644
|
||||
static int create_temp_file( file_pos_t size )
|
||||
{
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index ea5bd61..8ce9973 100644
|
||||
index a5a45eb..7c61b76 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -69,6 +69,15 @@ struct request_max_size
|
||||
@ -360,7 +360,7 @@ index ea5bd61..8ce9973 100644
|
||||
|
||||
/* debug event data */
|
||||
typedef union
|
||||
@@ -1204,6 +1213,12 @@ enum server_fd_type
|
||||
@@ -1200,6 +1209,12 @@ enum server_fd_type
|
||||
};
|
||||
|
||||
|
||||
@ -419,5 +419,5 @@ index ac9af24..59ef250 100644
|
||||
|
||||
struct thread_snapshot
|
||||
--
|
||||
2.6.4
|
||||
2.7.0
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user