From 962017beef4a0405e4fece0075e286e445da55da Mon Sep 17 00:00:00 2001 From: Jinoh Kang Date: Sat, 19 Oct 2024 20:14:15 +0900 Subject: [PATCH] server: Implement more FSCTLs on \Device\NamedPipe and \Device\NamedPipe\. --- dlls/ntdll/tests/pipe.c | 1 - server/named_pipe.c | 11 +++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/dlls/ntdll/tests/pipe.c b/dlls/ntdll/tests/pipe.c index 6816d7d4e2d..df693d07cbd 100644 --- a/dlls/ntdll/tests/pipe.c +++ b/dlls/ntdll/tests/pipe.c @@ -2731,7 +2731,6 @@ static void subtest_empty_name_pipe_operations(HANDLE handle) WaitForSingleObject(event, INFINITE); status = io.Status; } - todo_wine_if(ft->status != STATUS_NOT_SUPPORTED) ok(status == ft->status || (ft->status_broken && broken(status == ft->status_broken)), "NtFsControlFile(%s) on \\Device\\NamedPipe: expected %#lx, got %#lx\n", ft->name, ft->status, status); diff --git a/server/named_pipe.c b/server/named_pipe.c index 5ba43dc8582..59a90c36663 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c @@ -1506,9 +1506,20 @@ static void named_pipe_device_ioctl( struct fd *fd, ioctl_code_t code, struct as switch(code) { case FSCTL_PIPE_WAIT: + case FSCTL_PIPE_LISTEN: + case FSCTL_PIPE_IMPERSONATE: set_error( STATUS_ILLEGAL_FUNCTION ); return; + case FSCTL_PIPE_DISCONNECT: + case FSCTL_PIPE_TRANSCEIVE: + set_error( STATUS_PIPE_DISCONNECTED ); + return; + + case FSCTL_PIPE_QUERY_CLIENT_PROCESS: + set_error( STATUS_INVALID_PARAMETER ); + return; + default: default_fd_ioctl( fd, code, async ); }