mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Added patch to fix sharing violation on temp file for piped output.
This commit is contained in:
parent
bf4a98280f
commit
cf612d0c07
@ -0,0 +1,50 @@
|
||||
From 11e2cd323ec804c3c28f6f0b29182c17c85349c7 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Thu, 7 Jan 2016 05:38:36 +0100
|
||||
Subject: cmd: Fix sharing permissions for pipe file.
|
||||
|
||||
---
|
||||
programs/cmd/tests/test_builtins.cmd.exp | 2 +-
|
||||
programs/cmd/wcmdmain.c | 6 +++---
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
|
||||
index 811ba9f..7543b53 100644
|
||||
--- a/programs/cmd/tests/test_builtins.cmd.exp
|
||||
+++ b/programs/cmd/tests/test_builtins.cmd.exp
|
||||
@@ -1207,7 +1207,7 @@ passed
|
||||
--- a batch file can delete itself
|
||||
file correctly deleted
|
||||
--- a batch file can alter itself
|
||||
-@todo_wine@bar
|
||||
+bar
|
||||
---------- Testing copy
|
||||
Passed: Found expected dummy.file
|
||||
Passed: Found expected dir1\file1
|
||||
diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
|
||||
index bf988f5..de92e0a 100644
|
||||
--- a/programs/cmd/wcmdmain.c
|
||||
+++ b/programs/cmd/wcmdmain.c
|
||||
@@ -1364,7 +1364,7 @@ void WCMD_execute (const WCHAR *command, const WCHAR *redirects,
|
||||
if (cmdList && (*cmdList)->pipeFile[0] != 0x00) {
|
||||
WINE_TRACE("Input coming from %s\n", wine_dbgstr_w((*cmdList)->pipeFile));
|
||||
h = CreateFileW((*cmdList)->pipeFile, GENERIC_READ,
|
||||
- FILE_SHARE_READ, &sa, OPEN_EXISTING,
|
||||
+ FILE_SHARE_READ | FILE_SHARE_WRITE, &sa, OPEN_EXISTING,
|
||||
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_DELETE_ON_CLOSE, NULL);
|
||||
if (h == INVALID_HANDLE_VALUE) {
|
||||
WCMD_print_error ();
|
||||
@@ -1425,8 +1425,8 @@ void WCMD_execute (const WCHAR *command, const WCHAR *redirects,
|
||||
|
||||
} else {
|
||||
WCHAR *param = WCMD_parameter(p, 0, NULL, FALSE, FALSE);
|
||||
- h = CreateFileW(param, GENERIC_WRITE, 0, &sa, creationDisposition,
|
||||
- FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
+ h = CreateFileW(param, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_DELETE,
|
||||
+ &sa, creationDisposition, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if (h == INVALID_HANDLE_VALUE) {
|
||||
WCMD_print_error ();
|
||||
heap_free(cmd);
|
||||
--
|
||||
2.6.4
|
||||
|
1
patches/cmd-Fix_Sharing/definition
Normal file
1
patches/cmd-Fix_Sharing/definition
Normal file
@ -0,0 +1 @@
|
||||
Fixes: [34174] Fix sharing violation on temp file for piped output
|
@ -93,6 +93,7 @@ patch_enable_all ()
|
||||
enable_api_ms_win_crt_Stub_DLLs="$1"
|
||||
enable_authz_Stub_Functions="$1"
|
||||
enable_browseui_Progress_Dialog="$1"
|
||||
enable_cmd_Fix_Sharing="$1"
|
||||
enable_comctl32_Button_Theming="$1"
|
||||
enable_comctl32_PROPSHEET_InsertPage="$1"
|
||||
enable_configure_Absolute_RPATH="$1"
|
||||
@ -394,6 +395,9 @@ patch_enable ()
|
||||
category-stable)
|
||||
enable_category_stable="$2"
|
||||
;;
|
||||
cmd-Fix_Sharing)
|
||||
enable_cmd_Fix_Sharing="$2"
|
||||
;;
|
||||
comctl32-Button_Theming)
|
||||
enable_comctl32_Button_Theming="$2"
|
||||
;;
|
||||
@ -2376,6 +2380,21 @@ if test "$enable_browseui_Progress_Dialog" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset cmd-Fix_Sharing
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#34174] Fix sharing violation on temp file for piped output
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * programs/cmd/tests/test_builtins.cmd.exp, programs/cmd/wcmdmain.c
|
||||
# |
|
||||
if test "$enable_cmd_Fix_Sharing" -eq 1; then
|
||||
patch_apply cmd-Fix_Sharing/0001-cmd-Fix-sharing-permissions-for-pipe-file.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "cmd: Fix sharing permissions for pipe file.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset comctl32-Button_Theming
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
Loading…
Reference in New Issue
Block a user