You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against bf454cc39428fc5299e5c26d9c0ddc6a9277c7ae.
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
From 79b09aa1d8a91ae923d9f951e1c316492a5edb39 Mon Sep 17 00:00:00 2001
|
||||
From dea43afaba40a2ab0744a4e5ac8a931ab81df5c2 Mon Sep 17 00:00:00 2001
|
||||
From: Qian Hong <qhong@codeweavers.com>
|
||||
Date: Fri, 17 Apr 2015 00:59:02 +0800
|
||||
Subject: [PATCH] ntdll/tests: Added tests to set disposition on file which is
|
||||
mapped to memory
|
||||
|
||||
---
|
||||
dlls/ntdll/tests/file.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++++-
|
||||
dlls/ntdll/tests/file.c | 71 ++++++++++++++++++++++++++++++++++++++++-
|
||||
1 file changed, 70 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index 0f4281d..cafafa1 100644
|
||||
index 9971a2b5702..4f6c0d7f847 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -2695,12 +2695,13 @@ static void test_file_disposition_information(void)
|
||||
@@ -2844,12 +2844,13 @@ static void test_file_disposition_information(void)
|
||||
{
|
||||
char tmp_path[MAX_PATH], buffer[MAX_PATH + 16];
|
||||
DWORD dirpos;
|
||||
@@ -27,9 +27,9 @@ index 0f4281d..cafafa1 100644
|
||||
|
||||
GetTempPathA( MAX_PATH, tmp_path );
|
||||
|
||||
@@ -3049,6 +3050,74 @@ todo_wine
|
||||
@@ -3195,6 +3196,74 @@ todo_wine
|
||||
ok( !fileDeleted, "Directory shouldn't have been deleted\n" );
|
||||
fileDeleted = RemoveDirectoryA( buffer );
|
||||
todo_wine
|
||||
ok( fileDeleted, "Directory should have been deleted\n" );
|
||||
+
|
||||
+ /* cannot set disposition on file with file mapping opened */
|
||||
@@ -103,5 +103,5 @@ index 0f4281d..cafafa1 100644
|
||||
|
||||
static void test_file_name_information(void)
|
||||
--
|
||||
1.9.1
|
||||
2.26.2
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
From 3a361998b65a72b219bc342cc88d6fe66cc9e45b Mon Sep 17 00:00:00 2001
|
||||
From f41db2526967d4e662fdcf8f602701af6e4e19f8 Mon Sep 17 00:00:00 2001
|
||||
From: Qian Hong <qhong@codeweavers.com>
|
||||
Date: Fri, 17 Apr 2015 18:39:59 +0800
|
||||
Subject: [PATCH] server: Do not allow to set disposition on file which has a
|
||||
@@ -10,10 +10,10 @@ Subject: [PATCH] server: Do not allow to set disposition on file which has a
|
||||
2 files changed, 12 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
|
||||
index c8979f6f..49c2de22 100644
|
||||
index 4f6c0d7f847..776de6d0cc8 100644
|
||||
--- a/dlls/ntdll/tests/file.c
|
||||
+++ b/dlls/ntdll/tests/file.c
|
||||
@@ -3060,7 +3060,6 @@ todo_wine
|
||||
@@ -3205,7 +3205,6 @@ todo_wine
|
||||
ok( mapping != NULL, "failed to create file mapping\n");
|
||||
fdi.DoDeleteFile = TRUE;
|
||||
res = pNtSetInformationFile( handle, &io, &fdi, sizeof fdi, FileDispositionInformation );
|
||||
@@ -21,7 +21,7 @@ index c8979f6f..49c2de22 100644
|
||||
ok( res == STATUS_CANNOT_DELETE, "unexpected FileDispositionInformation result (expected STATUS_CANNOT_DELETE, got %x)\n", res );
|
||||
CloseHandle( handle );
|
||||
fileDeleted = GetFileAttributesA( buffer ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
|
||||
@@ -3094,7 +3093,6 @@ todo_wine
|
||||
@@ -3239,7 +3238,6 @@ todo_wine
|
||||
CloseHandle( mapping );
|
||||
fdi.DoDeleteFile = TRUE;
|
||||
res = pNtSetInformationFile( handle, &io, &fdi, sizeof fdi, FileDispositionInformation );
|
||||
@@ -30,10 +30,10 @@ index c8979f6f..49c2de22 100644
|
||||
CloseHandle( handle );
|
||||
fileDeleted = GetFileAttributesA( buffer ) == INVALID_FILE_ATTRIBUTES && GetLastError() == ERROR_FILE_NOT_FOUND;
|
||||
diff --git a/server/fd.c b/server/fd.c
|
||||
index b700f235..34939d05 100644
|
||||
index 0a0683e5bce..2cbbdad6e62 100644
|
||||
--- a/server/fd.c
|
||||
+++ b/server/fd.c
|
||||
@@ -2309,6 +2309,7 @@ static struct fd *get_handle_fd_obj( struct process *process, obj_handle_t handl
|
||||
@@ -2487,6 +2487,7 @@ static int is_dir_empty( int fd )
|
||||
static void set_fd_disposition( struct fd *fd, int unlink )
|
||||
{
|
||||
struct stat st;
|
||||
@@ -41,8 +41,8 @@ index b700f235..34939d05 100644
|
||||
|
||||
if (!fd->inode)
|
||||
{
|
||||
@@ -2342,6 +2343,17 @@ static void set_fd_disposition( struct fd *fd, int unlink )
|
||||
return;
|
||||
@@ -2534,6 +2535,17 @@ static void set_fd_disposition( struct fd *fd, int unlink )
|
||||
}
|
||||
}
|
||||
|
||||
+ /* can't unlink files which are mapped to memory */
|
||||
@@ -60,5 +60,5 @@ index b700f235..34939d05 100644
|
||||
if (fd->options & FILE_DELETE_ON_CLOSE)
|
||||
fd->closed->unlink = -1;
|
||||
--
|
||||
2.19.1
|
||||
2.26.2
|
||||
|
||||
|
Reference in New Issue
Block a user