mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 19:49:50 +00:00
server: Sharing 0 is not allowed for named pipes.
This commit is contained in:
parent
5098b13177
commit
bded698462
2 changed files with 7 additions and 1 deletions
|
@ -150,7 +150,7 @@ static void test_create_invalid(void)
|
|||
/* create a pipe with sharing = 0 */
|
||||
res = pNtCreateNamedPipeFile(&handle, FILE_READ_ATTRIBUTES | SYNCHRONIZE, &attr, &iosb, 0, 2 /*FILE_CREATE*/,
|
||||
0, 1, 0, 0, 0xFFFFFFFF, 500, 500, &timeout);
|
||||
todo_wine ok(res == STATUS_INVALID_PARAMETER, "NtCreateNamedPipeFile returned %x\n", res);
|
||||
ok(res == STATUS_INVALID_PARAMETER, "NtCreateNamedPipeFile returned %x\n", res);
|
||||
if (!res)
|
||||
CloseHandle(handle);
|
||||
|
||||
|
|
|
@ -940,6 +940,12 @@ DECL_HANDLER(create_named_pipe)
|
|||
struct unicode_str name;
|
||||
struct directory *root = NULL;
|
||||
|
||||
if (!req->sharing || (req->sharing & ~(FILE_SHARE_READ | FILE_SHARE_WRITE)))
|
||||
{
|
||||
set_error( STATUS_INVALID_PARAMETER );
|
||||
return;
|
||||
}
|
||||
|
||||
reply->handle = 0;
|
||||
get_req_unicode_str( &name );
|
||||
if (req->rootdir && !(root = get_directory_obj( current->process, req->rootdir, 0 )))
|
||||
|
|
Loading…
Reference in a new issue