[WINLOGON]

- Create the window station handle and the desktops with MAXIMUM_ALLOWED access rights.
- Call AddAceToWindowStation before calling SetWindowStationUser.

svn path=/trunk/; revision=66863
This commit is contained in:
Giannis Adamopoulos 2015-03-23 07:46:17 +00:00
parent 218064f15d
commit 6f9088f10e
2 changed files with 11 additions and 4 deletions

View file

@ -1007,6 +1007,11 @@ DoGenericAction(
DWORD WINAPI SetWindowStationUser(HWINSTA hWinSta, LUID* pluid, PSID psid, DWORD sidSize);
BOOL
AddAceToWindowStation(
IN HWINSTA WinSta,
IN PSID Sid);
static
BOOL AllowWinstaAccess(PWLSESSION Session)
{
@ -1069,6 +1074,8 @@ BOOL AllowWinstaAccess(PWLSESSION Session)
goto Cleanup;
}
AddAceToWindowStation(Session->InteractiveWindowStation, psid);
ret = SetWindowStationUser(Session->InteractiveWindowStation,
&Stats.AuthenticationId,
psid,

View file

@ -1235,7 +1235,7 @@ CreateWindowStationAndDesktops(
Session->InteractiveWindowStation = CreateWindowStationW(
Session->InteractiveWindowStationName,
0,
GENERIC_ALL,
MAXIMUM_ALLOWED,
&DefaultSecurity);
if (!Session->InteractiveWindowStation)
{
@ -1256,7 +1256,7 @@ CreateWindowStationAndDesktops(
NULL,
NULL,
0, /* FIXME: Add DF_ALLOWOTHERACCOUNTHOOK flag? */
GENERIC_ALL,
MAXIMUM_ALLOWED,
&UserDesktopSecurity);
if (!Session->ApplicationDesktop)
{
@ -1272,7 +1272,7 @@ CreateWindowStationAndDesktops(
NULL,
NULL,
0,
GENERIC_ALL,
MAXIMUM_ALLOWED,
&DefaultSecurity);
if (!Session->WinlogonDesktop)
{
@ -1288,7 +1288,7 @@ CreateWindowStationAndDesktops(
NULL,
NULL,
0,
GENERIC_ALL,
MAXIMUM_ALLOWED,
&DefaultSecurity);
if(!Session->ScreenSaverDesktop)
{