[NTOS:SE] Don't assert on levels that don't allow impersonation.

This commit is contained in:
Thomas Faber 2021-11-21 17:18:25 -05:00
parent 3e5dcf7937
commit 88e3ef5fa0
No known key found for this signature in database
GPG key ID: 076E7C3D44720826

View file

@ -3582,11 +3582,13 @@ SeTokenCanImpersonate(
/* /*
* SecurityAnonymous and SecurityIdentification levels do not * SecurityAnonymous and SecurityIdentification levels do not
* allow impersonation. If we get such levels from the call * allow impersonation.
* then something's seriously wrong.
*/ */
ASSERT(ImpersonationLevel != SecurityAnonymous && if (ImpersonationLevel == SecurityAnonymous ||
ImpersonationLevel != SecurityIdentification); ImpersonationLevel == SecurityIdentification)
{
return FALSE;
}
/* Time to lock our tokens */ /* Time to lock our tokens */
SepAcquireTokenLockShared(ProcessToken); SepAcquireTokenLockShared(ProcessToken);