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");
327 ok(Checker,
"Checker is NULL\n");
331 trace(
"AuxData->PrivilegeSet->PrivilegeCount = %d ; Privileges->PrivilegeCount = %d\n",
349 ok(
Buffer !=
NULL,
"Wrong. SQIT call was successful with TokenPrivileges arg. But Buffer == NULL\n");
387 ok(Checker,
"Checker is NULL\n");
391 trace(
"AuxData->PrivilegeSet->PrivilegeCount = %d ; Privileges->PrivilegeCount = %d\n",
static GENERIC_MAPPING GenericMapping
void TestsSeQueryInformationToken(PACCESS_TOKEN Token)
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...
#define ExAllocatePool(type, size)
_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
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
_In_ ACCESS_MASK AccessMask
NTSYSAPI BOOLEAN NTAPI RtlValidSid(IN PSID Sid)
_In_ ACCESS_MASK _In_opt_ POBJECT_ATTRIBUTES _In_ BOOLEAN _In_ TOKEN_TYPE TokenType
POBJECT_TYPE PsProcessType
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 SeDeleteAccessState(_In_ PACCESS_STATE AccessState)
Deletes an allocated access state from the memory.
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.
VOID NTAPI SeFreePrivileges(_In_ PPRIVILEGE_SET Privileges)
Frees a set of privileges.
NTSTATUS NTAPI SeAppendPrivileges(_Inout_ PACCESS_STATE AccessState, _In_ PPRIVILEGE_SET Privileges)
Appends additional privileges.
#define STATUS_INVALID_INFO_CLASS
PPRIVILEGE_SET PrivilegeSet
LUID_AND_ATTRIBUTES Privilege[ANYSIZE_ARRAY]
SID_AND_ATTRIBUTES Groups[ANYSIZE_ARRAY]
LUID_AND_ATTRIBUTES Privileges[ANYSIZE_ARRAY]
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel
VOID NTAPI SeLockSubjectContext(_In_ PSECURITY_SUBJECT_CONTEXT SubjectContext)
Locks both the referenced primary and client access tokens of a security subject context.
VOID NTAPI SeUnlockSubjectContext(_In_ PSECURITY_SUBJECT_CONTEXT SubjectContext)
Unlocks both the referenced primary and client access tokens of a security subject context.
VOID NTAPI SeCaptureSubjectContext(_Out_ PSECURITY_SUBJECT_CONTEXT SubjectContext)
Captures the security subject context of the calling thread and calling process.
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...
_Must_inspect_result_ _In_ WDFDEVICE _In_ ULONG _In_ ACCESS_MASK DesiredAccess
_In_ PSECURITY_SUBJECT_CONTEXT _In_ BOOLEAN _In_ ACCESS_MASK _In_ ACCESS_MASK _Outptr_opt_ PPRIVILEGE_SET * Privileges
#define SeQuerySubjectContextToken(SubjectContext)
_In_opt_ PVOID _In_opt_ PUNICODE_STRING _In_ PSECURITY_DESCRIPTOR _In_ PACCESS_STATE AccessState
struct _TOKEN_GROUPS * PTOKEN_GROUPS
struct _TOKEN_STATISTICS * PTOKEN_STATISTICS
struct _TOKEN_DEFAULT_DACL * PTOKEN_DEFAULT_DACL
struct _TOKEN_USER * PTOKEN_USER
@ TokenGroupsAndPrivileges
@ TokenImpersonationLevel
struct _TOKEN_PRIVILEGES * PTOKEN_PRIVILEGES
enum _TOKEN_TYPE * PTOKEN_TYPE