mirror of
https://github.com/reactos/reactos.git
synced 2026-05-23 07:40:09 +08:00
[NTOS:SE] Don't assert on levels that don't allow impersonation.
This commit is contained in:
@@ -3582,11 +3582,13 @@ SeTokenCanImpersonate(
|
||||
|
||||
/*
|
||||
* SecurityAnonymous and SecurityIdentification levels do not
|
||||
* allow impersonation. If we get such levels from the call
|
||||
* then something's seriously wrong.
|
||||
* allow impersonation.
|
||||
*/
|
||||
ASSERT(ImpersonationLevel != SecurityAnonymous &&
|
||||
ImpersonationLevel != SecurityIdentification);
|
||||
if (ImpersonationLevel == SecurityAnonymous ||
|
||||
ImpersonationLevel == SecurityIdentification)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/* Time to lock our tokens */
|
||||
SepAcquireTokenLockShared(ProcessToken);
|
||||
|
||||
Reference in New Issue
Block a user