Dmitry Timoshkov dmitry@baikal.ru writes:
@@ -238,7 +238,7 @@ static const struct object_ops named_pipe_device_ops = no_satisfied, /* satisfied */ no_signal, /* signal */ named_pipe_device_get_fd, /* get_fd */
- no_map_access, /* map_access */
- named_pipe_map_access, /* map_access */ default_get_sd, /* get_sd */ default_set_sd, /* set_sd */ named_pipe_device_lookup_name, /* lookup_name */
@@ -270,10 +270,10 @@ static void named_pipe_dump( struct object *obj, int verbose )
static unsigned int named_pipe_map_access( struct object *obj, unsigned int access ) {
- if (access & GENERIC_READ) access |= STANDARD_RIGHTS_READ;
- if (access & GENERIC_READ) access |= STANDARD_RIGHTS_READ | FILE_READ_ATTRIBUTES; if (access & GENERIC_WRITE) access |= STANDARD_RIGHTS_WRITE | FILE_CREATE_PIPE_INSTANCE; if (access & GENERIC_EXECUTE) access |= STANDARD_RIGHTS_EXECUTE;
- if (access & GENERIC_ALL) access |= STANDARD_RIGHTS_ALL;
- if (access & GENERIC_ALL) access |= STANDARD_RIGHTS_ALL | FILE_READ_ATTRIBUTES | FILE_CREATE_PIPE_INSTANCE; return access & ~(GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE | GENERIC_ALL);
Why do you need this for the device?
Alexandre Julliard julliard@winehq.org wrote:
Why do you need this for the device?
Because of ../../../tools/runtest -q -P wine -M kernel32.dll -T ../../.. -p kernel32_test.exe.so pipe.c && touch pipe.ok pipe.c:109: Test failed: WaitNamedPipe failed (3) pipe.c:116: Test failed: wrong error 3 pipe.c:109: Test failed: WaitNamedPipe failed (3) pipe.c:116: Test failed: wrong error 3
WaitNamedPipeW() opens a pipe device with FILE_READ_ATTRIBUTES.
Dmitry Timoshkov dmitry@baikal.ru writes:
Alexandre Julliard julliard@winehq.org wrote:
Why do you need this for the device?
Because of ../../../tools/runtest -q -P wine -M kernel32.dll -T ../../.. -p kernel32_test.exe.so pipe.c && touch pipe.ok pipe.c:109: Test failed: WaitNamedPipe failed (3) pipe.c:116: Test failed: wrong error 3 pipe.c:109: Test failed: WaitNamedPipe failed (3) pipe.c:116: Test failed: wrong error 3
WaitNamedPipeW() opens a pipe device with FILE_READ_ATTRIBUTES.
That doesn't mean it should use the same access as a named pipe object.
Alexandre Julliard julliard@winehq.org wrote:
Why do you need this for the device?
Because of ../../../tools/runtest -q -P wine -M kernel32.dll -T ../../.. -p kernel32_test.exe.so pipe.c && touch pipe.ok pipe.c:109: Test failed: WaitNamedPipe failed (3) pipe.c:116: Test failed: wrong error 3 pipe.c:109: Test failed: WaitNamedPipe failed (3) pipe.c:116: Test failed: wrong error 3
WaitNamedPipeW() opens a pipe device with FILE_READ_ATTRIBUTES.
That doesn't mean it should use the same access as a named pipe object.
Yes, but currently it fails because default read access rights don't contain FILE_READ_ATTRIBUTES, and while write access does specify FILE_CREATE_PIPE_INSTANCE all access doesn't contain FILE_CREATE_PIPE_INSTANCE access.