From bf9a2b996486ffd123a17a0c032c747b34353349 Mon Sep 17 00:00:00 2001 From: Giannis Adamopoulos Date: Sat, 11 Feb 2012 22:17:46 +0000 Subject: [PATCH] [win32k] - In reactos when an application tries to use a desktop or window station object we never check if it should have access to the object. However the only exception to this is NtUserGetObjectInformation. Since desktops and windows stations are a mess, NtUserGetObjectInformation always fails. Ironically windows do such access checks everywhere except NtUserGetObjectInformation. Fix NtUserGetObjectInformation by removing access checks - Note: access checks for every other place will be fixed soon svn path=/trunk/; revision=55550 --- reactos/subsystems/win32/win32k/ntuser/winsta.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reactos/subsystems/win32/win32k/ntuser/winsta.c b/reactos/subsystems/win32/win32k/ntuser/winsta.c index 51aa4890df4..edbda779c05 100644 --- a/reactos/subsystems/win32/win32k/ntuser/winsta.c +++ b/reactos/subsystems/win32/win32k/ntuser/winsta.c @@ -649,8 +649,8 @@ NtUserGetObjectInformation( TRACE("Trying to open window station 0x%x\n", hObject); Status = IntValidateWindowStationHandle( hObject, - UserMode,/*ExGetPreviousMode(),*/ - GENERIC_READ, /* FIXME: is this ok? */ + UserMode, + 0, &WinStaObject); @@ -667,8 +667,8 @@ NtUserGetObjectInformation( TRACE("Trying to open desktop 0x%x\n", hObject); Status = IntValidateDesktopHandle( hObject, - UserMode,/*ExGetPreviousMode(),*/ - GENERIC_READ, /* FIXME: is this ok? */ + UserMode, + 0, &DesktopObject); if (!NT_SUCCESS(Status)) {