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

View file

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