added #3276
This commit is contained in:
parent
2ffbeb111c
commit
7e13550360
|
@ -8,6 +8,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||||
|
|
||||||
## [1.13.5 / 5.68.5] - 2024-03-??
|
## [1.13.5 / 5.68.5] - 2024-03-??
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- added Setting all processes per box to a certain core [#3276](https://github.com/sandboxie-plus/Sandboxie/issues/3276)
|
||||||
|
- set "CpuAffinityMask=0x00000001" in the ini where 0x00000001 is a bit mask indicating which cores are to be used
|
||||||
|
- only supports cores 0-31 fore 32+ will be alwayd disabled when this option is used
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- on systems in test signing mode sandboxie will by default try outdated offsets
|
- on systems in test signing mode sandboxie will by default try outdated offsets
|
||||||
- changed Qt5 version to Qt5.15.13 with latest security patches [#3694](https://github.com/sandboxie-plus/Sandboxie/pull/3694) (thanks LumitoLuma)
|
- changed Qt5 version to Qt5.15.13 with latest security patches [#3694](https://github.com/sandboxie-plus/Sandboxie/pull/3694) (thanks LumitoLuma)
|
||||||
|
|
|
@ -516,6 +516,19 @@ _FX void Dll_InitInjected(void)
|
||||||
ExitProcess(-1);
|
ExitProcess(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Setup soft resource restrictions
|
||||||
|
//
|
||||||
|
|
||||||
|
WCHAR str[32];
|
||||||
|
if (NT_SUCCESS(SbieApi_QueryConfAsIs(NULL, L"CpuAffinityMask", 0, str, sizeof(str) - sizeof(WCHAR))) && str[0] == L'0' && (str[1] == L'x' || str[1] == L'X')){
|
||||||
|
|
||||||
|
WCHAR* endptr;
|
||||||
|
KAFFINITY AffinityMask = wcstoul(str + 2, &endptr, 16); // note we only support core 0-31 as wcstoull is not exported by ntdll
|
||||||
|
if (AffinityMask)
|
||||||
|
NtSetInformationProcess(GetCurrentProcess(), ProcessAffinityMask, &AffinityMask, sizeof(KAFFINITY));
|
||||||
|
}
|
||||||
|
|
||||||
Dll_InitComplete = TRUE;
|
Dll_InitComplete = TRUE;
|
||||||
|
|
||||||
if (! Dll_RestrictedToken)
|
if (! Dll_RestrictedToken)
|
||||||
|
|
Loading…
Reference in New Issue