From 967bab95cea4f80e8ab74aee919f07bf10410816 Mon Sep 17 00:00:00 2001 From: DavidXanatos Date: Sat, 29 Jan 2022 10:33:39 +0100 Subject: [PATCH] 1.0.9 --- Sandboxie/core/dll/file.c | 5 +++-- Sandboxie/core/dll/file_dir.c | 5 +++++ SandboxiePlus/QSbieAPI/Sandboxie/SandBox.cpp | 6 +++--- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Sandboxie/core/dll/file.c b/Sandboxie/core/dll/file.c index 1aecb526..d161555d 100644 --- a/Sandboxie/core/dll/file.c +++ b/Sandboxie/core/dll/file.c @@ -3375,11 +3375,12 @@ ReparseLoop: } // + // Note: This is disabled in the driver since Win 10 1903 (see comments in file.c in File_Generic_MyParseProc). // if the caller specifies write attributes, this is only permitted // on non-directory files, so we must be sure to tell the driver // - if (DesiredAccess & DIRECTORY_JUNCTION_ACCESS) { + /*if (DesiredAccess & DIRECTORY_JUNCTION_ACCESS) { if ((CreateOptions & FILE_DIRECTORY_FILE) || (FileType & TYPE_DIRECTORY) && @@ -3392,7 +3393,7 @@ ReparseLoop: CreateOptions |= FILE_NON_DIRECTORY_FILE; } - } + }*/ // // finally we are ready to execute the caller's request on CopyPath. diff --git a/Sandboxie/core/dll/file_dir.c b/Sandboxie/core/dll/file_dir.c index fd5e11b5..4897f79f 100644 --- a/Sandboxie/core/dll/file_dir.c +++ b/Sandboxie/core/dll/file_dir.c @@ -3764,6 +3764,11 @@ _FX NTSTATUS File_SetReparsePoint( } +//--------------------------------------------------------------------------- +// File_DoAutoRecover +//--------------------------------------------------------------------------- + + _FX void File_DoAutoRecover(BOOLEAN force) { static ULONG last_ticks = 0; diff --git a/SandboxiePlus/QSbieAPI/Sandboxie/SandBox.cpp b/SandboxiePlus/QSbieAPI/Sandboxie/SandBox.cpp index c67410ba..e20742a8 100644 --- a/SandboxiePlus/QSbieAPI/Sandboxie/SandBox.cpp +++ b/SandboxiePlus/QSbieAPI/Sandboxie/SandBox.cpp @@ -298,7 +298,7 @@ SB_PROGRESS CSandBox::TakeSnapshot(const QString& Name) if (!QDir().mkdir(m_FilePath + "\\snapshot-" + ID)) return SB_ERR(SB_SnapMkDirFail); if (!QFile::copy(m_FilePath + "\\RegHive", m_FilePath + "\\snapshot-" + ID + "\\RegHive")) - return SB_ERR(SB_SnapCopyRegFail); + return SB_ERR(SB_SnapCopyDatFail); ini.setValue("Snapshot_" + ID + "/Name", Name); ini.setValue("Snapshot_" + ID + "/SnapshotDate", QDateTime::currentDateTime().toTime_t()); @@ -492,9 +492,9 @@ SB_PROGRESS CSandBox::SelectSnapshot(const QString& ID) return SB_ERR(SB_SnapIsRunning, OP_CONFIRM); if (!QFile::remove(m_FilePath + "\\RegHive")) - return SB_ERR(SB_SnapDelRegFail); + return SB_ERR(SB_SnapDelDatFail); if (!QFile::copy(m_FilePath + "\\snapshot-" + ID + "\\RegHive", m_FilePath + "\\RegHive")) - return SB_ERR(SB_SnapCopyRegFail); + return SB_ERR(SB_SnapCopyDatFail); ini.setValue("Current/Snapshot", ID); ini.sync();