ntdll: NtFlushBuffersFile should fail if the file handle has no write access.

Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Paul Gofman 2017-03-01 14:05:54 +03:00 committed by Alexandre Julliard
parent 85aa2067b0
commit f7d40d45da
2 changed files with 1 additions and 2 deletions

View File

@ -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 )
{

View File

@ -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);