[NTOS:SE] Get the session ID and assign it to the new token

SeExchangePrimaryToken doesn't assign the session ID to the new token, which could lead to incorrect behaviour in the long run. Let's fix that.
This commit is contained in:
George Bișoc
2021-05-04 10:08:26 +02:00
parent 0d9020634a
commit 5dd93a8a5b
+2 -1
View File
@@ -636,7 +636,8 @@ SeExchangePrimaryToken(
/* Mark new token in use */
NewToken->TokenInUse = TRUE;
// TODO: Set a correct SessionId for NewToken
/* Set the session ID for the new token */
NewToken->SessionId = MmGetSessionId(Process);
/* Unlock the new token */
SepReleaseTokenLock(NewToken);