mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1172388: Use a USER_RESTRICTED access level token on Windows 10. r=cpearce
This commit is contained in:
parent
128d605a1b
commit
791d7b4fed
@ -5,6 +5,8 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "sandboxBroker.h"
|
||||
|
||||
#include "base/win/windows_version.h"
|
||||
#include "sandbox/win/src/sandbox.h"
|
||||
#include "sandbox/win/src/sandbox_factory.h"
|
||||
#include "sandbox/win/src/security_level.h"
|
||||
@ -293,9 +295,13 @@ SandboxBroker::SetSecurityLevelForGMPlugin()
|
||||
|
||||
auto result = mPolicy->SetJobLevel(sandbox::JOB_LOCKDOWN, 0);
|
||||
bool ret = (sandbox::SBOX_ALL_OK == result);
|
||||
result =
|
||||
mPolicy->SetTokenLevel(sandbox::USER_RESTRICTED_SAME_ACCESS,
|
||||
if (base::win::GetVersion() > base::win::VERSION_WIN8_1) {
|
||||
result = mPolicy->SetTokenLevel(sandbox::USER_RESTRICTED_SAME_ACCESS,
|
||||
sandbox::USER_RESTRICTED);
|
||||
} else {
|
||||
result = mPolicy->SetTokenLevel(sandbox::USER_RESTRICTED_SAME_ACCESS,
|
||||
sandbox::USER_LOCKDOWN);
|
||||
}
|
||||
ret = ret && (sandbox::SBOX_ALL_OK == result);
|
||||
|
||||
result = mPolicy->SetAlternateDesktop(true);
|
||||
|
Loading…
Reference in New Issue
Block a user