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
1519d9e9
Commit
1519d9e9
authored
Aug 28, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Aug 29, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Fix several failing tests in Vista.
parent
67b23d02
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
+17
-7
security.c
dlls/advapi32/tests/security.c
+17
-7
No files found.
dlls/advapi32/tests/security.c
View file @
1519d9e9
...
...
@@ -1705,8 +1705,10 @@ static void test_security_descriptor(void)
}
}
#define TEST_GRANTED_ACCESS(a,b) test_granted_access(a,b,__LINE__)
static
void
test_granted_access
(
HANDLE
handle
,
ACCESS_MASK
access
,
int
line
)
#define TEST_GRANTED_ACCESS(a,b) test_granted_access(a,b,0,__LINE__)
#define TEST_GRANTED_ACCESS2(a,b,c) test_granted_access(a,b,c,__LINE__)
static
void
test_granted_access
(
HANDLE
handle
,
ACCESS_MASK
access
,
ACCESS_MASK
alt
,
int
line
)
{
OBJECT_BASIC_INFORMATION
obj_info
;
NTSTATUS
status
;
...
...
@@ -1720,8 +1722,13 @@ static void test_granted_access(HANDLE handle, ACCESS_MASK access, int line)
status
=
pNtQueryObject
(
handle
,
ObjectBasicInformation
,
&
obj_info
,
sizeof
(
obj_info
),
NULL
);
ok_
(
__FILE__
,
line
)(
!
status
,
"NtQueryObject with err: %08x
\n
"
,
status
);
ok_
(
__FILE__
,
line
)(
obj_info
.
GrantedAccess
==
access
,
"Granted access should "
"be 0x%08x, instead of 0x%08x
\n
"
,
access
,
obj_info
.
GrantedAccess
);
if
(
alt
)
ok_
(
__FILE__
,
line
)(
obj_info
.
GrantedAccess
==
access
||
obj_info
.
GrantedAccess
==
alt
,
"Granted access should be 0x%08x "
"or 0x%08x, instead of 0x%08x
\n
"
,
access
,
alt
,
obj_info
.
GrantedAccess
);
else
ok_
(
__FILE__
,
line
)(
obj_info
.
GrantedAccess
==
access
,
"Granted access should "
"be 0x%08x, instead of 0x%08x
\n
"
,
access
,
obj_info
.
GrantedAccess
);
}
#define CHECK_SET_SECURITY(o,i,e) \
...
...
@@ -1833,7 +1840,8 @@ static void test_process_security(void)
/* Doesn't matter what ACL say we should get full access for ourselves */
ok
(
CreateProcessA
(
NULL
,
buffer
,
&
psa
,
NULL
,
FALSE
,
0
,
NULL
,
NULL
,
&
startup
,
&
info
),
"CreateProcess with err:%d
\n
"
,
GetLastError
());
TEST_GRANTED_ACCESS
(
info
.
hProcess
,
PROCESS_ALL_ACCESS
);
TEST_GRANTED_ACCESS2
(
info
.
hProcess
,
PROCESS_ALL_ACCESS
,
STANDARD_RIGHTS_ALL
|
SPECIFIC_RIGHTS_ALL
);
winetest_wait_child_process
(
info
.
hProcess
);
CloseHandle
(
info
.
hProcess
);
...
...
@@ -1882,7 +1890,8 @@ static void test_process_security_child(void)
ok
(
DuplicateHandle
(
GetCurrentProcess
(),
GetCurrentProcess
(),
GetCurrentProcess
(),
&
handle
,
0
,
TRUE
,
DUPLICATE_SAME_ACCESS
),
"duplicating handle err:%d
\n
"
,
GetLastError
());
TEST_GRANTED_ACCESS
(
handle
,
PROCESS_ALL_ACCESS
);
TEST_GRANTED_ACCESS2
(
handle
,
PROCESS_ALL_ACCESS
,
STANDARD_RIGHTS_ALL
|
SPECIFIC_RIGHTS_ALL
);
CloseHandle
(
handle
);
...
...
@@ -1890,7 +1899,8 @@ static void test_process_security_child(void)
ok
(
DuplicateHandle
(
GetCurrentProcess
(),
GetCurrentProcess
(),
GetCurrentProcess
(),
&
handle
,
PROCESS_ALL_ACCESS
,
TRUE
,
0
),
"duplicating handle err:%d
\n
"
,
GetLastError
());
TEST_GRANTED_ACCESS
(
handle
,
PROCESS_ALL_ACCESS
);
TEST_GRANTED_ACCESS2
(
handle
,
PROCESS_ALL_ACCESS
,
STANDARD_RIGHTS_ALL
|
SPECIFIC_RIGHTS_ALL
);
ok
(
DuplicateHandle
(
GetCurrentProcess
(),
handle
,
GetCurrentProcess
(),
&
handle1
,
PROCESS_VM_READ
,
TRUE
,
0
),
"duplicating handle err:%d
\n
"
,
GetLastError
());
...
...
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