Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
8712db6f
Commit
8712db6f
authored
Aug 20, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 21, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Use proper access flags in CreatePipe.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8db78ecc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
sync.c
dlls/kernel32/sync.c
+3
-3
pipe.c
dlls/kernel32/tests/pipe.c
+5
-0
No files found.
dlls/kernel32/sync.c
View file @
8712db6f
...
...
@@ -2085,8 +2085,8 @@ BOOL WINAPI CreatePipe( PHANDLE hReadPipe, PHANDLE hWritePipe,
snprintfW
(
name
,
ARRAY_SIZE
(
name
),
nameFmt
,
GetCurrentProcessId
(),
++
index
);
RtlInitUnicodeString
(
&
nt_name
,
name
);
status
=
NtCreateNamedPipeFile
(
&
hr
,
GENERIC_READ
|
SYNCHRONIZE
,
&
attr
,
&
iosb
,
FILE_SHARE_WRITE
,
FILE_OVERWRITE_IF
,
status
=
NtCreateNamedPipeFile
(
&
hr
,
GENERIC_READ
|
FILE_WRITE_ATTRIBUTES
|
SYNCHRONIZE
,
&
attr
,
&
iosb
,
FILE_SHARE_WRITE
,
FILE_OVERWRITE_IF
,
FILE_SYNCHRONOUS_IO_NONALERT
,
FALSE
,
FALSE
,
FALSE
,
1
,
size
,
size
,
&
timeout
);
...
...
@@ -2099,7 +2099,7 @@ BOOL WINAPI CreatePipe( PHANDLE hReadPipe, PHANDLE hWritePipe,
/* from completion sakeness, I think system resources might be exhausted before this happens !! */
if
(
hr
==
INVALID_HANDLE_VALUE
)
return
FALSE
;
status
=
NtOpenFile
(
&
hw
,
GENERIC_WRITE
|
SYNCHRONIZE
,
&
attr
,
&
iosb
,
0
,
status
=
NtOpenFile
(
&
hw
,
GENERIC_WRITE
|
FILE_READ_ATTRIBUTES
|
SYNCHRONIZE
,
&
attr
,
&
iosb
,
0
,
FILE_SYNCHRONOUS_IO_NONALERT
|
FILE_NON_DIRECTORY_FILE
);
if
(
status
)
...
...
dlls/kernel32/tests/pipe.c
View file @
8712db6f
...
...
@@ -1534,6 +1534,11 @@ static void test_CreatePipe(void)
ok
(
CreatePipe
(
&
piperead
,
&
pipewrite
,
&
pipe_attr
,
0
)
!=
0
,
"CreatePipe failed
\n
"
);
test_pipe_info
(
piperead
,
FILE_PIPE_SERVER_END
,
4096
,
4096
,
1
);
test_pipe_info
(
pipewrite
,
0
,
4096
,
4096
,
1
);
test_file_access
(
piperead
,
SYNCHRONIZE
|
READ_CONTROL
|
FILE_WRITE_ATTRIBUTES
|
FILE_READ_ATTRIBUTES
|
FILE_READ_PROPERTIES
|
FILE_READ_DATA
);
test_file_access
(
pipewrite
,
SYNCHRONIZE
|
READ_CONTROL
|
FILE_WRITE_ATTRIBUTES
|
FILE_READ_ATTRIBUTES
|
FILE_WRITE_PROPERTIES
|
FILE_APPEND_DATA
|
FILE_WRITE_DATA
);
ok
(
WriteFile
(
pipewrite
,
PIPENAME
,
sizeof
(
PIPENAME
),
&
written
,
NULL
),
"Write to anonymous pipe failed
\n
"
);
ok
(
written
==
sizeof
(
PIPENAME
),
"Write to anonymous pipe wrote %d bytes
\n
"
,
written
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment