[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-03 21:23:02 +02:00
parent 0d9020634a
commit 5dd93a8a5b
No known key found for this signature in database
GPG key ID: 688C4FBE25D7DEF6

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);