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
e61d4853
Commit
e61d4853
authored
Jul 18, 2022
by
Jinoh Kang
Committed by
Alexandre Julliard
Jul 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Add tests for GetTokenInformation TokenOwner.
parent
cadac127
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
security.c
dlls/advapi32/tests/security.c
+15
-0
No files found.
dlls/advapi32/tests/security.c
View file @
e61d4853
...
...
@@ -1773,6 +1773,7 @@ static void test_token_attr(void)
TOKEN_PRIVILEGES
*
Privileges
;
TOKEN_GROUPS
*
Groups
;
TOKEN_USER
*
User
;
TOKEN_OWNER
*
Owner
;
TOKEN_DEFAULT_DACL
*
Dacl
;
BOOL
ret
;
DWORD
i
,
GLE
;
...
...
@@ -1874,6 +1875,20 @@ static void test_token_attr(void)
LocalFree
(
SidString
);
HeapFree
(
GetProcessHeap
(),
0
,
User
);
/* owner */
ret
=
GetTokenInformation
(
Token
,
TokenOwner
,
NULL
,
0
,
&
Size
);
ok
(
!
ret
&&
(
GetLastError
()
==
ERROR_INSUFFICIENT_BUFFER
),
"GetTokenInformation(TokenOwner) failed with error %ld
\n
"
,
GetLastError
());
Owner
=
HeapAlloc
(
GetProcessHeap
(),
0
,
Size
);
ret
=
GetTokenInformation
(
Token
,
TokenOwner
,
Owner
,
Size
,
&
Size
);
ok
(
ret
,
"GetTokenInformation(TokenOwner) failed with error %ld
\n
"
,
GetLastError
());
ConvertSidToStringSidA
(
Owner
->
Owner
,
&
SidString
);
trace
(
"TokenOwner: %s
\n
"
,
SidString
);
LocalFree
(
SidString
);
HeapFree
(
GetProcessHeap
(),
0
,
Owner
);
/* logon */
ret
=
GetTokenInformation
(
Token
,
TokenLogonSid
,
NULL
,
0
,
&
Size
);
if
(
!
ret
&&
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
))
...
...
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