mirror of
https://github.com/reactos/reactos.git
synced 2024-11-18 21:13:52 +00:00
[KMTESTS:SE] Remove erroneous tests regarding impersonation level
These tests didn't make much sense. The captured token from the subject context is not an impersonation token and both Windows and ReactOS ultimately fail on those tests.
This commit is contained in:
parent
55060911e4
commit
ac97662619
1 changed files with 5 additions and 18 deletions
|
@ -104,26 +104,13 @@ void TestsSeQueryInformationToken(PACCESS_TOKEN Token)
|
|||
|
||||
//----------------------------------------------------------------//
|
||||
|
||||
// Call SQIT with TokenImpersonationLevel argument
|
||||
//
|
||||
// What's up? Why SQIT fails with right arg?
|
||||
// Because your token has Token->TokenType != TokenImpersonation. -hbelusca
|
||||
// Call SQIT with TokenImpersonationLevel argument. Although our token
|
||||
// is not an impersonation token, the call will outright fail.
|
||||
|
||||
Buffer = NULL;
|
||||
Status = SeQueryInformationToken(Token, TokenImpersonationLevel, &Buffer);
|
||||
ok(Status == STATUS_SUCCESS, "SQIT with TokenImpersonationLevel fails with status 0x%08X\n", Status);
|
||||
if (Buffer) ExFreePool(Buffer);
|
||||
|
||||
Buffer = NULL;
|
||||
Status = SeQueryInformationToken(Token, TokenImpersonationLevel, &Buffer);
|
||||
ok(Status == STATUS_SUCCESS, "and again: SQIT with TokenImpersonationLevel fails with status 0x%08X\n", Status);
|
||||
if (Status == STATUS_SUCCESS)
|
||||
{
|
||||
ok(Buffer != NULL, "Wrong. SQIT call was successful with TokenImpersonationLevel arg. But Buffer == NULL\n");
|
||||
} else {
|
||||
ok(Buffer == NULL, "Wrong. SQIT call failed. But Buffer != NULL\n");
|
||||
}
|
||||
if (Buffer) ExFreePool(Buffer);
|
||||
ok(Status == STATUS_INVALID_INFO_CLASS, "SQIT with TokenImpersonationLevel must return STATUS_INVALID_INFO_CLASS but got 0x%08X\n", Status);
|
||||
ok(Buffer == NULL, "SQIT has failed to query the impersonation level but buffer is not NULL!\n");
|
||||
|
||||
//----------------------------------------------------------------//
|
||||
|
||||
|
@ -420,4 +407,4 @@ START_TEST(SeQueryInfoToken)
|
|||
if (SubjectContext) ExFreePool(SubjectContext);
|
||||
if (AuxData) ExFreePool(AuxData);
|
||||
if (AccessState) ExFreePool(AccessState);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue