mirror of
https://github.com/reactos/reactos.git
synced 2024-11-27 05:23:33 +08:00
[KMTEST] Fix hacks in SeQueryInfoToken test and make it pass on Test WHS
This commit is contained in:
parent
f0f58a5788
commit
7c81367e9b
@ -204,6 +204,17 @@ void TestsSeQueryInformationToken(PACCESS_TOKEN Token)
|
||||
|
||||
//------------------------------------------------------------------------------//
|
||||
|
||||
GENERIC_MAPPING PspProcessMapping =
|
||||
{
|
||||
STANDARD_RIGHTS_READ | PROCESS_QUERY_INFORMATION | PROCESS_VM_READ,
|
||||
STANDARD_RIGHTS_WRITE | PROCESS_CREATE_PROCESS | PROCESS_CREATE_THREAD |
|
||||
PROCESS_VM_OPERATION | PROCESS_VM_WRITE | PROCESS_DUP_HANDLE |
|
||||
PROCESS_TERMINATE | PROCESS_SET_QUOTA | PROCESS_SET_INFORMATION |
|
||||
PROCESS_SUSPEND_RESUME,
|
||||
STANDARD_RIGHTS_EXECUTE | SYNCHRONIZE,
|
||||
PROCESS_ALL_ACCESS
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------//
|
||||
// Body of the main test //
|
||||
//------------------------------------------------------------------------------//
|
||||
@ -211,13 +222,13 @@ void TestsSeQueryInformationToken(PACCESS_TOKEN Token)
|
||||
START_TEST(SeQueryInfoToken)
|
||||
{
|
||||
PACCESS_STATE AccessState;
|
||||
ACCESS_MASK AccessMask = MAXIMUM_ALLOWED;
|
||||
//ACCESS_MASK AccessMask = MAXIMUM_ALLOWED;
|
||||
ACCESS_MASK DesiredAccess = MAXIMUM_ALLOWED;
|
||||
NTSTATUS Status = STATUS_SUCCESS;
|
||||
PAUX_ACCESS_DATA AuxData = NULL;
|
||||
PPRIVILEGE_SET NewPrivilegeSet;
|
||||
BOOLEAN Checker;
|
||||
PPRIVILEGE_SET Privileges = NULL;
|
||||
//BOOLEAN Checker;
|
||||
//PPRIVILEGE_SET Privileges = NULL;
|
||||
PSECURITY_SUBJECT_CONTEXT SubjectContext = NULL;
|
||||
PACCESS_TOKEN Token = NULL;
|
||||
PTOKEN_PRIVILEGES TPrivileges;
|
||||
@ -310,7 +321,7 @@ START_TEST(SeQueryInfoToken)
|
||||
//----------------------------------------------------------------//
|
||||
// Testing SeFreePrivileges //
|
||||
//----------------------------------------------------------------//
|
||||
|
||||
#if 0 // FIXME: This test fails on Test WHS
|
||||
Privileges = NULL;
|
||||
Checker = SeAccessCheck(
|
||||
AccessState->SecurityDescriptor,
|
||||
@ -319,7 +330,7 @@ START_TEST(SeQueryInfoToken)
|
||||
AccessState->OriginalDesiredAccess,
|
||||
AccessState->PreviouslyGrantedAccess,
|
||||
&Privileges,
|
||||
(PGENERIC_MAPPING)((PCHAR*)PsProcessType + 52),
|
||||
&PspProcessMapping,
|
||||
KernelMode,
|
||||
&AccessMask,
|
||||
&Status
|
||||
@ -332,7 +343,7 @@ START_TEST(SeQueryInfoToken)
|
||||
AuxData->PrivilegeSet->PrivilegeCount, Privileges->PrivilegeCount);
|
||||
}
|
||||
if (Privileges) SeFreePrivileges(Privileges);
|
||||
|
||||
#endif
|
||||
|
||||
//----------------------------------------------------------------//
|
||||
// Testing SePrivilegeCheck //
|
||||
@ -370,7 +381,7 @@ START_TEST(SeQueryInfoToken)
|
||||
}
|
||||
|
||||
// Call SeFreePrivileges again
|
||||
|
||||
#if 0 // FIXME: This test fails on Test WHS
|
||||
Privileges = NULL;
|
||||
Checker = SeAccessCheck(
|
||||
AccessState->SecurityDescriptor,
|
||||
@ -379,7 +390,7 @@ START_TEST(SeQueryInfoToken)
|
||||
AccessState->OriginalDesiredAccess,
|
||||
AccessState->PreviouslyGrantedAccess,
|
||||
&Privileges,
|
||||
(PGENERIC_MAPPING)((PCHAR*)PsProcessType + 52),
|
||||
&PspProcessMapping,
|
||||
KernelMode,
|
||||
&AccessMask,
|
||||
&Status
|
||||
@ -392,7 +403,7 @@ START_TEST(SeQueryInfoToken)
|
||||
AuxData->PrivilegeSet->PrivilegeCount, Privileges->PrivilegeCount);
|
||||
}
|
||||
if (Privileges) SeFreePrivileges(Privileges);
|
||||
|
||||
#endif
|
||||
//----------------------------------------------------------------//
|
||||
// Missing for now //
|
||||
//----------------------------------------------------------------//
|
||||
|
Loading…
Reference in New Issue
Block a user