mirror of
https://github.com/reactos/reactos.git
synced 2025-07-24 06:34:10 +00:00
[win32k]
- Store the session id in WINSTATION_OBJECT when we create a window station. - Don't allow switching to a desktop that belongs to a different session This is a modified version of the patch from CORE-5531 svn path=/trunk/; revision=58514
This commit is contained in:
parent
aa4c4bda1e
commit
cbed503fb8
3 changed files with 9 additions and 0 deletions
|
@ -1632,6 +1632,12 @@ NtUserSwitchDesktop(HDESK hdesk)
|
|||
RETURN(FALSE);
|
||||
}
|
||||
|
||||
if (PsGetCurrentProcessSessionId() != pdesk->rpwinstaParent->dwSessionId)
|
||||
{
|
||||
ERR("NtUserSwitchDesktop called for a desktop of a different session\n");
|
||||
RETURN(FALSE);
|
||||
}
|
||||
|
||||
if(pdesk == gpdeskInputDesktop)
|
||||
{
|
||||
WARN("NtUserSwitchDesktop called for active desktop\n");
|
||||
|
|
|
@ -432,6 +432,7 @@ NtUserCreateWindowStation(
|
|||
Status = RtlCreateAtomTable(37, &WindowStationObject->AtomTable);
|
||||
WindowStationObject->SystemMenuTemplate = (HANDLE)0;
|
||||
WindowStationObject->Name = WindowStationName;
|
||||
WindowStationObject->dwSessionId = NtCurrentPeb()->SessionId;
|
||||
|
||||
if (InputWindowStation == NULL)
|
||||
{
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
|
||||
typedef struct _WINSTATION_OBJECT
|
||||
{
|
||||
DWORD dwSessionId;
|
||||
|
||||
KSPIN_LOCK Lock;
|
||||
UNICODE_STRING Name;
|
||||
LIST_ENTRY DesktopListHead;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue