Paul Gofman : ntdll: NtFlushBuffersFile should fail if the file handle has no write access.
Alexandre Julliard
julliard at winehq.org
Thu Mar 2 16:09:56 CST 2017
Module: wine
Branch: master
Commit: f7d40d45da7a1bc0accd58bca6d6da4e34861937
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f7d40d45da7a1bc0accd58bca6d6da4e34861937
Author: Paul Gofman <gofmanp at gmail.com>
Date: Wed Mar 1 14:05:54 2017 +0300
ntdll: NtFlushBuffersFile should fail if the file handle has no write access.
Signed-off-by: Paul Gofman <gofmanp at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/ntdll/file.c | 2 +-
dlls/ntdll/tests/file.c | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c
index fd7f3dd..3f38c6f 100644
--- a/dlls/ntdll/file.c
+++ b/dlls/ntdll/file.c
@@ -3423,7 +3423,7 @@ NTSTATUS WINAPI NtFlushBuffersFile( HANDLE hFile, IO_STATUS_BLOCK* IoStatusBlock
{
ret = COMM_FlushBuffersFile( fd );
}
- else
+ else if (ret != STATUS_ACCESS_DENIED)
{
SERVER_START_REQ( flush )
{
diff --git a/dlls/ntdll/tests/file.c b/dlls/ntdll/tests/file.c
index bc1afdf..3d91cb1 100644
--- a/dlls/ntdll/tests/file.c
+++ b/dlls/ntdll/tests/file.c
@@ -4429,7 +4429,6 @@ static void test_flush_buffers_file(void)
ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %#x.\n", status);
status = pNtFlushBuffersFile(hfileread, &io_status_block);
- todo_wine
ok(status == STATUS_ACCESS_DENIED, "expected STATUS_ACCESS_DENIED, got %#x.\n", status);
status = pNtFlushBuffersFile(NULL, &io_status_block);
More information about the wine-cvs
mailing list