File tree Expand file tree Collapse file tree 3 files changed +38
-0
lines changed Expand file tree Collapse file tree 3 files changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ list(APPEND KMTEST_DRV_SOURCE
96
96
ntos_ps/PsNotify.c
97
97
ntos_se/SeHelpers.c
98
98
ntos_se/SeInheritance.c
99
+ ntos_se/SeLogonSession.c
99
100
ntos_se/SeQueryInfoToken.c
100
101
rtl/RtlIsValidOemCharacter.c
101
102
rtl/RtlRangeList.c
Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ KMT_TESTFUNC Test_ObTypeNoClean;
64
64
KMT_TESTFUNC Test_ObTypes ;
65
65
KMT_TESTFUNC Test_PsNotify ;
66
66
KMT_TESTFUNC Test_SeInheritance ;
67
+ KMT_TESTFUNC Test_SeLogonSession ;
67
68
KMT_TESTFUNC Test_SeQueryInfoToken ;
68
69
KMT_TESTFUNC Test_RtlAvlTree ;
69
70
KMT_TESTFUNC Test_RtlException ;
@@ -152,6 +153,7 @@ const KMT_TEST TestList[] =
152
153
{ "RtlStrSafeKM" , Test_RtlStrSafe },
153
154
{ "RtlUnicodeStringKM" , Test_RtlUnicodeString },
154
155
{ "SeInheritance" , Test_SeInheritance },
156
+ { "SeLogonSession" , Test_SeLogonSession },
155
157
{ "SeQueryInfoToken" , Test_SeQueryInfoToken },
156
158
{ "ZwAllocateVirtualMemory" , Test_ZwAllocateVirtualMemory },
157
159
{ "ZwCreateSection" , Test_ZwCreateSection },
Original file line number Diff line number Diff line change
1
+ /*
2
+ * PROJECT: ReactOS kernel-mode tests
3
+ * LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
4
+ * PURPOSE: Kernel mode tests for logon session manipulation API
5
+ * COPYRIGHT: Copyright 2021 George Bișoc <[email protected] >
6
+ */
7
+
8
+ #include <kmt_test.h>
9
+ #include <ntifs.h>
10
+
11
+ #define IMAGINARY_LOGON {0x001, 0}
12
+
13
+ static
14
+ VOID
15
+ LogonMarkTermination (VOID )
16
+ {
17
+ NTSTATUS Status ;
18
+ LUID SystemLogonID = SYSTEM_LUID ;
19
+ LUID NonExistentLogonID = IMAGINARY_LOGON ;
20
+
21
+ /* Mark the system authentication logon for termination */
22
+ Status = SeMarkLogonSessionForTerminationNotification (& SystemLogonID );
23
+ ok_irql (PASSIVE_LEVEL );
24
+ ok_eq_hex (Status , STATUS_SUCCESS );
25
+
26
+ /* We give a non existent logon */
27
+ Status = SeMarkLogonSessionForTerminationNotification (& NonExistentLogonID );
28
+ ok_irql (PASSIVE_LEVEL );
29
+ ok_eq_hex (Status , STATUS_NOT_FOUND );
30
+ }
31
+
32
+ START_TEST (SeLogonSession )
33
+ {
34
+ LogonMarkTermination ();
35
+ }
You can’t perform that action at this time.
0 commit comments