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
d574e794
Commit
d574e794
authored
Mar 16, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Mar 29, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Add event security access tests.
parent
9c29e421
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
security.c
dlls/advapi32/tests/security.c
+22
-0
No files found.
dlls/advapi32/tests/security.c
View file @
d574e794
...
...
@@ -4104,6 +4104,27 @@ static void test_mutex_security(HANDLE token)
CloseHandle
(
mutex
);
}
static
void
test_event_security
(
HANDLE
token
)
{
HANDLE
event
;
GENERIC_MAPPING
mapping
=
{
STANDARD_RIGHTS_READ
,
STANDARD_RIGHTS_WRITE
,
STANDARD_RIGHTS_EXECUTE
|
SYNCHRONIZE
,
STANDARD_RIGHTS_ALL
|
EVENT_ALL_ACCESS
};
SetLastError
(
0xdeadbeef
);
event
=
OpenEvent
(
0
,
FALSE
,
"WineTestEvent"
);
ok
(
!
event
,
"event should not exist
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"wrong error %u
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
event
=
CreateEvent
(
NULL
,
FALSE
,
FALSE
,
"WineTestEvent"
);
ok
(
event
!=
0
,
"CreateEvent error %d
\n
"
,
GetLastError
());
test_default_handle_security
(
token
,
event
,
&
mapping
);
CloseHandle
(
event
);
}
static
BOOL
validate_impersonation_token
(
HANDLE
token
,
DWORD
*
token_type
)
{
DWORD
ret
,
needed
;
...
...
@@ -4175,6 +4196,7 @@ static void test_kernel_objects_security(void)
ok
(
token_type
==
TokenImpersonation
,
"expected TokenImpersonation, got %d
\n
"
,
token_type
);
test_mutex_security
(
token
);
test_event_security
(
token
);
/* FIXME: test other kernel object types */
CloseHandle
(
process_token
);
...
...
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