forked from reactos/reactos
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NTOS:SE] Refactor SeTokenCanImpersonate
- Refactor most of the code, since there's quite some stuff that don't make much sense. For instance ImpersonationLevel is basically the requested impersonation level a server asks for. PsImpersonateClient doesn't explicitly say that SecurityAnonymous and SecurityIdentification are not allowed. If the server was to give such levels it simply means it doesn't want to impersonate the client. Another thing that doesn't make much sense is that we check if the client is associated with an anonymous token, then avoid impersonating regular anonymous tokens that weren't created by the system. Only system can create such tokens and an anonymous token basically means a token with hidden security info. - Check that the server is within the same client logon session. - If the server is granted the SeImpersonatePrivilege privilege, allow impersonation regardless of the conditions we want to check for. - Update the documentation and code comments.
- Loading branch information
Showing
1 changed file
with
83 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters