From 9acff7550de83767438f83207827e1154a0e9c5e Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Thu, 7 Apr 2016 10:02:42 +0200 Subject: [PATCH] ntdll: Do not update iosb.Status after FSCTL_PIPE_LISTEN call. Signed-off-by: Sebastian Lackner Signed-off-by: Alexandre Julliard --- dlls/kernel32/tests/pipe.c | 2 +- dlls/ntdll/file.c | 6 +++++- dlls/ntdll/tests/pipe.c | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dlls/kernel32/tests/pipe.c b/dlls/kernel32/tests/pipe.c index 77381f2ac19..a896843a9f2 100644 --- a/dlls/kernel32/tests/pipe.c +++ b/dlls/kernel32/tests/pipe.c @@ -2141,7 +2141,7 @@ static void test_overlapped_error(void) err = GetLastError(); ok(ret == FALSE, "ConnectNamedPipe succeeded\n"); ok(err == ERROR_PIPE_CONNECTED, "expected ERROR_PIPE_CONNECTED, got %u\n", err); - todo_wine ok(overlapped.Internal == STATUS_PENDING, "expected STATUS_PENDING, got %08lx\n", overlapped.Internal); + ok(overlapped.Internal == STATUS_PENDING, "expected STATUS_PENDING, got %08lx\n", overlapped.Internal); CloseHandle(file); CloseHandle(pipe); diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c index 46fea510298..7e5da599c31 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c @@ -1757,6 +1757,11 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc } break; + case FSCTL_PIPE_LISTEN: + status = server_ioctl_file( handle, event, apc, apc_context, io, code, + in_buffer, in_size, out_buffer, out_size ); + return status; + case FSCTL_PIPE_IMPERSONATE: FIXME("FSCTL_PIPE_IMPERSONATE: impersonating self\n"); status = RtlImpersonateSelf( SecurityImpersonation ); @@ -1797,7 +1802,6 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc io->Information = 0; status = STATUS_SUCCESS; break; - case FSCTL_PIPE_LISTEN: case FSCTL_PIPE_WAIT: default: status = server_ioctl_file( handle, event, apc, apc_context, io, code, diff --git a/dlls/ntdll/tests/pipe.c b/dlls/ntdll/tests/pipe.c index 0551d237f81..90ba950ae9a 100644 --- a/dlls/ntdll/tests/pipe.c +++ b/dlls/ntdll/tests/pipe.c @@ -308,7 +308,7 @@ static void test_overlapped(void) memset(&iosb, 0x55, sizeof(iosb)); res = listen_pipe(hPipe, hEvent, &iosb, TRUE); ok(res == STATUS_PIPE_CONNECTED, "NtFsControlFile returned %x\n", res); - todo_wine ok(U(iosb).Status == 0x55555555, "iosb.Status got changed to %x\n", U(iosb).Status); + ok(U(iosb).Status == 0x55555555, "iosb.Status got changed to %x\n", U(iosb).Status); CloseHandle(hClient); } @@ -392,7 +392,7 @@ static void test_alertable(void) todo_wine ok(res == STATUS_CANCELLED, "NtFsControlFile returned %x\n", res); ok(userapc_called, "user apc didn't run\n"); - todo_wine ok(U(iosb).Status == 0x55555555, "iosb.Status got changed to %x\n", U(iosb).Status); + ok(U(iosb).Status == 0x55555555, "iosb.Status got changed to %x\n", U(iosb).Status); ok(WaitForSingleObjectEx(hEvent, 0, TRUE) == WAIT_TIMEOUT, "hEvent signaled\n"); ok(!ioapc_called, "IOAPC ran\n");