Rebase against 8b2ba27c860da63c503f5d7dee08e2c9c01efd74.

This commit is contained in:
Sebastian Lackner 2016-01-29 06:36:10 +01:00
parent 6d36eb2fdc
commit 08db287ce8
4 changed files with 138 additions and 94 deletions

View File

@ -1,17 +1,17 @@
From 12b1d27763ce61ee38b3694e68c44a96d9b17102 Mon Sep 17 00:00:00 2001
From 536b80a9145b26aa771b390ec29978dfa6f45344 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Wed, 20 Aug 2014 15:28:00 -0600
Subject: ntdll: Implement storing DOS attributes in NtCreateFile.
---
dlls/ntdll/file.c | 74 ++++++++++++++++++++++++++++----------------
dlls/ntdll/file.c | 76 ++++++++++++++++++++++++++++----------------
dlls/ntdll/tests/directory.c | 24 ++++++--------
include/wine/port.h | 2 ++
libs/port/xattr.c | 20 ++++++++++++
4 files changed, 79 insertions(+), 41 deletions(-)
4 files changed, 80 insertions(+), 42 deletions(-)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index 3dfcbf8..13787ba 100644
index 3146926..2a71613 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -219,6 +219,21 @@ int get_file_info( const char *path, struct stat *st, ULONG *attr )
@ -36,28 +36,30 @@ index 3dfcbf8..13787ba 100644
/**************************************************************************
* FILE_CreateFile (internal)
* Open a file.
@@ -230,6 +245,9 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
@@ -230,6 +245,10 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
ULONG attributes, ULONG sharing, ULONG disposition,
ULONG options, PVOID ea_buffer, ULONG ea_length )
{
+ static UNICODE_STRING empty_string;
+ OBJECT_ATTRIBUTES unix_attr;
+ data_size_t len;
+ struct object_attributes *objattr;
ANSI_STRING unix_name;
BOOL created = FALSE;
@@ -273,36 +291,34 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
@@ -273,37 +292,34 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
io->u.Status = STATUS_SUCCESS;
}
- if (io->u.Status == STATUS_SUCCESS)
+ if (io->u.Status != STATUS_SUCCESS)
{
- static UNICODE_STRING empty_string;
- OBJECT_ATTRIBUTES unix_attr = *attr;
- data_size_t len;
- struct object_attributes *objattr;
-
- unix_attr.ObjectName = NULL; /* we send the unix name instead */
- unix_attr.ObjectName = &empty_string; /* we send the unix name instead */
- if ((io->u.Status = alloc_object_attributes( &unix_attr, &objattr, &len )))
- {
- RtlFreeAnsiString( &unix_name );
@ -82,7 +84,7 @@ index 3dfcbf8..13787ba 100644
- SERVER_END_REQ;
- RtlFreeHeap( GetProcessHeap(), 0, objattr );
+ unix_attr = *attr;
+ unix_attr.ObjectName = NULL; /* we send the unix name instead */
+ unix_attr.ObjectName = &empty_string; /* we send the unix name instead */
+ if ((io->u.Status = alloc_object_attributes( &unix_attr, &objattr, &len )))
+ {
RtlFreeAnsiString( &unix_name );
@ -107,7 +109,7 @@ index 3dfcbf8..13787ba 100644
if (io->u.Status == STATUS_SUCCESS)
{
@@ -324,6 +340,11 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
@@ -325,6 +341,11 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
io->Information = FILE_OVERWRITTEN;
break;
}
@ -119,7 +121,7 @@ index 3dfcbf8..13787ba 100644
}
else if (io->u.Status == STATUS_TOO_MANY_OPENED_FILES)
{
@@ -331,6 +352,7 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
@@ -332,6 +353,7 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
if (!once++) ERR_(winediag)( "Too many open files, ulimit -n probably needs to be increased\n" );
}
@ -218,5 +220,5 @@ index 6918c99..683e7a6 100644
+#endif
+}
--
2.6.4
2.7.0

View File

@ -0,0 +1,26 @@
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 a6e5e1a95b0879808e629e6e2ba617c2e68d7608 Mon Sep 17 00:00:00 2001
From 98dd624136223cb443b32b9c39d04681fbbe5540 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.
@ -81,7 +81,7 @@ index 304b7f6..222fde9 100644
{
NTSTATUS status;
diff --git a/dlls/ntdll/directory.c b/dlls/ntdll/directory.c
index f3c6aa2..cb552bd 100644
index 04c8e26..e4b7069 100644
--- a/dlls/ntdll/directory.c
+++ b/dlls/ntdll/directory.c
@@ -2210,7 +2210,8 @@ done:
@ -141,10 +141,10 @@ index 5c42010..12b2995 100644
HARDERROR_RESPONSE_OPTION ResponseOption, PHARDERROR_RESPONSE Response )
{
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index d547591..28a0281 100644
index 43b74b2..2e24079 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -295,7 +295,8 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
@@ -296,7 +296,8 @@ static NTSTATUS FILE_CreateFile( PHANDLE handle, ACCESS_MASK access, POBJECT_ATT
* Success: 0. FileHandle and IoStatusBlock are updated.
* Failure: An NTSTATUS error code describing the error.
*/
@ -154,7 +154,7 @@ index d547591..28a0281 100644
POBJECT_ATTRIBUTES attr, PIO_STATUS_BLOCK io,
ULONG sharing, ULONG options )
{
@@ -327,7 +328,8 @@ NTSTATUS WINAPI NtOpenFile( PHANDLE handle, ACCESS_MASK access,
@@ -328,7 +329,8 @@ NTSTATUS WINAPI NtOpenFile( PHANDLE handle, ACCESS_MASK access,
* Success: 0. handle and io are updated.
* Failure: An NTSTATUS error code describing the error.
*/
@ -164,7 +164,7 @@ index d547591..28a0281 100644
PIO_STATUS_BLOCK io, PLARGE_INTEGER alloc_size,
ULONG attributes, ULONG sharing, ULONG disposition,
ULONG options, PVOID ea_buffer, ULONG ea_length )
@@ -791,7 +793,8 @@ static NTSTATUS get_io_avail_mode( HANDLE handle, enum server_fd_type type, BOOL
@@ -792,7 +794,8 @@ static NTSTATUS get_io_avail_mode( HANDLE handle, enum server_fd_type type, BOOL
* The number of bytes read.
* Failure: An NTSTATUS error code describing the error.
*/
@ -174,7 +174,7 @@ index d547591..28a0281 100644
PIO_APC_ROUTINE apc, void* apc_user,
PIO_STATUS_BLOCK io_status, void* buffer, ULONG length,
PLARGE_INTEGER offset, PULONG key)
@@ -1002,7 +1005,8 @@ err:
@@ -1003,7 +1006,8 @@ err:
* NtReadFileScatter [NTDLL.@]
* ZwReadFileScatter [NTDLL.@]
*/
@ -184,7 +184,7 @@ index d547591..28a0281 100644
PIO_STATUS_BLOCK io_status, FILE_SEGMENT_ELEMENT *segments,
ULONG length, PLARGE_INTEGER offset, PULONG key )
{
@@ -1174,7 +1178,8 @@ static NTSTATUS set_pending_write( HANDLE device )
@@ -1175,7 +1179,8 @@ static NTSTATUS set_pending_write( HANDLE device )
* The number of bytes written.
* Failure: An NTSTATUS error code describing the error.
*/
@ -194,7 +194,7 @@ index d547591..28a0281 100644
PIO_APC_ROUTINE apc, void* apc_user,
PIO_STATUS_BLOCK io_status,
const void* buffer, ULONG length,
@@ -1408,7 +1413,8 @@ err:
@@ -1409,7 +1414,8 @@ err:
* NtWriteFileGather [NTDLL.@]
* ZwWriteFileGather [NTDLL.@]
*/
@ -204,7 +204,7 @@ index d547591..28a0281 100644
PIO_STATUS_BLOCK io_status, FILE_SEGMENT_ELEMENT *segments,
ULONG length, PLARGE_INTEGER offset, PULONG key )
{
@@ -1597,7 +1603,8 @@ static void ignore_server_ioctl_struct_holes (ULONG code, const void *in_buffer,
@@ -1598,7 +1604,8 @@ static void ignore_server_ioctl_struct_holes (ULONG code, const void *in_buffer,
* Success: 0. IoStatusBlock is updated.
* Failure: An NTSTATUS error code describing the error.
*/
@ -214,7 +214,7 @@ index d547591..28a0281 100644
PIO_APC_ROUTINE apc, PVOID apc_context,
PIO_STATUS_BLOCK io, ULONG code,
PVOID in_buffer, ULONG in_size,
@@ -1661,7 +1668,8 @@ NTSTATUS WINAPI NtDeviceIoControlFile(HANDLE handle, HANDLE event,
@@ -1662,7 +1669,8 @@ NTSTATUS WINAPI NtDeviceIoControlFile(HANDLE handle, HANDLE event,
* Success: 0. IoStatusBlock is updated.
* Failure: An NTSTATUS error code describing the error.
*/
@ -224,7 +224,7 @@ index d547591..28a0281 100644
PVOID apc_context, PIO_STATUS_BLOCK io, ULONG code,
PVOID in_buffer, ULONG in_size, PVOID out_buffer, ULONG out_size)
{
@@ -1904,7 +1912,8 @@ static NTSTATUS read_changes_apc( void *user, IO_STATUS_BLOCK *iosb,
@@ -1905,7 +1913,8 @@ static NTSTATUS read_changes_apc( void *user, IO_STATUS_BLOCK *iosb,
/******************************************************************************
* NtNotifyChangeDirectoryFile [NTDLL.@]
*/
@ -234,7 +234,7 @@ index d547591..28a0281 100644
void *apc_context, PIO_STATUS_BLOCK iosb, void *buffer,
ULONG buffer_size, ULONG filter, BOOLEAN subtree )
{
@@ -1963,7 +1972,8 @@ NTSTATUS WINAPI NtNotifyChangeDirectoryFile( HANDLE handle, HANDLE event, PIO_AP
@@ -1964,7 +1973,8 @@ NTSTATUS WINAPI NtNotifyChangeDirectoryFile( HANDLE handle, HANDLE event, PIO_AP
* Success: 0. IoStatusBlock is updated.
* Failure: An NTSTATUS error code describing the error.
*/
@ -244,7 +244,7 @@ index d547591..28a0281 100644
IN HANDLE FileHandle,
PIO_STATUS_BLOCK IoStatusBlock,
PVOID FsInformation,
@@ -2268,7 +2278,8 @@ static NTSTATUS fill_name_info( const ANSI_STRING *unix_name, FILE_NAME_INFORMAT
@@ -2269,7 +2279,8 @@ static NTSTATUS fill_name_info( const ANSI_STRING *unix_name, FILE_NAME_INFORMAT
* Success: 0. IoStatusBlock and FileInformation are updated.
* Failure: An NTSTATUS error code describing the error.
*/
@ -254,7 +254,7 @@ index d547591..28a0281 100644
PVOID ptr, LONG len, FILE_INFORMATION_CLASS class )
{
static const size_t info_sizes[] =
@@ -2594,7 +2605,8 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
@@ -2595,7 +2606,8 @@ NTSTATUS WINAPI NtQueryInformationFile( HANDLE hFile, PIO_STATUS_BLOCK io,
* Success: 0. io is updated.
* Failure: An NTSTATUS error code describing the error.
*/
@ -264,7 +264,7 @@ index d547591..28a0281 100644
PVOID ptr, ULONG len, FILE_INFORMATION_CLASS class)
{
int fd, needs_close;
@@ -2891,7 +2903,8 @@ NTSTATUS WINAPI NtSetInformationFile(HANDLE handle, PIO_STATUS_BLOCK io,
@@ -2892,7 +2904,8 @@ NTSTATUS WINAPI NtSetInformationFile(HANDLE handle, PIO_STATUS_BLOCK io,
/******************************************************************************
* NtQueryFullAttributesFile (NTDLL.@)
*/
@ -274,7 +274,7 @@ index d547591..28a0281 100644
FILE_NETWORK_OPEN_INFORMATION *info )
{
ANSI_STRING unix_name;
@@ -2935,7 +2948,8 @@ NTSTATUS WINAPI NtQueryFullAttributesFile( const OBJECT_ATTRIBUTES *attr,
@@ -2936,7 +2949,8 @@ NTSTATUS WINAPI NtQueryFullAttributesFile( const OBJECT_ATTRIBUTES *attr,
* NtQueryAttributesFile (NTDLL.@)
* ZwQueryAttributesFile (NTDLL.@)
*/
@ -284,7 +284,7 @@ index d547591..28a0281 100644
{
ANSI_STRING unix_name;
NTSTATUS status;
@@ -3156,7 +3170,8 @@ static NTSTATUS get_device_info( int fd, FILE_FS_DEVICE_INFORMATION *info )
@@ -3157,7 +3171,8 @@ static NTSTATUS get_device_info( int fd, FILE_FS_DEVICE_INFORMATION *info )
* Success: 0. io and buffer are updated.
* Failure: An NTSTATUS error code describing the error.
*/
@ -294,7 +294,7 @@ index d547591..28a0281 100644
PVOID buffer, ULONG length,
FS_INFORMATION_CLASS info_class )
{
@@ -3304,7 +3319,8 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, PIO_STATUS_BLOCK io
@@ -3305,7 +3320,8 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, PIO_STATUS_BLOCK io
* Success: 0. Atrributes read into buffer
* Failure: An NTSTATUS error code describing the error.
*/
@ -304,7 +304,7 @@ index d547591..28a0281 100644
BOOLEAN single_entry, PVOID ea_list, ULONG ea_list_len,
PULONG ea_index, BOOLEAN restart )
{
@@ -3330,7 +3346,8 @@ NTSTATUS WINAPI NtQueryEaFile( HANDLE hFile, PIO_STATUS_BLOCK iosb, PVOID buffer
@@ -3331,7 +3347,8 @@ NTSTATUS WINAPI NtQueryEaFile( HANDLE hFile, PIO_STATUS_BLOCK iosb, PVOID buffer
* Success: 0. Attributes are updated
* Failure: An NTSTATUS error code describing the error.
*/
@ -314,7 +314,7 @@ index d547591..28a0281 100644
{
FIXME("(%p,%p,%p,%d) stub\n", hFile, iosb, buffer, length);
return STATUS_ACCESS_DENIED;
@@ -3350,7 +3367,8 @@ NTSTATUS WINAPI NtSetEaFile( HANDLE hFile, PIO_STATUS_BLOCK iosb, PVOID buffer,
@@ -3351,7 +3368,8 @@ NTSTATUS WINAPI NtSetEaFile( HANDLE hFile, PIO_STATUS_BLOCK iosb, PVOID buffer,
* Success: 0. IoStatusBlock is updated.
* Failure: An NTSTATUS error code describing the error.
*/
@ -324,7 +324,7 @@ index d547591..28a0281 100644
{
NTSTATUS ret;
HANDLE hEvent = NULL;
@@ -3392,7 +3410,8 @@ NTSTATUS WINAPI NtFlushBuffersFile( HANDLE hFile, IO_STATUS_BLOCK* IoStatusBlock
@@ -3393,7 +3411,8 @@ NTSTATUS WINAPI NtFlushBuffersFile( HANDLE hFile, IO_STATUS_BLOCK* IoStatusBlock
*
*
*/
@ -334,7 +334,7 @@ index d547591..28a0281 100644
PIO_APC_ROUTINE apc, void* apc_user,
PIO_STATUS_BLOCK io_status, PLARGE_INTEGER offset,
PLARGE_INTEGER count, ULONG* key, BOOLEAN dont_wait,
@@ -3464,7 +3483,8 @@ NTSTATUS WINAPI NtLockFile( HANDLE hFile, HANDLE lock_granted_event,
@@ -3465,7 +3484,8 @@ NTSTATUS WINAPI NtLockFile( HANDLE hFile, HANDLE lock_granted_event,
*
*
*/
@ -344,7 +344,7 @@ index d547591..28a0281 100644
PLARGE_INTEGER offset, PLARGE_INTEGER count,
PULONG key )
{
@@ -3495,7 +3515,8 @@ NTSTATUS WINAPI NtUnlockFile( HANDLE hFile, PIO_STATUS_BLOCK io_status,
@@ -3496,7 +3516,8 @@ NTSTATUS WINAPI NtUnlockFile( HANDLE hFile, PIO_STATUS_BLOCK io_status,
*
*
*/
@ -354,7 +354,7 @@ index d547591..28a0281 100644
POBJECT_ATTRIBUTES attr, PIO_STATUS_BLOCK iosb,
ULONG sharing, ULONG dispo, ULONG options,
ULONG pipe_type, ULONG read_mode,
@@ -3546,7 +3567,8 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( PHANDLE handle, ULONG access,
@@ -3547,7 +3568,8 @@ NTSTATUS WINAPI NtCreateNamedPipeFile( PHANDLE handle, ULONG access,
*
*
*/
@ -364,7 +364,7 @@ index d547591..28a0281 100644
{
NTSTATUS status;
HANDLE hFile;
@@ -3566,7 +3588,8 @@ NTSTATUS WINAPI NtDeleteFile( POBJECT_ATTRIBUTES ObjectAttributes )
@@ -3567,7 +3589,8 @@ NTSTATUS WINAPI NtDeleteFile( POBJECT_ATTRIBUTES ObjectAttributes )
*
*
*/
@ -374,7 +374,7 @@ index d547591..28a0281 100644
{
TRACE("%p %p %p\n", hFile, iosb, io_status );
@@ -3587,7 +3610,8 @@ NTSTATUS WINAPI NtCancelIoFileEx( HANDLE hFile, PIO_STATUS_BLOCK iosb, PIO_STATU
@@ -3588,7 +3611,8 @@ NTSTATUS WINAPI NtCancelIoFileEx( HANDLE hFile, PIO_STATUS_BLOCK iosb, PIO_STATU
*
*
*/
@ -384,7 +384,7 @@ index d547591..28a0281 100644
{
TRACE("%p %p\n", hFile, io_status );
@@ -3620,7 +3644,8 @@ NTSTATUS WINAPI NtCancelIoFile( HANDLE hFile, PIO_STATUS_BLOCK io_status )
@@ -3621,7 +3645,8 @@ NTSTATUS WINAPI NtCancelIoFile( HANDLE hFile, PIO_STATUS_BLOCK io_status )
* RETURNS
* An NT status code
*/
@ -395,7 +395,7 @@ index d547591..28a0281 100644
ULONG CreateOptions, ULONG MailslotQuota, ULONG MaxMessageSize,
PLARGE_INTEGER TimeOut)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 74feb97..e5ea736 100644
index 5bcc03e..b08feeb 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -3200,7 +3200,8 @@ PVOID WINAPI RtlPcToFileHeader( PVOID pc, PVOID *address )
@ -950,7 +950,7 @@ index 5a5c3ef..c7a0a8a 100644
{
NTSTATUS status;
diff --git a/dlls/ntdll/reg.c b/dlls/ntdll/reg.c
index 9223cb4..eec1db0 100644
index c6eb28d..c72a40e 100644
--- a/dlls/ntdll/reg.c
+++ b/dlls/ntdll/reg.c
@@ -49,7 +49,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(reg);
@ -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 47b27d3..91f1396 100644
index 0902c61..b7da598 100644
--- a/dlls/ntdll/sync.c
+++ b/dlls/ntdll/sync.c
@@ -157,7 +157,8 @@ NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_a
@@ -158,7 +158,8 @@ NTSTATUS alloc_object_attributes( const OBJECT_ATTRIBUTES *attr, struct object_a
/******************************************************************************
* NtCreateSemaphore (NTDLL.@)
*/
@ -1394,7 +1394,7 @@ index 47b27d3..91f1396 100644
IN ACCESS_MASK access,
IN const OBJECT_ATTRIBUTES *attr OPTIONAL,
IN LONG InitialCount,
@@ -190,7 +191,8 @@ NTSTATUS WINAPI NtCreateSemaphore( OUT PHANDLE SemaphoreHandle,
@@ -191,7 +192,8 @@ NTSTATUS WINAPI NtCreateSemaphore( OUT PHANDLE SemaphoreHandle,
/******************************************************************************
* NtOpenSemaphore (NTDLL.@)
*/
@ -1404,7 +1404,7 @@ index 47b27d3..91f1396 100644
IN ACCESS_MASK access,
IN const OBJECT_ATTRIBUTES *attr )
{
@@ -215,7 +217,8 @@ NTSTATUS WINAPI NtOpenSemaphore( OUT PHANDLE SemaphoreHandle,
@@ -214,7 +216,8 @@ NTSTATUS WINAPI NtOpenSemaphore( OUT PHANDLE SemaphoreHandle,
/******************************************************************************
* NtQuerySemaphore (NTDLL.@)
*/
@ -1414,7 +1414,7 @@ index 47b27d3..91f1396 100644
void *info, ULONG len, ULONG *ret_len )
{
NTSTATUS ret;
@@ -247,7 +250,8 @@ NTSTATUS WINAPI NtQuerySemaphore( HANDLE handle, SEMAPHORE_INFORMATION_CLASS cla
@@ -246,7 +249,8 @@ NTSTATUS WINAPI NtQuerySemaphore( HANDLE handle, SEMAPHORE_INFORMATION_CLASS cla
/******************************************************************************
* NtReleaseSemaphore (NTDLL.@)
*/
@ -1424,7 +1424,7 @@ index 47b27d3..91f1396 100644
{
NTSTATUS ret;
SERVER_START_REQ( release_semaphore )
@@ -271,7 +275,8 @@ NTSTATUS WINAPI NtReleaseSemaphore( HANDLE handle, ULONG count, PULONG previous
@@ -270,7 +274,8 @@ NTSTATUS WINAPI NtReleaseSemaphore( HANDLE handle, ULONG count, PULONG previous
* NtCreateEvent (NTDLL.@)
* ZwCreateEvent (NTDLL.@)
*/
@ -1434,7 +1434,7 @@ index 47b27d3..91f1396 100644
const OBJECT_ATTRIBUTES *attr, EVENT_TYPE type, BOOLEAN InitialState)
{
NTSTATUS ret;
@@ -299,7 +304,8 @@ NTSTATUS WINAPI NtCreateEvent( PHANDLE EventHandle, ACCESS_MASK DesiredAccess,
@@ -298,7 +303,8 @@ NTSTATUS WINAPI NtCreateEvent( PHANDLE EventHandle, ACCESS_MASK DesiredAccess,
* NtOpenEvent (NTDLL.@)
* ZwOpenEvent (NTDLL.@)
*/
@ -1444,7 +1444,7 @@ index 47b27d3..91f1396 100644
OUT PHANDLE EventHandle,
IN ACCESS_MASK DesiredAccess,
IN const OBJECT_ATTRIBUTES *attr )
@@ -327,7 +333,8 @@ NTSTATUS WINAPI NtOpenEvent(
@@ -324,7 +330,8 @@ NTSTATUS WINAPI NtOpenEvent(
* NtSetEvent (NTDLL.@)
* ZwSetEvent (NTDLL.@)
*/
@ -1454,7 +1454,7 @@ index 47b27d3..91f1396 100644
{
NTSTATUS ret;
@@ -346,7 +353,8 @@ NTSTATUS WINAPI NtSetEvent( HANDLE handle, PULONG NumberOfThreadsReleased )
@@ -343,7 +350,8 @@ NTSTATUS WINAPI NtSetEvent( HANDLE handle, PULONG NumberOfThreadsReleased )
/******************************************************************************
* NtResetEvent (NTDLL.@)
*/
@ -1464,7 +1464,7 @@ index 47b27d3..91f1396 100644
{
NTSTATUS ret;
@@ -369,7 +377,8 @@ NTSTATUS WINAPI NtResetEvent( HANDLE handle, PULONG NumberOfThreadsReleased )
@@ -366,7 +374,8 @@ NTSTATUS WINAPI NtResetEvent( HANDLE handle, PULONG NumberOfThreadsReleased )
* FIXME
* same as NtResetEvent ???
*/
@ -1474,7 +1474,7 @@ index 47b27d3..91f1396 100644
{
return NtResetEvent( handle, NULL );
}
@@ -380,7 +389,8 @@ NTSTATUS WINAPI NtClearEvent ( HANDLE handle )
@@ -377,7 +386,8 @@ NTSTATUS WINAPI NtClearEvent ( HANDLE handle )
* FIXME
* PulseCount
*/
@ -1484,7 +1484,7 @@ index 47b27d3..91f1396 100644
{
NTSTATUS ret;
@@ -400,7 +410,8 @@ NTSTATUS WINAPI NtPulseEvent( HANDLE handle, PULONG PulseCount )
@@ -397,7 +407,8 @@ NTSTATUS WINAPI NtPulseEvent( HANDLE handle, PULONG PulseCount )
/******************************************************************************
* NtQueryEvent (NTDLL.@)
*/
@ -1494,7 +1494,7 @@ index 47b27d3..91f1396 100644
void *info, ULONG len, ULONG *ret_len )
{
NTSTATUS ret;
@@ -438,7 +449,8 @@ NTSTATUS WINAPI NtQueryEvent( HANDLE handle, EVENT_INFORMATION_CLASS class,
@@ -435,7 +446,8 @@ NTSTATUS WINAPI NtQueryEvent( HANDLE handle, EVENT_INFORMATION_CLASS class,
* NtCreateMutant [NTDLL.@]
* ZwCreateMutant [NTDLL.@]
*/
@ -1504,7 +1504,7 @@ index 47b27d3..91f1396 100644
IN ACCESS_MASK access,
IN const OBJECT_ATTRIBUTES* attr OPTIONAL,
IN BOOLEAN InitialOwner)
@@ -467,7 +479,8 @@ NTSTATUS WINAPI NtCreateMutant(OUT HANDLE* MutantHandle,
@@ -464,7 +476,8 @@ NTSTATUS WINAPI NtCreateMutant(OUT HANDLE* MutantHandle,
* NtOpenMutant [NTDLL.@]
* ZwOpenMutant [NTDLL.@]
*/
@ -1514,7 +1514,7 @@ index 47b27d3..91f1396 100644
IN ACCESS_MASK access,
IN const OBJECT_ATTRIBUTES* attr )
{
@@ -493,7 +506,8 @@ NTSTATUS WINAPI NtOpenMutant(OUT HANDLE* MutantHandle,
@@ -488,7 +501,8 @@ NTSTATUS WINAPI NtOpenMutant(OUT HANDLE* MutantHandle,
* NtReleaseMutant [NTDLL.@]
* ZwReleaseMutant [NTDLL.@]
*/
@ -1524,7 +1524,7 @@ index 47b27d3..91f1396 100644
{
NTSTATUS status;
@@ -511,7 +525,8 @@ NTSTATUS WINAPI NtReleaseMutant( IN HANDLE handle, OUT PLONG prev_count OPTIONAL
@@ -506,7 +520,8 @@ NTSTATUS WINAPI NtReleaseMutant( IN HANDLE handle, OUT PLONG prev_count OPTIONAL
* NtQueryMutant [NTDLL.@]
* ZwQueryMutant [NTDLL.@]
*/
@ -1534,7 +1534,7 @@ index 47b27d3..91f1396 100644
IN MUTANT_INFORMATION_CLASS MutantInformationClass,
OUT PVOID MutantInformation,
IN ULONG MutantInformationLength,
@@ -530,7 +545,8 @@ NTSTATUS WINAPI NtQueryMutant(IN HANDLE handle,
@@ -525,7 +540,8 @@ NTSTATUS WINAPI NtQueryMutant(IN HANDLE handle,
* NtCreateJobObject [NTDLL.@]
* ZwCreateJobObject [NTDLL.@]
*/
@ -1544,7 +1544,7 @@ index 47b27d3..91f1396 100644
{
NTSTATUS ret;
data_size_t len;
@@ -555,7 +571,8 @@ NTSTATUS WINAPI NtCreateJobObject( PHANDLE handle, ACCESS_MASK access, const OBJ
@@ -550,7 +566,8 @@ NTSTATUS WINAPI NtCreateJobObject( PHANDLE handle, ACCESS_MASK access, const OBJ
* NtOpenJobObject [NTDLL.@]
* ZwOpenJobObject [NTDLL.@]
*/
@ -1554,7 +1554,7 @@ index 47b27d3..91f1396 100644
{
FIXME( "stub: %p %x %s\n", handle, access, attr ? debugstr_us(attr->ObjectName) : "" );
return STATUS_NOT_IMPLEMENTED;
@@ -565,7 +582,8 @@ NTSTATUS WINAPI NtOpenJobObject( PHANDLE handle, ACCESS_MASK access, const OBJEC
@@ -560,7 +577,8 @@ NTSTATUS WINAPI NtOpenJobObject( PHANDLE handle, ACCESS_MASK access, const OBJEC
* NtTerminateJobObject [NTDLL.@]
* ZwTerminateJobObject [NTDLL.@]
*/
@ -1564,7 +1564,7 @@ index 47b27d3..91f1396 100644
{
NTSTATUS ret;
@@ -586,7 +604,8 @@ NTSTATUS WINAPI NtTerminateJobObject( HANDLE handle, NTSTATUS status )
@@ -581,7 +599,8 @@ NTSTATUS WINAPI NtTerminateJobObject( HANDLE handle, NTSTATUS status )
* NtQueryInformationJobObject [NTDLL.@]
* ZwQueryInformationJobObject [NTDLL.@]
*/
@ -1574,7 +1574,7 @@ index 47b27d3..91f1396 100644
ULONG len, PULONG ret_len )
{
FIXME( "stub: %p %u %p %u %p\n", handle, class, info, len, ret_len );
@@ -629,7 +648,8 @@ NTSTATUS WINAPI NtQueryInformationJobObject( HANDLE handle, JOBOBJECTINFOCLASS c
@@ -624,7 +643,8 @@ NTSTATUS WINAPI NtQueryInformationJobObject( HANDLE handle, JOBOBJECTINFOCLASS c
* NtSetInformationJobObject [NTDLL.@]
* ZwSetInformationJobObject [NTDLL.@]
*/
@ -1584,7 +1584,7 @@ index 47b27d3..91f1396 100644
{
NTSTATUS status = STATUS_NOT_IMPLEMENTED;
JOBOBJECT_BASIC_LIMIT_INFORMATION *basic_limit;
@@ -694,7 +714,8 @@ NTSTATUS WINAPI NtSetInformationJobObject( HANDLE handle, JOBOBJECTINFOCLASS cla
@@ -689,7 +709,8 @@ NTSTATUS WINAPI NtSetInformationJobObject( HANDLE handle, JOBOBJECTINFOCLASS cla
* NtIsProcessInJob [NTDLL.@]
* ZwIsProcessInJob [NTDLL.@]
*/
@ -1594,7 +1594,7 @@ index 47b27d3..91f1396 100644
{
NTSTATUS status;
@@ -715,7 +736,8 @@ NTSTATUS WINAPI NtIsProcessInJob( HANDLE process, HANDLE job )
@@ -710,7 +731,8 @@ NTSTATUS WINAPI NtIsProcessInJob( HANDLE process, HANDLE job )
* NtAssignProcessToJobObject [NTDLL.@]
* ZwAssignProcessToJobObject [NTDLL.@]
*/
@ -1604,7 +1604,7 @@ index 47b27d3..91f1396 100644
{
NTSTATUS status;
@@ -740,7 +762,8 @@ NTSTATUS WINAPI NtAssignProcessToJobObject( HANDLE job, HANDLE process )
@@ -735,7 +757,8 @@ NTSTATUS WINAPI NtAssignProcessToJobObject( HANDLE job, HANDLE process )
* NtCreateTimer [NTDLL.@]
* ZwCreateTimer [NTDLL.@]
*/
@ -1614,7 +1614,7 @@ index 47b27d3..91f1396 100644
IN ACCESS_MASK access,
IN const OBJECT_ATTRIBUTES *attr OPTIONAL,
IN TIMER_TYPE timer_type)
@@ -773,7 +796,8 @@ NTSTATUS WINAPI NtCreateTimer(OUT HANDLE *handle,
@@ -768,7 +791,8 @@ NTSTATUS WINAPI NtCreateTimer(OUT HANDLE *handle,
* NtOpenTimer [NTDLL.@]
* ZwOpenTimer [NTDLL.@]
*/
@ -1624,7 +1624,7 @@ index 47b27d3..91f1396 100644
IN ACCESS_MASK access,
IN const OBJECT_ATTRIBUTES* attr )
{
@@ -799,7 +823,8 @@ NTSTATUS WINAPI NtOpenTimer(OUT PHANDLE handle,
@@ -792,7 +816,8 @@ NTSTATUS WINAPI NtOpenTimer(OUT PHANDLE handle,
* NtSetTimer [NTDLL.@]
* ZwSetTimer [NTDLL.@]
*/
@ -1634,7 +1634,7 @@ index 47b27d3..91f1396 100644
IN const LARGE_INTEGER* when,
IN PTIMER_APC_ROUTINE callback,
IN PVOID callback_arg,
@@ -833,7 +858,8 @@ NTSTATUS WINAPI NtSetTimer(IN HANDLE handle,
@@ -826,7 +851,8 @@ NTSTATUS WINAPI NtSetTimer(IN HANDLE handle,
* NtCancelTimer [NTDLL.@]
* ZwCancelTimer [NTDLL.@]
*/
@ -1644,7 +1644,7 @@ index 47b27d3..91f1396 100644
{
NTSTATUS status;
@@ -867,7 +893,8 @@ NTSTATUS WINAPI NtCancelTimer(IN HANDLE handle, OUT BOOLEAN* state)
@@ -860,7 +886,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 47b27d3..91f1396 100644
HANDLE TimerHandle,
TIMER_INFORMATION_CLASS TimerInformationClass,
PVOID TimerInformation,
@@ -918,7 +945,8 @@ NTSTATUS WINAPI NtQueryTimer(
@@ -911,7 +938,8 @@ NTSTATUS WINAPI NtQueryTimer(
/******************************************************************************
* NtQueryTimerResolution [NTDLL.@]
*/
@ -1664,7 +1664,7 @@ index 47b27d3..91f1396 100644
OUT ULONG* max_resolution,
OUT ULONG* current_resolution)
{
@@ -931,7 +959,8 @@ NTSTATUS WINAPI NtQueryTimerResolution(OUT ULONG* min_resolution,
@@ -924,7 +952,8 @@ NTSTATUS WINAPI NtQueryTimerResolution(OUT ULONG* min_resolution,
/******************************************************************************
* NtSetTimerResolution [NTDLL.@]
*/
@ -1674,7 +1674,7 @@ index 47b27d3..91f1396 100644
IN BOOLEAN set_resolution,
OUT ULONG* current_resolution )
{
@@ -964,7 +993,8 @@ static NTSTATUS wait_objects( DWORD count, const HANDLE *handles,
@@ -957,7 +986,8 @@ static NTSTATUS wait_objects( DWORD count, const HANDLE *handles,
/******************************************************************
* NtWaitForMultipleObjects (NTDLL.@)
*/
@ -1684,7 +1684,7 @@ index 47b27d3..91f1396 100644
BOOLEAN wait_any, BOOLEAN alertable,
const LARGE_INTEGER *timeout )
{
@@ -975,7 +1005,8 @@ NTSTATUS WINAPI NtWaitForMultipleObjects( DWORD count, const HANDLE *handles,
@@ -968,7 +998,8 @@ NTSTATUS WINAPI NtWaitForMultipleObjects( DWORD count, const HANDLE *handles,
/******************************************************************
* NtWaitForSingleObject (NTDLL.@)
*/
@ -1694,7 +1694,7 @@ index 47b27d3..91f1396 100644
{
return wait_objects( 1, &handle, FALSE, alertable, timeout );
}
@@ -984,7 +1015,8 @@ NTSTATUS WINAPI NtWaitForSingleObject(HANDLE handle, BOOLEAN alertable, const LA
@@ -977,7 +1008,8 @@ NTSTATUS WINAPI NtWaitForSingleObject(HANDLE handle, BOOLEAN alertable, const LA
/******************************************************************
* NtSignalAndWaitForSingleObject (NTDLL.@)
*/
@ -1704,7 +1704,7 @@ index 47b27d3..91f1396 100644
BOOLEAN alertable, const LARGE_INTEGER *timeout )
{
select_op_t select_op;
@@ -1003,7 +1035,8 @@ NTSTATUS WINAPI NtSignalAndWaitForSingleObject( HANDLE hSignalObject, HANDLE hWa
@@ -996,7 +1028,8 @@ NTSTATUS WINAPI NtSignalAndWaitForSingleObject( HANDLE hSignalObject, HANDLE hWa
/******************************************************************
* NtYieldExecution (NTDLL.@)
*/
@ -1714,7 +1714,7 @@ index 47b27d3..91f1396 100644
{
#ifdef HAVE_SCHED_YIELD
sched_yield();
@@ -1017,7 +1050,8 @@ NTSTATUS WINAPI NtYieldExecution(void)
@@ -1010,7 +1043,8 @@ NTSTATUS WINAPI NtYieldExecution(void)
/******************************************************************
* NtDelayExecution (NTDLL.@)
*/
@ -1724,7 +1724,7 @@ index 47b27d3..91f1396 100644
{
/* if alertable, we need to query the server */
if (alertable)
@@ -1060,7 +1094,8 @@ NTSTATUS WINAPI NtDelayExecution( BOOLEAN alertable, const LARGE_INTEGER *timeou
@@ -1053,7 +1087,8 @@ NTSTATUS WINAPI NtDelayExecution( BOOLEAN alertable, const LARGE_INTEGER *timeou
/******************************************************************************
* NtCreateKeyedEvent (NTDLL.@)
*/
@ -1734,7 +1734,7 @@ index 47b27d3..91f1396 100644
const OBJECT_ATTRIBUTES *attr, ULONG flags )
{
NTSTATUS ret;
@@ -1085,7 +1120,8 @@ NTSTATUS WINAPI NtCreateKeyedEvent( HANDLE *handle, ACCESS_MASK access,
@@ -1078,7 +1113,8 @@ NTSTATUS WINAPI NtCreateKeyedEvent( HANDLE *handle, ACCESS_MASK access,
/******************************************************************************
* NtOpenKeyedEvent (NTDLL.@)
*/
@ -1744,7 +1744,7 @@ index 47b27d3..91f1396 100644
{
DWORD len = attr && attr->ObjectName ? attr->ObjectName->Length : 0;
NTSTATUS ret;
@@ -1108,7 +1144,8 @@ NTSTATUS WINAPI NtOpenKeyedEvent( HANDLE *handle, ACCESS_MASK access, const OBJE
@@ -1099,7 +1135,8 @@ NTSTATUS WINAPI NtOpenKeyedEvent( HANDLE *handle, ACCESS_MASK access, const OBJE
/******************************************************************************
* NtWaitForKeyedEvent (NTDLL.@)
*/
@ -1754,7 +1754,7 @@ index 47b27d3..91f1396 100644
BOOLEAN alertable, const LARGE_INTEGER *timeout )
{
select_op_t select_op;
@@ -1125,7 +1162,8 @@ NTSTATUS WINAPI NtWaitForKeyedEvent( HANDLE handle, const void *key,
@@ -1116,7 +1153,8 @@ NTSTATUS WINAPI NtWaitForKeyedEvent( HANDLE handle, const void *key,
/******************************************************************************
* NtReleaseKeyedEvent (NTDLL.@)
*/
@ -1764,7 +1764,7 @@ index 47b27d3..91f1396 100644
BOOLEAN alertable, const LARGE_INTEGER *timeout )
{
select_op_t select_op;
@@ -1152,7 +1190,8 @@ NTSTATUS WINAPI NtReleaseKeyedEvent( HANDLE handle, const void *key,
@@ -1143,7 +1181,8 @@ NTSTATUS WINAPI NtReleaseKeyedEvent( HANDLE handle, const void *key,
* NumberOfConcurrentThreads [I] desired number of concurrent active worker threads
*
*/
@ -1774,7 +1774,7 @@ index 47b27d3..91f1396 100644
POBJECT_ATTRIBUTES attr, ULONG NumberOfConcurrentThreads )
{
NTSTATUS status;
@@ -1193,7 +1232,8 @@ NTSTATUS WINAPI NtCreateIoCompletion( PHANDLE CompletionPort, ACCESS_MASK Desire
@@ -1184,7 +1223,8 @@ NTSTATUS WINAPI NtCreateIoCompletion( PHANDLE CompletionPort, ACCESS_MASK Desire
* Status [I] operation status
* NumberOfBytesTransferred [I] number of bytes transferred
*/
@ -1784,7 +1784,7 @@ index 47b27d3..91f1396 100644
ULONG_PTR CompletionValue, NTSTATUS Status,
SIZE_T NumberOfBytesTransferred )
{
@@ -1229,7 +1269,8 @@ NTSTATUS WINAPI NtSetIoCompletion( HANDLE CompletionPort, ULONG_PTR CompletionKe
@@ -1220,7 +1260,8 @@ NTSTATUS WINAPI NtSetIoCompletion( HANDLE CompletionPort, ULONG_PTR CompletionKe
* WaitTime [I] optional wait time in NTDLL format
*
*/
@ -1794,7 +1794,7 @@ index 47b27d3..91f1396 100644
PULONG_PTR CompletionValue, PIO_STATUS_BLOCK iosb,
PLARGE_INTEGER WaitTime )
{
@@ -1272,7 +1313,8 @@ NTSTATUS WINAPI NtRemoveIoCompletion( HANDLE CompletionPort, PULONG_PTR Completi
@@ -1263,7 +1304,8 @@ NTSTATUS WINAPI NtRemoveIoCompletion( HANDLE CompletionPort, PULONG_PTR Completi
* ObjectAttributes [I] completion object name
*
*/
@ -1804,7 +1804,7 @@ index 47b27d3..91f1396 100644
POBJECT_ATTRIBUTES ObjectAttributes )
{
NTSTATUS status;
@@ -1309,7 +1351,8 @@ NTSTATUS WINAPI NtOpenIoCompletion( PHANDLE CompletionPort, ACCESS_MASK DesiredA
@@ -1300,7 +1342,8 @@ NTSTATUS WINAPI NtOpenIoCompletion( PHANDLE CompletionPort, ACCESS_MASK DesiredA
* RequiredLength [O] required buffer length
*
*/
@ -1815,7 +1815,7 @@ index 47b27d3..91f1396 100644
{
NTSTATUS status;
diff --git a/dlls/ntdll/thread.c b/dlls/ntdll/thread.c
index 1455eb1..8215d5a 100644
index 0b68185..7d9d2d7 100644
--- a/dlls/ntdll/thread.c
+++ b/dlls/ntdll/thread.c
@@ -599,7 +599,8 @@ ULONG WINAPI RtlGetNtGlobalFlags(void)
@ -1898,7 +1898,7 @@ index 1455eb1..8215d5a 100644
{
NTSTATUS ret;
DWORD dummy, i;
@@ -823,7 +831,8 @@ static inline unsigned int get_server_context_flags( DWORD flags )
@@ -825,7 +833,8 @@ static inline unsigned int get_server_context_flags( DWORD flags )
* NtGetContextThread (NTDLL.@)
* ZwGetContextThread (NTDLL.@)
*/
@ -1908,7 +1908,7 @@ index 1455eb1..8215d5a 100644
{
NTSTATUS ret;
DWORD dummy, i;
@@ -912,7 +921,8 @@ NTSTATUS WINAPI NtGetContextThread( HANDLE handle, CONTEXT *context )
@@ -914,7 +923,8 @@ NTSTATUS WINAPI NtGetContextThread( HANDLE handle, CONTEXT *context )
* NtQueryInformationThread (NTDLL.@)
* ZwQueryInformationThread (NTDLL.@)
*/
@ -1918,7 +1918,7 @@ index 1455eb1..8215d5a 100644
void *data, ULONG length, ULONG *ret_len )
{
NTSTATUS status;
@@ -1156,7 +1166,8 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
@@ -1158,7 +1168,8 @@ NTSTATUS WINAPI NtQueryInformationThread( HANDLE handle, THREADINFOCLASS class,
* NtSetInformationThread (NTDLL.@)
* ZwSetInformationThread (NTDLL.@)
*/
@ -1928,7 +1928,7 @@ index 1455eb1..8215d5a 100644
LPCVOID data, ULONG length )
{
NTSTATUS status;
@@ -1315,7 +1326,8 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class,
@@ -1317,7 +1328,8 @@ NTSTATUS WINAPI NtSetInformationThread( HANDLE handle, THREADINFOCLASS class,
* Return the processor, on which the thread is running
*
*/
@ -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 f4ca487..4819a17 100644
index 81a08cd..ca7444e 100644
--- a/dlls/ntdll/virtual.c
+++ b/dlls/ntdll/virtual.c
@@ -1857,7 +1857,8 @@ void virtual_set_large_address_space(void)
@ -2065,7 +2065,7 @@ index f4ca487..4819a17 100644
+NTSTATUS WINAPI SYSCALL(NtOpenSection)( HANDLE *handle, ACCESS_MASK access, const OBJECT_ATTRIBUTES *attr )
{
NTSTATUS ret;
DWORD len = attr->ObjectName->Length;
DWORD len = (attr && attr->ObjectName) ? attr->ObjectName->Length : 0;
@@ -2519,7 +2527,8 @@ NTSTATUS WINAPI NtOpenSection( HANDLE *handle, ACCESS_MASK access, const OBJECT_
* NtMapViewOfSection (NTDLL.@)
* ZwMapViewOfSection (NTDLL.@)
@ -2147,5 +2147,5 @@ index f4ca487..4819a17 100644
struct file_view *view1, *view2;
struct stat st1, st2;
--
2.6.4
2.7.0

View File

@ -51,7 +51,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "7371c44336b46ecc7eeafbc8368790bb60a18bc9"
echo "8b2ba27c860da63c503f5d7dee08e2c9c01efd74"
}
# Show version information
@ -208,6 +208,7 @@ 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_NtQuerySystemInformationEx="$1"
@ -766,6 +767,9 @@ patch_enable ()
ntdll-Loader_Machine_Type)
enable_ntdll_Loader_Machine_Type="$2"
;;
ntdll-NtOpenSection)
enable_ntdll_NtOpenSection="$2"
;;
ntdll-NtQueryEaFile)
enable_ntdll_NtQueryEaFile="$2"
;;
@ -4706,6 +4710,18 @@ 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: