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
402b8473
Commit
402b8473
authored
Sep 21, 2022
by
Owen Rudge
Committed by
Alexandre Julliard
Sep 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
secur32/tests: Add tests for LsaGetLogonSessionData.
parent
b819b966
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
0 deletions
+39
-0
main.c
dlls/secur32/tests/main.c
+39
-0
No files found.
dlls/secur32/tests/main.c
View file @
402b8473
...
...
@@ -26,6 +26,7 @@
#include <windef.h>
#include <winbase.h>
#include <sspi.h>
#include <ntsecapi.h>
#include "wine/test.h"
...
...
@@ -244,6 +245,42 @@ static void testQuerySecurityPackageInfo(void)
ok
(
pkg_info
==
(
void
*
)
0xdeadbeef
,
"wrong pkg_info address %p
\n
"
,
pkg_info
);
}
static
void
test_get_logon_session_data
(
void
)
{
SECURITY_LOGON_SESSION_DATA
*
data
=
NULL
;
TOKEN_STATISTICS
ts
;
HANDLE
thread_hdl
;
NTSTATUS
status
;
DWORD
ret_len
;
BOOL
ret
;
ret
=
OpenProcessToken
(
GetCurrentProcess
(),
TOKEN_QUERY
,
&
thread_hdl
);
ok
(
ret
,
"got %ld
\n
"
,
GetLastError
());
if
(
!
ret
)
return
;
ret_len
=
sizeof
(
TOKEN_STATISTICS
);
ret
=
GetTokenInformation
(
thread_hdl
,
TokenStatistics
,
&
ts
,
sizeof
(
TOKEN_STATISTICS
),
&
ret_len
);
ok
(
ret
,
"got %ld
\n
"
,
GetLastError
());
if
(
!
ret
)
goto
cleanup
;
status
=
LsaGetLogonSessionData
(
&
ts
.
AuthenticationId
,
&
data
);
todo_wine
ok
(
!
status
,
"got %08lx
\n
"
,
status
);
if
(
status
)
goto
cleanup
;
ok
(
data
->
Size
>=
sizeof
(
SECURITY_LOGON_SESSION_DATA
),
"Size == %ld
\n
"
,
data
->
Size
);
ok
(
!
memcmp
(
&
data
->
LogonId
,
&
ts
.
AuthenticationId
,
sizeof
(
LUID
)),
"LogonId mismatch
\n
"
);
/* We can't easily verify the content of the various logon parameters, so just ensure data is present */
ok
(
data
->
AuthenticationPackage
.
Length
>
0
,
"AuthenticationPackage missing
\n
"
);
cleanup:
CloseHandle
(
thread_hdl
);
if
(
data
!=
NULL
)
LsaFreeReturnBuffer
(
data
);
}
START_TEST
(
main
)
{
InitFunctionPtrs
();
...
...
@@ -260,4 +297,6 @@ START_TEST(main)
}
if
(
secdll
)
FreeLibrary
(
secdll
);
test_get_logon_session_data
();
}
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