From 48801788d8cc2cbbd8146767f962ec1ca542a403 Mon Sep 17 00:00:00 2001 From: DavidXanatos Date: Sun, 13 Feb 2022 12:55:52 +0100 Subject: [PATCH] 1.0.11 --- CHANGELOG.md | 20 + Sandboxie/common/my_version.h | 4 +- Sandboxie/common/wow64ext/CMemPtr.h | 9 +- Sandboxie/common/wow64ext/wow64ext.cpp | 19 +- Sandboxie/core/dll/debug.c | 27 +- Sandboxie/core/dll/debug.h | 1 + Sandboxie/core/dll/proc.c | 2 +- Sandboxie/install/Templates.ini | 6 + SandboxiePlus/MiscHelpers/Common/Common.cpp | 10 +- SandboxiePlus/SandMan/Forms/SettingsWindow.ui | 397 ++++++++++-------- SandboxiePlus/SandMan/SandMan.cpp | 51 ++- SandboxiePlus/SandMan/SandMan.h | 2 + SandboxiePlus/SandMan/Views/SbieView.cpp | 35 +- .../SandMan/Windows/OptionsAccess.cpp | 18 +- SandboxiePlus/SandMan/Windows/OptionsWindow.h | 3 +- .../SandMan/Windows/SettingsWindow.cpp | 8 +- SandboxiePlus/version.h | 2 +- 17 files changed, 383 insertions(+), 231 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd3d6cac..27f39a45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,26 @@ This project adheres to [Semantic Versioning](http://semver.org/). + + + + +## [1.0.11 / 5.55.11] - 2022-02-14 + +### Added +- added optional tray notification when a box content gets auto deleted +- added FreeDownloadManager template + +### Changed +- the asynchroniouse box operations introduced in the last build are due to a pupular request now disabled by default +- moved sys tray options from general to shell integration tab + +### Fixed +- fixed compatybility issue with SECUROM [#1597](https://github.com/sandboxie-plus/Sandboxie/issues/1597) +- fixed modality issue [#1615](https://github.com/sandboxie-plus/Sandboxie/issues/1615) + + + ## [1.0.10 / 5.55.10] - 2022-02-06 ### Added diff --git a/Sandboxie/common/my_version.h b/Sandboxie/common/my_version.h index 1d86d4ef..f515279b 100644 --- a/Sandboxie/common/my_version.h +++ b/Sandboxie/common/my_version.h @@ -21,8 +21,8 @@ #ifndef _MY_VERSION_H #define _MY_VERSION_H -#define MY_VERSION_BINARY 5,55,10 -#define MY_VERSION_STRING "5.55.10" +#define MY_VERSION_BINARY 5,55,11 +#define MY_VERSION_STRING "5.55.11" #define MY_VERSION_COMPAT "5.55.0" // this refers to the driver ABI compatibility // These #defines are used by either Resource Compiler or NSIS installer diff --git a/Sandboxie/common/wow64ext/CMemPtr.h b/Sandboxie/common/wow64ext/CMemPtr.h index fc7252fe..01502b59 100644 --- a/Sandboxie/common/wow64ext/CMemPtr.h +++ b/Sandboxie/common/wow64ext/CMemPtr.h @@ -34,14 +34,21 @@ public: { if (*m_ptr && watchActive) { - free(*m_ptr); + HeapFree(GetProcessHeap(), 0, *m_ptr); *m_ptr = 0; } } + static void* Alloc(size_t size) { + return HeapAlloc(GetProcessHeap(), 0, size); + } + void disableWatch() { watchActive = false; } }; +#define NEW(size) \ + CMemPtr::Alloc(size) + #define WATCH(ptr) \ CMemPtr watch_##ptr((void**)&ptr) diff --git a/Sandboxie/common/wow64ext/wow64ext.cpp b/Sandboxie/common/wow64ext/wow64ext.cpp index a524b1d8..91cbd0c7 100644 --- a/Sandboxie/common/wow64ext/wow64ext.cpp +++ b/Sandboxie/common/wow64ext/wow64ext.cpp @@ -37,17 +37,6 @@ //HANDLE g_heap; BOOL g_isWow64 = TRUE; -void* malloc(size_t size) -{ - return HeapAlloc(GetProcessHeap(), 0, size); -} - -void free(void* ptr) -{ - if (nullptr != ptr) - HeapFree(GetProcessHeap(), 0, ptr); -} - #include "CMemPtr.h" /*int _wcsicmp(const wchar_t *string1, const wchar_t *string2) @@ -329,7 +318,7 @@ extern "C" DWORD64 __cdecl GetModuleHandle64(const wchar_t* lpModuleName) { getMem64(&head, head.InLoadOrderLinks.Flink, sizeof(LDR_DATA_TABLE_ENTRY64)); - wchar_t* tempBuf = (wchar_t*)malloc(head.BaseDllName.MaximumLength); + wchar_t* tempBuf = (wchar_t*)NEW(head.BaseDllName.MaximumLength); if (nullptr == tempBuf) return 0; WATCH(tempBuf); @@ -373,19 +362,19 @@ DWORD64 getLdrGetProcedureAddress() IMAGE_EXPORT_DIRECTORY ied; getMem64(&ied, modBase + idd.VirtualAddress, sizeof(ied)); - DWORD* rvaTable = (DWORD*)malloc(sizeof(DWORD)*ied.NumberOfFunctions); + DWORD* rvaTable = (DWORD*)NEW(sizeof(DWORD)*ied.NumberOfFunctions); if (nullptr == rvaTable) return 0; WATCH(rvaTable); getMem64(rvaTable, modBase + ied.AddressOfFunctions, sizeof(DWORD)*ied.NumberOfFunctions); - WORD* ordTable = (WORD*)malloc(sizeof(WORD)*ied.NumberOfFunctions); + WORD* ordTable = (WORD*)NEW(sizeof(WORD)*ied.NumberOfFunctions); if (nullptr == ordTable) return 0; WATCH(ordTable); getMem64(ordTable, modBase + ied.AddressOfNameOrdinals, sizeof(WORD)*ied.NumberOfFunctions); - DWORD* nameTable = (DWORD*)malloc(sizeof(DWORD)*ied.NumberOfNames); + DWORD* nameTable = (DWORD*)NEW(sizeof(DWORD)*ied.NumberOfNames); if (nullptr == nameTable) return 0; WATCH(nameTable); diff --git a/Sandboxie/core/dll/debug.c b/Sandboxie/core/dll/debug.c index f64a3fd6..88eef85a 100644 --- a/Sandboxie/core/dll/debug.c +++ b/Sandboxie/core/dll/debug.c @@ -407,14 +407,37 @@ void DbgPrint(const char* format, ...) va_list va_args; va_start(va_args, format); - char *tmp1 = Dll_AllocTemp(510); + char tmp1[510]; extern int(*P_vsnprintf)(char *_Buffer, size_t Count, const char * const, va_list Args); P_vsnprintf(tmp1, 510, format, va_args); OutputDebugStringA(tmp1); - Dll_Free(tmp1); + va_end(va_args); +} + + + +//--------------------------------------------------------------------------- +// DbgPrint +//--------------------------------------------------------------------------- + + +void DbgTrace(const char* format, ...) +{ + va_list va_args; + va_start(va_args, format); + + char tmp1[510]; + WCHAR tmp2[510]; + + extern int(*P_vsnprintf)(char *_Buffer, size_t Count, const char * const, va_list Args); + P_vsnprintf(tmp1, 510, format, va_args); + + Sbie_snwprintf((WCHAR *)tmp2, 510, L"%S", tmp1); + + SbieApi_MonitorPut2(MONITOR_OTHER | MONITOR_TRACE, tmp2, FALSE); va_end(va_args); } diff --git a/Sandboxie/core/dll/debug.h b/Sandboxie/core/dll/debug.h index 0a0a02e0..b07afaaf 100644 --- a/Sandboxie/core/dll/debug.h +++ b/Sandboxie/core/dll/debug.h @@ -43,6 +43,7 @@ int Debug_Init(void); void DbgPrint(const char* format, ...); +void DbgTrace(const char* format, ...); #endif WITH_DEBUG diff --git a/Sandboxie/core/dll/proc.c b/Sandboxie/core/dll/proc.c index 9bc5eef5..ac4b93da 100644 --- a/Sandboxie/core/dll/proc.c +++ b/Sandboxie/core/dll/proc.c @@ -1323,7 +1323,7 @@ _FX BOOL Proc_AlternateCreateProcess( void *lpCurrentDirectory, LPPROCESS_INFORMATION lpProcessInformation, BOOL *ReturnValue) { - if (SbieApi_QueryConfBool(NULL, L"BlockSoftwareUpdaters", FALSE)) + //if (SbieApi_QueryConfBool(NULL, L"BlockSoftwareUpdaters", TRUE)) if (Proc_IsSoftwareUpdateW(lpApplicationName ? lpApplicationName : lpCommandLine)) { SetLastError(ERROR_ACCESS_DENIED); diff --git a/Sandboxie/install/Templates.ini b/Sandboxie/install/Templates.ini index 51e2ba4b..4e95dd54 100644 --- a/Sandboxie/install/Templates.ini +++ b/Sandboxie/install/Templates.ini @@ -3155,6 +3155,12 @@ OpenClsid={AC746233-E9D3-49CD-862F-068F7B7CCCA4} # prevent access to host port # BlockPort=1001 +[Template_FreeDownloadManager] +Tmpl.Title=Free Download Manager +Tmpl.Class=Download +Tmpl.Url=http://www.freedownloadmanager.org/ +RpcMgmtSetComTimeout=fdm.exe,y + [Template_SothinkWebVideoDownloader] Tmpl.Title=Sothink Web Video Downloader Stand-alone Tmpl.Class=Download diff --git a/SandboxiePlus/MiscHelpers/Common/Common.cpp b/SandboxiePlus/MiscHelpers/Common/Common.cpp index df0a84c4..13298e38 100644 --- a/SandboxiePlus/MiscHelpers/Common/Common.cpp +++ b/SandboxiePlus/MiscHelpers/Common/Common.cpp @@ -459,9 +459,15 @@ bool InitConsole(bool bCreateIfNeeded) // void SafeShow(QWidget* pWidget) { + static bool Lock = false; pWidget->setProperty("windowOpacity", 0.0); - pWidget->show(); - QApplication::processEvents(QEventLoop::ExcludeSocketNotifiers | QEventLoop::ExcludeSocketNotifiers); + if (Lock == false) { + Lock = true; + pWidget->show(); + QApplication::processEvents(QEventLoop::ExcludeSocketNotifiers | QEventLoop::ExcludeSocketNotifiers); + Lock = false; + } else + pWidget->show(); pWidget->setProperty("windowOpacity", 1.0); } diff --git a/SandboxiePlus/SandMan/Forms/SettingsWindow.ui b/SandboxiePlus/SandMan/Forms/SettingsWindow.ui index 90883951..a4ff069e 100644 --- a/SandboxiePlus/SandMan/Forms/SettingsWindow.ui +++ b/SandboxiePlus/SandMan/Forms/SettingsWindow.ui @@ -7,7 +7,7 @@ 0 0 634 - 440 + 451 @@ -54,108 +54,7 @@ - - - - - 75 - true - true - - - - Systray options - - - - - - - Watch Sandboxie.ini for changes - - - - - - - Use Dark Theme (fully applied after a restart) - - - true - - - - - - - Show first recovery window when emptying sandboxes - - - - - - - - - Hotkey for terminating all boxed processes: - - - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - - - UI Language: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Open urls from this ui sandboxed - - - true - - - - - - - Show Notifications for relevant log Messages - - - false - - - - + Qt::Horizontal @@ -168,26 +67,10 @@ - - + + - On main window close: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - - - - - Show Icon in Systray: - - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter - - - true + Watch Sandboxie.ini for changes @@ -198,6 +81,46 @@ + + + + UI Language: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Show first recovery window when emptying sandboxes + + + + + + + Use Dark Theme (fully applied after a restart) + + + true + + + @@ -211,21 +134,46 @@ - - + + - Show boxes in tray list: + Show Notifications for relevant log Messages - - Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + false - + + + + + + Open urls from this ui sandboxed + + true - - + + + + Run box operations asynchronously whenever possible (like content deletion) + + + + + + + + + Hotkey for terminating all boxed processes: + + + + + + + @@ -238,6 +186,69 @@ + + + + Add 'Run Sandboxed' to the explorer context menu + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + On main window close: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + + + + + Start UI when a sandboxed process is started + + + + + + + Show boxes in tray list: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + @@ -252,6 +263,20 @@ + + + + Always use DefaultBox + + + + + + + Add 'Run Un-Sandboxed' to the context menu + + + @@ -266,55 +291,7 @@ - - - - Start UI with Windows - - - - - - - Add 'Run Sandboxed' to the explorer context menu - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Start UI when a sandboxed process is started - - - - - - - Add 'Run Un-Sandboxed' to the context menu - - - - - - - Always use DefaultBox - - - - + Qt::Horizontal @@ -327,15 +304,65 @@ - - + + + + Show Icon in Systray: + + + Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter + + + true + + + + + + + Start UI with Windows + + + + + + + Show a tray notification when automatic box operations are started + + + + + + + + 75 + true + true + + + + Systray options + + + + + + + + + + + + + + - Qt::Vertical + Qt::Horizontal - 20 - 40 + 40 + 20 @@ -433,7 +460,7 @@ - Activate Kernel Mode Object Filtering (experimental) + Activate Kernel Mode Object Filtering diff --git a/SandboxiePlus/SandMan/SandMan.cpp b/SandboxiePlus/SandMan/SandMan.cpp index 416ac0e8..2668e4c0 100644 --- a/SandboxiePlus/SandMan/SandMan.cpp +++ b/SandboxiePlus/SandMan/SandMan.cpp @@ -900,6 +900,20 @@ void CSandMan::timerEvent(QTimerEvent* pEvent) } } +bool CSandMan::DoDeleteCmd(const CSandBoxPtr &pBox) +{ + foreach(const QString& Value, pBox->GetTextList("OnBoxDelete", true, false, true)) { + QString Value2 = pBox->Expand(Value); + CSbieProgressPtr pProgress = CSbieUtils::RunCommand(Value2, true); + if (!pProgress.isNull()) { + AddAsyncOp(pProgress, true, tr("Executing OnBoxDelete: %1").arg(Value2)); + if (pProgress->IsCanceled()) + return false; + } + } + return true; +} + void CSandMan::OnBoxClosed(const QString& BoxName) { CSandBoxPtr pBox = theAPI->GetBoxByName(BoxName); @@ -913,9 +927,32 @@ void CSandMan::OnBoxClosed(const QString& BoxName) if(!theGUI->OpenRecovery(pBox, DeleteShapshots, true)) // unless no files are found than continue silently return; - auto pBoxEx = pBox.objectCast(); - SB_STATUS Status = pBoxEx->DeleteContentAsync(DeleteShapshots); - CheckResults(QList() << Status); + if(theConf->GetBool("Options/AutoBoxOpsNotify", false)) + OnLogMessage(tr("Auto deleting content of %1").arg(BoxName), true); + + if (theConf->GetBool("Options/UseAsyncBoxOps", false)) + { + auto pBoxEx = pBox.objectCast(); + SB_STATUS Status = pBoxEx->DeleteContentAsync(DeleteShapshots); + CheckResults(QList() << Status); + } + else + { + if (!DoDeleteCmd(pBox)) + return; + + SB_PROGRESS Status; + if (!DeleteShapshots && pBox->HasSnapshots()) { // in auto delete mdoe always return to last snapshot + QString Current; + pBox->GetDefaultSnapshot(&Current); + Status = pBox->SelectSnapshot(Current); + } + else // if there are no snapshots just use the normal cleaning procedure + Status = pBox->CleanBox(); + + if (Status.GetStatus() == OP_ASYNC) + AddAsyncOp(Status.GetValue(), true, tr("Auto Deleting %1 content").arg(BoxName)); + } } } @@ -1156,7 +1193,7 @@ void CSandMan::OnLogSbieMessage(quint32 MsgCode, const QStringList& MsgData, qui Message = tr("The box %1 is configured to use features exclusively available to project supporters, these presets will be ignored.").arg(MsgData[1]); Message.append(tr("
Become a project supporter, and receive a supporter certificate")); - QMessageBox msgBox; + QMessageBox msgBox(this); msgBox.setTextFormat(Qt::RichText); msgBox.setIcon(QMessageBox::Critical); msgBox.setWindowTitle("Sandboxie-Plus"); @@ -1206,7 +1243,7 @@ bool CSandMan::CheckCertificate() // return false; //} - QMessageBox msgBox; + QMessageBox msgBox(this); msgBox.setTextFormat(Qt::RichText); msgBox.setIcon(QMessageBox::Information); msgBox.setWindowTitle("Sandboxie-Plus"); @@ -1589,9 +1626,9 @@ void CSandMan::HandleMaintenance(SB_RESULT(void*) Status) if (dwStatus != 0) { if(m_bStopPending) - QMessageBox::warning(NULL, tr("Sandboxie-Plus - Error"), tr("Failed to stop all Sandboxie components")); + QMessageBox::warning(this, tr("Sandboxie-Plus - Error"), tr("Failed to stop all Sandboxie components")); else if(m_bConnectPending) - QMessageBox::warning(NULL, tr("Sandboxie-Plus - Error"), tr("Failed to start required Sandboxie components")); + QMessageBox::warning(this, tr("Sandboxie-Plus - Error"), tr("Failed to start required Sandboxie components")); OnLogMessage(tr("Maintenance operation failed (%1)").arg((quint32)dwStatus)); CheckResults(QList() << SB_ERR(dwStatus)); diff --git a/SandboxiePlus/SandMan/SandMan.h b/SandboxiePlus/SandMan/SandMan.h index ab7d1170..1b2521dc 100644 --- a/SandboxiePlus/SandMan/SandMan.h +++ b/SandboxiePlus/SandMan/SandMan.h @@ -38,6 +38,8 @@ public: SB_PROGRESS RecoverFiles(const QList>& FileList, int Action = 0); + bool DoDeleteCmd(const CSandBoxPtr &pBox); + bool AddAsyncOp(const CSbieProgressPtr& pProgress, bool bWait = false, const QString& InitialMsg = QString()); static QString FormatError(const SB_STATUS& Error); static void CheckResults(QList Results); diff --git a/SandboxiePlus/SandMan/Views/SbieView.cpp b/SandboxiePlus/SandMan/Views/SbieView.cpp index f703caa1..9ca8ee7f 100644 --- a/SandboxiePlus/SandMan/Views/SbieView.cpp +++ b/SandboxiePlus/SandMan/Views/SbieView.cpp @@ -1021,10 +1021,37 @@ void CSbieView::OnSandBoxAction(QAction* Action) foreach(const CSandBoxPtr &pBox, SandBoxes) { - auto pBoxEx = pBox.objectCast(); - SB_STATUS Status = pBoxEx->DeleteContentAsync(DeleteShapshots); - if (Status.IsError()) - Results.append(Status); + if (theConf->GetBool("Options/UseAsyncBoxOps", false)) + { + auto pBoxEx = pBox.objectCast(); + SB_STATUS Status = pBoxEx->DeleteContentAsync(DeleteShapshots); + if (Status.IsError()) + Results.append(Status); + } + else + { + SB_STATUS Status1 = pBox->TerminateAll(); + if (Status1.IsError()) { + Results.append(Status1); + continue; + } + + if (!theGUI->DoDeleteCmd(pBox)) + continue; + + SB_PROGRESS Status; + if (!DeleteShapshots && pBox->HasSnapshots()) { + QString Default = pBox->GetDefaultSnapshot(); + Status = pBox->SelectSnapshot(Default); + } + else // if there are no snapshots jut use the normal cleaning procedure + Status = pBox->CleanBox(); + + if (Status.GetStatus() == OP_ASYNC) + theGUI->AddAsyncOp(Status.GetValue()); + else if (Status.IsError()) + Results.append(Status); + } } } else if (Action == m_pMenuEmptyBox) diff --git a/SandboxiePlus/SandMan/Windows/OptionsAccess.cpp b/SandboxiePlus/SandMan/Windows/OptionsAccess.cpp index 749dc85a..a7c1559e 100644 --- a/SandboxiePlus/SandMan/Windows/OptionsAccess.cpp +++ b/SandboxiePlus/SandMan/Windows/OptionsAccess.cpp @@ -195,18 +195,19 @@ void COptionsWindow::ParseAndAddAccessEntry(EAccessEntry EntryType, const QStrin case eOpenPipePath: Type = eFile; Mode = eOpen4All; break; case eClosedFilePath: Type = eFile; Mode = eClosed; break; case eReadFilePath: Type = eFile; Mode = eReadOnly; break; - case eWriteFilePath: Type = eFile; Mode = eWriteOnly; break; + case eWriteFilePath: Type = eFile; Mode = eBoxOnly; break; case eNormalKeyPath: Type = eKey; Mode = eNormal; break; case eOpenKeyPath: Type = eKey; Mode = eOpen; break; case eOpenConfPath: Type = eKey; Mode = eOpen4All;break; case eClosedKeyPath: Type = eKey; Mode = eClosed; break; case eReadKeyPath: Type = eKey; Mode = eReadOnly; break; - case eWriteKeyPath: Type = eKey; Mode = eWriteOnly; break; + case eWriteKeyPath: Type = eKey; Mode = eBoxOnly; break; case eNormalIpcPath: Type = eIPC; Mode = eNormal; break; case eOpenIpcPath: Type = eIPC; Mode = eOpen; break; case eClosedIpcPath: Type = eIPC; Mode = eClosed; break; + case eReadIpcPath: Type = eIPC; Mode = eReadOnly; break; case eOpenWinClass: Type = eWnd; Mode = eOpen; break; @@ -243,7 +244,7 @@ QString COptionsWindow::GetAccessModeStr(EAccessMode Mode) case eClosed: return tr("Closed"); case eClosedRT: return tr("Closed RT"); case eReadOnly: return tr("Read Only"); - case eWriteOnly: return tr("Boxed Only"); + case eBoxOnly: return tr("Box Only (Write Only)"); } return tr("Unknown"); } @@ -328,7 +329,7 @@ QString COptionsWindow::MakeAccessStr(EAccessType Type, EAccessMode Mode) case eOpen4All: return "OpenPipePath"; case eClosed: return "ClosedFilePath"; case eReadOnly: return "ReadFilePath"; - case eWriteOnly: return "WriteFilePath"; + case eBoxOnly: return "WriteFilePath"; } break; case eKey: @@ -339,7 +340,7 @@ QString COptionsWindow::MakeAccessStr(EAccessType Type, EAccessMode Mode) case eOpen4All: return "OpenConfPath"; case eClosed: return "ClosedKeyPath"; case eReadOnly: return "ReadKeyPath"; - case eWriteOnly: return "WriteKeyPath"; + case eBoxOnly: return "WriteKeyPath"; } break; case eIPC: @@ -348,6 +349,7 @@ QString COptionsWindow::MakeAccessStr(EAccessType Type, EAccessMode Mode) case eNormal: return "NormalIpcPath"; case eOpen: return "OpenIpcPath"; case eClosed: return "ClosedIpcPath"; + case eReadOnly: return "ReadIpcPath"; } break; case eWnd: @@ -448,8 +450,8 @@ QList COptionsWindow::GetAccessModes(EAccessType Ty { switch (Type) { - case eFile: return QList() << eNormal << eOpen << eOpen4All << eClosed << eReadOnly << eWriteOnly; - case eKey: return QList() << eNormal << eOpen << eOpen4All << eClosed << eReadOnly << eWriteOnly; + case eFile: return QList() << eNormal << eOpen << eOpen4All << eClosed << eReadOnly << eBoxOnly; + case eKey: return QList() << eNormal << eOpen << eOpen4All << eClosed << eReadOnly << eBoxOnly; case eIPC: return QList() << eNormal << eOpen << eClosed; case eWnd: return QList() << eOpen; case eCOM: return QList() << eOpen << eClosed << eClosedRT; @@ -556,7 +558,7 @@ void COptionsWindow::SaveAccessList() QStringList Keys = QStringList() << "NormalFilePath" << "OpenFilePath" << "OpenPipePath" << "ClosedFilePath" << "ReadFilePath" << "WriteFilePath" << "NormalKeyPath" << "OpenKeyPath" << "OpenConfPath" << "ClosedKeyPath" << "ReadKeyPath" << "WriteKeyPath" - << "NormalIpcPath"<< "OpenIpcPath" << "ClosedIpcPath" << "OpenWinClass" << "OpenClsid" << "ClosedClsid" << "ClosedRT"; + << "NormalIpcPath"<< "OpenIpcPath" << "ClosedIpcPath" << "ReadIpcPath" << "OpenWinClass" << "OpenClsid" << "ClosedClsid" << "ClosedRT"; QMap> AccessMap; for (int i = 0; i < ui.treeAccess->topLevelItemCount(); i++) diff --git a/SandboxiePlus/SandMan/Windows/OptionsWindow.h b/SandboxiePlus/SandMan/Windows/OptionsWindow.h index 8479eca7..12370912 100644 --- a/SandboxiePlus/SandMan/Windows/OptionsWindow.h +++ b/SandboxiePlus/SandMan/Windows/OptionsWindow.h @@ -202,6 +202,7 @@ protected: eNormalIpcPath, eOpenIpcPath, eClosedIpcPath, + eReadIpcPath, eOpenWinClass, @@ -229,7 +230,7 @@ protected: eClosed, eClosedRT, eReadOnly, - eWriteOnly + eBoxOnly }; enum ETriggerAction { diff --git a/SandboxiePlus/SandMan/Windows/SettingsWindow.cpp b/SandboxiePlus/SandMan/Windows/SettingsWindow.cpp index 4e920b25..473ad2b6 100644 --- a/SandboxiePlus/SandMan/Windows/SettingsWindow.cpp +++ b/SandboxiePlus/SandMan/Windows/SettingsWindow.cpp @@ -130,7 +130,7 @@ CSettingsWindow::CSettingsWindow(QWidget *parent) m_FeaturesChanged = false; connect(ui.chkWFP, SIGNAL(stateChanged(int)), this, SLOT(OnFeaturesChanged())); connect(ui.chkObjCb, SIGNAL(stateChanged(int)), this, SLOT(OnFeaturesChanged())); - connect(ui.chkWin32k, SIGNAL(stateChanged(int)), this, SLOT(OnFeaturesChanged())); + //connect(ui.chkWin32k, SIGNAL(stateChanged(int)), this, SLOT(OnFeaturesChanged())); m_WarnProgsChanged = false; @@ -253,6 +253,7 @@ void CSettingsWindow::LoadSettings() ui.chkShowRecovery->setChecked(theConf->GetBool("Options/ShowRecovery", false)); ui.chkNotifyRecovery->setChecked(!theConf->GetBool("Options/InstantRecovery", true)); + ui.chkAsyncBoxOps->setChecked(theConf->GetBool("Options/UseAsyncBoxOps", false)); ui.chkPanic->setChecked(theConf->GetBool("Options/EnablePanicKey", false)); ui.keyPanic->setKeySequence(QKeySequence(theConf->GetString("Options/PanicKeySequence", "Shift+Pause"))); @@ -262,6 +263,7 @@ void CSettingsWindow::LoadSettings() ui.cmbSysTray->setCurrentIndex(theConf->GetInt("Options/SysTrayIcon", 1)); ui.cmbTrayBoxes->setCurrentIndex(theConf->GetInt("Options/SysTrayFilter", 0)); + ui.chkBoxOpsNotify->setChecked(theConf->GetBool("Options/AutoBoxOpsNotify", false)); ui.cmbOnClose->setCurrentIndex(ui.cmbOnClose->findData(theConf->GetString("Options/OnClose", "ToTray"))); @@ -277,7 +279,7 @@ void CSettingsWindow::LoadSettings() ui.ipcRoot->setText(theAPI->GetGlobalSettings()->GetText("IpcRootPath", IpcRootPath_Default)); ui.chkWFP->setChecked(theAPI->GetGlobalSettings()->GetBool("NetworkEnableWFP", false)); - ui.chkObjCb->setChecked(theAPI->GetGlobalSettings()->GetBool("EnableObjectFiltering", false)); + ui.chkObjCb->setChecked(theAPI->GetGlobalSettings()->GetBool("EnableObjectFiltering", true)); ui.chkWin32k->setChecked(theAPI->GetGlobalSettings()->GetBool("EnableWin32kHooks", true)); ui.chkAdminOnly->setChecked(theAPI->GetGlobalSettings()->GetBool("EditAdminOnly", false)); @@ -406,6 +408,7 @@ void CSettingsWindow::SaveSettings() theConf->SetValue("Options/ShowRecovery", ui.chkShowRecovery->isChecked()); theConf->SetValue("Options/InstantRecovery", !ui.chkNotifyRecovery->isChecked()); + theConf->SetValue("Options/UseAsyncBoxOps", ui.chkAsyncBoxOps->isChecked()); theConf->SetValue("Options/EnablePanicKey", ui.chkPanic->isChecked()); theConf->SetValue("Options/PanicKeySequence", ui.keyPanic->keySequence().toString()); @@ -414,6 +417,7 @@ void CSettingsWindow::SaveSettings() theConf->SetValue("Options/SysTrayIcon", ui.cmbSysTray->currentIndex()); theConf->SetValue("Options/SysTrayFilter", ui.cmbTrayBoxes->currentIndex()); + theConf->SetValue("Options/AutoBoxOpsNotify", ui.chkBoxOpsNotify->isChecked()); theConf->SetValue("Options/OnClose", ui.cmbOnClose->currentData()); diff --git a/SandboxiePlus/version.h b/SandboxiePlus/version.h index 24fbad8d..da8a412a 100644 --- a/SandboxiePlus/version.h +++ b/SandboxiePlus/version.h @@ -2,7 +2,7 @@ #define VERSION_MJR 1 #define VERSION_MIN 0 -#define VERSION_REV 10 +#define VERSION_REV 11 #define VERSION_UPD 0 #ifndef STR