reactos/ntoskrnl/se
George Bișoc 59e74584ac
[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.
2023-06-09 11:53:56 +02:00
..
access.c [NTOS:SE][FORMATTING] Fix the file header 2023-03-07 18:39:46 +01:00
accesschk.c [NTOS:SE] Do not allocate memory pool just for the access rights 2023-03-07 17:50:39 +01:00
acl.c [NTOS:SE][FORMATTING] Fix the file header 2023-03-07 18:39:46 +01:00
audit.c [NTOS:SE][FORMATTING] Fix the file header 2023-03-07 18:39:46 +01:00
client.c [NTOS:SE][FORMATTING] Fix the file header 2023-03-07 18:39:46 +01:00
debug.c [NTOS:SE] Do not allocate memory pool just for the access rights 2023-03-07 17:50:39 +01:00
objtype.c [NTOS:SE][FORMATTING] Fix the file header 2023-03-07 18:39:46 +01:00
priv.c [NTOS:SE][FORMATTING] Fix the file header 2023-03-07 18:39:46 +01:00
sd.c [NTOS:SE][FORMATTING] Fix the file header 2023-03-07 18:39:46 +01:00
semgr.c [NTOS:SE][FORMATTING] Fix the file header 2023-03-07 18:39:46 +01:00
sid.c [NTOS:SE][FORMATTING] Fix the file header 2023-03-07 18:39:46 +01:00
sqos.c [NTOS:SE][FORMATTING] Fix the file header 2023-03-07 18:39:46 +01:00
srm.c [NTOS:SE][FORMATTING] Fix the file header 2023-03-07 18:39:46 +01:00
subject.c [NTOS:SE][FORMATTING] Fix the file header 2023-03-07 18:39:46 +01:00
token.c [NTOS:SE] Refactor SeTokenCanImpersonate 2023-06-09 11:53:56 +02:00
tokenadj.c [NTOS:SE][FORMATTING] Fix the file header 2023-03-07 18:39:46 +01:00
tokencls.c [NTOS:SE][FORMATTING] Fix the file header 2023-03-07 18:39:46 +01:00
tokenlif.c [NTOS:SE] Make an access token effective after the end of token duplication 2023-06-04 11:09:22 +02:00