mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Updated ML-patchset
Dropped the FILE_FLAG_WRITE_THROUGH patches since they appear to be breaking multiple applications. Bug 45599, 45604.
This commit is contained in:
parent
49f93040fe
commit
39cafb1db1
@ -1,4 +1,4 @@
|
||||
From ca172d5f44df90a62426572ef6f461b27bf57689 Mon Sep 17 00:00:00 2001
|
||||
From 6cd8711153dfad60cf2816d2f9f07189bd37719b Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Tue, 15 Nov 2016 13:02:13 +0800
|
||||
Subject: [PATCH] kernel32: MoveFile(source, source) should succeed.
|
||||
@ -11,7 +11,7 @@ Subject: [PATCH] kernel32: MoveFile(source, source) should succeed.
|
||||
4 files changed, 14 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c
|
||||
index bde58e9..c7c5cbd 100644
|
||||
index 232ea7e..ba75b7e 100644
|
||||
--- a/dlls/kernel32/path.c
|
||||
+++ b/dlls/kernel32/path.c
|
||||
@@ -1354,7 +1354,7 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
|
||||
@ -21,10 +21,10 @@ index bde58e9..c7c5cbd 100644
|
||||
- HANDLE source_handle = 0, dest_handle;
|
||||
+ HANDLE source_handle = 0, dest_handle = 0;
|
||||
ANSI_STRING source_unix, dest_unix;
|
||||
DWORD options;
|
||||
|
||||
@@ -1414,18 +1414,22 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
|
||||
status = NtOpenFile( &dest_handle, GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, &attr, &io, 0, options );
|
||||
TRACE("(%s,%s,%p,%p,%04x)\n",
|
||||
@@ -1413,18 +1413,22 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
|
||||
FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT );
|
||||
if (status == STATUS_SUCCESS) /* destination exists */
|
||||
{
|
||||
- NtClose( dest_handle );
|
||||
@ -50,7 +50,7 @@ index bde58e9..c7c5cbd 100644
|
||||
}
|
||||
else if (status != STATUS_OBJECT_NAME_NOT_FOUND)
|
||||
{
|
||||
@@ -1485,6 +1489,7 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
|
||||
@@ -1484,6 +1488,7 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
|
||||
|
||||
error:
|
||||
if (source_handle) NtClose( source_handle );
|
||||
@ -59,7 +59,7 @@ index bde58e9..c7c5cbd 100644
|
||||
RtlFreeAnsiString( &dest_unix );
|
||||
return FALSE;
|
||||
diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c
|
||||
index ef4eebc..07b3ffb 100644
|
||||
index e201f62..e152cf1 100644
|
||||
--- a/dlls/kernel32/tests/file.c
|
||||
+++ b/dlls/kernel32/tests/file.c
|
||||
@@ -1886,7 +1886,7 @@ static void test_MoveFileA(void)
|
||||
@ -72,10 +72,10 @@ index ef4eebc..07b3ffb 100644
|
||||
ret = MoveFileA(source, dest);
|
||||
ok(!ret && GetLastError() == ERROR_ALREADY_EXISTS,
|
||||
diff --git a/dlls/msvcp120/tests/msvcp120.c b/dlls/msvcp120/tests/msvcp120.c
|
||||
index db9517d..7275e28 100644
|
||||
index 969902d..d6051b0 100644
|
||||
--- a/dlls/msvcp120/tests/msvcp120.c
|
||||
+++ b/dlls/msvcp120/tests/msvcp120.c
|
||||
@@ -1524,7 +1524,7 @@ static void test_tr2_sys__Rename(void)
|
||||
@@ -1402,7 +1402,7 @@ static void test_tr2_sys__Rename(void)
|
||||
CloseHandle(file);
|
||||
|
||||
ret = p_tr2_sys__Rename("tr2_test_dir\\f1", "tr2_test_dir\\f1");
|
||||
@ -85,10 +85,10 @@ index db9517d..7275e28 100644
|
||||
errno = 0xdeadbeef;
|
||||
if(tests[i].val == ERROR_SUCCESS) {
|
||||
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
|
||||
index ea4157c..298c4e9 100644
|
||||
index dcc9629..e16f9f3 100644
|
||||
--- a/programs/cmd/tests/test_builtins.cmd.exp
|
||||
+++ b/programs/cmd/tests/test_builtins.cmd.exp
|
||||
@@ -1295,8 +1295,8 @@ file move succeeded
|
||||
@@ -1261,8 +1261,8 @@ file move succeeded
|
||||
@todo_wine@bar@or_broken@baz
|
||||
read-only files are moveable
|
||||
file moved in subdirectory
|
||||
|
@ -1,8 +1,8 @@
|
||||
From 6e5c9277d35def4b312820f11ef8a7586f788124 Mon Sep 17 00:00:00 2001
|
||||
From 96e7b57c5591087cfd07b0658ac33a1ec6bde3b5 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Tue, 15 Nov 2016 13:32:42 +0800
|
||||
Subject: [PATCH] kernel32: MoveFile should make sure that it has the delete
|
||||
access to the source file.
|
||||
Subject: kernel32: MoveFile should make sure that it has the delete access to
|
||||
the source file.
|
||||
|
||||
---
|
||||
dlls/kernel32/path.c | 6 ++++--
|
||||
@ -10,10 +10,10 @@ Subject: [PATCH] kernel32: MoveFile should make sure that it has the delete
|
||||
2 files changed, 12 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c
|
||||
index c7c5cbd..855330b 100644
|
||||
index f554d14..d7fc20e 100644
|
||||
--- a/dlls/kernel32/path.c
|
||||
+++ b/dlls/kernel32/path.c
|
||||
@@ -1383,7 +1383,8 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
|
||||
@@ -1338,7 +1338,8 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
|
||||
attr.SecurityDescriptor = NULL;
|
||||
attr.SecurityQualityOfService = NULL;
|
||||
|
||||
@ -23,21 +23,21 @@ index c7c5cbd..855330b 100644
|
||||
if (status == STATUS_SUCCESS)
|
||||
status = wine_nt_to_unix_file_name( &nt_name, &source_unix, FILE_OPEN, FALSE );
|
||||
RtlFreeUnicodeString( &nt_name );
|
||||
@@ -1411,7 +1412,8 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
|
||||
options = FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT;
|
||||
if (flag & MOVEFILE_WRITE_THROUGH)
|
||||
options |= FILE_WRITE_THROUGH;
|
||||
- status = NtOpenFile( &dest_handle, GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, &attr, &io, 0, options );
|
||||
+ status = NtOpenFile( &dest_handle, GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, &attr, &io,
|
||||
+ FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, options );
|
||||
@@ -1362,7 +1363,8 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
|
||||
SetLastError( ERROR_PATH_NOT_FOUND );
|
||||
goto error;
|
||||
}
|
||||
- status = NtOpenFile( &dest_handle, GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, &attr, &io, 0,
|
||||
+ status = NtOpenFile( &dest_handle, GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, &attr, &io,
|
||||
+ FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,
|
||||
FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT );
|
||||
if (status == STATUS_SUCCESS) /* destination exists */
|
||||
{
|
||||
if (!(flag & MOVEFILE_REPLACE_EXISTING))
|
||||
diff --git a/dlls/kernel32/tests/file.c b/dlls/kernel32/tests/file.c
|
||||
index 07b3ffb..4729e75 100644
|
||||
index f0f9232..6fcf019 100644
|
||||
--- a/dlls/kernel32/tests/file.c
|
||||
+++ b/dlls/kernel32/tests/file.c
|
||||
@@ -1906,12 +1906,10 @@ static void test_MoveFileA(void)
|
||||
@@ -1905,12 +1905,10 @@ static void test_MoveFileA(void)
|
||||
ok(hmapfile != NULL, "CreateFileMapping: error %d\n", GetLastError());
|
||||
|
||||
ret = MoveFileA(source, dest);
|
||||
@ -54,7 +54,7 @@ index 07b3ffb..4729e75 100644
|
||||
|
||||
CloseHandle(hmapfile);
|
||||
CloseHandle(hfile);
|
||||
@@ -1926,12 +1924,10 @@ static void test_MoveFileA(void)
|
||||
@@ -1925,12 +1923,10 @@ static void test_MoveFileA(void)
|
||||
ok(hmapfile != NULL, "CreateFileMapping: error %d\n", GetLastError());
|
||||
|
||||
ret = MoveFileA(source, dest);
|
||||
@ -72,5 +72,5 @@ index 07b3ffb..4729e75 100644
|
||||
CloseHandle(hmapfile);
|
||||
CloseHandle(hfile);
|
||||
--
|
||||
1.9.1
|
||||
2.9.0
|
||||
|
||||
|
@ -1,50 +0,0 @@
|
||||
From 370536ad1d8c13a25567d940b86f29a614c66ad8 Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Thu, 2 Aug 2018 14:04:38 +0800
|
||||
Subject: [PATCH 1/3] kernel32: Add support for MOVEFILE_WRITE_THROUGH to
|
||||
MoveFile.
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
dlls/kernel32/path.c | 11 ++++++-----
|
||||
1 file changed, 6 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/path.c b/dlls/kernel32/path.c
|
||||
index a389743..6d2a902 100644
|
||||
--- a/dlls/kernel32/path.c
|
||||
+++ b/dlls/kernel32/path.c
|
||||
@@ -1283,6 +1283,7 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
|
||||
NTSTATUS status;
|
||||
HANDLE source_handle = 0, dest_handle;
|
||||
ANSI_STRING source_unix, dest_unix;
|
||||
+ DWORD options;
|
||||
|
||||
TRACE("(%s,%s,%p,%p,%04x)\n",
|
||||
debugstr_w(source), debugstr_w(dest), fnProgress, param, flag );
|
||||
@@ -1293,9 +1294,6 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
|
||||
if (!dest)
|
||||
return DeleteFileW( source );
|
||||
|
||||
- if (flag & MOVEFILE_WRITE_THROUGH)
|
||||
- FIXME("MOVEFILE_WRITE_THROUGH unimplemented\n");
|
||||
-
|
||||
/* check if we are allowed to rename the source */
|
||||
|
||||
if (!RtlDosPathNameToNtPathName_U( source, &nt_name, NULL, NULL ))
|
||||
@@ -1336,8 +1334,11 @@ BOOL WINAPI MoveFileWithProgressW( LPCWSTR source, LPCWSTR dest,
|
||||
SetLastError( ERROR_PATH_NOT_FOUND );
|
||||
goto error;
|
||||
}
|
||||
- status = NtOpenFile( &dest_handle, GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, &attr, &io, 0,
|
||||
- FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT );
|
||||
+
|
||||
+ options = FILE_NON_DIRECTORY_FILE | FILE_SYNCHRONOUS_IO_NONALERT;
|
||||
+ if (flag & MOVEFILE_WRITE_THROUGH)
|
||||
+ options |= FILE_WRITE_THROUGH;
|
||||
+ status = NtOpenFile( &dest_handle, GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, &attr, &io, 0, options );
|
||||
if (status == STATUS_SUCCESS) /* destination exists */
|
||||
{
|
||||
NtClose( dest_handle );
|
||||
--
|
||||
1.9.1
|
||||
|
@ -1,30 +0,0 @@
|
||||
From dfa61702f635d6ae7773e9e846800a77f179337c Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Thu, 2 Aug 2018 14:01:53 +0800
|
||||
Subject: [PATCH 2/3] server: Add support for FILE_WRITE_THROUGH to
|
||||
create_file() request.
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
server/file.c | 5 +++++
|
||||
1 file changed, 5 insertions(+)
|
||||
|
||||
diff --git a/server/file.c b/server/file.c
|
||||
index 446621a..9299530 100644
|
||||
--- a/server/file.c
|
||||
+++ b/server/file.c
|
||||
@@ -224,6 +224,11 @@ static struct object *create_file( struct fd *root, const char *nameptr, data_si
|
||||
default: set_error( STATUS_INVALID_PARAMETER ); goto done;
|
||||
}
|
||||
|
||||
+#ifdef O_DIRECT
|
||||
+ if (options & FILE_WRITE_THROUGH)
|
||||
+ flags |= O_DIRECT;
|
||||
+#endif
|
||||
+
|
||||
if (sd)
|
||||
{
|
||||
const SID *owner = sd_get_owner( sd );
|
||||
--
|
||||
1.9.1
|
||||
|
@ -1,27 +0,0 @@
|
||||
From 83896a0c6bf2756273793f5d998259e7545fe15e Mon Sep 17 00:00:00 2001
|
||||
From: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
Date: Thu, 2 Aug 2018 14:04:13 +0800
|
||||
Subject: [PATCH 3/3] kernel32: Add support for FILE_FLAG_WRITE_THROUGH to
|
||||
CreateFile.
|
||||
|
||||
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
|
||||
---
|
||||
dlls/kernel32/file.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/dlls/kernel32/file.c b/dlls/kernel32/file.c
|
||||
index 1e5b9fe..1b33cfb 100644
|
||||
--- a/dlls/kernel32/file.c
|
||||
+++ b/dlls/kernel32/file.c
|
||||
@@ -1560,6 +1560,8 @@ HANDLE WINAPI CreateFileW( LPCWSTR filename, DWORD access, DWORD sharing,
|
||||
options |= FILE_SYNCHRONOUS_IO_NONALERT;
|
||||
if (attributes & FILE_FLAG_RANDOM_ACCESS)
|
||||
options |= FILE_RANDOM_ACCESS;
|
||||
+ if (attributes & FILE_FLAG_WRITE_THROUGH)
|
||||
+ options |= FILE_WRITE_THROUGH;
|
||||
attributes &= FILE_ATTRIBUTE_VALID_FLAGS;
|
||||
|
||||
attr.Length = sizeof(attr);
|
||||
--
|
||||
1.9.1
|
||||
|
@ -2532,15 +2532,15 @@ fi
|
||||
# | * configure, configure.ac, dlls/api-ms-win-devices-config-l1-1-0/Makefile.in, dlls/api-ms-win-devices-config-l1-1-0/api-
|
||||
# | ms-win-devices-config-l1-1-0.spec, dlls/d3d8/tests/visual.c, dlls/d3d9/tests/visual.c, dlls/d3dcompiler_43/utils.c,
|
||||
# | dlls/ddraw/tests/ddraw7.c, dlls/dsound/sound3d.c, dlls/hidclass.sys/hid.h, dlls/hidclass.sys/main.c,
|
||||
# | dlls/hidclass.sys/pnp.c, dlls/kernel32/file.c, dlls/kernel32/path.c, dlls/kernel32/process.c, dlls/mpr/tests/mpr.c,
|
||||
# | dlls/mpr/wnet.c, dlls/msi/custom.c, dlls/msvcp60/ios.c, dlls/msvcp90/ios.c, dlls/ntoskrnl.exe/instr.c,
|
||||
# | dlls/odbc32/odbc32.spec, dlls/odbc32/proxyodbc.c, dlls/wbemprox/builtin.c, dlls/winebus.sys/bus.h,
|
||||
# | dlls/winebus.sys/bus_iohid.c, dlls/winebus.sys/bus_sdl.c, dlls/winebus.sys/bus_udev.c, dlls/winebus.sys/main.c,
|
||||
# | dlls/wined3d/utils.c, dlls/winevulkan/make_vulkan, dlls/winevulkan/vulkan.c, dlls/winevulkan/winevulkan.spec,
|
||||
# | dlls/winmm/tests/wave.c, dlls/winmm/waveform.c, dlls/wmp/player.c, dlls/wmp/tests/oleobj.c, libs/wine/loader.c,
|
||||
# | loader/wine.inf.in, programs/cmd/tests/test_builtins.cmd, programs/cmd/tests/test_builtins.cmd.exp,
|
||||
# | programs/cmd/wcmdmain.c, programs/msiexec/msiexec.c, programs/winecfg/resource.h, programs/winecfg/theme.c,
|
||||
# | programs/winecfg/winecfg.rc, programs/winemenubuilder/winemenubuilder.c, server/file.c, tools/make_specfiles
|
||||
# | dlls/hidclass.sys/pnp.c, dlls/kernel32/process.c, dlls/mpr/tests/mpr.c, dlls/mpr/wnet.c, dlls/msi/custom.c,
|
||||
# | dlls/msvcp60/ios.c, dlls/msvcp90/ios.c, dlls/ntoskrnl.exe/instr.c, dlls/odbc32/odbc32.spec, dlls/odbc32/proxyodbc.c,
|
||||
# | dlls/wbemprox/builtin.c, dlls/winebus.sys/bus.h, dlls/winebus.sys/bus_iohid.c, dlls/winebus.sys/bus_sdl.c,
|
||||
# | dlls/winebus.sys/bus_udev.c, dlls/winebus.sys/main.c, dlls/wined3d/utils.c, dlls/winevulkan/make_vulkan,
|
||||
# | dlls/winevulkan/vulkan.c, dlls/winevulkan/winevulkan.spec, dlls/winmm/tests/wave.c, dlls/winmm/waveform.c,
|
||||
# | dlls/wmp/player.c, dlls/wmp/tests/oleobj.c, libs/wine/loader.c, loader/wine.inf.in,
|
||||
# | programs/cmd/tests/test_builtins.cmd, programs/cmd/tests/test_builtins.cmd.exp, programs/cmd/wcmdmain.c,
|
||||
# | programs/msiexec/msiexec.c, programs/winecfg/resource.h, programs/winecfg/theme.c, programs/winecfg/winecfg.rc,
|
||||
# | programs/winemenubuilder/winemenubuilder.c, tools/make_specfiles
|
||||
# |
|
||||
if test "$enable_ml_patches" -eq 1; then
|
||||
patch_apply ml-patches/0001-wined3d-Fix-WINED3D_MCS_COLOR2.patch
|
||||
@ -2567,9 +2567,6 @@ if test "$enable_ml_patches" -eq 1; then
|
||||
patch_apply ml-patches/0022-kernel32-Set-environment-variable-PUBLIC-on-the-proc.patch
|
||||
patch_apply ml-patches/0023-wbemprox-Add-Win32_NetworkAdapterConfiguration-IPAdd.patch
|
||||
patch_apply ml-patches/0024-wbemprox-Add-Win32_NetworkAdapterConfiguration-IPSub.patch
|
||||
patch_apply ml-patches/0025-kernel32-Add-support-for-MOVEFILE_WRITE_THROUGH-to-M.patch
|
||||
patch_apply ml-patches/0026-server-Add-support-for-FILE_WRITE_THROUGH-to-create_.patch
|
||||
patch_apply ml-patches/0027-kernel32-Add-support-for-FILE_FLAG_WRITE_THROUGH-to-.patch
|
||||
patch_apply ml-patches/0028-cmd-Handle-quotes-when-parsing-the-folders-in-the-PA.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Stefan Dösinger", "wined3d: Fix WINED3D_MCS_COLOR2.", 1 },';
|
||||
@ -2596,9 +2593,6 @@ if test "$enable_ml_patches" -eq 1; then
|
||||
printf '%s\n' '+ { "Dmitry Timoshkov", "kernel32: Set environment variable %PUBLIC% on the process start-up.", 1 },';
|
||||
printf '%s\n' '+ { "Piotr Caban", "wbemprox: Add Win32_NetworkAdapterConfiguration::IPAddress property.", 1 },';
|
||||
printf '%s\n' '+ { "Piotr Caban", "wbemprox: Add Win32_NetworkAdapterConfiguration::IPSubnet property.", 1 },';
|
||||
printf '%s\n' '+ { "Dmitry Timoshkov", "kernel32: Add support for MOVEFILE_WRITE_THROUGH to MoveFile.", 1 },';
|
||||
printf '%s\n' '+ { "Dmitry Timoshkov", "server: Add support for FILE_WRITE_THROUGH to create_file() request.", 1 },';
|
||||
printf '%s\n' '+ { "Dmitry Timoshkov", "kernel32: Add support for FILE_FLAG_WRITE_THROUGH to CreateFile.", 1 },';
|
||||
printf '%s\n' '+ { "Fabian Maurer", "cmd: Handle quotes when parsing the folders in the PATH environment variable.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
@ -1,8 +1,8 @@
|
||||
From 56c696c4b60417a6b0e5e59a154542be0858e884 Mon Sep 17 00:00:00 2001
|
||||
From ae940533d113a6419605d09c874561af4cd292d4 Mon Sep 17 00:00:00 2001
|
||||
From: "Erich E. Hoover" <erich.e.hoover@gmail.com>
|
||||
Date: Fri, 18 Apr 2014 14:08:36 -0600
|
||||
Subject: [PATCH] server: Inherit security attributes from parent directories
|
||||
on creation. (try 7)
|
||||
Subject: server: Inherit security attributes from parent directories on
|
||||
creation. (try 7)
|
||||
|
||||
---
|
||||
dlls/advapi32/tests/security.c | 8 +--
|
||||
@ -10,10 +10,10 @@ Subject: [PATCH] server: Inherit security attributes from parent directories
|
||||
2 files changed, 141 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/advapi32/tests/security.c b/dlls/advapi32/tests/security.c
|
||||
index 4e6e4a2..dcc9840 100644
|
||||
index a85bb38..7be1db6 100644
|
||||
--- a/dlls/advapi32/tests/security.c
|
||||
+++ b/dlls/advapi32/tests/security.c
|
||||
@@ -3707,7 +3707,7 @@ static void test_CreateDirectoryA(void)
|
||||
@@ -3280,7 +3280,7 @@ static void test_CreateDirectoryA(void)
|
||||
(PSID *)&owner, NULL, &pDacl, NULL, &pSD);
|
||||
ok(error == ERROR_SUCCESS, "Failed to get permissions on file\n");
|
||||
test_inherited_dacl(pDacl, admin_sid, user_sid, INHERITED_ACE,
|
||||
@ -22,7 +22,7 @@ index 4e6e4a2..dcc9840 100644
|
||||
LocalFree(pSD);
|
||||
CloseHandle(hTemp);
|
||||
|
||||
@@ -3775,7 +3775,7 @@ static void test_CreateDirectoryA(void)
|
||||
@@ -3349,7 +3349,7 @@ static void test_CreateDirectoryA(void)
|
||||
(PSID *)&owner, NULL, &pDacl, NULL, &pSD);
|
||||
ok(error == ERROR_SUCCESS, "Failed to get permissions on file\n");
|
||||
test_inherited_dacl(pDacl, admin_sid, user_sid, INHERITED_ACE,
|
||||
@ -31,7 +31,7 @@ index 4e6e4a2..dcc9840 100644
|
||||
LocalFree(pSD);
|
||||
CloseHandle(hTemp);
|
||||
|
||||
@@ -3840,7 +3840,7 @@ static void test_CreateDirectoryA(void)
|
||||
@@ -3414,7 +3414,7 @@ static void test_CreateDirectoryA(void)
|
||||
ok(error == ERROR_SUCCESS, "Failed to get permissions on file\n");
|
||||
test_inherited_dacl(pDacl, admin_sid, user_sid,
|
||||
OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE | INHERITED_ACE,
|
||||
@ -40,7 +40,7 @@ index 4e6e4a2..dcc9840 100644
|
||||
LocalFree(pSD);
|
||||
bret = RemoveDirectoryA(tmpfile);
|
||||
ok(bret == TRUE, "RemoveDirectoryA failed with error %u\n", GetLastError());
|
||||
@@ -3921,7 +3921,7 @@ static void test_CreateDirectoryA(void)
|
||||
@@ -3495,7 +3495,7 @@ static void test_CreateDirectoryA(void)
|
||||
ok(error == ERROR_SUCCESS, "Failed to get permissions on file\n");
|
||||
test_inherited_dacl(pDacl, admin_sid, user_sid,
|
||||
OBJECT_INHERIT_ACE | CONTAINER_INHERIT_ACE | INHERITED_ACE,
|
||||
@ -50,7 +50,7 @@ index 4e6e4a2..dcc9840 100644
|
||||
CloseHandle(hTemp);
|
||||
|
||||
diff --git a/server/file.c b/server/file.c
|
||||
index 04bb840..0f83209 100644
|
||||
index 49f193d..6fbb71c 100644
|
||||
--- a/server/file.c
|
||||
+++ b/server/file.c
|
||||
@@ -71,6 +71,7 @@ struct file
|
||||
@ -61,7 +61,7 @@ index 04bb840..0f83209 100644
|
||||
|
||||
static void file_dump( struct object *obj, int verbose );
|
||||
static struct object_type *file_get_type( struct object *obj );
|
||||
@@ -230,11 +231,142 @@ static void set_xattr_sd( int fd, const struct security_descriptor *sd )
|
||||
@@ -225,11 +226,142 @@ static void set_xattr_sd( int fd, const struct security_descriptor *sd )
|
||||
xattr_fset( fd, WINE_XATTR_SD, buffer, len );
|
||||
}
|
||||
|
||||
@ -204,9 +204,9 @@ index 04bb840..0f83209 100644
|
||||
struct object *obj = NULL;
|
||||
struct fd *fd;
|
||||
int flags;
|
||||
@@ -268,6 +400,10 @@ static struct object *create_file( struct fd *root, const char *nameptr, data_si
|
||||
flags |= O_DIRECT;
|
||||
#endif
|
||||
@@ -258,6 +390,10 @@ static struct object *create_file( struct fd *root, const char *nameptr, data_si
|
||||
default: set_error( STATUS_INVALID_PARAMETER ); goto done;
|
||||
}
|
||||
|
||||
+ /* Note: inheritance of security descriptors only occurs on creation when sd is NULL */
|
||||
+ if (!sd && (create == FILE_CREATE || create == FILE_OVERWRITE_IF))
|
||||
@ -215,7 +215,7 @@ index 04bb840..0f83209 100644
|
||||
if (sd)
|
||||
{
|
||||
const SID *owner = sd_get_owner( sd );
|
||||
@@ -307,6 +443,7 @@ static struct object *create_file( struct fd *root, const char *nameptr, data_si
|
||||
@@ -297,6 +433,7 @@ static struct object *create_file( struct fd *root, const char *nameptr, data_si
|
||||
release_object( fd );
|
||||
|
||||
done:
|
||||
@ -224,5 +224,5 @@ index 04bb840..0f83209 100644
|
||||
return obj;
|
||||
}
|
||||
--
|
||||
1.9.1
|
||||
2.4.2
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user