Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
e38d5695
Commit
e38d5695
authored
Dec 09, 2008
by
Paul Vriens
Committed by
Alexandre Julliard
Dec 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Fix some test failures on NT4.
parent
a4d4c07c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
22 deletions
+27
-22
security.c
dlls/advapi32/tests/security.c
+27
-22
No files found.
dlls/advapi32/tests/security.c
View file @
e38d5695
...
...
@@ -1728,25 +1728,33 @@ static void test_LookupAccountName(void)
sid_use
=
0xcafebabe
;
SetLastError
(
0xdeadbeef
);
ret
=
LookupAccountNameA
(
NULL
,
NULL
,
NULL
,
&
sid_size
,
NULL
,
&
domain_size
,
&
sid_use
);
ok
(
!
ret
,
"Expected 0, got %d
\n
"
,
ret
);
ok
(
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
,
"Expected ERROR_INSUFFICIENT_BUFFER, got %d
\n
"
,
GetLastError
());
ok
(
sid_size
!=
0
,
"Expected non-zero sid size
\n
"
);
ok
(
domain_size
!=
0
,
"Expected non-zero domain size
\n
"
);
ok
(
sid_use
==
0xcafebabe
,
"Expected 0xcafebabe, got %d
\n
"
,
sid_use
);
psid
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sid_size
);
domain
=
HeapAlloc
(
GetProcessHeap
(),
0
,
domain_size
);
/* try NULL account name */
ret
=
LookupAccountNameA
(
NULL
,
NULL
,
psid
,
&
sid_size
,
domain
,
&
domain_size
,
&
sid_use
);
get_sid_info
(
psid
,
&
account
,
&
sid_dom
);
ok
(
ret
,
"Failed to lookup account name
\n
"
);
/* Using a fixed string will not work on different locales */
ok
(
!
lstrcmp
(
account
,
domain
),
"Got %s for account and %s for domain, these should be the same
\n
"
,
account
,
domain
);
ok
(
sid_use
==
SidTypeDomain
,
"Expected SidTypeDomain (%d), got %d
\n
"
,
SidTypeDomain
,
sid_use
);
if
(
!
ret
&&
GetLastError
()
!=
ERROR_NONE_MAPPED
)
{
ok
(
!
ret
,
"Expected 0, got %d
\n
"
,
ret
);
ok
(
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
,
"Expected ERROR_INSUFFICIENT_BUFFER, got %d
\n
"
,
GetLastError
());
ok
(
sid_size
!=
0
,
"Expected non-zero sid size
\n
"
);
ok
(
domain_size
!=
0
,
"Expected non-zero domain size
\n
"
);
ok
(
sid_use
==
0xcafebabe
,
"Expected 0xcafebabe, got %d
\n
"
,
sid_use
);
psid
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sid_size
);
domain
=
HeapAlloc
(
GetProcessHeap
(),
0
,
domain_size
);
/* try NULL account name */
ret
=
LookupAccountNameA
(
NULL
,
NULL
,
psid
,
&
sid_size
,
domain
,
&
domain_size
,
&
sid_use
);
get_sid_info
(
psid
,
&
account
,
&
sid_dom
);
ok
(
ret
,
"Failed to lookup account name
\n
"
);
/* Using a fixed string will not work on different locales */
ok
(
!
lstrcmp
(
account
,
domain
),
"Got %s for account and %s for domain, these should be the same
\n
"
,
account
,
domain
);
ok
(
sid_use
==
SidTypeDomain
,
"Expected SidTypeDomain (%d), got %d
\n
"
,
SidTypeDomain
,
sid_use
);
HeapFree
(
GetProcessHeap
(),
0
,
psid
);
HeapFree
(
GetProcessHeap
(),
0
,
domain
);
}
else
win_skip
(
"NULL account name doesn't work on NT4
\n
"
);
/* try an invalid account name */
SetLastError
(
0xdeadbeef
);
...
...
@@ -1770,9 +1778,6 @@ static void test_LookupAccountName(void)
"Expected RPC_S_SERVER_UNAVAILABLE or RPC_S_INVALID_NET_ADDR, got %d
\n
"
,
GetLastError
());
ok
(
sid_size
==
0
,
"Expected 0, got %d
\n
"
,
sid_size
);
ok
(
domain_size
==
0
,
"Expected 0, got %d
\n
"
,
domain_size
);
HeapFree
(
GetProcessHeap
(),
0
,
psid
);
HeapFree
(
GetProcessHeap
(),
0
,
domain
);
}
static
void
test_security_descriptor
(
void
)
...
...
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