42 ok(
Token !=
NULL,
"Token is not captured. Testing SQIT interrupted\n\n");
50 ok(
Buffer !=
NULL,
"Wrong. SQIT call was successful with TokenOwner arg. But Buffer == NULL\n");
68 ok(
Buffer !=
NULL,
"Wrong. SQIT call was successful with TokenDefaultDacl arg. But Buffer == NULL\n");
85 ok(
Buffer !=
NULL,
"Wrong. SQIT call was successful with TokenGroups arg. But Buffer == NULL\n");
91 for (
i = 0;
i < GroupCount;
i++)
100 ok((
Flag ==
TRUE),
"TokenGroup's SIDs are not valid\n");
113 ok(
Buffer ==
NULL,
"SQIT has failed to query the impersonation level but buffer is not NULL!\n");
125 ok(
Buffer ==
NULL,
"Wrong. SQIT call failed. But Buffer != NULL\n");
130 ok(
Buffer ==
NULL,
"Wrong. SQIT call failed. But Buffer != NULL\n");
135 ok(
Buffer ==
NULL,
"Wrong. SQIT call failed. But Buffer != NULL\n");
140 ok(
Buffer ==
NULL,
"Wrong. SQIT call failed. But Buffer != NULL\n");
149 ok(
Buffer !=
NULL,
"Wrong. SQIT call was successful with TokenStatistics arg. But Buffer == NULL\n");
154 ok(1,
"print statistics:\n\tTokenID = %u_%d\n\tSecurityImperLevel = %d\n\tPrivCount = %d\n\tGroupCount = %d\n\n", TStats->
TokenId.
LowPart,
163 ok(
Buffer ==
NULL,
"Wrong. SQIT call failed. But Buffer != NULL\n");
173 ok(
Buffer !=
NULL,
"Wrong. SQIT call was successful with TokenType arg. But Buffer == NULL\n");
189 ok(
Buffer !=
NULL,
"Wrong. SQIT call was successful with TokenUser arg. But Buffer == NULL\n");
270 AuxData->PrivilegeSet->PrivilegeCount = 1;
279 ok((AuxData->PrivilegeSet->PrivilegeCount == 2),
"PrivelegeCount must be 2, but it is %d\n", AuxData->PrivilegeSet->PrivilegeCount);
291 ok((AuxData->PrivilegeSet->PrivilegeCount == 6),
"PrivelegeCount must be 6, but it is %d\n", AuxData->PrivilegeSet->PrivilegeCount);
327 ok(Checker,
"Checker is NULL\n");
331 trace(
"AuxData->PrivilegeSet->PrivilegeCount = %d ; Privileges->PrivilegeCount = %d\n",
332 AuxData->PrivilegeSet->PrivilegeCount,
Privileges->PrivilegeCount);
349 ok(
Buffer !=
NULL,
"Wrong. SQIT call was successful with TokenPrivileges arg. But Buffer == NULL\n");
359 ok((AuxData->PrivilegeSet->PrivilegeCount == 20),
"PrivelegeCount must be 20, but it is %d\n", AuxData->PrivilegeSet->PrivilegeCount);
361 for (
i = 0;
i < AuxData->PrivilegeSet->PrivilegeCount;
i++)
387 ok(Checker,
"Checker is NULL\n");
391 trace(
"AuxData->PrivilegeSet->PrivilegeCount = %d ; Privileges->PrivilegeCount = %d\n",
392 AuxData->PrivilegeSet->PrivilegeCount,
Privileges->PrivilegeCount);
_Inout_ PLIST_ENTRY _In_ PVOID _In_ PSTRING _In_ BOOLEAN _In_ BOOLEAN _In_ ULONG _In_ PFLT_CALLBACK_DATA _In_opt_ PCHECK_FOR_TRAVERSE_ACCESS _In_opt_ PSECURITY_SUBJECT_CONTEXT SubjectContext
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
IN BOOLEAN OUT PSTR Buffer
enum _TOKEN_TYPE * PTOKEN_TYPE
_IRQL_requires_same_ _In_ PLSA_STRING _In_ SECURITY_LOGON_TYPE _In_ ULONG _In_ ULONG _In_opt_ PTOKEN_GROUPS _In_ PTOKEN_SOURCE _Out_ PVOID _Out_ PULONG _Inout_ PLUID _Out_ PHANDLE Token
VOID NTAPI SeDeleteAccessState(_In_ PACCESS_STATE AccessState)
Deletes an allocated access state from the memory.
NTSTATUS NTAPI SeCreateAccessState(_Inout_ PACCESS_STATE AccessState, _In_ PAUX_ACCESS_DATA AuxData, _In_ ACCESS_MASK Access, _In_ PGENERIC_MAPPING GenericMapping)
Creates an access state.
VOID NTAPI SeUnlockSubjectContext(_In_ PSECURITY_SUBJECT_CONTEXT SubjectContext)
Unlocks both the referenced primary and client access tokens of a security subject context.
struct _TOKEN_DEFAULT_DACL * PTOKEN_DEFAULT_DACL
VOID NTAPI SeLockSubjectContext(_In_ PSECURITY_SUBJECT_CONTEXT SubjectContext)
Locks both the referenced primary and client access tokens of a security subject context.
struct _TOKEN_GROUPS * PTOKEN_GROUPS
NTSYSAPI BOOLEAN NTAPI RtlValidSid(IN PSID Sid)
NTSTATUS NTAPI SeQueryInformationToken(_In_ PACCESS_TOKEN AccessToken, _In_ TOKEN_INFORMATION_CLASS TokenInformationClass, _Outptr_result_buffer_(_Inexpressible_(token-dependent)) PVOID *TokenInformation)
Queries information details about the given token to the call. The difference between NtQueryInformat...
START_TEST(SeQueryInfoToken)
_In_ ACCESS_MASK AccessMask
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel
_In_ PSECURITY_SUBJECT_CONTEXT _In_ BOOLEAN _In_ ACCESS_MASK _In_ ACCESS_MASK _Outptr_opt_ PPRIVILEGE_SET * Privileges
_In_opt_ PVOID _In_opt_ PUNICODE_STRING _In_ PSECURITY_DESCRIPTOR _In_ PACCESS_STATE AccessState
struct _TOKEN_PRIVILEGES * PTOKEN_PRIVILEGES
struct _TOKEN_STATISTICS * PTOKEN_STATISTICS
#define STATUS_INVALID_INFO_CLASS
#define ExAllocatePool(type, size)
#define SeQuerySubjectContextToken(SubjectContext)
BOOLEAN NTAPI SeAccessCheck(_In_ PSECURITY_DESCRIPTOR SecurityDescriptor, _In_ PSECURITY_SUBJECT_CONTEXT SubjectSecurityContext, _In_ BOOLEAN SubjectContextLocked, _In_ ACCESS_MASK DesiredAccess, _In_ ACCESS_MASK PreviouslyGrantedAccess, _Out_ PPRIVILEGE_SET *Privileges, _In_ PGENERIC_MAPPING GenericMapping, _In_ KPROCESSOR_MODE AccessMode, _Out_ PACCESS_MASK GrantedAccess, _Out_ PNTSTATUS AccessStatus)
Determines whether security access rights can be given to an object depending on the security descrip...
VOID NTAPI SeFreePrivileges(_In_ PPRIVILEGE_SET Privileges)
Frees a set of privileges.
static GENERIC_MAPPING GenericMapping
VOID NTAPI SeCaptureSubjectContext(_Out_ PSECURITY_SUBJECT_CONTEXT SubjectContext)
Captures the security subject context of the calling thread and calling process.
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
SID_AND_ATTRIBUTES Groups[ANYSIZE_ARRAY]
BOOLEAN NTAPI SePrivilegeCheck(_In_ PPRIVILEGE_SET Privileges, _In_ PSECURITY_SUBJECT_CONTEXT SubjectContext, _In_ KPROCESSOR_MODE PreviousMode)
Checks if a set of privileges exist and match within a security subject context.
LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY]
void TestsSeQueryInformationToken(PACCESS_TOKEN Token)
struct _TOKEN_USER * PTOKEN_USER
NTSTATUS NTAPI SeAppendPrivileges(_Inout_ PACCESS_STATE AccessState, _In_ PPRIVILEGE_SET Privileges)
Appends additional privileges.
POBJECT_TYPE PsProcessType
_In_ ACCESS_MASK _In_opt_ POBJECT_ATTRIBUTES _In_ BOOLEAN _In_ TOKEN_TYPE TokenType