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
92f9cb6c
Commit
92f9cb6c
authored
Dec 30, 2010
by
André Hentschel
Committed by
Alexandre Julliard
Dec 31, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Don't test function directly when reporting GetLastError().
parent
145031b8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
16 deletions
+19
-16
cred.c
dlls/advapi32/tests/cred.c
+4
-4
security.c
dlls/advapi32/tests/security.c
+11
-9
service.c
dlls/advapi32/tests/service.c
+4
-3
No files found.
dlls/advapi32/tests/cred.c
View file @
92f9cb6c
...
...
@@ -156,10 +156,10 @@ static void test_CredReadDomainCredentialsA(void)
* does not check for NULL output pointers and try to zero them out early */
if
(
0
)
{
ok
(
!
pCredReadDomainCredentialsA
(
&
info
,
0
,
NULL
,
&
creds
)
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"!
\n
"
);
ok
(
!
pCredReadDomainCredentialsA
(
&
info
,
0
,
&
count
,
NULL
)
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"!
\n
"
);
ret
=
pCredReadDomainCredentialsA
(
&
info
,
0
,
NULL
,
&
creds
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"!
\n
"
);
ret
=
pCredReadDomainCredentialsA
(
&
info
,
0
,
&
count
,
NULL
);
ok
(
!
ret
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"!
\n
"
);
}
SetLastError
(
0xdeadbeef
);
...
...
dlls/advapi32/tests/security.c
View file @
92f9cb6c
...
...
@@ -2293,8 +2293,8 @@ static void test_process_security(void)
psa
.
bInheritHandle
=
TRUE
;
/* 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
());
res
=
CreateProcessA
(
NULL
,
buffer
,
&
psa
,
NULL
,
FALSE
,
0
,
NULL
,
NULL
,
&
startup
,
&
info
);
ok
(
res
,
"CreateProcess with err:%d
\n
"
,
GetLastError
());
TEST_GRANTED_ACCESS2
(
info
.
hProcess
,
PROCESS_ALL_ACCESS
,
STANDARD_RIGHTS_ALL
|
SPECIFIC_RIGHTS_ALL
);
winetest_wait_child_process
(
info
.
hProcess
);
...
...
@@ -3008,6 +3008,7 @@ static void test_PrivateObjectSecurity(void)
LPSTR
string
;
ULONG
len
;
PSECURITY_DESCRIPTOR
buf
;
BOOL
ret
;
if
(
!
pConvertStringSecurityDescriptorToSecurityDescriptorA
)
{
...
...
@@ -3046,25 +3047,26 @@ static void test_PrivateObjectSecurity(void)
GetSecurityDescriptorControl
(
sec
,
&
ctrl
,
&
dwRevision
);
expect_eq
(
ctrl
,
0x9014
,
int
,
"%x"
);
ok
(
GetPrivateObjectSecurity
(
sec
,
GROUP_SECURITY_INFORMATION
,
buf
,
dwDescSize
,
&
retSize
),
"GetPrivateObjectSecurity failed (err=%u)
\n
"
,
GetLastError
());
ret
=
GetPrivateObjectSecurity
(
sec
,
GROUP_SECURITY_INFORMATION
,
buf
,
dwDescSize
,
&
retSize
);
ok
(
ret
,
"GetPrivateObjectSecurity failed (err=%u)
\n
"
,
GetLastError
());
ok
(
retSize
<=
dwDescSize
,
"Buffer too small (%d vs %d)
\n
"
,
retSize
,
dwDescSize
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
buf
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conversion failed
\n
"
);
CHECK_RESULT_AND_FREE
(
"G:S-1-5-21-93476-23408-4576"
);
GetSecurityDescriptorControl
(
buf
,
&
ctrl
,
&
dwRevision
);
expect_eq
(
ctrl
,
0x8000
,
int
,
"%x"
);
ok
(
GetPrivateObjectSecurity
(
sec
,
GROUP_SECURITY_INFORMATION
|
DACL_SECURITY_INFORMATION
,
buf
,
dwDescSize
,
&
retSize
),
"GetPrivateObjectSecurity failed (err=%u)
\n
"
,
GetLastError
());
ret
=
GetPrivateObjectSecurity
(
sec
,
GROUP_SECURITY_INFORMATION
|
DACL_SECURITY_INFORMATION
,
buf
,
dwDescSize
,
&
retSize
);
ok
(
ret
,
"GetPrivateObjectSecurity failed (err=%u)
\n
"
,
GetLastError
());
ok
(
retSize
<=
dwDescSize
,
"Buffer too small (%d vs %d)
\n
"
,
retSize
,
dwDescSize
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
buf
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conversion failed err=%u
\n
"
,
GetLastError
());
ret
=
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
buf
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
);
ok
(
ret
,
"Conversion failed err=%u
\n
"
,
GetLastError
());
CHECK_ONE_OF_AND_FREE
(
"G:S-1-5-21-93476-23408-4576D:(A;NP;GAGXGWGR;;;SU)(A;IOID;CCDC;;;SU)(D;OICI;0xffffffff;;;S-1-5-21-93476-23408-4576)"
,
"G:S-1-5-21-93476-23408-4576D:P(A;NP;GAGXGWGR;;;SU)(A;IOID;CCDC;;;SU)(D;OICI;0xffffffff;;;S-1-5-21-93476-23408-4576)"
);
/* Win7 */
GetSecurityDescriptorControl
(
buf
,
&
ctrl
,
&
dwRevision
);
expect_eq
(
ctrl
&
(
~
SE_DACL_PROTECTED
),
0x8004
,
int
,
"%x"
);
ok
(
GetPrivateObjectSecurity
(
sec
,
sec_info
,
buf
,
dwDescSize
,
&
retSize
),
"GetPrivateObjectSecurity failed (err=%u)
\n
"
,
GetLastError
());
ret
=
GetPrivateObjectSecurity
(
sec
,
sec_info
,
buf
,
dwDescSize
,
&
retSize
);
ok
(
ret
,
"GetPrivateObjectSecurity failed (err=%u)
\n
"
,
GetLastError
());
ok
(
retSize
==
dwDescSize
,
"Buffer too small (%d vs %d)
\n
"
,
retSize
,
dwDescSize
);
ok
(
pConvertSecurityDescriptorToStringSecurityDescriptorA
(
buf
,
SDDL_REVISION_1
,
sec_info
,
&
string
,
&
len
),
"Conversion failed
\n
"
);
CHECK_ONE_OF_AND_FREE
(
"O:SY"
...
...
dlls/advapi32/tests/service.c
View file @
92f9cb6c
...
...
@@ -1840,9 +1840,10 @@ static void test_sequence(void)
}
ok
(
!
strcmp
(
config
->
lpServiceStartName
,
localsystem
),
"Expected 'LocalSystem', got '%s'
\n
"
,
config
->
lpServiceStartName
);
ok
(
!
strcmp
(
config
->
lpDisplayName
,
displayname
),
"Expected '%s', got '%s'
\n
"
,
displayname
,
config
->
lpDisplayName
);
ok
(
ChangeServiceConfigA
(
svc_handle
,
SERVICE_NO_CHANGE
,
SERVICE_NO_CHANGE
,
SERVICE_ERROR_NORMAL
,
NULL
,
"TestGroup2"
,
NULL
,
NULL
,
NULL
,
NULL
,
displayname2
),
"ChangeServiceConfig failed (err=%d)
\n
"
,
GetLastError
());
ret
=
ChangeServiceConfigA
(
svc_handle
,
SERVICE_NO_CHANGE
,
SERVICE_NO_CHANGE
,
SERVICE_ERROR_NORMAL
,
NULL
,
"TestGroup2"
,
NULL
,
NULL
,
NULL
,
NULL
,
displayname2
);
ok
(
ret
,
"ChangeServiceConfig failed (err=%d)
\n
"
,
GetLastError
());
QueryServiceConfigA
(
svc_handle
,
NULL
,
0
,
&
needed
);
config
=
HeapReAlloc
(
GetProcessHeap
(),
0
,
config
,
needed
);
...
...
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