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:
Sebastian Lackner 2016-01-29 17:37:08 +01:00
parent 558b4dcc4b
commit 164e63ad82
5 changed files with 143 additions and 187 deletions

View File

@ -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

View File

@ -1,4 +1,4 @@
From fdfd1c66de70c936033b2e5654384325a210a46e Mon Sep 17 00:00:00 2001
From 2ea2d12561993dba7a8b042bdac894c9967d0c85 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 16 Oct 2015 02:32:58 +0200
Subject: ntdll: Use wrapper functions for syscalls.
@ -733,10 +733,10 @@ index 9b750e4..9b54be6 100644
{
FIXME("(%d, %p, %d, %p, %d, %p), stub\n", command, inbuffer, inbuflength, outbuffer, outbuflength, retlength);
diff --git a/dlls/ntdll/ntdll_misc.h b/dlls/ntdll/ntdll_misc.h
index 6683daa..b71e427 100644
index 5e4c39e..d0ed679 100644
--- a/dlls/ntdll/ntdll_misc.h
+++ b/dlls/ntdll/ntdll_misc.h
@@ -259,6 +259,23 @@ extern HANDLE keyed_event DECLSPEC_HIDDEN;
@@ -260,6 +260,23 @@ extern HANDLE keyed_event DECLSPEC_HIDDEN;
"ret $(4*" #args ")" ) /* fake ret to make copy protections happy */
#endif
@ -761,7 +761,7 @@ index 6683daa..b71e427 100644
#define HASH_STRING_ALGORITHM_X65599 1
#define HASH_STRING_ALGORITHM_INVALID 0xffffffff
diff --git a/dlls/ntdll/om.c b/dlls/ntdll/om.c
index 4fbb973..2cac6b1 100644
index 7aa2fea..5d28684 100644
--- a/dlls/ntdll/om.c
+++ b/dlls/ntdll/om.c
@@ -50,7 +50,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(ntdll);
@ -819,13 +819,13 @@ index 4fbb973..2cac6b1 100644
* Success: ERROR_SUCCESS.
* Failure: An NTSTATUS error code.
*/
-NTSTATUS WINAPI NtOpenDirectoryObject(PHANDLE DirectoryHandle, ACCESS_MASK DesiredAccess,
-NTSTATUS WINAPI NtOpenDirectoryObject( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr)
+DEFINE_SYSCALL_ENTRYPOINT( NtOpenDirectoryObject, 3 );
+NTSTATUS WINAPI SYSCALL(NtOpenDirectoryObject)(PHANDLE DirectoryHandle, ACCESS_MASK DesiredAccess,
POBJECT_ATTRIBUTES ObjectAttributes)
+NTSTATUS WINAPI SYSCALL(NtOpenDirectoryObject)( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr)
{
NTSTATUS ret;
@@ -477,7 +483,8 @@ NTSTATUS WINAPI NtOpenDirectoryObject(PHANDLE DirectoryHandle, ACCESS_MASK Desir
@@ -467,7 +473,8 @@ NTSTATUS WINAPI NtOpenDirectoryObject( HANDLE *handle, ACCESS_MASK access, const
* Success: ERROR_SUCCESS.
* Failure: An NTSTATUS error code.
*/
@ -835,7 +835,7 @@ index 4fbb973..2cac6b1 100644
OBJECT_ATTRIBUTES *attr )
{
NTSTATUS ret;
@@ -521,7 +528,8 @@ NTSTATUS WINAPI NtCreateDirectoryObject(PHANDLE DirectoryHandle, ACCESS_MASK Des
@@ -511,7 +518,8 @@ NTSTATUS WINAPI NtCreateDirectoryObject(PHANDLE DirectoryHandle, ACCESS_MASK Des
* Success: ERROR_SUCCESS.
* Failure: An NTSTATUS error code.
*/
@ -845,17 +845,17 @@ index 4fbb973..2cac6b1 100644
ULONG size, BOOLEAN single_entry, BOOLEAN restart,
PULONG context, PULONG ret_size)
{
@@ -586,7 +594,8 @@ NTSTATUS WINAPI NtQueryDirectoryObject(HANDLE handle, PDIRECTORY_BASIC_INFORMATI
@@ -576,7 +584,8 @@ NTSTATUS WINAPI NtQueryDirectoryObject(HANDLE handle, PDIRECTORY_BASIC_INFORMATI
* Success: ERROR_SUCCESS.
* Failure: An NTSTATUS error code.
*/
-NTSTATUS WINAPI NtOpenSymbolicLinkObject(OUT PHANDLE LinkHandle, IN ACCESS_MASK DesiredAccess,
-NTSTATUS WINAPI NtOpenSymbolicLinkObject( HANDLE *handle, ACCESS_MASK access,
+DEFINE_SYSCALL_ENTRYPOINT( NtOpenSymbolicLinkObject, 3 );
+NTSTATUS WINAPI SYSCALL(NtOpenSymbolicLinkObject)(OUT PHANDLE LinkHandle, IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes)
+NTSTATUS WINAPI SYSCALL(NtOpenSymbolicLinkObject)( HANDLE *handle, ACCESS_MASK access,
const OBJECT_ATTRIBUTES *attr)
{
NTSTATUS ret;
@@ -635,7 +644,8 @@ NTSTATUS WINAPI NtOpenSymbolicLinkObject(OUT PHANDLE LinkHandle, IN ACCESS_MASK
@@ -616,7 +625,8 @@ NTSTATUS WINAPI NtOpenSymbolicLinkObject( HANDLE *handle, ACCESS_MASK access,
* Success: ERROR_SUCCESS.
* Failure: An NTSTATUS error code.
*/
@ -865,7 +865,7 @@ index 4fbb973..2cac6b1 100644
POBJECT_ATTRIBUTES attr, PUNICODE_STRING TargetName)
{
NTSTATUS ret;
@@ -679,7 +689,8 @@ NTSTATUS WINAPI NtCreateSymbolicLinkObject(OUT PHANDLE SymbolicLinkHandle,IN ACC
@@ -660,7 +670,8 @@ NTSTATUS WINAPI NtCreateSymbolicLinkObject(OUT PHANDLE SymbolicLinkHandle,IN ACC
* Success: ERROR_SUCCESS.
* Failure: An NTSTATUS error code.
*/
@ -875,7 +875,7 @@ index 4fbb973..2cac6b1 100644
{
NTSTATUS ret;
@@ -707,7 +718,8 @@ NTSTATUS WINAPI NtQuerySymbolicLinkObject( HANDLE handle, PUNICODE_STRING target
@@ -688,7 +699,8 @@ NTSTATUS WINAPI NtQuerySymbolicLinkObject( HANDLE handle, PUNICODE_STRING target
/******************************************************************************
* NtAllocateUuids [NTDLL.@]
*/
@ -885,7 +885,7 @@ index 4fbb973..2cac6b1 100644
PULARGE_INTEGER Time,
PULONG Range,
PULONG Sequence)
@@ -729,7 +741,8 @@ NTSTATUS WINAPI NtAllocateUuids(
@@ -710,7 +722,8 @@ NTSTATUS WINAPI NtAllocateUuids(
* Success: STATUS_SUCCESS.
* Failure: An NTSTATUS error code.
*/
@ -950,7 +950,7 @@ index 5a5c3ef..c7a0a8a 100644
{
NTSTATUS status;
diff --git a/dlls/ntdll/reg.c b/dlls/ntdll/reg.c
index c6eb28d..c72a40e 100644
index bf786f4..2d17af6 100644
--- a/dlls/ntdll/reg.c
+++ b/dlls/ntdll/reg.c
@@ -49,7 +49,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(reg);
@ -993,7 +993,7 @@ index c6eb28d..c72a40e 100644
{
NTSTATUS ret;
@@ -157,19 +161,22 @@ NTSTATUS WINAPI NtOpenKeyEx( PHANDLE retkey, ACCESS_MASK access, const OBJECT_AT
@@ -159,19 +163,22 @@ NTSTATUS WINAPI NtOpenKeyEx( PHANDLE retkey, ACCESS_MASK access, const OBJECT_AT
* IN ACCESS_MASK access
* IN POBJECT_ATTRIBUTES attr
*/
@ -1019,7 +1019,7 @@ index c6eb28d..c72a40e 100644
HANDLE transaction )
{
return NtOpenKeyTransactedEx( retkey, access, attr, 0, transaction );
@@ -191,7 +198,8 @@ NTSTATUS WINAPI RtlpNtOpenKey( PHANDLE retkey, ACCESS_MASK access, OBJECT_ATTRIB
@@ -193,7 +200,8 @@ NTSTATUS WINAPI RtlpNtOpenKey( PHANDLE retkey, ACCESS_MASK access, OBJECT_ATTRIB
* NtDeleteKey [NTDLL.@]
* ZwDeleteKey [NTDLL.@]
*/
@ -1029,7 +1029,7 @@ index c6eb28d..c72a40e 100644
{
NTSTATUS ret;
@@ -220,7 +228,8 @@ NTSTATUS WINAPI RtlpNtMakeTemporaryKey( HANDLE hkey )
@@ -222,7 +230,8 @@ NTSTATUS WINAPI RtlpNtMakeTemporaryKey( HANDLE hkey )
* NtDeleteValueKey [NTDLL.@]
* ZwDeleteValueKey [NTDLL.@]
*/
@ -1039,7 +1039,7 @@ index c6eb28d..c72a40e 100644
{
NTSTATUS ret;
@@ -364,7 +373,8 @@ static NTSTATUS enumerate_key( HANDLE handle, int index, KEY_INFORMATION_CLASS i
@@ -366,7 +375,8 @@ static NTSTATUS enumerate_key( HANDLE handle, int index, KEY_INFORMATION_CLASS i
* NOTES
* the name copied into the buffer is NOT 0-terminated
*/
@ -1049,7 +1049,7 @@ index c6eb28d..c72a40e 100644
void *info, DWORD length, DWORD *result_len )
{
/* -1 means query key, so avoid it here */
@@ -423,7 +433,8 @@ NTSTATUS WINAPI RtlpNtEnumerateSubKey( HANDLE handle, UNICODE_STRING *out, ULONG
@@ -425,7 +435,8 @@ NTSTATUS WINAPI RtlpNtEnumerateSubKey( HANDLE handle, UNICODE_STRING *out, ULONG
* NtQueryKey [NTDLL.@]
* ZwQueryKey [NTDLL.@]
*/
@ -1059,7 +1059,7 @@ index c6eb28d..c72a40e 100644
void *info, DWORD length, DWORD *result_len )
{
return enumerate_key( handle, -1, info_class, info, length, result_len );
@@ -478,7 +489,8 @@ static void copy_key_value_info( KEY_VALUE_INFORMATION_CLASS info_class, void *i
@@ -480,7 +491,8 @@ static void copy_key_value_info( KEY_VALUE_INFORMATION_CLASS info_class, void *i
* NtEnumerateValueKey [NTDLL.@]
* ZwEnumerateValueKey [NTDLL.@]
*/
@ -1069,7 +1069,7 @@ index c6eb28d..c72a40e 100644
KEY_VALUE_INFORMATION_CLASS info_class,
void *info, DWORD length, DWORD *result_len )
{
@@ -526,7 +538,8 @@ NTSTATUS WINAPI NtEnumerateValueKey( HANDLE handle, ULONG index,
@@ -528,7 +540,8 @@ NTSTATUS WINAPI NtEnumerateValueKey( HANDLE handle, ULONG index,
* NOTES
* the name in the KeyValueInformation is never set
*/
@ -1079,7 +1079,7 @@ index c6eb28d..c72a40e 100644
KEY_VALUE_INFORMATION_CLASS info_class,
void *info, DWORD length, DWORD *result_len )
{
@@ -628,7 +641,8 @@ NTSTATUS WINAPI RtlpNtQueryValueKey( HANDLE handle, ULONG *result_type, PBYTE de
@@ -630,7 +643,8 @@ NTSTATUS WINAPI RtlpNtQueryValueKey( HANDLE handle, ULONG *result_type, PBYTE de
* NtFlushKey [NTDLL.@]
* ZwFlushKey [NTDLL.@]
*/
@ -1089,7 +1089,7 @@ index c6eb28d..c72a40e 100644
{
NTSTATUS ret;
@@ -648,7 +662,8 @@ NTSTATUS WINAPI NtFlushKey(HANDLE key)
@@ -650,7 +664,8 @@ NTSTATUS WINAPI NtFlushKey(HANDLE key)
* NtLoadKey [NTDLL.@]
* ZwLoadKey [NTDLL.@]
*/
@ -1099,7 +1099,7 @@ index c6eb28d..c72a40e 100644
{
NTSTATUS ret;
HANDLE hive;
@@ -681,7 +696,8 @@ NTSTATUS WINAPI NtLoadKey( const OBJECT_ATTRIBUTES *attr, OBJECT_ATTRIBUTES *fil
@@ -683,7 +698,8 @@ NTSTATUS WINAPI NtLoadKey( const OBJECT_ATTRIBUTES *attr, OBJECT_ATTRIBUTES *fil
* NtNotifyChangeMultipleKeys [NTDLL.@]
* ZwNotifyChangeMultipleKeys [NTDLL.@]
*/
@ -1109,7 +1109,7 @@ index c6eb28d..c72a40e 100644
HANDLE KeyHandle,
ULONG Count,
OBJECT_ATTRIBUTES *SubordinateObjects,
@@ -737,7 +753,8 @@ NTSTATUS WINAPI NtNotifyChangeMultipleKeys(
@@ -739,7 +755,8 @@ NTSTATUS WINAPI NtNotifyChangeMultipleKeys(
* NtNotifyChangeKey [NTDLL.@]
* ZwNotifyChangeKey [NTDLL.@]
*/
@ -1119,7 +1119,7 @@ index c6eb28d..c72a40e 100644
IN HANDLE KeyHandle,
IN HANDLE Event,
IN PIO_APC_ROUTINE ApcRoutine OPTIONAL,
@@ -759,7 +776,8 @@ NTSTATUS WINAPI NtNotifyChangeKey(
@@ -761,7 +778,8 @@ NTSTATUS WINAPI NtNotifyChangeKey(
* ZwQueryMultipleValueKey
*/
@ -1129,7 +1129,7 @@ index c6eb28d..c72a40e 100644
HANDLE KeyHandle,
PKEY_MULTIPLE_VALUE_INFORMATION ListOfValuesToQuery,
ULONG NumberOfItems,
@@ -777,7 +795,8 @@ NTSTATUS WINAPI NtQueryMultipleValueKey(
@@ -779,7 +797,8 @@ NTSTATUS WINAPI NtQueryMultipleValueKey(
* NtReplaceKey [NTDLL.@]
* ZwReplaceKey [NTDLL.@]
*/
@ -1139,7 +1139,7 @@ index c6eb28d..c72a40e 100644
IN POBJECT_ATTRIBUTES ObjectAttributes,
IN HANDLE Key,
IN POBJECT_ATTRIBUTES ReplacedObjectAttributes)
@@ -790,7 +809,8 @@ NTSTATUS WINAPI NtReplaceKey(
@@ -792,7 +811,8 @@ NTSTATUS WINAPI NtReplaceKey(
* NtRestoreKey [NTDLL.@]
* ZwRestoreKey [NTDLL.@]
*/
@ -1149,7 +1149,7 @@ index c6eb28d..c72a40e 100644
HANDLE KeyHandle,
HANDLE FileHandle,
ULONG RestoreFlags)
@@ -803,7 +823,8 @@ NTSTATUS WINAPI NtRestoreKey(
@@ -805,7 +825,8 @@ NTSTATUS WINAPI NtRestoreKey(
* NtSaveKey [NTDLL.@]
* ZwSaveKey [NTDLL.@]
*/
@ -1159,7 +1159,7 @@ index c6eb28d..c72a40e 100644
{
NTSTATUS ret;
@@ -823,7 +844,8 @@ NTSTATUS WINAPI NtSaveKey(IN HANDLE KeyHandle, IN HANDLE FileHandle)
@@ -825,7 +846,8 @@ NTSTATUS WINAPI NtSaveKey(IN HANDLE KeyHandle, IN HANDLE FileHandle)
* NtSetInformationKey [NTDLL.@]
* ZwSetInformationKey [NTDLL.@]
*/
@ -1169,7 +1169,7 @@ index c6eb28d..c72a40e 100644
IN HANDLE KeyHandle,
IN const int KeyInformationClass,
IN PVOID KeyInformation,
@@ -843,7 +865,8 @@ NTSTATUS WINAPI NtSetInformationKey(
@@ -845,7 +867,8 @@ NTSTATUS WINAPI NtSetInformationKey(
* win95 does not care about count for REG_SZ and finds out the len by itself (js)
* NT does definitely care (aj)
*/
@ -1179,7 +1179,7 @@ index c6eb28d..c72a40e 100644
ULONG type, const void *data, ULONG count )
{
NTSTATUS ret;
@@ -882,7 +905,8 @@ NTSTATUS WINAPI RtlpNtSetValueKey( HANDLE hkey, ULONG type, const void *data,
@@ -884,7 +907,8 @@ NTSTATUS WINAPI RtlpNtSetValueKey( HANDLE hkey, ULONG type, const void *data,
* NtUnloadKey [NTDLL.@]
* ZwUnloadKey [NTDLL.@]
*/
@ -1189,7 +1189,7 @@ index c6eb28d..c72a40e 100644
{
NTSTATUS ret;
@@ -1489,7 +1513,8 @@ NTSTATUS WINAPI RtlWriteRegistryValue( ULONG RelativeTo, PCWSTR path, PCWSTR nam
@@ -1491,7 +1515,8 @@ NTSTATUS WINAPI RtlWriteRegistryValue( ULONG RelativeTo, PCWSTR path, PCWSTR nam
* unless there is some app which explicitly depends on that, there is
* no good reason to reproduce that.
*/
@ -1381,10 +1381,10 @@ index 0c64541..ad00eb6 100644
NTSTATUS status = raise_exception( rec, context, first_chance );
if (status == STATUS_SUCCESS) NtSetContextThread( GetCurrentThread(), context );
diff --git a/dlls/ntdll/sync.c b/dlls/ntdll/sync.c
index e63758e..d7bf48c 100644
index aa58442..45bac3e 100644
--- a/dlls/ntdll/sync.c
+++ b/dlls/ntdll/sync.c
@@ -158,7 +158,8 @@ NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_a
@@ -171,7 +171,8 @@ NTSTATUS validate_open_object_attributes( const OBJECT_ATTRIBUTES *attr )
/******************************************************************************
* NtCreateSemaphore (NTDLL.@)
*/
@ -1394,17 +1394,17 @@ index e63758e..d7bf48c 100644
IN ACCESS_MASK access,
IN const OBJECT_ATTRIBUTES *attr OPTIONAL,
IN LONG InitialCount,
@@ -191,7 +192,8 @@ NTSTATUS WINAPI NtCreateSemaphore( OUT PHANDLE SemaphoreHandle,
@@ -204,7 +205,8 @@ NTSTATUS WINAPI NtCreateSemaphore( OUT PHANDLE SemaphoreHandle,
/******************************************************************************
* NtOpenSemaphore (NTDLL.@)
*/
-NTSTATUS WINAPI NtOpenSemaphore( OUT PHANDLE SemaphoreHandle,
-NTSTATUS WINAPI NtOpenSemaphore( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr )
+DEFINE_SYSCALL_ENTRYPOINT( NtOpenSemaphore, 3 );
+NTSTATUS WINAPI SYSCALL(NtOpenSemaphore)( OUT PHANDLE SemaphoreHandle,
IN ACCESS_MASK access,
IN const OBJECT_ATTRIBUTES *attr )
+NTSTATUS WINAPI SYSCALL(NtOpenSemaphore)( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr )
{
@@ -214,7 +216,8 @@ NTSTATUS WINAPI NtOpenSemaphore( OUT PHANDLE SemaphoreHandle,
NTSTATUS ret;
@@ -227,7 +229,8 @@ NTSTATUS WINAPI NtOpenSemaphore( HANDLE *handle, ACCESS_MASK access, const OBJEC
/******************************************************************************
* NtQuerySemaphore (NTDLL.@)
*/
@ -1414,7 +1414,7 @@ index e63758e..d7bf48c 100644
void *info, ULONG len, ULONG *ret_len )
{
NTSTATUS ret;
@@ -246,7 +249,8 @@ NTSTATUS WINAPI NtQuerySemaphore( HANDLE handle, SEMAPHORE_INFORMATION_CLASS cla
@@ -259,7 +262,8 @@ NTSTATUS WINAPI NtQuerySemaphore( HANDLE handle, SEMAPHORE_INFORMATION_CLASS cla
/******************************************************************************
* NtReleaseSemaphore (NTDLL.@)
*/
@ -1424,7 +1424,7 @@ index e63758e..d7bf48c 100644
{
NTSTATUS ret;
SERVER_START_REQ( release_semaphore )
@@ -270,7 +274,8 @@ NTSTATUS WINAPI NtReleaseSemaphore( HANDLE handle, ULONG count, PULONG previous
@@ -283,7 +287,8 @@ NTSTATUS WINAPI NtReleaseSemaphore( HANDLE handle, ULONG count, PULONG previous
* NtCreateEvent (NTDLL.@)
* ZwCreateEvent (NTDLL.@)
*/
@ -1434,17 +1434,17 @@ index e63758e..d7bf48c 100644
const OBJECT_ATTRIBUTES *attr, EVENT_TYPE type, BOOLEAN InitialState)
{
NTSTATUS ret;
@@ -298,7 +303,8 @@ NTSTATUS WINAPI NtCreateEvent( PHANDLE EventHandle, ACCESS_MASK DesiredAccess,
@@ -311,7 +316,8 @@ NTSTATUS WINAPI NtCreateEvent( PHANDLE EventHandle, ACCESS_MASK DesiredAccess,
* NtOpenEvent (NTDLL.@)
* ZwOpenEvent (NTDLL.@)
*/
-NTSTATUS WINAPI NtOpenEvent(
-NTSTATUS WINAPI NtOpenEvent( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr )
+DEFINE_SYSCALL_ENTRYPOINT( NtOpenEvent, 3 );
+NTSTATUS WINAPI SYSCALL(NtOpenEvent)(
OUT PHANDLE EventHandle,
IN ACCESS_MASK DesiredAccess,
IN const OBJECT_ATTRIBUTES *attr )
@@ -324,7 +330,8 @@ NTSTATUS WINAPI NtOpenEvent(
+NTSTATUS WINAPI SYSCALL(NtOpenEvent)( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr )
{
NTSTATUS ret;
@@ -336,7 +342,8 @@ NTSTATUS WINAPI NtOpenEvent( HANDLE *handle, ACCESS_MASK access, const OBJECT_AT
* NtSetEvent (NTDLL.@)
* ZwSetEvent (NTDLL.@)
*/
@ -1454,7 +1454,7 @@ index e63758e..d7bf48c 100644
{
NTSTATUS ret;
@@ -343,7 +350,8 @@ NTSTATUS WINAPI NtSetEvent( HANDLE handle, PULONG NumberOfThreadsReleased )
@@ -355,7 +362,8 @@ NTSTATUS WINAPI NtSetEvent( HANDLE handle, PULONG NumberOfThreadsReleased )
/******************************************************************************
* NtResetEvent (NTDLL.@)
*/
@ -1464,7 +1464,7 @@ index e63758e..d7bf48c 100644
{
NTSTATUS ret;
@@ -366,7 +374,8 @@ NTSTATUS WINAPI NtResetEvent( HANDLE handle, PULONG NumberOfThreadsReleased )
@@ -378,7 +386,8 @@ NTSTATUS WINAPI NtResetEvent( HANDLE handle, PULONG NumberOfThreadsReleased )
* FIXME
* same as NtResetEvent ???
*/
@ -1474,7 +1474,7 @@ index e63758e..d7bf48c 100644
{
return NtResetEvent( handle, NULL );
}
@@ -377,7 +386,8 @@ NTSTATUS WINAPI NtClearEvent ( HANDLE handle )
@@ -389,7 +398,8 @@ NTSTATUS WINAPI NtClearEvent ( HANDLE handle )
* FIXME
* PulseCount
*/
@ -1484,7 +1484,7 @@ index e63758e..d7bf48c 100644
{
NTSTATUS ret;
@@ -397,7 +407,8 @@ NTSTATUS WINAPI NtPulseEvent( HANDLE handle, PULONG PulseCount )
@@ -409,7 +419,8 @@ NTSTATUS WINAPI NtPulseEvent( HANDLE handle, PULONG PulseCount )
/******************************************************************************
* NtQueryEvent (NTDLL.@)
*/
@ -1494,7 +1494,7 @@ index e63758e..d7bf48c 100644
void *info, ULONG len, ULONG *ret_len )
{
NTSTATUS ret;
@@ -435,7 +446,8 @@ NTSTATUS WINAPI NtQueryEvent( HANDLE handle, EVENT_INFORMATION_CLASS class,
@@ -447,7 +458,8 @@ NTSTATUS WINAPI NtQueryEvent( HANDLE handle, EVENT_INFORMATION_CLASS class,
* NtCreateMutant [NTDLL.@]
* ZwCreateMutant [NTDLL.@]
*/
@ -1504,17 +1504,17 @@ index e63758e..d7bf48c 100644
IN ACCESS_MASK access,
IN const OBJECT_ATTRIBUTES* attr OPTIONAL,
IN BOOLEAN InitialOwner)
@@ -464,7 +476,8 @@ NTSTATUS WINAPI NtCreateMutant(OUT HANDLE* MutantHandle,
@@ -476,7 +488,8 @@ NTSTATUS WINAPI NtCreateMutant(OUT HANDLE* MutantHandle,
* NtOpenMutant [NTDLL.@]
* ZwOpenMutant [NTDLL.@]
*/
-NTSTATUS WINAPI NtOpenMutant(OUT HANDLE* MutantHandle,
-NTSTATUS WINAPI NtOpenMutant( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr )
+DEFINE_SYSCALL_ENTRYPOINT( NtOpenMutant, 3 );
+NTSTATUS WINAPI SYSCALL(NtOpenMutant)(OUT HANDLE* MutantHandle,
IN ACCESS_MASK access,
IN const OBJECT_ATTRIBUTES* attr )
+NTSTATUS WINAPI SYSCALL(NtOpenMutant)( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr )
{
@@ -488,7 +501,8 @@ NTSTATUS WINAPI NtOpenMutant(OUT HANDLE* MutantHandle,
NTSTATUS status;
@@ -500,7 +513,8 @@ NTSTATUS WINAPI NtOpenMutant( HANDLE *handle, ACCESS_MASK access, const OBJECT_A
* NtReleaseMutant [NTDLL.@]
* ZwReleaseMutant [NTDLL.@]
*/
@ -1524,7 +1524,7 @@ index e63758e..d7bf48c 100644
{
NTSTATUS status;
@@ -506,7 +520,8 @@ NTSTATUS WINAPI NtReleaseMutant( IN HANDLE handle, OUT PLONG prev_count OPTIONAL
@@ -518,7 +532,8 @@ NTSTATUS WINAPI NtReleaseMutant( IN HANDLE handle, OUT PLONG prev_count OPTIONAL
* NtQueryMutant [NTDLL.@]
* ZwQueryMutant [NTDLL.@]
*/
@ -1534,7 +1534,7 @@ index e63758e..d7bf48c 100644
IN MUTANT_INFORMATION_CLASS MutantInformationClass,
OUT PVOID MutantInformation,
IN ULONG MutantInformationLength,
@@ -525,7 +540,8 @@ NTSTATUS WINAPI NtQueryMutant(IN HANDLE handle,
@@ -537,7 +552,8 @@ NTSTATUS WINAPI NtQueryMutant(IN HANDLE handle,
* NtCreateJobObject [NTDLL.@]
* ZwCreateJobObject [NTDLL.@]
*/
@ -1544,17 +1544,17 @@ index e63758e..d7bf48c 100644
{
NTSTATUS ret;
data_size_t len;
@@ -550,7 +566,8 @@ NTSTATUS WINAPI NtCreateJobObject( PHANDLE handle, ACCESS_MASK access, const OBJ
@@ -562,7 +578,8 @@ NTSTATUS WINAPI NtCreateJobObject( PHANDLE handle, ACCESS_MASK access, const OBJ
* NtOpenJobObject [NTDLL.@]
* ZwOpenJobObject [NTDLL.@]
*/
-NTSTATUS WINAPI NtOpenJobObject( PHANDLE handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr )
-NTSTATUS WINAPI NtOpenJobObject( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr )
+DEFINE_SYSCALL_ENTRYPOINT( NtOpenJobObject, 3 );
+NTSTATUS WINAPI SYSCALL(NtOpenJobObject)( PHANDLE handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr )
+NTSTATUS WINAPI SYSCALL(NtOpenJobObject)( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr )
{
DWORD len = attr && attr->ObjectName ? attr->ObjectName->Length : 0;
NTSTATUS ret;
@@ -572,7 +589,8 @@ NTSTATUS WINAPI NtOpenJobObject( PHANDLE handle, ACCESS_MASK access, const OBJEC
@@ -586,7 +603,8 @@ NTSTATUS WINAPI NtOpenJobObject( HANDLE *handle, ACCESS_MASK access, const OBJEC
* NtTerminateJobObject [NTDLL.@]
* ZwTerminateJobObject [NTDLL.@]
*/
@ -1564,7 +1564,7 @@ index e63758e..d7bf48c 100644
{
NTSTATUS ret;
@@ -593,7 +611,8 @@ NTSTATUS WINAPI NtTerminateJobObject( HANDLE handle, NTSTATUS status )
@@ -607,7 +625,8 @@ NTSTATUS WINAPI NtTerminateJobObject( HANDLE handle, NTSTATUS status )
* NtQueryInformationJobObject [NTDLL.@]
* ZwQueryInformationJobObject [NTDLL.@]
*/
@ -1574,7 +1574,7 @@ index e63758e..d7bf48c 100644
ULONG len, PULONG ret_len )
{
FIXME( "stub: %p %u %p %u %p\n", handle, class, info, len, ret_len );
@@ -636,7 +655,8 @@ NTSTATUS WINAPI NtQueryInformationJobObject( HANDLE handle, JOBOBJECTINFOCLASS c
@@ -650,7 +669,8 @@ NTSTATUS WINAPI NtQueryInformationJobObject( HANDLE handle, JOBOBJECTINFOCLASS c
* NtSetInformationJobObject [NTDLL.@]
* ZwSetInformationJobObject [NTDLL.@]
*/
@ -1584,7 +1584,7 @@ index e63758e..d7bf48c 100644
{
NTSTATUS status = STATUS_NOT_IMPLEMENTED;
JOBOBJECT_BASIC_LIMIT_INFORMATION *basic_limit;
@@ -701,7 +721,8 @@ NTSTATUS WINAPI NtSetInformationJobObject( HANDLE handle, JOBOBJECTINFOCLASS cla
@@ -715,7 +735,8 @@ NTSTATUS WINAPI NtSetInformationJobObject( HANDLE handle, JOBOBJECTINFOCLASS cla
* NtIsProcessInJob [NTDLL.@]
* ZwIsProcessInJob [NTDLL.@]
*/
@ -1594,7 +1594,7 @@ index e63758e..d7bf48c 100644
{
NTSTATUS status;
@@ -722,7 +743,8 @@ NTSTATUS WINAPI NtIsProcessInJob( HANDLE process, HANDLE job )
@@ -736,7 +757,8 @@ NTSTATUS WINAPI NtIsProcessInJob( HANDLE process, HANDLE job )
* NtAssignProcessToJobObject [NTDLL.@]
* ZwAssignProcessToJobObject [NTDLL.@]
*/
@ -1604,7 +1604,7 @@ index e63758e..d7bf48c 100644
{
NTSTATUS status;
@@ -747,7 +769,8 @@ NTSTATUS WINAPI NtAssignProcessToJobObject( HANDLE job, HANDLE process )
@@ -761,7 +783,8 @@ NTSTATUS WINAPI NtAssignProcessToJobObject( HANDLE job, HANDLE process )
* NtCreateTimer [NTDLL.@]
* ZwCreateTimer [NTDLL.@]
*/
@ -1614,17 +1614,17 @@ index e63758e..d7bf48c 100644
IN ACCESS_MASK access,
IN const OBJECT_ATTRIBUTES *attr OPTIONAL,
IN TIMER_TYPE timer_type)
@@ -780,7 +803,8 @@ NTSTATUS WINAPI NtCreateTimer(OUT HANDLE *handle,
@@ -794,7 +817,8 @@ NTSTATUS WINAPI NtCreateTimer(OUT HANDLE *handle,
* NtOpenTimer [NTDLL.@]
* ZwOpenTimer [NTDLL.@]
*/
-NTSTATUS WINAPI NtOpenTimer(OUT PHANDLE handle,
-NTSTATUS WINAPI NtOpenTimer( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr )
+DEFINE_SYSCALL_ENTRYPOINT( NtOpenTimer, 3 );
+NTSTATUS WINAPI SYSCALL(NtOpenTimer)(OUT PHANDLE handle,
IN ACCESS_MASK access,
IN const OBJECT_ATTRIBUTES* attr )
+NTSTATUS WINAPI SYSCALL(NtOpenTimer)( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr )
{
@@ -804,7 +828,8 @@ NTSTATUS WINAPI NtOpenTimer(OUT PHANDLE handle,
NTSTATUS status;
@@ -818,7 +842,8 @@ NTSTATUS WINAPI NtOpenTimer( HANDLE *handle, ACCESS_MASK access, const OBJECT_AT
* NtSetTimer [NTDLL.@]
* ZwSetTimer [NTDLL.@]
*/
@ -1634,7 +1634,7 @@ index e63758e..d7bf48c 100644
IN const LARGE_INTEGER* when,
IN PTIMER_APC_ROUTINE callback,
IN PVOID callback_arg,
@@ -838,7 +863,8 @@ NTSTATUS WINAPI NtSetTimer(IN HANDLE handle,
@@ -852,7 +877,8 @@ NTSTATUS WINAPI NtSetTimer(IN HANDLE handle,
* NtCancelTimer [NTDLL.@]
* ZwCancelTimer [NTDLL.@]
*/
@ -1644,7 +1644,7 @@ index e63758e..d7bf48c 100644
{
NTSTATUS status;
@@ -872,7 +898,8 @@ NTSTATUS WINAPI NtCancelTimer(IN HANDLE handle, OUT BOOLEAN* state)
@@ -886,7 +912,8 @@ NTSTATUS WINAPI NtCancelTimer(IN HANDLE handle, OUT BOOLEAN* state)
* STATUS_ACCESS_DENIED, if TimerHandle does not have TIMER_QUERY_STATE access
* to the timer.
*/
@ -1654,7 +1654,7 @@ index e63758e..d7bf48c 100644
HANDLE TimerHandle,
TIMER_INFORMATION_CLASS TimerInformationClass,
PVOID TimerInformation,
@@ -923,7 +950,8 @@ NTSTATUS WINAPI NtQueryTimer(
@@ -937,7 +964,8 @@ NTSTATUS WINAPI NtQueryTimer(
/******************************************************************************
* NtQueryTimerResolution [NTDLL.@]
*/
@ -1664,7 +1664,7 @@ index e63758e..d7bf48c 100644
OUT ULONG* max_resolution,
OUT ULONG* current_resolution)
{
@@ -936,7 +964,8 @@ NTSTATUS WINAPI NtQueryTimerResolution(OUT ULONG* min_resolution,
@@ -950,7 +978,8 @@ NTSTATUS WINAPI NtQueryTimerResolution(OUT ULONG* min_resolution,
/******************************************************************************
* NtSetTimerResolution [NTDLL.@]
*/
@ -1674,7 +1674,7 @@ index e63758e..d7bf48c 100644
IN BOOLEAN set_resolution,
OUT ULONG* current_resolution )
{
@@ -969,7 +998,8 @@ static NTSTATUS wait_objects( DWORD count, const HANDLE *handles,
@@ -983,7 +1012,8 @@ static NTSTATUS wait_objects( DWORD count, const HANDLE *handles,
/******************************************************************
* NtWaitForMultipleObjects (NTDLL.@)
*/
@ -1684,7 +1684,7 @@ index e63758e..d7bf48c 100644
BOOLEAN wait_any, BOOLEAN alertable,
const LARGE_INTEGER *timeout )
{
@@ -980,7 +1010,8 @@ NTSTATUS WINAPI NtWaitForMultipleObjects( DWORD count, const HANDLE *handles,
@@ -994,7 +1024,8 @@ NTSTATUS WINAPI NtWaitForMultipleObjects( DWORD count, const HANDLE *handles,
/******************************************************************
* NtWaitForSingleObject (NTDLL.@)
*/
@ -1694,7 +1694,7 @@ index e63758e..d7bf48c 100644
{
return wait_objects( 1, &handle, FALSE, alertable, timeout );
}
@@ -989,7 +1020,8 @@ NTSTATUS WINAPI NtWaitForSingleObject(HANDLE handle, BOOLEAN alertable, const LA
@@ -1003,7 +1034,8 @@ NTSTATUS WINAPI NtWaitForSingleObject(HANDLE handle, BOOLEAN alertable, const LA
/******************************************************************
* NtSignalAndWaitForSingleObject (NTDLL.@)
*/
@ -1704,7 +1704,7 @@ index e63758e..d7bf48c 100644
BOOLEAN alertable, const LARGE_INTEGER *timeout )
{
select_op_t select_op;
@@ -1008,7 +1040,8 @@ NTSTATUS WINAPI NtSignalAndWaitForSingleObject( HANDLE hSignalObject, HANDLE hWa
@@ -1022,7 +1054,8 @@ NTSTATUS WINAPI NtSignalAndWaitForSingleObject( HANDLE hSignalObject, HANDLE hWa
/******************************************************************
* NtYieldExecution (NTDLL.@)
*/
@ -1714,7 +1714,7 @@ index e63758e..d7bf48c 100644
{
#ifdef HAVE_SCHED_YIELD
sched_yield();
@@ -1022,7 +1055,8 @@ NTSTATUS WINAPI NtYieldExecution(void)
@@ -1036,7 +1069,8 @@ NTSTATUS WINAPI NtYieldExecution(void)
/******************************************************************
* NtDelayExecution (NTDLL.@)
*/
@ -1724,7 +1724,7 @@ index e63758e..d7bf48c 100644
{
/* if alertable, we need to query the server */
if (alertable)
@@ -1065,7 +1099,8 @@ NTSTATUS WINAPI NtDelayExecution( BOOLEAN alertable, const LARGE_INTEGER *timeou
@@ -1079,7 +1113,8 @@ NTSTATUS WINAPI NtDelayExecution( BOOLEAN alertable, const LARGE_INTEGER *timeou
/******************************************************************************
* NtCreateKeyedEvent (NTDLL.@)
*/
@ -1734,7 +1734,7 @@ index e63758e..d7bf48c 100644
const OBJECT_ATTRIBUTES *attr, ULONG flags )
{
NTSTATUS ret;
@@ -1090,7 +1125,8 @@ NTSTATUS WINAPI NtCreateKeyedEvent( HANDLE *handle, ACCESS_MASK access,
@@ -1104,7 +1139,8 @@ NTSTATUS WINAPI NtCreateKeyedEvent( HANDLE *handle, ACCESS_MASK access,
/******************************************************************************
* NtOpenKeyedEvent (NTDLL.@)
*/
@ -1742,9 +1742,9 @@ index e63758e..d7bf48c 100644
+DEFINE_SYSCALL_ENTRYPOINT( NtOpenKeyedEvent, 3 );
+NTSTATUS WINAPI SYSCALL(NtOpenKeyedEvent)( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr )
{
DWORD len = attr && attr->ObjectName ? attr->ObjectName->Length : 0;
NTSTATUS ret;
@@ -1111,7 +1147,8 @@ NTSTATUS WINAPI NtOpenKeyedEvent( HANDLE *handle, ACCESS_MASK access, const OBJE
@@ -1127,7 +1163,8 @@ NTSTATUS WINAPI NtOpenKeyedEvent( HANDLE *handle, ACCESS_MASK access, const OBJE
/******************************************************************************
* NtWaitForKeyedEvent (NTDLL.@)
*/
@ -1754,7 +1754,7 @@ index e63758e..d7bf48c 100644
BOOLEAN alertable, const LARGE_INTEGER *timeout )
{
select_op_t select_op;
@@ -1128,7 +1165,8 @@ NTSTATUS WINAPI NtWaitForKeyedEvent( HANDLE handle, const void *key,
@@ -1144,7 +1181,8 @@ NTSTATUS WINAPI NtWaitForKeyedEvent( HANDLE handle, const void *key,
/******************************************************************************
* NtReleaseKeyedEvent (NTDLL.@)
*/
@ -1764,7 +1764,7 @@ index e63758e..d7bf48c 100644
BOOLEAN alertable, const LARGE_INTEGER *timeout )
{
select_op_t select_op;
@@ -1155,7 +1193,8 @@ NTSTATUS WINAPI NtReleaseKeyedEvent( HANDLE handle, const void *key,
@@ -1171,7 +1209,8 @@ NTSTATUS WINAPI NtReleaseKeyedEvent( HANDLE handle, const void *key,
* NumberOfConcurrentThreads [I] desired number of concurrent active worker threads
*
*/
@ -1774,7 +1774,7 @@ index e63758e..d7bf48c 100644
POBJECT_ATTRIBUTES attr, ULONG NumberOfConcurrentThreads )
{
NTSTATUS status;
@@ -1196,7 +1235,8 @@ NTSTATUS WINAPI NtCreateIoCompletion( PHANDLE CompletionPort, ACCESS_MASK Desire
@@ -1212,7 +1251,8 @@ NTSTATUS WINAPI NtCreateIoCompletion( PHANDLE CompletionPort, ACCESS_MASK Desire
* Status [I] operation status
* NumberOfBytesTransferred [I] number of bytes transferred
*/
@ -1784,7 +1784,7 @@ index e63758e..d7bf48c 100644
ULONG_PTR CompletionValue, NTSTATUS Status,
SIZE_T NumberOfBytesTransferred )
{
@@ -1232,7 +1272,8 @@ NTSTATUS WINAPI NtSetIoCompletion( HANDLE CompletionPort, ULONG_PTR CompletionKe
@@ -1248,7 +1288,8 @@ NTSTATUS WINAPI NtSetIoCompletion( HANDLE CompletionPort, ULONG_PTR CompletionKe
* WaitTime [I] optional wait time in NTDLL format
*
*/
@ -1794,17 +1794,17 @@ index e63758e..d7bf48c 100644
PULONG_PTR CompletionValue, PIO_STATUS_BLOCK iosb,
PLARGE_INTEGER WaitTime )
{
@@ -1275,7 +1316,8 @@ NTSTATUS WINAPI NtRemoveIoCompletion( HANDLE CompletionPort, PULONG_PTR Completi
@@ -1291,7 +1332,8 @@ NTSTATUS WINAPI NtRemoveIoCompletion( HANDLE CompletionPort, PULONG_PTR Completi
* ObjectAttributes [I] completion object name
*
*/
-NTSTATUS WINAPI NtOpenIoCompletion( PHANDLE CompletionPort, ACCESS_MASK DesiredAccess,
-NTSTATUS WINAPI NtOpenIoCompletion( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr )
+DEFINE_SYSCALL_ENTRYPOINT( NtOpenIoCompletion, 3 );
+NTSTATUS WINAPI SYSCALL(NtOpenIoCompletion)( PHANDLE CompletionPort, ACCESS_MASK DesiredAccess,
POBJECT_ATTRIBUTES ObjectAttributes )
+NTSTATUS WINAPI SYSCALL(NtOpenIoCompletion)( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr )
{
NTSTATUS status;
@@ -1312,7 +1354,8 @@ NTSTATUS WINAPI NtOpenIoCompletion( PHANDLE CompletionPort, ACCESS_MASK DesiredA
@@ -1326,7 +1368,8 @@ NTSTATUS WINAPI NtOpenIoCompletion( HANDLE *handle, ACCESS_MASK access, const OB
* RequiredLength [O] required buffer length
*
*/
@ -1983,7 +1983,7 @@ index 96ffcfa..e93e820 100644
struct timeval tv;
time_t tm_t;
diff --git a/dlls/ntdll/virtual.c b/dlls/ntdll/virtual.c
index 81a08cd..ca7444e 100644
index c57524a..a65d206 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -1857,7 +1857,8 @@ void virtual_set_large_address_space(void)
@ -2065,8 +2065,8 @@ index 81a08cd..ca7444e 100644
+NTSTATUS WINAPI SYSCALL(NtOpenSection)( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr )
{
NTSTATUS ret;
DWORD len = (attr && attr->ObjectName) ? attr->ObjectName->Length : 0;
@@ -2519,7 +2527,8 @@ NTSTATUS WINAPI NtOpenSection( HANDLE *handle, ACCESS_MASK access, const OBJECT_
@@ -2520,7 +2528,8 @@ NTSTATUS WINAPI NtOpenSection( HANDLE *handle, ACCESS_MASK access, const OBJECT_
* NtMapViewOfSection (NTDLL.@)
* ZwMapViewOfSection (NTDLL.@)
*/
@ -2076,7 +2076,7 @@ index 81a08cd..ca7444e 100644
SIZE_T commit_size, const LARGE_INTEGER *offset_ptr, SIZE_T *size_ptr,
SECTION_INHERIT inherit, ULONG alloc_type, ULONG protect )
{
@@ -2717,7 +2726,8 @@ done:
@@ -2718,7 +2727,8 @@ done:
* NtUnmapViewOfSection (NTDLL.@)
* ZwUnmapViewOfSection (NTDLL.@)
*/
@ -2086,7 +2086,7 @@ index 81a08cd..ca7444e 100644
{
struct file_view *view;
NTSTATUS status = STATUS_NOT_MAPPED_VIEW;
@@ -2753,7 +2763,8 @@ NTSTATUS WINAPI NtUnmapViewOfSection( HANDLE process, PVOID addr )
@@ -2754,7 +2764,8 @@ NTSTATUS WINAPI NtUnmapViewOfSection( HANDLE process, PVOID addr )
* NtFlushVirtualMemory (NTDLL.@)
* ZwFlushVirtualMemory (NTDLL.@)
*/
@ -2096,7 +2096,7 @@ index 81a08cd..ca7444e 100644
SIZE_T *size_ptr, ULONG unknown )
{
struct file_view *view;
@@ -2801,7 +2812,8 @@ NTSTATUS WINAPI NtFlushVirtualMemory( HANDLE process, LPCVOID *addr_ptr,
@@ -2802,7 +2813,8 @@ NTSTATUS WINAPI NtFlushVirtualMemory( HANDLE process, LPCVOID *addr_ptr,
* NtGetWriteWatch (NTDLL.@)
* ZwGetWriteWatch (NTDLL.@)
*/
@ -2106,7 +2106,7 @@ index 81a08cd..ca7444e 100644
ULONG_PTR *count, ULONG *granularity )
{
struct file_view *view;
@@ -2849,7 +2861,8 @@ NTSTATUS WINAPI NtGetWriteWatch( HANDLE process, ULONG flags, PVOID base, SIZE_T
@@ -2850,7 +2862,8 @@ NTSTATUS WINAPI NtGetWriteWatch( HANDLE process, ULONG flags, PVOID base, SIZE_T
* NtResetWriteWatch (NTDLL.@)
* ZwResetWriteWatch (NTDLL.@)
*/
@ -2116,7 +2116,7 @@ index 81a08cd..ca7444e 100644
{
struct file_view *view;
NTSTATUS status = STATUS_SUCCESS;
@@ -2878,7 +2891,8 @@ NTSTATUS WINAPI NtResetWriteWatch( HANDLE process, PVOID base, SIZE_T size )
@@ -2879,7 +2892,8 @@ NTSTATUS WINAPI NtResetWriteWatch( HANDLE process, PVOID base, SIZE_T size )
* NtReadVirtualMemory (NTDLL.@)
* ZwReadVirtualMemory (NTDLL.@)
*/
@ -2126,7 +2126,7 @@ index 81a08cd..ca7444e 100644
SIZE_T size, SIZE_T *bytes_read )
{
NTSTATUS status;
@@ -2908,7 +2922,8 @@ NTSTATUS WINAPI NtReadVirtualMemory( HANDLE process, const void *addr, void *buf
@@ -2909,7 +2923,8 @@ NTSTATUS WINAPI NtReadVirtualMemory( HANDLE process, const void *addr, void *buf
* NtWriteVirtualMemory (NTDLL.@)
* ZwWriteVirtualMemory (NTDLL.@)
*/
@ -2136,7 +2136,7 @@ index 81a08cd..ca7444e 100644
SIZE_T size, SIZE_T *bytes_written )
{
NTSTATUS status;
@@ -2938,7 +2953,8 @@ NTSTATUS WINAPI NtWriteVirtualMemory( HANDLE process, void *addr, const void *bu
@@ -2939,7 +2954,8 @@ NTSTATUS WINAPI NtWriteVirtualMemory( HANDLE process, void *addr, const void *bu
* NtAreMappedFilesTheSame (NTDLL.@)
* ZwAreMappedFilesTheSame (NTDLL.@)
*/

View File

@ -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

View File

@ -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:

View File

@ -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