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
2ae0574d
Commit
2ae0574d
authored
Sep 28, 2017
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Sep 28, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Added GetTokenInformation TokenLogonSid test.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
04d497c1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
+30
-0
security.c
dlls/advapi32/tests/security.c
+30
-0
No files found.
dlls/advapi32/tests/security.c
View file @
2ae0574d
...
...
@@ -1835,6 +1835,36 @@ static void test_token_attr(void)
LocalFree
(
SidString
);
HeapFree
(
GetProcessHeap
(),
0
,
User
);
/* logon */
ret
=
GetTokenInformation
(
Token
,
TokenLogonSid
,
NULL
,
0
,
&
Size
);
if
(
!
ret
&&
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
))
todo_wine
win_skip
(
"TokenLogonSid not supported. Skipping tests
\n
"
);
else
{
todo_wine
ok
(
!
ret
&&
(
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
),
"GetTokenInformation(TokenLogonSid) failed with error %d
\n
"
,
GetLastError
());
Groups
=
HeapAlloc
(
GetProcessHeap
(),
0
,
Size
);
ret
=
GetTokenInformation
(
Token
,
TokenLogonSid
,
Groups
,
Size
,
&
Size
);
todo_wine
ok
(
ret
,
"GetTokenInformation(TokenLogonSid) failed with error %d
\n
"
,
GetLastError
());
if
(
ret
)
{
ok
(
Groups
->
GroupCount
==
1
,
"got %d
\n
"
,
Groups
->
GroupCount
);
if
(
Groups
->
GroupCount
==
1
)
{
ConvertSidToStringSidA
(
Groups
->
Groups
[
0
].
Sid
,
&
SidString
);
trace
(
"TokenLogon: %s
\n
"
,
SidString
);
LocalFree
(
SidString
);
/* S-1-5-5-0-XXXXXX */
ret
=
IsWellKnownSid
(
Groups
->
Groups
[
0
].
Sid
,
WinLogonIdsSid
);
ok
(
ret
,
"Unknown SID
\n
"
);
}
}
HeapFree
(
GetProcessHeap
(),
0
,
Groups
);
}
/* privileges */
ret
=
GetTokenInformation
(
Token
,
TokenPrivileges
,
NULL
,
0
,
&
Size
);
ok
(
!
ret
&&
(
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
),
...
...
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