ReactOS
0.4.16-dev-250-g3ecd236
SeLogonSession.c
Go to the documentation of this file.
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 <george.bisoc@reactos.org>
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
}
IMAGINARY_LOGON
#define IMAGINARY_LOGON
Definition:
SeLogonSession.c:11
LogonMarkTermination
static VOID LogonMarkTermination(VOID)
Definition:
SeLogonSession.c:15
ok_eq_hex
#define ok_eq_hex(value, expected)
Definition:
apitest.h:77
START_TEST
#define START_TEST(x)
Definition:
atltest.h:75
NTSTATUS
LONG NTSTATUS
Definition:
precomp.h:26
PASSIVE_LEVEL
#define PASSIVE_LEVEL
Definition:
env_spec_w32.h:693
Status
Status
Definition:
gdiplustypes.h:25
void
Definition:
nsiface.idl:2307
kmt_test.h
SeMarkLogonSessionForTerminationNotification
NTSTATUS NTAPI SeMarkLogonSessionForTerminationNotification(_In_ PLUID LogonId)
Marks a logon session for future termination, given its logon ID. This triggers a callout (the regist...
Definition:
srm.c:1510
STATUS_SUCCESS
#define STATUS_SUCCESS
Definition:
shellext.h:65
STATUS_NOT_FOUND
#define STATUS_NOT_FOUND
Definition:
shellext.h:72
_LUID
Definition:
devicetopology.idl:137
SYSTEM_LUID
#define SYSTEM_LUID
Definition:
setypes.h:700
modules
rostests
kmtests
ntos_se
SeLogonSession.c
Generated on Wed Nov 6 2024 06:16:34 for ReactOS by
1.9.6