This commit is contained in:
DavidXanatos 2022-05-28 09:40:14 +02:00
parent ffa1f78ce4
commit 15d12d77da
8 changed files with 156 additions and 136 deletions

View File

@ -21,8 +21,8 @@
#ifndef _MY_VERSION_H
#define _MY_VERSION_H
#define MY_VERSION_BINARY 5,56,0
#define MY_VERSION_STRING "5.56.0"
#define MY_VERSION_BINARY 5,56,1
#define MY_VERSION_STRING "5.56.1"
#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

View File

@ -629,14 +629,8 @@ BOOLEAN Handle_Init(void);
BOOLEAN Key_Init(void);
extern BOOLEAN Key_Delete_v2;
BOOLEAN Key_InitDelete_v2();
BOOLEAN File_Init(void);
extern BOOLEAN File_Delete_v2;
BOOLEAN File_InitDelete_v2();
BOOLEAN Ipc_Init(void);
BOOLEAN Secure_Init(void);

View File

@ -1,6 +1,6 @@
/*
* Copyright 2004-2020 Sandboxie Holdings, LLC
* Copyright 2020-2021 David Xanatos, xanasoft.com
* Copyright 2020-2022 David Xanatos, xanasoft.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -420,6 +420,15 @@ _FX void Dll_InitInjected(void)
}
}
if (ok) {
//
// ipc must be initialized before anythign else to make delete v2 work
//
ok = Ipc_Init();
}
if (ok) {
//
@ -444,9 +453,6 @@ _FX void Dll_InitInjected(void)
if (ok)
ok = File_Init();
if (ok)
ok = Ipc_Init();
if (ok)
ok = Secure_Init();
@ -462,12 +468,6 @@ _FX void Dll_InitInjected(void)
if (ok)
ok = Gui_InitConsole1();
// we need ipc stuff to be up hance we initialize delete stuff second to last
if (ok && File_Delete_v2)
File_InitDelete_v2();
if (ok && Key_Delete_v2)
Key_InitDelete_v2();
if (ok) // Note: Ldr_Init may cause rpcss to be started early
ok = Ldr_Init(); // last to initialize

View File

@ -149,6 +149,9 @@ _FX BOOLEAN File_Init(void)
if (! File_InitDrives(0xFFFFFFFF))
return FALSE;
if (File_Delete_v2)
File_InitDelete_v2();
if (SbieApi_QueryConfBool(NULL, L"SeparateUserFolders", TRUE)) {
if (!File_InitUsers())
return FALSE;

View File

@ -364,6 +364,9 @@ _FX BOOLEAN Key_Init(void)
Key_Delete_v2 = SbieApi_QueryConfBool(NULL, L"UseRegDeleteV2", FALSE);
if (Key_Delete_v2)
Key_InitDelete_v2();
List_Init(&Key_Handles);
List_Init(&Key_MergeCacheList);

View File

@ -2000,6 +2000,24 @@ _FX ULONG Sxs_CheckManifestForCreateProcess(const WCHAR *DosPath)
}
//---------------------------------------------------------------------------
// Sxs_PreferExternal
//---------------------------------------------------------------------------
_FX BOOLEAN Sxs_PreferExternal(THREAD_DATA *TlsData)
{
if (!TlsData->proc_image_path)
return FALSE;
WCHAR *ptr1 = wcsrchr(TlsData->proc_image_path, L'\\');
WCHAR value[16];
SbieDll_GetSettingsForName(NULL, ptr1 + 1, L"PreferExternalManifest", value, sizeof(value), NULL);
return Config_String2Bool(value, FALSE);
}
//---------------------------------------------------------------------------
// Sxs_KeyCallback
//---------------------------------------------------------------------------
@ -2014,12 +2032,10 @@ _FX BOOLEAN Sxs_KeyCallback(const WCHAR *path, HANDLE *out_handle)
// a pre-set value for PreferExternalManifest
//
if (!Config_GetSettingsForImageName_bool(L"PreferExternalManifest", FALSE))
return FALSE;
THREAD_DATA *TlsData = Dll_GetTlsData(NULL);
if (TlsData->proc_image_path) {
if (!Sxs_PreferExternal(TlsData))
return FALSE;
if (_wcsnicmp(path, L"\\Registry\\Machine\\", 18) == 0) {
@ -2091,7 +2107,6 @@ _FX BOOLEAN Sxs_KeyCallback(const WCHAR *path, HANDLE *out_handle)
SbieApi_Log(2205, ValueName);
}
}
}
return FALSE;
}
@ -2111,12 +2126,10 @@ _FX BOOLEAN Sxs_FileCallback(const WCHAR *path, HANDLE *out_handle)
// our installation home directory
//
if (!Config_GetSettingsForImageName_bool(L"PreferExternalManifest", FALSE))
return FALSE;
THREAD_DATA *TlsData = Dll_GetTlsData(NULL);
if (TlsData->proc_image_path) {
if (!Sxs_PreferExternal(TlsData))
return FALSE;
const WCHAR *_Manifest_Txt = L"\\Manifest1.txt";
const WCHAR *_Config_Txt = L"\\Manifest2.txt";
@ -2201,7 +2214,6 @@ _FX BOOLEAN Sxs_FileCallback(const WCHAR *path, HANDLE *out_handle)
SbieApi_Log(2205, FileName + 1);
}
}
return FALSE;
}

View File

@ -635,6 +635,14 @@ Tmpl.Title=#4338,Microsoft Edge
Tmpl.Class=WebBrowser
OpenFilePath=msedge.exe,%Tmpl.Edge%\*
[Template_LastPass]
Tmpl.Title=MS Edge for windows 11
Tmpl.Class=WebBrowser
Tmpl.Url=https://www.microsoft.com/en-us/edge
Tmpl.Scan=s
Tmpl.ScanFile=C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe
PreferExternalManifest=msedge.exe,y
#
# Vivaldi
#

View File

@ -2,7 +2,7 @@
#define VERSION_MJR 1
#define VERSION_MIN 1
#define VERSION_REV 0
#define VERSION_REV 1
#define VERSION_UPD 0
#ifndef STR