Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / sandbox / win / src / window.cc
index ed5a662..cfbf280 100644 (file)
@@ -44,8 +44,8 @@ ResultCode CreateAltWindowStation(HWINSTA* winsta) {
 
   // Create the window station using NULL for the name to ask the os to
   // generate it.
-  // TODO(nsylvain): don't ask for WINSTA_ALL_ACCESS if we don't need to.
-  *winsta = ::CreateWindowStationW(NULL, 0, WINSTA_ALL_ACCESS, &attributes);
+  *winsta = ::CreateWindowStationW(
+      NULL, 0, GENERIC_READ | WINSTA_CREATEDESKTOP, &attributes);
   LocalFree(attributes.lpSecurityDescriptor);
 
   if (*winsta)
@@ -84,8 +84,12 @@ ResultCode CreateAltDesktop(HWINSTA winsta, HDESK* desktop) {
   }
 
   // Create the destkop.
-  // TODO(nsylvain): don't ask for GENERIC_ALL if we don't need to.
-  *desktop = ::CreateDesktop(desktop_name.c_str(), NULL, NULL, 0, GENERIC_ALL,
+  *desktop = ::CreateDesktop(desktop_name.c_str(),
+                             NULL,
+                             NULL,
+                             0,
+                             DESKTOP_CREATEWINDOW | DESKTOP_READOBJECTS |
+                                 READ_CONTROL | WRITE_DAC | WRITE_OWNER,
                              &attributes);
   ::LocalFree(attributes.lpSecurityDescriptor);