Module: wine Branch: master Commit: d4e0f0a12fdca62fea49a635418d19eb0c0d72af URL: https://source.winehq.org/git/wine.git/?a=commit;h=d4e0f0a12fdca62fea49a6354...
Author: Jacek Caban jacek@codeweavers.com Date: Mon Aug 20 19:29:56 2018 +0200
server: Require FILE_READ_ATTRIBUTES access in get_named_pipe_info.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ntdll/tests/pipe.c | 6 ++++-- server/named_pipe.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/tests/pipe.c b/dlls/ntdll/tests/pipe.c index 1d77d88..ebf228d 100644 --- a/dlls/ntdll/tests/pipe.c +++ b/dlls/ntdll/tests/pipe.c @@ -756,16 +756,18 @@ static void test_filepipeinfo(void)
res = pNtQueryInformationFile(hClient, &iosb, &local_info, sizeof(local_info), FilePipeLocalInformation); - todo_wine ok(res == STATUS_ACCESS_DENIED, "NtQueryInformationFile(FilePipeLocalInformation) returned: %x\n", res);
res = pNtQueryInformationFile(hClient, &iosb, &local_info, sizeof(local_info), FilePipeInformation); - todo_wine ok(res == STATUS_ACCESS_DENIED, "NtQueryInformationFile(FilePipeInformation) returned: %x\n", res);
+ res = pNtQueryInformationFile(hClient, &iosb, &local_info, sizeof(local_info), + FileNameInformation); + ok(res == STATUS_SUCCESS, "NtQueryInformationFile(FileNameInformation) returned: %x\n", res); + CloseHandle(hClient); CloseHandle(hServer); } diff --git a/server/named_pipe.c b/server/named_pipe.c index ba6f507..c006acb 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c @@ -1284,7 +1284,7 @@ DECL_HANDLER(get_named_pipe_info)
clear_error(); pipe_end = (struct pipe_end *)get_handle_obj( current->process, req->handle, - 0, &pipe_client_ops ); + FILE_READ_ATTRIBUTES, &pipe_client_ops ); if (!pipe_end) return; }