Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 494342c8f911f827783f1aed9717d793c4e6a8c0 Mon Sep 17 00:00:00 2001
From 2f6ec5b1accc1ac275bcb4edeb44c15e271d2f72 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: [PATCH] ntdll: Implement storing DOS attributes in NtCreateFile.
Expand All @@ -9,18 +9,18 @@ Subject: [PATCH] ntdll: Implement storing DOS attributes in NtCreateFile.
2 files changed, 57 insertions(+), 18 deletions(-)

diff --git a/dlls/ntdll/tests/directory.c b/dlls/ntdll/tests/directory.c
index 6a423174664..fccd48f23e5 100644
index 77b17a50037..07211ebf5de 100644
--- a/dlls/ntdll/tests/directory.c
+++ b/dlls/ntdll/tests/directory.c
@@ -55,7 +55,6 @@ static NTSTATUS (WINAPI *pRtlWow64EnableFsRedirectionEx)( ULONG disable, ULONG *
@@ -56,7 +56,6 @@ static NTSTATUS (WINAPI *pRtlWow64EnableFsRedirectionEx)( ULONG disable, ULONG *

/* The attribute sets to test */
static struct testfile_s {
- BOOL todo; /* set if it doesn't work on wine yet */
BOOL attr_done; /* set if attributes were tested for this file already */
const DWORD attr; /* desired attribute */
WCHAR name[20]; /* filename to use */
@@ -63,16 +62,16 @@ static struct testfile_s {
@@ -64,16 +63,16 @@ static struct testfile_s {
const char *description; /* for error messages */
int nfound; /* How many were found (expect 1) */
} testfiles[] = {
Expand All @@ -47,21 +47,21 @@ index 6a423174664..fccd48f23e5 100644
};
static const int test_dir_count = ARRAY_SIZE(testfiles);
static const int max_test_dir_size = ARRAY_SIZE(testfiles) + 5; /* size of above plus some for .. etc */
@@ -162,8 +161,7 @@ static void tally_test_file(FILE_BOTH_DIRECTORY_INFORMATION *dir_info)
@@ -163,8 +162,7 @@ static void tally_test_file(FILE_BOTH_DIRECTORY_INFORMATION *dir_info)
if (namelen != len || memcmp(nameW, testfiles[i].name, len*sizeof(WCHAR)))
continue;
if (!testfiles[i].attr_done) {
- todo_wine_if (testfiles[i].todo)
- ok (attrib == (testfiles[i].attr & attribmask), "file %s: expected %s (%x), got %x (is your linux new enough?)\n", wine_dbgstr_w(testfiles[i].name), testfiles[i].description, testfiles[i].attr, attrib);
+ ok (attrib == (testfiles[i].attr & attribmask), "file %s: expected %s (%x), got %x (is your linux new enough?)\n", wine_dbgstr_w(testfiles[i].name), testfiles[i].description, testfiles[i].attr, attrib);
- ok (attrib == (testfiles[i].attr & attribmask), "file %s: expected %s (%lx), got %lx (is your linux new enough?)\n", wine_dbgstr_w(testfiles[i].name), testfiles[i].description, testfiles[i].attr, attrib);
+ ok (attrib == (testfiles[i].attr & attribmask), "file %s: expected %s (%lx), got %lx (is your linux new enough?)\n", wine_dbgstr_w(testfiles[i].name), testfiles[i].description, testfiles[i].attr, attrib);
testfiles[i].attr_done = TRUE;
}
testfiles[i].nfound++;
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index 9a1bd50c695..9b3735dd917 100644
index cd53ca36238..185db877d55 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -404,6 +404,26 @@ static int xattr_get( const char *path, const char *name, void *value, size_t si
@@ -392,6 +392,26 @@ static int xattr_get( const char *path, const char *name, void *value, size_t si
#endif
}

Expand All @@ -88,7 +88,7 @@ index 9a1bd50c695..9b3735dd917 100644
/* get space from the current directory data buffer, allocating a new one if necessary */
static void *get_dir_data_space( struct dir_data *data, unsigned int size )
{
@@ -3783,6 +3803,20 @@ static NTSTATUS unmount_device( HANDLE handle )
@@ -3786,6 +3806,20 @@ static NTSTATUS unmount_device( HANDLE handle )
return status;
}

Expand All @@ -109,7 +109,7 @@ index 9a1bd50c695..9b3735dd917 100644

/******************************************************************************
* open_unix_file
@@ -3868,13 +3902,14 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
@@ -3871,13 +3905,14 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
status = STATUS_SUCCESS;
}

Expand All @@ -129,7 +129,7 @@ index 9a1bd50c695..9b3735dd917 100644

if (status == STATUS_SUCCESS)
{
@@ -3896,6 +3931,11 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
@@ -3899,6 +3934,11 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
io->Information = FILE_OVERWRITTEN;
break;
}
Expand All @@ -141,7 +141,7 @@ index 9a1bd50c695..9b3735dd917 100644
}
else if (status == STATUS_TOO_MANY_OPENED_FILES)
{
@@ -3904,6 +3944,7 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
@@ -3907,6 +3947,7 @@ NTSTATUS WINAPI NtCreateFile( HANDLE *handle, ACCESS_MASK access, OBJECT_ATTRIBU
}

free( nt_name.Buffer );
Expand All @@ -150,5 +150,5 @@ index 9a1bd50c695..9b3735dd917 100644
}

--
2.30.2
2.35.1

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From d2dce4d7635b20ef76fc4b73594177ab8eae1575 Mon Sep 17 00:00:00 2001
From 6cfa7d9011879898a079614077a605c812cb440e Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 28 Sep 2014 23:39:51 +0200
Subject: [PATCH] ntdll: OutputDebugString should throw the exception a second
Expand All @@ -10,10 +10,10 @@ Subject: [PATCH] ntdll: OutputDebugString should throw the exception a second
2 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/dlls/kernelbase/debug.c b/dlls/kernelbase/debug.c
index 91f36a3e6b3..0a3bf397725 100644
index 9488f2e2399..1cea4b5ba3c 100644
--- a/dlls/kernelbase/debug.c
+++ b/dlls/kernelbase/debug.c
@@ -213,6 +213,23 @@ void WINAPI DECLSPEC_HOTPATCH OutputDebugStringA( LPCSTR str )
@@ -200,6 +200,23 @@ void WINAPI DECLSPEC_HOTPATCH OutputDebugStringA( LPCSTR str )
__ENDTRY
if (caught_by_dbg) return;

Expand All @@ -38,10 +38,10 @@ index 91f36a3e6b3..0a3bf397725 100644
if (!mutex_inited)
{
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
index 202a939b76f..476da44c6ed 100644
index c4413d4d66e..4fe2c2b04db 100644
--- a/dlls/ntdll/tests/exception.c
+++ b/dlls/ntdll/tests/exception.c
@@ -6018,7 +6018,7 @@ static LONG CALLBACK outputdebugstring_vectored_handler(EXCEPTION_POINTERS *Exce
@@ -8327,7 +8327,7 @@ static LONG CALLBACK outputdebugstring_vectored_handler(EXCEPTION_POINTERS *Exce
return EXCEPTION_CONTINUE_SEARCH;
}

Expand All @@ -50,15 +50,15 @@ index 202a939b76f..476da44c6ed 100644
{
PVOID vectored_handler;

@@ -6034,7 +6034,6 @@ static void test_outputdebugstring(DWORD numexc, BOOL todo)
@@ -8343,7 +8343,6 @@ static void test_outputdebugstring(DWORD numexc, BOOL todo)
outputdebugstring_exceptions = 0;
OutputDebugStringA("Hello World");

- todo_wine_if(todo)
ok(outputdebugstring_exceptions == numexc, "OutputDebugStringA generated %d exceptions, expected %d\n",
ok(outputdebugstring_exceptions == numexc, "OutputDebugStringA generated %ld exceptions, expected %ld\n",
outputdebugstring_exceptions, numexc);

@@ -8251,9 +8250,9 @@ START_TEST(exception)
@@ -10660,9 +10659,9 @@ START_TEST(exception)
else skip( "RtlRaiseException not found\n" );
#endif
test_stage = 3;
Expand All @@ -70,7 +70,7 @@ index 202a939b76f..476da44c6ed 100644
test_stage = 5;
test_ripevent(0);
test_stage = 6;
@@ -8349,7 +8348,7 @@ START_TEST(exception)
@@ -10766,7 +10765,7 @@ START_TEST(exception)
test_debugger(DBG_EXCEPTION_HANDLED);
test_debugger(DBG_CONTINUE);
test_thread_context();
Expand All @@ -80,5 +80,5 @@ index 202a939b76f..476da44c6ed 100644
test_breakpoint(1);
test_closehandle(0, (HANDLE)0xdeadbeef);
--
2.29.2
2.35.1

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 9b99e441e86ac54a15dc54802db7c739ae729bb8 Mon Sep 17 00:00:00 2001
From 7ed5fbcd72130a3190e4070185baba8d53a07b3c Mon Sep 17 00:00:00 2001
From: Jianqiu Zhang <zhangjianqiu_133@yeah.net>
Date: Fri, 17 Apr 2015 14:33:41 +0800
Subject: [PATCH] ntdll: Add support for FileFsFullSizeInformation class in
Expand All @@ -10,28 +10,28 @@ Subject: [PATCH] ntdll: Add support for FileFsFullSizeInformation class in
2 files changed, 54 insertions(+), 9 deletions(-)

diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index bff3b18ce83..5dcb7a2729a 100644
index fffe7caa583..fbe5c9deb6e 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -1291,7 +1291,7 @@ static void test_file_full_size_information(void)
@@ -1292,7 +1292,7 @@ static void test_file_full_size_information(void)

/* Assume No Quota Settings configured on Wine Testbot */
res = pNtQueryVolumeInformationFile(h, &io, &ffsi, sizeof ffsi, FileFsFullSizeInformation);
- todo_wine ok(res == STATUS_SUCCESS, "cannot get attributes, res %x\n", res);
+ ok(res == STATUS_SUCCESS, "cannot get attributes, res %x\n", res);
- todo_wine ok(res == STATUS_SUCCESS, "cannot get attributes, res %lx\n", res);
+ ok(res == STATUS_SUCCESS, "cannot get attributes, res %lx\n", res);
res = pNtQueryVolumeInformationFile(h, &io, &fsi, sizeof fsi, FileFsSizeInformation);
ok(res == STATUS_SUCCESS, "cannot get attributes, res %x\n", res);
ok(res == STATUS_SUCCESS, "cannot get attributes, res %lx\n", res);

@@ -1307,8 +1307,6 @@ static void test_file_full_size_information(void)
ok(fsi.BytesPerSector == 512, "[fsi] BytesPerSector expected 512, got %d\n",fsi.BytesPerSector);
ok(fsi.SectorsPerAllocationUnit == 8, "[fsi] SectorsPerAllocationUnit expected 8, got %d\n",fsi.SectorsPerAllocationUnit);
@@ -1308,8 +1308,6 @@ static void test_file_full_size_information(void)
ok(fsi.BytesPerSector == 512, "[fsi] BytesPerSector expected 512, got %ld\n",fsi.BytesPerSector);
ok(fsi.SectorsPerAllocationUnit == 8, "[fsi] SectorsPerAllocationUnit expected 8, got %ld\n",fsi.SectorsPerAllocationUnit);

- todo_wine
- {
ok(ffsi.TotalAllocationUnits.QuadPart > 0,
"[ffsi] TotalAllocationUnits expected positive, got negative value 0x%s\n",
wine_dbgstr_longlong(ffsi.TotalAllocationUnits.QuadPart));
@@ -1326,14 +1324,10 @@ static void test_file_full_size_information(void)
@@ -1327,14 +1325,10 @@ static void test_file_full_size_information(void)
"[ffsi] CallerAvailableAllocationUnits error fsi:0x%s, ffsi: 0x%s\n",
wine_dbgstr_longlong(fsi.AvailableAllocationUnits.QuadPart),
wine_dbgstr_longlong(ffsi.CallerAvailableAllocationUnits.QuadPart));
Expand All @@ -40,17 +40,17 @@ index bff3b18ce83..5dcb7a2729a 100644
/* Assume file system is NTFS */
- todo_wine
- {
ok(ffsi.BytesPerSector == 512, "[ffsi] BytesPerSector expected 512, got %d\n",ffsi.BytesPerSector);
ok(ffsi.SectorsPerAllocationUnit == 8, "[ffsi] SectorsPerAllocationUnit expected 8, got %d\n",ffsi.SectorsPerAllocationUnit);
ok(ffsi.BytesPerSector == 512, "[ffsi] BytesPerSector expected 512, got %ld\n",ffsi.BytesPerSector);
ok(ffsi.SectorsPerAllocationUnit == 8, "[ffsi] SectorsPerAllocationUnit expected 8, got %ld\n",ffsi.SectorsPerAllocationUnit);
- }

CloseHandle( h );
}
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index 5f7ed799c53..d7f91b41324 100644
index 549b0a26240..d0f8be6c309 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -7518,8 +7518,59 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, IO_STATUS_BLOCK *io
@@ -7524,8 +7524,59 @@ NTSTATUS WINAPI NtQueryVolumeInformationFile( HANDLE handle, IO_STATUS_BLOCK *io
break;

case FileFsFullSizeInformation:
Expand Down Expand Up @@ -113,5 +113,5 @@ index 5f7ed799c53..d7f91b41324 100644

case FileFsObjectIdInformation:
--
2.30.2
2.35.1

Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
From b4ff0ed25c0f95d720d7a7ace07f024512d27af2 Mon Sep 17 00:00:00 2001
From ddd05cd2289136f417a8de210aef68a076da8399 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 3 Apr 2017 05:56:19 +0200
Subject: [PATCH] ntdll: Use HashLinks when searching for a dll using the
basename.

---
dlls/ntdll/loader.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
dlls/ntdll/loader.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 272ad323444..f3d39e001c6 100644
index 3e275e8c409..7f4aa8eba06 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -547,10 +547,10 @@ static WINE_MODREF *find_basename_module( LPCWSTR name )
@@ -543,13 +543,13 @@ static WINE_MODREF *find_basename_module( LPCWSTR name )
if (cached_modref && RtlEqualUnicodeString( &name_str, &cached_modref->ldr.BaseDllName, TRUE ))
return cached_modref;

Expand All @@ -24,7 +24,11 @@ index 272ad323444..f3d39e001c6 100644
+ WINE_MODREF *mod = CONTAINING_RECORD(entry, WINE_MODREF, ldr.HashLinks);
if (RtlEqualUnicodeString( &name_str, &mod->ldr.BaseDllName, TRUE ) && !mod->system)
{
cached_modref = CONTAINING_RECORD(mod, WINE_MODREF, ldr);
- cached_modref = CONTAINING_RECORD(mod, WINE_MODREF, ldr);
+ cached_modref = CONTAINING_RECORD(&mod->ldr, WINE_MODREF, ldr);
return cached_modref;
}
}
--
2.33.0
2.35.1

Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ index 5ed116d94d9..35ae5ab854a 100644
- nt_dest.Length = dest_len;
+ if (flags == SYMLINK_FLAG_RELATIVE)
+ {
+ SIZE_T nt_path_len = PATH_MAX, unix_path_len = PATH_MAX;
+ ULONG nt_path_len = PATH_MAX, unix_path_len = PATH_MAX;
+ WCHAR *nt_path;
+
+ /* resolve the NT path of the source */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 96a9115e57cee4a11675d1fff5125155b6b213fb Mon Sep 17 00:00:00 2001
From 1d139a330669c7d650a95c08872e11da8d9d28f6 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@wine-staging.com>
Date: Mon, 3 May 2021 09:28:08 -0600
Subject: ntdll: Add support for creating Unix/Linux symlinks.
Subject: [PATCH] ntdll: Add support for creating Unix/Linux symlinks.

Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
---
Expand All @@ -10,7 +10,7 @@ Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
2 files changed, 65 insertions(+), 8 deletions(-)

diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index 18887895e40..bff3b18ce83 100644
index e4eb36e31b3..6f647ddcca5 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -5390,7 +5390,9 @@ static void test_reparse_points(void)
Expand Down Expand Up @@ -72,10 +72,10 @@ index 18887895e40..bff3b18ce83 100644
/* Cleanup */
pRtlFreeUnicodeString(&nameW);
diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index 752561931ab..0c2117ca801 100644
index 323bf865631..c146fc70639 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -6031,18 +6031,18 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
@@ -6024,18 +6024,18 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
{
BOOL src_allocated = FALSE, path_allocated = FALSE, dest_allocated = FALSE;
BOOL nt_dest_allocated = FALSE, tempdir_created = FALSE;
Expand All @@ -97,7 +97,7 @@ index 752561931ab..0c2117ca801 100644
ULONG flags;
int i;

@@ -6060,6 +6060,12 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
@@ -6053,6 +6053,12 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
dest = &buffer->SymbolicLinkReparseBuffer.PathBuffer[offset];
flags = buffer->SymbolicLinkReparseBuffer.Flags;
break;
Expand All @@ -110,7 +110,7 @@ index 752561931ab..0c2117ca801 100644
default:
FIXME("stub: FSCTL_SET_REPARSE_POINT(%x)\n", buffer->ReparseTag);
return STATUS_NOT_IMPLEMENTED;
@@ -6071,6 +6077,9 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
@@ -6064,6 +6070,9 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
if ((status = server_get_unix_name( handle, &unix_src, FALSE )))
goto cleanup;
src_allocated = TRUE;
Expand All @@ -119,8 +119,8 @@ index 752561931ab..0c2117ca801 100644
+
if (flags == SYMLINK_FLAG_RELATIVE)
{
SIZE_T nt_path_len = PATH_MAX, unix_path_len = PATH_MAX;
@@ -6146,6 +6155,8 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
ULONG nt_path_len = PATH_MAX, unix_path_len = PATH_MAX;
@@ -6139,6 +6148,8 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
if (status != STATUS_SUCCESS && status != STATUS_NO_SUCH_FILE)
goto cleanup;
dest_allocated = TRUE;
Expand All @@ -129,7 +129,7 @@ index 752561931ab..0c2117ca801 100644
/* check that the source and destination paths are the same up to the relative path */
if (flags == SYMLINK_FLAG_RELATIVE)
{
@@ -6161,14 +6172,17 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
@@ -6154,14 +6165,17 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)

/* Encode the reparse tag into the symlink */
strcpy( magic_dest, "" );
Expand All @@ -153,5 +153,5 @@ index 752561931ab..0c2117ca801 100644
/* Encode the type (file or directory) if NT symlink */
if (buffer->ReparseTag == IO_REPARSE_TAG_SYMLINK)
--
2.17.1
2.34.1

71 changes: 71 additions & 0 deletions patches/ntdll-Junction_Points/0040-Fix-warnings.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
From 8c6455d6be0cba8dc98a95726d9d289089c2bf67 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Sat, 5 Mar 2022 11:08:23 +1100
Subject: [PATCH] Fix warnings

These need to be merged into the patches above.

---
dlls/ntdll/unix/file.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/dlls/ntdll/unix/file.c b/dlls/ntdll/unix/file.c
index 787616aa675..ee4f31a1e38 100644
--- a/dlls/ntdll/unix/file.c
+++ b/dlls/ntdll/unix/file.c
@@ -6150,16 +6150,14 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
/* re-resolve the unix path for the source */
for (;;)
{
- UNICODE_STRING nt_path_tmp;
+ OBJECT_ATTRIBUTES attr;
unix_path = malloc( unix_path_len );
if (!unix_path)
{
status = STATUS_NO_MEMORY;
goto cleanup;
}
- nt_path_tmp.Buffer = nt_path;
- nt_path_tmp.Length = wcslen(nt_path) * sizeof(WCHAR);
- status = wine_nt_to_unix_file_name( &nt_path_tmp, unix_path, &unix_path_len, FALSE );
+ status = wine_nt_to_unix_file_name( &attr, unix_path, &unix_path_len, FILE_OPEN_IF );
if (status != STATUS_BUFFER_TOO_SMALL) break;
free( unix_path );
}
@@ -6182,13 +6180,15 @@ NTSTATUS create_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer)
/* resolve the NT path of the destination */
for (;;)
{
+ OBJECT_ATTRIBUTES attr;
+ ULONG len = unix_dest_len;
unix_dest = malloc( unix_dest_len );
if (!unix_dest)
{
status = STATUS_NO_MEMORY;
goto cleanup;
}
- status = wine_nt_to_unix_file_name( &nt_dest, unix_dest, &unix_dest_len, FILE_WINE_PATH );
+ status = wine_nt_to_unix_file_name( &attr, unix_dest, &len, FILE_WINE_PATH );
if (status != STATUS_BUFFER_TOO_SMALL) break;
free( unix_dest );
}
@@ -6447,13 +6447,15 @@ NTSTATUS get_reparse_point(HANDLE handle, REPARSE_DATA_BUFFER *buffer, ULONG *si
/* resolve the NT path */
for (;;)
{
+ ULONG len;
nt_dest = malloc( nt_dest_len * sizeof(WCHAR) );
if (!nt_dest)
{
status = STATUS_NO_MEMORY;
goto cleanup;
}
- status = wine_unix_to_nt_file_name( unix_dest, nt_dest, &nt_dest_len );
+ status = wine_unix_to_nt_file_name( unix_dest, nt_dest, &len );
+ nt_dest_len = len;
if (status != STATUS_BUFFER_TOO_SMALL) break;
free( nt_dest );
}
--
2.34.1

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From f444edc19e67ef0a903728804f50e13ccbfac16e Mon Sep 17 00:00:00 2001
From 82663e728099ca8f0127dcdf8d62d551eda6902c Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Thu, 28 Apr 2016 18:14:36 +0800
Subject: [PATCH] ntdll: Implement NtSetLdtEntries.
Expand All @@ -9,18 +9,18 @@ Subject: [PATCH] ntdll: Implement NtSetLdtEntries.
2 files changed, 80 insertions(+), 1 deletion(-)

diff --git a/dlls/kernel32/tests/thread.c b/dlls/kernel32/tests/thread.c
index a9869863b44..2c2a0fda843 100644
index 3cf58d928ae..78f9bbeb493 100644
--- a/dlls/kernel32/tests/thread.c
+++ b/dlls/kernel32/tests/thread.c
@@ -99,6 +99,7 @@ static BOOL (WINAPI *pSetThreadGroupAffinity)(HANDLE,const GROUP_AFFINITY*,GROUP
static NTSTATUS (WINAPI *pNtSetInformationThread)(HANDLE,THREADINFOCLASS,LPCVOID,ULONG);
static HRESULT (WINAPI *pSetThreadDescription)(HANDLE,const WCHAR *);
@@ -102,6 +102,7 @@ static HRESULT (WINAPI *pSetThreadDescription)(HANDLE,const WCHAR *);
static HRESULT (WINAPI *pGetThreadDescription)(HANDLE,WCHAR **);
static PVOID (WINAPI *pRtlAddVectoredExceptionHandler)(ULONG,PVECTORED_EXCEPTION_HANDLER);
static ULONG (WINAPI *pRtlRemoveVectoredExceptionHandler)(PVOID);
+static NTSTATUS (WINAPI *pNtSetLdtEntries)(ULONG,ULONG,ULONG,ULONG,ULONG,ULONG);

static HANDLE create_target_process(const char *arg)
{
@@ -1278,6 +1279,82 @@ static void test_GetThreadSelectorEntry(void)
@@ -1299,6 +1300,82 @@ static void test_GetThreadSelectorEntry(void)
ok(entry.HighWord.Bits.Granularity == 1, "expected 1, got %u\n", entry.HighWord.Bits.Granularity);
}

Expand Down Expand Up @@ -103,15 +103,15 @@ index a9869863b44..2c2a0fda843 100644
#endif /* __i386__ */

static HANDLE finish_event;
@@ -2340,6 +2417,7 @@ static void init_funcs(void)
X(NtQueryInformationThread);
X(RtlGetThreadErrorMode);
@@ -2617,6 +2694,7 @@ static void init_funcs(void)
X(NtSetInformationThread);
X(RtlAddVectoredExceptionHandler);
X(RtlRemoveVectoredExceptionHandler);
+ X(NtSetLdtEntries);
}
#undef X
}
@@ -2396,6 +2474,7 @@ START_TEST(thread)
@@ -2673,6 +2751,7 @@ START_TEST(thread)
test_SetThreadContext();
test_GetThreadSelectorEntry();
test_GetThreadContext();
Expand All @@ -120,10 +120,10 @@ index a9869863b44..2c2a0fda843 100644
test_QueueUserWorkItem();
test_RegisterWaitForSingleObject();
diff --git a/dlls/ntdll/unix/signal_i386.c b/dlls/ntdll/unix/signal_i386.c
index 320ffa68407..a52490a096b 100644
index f8d8dd9bf28..194e9c3f3e6 100644
--- a/dlls/ntdll/unix/signal_i386.c
+++ b/dlls/ntdll/unix/signal_i386.c
@@ -480,7 +480,7 @@ NTSTATUS CDECL get_thread_ldt_entry( HANDLE handle, void *data, ULONG len, ULONG
@@ -2207,7 +2207,7 @@ NTSTATUS get_thread_ldt_entry( HANDLE handle, void *data, ULONG len, ULONG *ret_
if (reply->flags)
info->Entry = ldt_make_entry( (void *)reply->base, reply->limit, reply->flags );
else
Expand All @@ -133,5 +133,5 @@ index 320ffa68407..a52490a096b 100644
}
SERVER_END_REQ;
--
2.26.2
2.34.1

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 62e3109b6bd1b3324827063531ae0826571c751b Mon Sep 17 00:00:00 2001
From 109ef0c4769a50904accb044a5d569af8261e305 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 17 Jan 2016 00:50:50 +0100
Subject: [PATCH] ntdll/tests: Add basic tests for RtlQueryPackageIdentity.
Expand All @@ -9,19 +9,18 @@ Subject: [PATCH] ntdll/tests: Add basic tests for RtlQueryPackageIdentity.
2 files changed, 81 insertions(+), 1 deletion(-)

diff --git a/dlls/ntdll/tests/Makefile.in b/dlls/ntdll/tests/Makefile.in
index 7e0272498fa..a2c716d11d4 100644
index 90deb5865f8..428ebde23b3 100644
--- a/dlls/ntdll/tests/Makefile.in
+++ b/dlls/ntdll/tests/Makefile.in
@@ -1,6 +1,6 @@
EXTRADEFS = -DWINE_NO_LONG_TYPES
@@ -1,5 +1,5 @@
TESTDLL = ntdll.dll
-IMPORTS = user32 advapi32
+IMPORTS = user32 ole32 advapi32

C_SRCS = \
atom.c \
diff --git a/dlls/ntdll/tests/rtl.c b/dlls/ntdll/tests/rtl.c
index c0168884a0a..c25a9185fad 100644
index aeae4e8adf3..52b06d33b54 100644
--- a/dlls/ntdll/tests/rtl.c
+++ b/dlls/ntdll/tests/rtl.c
@@ -27,6 +27,9 @@
Expand Down Expand Up @@ -140,5 +139,5 @@ index c0168884a0a..c25a9185fad 100644
test_LdrRegisterDllNotification();
test_DbgPrint();
--
2.34.1
2.35.1

Original file line number Diff line number Diff line change
@@ -1,125 +1,116 @@
From aea7dcfb0b09794b4925c5e8f0ca2a28b783e8f1 Mon Sep 17 00:00:00 2001
From ada6b6d8363f2eeac8d8ed99d50f61610b047efe Mon Sep 17 00:00:00 2001
From: Andrew Wesie <awesie@gmail.com>
Date: Mon, 27 Apr 2020 15:32:22 +0300
Subject: [PATCH] kernel32/tests, psapi/tests: Update tests.

---
dlls/kernel32/tests/virtual.c | 19 ++-----------------
dlls/psapi/tests/psapi_main.c | 5 +++++
2 files changed, 7 insertions(+), 17 deletions(-)
dlls/psapi/tests/psapi_main.c | 3 +++
2 files changed, 5 insertions(+), 17 deletions(-)

diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c
index f576d132d8b..70824d771ed 100644
index 365194b9065..8055e93faa0 100644
--- a/dlls/kernel32/tests/virtual.c
+++ b/dlls/kernel32/tests/virtual.c
@@ -3572,9 +3572,7 @@ static void test_CreateFileMapping_protection(void)
@@ -3604,9 +3604,7 @@ static void test_CreateFileMapping_protection(void)
SetLastError(0xdeadbeef);
ret = VirtualQuery(base, &info, sizeof(info));
ok(ret, "VirtualQuery failed %d\n", GetLastError());
ok(ret, "VirtualQuery failed %ld\n", GetLastError());
- /* FIXME: remove the condition below once Wine is fixed */
- todo_wine_if (td[i].prot == PAGE_WRITECOPY || td[i].prot == PAGE_EXECUTE_WRITECOPY)
- ok(info.Protect == td[i].prot_after_write, "%d: got %#x != expected %#x\n", i, info.Protect, td[i].prot_after_write);
+ ok(info.Protect == td[i].prot_after_write, "%d: got %#x != expected %#x\n", i, info.Protect, td[i].prot_after_write);
- ok(info.Protect == td[i].prot_after_write, "%ld: got %#lx != expected %#lx\n", i, info.Protect, td[i].prot_after_write);
+ ok(info.Protect == td[i].prot_after_write, "%ld: got %#lx != expected %#lx\n", i, info.Protect, td[i].prot_after_write);
}
}
else
@@ -3588,9 +3586,7 @@ static void test_CreateFileMapping_protection(void)
@@ -3620,9 +3618,7 @@ static void test_CreateFileMapping_protection(void)
SetLastError(0xdeadbeef);
ret = VirtualProtect(base, si.dwPageSize, PAGE_NOACCESS, &old_prot);
ok(ret, "%d: VirtualProtect error %d\n", i, GetLastError());
ok(ret, "%ld: VirtualProtect error %ld\n", i, GetLastError());
- /* FIXME: remove the condition below once Wine is fixed */
- todo_wine_if (td[i].prot == PAGE_WRITECOPY || td[i].prot == PAGE_EXECUTE_WRITECOPY)
- ok(old_prot == td[i].prot_after_write, "%d: got %#x != expected %#x\n", i, old_prot, td[i].prot_after_write);
+ ok(old_prot == td[i].prot_after_write, "%d: got %#x != expected %#x\n", i, old_prot, td[i].prot_after_write);
- ok(old_prot == td[i].prot_after_write, "%ld: got %#lx != expected %#lx\n", i, old_prot, td[i].prot_after_write);
+ ok(old_prot == td[i].prot_after_write, "%ld: got %#lx != expected %#lx\n", i, old_prot, td[i].prot_after_write);

UnmapViewOfFile(base);
}
@@ -3943,15 +3939,12 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly )
@@ -3975,15 +3971,12 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly )
continue;
}

- todo_wine_if(readonly && page_prot[k] == PAGE_WRITECOPY && view[j].prot != PAGE_WRITECOPY)
ok(ret, "VirtualProtect error %d, map %#x, view %#x, requested prot %#x\n", GetLastError(), page_prot[i], view[j].prot, page_prot[k]);
ok(ret, "VirtualProtect error %ld, map %#lx, view %#lx, requested prot %#lx\n", GetLastError(), page_prot[i], view[j].prot, page_prot[k]);
- todo_wine_if(readonly && page_prot[k] == PAGE_WRITECOPY && view[j].prot != PAGE_WRITECOPY)
ok(old_prot == prev_prot, "got %#x, expected %#x\n", old_prot, prev_prot);
ok(old_prot == prev_prot, "got %#lx, expected %#lx\n", old_prot, prev_prot);
prev_prot = actual_prot;

ret = VirtualQuery(base, &info, sizeof(info));
ok(ret, "%d: VirtualQuery failed %d\n", j, GetLastError());
ok(ret, "%ld: VirtualQuery failed %ld\n", j, GetLastError());
- todo_wine_if(readonly && page_prot[k] == PAGE_WRITECOPY && view[j].prot != PAGE_WRITECOPY)
ok(info.Protect == actual_prot,
"VirtualProtect wrong prot, map %#x, view %#x, requested prot %#x got %#x\n",
"VirtualProtect wrong prot, map %#lx, view %#lx, requested prot %#lx got %#lx\n",
page_prot[i], view[j].prot, page_prot[k], info.Protect );
@@ -4006,15 +3999,12 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly )
@@ -4038,15 +4031,12 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly )
if (!anon_mapping && is_compatible_protection(alloc_prot, PAGE_WRITECOPY))
{
ret = VirtualProtect(base, sec_flags & SEC_IMAGE ? si.dwPageSize : 2*si.dwPageSize, PAGE_WRITECOPY, &old_prot);
- todo_wine_if(readonly && view[j].prot != PAGE_WRITECOPY)
ok(ret, "VirtualProtect error %d, map %#x, view %#x\n", GetLastError(), page_prot[i], view[j].prot);
ok(ret, "VirtualProtect error %ld, map %#lx, view %#lx\n", GetLastError(), page_prot[i], view[j].prot);
if (ret) *(DWORD*)base = 0xdeadbeef;
ret = VirtualQuery(base, &info, sizeof(info));
ok(ret, "%d: VirtualQuery failed %d\n", j, GetLastError());
ok(ret, "%ld: VirtualQuery failed %ld\n", j, GetLastError());
- todo_wine
ok(info.Protect == PAGE_READWRITE, "VirtualProtect wrong prot, map %#x, view %#x got %#x\n",
ok(info.Protect == PAGE_READWRITE, "VirtualProtect wrong prot, map %#lx, view %#lx got %#lx\n",
page_prot[i], view[j].prot, info.Protect );
- todo_wine_if (!(sec_flags & SEC_IMAGE))
ok(info.RegionSize == si.dwPageSize, "wrong region size %#lx after write, map %#x, view %#x got %#x\n",
ok(info.RegionSize == si.dwPageSize, "wrong region size %#Ix after write, map %#lx, view %#lx got %#lx\n",
info.RegionSize, page_prot[i], view[j].prot, info.Protect );

@@ -4025,7 +4015,6 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly )
@@ -4057,7 +4047,6 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly )
{
ret = VirtualQuery((char*)base + si.dwPageSize, &info, sizeof(info));
ok(ret, "%d: VirtualQuery failed %d\n", j, GetLastError());
ok(ret, "%ld: VirtualQuery failed %ld\n", j, GetLastError());
- todo_wine_if(readonly && view[j].prot != PAGE_WRITECOPY)
ok(info.Protect == PAGE_WRITECOPY, "wrong prot, map %#x, view %#x got %#x\n",
ok(info.Protect == PAGE_WRITECOPY, "wrong prot, map %#lx, view %#lx got %#lx\n",
page_prot[i], view[j].prot, info.Protect);
}
@@ -4045,14 +4034,11 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly )
@@ -4077,14 +4066,11 @@ static void test_mapping( HANDLE hfile, DWORD sec_flags, BOOL readonly )
continue;
}

- todo_wine_if(readonly && page_prot[k] == PAGE_WRITECOPY && view[j].prot != PAGE_WRITECOPY)
ok(ret, "VirtualProtect error %d, map %#x, view %#x, requested prot %#x\n", GetLastError(), page_prot[i], view[j].prot, page_prot[k]);
ok(ret, "VirtualProtect error %ld, map %#lx, view %#lx, requested prot %#lx\n", GetLastError(), page_prot[i], view[j].prot, page_prot[k]);
- todo_wine_if(readonly && page_prot[k] == PAGE_WRITECOPY && view[j].prot != PAGE_WRITECOPY)
ok(old_prot == prev_prot, "got %#x, expected %#x\n", old_prot, prev_prot);
ok(old_prot == prev_prot, "got %#lx, expected %#lx\n", old_prot, prev_prot);

ret = VirtualQuery(base, &info, sizeof(info));
ok(ret, "%d: VirtualQuery failed %d\n", j, GetLastError());
ok(ret, "%ld: VirtualQuery failed %ld\n", j, GetLastError());
- todo_wine_if( map_prot_written( page_prot[k] ) != actual_prot )
ok(info.Protect == map_prot_written( page_prot[k] ),
"VirtualProtect wrong prot, map %#x, view %#x, requested prot %#x got %#x\n",
"VirtualProtect wrong prot, map %#lx, view %#lx, requested prot %#lx got %#lx\n",
page_prot[i], view[j].prot, page_prot[k], info.Protect );
@@ -4093,7 +4079,6 @@ static void test_mappings(void)
@@ -4125,7 +4111,6 @@ static void test_mappings(void)
SetFilePointer(hfile, 0, NULL, FILE_BEGIN);
ok(ReadFile(hfile, &data, sizeof(data), &num_bytes, NULL), "ReadFile failed\n");
ok(num_bytes == sizeof(data), "num_bytes = %d\n", num_bytes);
ok(num_bytes == sizeof(data), "num_bytes = %ld\n", num_bytes);
- todo_wine
ok(!data, "data = %x\n", data);
ok(!data, "data = %lx\n", data);

CloseHandle( hfile );
diff --git a/dlls/psapi/tests/psapi_main.c b/dlls/psapi/tests/psapi_main.c
index c92423ee193..d85099455aa 100644
index 185a4062092..1721968395d 100644
--- a/dlls/psapi/tests/psapi_main.c
+++ b/dlls/psapi/tests/psapi_main.c
@@ -830,6 +830,8 @@ static void test_QueryWorkingSetEx(void)
DWORD prot;
BOOL ret;

+ static char tmp_data[0x2000] = { 0x41 };
+
if (pQueryWorkingSetEx == NULL)
{
win_skip("QueryWorkingSetEx not found, skipping tests\n");
@@ -848,6 +850,9 @@ static void test_QueryWorkingSetEx(void)
@@ -821,6 +821,9 @@ static void test_QueryWorkingSetEx(void)
check_QueryWorkingSetEx(addr, "exe,readonly1", 0, 0, 1, TRUE);

*(volatile char *)addr;
+ check_QueryWorkingSetEx(addr, "exe,readonly2", 1, PAGE_READONLY, 1, FALSE);
+
+ ret = VirtualProtect(addr, 0x1000, PAGE_EXECUTE_READWRITE, &prot);
ok(ret, "VirtualProtect failed with %d\n", GetLastError());
ok(ret, "VirtualProtect failed with %ld\n", GetLastError());
check_QueryWorkingSetEx(addr, "exe,readonly2", 1, PAGE_READONLY, 1, FALSE);

--
2.27.0
2.35.1

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 31cfae4fcd5b142a4d1b70ad33159c3bddd42181 Mon Sep 17 00:00:00 2001
From 1fbb361023f9474a3522762aae32ad64d056e37e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gabriel=20Iv=C4=83ncescu?= <gabrielopcode@gmail.com>
Date: Fri, 24 May 2019 15:09:35 +0300
Subject: [PATCH] ntdll/server: Mark drive_c as case-insensitive when created
Expand All @@ -9,27 +9,25 @@ Content-Transfer-Encoding: 8bit
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47099
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
---
dlls/ntdll/unix/server.c | 45 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
dlls/ntdll/unix/server.c | 43 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)

diff --git a/dlls/ntdll/unix/server.c b/dlls/ntdll/unix/server.c
index 0952b54f4ef..f998ce35dd0 100644
index ab9d99c4f47..f40897757e3 100644
--- a/dlls/ntdll/unix/server.c
+++ b/dlls/ntdll/unix/server.c
@@ -49,6 +49,12 @@
@@ -49,6 +49,10 @@
#ifdef HAVE_SYS_UN_H
#include <sys/un.h>
#endif
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+#ifdef HAVE_LINUX_IOCTL_H
+#include <linux/ioctl.h>
+#endif
#ifdef HAVE_SYS_PRCTL_H
# include <sys/prctl.h>
#endif
@@ -83,6 +89,22 @@
@@ -83,6 +87,22 @@

WINE_DEFAULT_DEBUG_CHANNEL(server);

Expand All @@ -52,7 +50,7 @@ index 0952b54f4ef..f998ce35dd0 100644
#ifndef MSG_CMSG_CLOEXEC
#define MSG_CMSG_CLOEXEC 0
#endif
@@ -1140,6 +1162,28 @@ static const char *init_server_dir( dev_t dev, ino_t ino )
@@ -1137,6 +1157,28 @@ static const char *init_server_dir( dev_t dev, ino_t ino )
}


Expand Down Expand Up @@ -81,7 +79,7 @@ index 0952b54f4ef..f998ce35dd0 100644
/***********************************************************************
* setup_config_dir
*
@@ -1176,6 +1220,7 @@ static int setup_config_dir(void)
@@ -1173,6 +1215,7 @@ static int setup_config_dir(void)
if (!mkdir( "dosdevices", 0777 ))
{
mkdir( "drive_c", 0777 );
Expand All @@ -90,5 +88,5 @@ index 0952b54f4ef..f998ce35dd0 100644
symlink( "/", "dosdevices/z:" );
}
--
2.33.0
2.34.1

Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ index 00000000000..664bdf84f51
+{
+ struct list *ptr;
+
+ TRACE("(%d)\n", reason);
+ TRACE("(%u)\n", reason);
+
+ if (reason != DLL_THREAD_DETACH)
+ return;
Expand Down Expand Up @@ -2665,7 +2665,7 @@ index f89ebc9d3e2..623c9f3c87a 100644

BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
{
+ TRACE("(%p, %u, %p)\n", instance, reason, reserved);
+ TRACE("(%p, %lx, %p)\n", instance, reason, reserved);
+
switch (reason)
{
Expand Down Expand Up @@ -3324,7 +3324,7 @@ index 00000000000..fc8f300a28b
+static void CDECL tls_callback_test(DWORD reason, void *data)
+{
+ struct tls_test_data *test_data = data;
+ trace("reason: %d, data: %p\n", reason, data);
+ trace("reason: %ld, data: %p\n", reason, data);
+
+ test_data->count++;
+ test_data->reason = reason;
Expand Down Expand Up @@ -3378,12 +3378,12 @@ index 00000000000..fc8f300a28b
+ res = iface->Set(&handle, &tls_callback_test, &test_data);
+ ok(!res, "Failed to set TLS callback, got error %d\n", res);
+ thread = CreateThread(NULL, 0, test_thread, &test_data, 0, &threadid);
+ ok(thread != NULL, "Failed to create Thread, error: %d\n", GetLastError());
+ ok(thread != NULL, "Failed to create Thread, error: %ld\n", GetLastError());
+ thread_res = WaitForSingleObject(thread, 2000);
+ ok(thread_res == WAIT_OBJECT_0, "Waiting for thread failed: %d\n", thread_res);
+ ok(thread_res == WAIT_OBJECT_0, "Waiting for thread failed: %ld\n", thread_res);
+ ok(test_data.count == 1, "Expected 1 callback execution, got %d\n", test_data.count);
+ ok(test_data.reason == 0, "Expected reason 0, got %d\n", test_data.reason);
+ ok(test_data.threadid == threadid, "Expected thread id %d, got %d\n", threadid, test_data.threadid);
+ ok(test_data.reason == 0, "Expected reason 0, got %lu\n", test_data.reason);
+ ok(test_data.threadid == threadid, "Expected thread id %lu, got %lu\n", threadid, test_data.threadid);
+ res = iface->Remove(handle, NULL);
+ ok(!res, "Failed to remove TLS callback, got error %d\n", res);
+
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
From e08627884ed59ebbac09a1182428718ed0ec1cbe Mon Sep 17 00:00:00 2001
From 265cfe21ee2412df0e31ea19717c0f5469feeb30 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 9 Jan 2015 04:39:49 +0100
Subject: nvcuda: Implement new functions added in CUDA 6.5.
Subject: [PATCH] nvcuda: Implement new functions added in CUDA 6.5.

---
dlls/nvcuda/nvcuda.c | 113 ++++++++++++++++++++++++++++++++++++++++++++++++
dlls/nvcuda/nvcuda.spec | 11 +++++
dlls/nvcuda/nvcuda.c | 113 ++++++++++++++++++++++++++++++++++++++++
dlls/nvcuda/nvcuda.spec | 11 ++++
include/cuda.h | 1 +
3 files changed, 125 insertions(+)

diff --git a/dlls/nvcuda/nvcuda.c b/dlls/nvcuda/nvcuda.c
index 3ef7c35..3118c49 100644
index c76ec2b6a48..e5675db863e 100644
--- a/dlls/nvcuda/nvcuda.c
+++ b/dlls/nvcuda/nvcuda.c
@@ -293,6 +293,20 @@ static CUresult (*pcuTexRefSetMipmapLevelBias)(CUtexref hTexRef, float bias);
@@ -292,6 +292,20 @@ static CUresult (*pcuTexRefSetMipmapLevelBias)(CUtexref hTexRef, float bias);
static CUresult (*pcuTexRefSetMipmapLevelClamp)(CUtexref hTexRef, float minMipmapLevelClamp, float maxMipmapLevelClamp);
static CUresult (*pcuTexRefSetMipmappedArray)(CUtexref hTexRef, CUmipmappedArray hMipmappedArray, unsigned int Flags);

Expand All @@ -34,15 +34,15 @@ index 3ef7c35..3118c49 100644
static void *cuda_handle = NULL;

static BOOL load_functions(void)
@@ -306,6 +320,7 @@ static BOOL load_functions(void)
@@ -305,6 +319,7 @@ static BOOL load_functions(void)
}

#define LOAD_FUNCPTR(f) if((p##f = dlsym(cuda_handle, #f)) == NULL){FIXME("Can't find symbol %s\n", #f); return FALSE;}
+ #define TRY_LOAD_FUNCPTR(f) p##f = dlsym(cuda_handle, #f)

LOAD_FUNCPTR(cuArray3DCreate);
LOAD_FUNCPTR(cuArray3DCreate_v2);
@@ -554,7 +569,18 @@ static BOOL load_functions(void)
@@ -553,7 +568,18 @@ static BOOL load_functions(void)
LOAD_FUNCPTR(cuTexRefSetMipmapLevelClamp);
LOAD_FUNCPTR(cuTexRefSetMipmappedArray);

Expand All @@ -61,7 +61,7 @@ index 3ef7c35..3118c49 100644

return TRUE;
}
@@ -2101,6 +2127,93 @@ CUresult WINAPI wine_cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArra
@@ -2100,6 +2126,93 @@ CUresult WINAPI wine_cuTexRefSetMipmappedArray(CUtexref hTexRef, CUmipmappedArra
return pcuTexRefSetMipmappedArray(hTexRef, hMipmappedArray, Flags);
}

Expand Down Expand Up @@ -154,9 +154,9 @@ index 3ef7c35..3118c49 100644
+
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
{
TRACE("(%p, %u, %p)\n", instance, reason, reserved);
TRACE("(%p, %lx, %p)\n", instance, reason, reserved);
diff --git a/dlls/nvcuda/nvcuda.spec b/dlls/nvcuda/nvcuda.spec
index 621b8d5..c23faa4 100644
index 621b8d59cf0..c23faa42d0d 100644
--- a/dlls/nvcuda/nvcuda.spec
+++ b/dlls/nvcuda/nvcuda.spec
@@ -306,3 +306,14 @@
Expand All @@ -175,7 +175,7 @@ index 621b8d5..c23faa4 100644
+@ stub cuOccupancyMaxPotentialBlockSize
+#@ stdcall cuOccupancyMaxPotentialBlockSize(ptr ptr ptr ptr long long) wine_cuOccupancyMaxPotentialBlockSize
diff --git a/include/cuda.h b/include/cuda.h
index 1f20f5b..0f7b11d 100644
index 1f20f5b94c7..0f7b11d823d 100644
--- a/include/cuda.h
+++ b/include/cuda.h
@@ -22,6 +22,7 @@
Expand All @@ -187,5 +187,5 @@ index 1f20f5b..0f7b11d 100644

#define CU_IPC_HANDLE_SIZE 64
--
2.2.1
2.34.1

Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
From fec925b4517cc16ac478927a361a3260a917a898 Mon Sep 17 00:00:00 2001
From 9580c958e616d6d0254e38697d8fd9034d351228 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 3 Jan 2015 00:25:08 +0100
Subject: nvcuda: Emulate two d3d9 initialization functions.
Subject: [PATCH] nvcuda: Emulate two d3d9 initialization functions.

---
dlls/nvcuda/nvcuda.c | 30 ++++++++++++++++++++++++++++++
dlls/nvcuda/nvcuda.spec | 4 ++--
2 files changed, 32 insertions(+), 2 deletions(-)

diff --git a/dlls/nvcuda/nvcuda.c b/dlls/nvcuda/nvcuda.c
index bd39547..826c30b 100644
index e5675db863e..b330e06fc2b 100644
--- a/dlls/nvcuda/nvcuda.c
+++ b/dlls/nvcuda/nvcuda.c
@@ -29,6 +29,7 @@
@@ -28,6 +28,7 @@
#include "wine/wgl.h"
#include "cuda.h"
#include "nvcuda.h"
+#include "d3d9.h"

#if defined(__x86_64) || defined(AMD64) || defined(_M_AMD64)
#define DEV_PTR "%llu"
@@ -2214,6 +2215,35 @@ CUresult WINAPI wine_cuOccupancyMaxPotentialBlockSize(int *minGridSize, int *blo
@@ -2213,6 +2214,35 @@ CUresult WINAPI wine_cuOccupancyMaxPotentialBlockSize(int *minGridSize, int *blo
}
*/

Expand Down Expand Up @@ -55,9 +55,9 @@ index bd39547..826c30b 100644
+
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
{
TRACE("(%p, %u, %p)\n", instance, reason, reserved);
TRACE("(%p, %lx, %p)\n", instance, reason, reserved);
diff --git a/dlls/nvcuda/nvcuda.spec b/dlls/nvcuda/nvcuda.spec
index c23faa4..5ca921e 100644
index c23faa42d0d..5ca921e0ffc 100644
--- a/dlls/nvcuda/nvcuda.spec
+++ b/dlls/nvcuda/nvcuda.spec
@@ -58,11 +58,11 @@
Expand All @@ -75,5 +75,5 @@ index c23faa4..5ca921e 100644
@ stub cuD3D9GetDirect3DDevice
@ stub cuD3D9MapResources
--
2.2.1
2.34.1

Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
From 522bff38d261a682e25ad42d36cbc4dff19e7275 Mon Sep 17 00:00:00 2001
From 9efc33cbd22c1d7778cc6d2f311a63dabe83f965 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 2 Oct 2017 05:27:55 +0200
Subject: nvcuda: Add semi stub for cuD3D10GetDevice.
Subject: [PATCH] nvcuda: Add semi stub for cuD3D10GetDevice.

---
dlls/nvcuda/nvcuda.c | 8 ++++++++
dlls/nvcuda/nvcuda.spec | 2 +-
2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/dlls/nvcuda/nvcuda.c b/dlls/nvcuda/nvcuda.c
index 99fcacf561e..219567abe1f 100644
index 421d2e1bc7a..fcffd94f1b4 100644
--- a/dlls/nvcuda/nvcuda.c
+++ b/dlls/nvcuda/nvcuda.c
@@ -37,6 +37,7 @@
@@ -36,6 +36,7 @@
#include "cuda.h"
#include "nvcuda.h"
#include "d3d9.h"
+#include "dxgi.h"

#if defined(__x86_64) || defined(AMD64) || defined(_M_AMD64)
#define DEV_PTR "%llu"
@@ -2958,6 +2959,13 @@ CUresult WINAPI wine_cuD3D9GetDevice(CUdevice *pCudaDevice, const char *pszAdapt
@@ -2933,6 +2934,13 @@ CUresult WINAPI wine_cuD3D9GetDevice(CUdevice *pCudaDevice, const char *pszAdapt
return pcuDeviceGet(pCudaDevice, 0);
}

Expand All @@ -33,7 +33,7 @@ index 99fcacf561e..219567abe1f 100644
+
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
{
TRACE("(%p, %u, %p)\n", instance, reason, reserved);
TRACE("(%p, %lx, %p)\n", instance, reason, reserved);
diff --git a/dlls/nvcuda/nvcuda.spec b/dlls/nvcuda/nvcuda.spec
index 492d6c129c1..4a06881f0b5 100644
--- a/dlls/nvcuda/nvcuda.spec
Expand All @@ -48,5 +48,5 @@ index 492d6c129c1..4a06881f0b5 100644
@ stub cuD3D10GetDirect3DDevice
@ stub cuD3D10MapResources
--
2.14.1
2.34.1

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 807f2b26083148f194dbc90887174a0f70921d88 Mon Sep 17 00:00:00 2001
From a117c35a7ee0a6a786d2fe0f8cbf0cebbf9f5ebe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sveinar=20S=C3=B8pler?= <cybermax@dexter.no>
Date: Mon, 26 Jul 2021 14:59:18 +0200
Subject: [PATCH] nvcuda Add semi-stub for cuD3D11GetDevice and
Expand All @@ -13,7 +13,7 @@ Requires: Tested with nVidia PhysX 9.19
2 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/dlls/nvcuda/nvcuda.c b/dlls/nvcuda/nvcuda.c
index 1ffcb341518..184784c7004 100644
index fcffd94f1b4..633c38b206b 100644
--- a/dlls/nvcuda/nvcuda.c
+++ b/dlls/nvcuda/nvcuda.c
@@ -37,6 +37,7 @@
Expand Down Expand Up @@ -48,7 +48,7 @@ index 1ffcb341518..184784c7004 100644
+
BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved)
{
TRACE("(%p, %u, %p)\n", instance, reason, reserved);
TRACE("(%p, %lx, %p)\n", instance, reason, reserved);
diff --git a/dlls/nvcuda/nvcuda.spec b/dlls/nvcuda/nvcuda.spec
index 4a06881f0b5..70bcc6db833 100644
--- a/dlls/nvcuda/nvcuda.spec
Expand All @@ -72,5 +72,5 @@ index 4a06881f0b5..70bcc6db833 100644
@ stdcall cuGraphicsGLRegisterBuffer(ptr long long) wine_cuGraphicsGLRegisterBuffer
@ stdcall cuGraphicsGLRegisterImage(ptr long long long) wine_cuGraphicsGLRegisterImage
--
2.30.2
2.34.1

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 209317c803637eda7411ec3094dfb3cfa3ada93a Mon Sep 17 00:00:00 2001
From a9c768a74e8ecbe857dfb851e35c62d5447f8d10 Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Tue, 24 Nov 2015 17:22:02 +0800
Subject: [PATCH] oleaut32: Implement a better stub for IPicture::SaveAsFile.
Expand All @@ -12,10 +12,10 @@ For bug 8532.
2 files changed, 79 insertions(+), 22 deletions(-)

diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c
index a3bbdc52a0f..ad4aff2aecc 100644
index bbc5e2aa9c8..0410d2b3cad 100644
--- a/dlls/oleaut32/olepicture.c
+++ b/dlls/oleaut32/olepicture.c
@@ -859,19 +859,6 @@ static HRESULT WINAPI OLEPictureImpl_PictureChanged(IPicture *iface)
@@ -832,19 +832,6 @@ static HRESULT WINAPI OLEPictureImpl_PictureChanged(IPicture *iface)
return S_OK;
}

Expand All @@ -35,7 +35,7 @@ index a3bbdc52a0f..ad4aff2aecc 100644
/************************************************************************
* OLEPictureImpl_get_Attributes
*/
@@ -1915,6 +1902,85 @@ static HRESULT WINAPI OLEPictureImpl_GetSizeMax(
@@ -1887,6 +1874,85 @@ static HRESULT WINAPI OLEPictureImpl_GetSizeMax(
return E_NOTIMPL;
}

Expand Down Expand Up @@ -122,58 +122,58 @@ index a3bbdc52a0f..ad4aff2aecc 100644
/************************************************************************
* IDispatch
diff --git a/dlls/oleaut32/tests/olepicture.c b/dlls/oleaut32/tests/olepicture.c
index 0582bd2266e..ce87dd3d4d4 100644
index beafb98b28f..e0fb3bb3cd8 100644
--- a/dlls/oleaut32/tests/olepicture.c
+++ b/dlls/oleaut32/tests/olepicture.c
@@ -1178,18 +1178,14 @@ static void test_load_save_bmp(void)
size = -1;
hr = IPicture_SaveAsFile(pic, dst_stream, TRUE, &size);
ok(hr == S_OK, "IPicture_SaveasFile error %#x\n", hr);
ok(hr == S_OK, "IPicture_SaveasFile error %#lx\n", hr);
- todo_wine
ok(size == 66, "expected 66, got %d\n", size);
ok(size == 66, "expected 66, got %ld\n", size);
mem = GlobalLock(hmem);
- todo_wine
ok(!memcmp(&mem[0], "BM", 2), "got wrong bmp header %04x\n", mem[0]);
ok(!memcmp(&mem[0], "BM", 2), "got wrong bmp header %04lx\n", mem[0]);
GlobalUnlock(hmem);

size = -1;
hr = IPicture_SaveAsFile(pic, dst_stream, FALSE, &size);
- todo_wine
ok(hr == E_FAIL, "expected E_FAIL, got %#x\n", hr);
ok(hr == E_FAIL, "expected E_FAIL, got %#lx\n", hr);
- todo_wine
ok(size == -1, "expected -1, got %d\n", size);
ok(size == -1, "expected -1, got %ld\n", size);

offset.QuadPart = 0;
@@ -1256,15 +1252,12 @@ static void test_load_save_icon(void)
todo_wine
ok(size == 766, "expected 766, got %d\n", size);
ok(size == 766, "expected 766, got %ld\n", size);
mem = GlobalLock(hmem);
- todo_wine
ok(mem[0] == 0x00010000, "got wrong icon header %04x\n", mem[0]);
ok(mem[0] == 0x00010000, "got wrong icon header %04lx\n", mem[0]);
GlobalUnlock(hmem);

size = -1;
hr = IPicture_SaveAsFile(pic, dst_stream, FALSE, &size);
- todo_wine
ok(hr == E_FAIL, "expected E_FAIL, got %#x\n", hr);
ok(hr == E_FAIL, "expected E_FAIL, got %#lx\n", hr);
- todo_wine
ok(size == -1, "expected -1, got %d\n", size);
ok(size == -1, "expected -1, got %ld\n", size);

offset.QuadPart = 0;
@@ -1330,13 +1323,11 @@ static void test_load_save_empty_picture(void)
size = -1;
hr = IPicture_SaveAsFile(pic, dst_stream, TRUE, &size);
ok(hr == S_OK, "IPicture_SaveasFile error %#x\n", hr);
ok(hr == S_OK, "IPicture_SaveasFile error %#lx\n", hr);
- todo_wine
ok(size == -1, "expected -1, got %d\n", size);
ok(size == -1, "expected -1, got %ld\n", size);

size = -1;
hr = IPicture_SaveAsFile(pic, dst_stream, FALSE, &size);
ok(hr == S_OK, "IPicture_SaveasFile error %#x\n", hr);
ok(hr == S_OK, "IPicture_SaveasFile error %#lx\n", hr);
- todo_wine
ok(size == -1, "expected -1, got %d\n", size);
ok(size == -1, "expected -1, got %ld\n", size);

hr = IPicture_QueryInterface(pic, &IID_IPersistStream, (void **)&src_stream);
--
2.34.1
2.35.1

Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
From c5cb6a3fabbc59568fcd0794473b94ea61127a85 Mon Sep 17 00:00:00 2001
From eb7f29d66825c454043b3f68594e5b50412300ed Mon Sep 17 00:00:00 2001
From: Dmitry Timoshkov <dmitry@baikal.ru>
Date: Sun, 27 Mar 2016 16:28:33 +0800
Subject: oleaut32: Implement OleLoadPictureFile. (v2)
Subject: [PATCH] oleaut32: Implement OleLoadPictureFile. (v2)

---
dlls/oleaut32/olepicture.c | 36 ++++++++++++++++++++-------
dlls/oleaut32/tests/olepicture.c | 53 ++++++++++++++++++++++++++++++++++++++++
dlls/oleaut32/olepicture.c | 36 ++++++++++++++++------
dlls/oleaut32/tests/olepicture.c | 53 ++++++++++++++++++++++++++++++++
2 files changed, 80 insertions(+), 9 deletions(-)

diff --git a/dlls/oleaut32/olepicture.c b/dlls/oleaut32/olepicture.c
index 765711d..29a091f 100644
index 4a478217997..b5c9e8db271 100644
--- a/dlls/oleaut32/olepicture.c
+++ b/dlls/oleaut32/olepicture.c
@@ -2315,15 +2315,6 @@ HRESULT WINAPI OleLoadPictureEx( LPSTREAM lpstream, LONG lSize, BOOL fRunmode,
@@ -2387,15 +2387,6 @@ HRESULT WINAPI OleLoadPictureEx( LPSTREAM lpstream, LONG lSize, BOOL fRunmode,
return hr;
}

Expand All @@ -28,10 +28,11 @@ index 765711d..29a091f 100644
static HRESULT create_stream(const WCHAR *filename, IStream **stream)
{
HANDLE hFile;
@@ -2364,6 +2355,33 @@ static HRESULT create_stream(const WCHAR *filename, IStream **stream)
@@ -2435,6 +2426,33 @@ static HRESULT create_stream(const WCHAR *filename, IStream **stream)
return hr;
}

/***********************************************************************
+/***********************************************************************
+ * OleLoadPictureFile (OLEAUT32.422)
+ */
+HRESULT WINAPI OleLoadPictureFile(VARIANT filename, IDispatch **picture)
Expand All @@ -58,23 +59,22 @@ index 765711d..29a091f 100644
+ return hr;
+}
+
+/***********************************************************************
/***********************************************************************
* OleSavePictureFile (OLEAUT32.423)
*/
HRESULT WINAPI OleSavePictureFile(IDispatch *picture, BSTR filename)
diff --git a/dlls/oleaut32/tests/olepicture.c b/dlls/oleaut32/tests/olepicture.c
index 0903298..46cb185 100644
index 747134e2458..78c2ed5294e 100644
--- a/dlls/oleaut32/tests/olepicture.c
+++ b/dlls/oleaut32/tests/olepicture.c
@@ -850,6 +850,7 @@ static void test_OleLoadPicturePath(void)
@@ -958,6 +958,7 @@ static void test_OleLoadPicturePath(void)
HANDLE file;
DWORD size;
WCHAR *ptr;
+ VARIANT var;

const struct
{
@@ -916,6 +917,14 @@ static void test_OleLoadPicturePath(void)
@@ -1024,6 +1025,14 @@ static void test_OleLoadPicturePath(void)
if (pic)
IPicture_Release(pic);

Expand All @@ -89,7 +89,7 @@ index 0903298..46cb185 100644
/* Try a DOS path with tacked on "file:". */
hres = OleLoadPicturePath(temp_fileW, NULL, 0, 0, &IID_IPicture, (void **)&pic);
ok(hres == S_OK ||
@@ -924,6 +933,13 @@ static void test_OleLoadPicturePath(void)
@@ -1032,6 +1041,13 @@ static void test_OleLoadPicturePath(void)
if (pic)
IPicture_Release(pic);

Expand All @@ -103,9 +103,9 @@ index 0903298..46cb185 100644
DeleteFileA(temp_file);

/* Try with a nonexistent file. */
@@ -933,12 +949,26 @@ static void test_OleLoadPicturePath(void)
@@ -1041,12 +1057,26 @@ static void test_OleLoadPicturePath(void)
broken(hres == E_FAIL), /*Win2k */
"Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08x\n", hres);
"Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08lx\n", hres);

+ VariantInit(&var);
+ V_VT(&var) = VT_BSTR;
Expand All @@ -118,7 +118,7 @@ index 0903298..46cb185 100644
ok(hres == INET_E_RESOURCE_NOT_FOUND || /* XP+ */
broken(hres == E_UNEXPECTED) || /* NT4 */
broken(hres == E_FAIL), /* Win2k */
"Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08x\n", hres);
"Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08lx\n", hres);

+ VariantInit(&var);
+ V_VT(&var) = VT_BSTR;
Expand All @@ -130,7 +130,7 @@ index 0903298..46cb185 100644
file = CreateFileA(temp_file, GENERIC_WRITE, 0, NULL, CREATE_ALWAYS,
FILE_ATTRIBUTE_NORMAL, NULL);
WriteFile(file, bmpimage, sizeof(bmpimage), &size, NULL);
@@ -960,6 +990,13 @@ static void test_OleLoadPicturePath(void)
@@ -1068,6 +1098,13 @@ static void test_OleLoadPicturePath(void)
if (pic)
IPicture_Release(pic);

Expand All @@ -144,29 +144,29 @@ index 0903298..46cb185 100644
DeleteFileA(temp_file);

/* Try with a nonexistent file. */
@@ -968,6 +1005,22 @@ static void test_OleLoadPicturePath(void)
@@ -1076,6 +1113,22 @@ static void test_OleLoadPicturePath(void)
broken(hres == E_UNEXPECTED) || /* NT4 */
broken(hres == E_FAIL), /* Win2k */
"Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08x\n", hres);
"Expected OleLoadPicturePath to return INET_E_RESOURCE_NOT_FOUND, got 0x%08lx\n", hres);
+
+ VariantInit(&var);
+ V_VT(&var) = VT_BSTR;
+ V_BSTR(&var) = SysAllocString(temp_fileW);
+ hres = OleLoadPictureFile(var, (IDispatch **)&pic);
+ ok(hres == CTL_E_PATHFILEACCESSERROR, "wrong error %#x\n", hres);
+ ok(hres == CTL_E_PATHFILEACCESSERROR, "wrong error %#lx\n", hres);
+ VariantClear(&var);
+
+ VariantInit(&var);
+ V_VT(&var) = VT_INT;
+ V_INT(&var) = 762;
+ hres = OleLoadPictureFile(var, (IDispatch **)&pic);
+ ok(hres == CTL_E_FILENOTFOUND, "wrong error %#x\n", hres);
+ ok(hres == CTL_E_FILENOTFOUND, "wrong error %#lx\n", hres);
+
+if (0) /* crashes under Windows */
+ hres = OleLoadPictureFile(var, NULL);
}

static void test_himetric(void)
--
2.7.1
2.35.1

20 changes: 11 additions & 9 deletions patches/patchinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "4853f65c844de8277b8b0420df1a2cdb1c5b17c8"
echo "4bbb43d6c7ee824ff533628020c6309c4ff86c28"
}

# Show version information
version()
{
echo "Wine Staging 7.2"
echo "Wine Staging 7.5"
echo "Copyright (C) 2014-2019 the Wine Staging project authors."
echo "Copyright (C) 2018-2020 Alistair Leslie-Hughes"
echo ""
Expand Down Expand Up @@ -1413,7 +1413,7 @@ fi
# Patchset Pipelight
# |
# | Modified files:
# | * dlls/user32/message.c, dlls/user32/tests/msg.c, dlls/winex11.drv/init.c, dlls/winex11.drv/opengl.c,
# | * dlls/user32/tests/msg.c, dlls/win32u/message.c, dlls/winex11.drv/init.c, dlls/winex11.drv/opengl.c,
# | dlls/winex11.drv/x11drv.h
# |
if test "$enable_Pipelight" -eq 1; then
Expand Down Expand Up @@ -1875,6 +1875,7 @@ if test "$enable_ntdll_Junction_Points" -eq 1; then
patch_apply ntdll-Junction_Points/0037-ntdll-Strip-the-wine-prefix-from-reparse-point-paths.patch
patch_apply ntdll-Junction_Points/0038-ntdll-Add-a-marker-to-reparse-point-paths-to-indicat.patch
patch_apply ntdll-Junction_Points/0039-server-Rewrite-absolute-reparse-point-targets-if-the.patch
patch_apply ntdll-Junction_Points/0040-Fix-warnings.patch
fi

# Patchset server-Key_State
Expand Down Expand Up @@ -3164,7 +3165,7 @@ fi
# | * [#43124] FlashWindowEx: WM_NCACTIVATE behavior is incorrect
# |
# | Modified files:
# | * dlls/user32/tests/win.c, dlls/user32/win.c
# | * dlls/user32/tests/win.c, dlls/win32u/window.c
# |
if test "$enable_user32_FlashWindowEx" -eq 1; then
patch_apply user32-FlashWindowEx/0001-user32-Improve-FlashWindowEx-message-and-return-valu.patch
Expand Down Expand Up @@ -3290,7 +3291,7 @@ fi
# | * [#40262] Correct order of windows messages.
# |
# | Modified files:
# | * dlls/user32/tests/msg.c, dlls/user32/winpos.c
# | * dlls/user32/tests/msg.c, dlls/win32u/window.c
# |
if test "$enable_user32_message_order" -eq 1; then
patch_apply user32-message-order/0001-user32-Fix-messages-sent-on-a-window-without-WS_CHIL.patch
Expand Down Expand Up @@ -3359,7 +3360,7 @@ fi
# | * [#46274] user32: Prevent a recursive loop with the activation messages.
# |
# | Modified files:
# | * dlls/user32/focus.c, dlls/user32/tests/msg.c, dlls/user32/win.h
# | * dlls/user32/focus.c, dlls/user32/tests/msg.c, dlls/win32u/input.c, dlls/win32u/ntuser_private.h
# |
if test "$enable_user32_recursive_activation" -eq 1; then
patch_apply user32-recursive-activation/0001-user32-focus-Prevent-a-recursive-loop-with-the-activ.patch
Expand Down Expand Up @@ -3590,8 +3591,9 @@ fi
# | * [#44514] - wined3d: Use bindless textures for GLSL shaders.
# |
# | Modified files:
# | * dlls/wined3d/adapter_gl.c, dlls/wined3d/context_gl.c, dlls/wined3d/device.c, dlls/wined3d/glsl_shader.c,
# | dlls/wined3d/texture.c, dlls/wined3d/view.c, dlls/wined3d/wined3d_gl.h, dlls/wined3d/wined3d_private.h
# | * dlls/wined3d/adapter_gl.c, dlls/wined3d/arb_program_shader.c, dlls/wined3d/context_gl.c, dlls/wined3d/device.c,
# | dlls/wined3d/glsl_shader.c, dlls/wined3d/shader.c, dlls/wined3d/texture.c, dlls/wined3d/view.c,
# | dlls/wined3d/wined3d_gl.h, dlls/wined3d/wined3d_private.h
# |
if test "$enable_wined3d_bindless_texture" -eq 1; then
patch_apply wined3d-bindless-texture/0001-wined3d-Use-bindless-textures-for-GLSL-shaders.patch
Expand Down Expand Up @@ -3793,7 +3795,7 @@ fi
# | * [#2155] Forward activate window requests to WM using _NET_ACTIVE_WINDOW
# |
# | Modified files:
# | * dlls/user32/driver.c, dlls/user32/focus.c, dlls/win32u/driver.c, dlls/winex11.drv/event.c, dlls/winex11.drv/init.c,
# | * dlls/user32/driver.c, dlls/win32u/driver.c, dlls/win32u/input.c, dlls/winex11.drv/event.c, dlls/winex11.drv/init.c,
# | dlls/winex11.drv/window.c, dlls/winex11.drv/x11drv.h, dlls/winex11.drv/x11drv_main.c, include/wine/gdi_driver.h
# |
if test "$enable_winex11__NET_ACTIVE_WINDOW" -eq 1; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ index d25e1965f6e..dc73fbba666 100644
+static BOOL read_char_from_handle(HANDLE handle, char *char_out)
+{
+ static char buffer[4096];
+ static UINT buffer_max = 0;
+ static UINT buffer_pos = 0;
+ static DWORD buffer_max = 0;
+ static DWORD buffer_pos = 0;
+
+ /* Read next content into buffer */
+ if (buffer_pos >= buffer_max)
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From d1e31dceb931ff2a40e606f7aa9acf46d79ca074 Mon Sep 17 00:00:00 2001
From 614d8a2d74f7b5e7fdd2739741dc0fc42e57eebd Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Wed, 22 Sep 2021 19:01:44 +1000
Subject: [PATCH] sapi: Implement ISpObjectToken GetId
Expand All @@ -9,32 +9,32 @@ Subject: [PATCH] sapi: Implement ISpObjectToken GetId
2 files changed, 28 insertions(+), 6 deletions(-)

diff --git a/dlls/sapi/tests/token.c b/dlls/sapi/tests/token.c
index 47196d42dc7..042dfbaa84a 100644
index 9473d56b4d1..260e059127d 100644
--- a/dlls/sapi/tests/token.c
+++ b/dlls/sapi/tests/token.c
@@ -185,11 +185,11 @@ static void test_object_token(void)
ok( hr == S_OK, "got %08x\n", hr );
ok( hr == S_OK, "got %08lx\n", hr );

hr = ISpObjectToken_GetId( token, NULL );
- todo_wine ok( hr == SPERR_UNINITIALIZED, "got %08x\n", hr );
+ ok( hr == SPERR_UNINITIALIZED, "got %08x\n", hr );
- todo_wine ok( hr == SPERR_UNINITIALIZED, "got %08lx\n", hr );
+ ok( hr == SPERR_UNINITIALIZED, "got %08lx\n", hr );

tempW = (LPWSTR)0xdeadbeef;
hr = ISpObjectToken_GetId( token, &tempW );
- todo_wine ok( hr == SPERR_UNINITIALIZED, "got %08x\n", hr );
+ ok( hr == SPERR_UNINITIALIZED, "got %08x\n", hr );
- todo_wine ok( hr == SPERR_UNINITIALIZED, "got %08lx\n", hr );
+ ok( hr == SPERR_UNINITIALIZED, "got %08lx\n", hr );
ok( tempW == (LPWSTR)0xdeadbeef, "got %s\n", wine_dbgstr_w(tempW) );

hr = ISpObjectToken_GetCategory( token, NULL );
@@ -220,7 +220,7 @@ static void test_object_token(void)
ok( hr == SPERR_ALREADY_INITIALIZED, "got %08x\n", hr );
ok( hr == SPERR_ALREADY_INITIALIZED, "got %08lx\n", hr );

hr = ISpObjectToken_GetId( token, NULL );
- todo_wine ok( hr == E_POINTER, "got %08x\n", hr );
+ ok( hr == E_POINTER, "got %08x\n", hr );
- todo_wine ok( hr == E_POINTER, "got %08lx\n", hr );
+ ok( hr == E_POINTER, "got %08lx\n", hr );

hr = ISpObjectToken_GetCategory( token, NULL );
todo_wine ok( hr == E_POINTER, "got %08x\n", hr );
todo_wine ok( hr == E_POINTER, "got %08lx\n", hr );
@@ -297,6 +297,7 @@ static void test_object_token(void)
ISpObjectToken_Release( token );
}
Expand All @@ -44,7 +44,7 @@ index 47196d42dc7..042dfbaa84a 100644
{
CoInitialize( NULL );
diff --git a/dlls/sapi/token.c b/dlls/sapi/token.c
index d16478d0064..93ce6549e65 100644
index a514b2995b4..e0fbf200d65 100644
--- a/dlls/sapi/token.c
+++ b/dlls/sapi/token.c
@@ -70,6 +70,7 @@ struct object_token
Expand Down Expand Up @@ -110,5 +110,5 @@ index d16478d0064..93ce6549e65 100644

static HRESULT WINAPI token_GetCategory( ISpObjectToken *iface,
--
2.33.0
2.34.1

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 1f31bae540fcdd419eda6d012317f904860ec445 Mon Sep 17 00:00:00 2001
From b039e9a489b99619027dfd1a8233c08bfdb362ce Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Wed, 21 Apr 2021 21:06:55 +1000
Subject: [PATCH] secur32: Input Parameter should be NULL on first call to
Expand All @@ -13,7 +13,7 @@ Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/secur32/schannel.c b/dlls/secur32/schannel.c
index 141a191c7c6..443bf8f3d6c 100644
index c7d62c47758..0ac9e522ce3 100644
--- a/dlls/secur32/schannel.c
+++ b/dlls/secur32/schannel.c
@@ -734,7 +734,7 @@ static SECURITY_STATUS SEC_ENTRY schan_InitializeSecurityContextW(
Expand All @@ -26,33 +26,33 @@ index 141a191c7c6..443bf8f3d6c 100644
ULONG_PTR handle;
struct create_session_params create_params;
diff --git a/dlls/secur32/tests/schannel.c b/dlls/secur32/tests/schannel.c
index 6c15addf2fc..47f7ca0ef3a 100644
index 1cf751a3198..d0aaf2a13d5 100644
--- a/dlls/secur32/tests/schannel.c
+++ b/dlls/secur32/tests/schannel.c
@@ -1397,7 +1397,7 @@ todo_wine
@@ -1397,7 +1397,7 @@ static void test_communication(void)
status = InitializeSecurityContextA(&cred_handle, &context, (SEC_CHAR *)"localhost",
ISC_REQ_CONFIDENTIALITY|ISC_REQ_STREAM,
0, 0, NULL, 0, &context, &buffers[0], &attrs, NULL);
- todo_wine ok(status == SEC_I_CONTINUE_NEEDED, "Expected SEC_I_CONTINUE_NEEDED, got %08x\n", status);
+ ok(status == SEC_I_CONTINUE_NEEDED, "Expected SEC_I_CONTINUE_NEEDED, got %08x\n", status);
- todo_wine ok(status == SEC_I_CONTINUE_NEEDED, "Expected SEC_I_CONTINUE_NEEDED, got %08lx\n", status);
+ ok(status == SEC_I_CONTINUE_NEEDED, "Expected SEC_I_CONTINUE_NEEDED, got %08lx\n", status);
if (status != SEC_I_CONTINUE_NEEDED)
{
skip("skipping remaining renegotiate test\n");
@@ -1439,7 +1439,7 @@ todo_wine
@@ -1439,7 +1439,7 @@ static void test_communication(void)
ISC_REQ_USE_SUPPLIED_CREDS, 0, 0, &buffers[1], 0, &context2, &buffers[0], &attrs, NULL);
buffers[1].pBuffers[0].cbBuffer = buf_size;
}
- ok (status == SEC_E_OK, "got %08x\n", status);
+ todo_wine ok (status == SEC_E_OK, "got %08x\n", status);
- ok (status == SEC_E_OK, "got %08lx\n", status);
+ todo_wine ok (status == SEC_E_OK, "got %08lx\n", status);

buf = &buffers[0].pBuffers[0];
buf->cbBuffer = buf_size;
@@ -1449,7 +1449,7 @@ todo_wine
@@ -1449,7 +1449,7 @@ static void test_communication(void)
buffers[0].pBuffers[0].BufferType = SECBUFFER_DATA;
buffers[0].pBuffers[1].BufferType = SECBUFFER_EMPTY;
status = DecryptMessage(&context, &buffers[0], 0, NULL);
- ok(status == SEC_E_OK, "DecryptMessage failed: %08x\n", status);
+ todo_wine ok(status == SEC_E_OK, "DecryptMessage failed: %08x\n", status);
- ok(status == SEC_E_OK, "DecryptMessage failed: %08lx\n", status);
+ todo_wine ok(status == SEC_E_OK, "DecryptMessage failed: %08lx\n", status);
if (status == SEC_E_OK)
{
ok(buffers[0].pBuffers[0].BufferType == SECBUFFER_STREAM_HEADER, "Expected first buffer to be SECBUFFER_STREAM_HEADER\n");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 0b74f0d359fb05b1b38f211269313b7e02690e86 Mon Sep 17 00:00:00 2001
From c79db3f36aa653ec986ba948e547202fd95ed151 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 3 Apr 2015 03:58:47 +0200
Subject: [PATCH] server: Allow to open files without any permission bits. (try
Expand All @@ -13,70 +13,70 @@ Changes in v2:
2 files changed, 32 insertions(+), 20 deletions(-)

diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index 020e69277e0..9466b01bc99 100644
index 135a45f7727..2147d0f1700 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -3699,17 +3699,13 @@ static void test_CreateDirectoryA(void)
@@ -3710,17 +3710,13 @@ static void test_CreateDirectoryA(void)
error = pGetNamedSecurityInfoA(tmpfile, SE_FILE_OBJECT,
OWNER_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION,
(PSID *)&owner, NULL, &pDacl, NULL, &pSD);
- todo_wine
ok(error == ERROR_SUCCESS, "GetNamedSecurityInfo failed with error %d\n", error);
ok(error == ERROR_SUCCESS, "GetNamedSecurityInfo failed with error %ld\n", error);
- if (error == ERROR_SUCCESS)
- {
- bret = GetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation);
- ok(bret, "GetAclInformation failed\n");
- todo_wine
- ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%d != 0).\n",
- ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%ld != 0).\n",
- acl_size.AceCount);
- LocalFree(pSD);
- }
+ bret = GetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation);
+ ok(bret, "GetAclInformation failed\n");
+ todo_wine
+ ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%d != 0).\n",
+ ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%ld != 0).\n",
+ acl_size.AceCount);
+ LocalFree(pSD);
CloseHandle(hTemp);

/* Test inheritance of ACLs in NtCreateFile without security descriptor */
@@ -3778,17 +3774,13 @@ static void test_CreateDirectoryA(void)
@@ -3789,17 +3785,13 @@ static void test_CreateDirectoryA(void)
error = pGetNamedSecurityInfoA(tmpfile, SE_FILE_OBJECT,
OWNER_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION,
(PSID *)&owner, NULL, &pDacl, NULL, &pSD);
- todo_wine
ok(error == ERROR_SUCCESS, "GetNamedSecurityInfo failed with error %d\n", error);
ok(error == ERROR_SUCCESS, "GetNamedSecurityInfo failed with error %ld\n", error);
- if (error == ERROR_SUCCESS)
- {
- bret = GetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation);
- ok(bret, "GetAclInformation failed\n");
- todo_wine
- ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%d != 0).\n",
- ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%ld != 0).\n",
- acl_size.AceCount);
- LocalFree(pSD);
- }
+ bret = GetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation);
+ ok(bret, "GetAclInformation failed\n");
+ todo_wine
+ ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%d != 0).\n",
+ ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%ld != 0).\n",
+ acl_size.AceCount);
+ LocalFree(pSD);
CloseHandle(hTemp);

done:
diff --git a/server/fd.c b/server/fd.c
index c0425694294..100881f21a6 100644
index 31b64b30d43..2ff0b480f40 100644
--- a/server/fd.c
+++ b/server/fd.c
@@ -1908,6 +1908,7 @@ struct fd *open_fd( struct fd *root, const char *name, int flags, mode_t *mode,
@@ -2044,6 +2044,7 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
int root_fd = -1;
int rw_mode;
char *path;
+ int do_chmod = 0;
int created = (flags & O_CREAT);

if (((options & FILE_DELETE_ON_CLOSE) && !(access & DELETE)) ||
@@ -1972,10 +1973,28 @@ struct fd *open_fd( struct fd *root, const char *name, int flags, mode_t *mode,
@@ -2116,10 +2117,28 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
if ((access & FILE_UNIX_WRITE_ACCESS) || (flags & O_CREAT))
fd->unix_fd = open( name, O_RDONLY | (flags & ~(O_TRUNC | O_CREAT | O_EXCL)), *mode );
}
Expand Down Expand Up @@ -105,7 +105,7 @@ index c0425694294..100881f21a6 100644
goto error;
}
}
@@ -1992,6 +2011,7 @@ struct fd *open_fd( struct fd *root, const char *name, int flags, mode_t *mode,
@@ -2130,6 +2149,7 @@ struct fd *open_fd( struct fd *root, const char *name, struct unicode_str nt_nam
closed_fd->unlink = 0;
closed_fd->unlink_name = fd->unlink_name;
closed_fd->unix_name = fd->unix_name;
Expand All @@ -114,5 +114,5 @@ index c0425694294..100881f21a6 100644
*mode = st.st_mode;

--
2.20.1
2.34.1

Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
From 0c188a73bf19cbdb18c61d0a8417e9557c3daf59 Mon Sep 17 00:00:00 2001
From 9efbce075628f4d6fc45a8727373e7311128b927 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 3 Apr 2015 03:58:59 +0200
Subject: advapi32/tests: Add tests for ACL inheritance in CreateDirectoryA.
Subject: [PATCH] advapi32/tests: Add tests for ACL inheritance in
CreateDirectoryA.

---
dlls/advapi32/tests/security.c | 70 ++++++++++++++++++++++++++++++++++++++++++
dlls/advapi32/tests/security.c | 70 ++++++++++++++++++++++++++++++++++
1 file changed, 70 insertions(+)

diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index 329ae09..36ef972 100644
index 2147d0f1700..cd039c734e9 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -3404,6 +3404,76 @@ static void test_CreateDirectoryA(void)
@@ -3794,6 +3794,76 @@ static void test_CreateDirectoryA(void)
LocalFree(pSD);
CloseHandle(hTemp);

Expand Down Expand Up @@ -89,5 +90,5 @@ index 329ae09..36ef972 100644
HeapFree(GetProcessHeap(), 0, user);
bret = RemoveDirectoryA(tmpdir);
--
2.3.3
2.34.1

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 4778b1c3d59bd87b067b6266e38ddd9a5d8bae86 Mon Sep 17 00:00:00 2001
From d0142599d03573c50c889a7f9091a9ff2459304b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Thu, 1 Apr 2021 23:19:18 +0200
Subject: [PATCH] server: Create message queue and thread input in
Expand All @@ -19,10 +19,10 @@ Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45385
2 files changed, 28 insertions(+), 27 deletions(-)

diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c
index 63163b7ed01..c146e4b5cd9 100644
index 6cbf0d6254e..853c0f66df6 100644
--- a/dlls/user32/tests/input.c
+++ b/dlls/user32/tests/input.c
@@ -3761,8 +3761,8 @@ struct get_key_state_thread_params
@@ -3962,8 +3962,8 @@ struct get_key_state_thread_params
int index;
};

Expand All @@ -33,17 +33,17 @@ index 63163b7ed01..c146e4b5cd9 100644
{
unsigned char keystate[256];
BOOL ret;
@@ -3771,18 +3771,18 @@ static void check_get_keyboard_state_(int i, int j, int c, int x, int todo_c, in
@@ -3972,18 +3972,18 @@ static void check_get_keyboard_state_(int i, int j, int c, int x, int todo_c, in
ret = GetKeyboardState(keystate);
ok_(__FILE__, line)(ret, "GetKeyboardState failed, %u\n", GetLastError());
ok_(__FILE__, line)(ret, "GetKeyboardState failed, %lu\n", GetLastError());
todo_wine_if(todo_x) ok_(__FILE__, line)(!(keystate['X'] & 0x80) == !x, "%d:%d: expected that X keystate is %s\n", i, j, x ? "set" : "unset");
- todo_wine_if(todo_c) ok_(__FILE__, line)(!(keystate['C'] & 0x80) == !c, "%d:%d: expected that C keystate is %s\n", i, j, c ? "set" : "unset");
+ ok_(__FILE__, line)(!(keystate['C'] & 0x80) == !c, "%d:%d: expected that C keystate is %s\n", i, j, c ? "set" : "unset");

/* calling it twice shouldn't change */
memset(keystate, 0, sizeof(keystate));
ret = GetKeyboardState(keystate);
ok_(__FILE__, line)(ret, "GetKeyboardState failed, %u\n", GetLastError());
ok_(__FILE__, line)(ret, "GetKeyboardState failed, %lu\n", GetLastError());
todo_wine_if(todo_x) ok_(__FILE__, line)(!(keystate['X'] & 0x80) == !x, "%d:%d: expected that X keystate is %s\n", i, j, x ? "set" : "unset");
- todo_wine_if(todo_c) ok_(__FILE__, line)(!(keystate['C'] & 0x80) == !c, "%d:%d: expected that C keystate is %s\n", i, j, c ? "set" : "unset");
+ ok_(__FILE__, line)(!(keystate['C'] & 0x80) == !c, "%d:%d: expected that C keystate is %s\n", i, j, c ? "set" : "unset");
Expand All @@ -56,7 +56,7 @@ index 63163b7ed01..c146e4b5cd9 100644
{
SHORT state;

@@ -3791,7 +3791,7 @@ static void check_get_key_state_(int i, int j, int c, int x, int todo_c, int tod
@@ -3992,7 +3992,7 @@ static void check_get_key_state_(int i, int j, int c, int x, int todo_c, int tod
ok_(__FILE__, line)(!(state & 0x007e), "%d:%d: expected that X undefined bits are unset, got %#x\n", i, j, state);

state = GetKeyState('C');
Expand All @@ -65,7 +65,7 @@ index 63163b7ed01..c146e4b5cd9 100644
ok_(__FILE__, line)(!(state & 0x007e), "%d:%d: expected that C undefined bits are unset, got %#x\n", i, j, state);
}

@@ -3808,7 +3808,7 @@ static DWORD WINAPI get_key_state_thread(void *arg)
@@ -4009,7 +4009,7 @@ static DWORD WINAPI get_key_state_thread(void *arg)
int i = params->index, j;

test = get_key_state_tests + i;
Expand All @@ -74,7 +74,7 @@ index 63163b7ed01..c146e4b5cd9 100644

if (test->peek_message)
{
@@ -3841,18 +3841,18 @@ static DWORD WINAPI get_key_state_thread(void *arg)
@@ -4042,18 +4042,18 @@ static DWORD WINAPI get_key_state_thread(void *arg)
if (test->set_keyboard_state) expect_c = TRUE;
else expect_c = FALSE;

Expand All @@ -88,7 +88,7 @@ index 63163b7ed01..c146e4b5cd9 100644
/* key released */
ReleaseSemaphore(semaphores[0], 1, NULL);
result = WaitForSingleObject(semaphores[1], 1000);
ok(result == WAIT_OBJECT_0, "%d: WaitForSingleObject returned %u\n", i, result);
ok(result == WAIT_OBJECT_0, "%d: WaitForSingleObject returned %lu\n", i, result);

- check_get_keyboard_state(i, j, expect_c, expect_x, /* todo */ i == 6, has_queue || i == 6 || j > 0);
- check_get_key_state(i, j, expect_c, FALSE, /* todo */ i == 6, FALSE);
Expand All @@ -99,7 +99,7 @@ index 63163b7ed01..c146e4b5cd9 100644
}

return 0;
@@ -3920,18 +3920,18 @@ static void test_GetKeyState(void)
@@ -4121,18 +4121,18 @@ static void test_GetKeyState(void)
}
else expect_c = FALSE;

Expand All @@ -124,7 +124,7 @@ index 63163b7ed01..c146e4b5cd9 100644

ReleaseSemaphore(params.semaphores[1], 1, NULL);

@@ -3947,15 +3947,15 @@ static void test_GetKeyState(void)
@@ -4148,15 +4148,15 @@ static void test_GetKeyState(void)
SetKeyboardState(keystate);
}

Expand All @@ -147,10 +147,10 @@ index 63163b7ed01..c146e4b5cd9 100644
ReleaseSemaphore(params.semaphores[1], 1, NULL);
}
diff --git a/server/queue.c b/server/queue.c
index b026c03e13d..5c9f91a13c5 100644
index 4f69a082b74..561fa825ee7 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -3007,9 +3007,10 @@ DECL_HANDLER(get_key_state)
@@ -3080,9 +3080,10 @@ DECL_HANDLER(get_key_state)
DECL_HANDLER(set_key_state)
{
struct desktop *desktop;
Expand All @@ -163,5 +163,5 @@ index b026c03e13d..5c9f91a13c5 100644
{
memcpy( desktop->keystate, get_req_data(), size );
--
2.30.2
2.35.1

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From a6f4d1c57d31c0a8f50afd5af9d50b7e587c84f5 Mon Sep 17 00:00:00 2001
From ffa3222c7cfdd76ec21342e9540b01073d2e4bd7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Thu, 1 Apr 2021 23:30:46 +0200
Subject: [PATCH] server: Lock thread input keystate whenever it is modified.
Expand All @@ -19,10 +19,10 @@ Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45385
2 files changed, 53 insertions(+), 4 deletions(-)

diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c
index c146e4b5cd9..246569961be 100644
index 853c0f66df6..848b52d3870 100644
--- a/dlls/user32/tests/input.c
+++ b/dlls/user32/tests/input.c
@@ -3842,15 +3842,15 @@ static DWORD WINAPI get_key_state_thread(void *arg)
@@ -4043,15 +4043,15 @@ static DWORD WINAPI get_key_state_thread(void *arg)
else expect_c = FALSE;

check_get_keyboard_state(i, j, expect_c, FALSE, /* todo */ !has_queue);
Expand All @@ -34,18 +34,18 @@ index c146e4b5cd9..246569961be 100644
/* key released */
ReleaseSemaphore(semaphores[0], 1, NULL);
result = WaitForSingleObject(semaphores[1], 1000);
ok(result == WAIT_OBJECT_0, "%d: WaitForSingleObject returned %u\n", i, result);
ok(result == WAIT_OBJECT_0, "%d: WaitForSingleObject returned %lu\n", i, result);

- check_get_keyboard_state(i, j, expect_c, expect_x, /* todo */ has_queue || j > 0);
+ check_get_keyboard_state(i, j, expect_c, expect_x, /* todo */ !has_queue && j > 0);
check_get_key_state(i, j, expect_c, FALSE, /* todo */ FALSE);
check_get_keyboard_state(i, j, expect_c, FALSE, /* todo */ FALSE);
}
diff --git a/server/queue.c b/server/queue.c
index 5c9f91a13c5..0782c526327 100644
index 561fa825ee7..9e0b9836965 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -114,6 +114,8 @@ struct thread_input
@@ -112,6 +112,8 @@ struct thread_input
int cursor_count; /* cursor show count */
struct list msg_list; /* list of hardware messages */
unsigned char keystate[256]; /* state of each key */
Expand All @@ -54,15 +54,15 @@ index 5c9f91a13c5..0782c526327 100644
};

struct msg_queue
@@ -140,6 +142,7 @@ struct msg_queue
@@ -138,6 +140,7 @@ struct msg_queue
struct thread_input *input; /* thread input descriptor */
struct hook_table *hooks; /* hook table */
timeout_t last_get_msg; /* time of last get message call */
+ int keystate_lock; /* owns an input keystate lock */
};

struct hotkey
@@ -265,12 +268,14 @@ static struct thread_input *create_thread_input( struct thread *thread )
@@ -263,12 +266,14 @@ static struct thread_input *create_thread_input( struct thread *thread )
list_init( &input->msg_list );
set_caret_window( input, 0 );
memset( input->keystate, 0, sizeof(input->keystate) );
Expand All @@ -77,15 +77,15 @@ index 5c9f91a13c5..0782c526327 100644
}
return input;
}
@@ -305,6 +310,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
@@ -303,6 +308,7 @@ static struct msg_queue *create_msg_queue( struct thread *thread, struct thread_
queue->input = (struct thread_input *)grab_object( input );
queue->hooks = NULL;
queue->last_get_msg = current_time;
+ queue->keystate_lock = 0;
list_init( &queue->send_result );
list_init( &queue->callback_result );
list_init( &queue->pending_timers );
@@ -326,6 +332,31 @@ void free_msg_queue( struct thread *thread )
@@ -324,6 +330,31 @@ void free_msg_queue( struct thread *thread )
thread->queue = NULL;
}

Expand Down Expand Up @@ -117,7 +117,7 @@ index 5c9f91a13c5..0782c526327 100644
/* change the thread input data of a given thread */
static int assign_thread_input( struct thread *thread, struct thread_input *new_input )
{
@@ -339,9 +370,11 @@ static int assign_thread_input( struct thread *thread, struct thread_input *new_
@@ -337,9 +368,11 @@ static int assign_thread_input( struct thread *thread, struct thread_input *new_
if (queue->input)
{
queue->input->cursor_count -= queue->cursor_count;
Expand All @@ -129,7 +129,7 @@ index 5c9f91a13c5..0782c526327 100644
new_input->cursor_count += queue->cursor_count;
return 1;
}
@@ -477,6 +510,11 @@ static inline int is_signaled( struct msg_queue *queue )
@@ -476,6 +509,11 @@ static inline int is_signaled( struct msg_queue *queue )
/* set some queue bits */
static inline void set_queue_bits( struct msg_queue *queue, unsigned int bits )
{
Expand All @@ -141,7 +141,7 @@ index 5c9f91a13c5..0782c526327 100644
queue->wake_bits |= bits;
queue->changed_bits |= bits;
if (is_signaled( queue )) wake_up( &queue->obj, 0 );
@@ -487,6 +525,11 @@ static inline void clear_queue_bits( struct msg_queue *queue, unsigned int bits
@@ -486,6 +524,11 @@ static inline void clear_queue_bits( struct msg_queue *queue, unsigned int bits
{
queue->wake_bits &= ~bits;
queue->changed_bits &= ~bits;
Expand All @@ -153,15 +153,15 @@ index 5c9f91a13c5..0782c526327 100644
}

/* check whether msg is a keyboard message */
@@ -1031,6 +1074,7 @@ static void msg_queue_destroy( struct object *obj )
@@ -1030,6 +1073,7 @@ static void msg_queue_destroy( struct object *obj )
}
if (queue->timeout) remove_timeout_user( queue->timeout );
queue->input->cursor_count -= queue->cursor_count;
+ if (queue->keystate_lock) unlock_input_keystate( queue->input );
release_object( queue->input );
if (queue->hooks) release_object( queue->hooks );
if (queue->fd) release_object( queue->fd );
@@ -2997,7 +3041,11 @@ DECL_HANDLER(get_key_state)
@@ -3070,7 +3114,11 @@ DECL_HANDLER(get_key_state)
else
{
unsigned char *keystate = current->queue->input->keystate;
Expand All @@ -174,7 +174,7 @@ index 5c9f91a13c5..0782c526327 100644
set_reply_data( keystate, size );
}
}
@@ -3011,6 +3059,7 @@ DECL_HANDLER(set_key_state)
@@ -3084,6 +3132,7 @@ DECL_HANDLER(set_key_state)
data_size_t size = min( 256, get_req_data_size() );

memcpy( queue->input->keystate, get_req_data(), size );
Expand All @@ -183,5 +183,5 @@ index 5c9f91a13c5..0782c526327 100644
{
memcpy( desktop->keystate, get_req_data(), size );
--
2.30.2
2.35.1

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From a6a449881f6643183316ad867b49bd99f53fa4a4 Mon Sep 17 00:00:00 2001
From b93e17f4dbd548edff543c2607755ba0d7a844d0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?R=C3=A9mi=20Bernon?= <rbernon@codeweavers.com>
Date: Thu, 1 Apr 2021 23:41:31 +0200
Subject: [PATCH] server: Create message queue and thread input in
Expand All @@ -18,10 +18,10 @@ Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45385
2 files changed, 28 insertions(+), 40 deletions(-)

diff --git a/dlls/user32/tests/input.c b/dlls/user32/tests/input.c
index 246569961be..561f932b18b 100644
index 848b52d3870..71eaace7d7f 100644
--- a/dlls/user32/tests/input.c
+++ b/dlls/user32/tests/input.c
@@ -3761,8 +3761,8 @@ struct get_key_state_thread_params
@@ -3962,8 +3962,8 @@ struct get_key_state_thread_params
int index;
};

Expand All @@ -32,18 +32,18 @@ index 246569961be..561f932b18b 100644
{
unsigned char keystate[256];
BOOL ret;
@@ -3770,24 +3770,24 @@ static void check_get_keyboard_state_(int i, int j, int c, int x, int todo_x, in
@@ -3971,24 +3971,24 @@ static void check_get_keyboard_state_(int i, int j, int c, int x, int todo_x, in
memset(keystate, 0, sizeof(keystate));
ret = GetKeyboardState(keystate);
ok_(__FILE__, line)(ret, "GetKeyboardState failed, %u\n", GetLastError());
ok_(__FILE__, line)(ret, "GetKeyboardState failed, %lu\n", GetLastError());
- todo_wine_if(todo_x) ok_(__FILE__, line)(!(keystate['X'] & 0x80) == !x, "%d:%d: expected that X keystate is %s\n", i, j, x ? "set" : "unset");
+ ok_(__FILE__, line)(!(keystate['X'] & 0x80) == !x, "%d:%d: expected that X keystate is %s\n", i, j, x ? "set" : "unset");
ok_(__FILE__, line)(!(keystate['C'] & 0x80) == !c, "%d:%d: expected that C keystate is %s\n", i, j, c ? "set" : "unset");

/* calling it twice shouldn't change */
memset(keystate, 0, sizeof(keystate));
ret = GetKeyboardState(keystate);
ok_(__FILE__, line)(ret, "GetKeyboardState failed, %u\n", GetLastError());
ok_(__FILE__, line)(ret, "GetKeyboardState failed, %lu\n", GetLastError());
- todo_wine_if(todo_x) ok_(__FILE__, line)(!(keystate['X'] & 0x80) == !x, "%d:%d: expected that X keystate is %s\n", i, j, x ? "set" : "unset");
+ ok_(__FILE__, line)(!(keystate['X'] & 0x80) == !x, "%d:%d: expected that X keystate is %s\n", i, j, x ? "set" : "unset");
ok_(__FILE__, line)(!(keystate['C'] & 0x80) == !c, "%d:%d: expected that C keystate is %s\n", i, j, c ? "set" : "unset");
Expand All @@ -62,7 +62,7 @@ index 246569961be..561f932b18b 100644
ok_(__FILE__, line)(!(state & 0x007e), "%d:%d: expected that X undefined bits are unset, got %#x\n", i, j, state);

state = GetKeyState('C');
@@ -3841,18 +3841,18 @@ static DWORD WINAPI get_key_state_thread(void *arg)
@@ -4042,18 +4042,18 @@ static DWORD WINAPI get_key_state_thread(void *arg)
if (test->set_keyboard_state) expect_c = TRUE;
else expect_c = FALSE;

Expand All @@ -76,7 +76,7 @@ index 246569961be..561f932b18b 100644
/* key released */
ReleaseSemaphore(semaphores[0], 1, NULL);
result = WaitForSingleObject(semaphores[1], 1000);
ok(result == WAIT_OBJECT_0, "%d: WaitForSingleObject returned %u\n", i, result);
ok(result == WAIT_OBJECT_0, "%d: WaitForSingleObject returned %lu\n", i, result);

- check_get_keyboard_state(i, j, expect_c, expect_x, /* todo */ !has_queue && j > 0);
- check_get_key_state(i, j, expect_c, FALSE, /* todo */ FALSE);
Expand All @@ -87,7 +87,7 @@ index 246569961be..561f932b18b 100644
}

return 0;
@@ -3920,18 +3920,18 @@ static void test_GetKeyState(void)
@@ -4121,18 +4121,18 @@ static void test_GetKeyState(void)
}
else expect_c = FALSE;

Expand All @@ -112,7 +112,7 @@ index 246569961be..561f932b18b 100644

ReleaseSemaphore(params.semaphores[1], 1, NULL);

@@ -3947,15 +3947,15 @@ static void test_GetKeyState(void)
@@ -4148,15 +4148,15 @@ static void test_GetKeyState(void)
SetKeyboardState(keystate);
}

Expand All @@ -135,10 +135,10 @@ index 246569961be..561f932b18b 100644
ReleaseSemaphore(params.semaphores[1], 1, NULL);
}
diff --git a/server/queue.c b/server/queue.c
index 0782c526327..fce65e360d4 100644
index 9e0b9836965..d79add56fba 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -3025,25 +3025,13 @@ DECL_HANDLER(get_key_state)
@@ -3098,25 +3098,13 @@ DECL_HANDLER(get_key_state)
set_reply_data( desktop->keystate, size );
release_object( desktop );
}
Expand Down Expand Up @@ -168,5 +168,5 @@ index 0782c526327..fce65e360d4 100644
}
set_reply_data( keystate, size );
--
2.30.2
2.35.1

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From 8ef1df41f726dc8ceb520c46974c64f628d9f831 Mon Sep 17 00:00:00 2001
From cd7fb7888c26a3ccbbc13404f671ed7525041e81 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Mon, 30 Mar 2015 12:50:21 +0200
Subject: [PATCH] server: Temporarily store the full security descriptor for
Expand All @@ -12,23 +12,23 @@ Subject: [PATCH] server: Temporarily store the full security descriptor for
4 files changed, 80 insertions(+), 47 deletions(-)

diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index dadec9be388..37a81ec778d 100644
index 7f0c248cd7a..f1ec827d683 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -3702,7 +3702,6 @@ static void test_CreateDirectoryA(void)
ok(error == ERROR_SUCCESS, "GetNamedSecurityInfo failed with error %d\n", error);
ok(error == ERROR_SUCCESS, "GetNamedSecurityInfo failed with error %ld\n", error);
bret = GetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation);
ok(bret, "GetAclInformation failed\n");
- todo_wine
ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%d != 0).\n",
ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%ld != 0).\n",
acl_size.AceCount);
LocalFree(pSD);
@@ -3713,7 +3712,6 @@ static void test_CreateDirectoryA(void)
ok(error == ERROR_SUCCESS, "GetNamedSecurityInfo failed with error %d\n", error);
ok(error == ERROR_SUCCESS, "GetNamedSecurityInfo failed with error %ld\n", error);
bret = GetAclInformation(pDacl, &acl_size, sizeof(acl_size), AclSizeInformation);
ok(bret, "GetAclInformation failed\n");
- todo_wine
ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%d != 0).\n",
ok(acl_size.AceCount == 0, "GetAclInformation returned unexpected entry count (%ld != 0).\n",
acl_size.AceCount);
LocalFree(pSD);
@@ -3836,7 +3834,6 @@ static void test_CreateDirectoryA(void)
Expand All @@ -48,10 +48,10 @@ index dadec9be388..37a81ec778d 100644
+ ok(bret, "Current User ACE (%s) != Current User SID (%s).\n", debugstr_sid(&ace->SidStart), debugstr_sid(user_sid));
ok(((ACE_HEADER *)ace)->AceFlags == 0,
"Current User ACE has unexpected flags (0x%x != 0x0)\n", ((ACE_HEADER *)ace)->AceFlags);
- ok(ace->Mask == 0x1f01ff, "Current User ACE has unexpected mask (0x%x != 0x1f01ff)\n",
- ok(ace->Mask == 0x1f01ff, "Current User ACE has unexpected mask (0x%lx != 0x1f01ff)\n",
- ace->Mask);
+ todo_wine ok(ace->Mask == 0x1f01ff,
+ "Current User ACE has unexpected mask (0x%x != 0x1f01ff)\n", ace->Mask);
+ "Current User ACE has unexpected mask (0x%lx != 0x1f01ff)\n", ace->Mask);
}
if (acl_size.AceCount > 1)
{
Expand All @@ -62,10 +62,10 @@ index dadec9be388..37a81ec778d 100644
+ ok(bret, "Administators Group ACE (%s) != Administators Group SID (%s).\n", debugstr_sid(&ace->SidStart), debugstr_sid(admin_sid));
ok(((ACE_HEADER *)ace)->AceFlags == 0,
"Administators Group ACE has unexpected flags (0x%x != 0x0)\n", ((ACE_HEADER *)ace)->AceFlags);
- ok(ace->Mask == 0x1f01ff, "Administators Group ACE has unexpected mask (0x%x != 0x1f01ff)\n",
- ok(ace->Mask == 0x1f01ff, "Administators Group ACE has unexpected mask (0x%lx != 0x1f01ff)\n",
- ace->Mask);
+ todo_wine ok(ace->Mask == 0x1f01ff,
+ "Administators Group ACE has unexpected mask (0x%x != 0x1f01ff)\n", ace->Mask);
+ "Administators Group ACE has unexpected mask (0x%lx != 0x1f01ff)\n", ace->Mask);
}
LocalFree(pSD);
CloseHandle(obj);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ index e61de8283b8..01e187b8c00 100644
+{
+ char buffer[XATTR_SIZE_MAX];
+ int present, len;
+ const ACL *dacl;
+ const struct acl *dacl;
+
+ /* there's no point in storing the security descriptor if there's no DACL */
+ if (!sd) return;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From eb893d7f6a16af59e95c3b0bd17075f47ddca9cf Mon Sep 17 00:00:00 2001
From 8c04b2cc07d768704e6f48dfb628bef2b69c5fc7 Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Fri, 18 Apr 2014 14:05:32 -0600
Subject: [PATCH] server: Convert return of file security masks with generic
Expand All @@ -10,16 +10,16 @@ Subject: [PATCH] server: Convert return of file security masks with generic
2 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index 37a81ec778d..f154e5b9346 100644
index ad3d715bd26..73ab008ba28 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -4935,8 +4935,8 @@ static void test_GetSecurityInfo(void)
ok(bret, "Current User ACE (%s) != Current User SID (%s).\n", debugstr_sid(&ace->SidStart), debugstr_sid(user_sid));
ok(((ACE_HEADER *)ace)->AceFlags == 0,
"Current User ACE has unexpected flags (0x%x != 0x0)\n", ((ACE_HEADER *)ace)->AceFlags);
- todo_wine ok(ace->Mask == 0x1f01ff,
- "Current User ACE has unexpected mask (0x%x != 0x1f01ff)\n", ace->Mask);
+ ok(ace->Mask == 0x1f01ff, "Current User ACE has unexpected mask (0x%x != 0x1f01ff)\n",
- "Current User ACE has unexpected mask (0x%lx != 0x1f01ff)\n", ace->Mask);
+ ok(ace->Mask == 0x1f01ff, "Current User ACE has unexpected mask (0x%lx != 0x1f01ff)\n",
+ ace->Mask);
}
if (acl_size.AceCount > 1)
Expand All @@ -30,7 +30,7 @@ index 37a81ec778d..f154e5b9346 100644
"Administators Group ACE has unexpected flags (0x%x != 0x0)\n", ((ACE_HEADER *)ace)->AceFlags);
- todo_wine ok(ace->Mask == 0x1f01ff,
+ ok(ace->Mask == 0x1f01ff,
"Administators Group ACE has unexpected mask (0x%x != 0x1f01ff)\n", ace->Mask);
"Administators Group ACE has unexpected mask (0x%lx != 0x1f01ff)\n", ace->Mask);
}
LocalFree(pSD);
diff --git a/server/file.c b/server/file.c
Expand All @@ -44,16 +44,16 @@ index 01e187b8c00..91900429a49 100644
+/* Convert generic rights into standard access rights */
+static void convert_generic_sd( struct security_descriptor *sd )
+{
+ const ACL *dacl;
+ const struct acl *dacl;
+ int present;
+
+ dacl = sd_get_dacl( sd, &present );
+ if (present && dacl)
+ {
+ const ACE_HEADER *ace = (const ACE_HEADER *)(dacl + 1);
+ const struct ace *ace = (const struct ace *)(dacl + 1);
+ ULONG i;
+
+ for (i = 0; i < dacl->AceCount; i++, ace = ace_next( ace ))
+ for (i = 0; i < dacl->count; i++, ace = ace_next( ace ))
+ {
+ DWORD *mask = (DWORD *)(ace + 1);
+ *mask = map_access( *mask, &file_type.mapping );
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From b6eee87b6b0b97d351b0eabaacdf3f5febbd1502 Mon Sep 17 00:00:00 2001
From deba3142d906195d00878beceaf832915f1a46fe Mon Sep 17 00:00:00 2001
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
Date: Fri, 18 Apr 2014 14:01:35 -0600
Subject: [PATCH] server: Retrieve file security attributes with extended file
Expand All @@ -10,12 +10,12 @@ Subject: [PATCH] server: Retrieve file security attributes with extended file
2 files changed, 56 insertions(+), 13 deletions(-)

diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
index f154e5b9346..f2a29e9f1a1 100644
index 73ab008ba28..d77f29f5ce9 100644
--- a/dlls/advapi32/tests/security.c
+++ b/dlls/advapi32/tests/security.c
@@ -3656,7 +3656,7 @@ static void test_CreateDirectoryA(void)
}
ok(!error, "GetNamedSecurityInfo failed with error %d\n", error);
ok(!error, "GetNamedSecurityInfo failed with error %ld\n", error);
test_inherited_dacl(pDacl, admin_sid, user_sid, OBJECT_INHERIT_ACE|CONTAINER_INHERIT_ACE,
- 0x1f01ff, FALSE, TRUE, FALSE, __LINE__);
+ 0x1f01ff, FALSE, FALSE, FALSE, __LINE__);
Expand All @@ -32,10 +32,10 @@ index f154e5b9346..f2a29e9f1a1 100644
+ debugstr_sid(&ace->SidStart), debugstr_sid(user_sid));
ok(((ACE_HEADER *)ace)->AceFlags == 0,
"Current User ACE has unexpected flags (0x%x != 0x0)\n", ((ACE_HEADER *)ace)->AceFlags);
- ok(ace->Mask == 0x1f01ff, "Current User ACE has unexpected mask (0x%x != 0x1f01ff)\n",
- ok(ace->Mask == 0x1f01ff, "Current User ACE has unexpected mask (0x%lx != 0x1f01ff)\n",
- ace->Mask);
+ ok(ace->Mask == 0x1f01ff,
+ "Current User ACE has unexpected mask (0x%x != 0x1f01ff)\n", ace->Mask);
+ "Current User ACE has unexpected mask (0x%lx != 0x1f01ff)\n", ace->Mask);
}
if (acl_size.AceCount > 1)
{
Expand Down
Loading