diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a65beb4..38dd1863 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,8 @@ This project adheres to [Semantic Versioning](http://semver.org/). - added the ability to hide certificates in editbox in Global Setting (idea by Yeyixiao) - added Opening a program in several sandboxes at once [#4231](https://github.com/sandboxie-plus/Sandboxie/issues/4231) - added "Description" field inside the sandbox settings [#4243](https://github.com/sandboxie-plus/Sandboxie/issues/4243) +- added "NotifyMsiInstaller=y" enabled by default to display message SBIE2194 when an MSI installer is run in a box without the recomended excemptions [#4330](https://github.com/sandboxie-plus/Sandboxie/issues/4330) + - SBIE2194: MSI installer requires 'MsiInstallerExemptions=y' option to be set in the ini to be able to work correctly, however this option weakens the isolation. ### Fixed - fixed Sign the .tmp file that gets dropped when installing or updating Sandboxie Plus [#2643](https://github.com/sandboxie-plus/Sandboxie/issues/2643) diff --git a/Sandboxie/core/dll/custom.c b/Sandboxie/core/dll/custom.c index a76d8ff8..3224ae66 100644 --- a/Sandboxie/core/dll/custom.c +++ b/Sandboxie/core/dll/custom.c @@ -1880,61 +1880,6 @@ _FX BOOLEAN Custom_OsppcDll(HMODULE module) // Custom_ProductID //--------------------------------------------------------------------------- -/*static wchar_t GetCharFromInt(int a) { - switch (a) { - case 0: - return L'0'; - break; - case 1: - return L'1'; - break; - case 2: - return L'2'; - break; - case 3: - return L'3'; - break; - case 4: - return L'4'; - break; - case 5: - return L'5'; - break; - case 6: - return L'6'; - break; - case 7: - return L'7'; - break; - case 8: - return L'8'; - break; - case 9: - return L'9'; - break; - } - return 0; -} - -static int GetIntLen(DWORD n) { - int count = 0; - while (n != 0) - { - n = n / 10; - count++; - } - return count; -}*/ - -static unsigned long seed = 1; - -int my_rand(void) -{ - seed = (seed * 214013L - + 2531011L) >> 16; - return((unsigned)seed & 0x7fff); -} - /*char* my_itoa(int num, char* str, int radix) { char index[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; @@ -2026,11 +1971,10 @@ _FX BOOLEAN Custom_ProductID(void) RtlInitUnicodeString(&uni, L"ProductId"); - seed = GetTickCount(); - int chain1 = my_rand() % 10000 + 9999, - chain2 = my_rand() % 10000 + 9999, - chain3 = my_rand() % 10000 + 9999, - chain4 = my_rand() % 10000 + 9999 + int chain1 = Dll_rand() % 10000 + 9999, + chain2 = Dll_rand() % 10000 + 9999, + chain3 = Dll_rand() % 10000 + 9999, + chain4 = Dll_rand() % 10000 + 9999 ; Sbie_snwprintf(tmp, 34, L"%05d-%05d-%05d-%05d", chain1, chain2, chain3, chain4); diff --git a/Sandboxie/core/dll/dllmain.c b/Sandboxie/core/dll/dllmain.c index acd50513..03484483 100644 --- a/Sandboxie/core/dll/dllmain.c +++ b/Sandboxie/core/dll/dllmain.c @@ -886,10 +886,16 @@ _FX VOID Dll_Ordinal1(INJECT_DATA * inject) // msi installer requires COM to be sandboxed, else the installation will be done outside the sandbox // - if (Dll_ImageType == DLL_IMAGE_MSI_INSTALLER && SbieDll_IsOpenCOM()) { + if (Dll_ImageType == DLL_IMAGE_MSI_INSTALLER) { - SbieApi_Log(2196, NULL); - ExitProcess(0); + if (SbieDll_IsOpenCOM()) { + SbieApi_Log(2196, NULL); + ExitProcess(0); + } + + if (!SbieApi_QueryConfBool(NULL, L"MsiInstallerExemptions", FALSE) && SbieApi_QueryConfBool(NULL, L"NotifyMsiInstaller", TRUE)) { + SbieApi_Log(2194, L"MsiInstallerExemptions=y"); + } } } else diff --git a/Sandboxie/msgs/Sbie-English-1033.txt b/Sandboxie/msgs/Sbie-English-1033.txt index bf804213..a28e079a 100644 --- a/Sandboxie/msgs/Sbie-English-1033.txt +++ b/Sandboxie/msgs/Sbie-English-1033.txt @@ -420,7 +420,7 @@ SBIE2193 Make sure to delete the sandbox after completing the update process. . 2194;pop;inf;01 -SBIE2194 MSI installer requires %2 option to be set in the ini, what however weakens the isolation. +SBIE2194 MSI installer requires %2 option to be set in the ini to be able to work correctly, however this option weakens the isolation. . 2195;pop;inf;01