ReactOS  0.4.13-dev-257-gfabbd7c
se.h
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS kernel-mode tests
3  * LICENSE: LGPLv2.1+ - See COPYING.LIB in the top level directory
4  * PURPOSE: Kernel-Mode Test Suite Se helper declarations
5  * PROGRAMMER: Thomas Faber <thomas.faber@reactos.org>
6  */
7 
8 #ifndef _KMTEST_SE_H_
9 #define _KMTEST_SE_H_
10 
11 /* FIXME: belongs in ntifs.h or something */
12 #define SEF_DACL_AUTO_INHERIT 1
13 #define SEF_SACL_AUTO_INHERIT 2
14 #define SEF_DEFAULT_DESCRIPTOR_FOR_OBJECT 4
15 #define SEF_AVOID_PRIVILEGE_CHECK 8
16 #define SEF_AVOID_OWNER_CHECK 16
17 #define SEF_DEFAULT_OWNER_FROM_PARENT 32
18 #define SEF_DEFAULT_GROUP_FROM_PARENT 64
19 #define SEF_MACL_NO_WRITE_UP 256
20 #define SEF_MACL_NO_READ_UP 512
21 #define SEF_MACL_NO_EXECUTE_UP 1024
22 #define SEF_AI_USE_EXTRA_PARAMS 2048
23 #define SEF_AVOID_OWNER_RESTRICTION 4096
24 #define SEF_MACL_VALID_FLAGS (SEF_MACL_NO_WRITE_UP | SEF_MACL_NO_READ_UP | SEF_MACL_NO_EXECUTE_UP)
25 
28  _Inout_ PACL Acl,
32  _In_ PSID Sid,
34  _In_ BOOLEAN Failure);
35 
38  _Inout_ PACL Acl,
42  _In_ PSID Sid);
43 
44 #define NO_SIZE ((ULONG)-1)
45 
46 #define CheckSid(Sid, SidSize, ExpectedSid) CheckSid_(Sid, SidSize, ExpectedSid, __FILE__, __LINE__)
47 #define CheckSid_(Sid, SidSize, ExpectedSid, file, line) CheckSid__(Sid, SidSize, ExpectedSid, file ":" KMT_STRINGIZE(line))
48 VOID
50  _In_ PSID Sid,
51  _In_ ULONG SidSize,
52  _In_ PISID ExpectedSid,
53  _In_ PCSTR FileAndLine);
54 
55 VOID
57  _In_ PACL Acl,
58  _In_ ULONG AceCount,
59  _In_ PCSTR FileAndLine,
60  _In_ va_list Arguments);
61 
62 #define CheckAcl(Acl, AceCount, ...) CheckAcl_(Acl, AceCount, __FILE__, __LINE__, ##__VA_ARGS__)
63 #define CheckAcl_(Acl, AceCount, file, line, ...) CheckAcl__(Acl, AceCount, file ":" KMT_STRINGIZE(line), ##__VA_ARGS__)
64 VOID
66  _In_ PACL Acl,
67  _In_ ULONG AceCount,
68  _In_ PCSTR FileAndLine,
69  ...);
70 
71 #endif /* !defined _KMTEST_SE_H_ */
VOID VCheckAcl__(_In_ PACL Acl, _In_ ULONG AceCount, _In_ PCSTR FileAndLine, _In_ va_list Arguments)
Definition: SeHelpers.c:128
NTSTATUS RtlxAddAuditAccessAceEx(_Inout_ PACL Acl, _In_ ULONG Revision, _In_ ULONG Flags, _In_ ACCESS_MASK AccessMask, _In_ PSID Sid, _In_ BOOLEAN Success, _In_ BOOLEAN Failure)
Definition: SeHelpers.c:12
VOID CheckSid__(_In_ PSID Sid, _In_ ULONG SidSize, _In_ PISID ExpectedSid, _In_ PCSTR FileAndLine)
Definition: SeHelpers.c:89
LONG NTSTATUS
Definition: precomp.h:26
_In_ ULONG Revision
Definition: rtlfuncs.h:1104
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
unsigned char BOOLEAN
_In_ ULONG _In_ ACCESS_MASK _In_ PSID Sid
Definition: rtlfuncs.h:1104
char * va_list
Definition: acmsvcex.h:78
NTSTATUS RtlxAddMandatoryLabelAceEx(_Inout_ PACL Acl, _In_ ULONG Revision, _In_ ULONG Flags, _In_ ACCESS_MASK AccessMask, _In_ PSID Sid)
Definition: SeHelpers.c:53
_In_ ACCESS_MASK AccessMask
Definition: exfuncs.h:186
#define _Inout_
Definition: no_sal2.h:244
VOID CheckAcl__(_In_ PACL Acl, _In_ ULONG AceCount, _In_ PCSTR FileAndLine,...)
Definition: SeHelpers.c:219
#define _In_
Definition: no_sal2.h:204
unsigned int ULONG
Definition: retypes.h:1
const char * PCSTR
Definition: typedefs.h:51
ULONG ACCESS_MASK
Definition: nt_native.h:40