This commit is contained in:
DavidXanatos 2024-03-03 22:10:30 +01:00
parent 6001575e84
commit 1ff28679b0
5 changed files with 35 additions and 6 deletions

View File

@ -17,12 +17,14 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- added option to prevent sandboxed processes from interfering with power operations [#3640](https://github.com/sandboxie-plus/Sandboxie/issues/3640) (thx Yeyixiao)
- it can be enabled with "BlockInterferePower=y"
- see the sandbox option "Prevents processes in the sandbox from interfering with power operations" in SandMan UI
- added new pattern mechanism using a ** in a pattern as palceholder means an arbitrary path element but not containing a '\'
### Changed
- reworked option for suspending all processes in SandMan (originally introduced in 1.13.1) [#3582](https://github.com/sandboxie-plus/Sandboxie/issues/3582#issuecomment-1969628215)
### Fixed
- fixed privacy mode, NormalFilePath and symbolic link issue [#3660](https://github.com/sandboxie-plus/Sandboxie/issues/3660)
- fixed "Recycle bin for drive * is corrupted" [#3665] (https://github.com/sandboxie-plus/Sandboxie/issues/3665)

View File

@ -21,8 +21,8 @@
#ifndef _MY_VERSION_H
#define _MY_VERSION_H
#define MY_VERSION_BINARY 5,68,1
#define MY_VERSION_STRING "5.68.1"
#define MY_VERSION_BINARY 5,68,2
#define MY_VERSION_STRING "5.68.2"
#define MY_ABI_VERSION 0x56800
// These #defines are used by either Resource Compiler or NSIS installer

View File

@ -63,6 +63,7 @@ struct _PATTERN {
// allocated as part of this PATTERN object
struct {
BOOLEAN hex;
BOOLEAN no_bs;
USHORT len;
WCHAR *ptr;
} cons[0];
@ -100,6 +101,9 @@ _Check_return_ _CRTIMP long __cdecl wcstol(_In_z_ const wchar_t *_Str, _Out_op
static const WCHAR *Pattern_wcsnstr(
const WCHAR *hstr, const WCHAR *nstr, int nlen);
static const WCHAR *Pattern_wcsnstr_ex(
const WCHAR *hstr, const WCHAR *nstr, int nlen, int no_bs);
//---------------------------------------------------------------------------
// Variables
@ -125,6 +129,7 @@ _FX PATTERN *Pattern_Create(
PATTERN *pat;
WCHAR *optr;
BOOLEAN any_hex_cons;
ULONG start_count;
//
// count number of constant parts in the input string, and
@ -190,8 +195,11 @@ _FX PATTERN *Pattern_Create(
iptr = string;
while (iptr) {
while (*iptr == L'*')
start_count = num_cons > 0 ? 1 : 0;
while (*iptr == L'*') {
++iptr;
++start_count;
}
iptr2 = wcschr(iptr, L'*');
if (iptr2) {
@ -218,6 +226,8 @@ _FX PATTERN *Pattern_Create(
} else
pat->cons[num_cons].hex = FALSE;
pat->cons[num_cons].no_bs = start_count == 2;
++num_cons;
optr += len_ptr + 1;
}
@ -404,9 +414,9 @@ _FX int Pattern_Match2(
while (1) {
const WCHAR *ptr = Pattern_wcsnstr(
const WCHAR *ptr = Pattern_wcsnstr_ex(
string + str_index,
pat->cons[con_index].ptr, pat->cons[con_index].len);
pat->cons[con_index].ptr, pat->cons[con_index].len, pat->cons[con_index].no_bs);
if (! ptr) {
@ -607,6 +617,18 @@ _FX int Pattern_wcstol(const WCHAR *text, WCHAR **endptr)
_FX const WCHAR *Pattern_wcsnstr(
const WCHAR *hstr, const WCHAR *nstr, int nlen)
{
return Pattern_wcsnstr_ex(hstr, nstr, nlen, FALSE);
}
//---------------------------------------------------------------------------
// Pattern_wcsnstr_ex
//---------------------------------------------------------------------------
_FX const WCHAR *Pattern_wcsnstr_ex(
const WCHAR *hstr, const WCHAR *nstr, int nlen, int no_bs)
{
int i;
while (*hstr) {
@ -620,6 +642,8 @@ _FX const WCHAR *Pattern_wcsnstr(
return hstr;
}
++hstr;
if (no_bs && *hstr == L'\\')
break;
}
return NULL;
}

View File

@ -432,6 +432,9 @@ NormalFilePath=%SbieHome%\*
NormalFilePath=%ProgramFiles%\*
NormalFilePath=%ProgramFiles% (x86)\*
NormalFilePath=%ProgramData%\Microsoft\*
# recycle bin
NormalFilePath=?:\$Recycle.Bin\*
WriteFilePath=?:\$Recycle.Bin\**\*
# shell & ui
NormalKeyPath=HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize\*
NormalKeyPath=HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\*

View File

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