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
b49e1c29
Commit
b49e1c29
authored
Jan 02, 2011
by
André Hentschel
Committed by
Alexandre Julliard
Jan 03, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Don't test function directly when reporting GetLastError().
parent
45e2bd7c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
security.c
dlls/advapi32/tests/security.c
+12
-12
No files found.
dlls/advapi32/tests/security.c
View file @
b49e1c29
...
...
@@ -2318,9 +2318,9 @@ static void test_process_security_child(void)
ok
(
handle
!=
NULL
,
"OpenProcess(PROCESS_TERMINATE) with err:%d
\n
"
,
GetLastError
());
TEST_GRANTED_ACCESS
(
handle
,
PROCESS_TERMINATE
);
ok
(
DuplicateHandle
(
GetCurrentProcess
(),
handle
,
GetCurrentProcess
(),
&
handle1
,
0
,
TRUE
,
DUPLICATE_SAME_ACCESS
),
"duplicating handle err:%d
\n
"
,
GetLastError
());
ret
=
DuplicateHandle
(
GetCurrentProcess
(),
handle
,
GetCurrentProcess
(),
&
handle1
,
0
,
TRUE
,
DUPLICATE_SAME_ACCESS
);
ok
(
ret
,
"duplicating handle err:%d
\n
"
,
GetLastError
());
TEST_GRANTED_ACCESS
(
handle1
,
PROCESS_TERMINATE
);
CloseHandle
(
handle1
);
...
...
@@ -2344,23 +2344,23 @@ static void test_process_security_child(void)
ok
(
handle
==
NULL
,
"OpenProcess(PROCESS_ALL_ACCESS) should have failed
\n
"
);
/* Documented privilege elevation */
ok
(
DuplicateHandle
(
GetCurrentProcess
(),
GetCurrentProcess
(),
GetCurrentProcess
(),
&
handle
,
0
,
TRUE
,
DUPLICATE_SAME_ACCESS
),
"duplicating handle err:%d
\n
"
,
GetLastError
());
ret
=
DuplicateHandle
(
GetCurrentProcess
(),
GetCurrentProcess
(),
GetCurrentProcess
(),
&
handle
,
0
,
TRUE
,
DUPLICATE_SAME_ACCESS
);
ok
(
ret
,
"duplicating handle err:%d
\n
"
,
GetLastError
());
TEST_GRANTED_ACCESS2
(
handle
,
PROCESS_ALL_ACCESS
,
STANDARD_RIGHTS_ALL
|
SPECIFIC_RIGHTS_ALL
);
CloseHandle
(
handle
);
/* Same only explicitly asking for all access rights */
ok
(
DuplicateHandle
(
GetCurrentProcess
(),
GetCurrentProcess
(),
GetCurrentProcess
(),
&
handle
,
PROCESS_ALL_ACCESS
,
TRUE
,
0
),
"duplicating handle err:%d
\n
"
,
GetLastError
());
ret
=
DuplicateHandle
(
GetCurrentProcess
(),
GetCurrentProcess
(),
GetCurrentProcess
(),
&
handle
,
PROCESS_ALL_ACCESS
,
TRUE
,
0
);
ok
(
ret
,
"duplicating handle err:%d
\n
"
,
GetLastError
());
TEST_GRANTED_ACCESS2
(
handle
,
PROCESS_ALL_ACCESS
,
PROCESS_ALL_ACCESS
|
PROCESS_QUERY_LIMITED_INFORMATION
);
ok
(
DuplicateHandle
(
GetCurrentProcess
(),
handle
,
GetCurrentProcess
(),
&
handle1
,
PROCESS_VM_READ
,
TRUE
,
0
),
"duplicating handle err:%d
\n
"
,
GetLastError
());
ret
=
DuplicateHandle
(
GetCurrentProcess
(),
handle
,
GetCurrentProcess
(),
&
handle1
,
PROCESS_VM_READ
,
TRUE
,
0
);
ok
(
ret
,
"duplicating handle err:%d
\n
"
,
GetLastError
());
TEST_GRANTED_ACCESS
(
handle1
,
PROCESS_VM_READ
);
CloseHandle
(
handle1
);
CloseHandle
(
handle
);
...
...
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