Skip to content

Commit 054b8e0

Browse files
committed
[NTOS:PS] Remove deprecated code
There was some deprecated code in the ProcessSessionInformation class left to rot for oh god how so long. Unfabricate it.
1 parent 0f30e81 commit 054b8e0

File tree

1 file changed

+0
-40
lines changed

1 file changed

+0
-40
lines changed

ntoskrnl/ps/query.c

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1651,46 +1651,6 @@ NtSetInformationProcess(
16511651
break;
16521652
}
16531653

1654-
#if 0 // OLD AND DEPRECATED CODE!!!!
1655-
1656-
/* FIXME - update the session id for the process token */
1657-
//Status = PsLockProcess(Process, FALSE);
1658-
if (!NT_SUCCESS(Status)) break;
1659-
1660-
/* Write the session ID in the EPROCESS */
1661-
Process->Session = UlongToPtr(SessionInfo.SessionId); // HACK!!!
1662-
1663-
/* Check if the process also has a PEB */
1664-
if (Process->Peb)
1665-
{
1666-
/*
1667-
* Attach to the process to make sure we're in the right
1668-
* context to access the PEB structure
1669-
*/
1670-
KeAttachProcess(&Process->Pcb);
1671-
1672-
/* Enter SEH for write to user-mode PEB */
1673-
_SEH2_TRY
1674-
{
1675-
/* Write the session ID */
1676-
Process->Peb->SessionId = SessionInfo.SessionId;
1677-
}
1678-
_SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
1679-
{
1680-
/* Get exception code */
1681-
Status = _SEH2_GetExceptionCode();
1682-
}
1683-
_SEH2_END;
1684-
1685-
/* Detach from the process */
1686-
KeDetachProcess();
1687-
}
1688-
1689-
/* Unlock the process */
1690-
//PsUnlockProcess(Process);
1691-
1692-
#endif
1693-
16941654
/*
16951655
* Since we cannot change the session ID of the given
16961656
* process anymore because it is set once and for all

0 commit comments

Comments
 (0)