Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update #3867

Merged
merged 56 commits into from
May 2, 2024
Merged

update #3867

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
d09d17d
Update CHANGELOG.md
DavidXanatos Apr 21, 2024
ba97a44
Update CHANGELOG.md
isaak654 Apr 21, 2024
71dcf95
Update SettingsWindow.cpp
offhub Apr 22, 2024
ee0693e
update project files
offhub Apr 22, 2024
045c66b
typo
offhub Apr 22, 2024
67245a3
Update OptionsWindow.ui
offhub Apr 22, 2024
f3a94eb
Update SettingsWindow.ui
offhub Apr 22, 2024
c353f9a
Update sandman_zh_TW.ts (#3841)
TragicLifeHu Apr 22, 2024
5136592
Update sandman_de.ts (#3842)
APMichael Apr 22, 2024
3e3d67e
Update sandman_tr.ts (#3846)
offhub Apr 22, 2024
fb1ee26
Typo fix and Update sandman_zh_CN.ts (#3839)
nkh0472 Apr 22, 2024
03aa918
Update codespell.yml
offhub Apr 22, 2024
f0ee273
Update sandman_fr.ts
DavidXanatos Apr 22, 2024
0492d8b
Sync SBIE Plus language files (lupdate)
github-actions[bot] Apr 23, 2024
6b9f44f
Merge pull request #3844 from offhub/fix008
DavidXanatos Apr 24, 2024
19528f2
Merge pull request #3845 from offhub/fix009
DavidXanatos Apr 24, 2024
dba4411
1.13.7
DavidXanatos Apr 24, 2024
3569551
Update SettingsWindow.cpp
DavidXanatos Apr 24, 2024
7adaf85
Update codespell.yml
isaak654 Apr 24, 2024
6b6186d
Update NewBoxWizard.cpp
offhub Apr 25, 2024
b30b910
Update key_del.c
DavidXanatos Apr 25, 2024
1de1d1f
Update CHANGELOG.md
DavidXanatos Apr 25, 2024
37ac24d
Merge branch 'master' of https://github.com/sandboxie-plus/Sandboxie
DavidXanatos Apr 25, 2024
6766847
Added DropAdmin and improved related checkboxes
offhub Apr 25, 2024
8a4b5e8
Update sandman_sv_SE.ts
DavidXanatos Apr 25, 2024
0b1e750
Merge pull request #3851 from offhub/fix010
DavidXanatos Apr 26, 2024
ea0e620
Update CHANGELOG.md
DavidXanatos Apr 26, 2024
2d7820d
update
DavidXanatos Apr 26, 2024
ee7d487
Update SandMan.qc.pro
DavidXanatos Apr 26, 2024
b27b4b5
fix
DavidXanatos Apr 26, 2024
8517353
Update SandMan.cpp
DavidXanatos Apr 26, 2024
024a2c4
Sync SBIE Plus language files (lupdate)
github-actions[bot] Apr 27, 2024
664d721
Update sandman_de.ts
bastik-1001 Apr 27, 2024
08a2a2b
Merge pull request #3855 from bastik-1001/master
DavidXanatos Apr 27, 2024
b2e057f
1.13.7
DavidXanatos Apr 27, 2024
75fe0a1
Typo fixes
isaak654 Apr 27, 2024
4fd9bae
1.13.7
DavidXanatos Apr 27, 2024
aba3d05
Merge branch 'master' of https://github.com/sandboxie-plus/Sandboxie
DavidXanatos Apr 27, 2024
9df1e54
Update CHANGELOG.md
DavidXanatos Apr 27, 2024
af54571
Update sandman_tr.ts
offhub Apr 28, 2024
eebaecd
Update sandman_zh_CN.ts
nkh0472 Apr 28, 2024
b7dbd35
Merge pull request #3856 from offhub/translations_tr_68
DavidXanatos Apr 28, 2024
fa5ece9
Merge pull request #3857 from nkh0472/patch-53
DavidXanatos Apr 28, 2024
fe10924
symlink fix
DavidXanatos Apr 28, 2024
a48bfa6
Merge branch 'master' of https://github.com/sandboxie-plus/Sandboxie
DavidXanatos Apr 28, 2024
18a6535
Update file_dir.c
DavidXanatos Apr 28, 2024
f5070bb
symlink fix
DavidXanatos Apr 28, 2024
bda087c
Update file_dir.c
DavidXanatos Apr 28, 2024
4a8650c
refactory
DavidXanatos Apr 28, 2024
846a3ea
Update file_link.c
DavidXanatos Apr 28, 2024
e194528
fix
DavidXanatos Apr 28, 2024
d99e556
Update file_del.c
DavidXanatos Apr 28, 2024
4a6c5dd
Update SandMan.vcxproj
offhub Apr 28, 2024
774d1de
Update file_link.c
DavidXanatos Apr 29, 2024
f0403dc
Update CHANGELOG.md
DavidXanatos May 1, 2024
15588a4
update
DavidXanatos May 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/codespell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,5 @@ jobs:
echo 'tailing->trailing' >> dictionary_code.txt
# Only lowercase letters are allowed in --ignore-words-list
codespell --dictionary=dictionary.txt --dictionary=dictionary_rare.txt --dictionary=dictionary_code.txt \
--ignore-words-list="wil,unknwn,tolen,pevent,doubleclick,parm,parms,etcp,ois,ba,ptd,modell,namesd,stdio,uint,errorstring,ontext,atend,deque,ecounter,nmake,namess,inh,daa,varient,lite,uis,emai,ws,slanguage,woh,tne,typpos,enew,shft,seh,ser,servent,socio-economic,rime" \
--ignore-words-list="wil,unknwn,tolen,pevent,doubleclick,parm,parms,etcp,ois,ba,ptd,modell,namesd,stdio,uint,errorstring,ontext,atend,deque,ecounter,nmake,namess,inh,daa,varient,lite,uis,emai,ws,slanguage,woh,tne,typpos,enew,shft,seh,ser,servent,socio-economic,rime,falt,infor" \
--skip="./.git,./.github/workflows/codespell.yml,./dictionary*.txt,./Sandboxie/msgs/Text-*-*.txt,./Sandboxie/msgs/report/Report-*.txt,./SandboxiePlus/SandMan/*.ts,./Installer/Languages.iss,./Installer/isl/*.isl,./Sandboxie/common/Detours/Makefile,./Sandboxie/common/Detours/disasm.cpp,./Sandboxie/install/build.bat,./SandboxieTools/ImBox/dc/crypto_fast/xts_fast.c,./Sandboxie/apps/control/TreePropSheet.h,./Sandboxie/apps/control/PropPageFrame.h,./Sandboxie/apps/control/PropPageFrameDefault.h,./SandboxiePlus/SandMan/Troubleshooting/lang_*.json"
28 changes: 21 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,34 @@ This project adheres to [Semantic Versioning](http://semver.org/).



## [1.13.7 / 5.68.7] - 2024-05-01

### Added
- added file version information for SbieDll.dll and SbieSvc.exe in the Sandboxie Plus About dialog

### Changed
- improved checkboxes about DropAdminRights in SandMan [#3851](https://github.com/sandboxie-plus/Sandboxie/pull/3851) (thanks offhub)

### Fixed
- Issue with symbolic linking of files [#3852](https://github.com/sandboxie-plus/Sandboxie/issues/3852)
- fixed issue with start agent option [#3844](https://github.com/sandboxie-plus/Sandboxie/pull/3844) (thanks offhub)
- fixed issue with Delete V2 introduced in 1.13.5




## [1.13.6 / 5.68.6] - 2024-04-
## [1.13.6 / 5.68.6] - 2024-04-21

### Added
- added "BlockInterferenceControl=y" option to prevent sandboxed processes from forcing windows on top and moving the mounse pointer (thanks Yeyixiao)
- Note: this option may cause issues in games hence do not enable it for gaming boxes.
- added support for hardlinks [#3826](https://github.com/sandboxie-plus/Sandboxie/issues/3826)
- Note: this option may cause issues in games hence do not enable it for gaming boxes
- added support for hard links [#3826](https://github.com/sandboxie-plus/Sandboxie/issues/3826)
- added mechanism to terminate stuck sandboxed processes from the driver
- added Make the trigger list editable [#3742](https://github.com/sandboxie-plus/Sandboxie/issues/3742)
- added Optionally extend the screenshot protection to the UI [#3739](https://github.com/sandboxie-plus/Sandboxie/issues/3739)
- added a button to edit local/custom templates [#3738](https://github.com/sandboxie-plus/Sandboxie/issues/3738)
- asses Permanently Re-sizable or Larger "Run Sandboxed" Window [#3697](https://github.com/sandboxie-plus/Sandboxie/issues/3697)
- added Permanently Re-sizable or Larger "Run Sandboxed" Window [#3697](https://github.com/sandboxie-plus/Sandboxie/issues/3697)
- added Notepad++ template [#3836](https://github.com/sandboxie-plus/Sandboxie/pull/3836)

### Changed
- improved Avast template [#3777](https://github.com/sandboxie-plus/Sandboxie/pull/3777)
Expand All @@ -28,12 +42,12 @@ This project adheres to [Semantic Versioning](http://semver.org/).

### Fixed
- fixed When I change the BlockDNS and BlockPorts options, the Apply button is not activated [#3807](https://github.com/sandboxie-plus/Sandboxie/issues/3807)
- fixed troubleshooting wizard broke with new qt [#3810](https://github.com/sandboxie-plus/Sandboxie/discussions/3810)
- fixed troubleshooting wizard broke with new Qt [#3810](https://github.com/sandboxie-plus/Sandboxie/discussions/3810)
- fixed Settings dialog now showing the right ram disk letter
- fixed issues with updater broke with new qt due to missing SSL support [3810](https://github.com/sandboxie-plus/Sandboxie/discussions/3810)
- fixed issues with updater broke with new Qt due to missing SSL support [#3810](https://github.com/sandboxie-plus/Sandboxie/discussions/3810)
- fixed Enabling "DropAdminRights/FakeAdminRights" adds "BlockInterferePower and ForceProtectionOnMount" to the INI [#3825](https://github.com/sandboxie-plus/Sandboxie/issues/3825)
- fixed KeePass "Out of Memory" crash due to "BlockScreenCapture=y" [#3768](https://github.com/sandboxie-plus/Sandboxie/issues/3768)
- fixed Sandboxie 1.13.4 with IsBlockCapture=y brakes on Windows 7 [#3769](https://github.com/sandboxie-plus/Sandboxie/issues/3769)
- fixed Sandboxie 1.13.4 with IsBlockCapture=y not working on Windows 7 [#3769](https://github.com/sandboxie-plus/Sandboxie/issues/3769)
- fixed explorer.exe issue "FakeAdminRights=y" [#3638](https://github.com/sandboxie-plus/Sandboxie/issues/3638)
- fixed Make it possible to disable forced folder warning [#3569](https://github.com/sandboxie-plus/Sandboxie/issues/3569)

Expand Down
19 changes: 16 additions & 3 deletions Sandboxie/common/my_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,22 @@
#ifndef _MY_VERSION_H
#define _MY_VERSION_H

#define MY_VERSION_BINARY 5,68,6
#define MY_VERSION_STRING "5.68.6"
#define MY_ABI_VERSION 0x56800
#define STR2(X) #X
#define STR(X) STR2(X)

#define VERSION_MJR 5
#define VERSION_MIN 68
#define VERSION_REV 7
#define VERSION_UPD 0

#if VERSION_UPD > 0
#define MY_VERSION_BINARY VERSION_MJR,VERSION_MIN,VERSION_REV,VERSION_UPD
#define MY_VERSION_STRING STR(VERSION_MJR.VERSION_MIN.VERSION_REV.VERSION_UPD)
#else
#define MY_VERSION_BINARY VERSION_MJR,VERSION_MIN,VERSION_REV
#define MY_VERSION_STRING STR(VERSION_MJR.VERSION_MIN.VERSION_REV)
#endif
#define MY_ABI_VERSION 0x56800

// These #defines are used by either Resource Compiler or NSIS installer
#define SBIE_INSTALLER_PATH "..\\Bin\\"
Expand Down
118 changes: 79 additions & 39 deletions Sandboxie/core/dll/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ SBIEDLL_EXPORT NTSTATUS File_GetName(
HANDLE RootDirectory, UNICODE_STRING *ObjectName,
WCHAR **OutTruePath, WCHAR **OutCopyPath, ULONG *OutFlags);

static WCHAR *File_TranslateDosToNtPath2(
const WCHAR *DosPath, ULONG DosPathLen);

static WCHAR *File_GetName_TranslateSymlinks(
THREAD_DATA *TlsData, const WCHAR *objname_buf, ULONG objname_len,
BOOLEAN *translated);
Expand Down Expand Up @@ -262,6 +265,15 @@ static NTSTATUS File_NtDeleteFile(OBJECT_ATTRIBUTES *ObjectAttributes);

static NTSTATUS File_NtDeleteFileImpl(OBJECT_ATTRIBUTES *ObjectAttributes);

static WCHAR *File_ConcatPath2(
const WCHAR *Path1, ULONG Path1Len, const WCHAR *Path2, ULONG Path2Len);

static WCHAR* File_CanonizePath(
const wchar_t* absolute_path, ULONG abs_path_len, const wchar_t* relative_path, ULONG rel_path_len);

static NTSTATUS File_OpenForRenameFile(
HANDLE* pSourceHandle, const WCHAR *TruePath);

static NTSTATUS File_RenameFile(
HANDLE FileHandle, void *info, BOOLEAN LinkOp);

Expand Down Expand Up @@ -6659,6 +6671,63 @@ _FX LONG File_RenameOpenFile(
}


//---------------------------------------------------------------------------
// File_OpenForRenameFile
//---------------------------------------------------------------------------


_FX NTSTATUS File_OpenForRenameFile(
HANDLE* pSourceHandle, const WCHAR *TruePath)
{
THREAD_DATA *TlsData = Dll_GetTlsData(NULL);

NTSTATUS status;
OBJECT_ATTRIBUTES objattrs;
UNICODE_STRING objname;
IO_STATUS_BLOCK IoStatusBlock;

InitializeObjectAttributes(
&objattrs, &objname, OBJ_CASE_INSENSITIVE, NULL, Secure_NormalSD);

//
// open the file for write access. this should cause the file
// to be migrated into the sandbox, including its parent directories
//

RtlInitUnicodeString(&objname, TruePath);

++TlsData->file_dont_strip_write_access;

status = NtCreateFile(
pSourceHandle, FILE_GENERIC_WRITE | DELETE, &objattrs,
&IoStatusBlock, NULL, 0, FILE_SHARE_VALID_FLAGS,
FILE_OPEN, FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0);

if (status == STATUS_SHARING_VIOLATION ||
status == STATUS_ACCESS_DENIED) {

//
// Windows Mail opens *.eml files with a combination of
// FILE_SHARE_READ | FILE_SHARE_DELETE, but not FILE_SHARE_WRITE,
// which means we can't open them with FILE_GENERIC_WRITE
// during rename processing here
//
// also, for read-only files, we get an error when we open them
// for FILE_GENERIC_WRITE, but just DELETE should also work
//

status = NtCreateFile(
pSourceHandle, SYNCHRONIZE | DELETE, &objattrs,
&IoStatusBlock, NULL, 0, FILE_SHARE_VALID_FLAGS,
FILE_OPEN, FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0);
}

--TlsData->file_dont_strip_write_access;

return status;
}


//---------------------------------------------------------------------------
// File_RenameFile
//---------------------------------------------------------------------------
Expand Down Expand Up @@ -6718,52 +6787,23 @@ _FX NTSTATUS File_RenameFile(
__leave;

//
// open the file for write access. this should cause the file
// to be migrated into the sandbox, including its parent directories
// migrate into the sandbox, including its parent directories
//

RtlInitUnicodeString(&objname, TruePath);

++TlsData->file_dont_strip_write_access;

status = NtCreateFile(
&SourceHandle, FILE_GENERIC_WRITE | DELETE, &objattrs,
&IoStatusBlock, NULL, 0, FILE_SHARE_VALID_FLAGS,
FILE_OPEN, FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0);

if (status == STATUS_SHARING_VIOLATION ||
status == STATUS_ACCESS_DENIED) {

//
// Windows Mail opens *.eml files with a combination of
// FILE_SHARE_READ | FILE_SHARE_DELETE, but not FILE_SHARE_WRITE,
// which means we can't open them with FILE_GENERIC_WRITE
// during rename processing here
//
// also, for read-only files, we get an error when we open them
// for FILE_GENERIC_WRITE, but just DELETE should also work
//
status = File_OpenForRenameFile(&SourceHandle, TruePath);

status = NtCreateFile(
&SourceHandle, SYNCHRONIZE | DELETE, &objattrs,
&IoStatusBlock, NULL, 0, FILE_SHARE_VALID_FLAGS,
FILE_OPEN, FILE_SYNCHRONOUS_IO_NONALERT, NULL, 0);

//
// if we still get STATUS_SHARING_VIOLATION, give up on trying
// to make sure the file is migrated into the sandbox, and hope
// that the input FileHandle is suitable for a rename operation
//
//
// if we still get STATUS_SHARING_VIOLATION, give up on trying
// to make sure the file is migrated into the sandbox, and hope
// that the input FileHandle is suitable for a rename operation
//

if (status == STATUS_SHARING_VIOLATION) {
if (status == STATUS_SHARING_VIOLATION) {

SourceHandle = FileHandle;
status = STATUS_SUCCESS;
}
SourceHandle = FileHandle;
status = STATUS_SUCCESS;
}

--TlsData->file_dont_strip_write_access;

if (! NT_SUCCESS(status))
__leave;

Expand Down
25 changes: 9 additions & 16 deletions Sandboxie/core/dll/file_del.c
Original file line number Diff line number Diff line change
Expand Up @@ -549,11 +549,11 @@ _FX VOID File_SavePathTree_internal(LIST* Root, const WCHAR* name, WCHAR* (*Tran


//---------------------------------------------------------------------------
// File_TranslateNtToDosPath2
// File_TranslateNtToDosPathForDatFile
//---------------------------------------------------------------------------


_FX WCHAR* File_TranslateNtToDosPath2(const WCHAR *NtPath)
_FX WCHAR* File_TranslateNtToDosPathForDatFile(const WCHAR *NtPath)
{
WCHAR *DosPath = NULL;
ULONG len_nt;
Expand Down Expand Up @@ -635,7 +635,7 @@ _FX BOOLEAN File_SavePathTree()
{
EnterCriticalSection(File_PathRoot_CritSec);

File_SavePathTree_internal(&File_PathRoot, FILE_PATH_FILE_NAME, File_TranslateNtToDosPath2);
File_SavePathTree_internal(&File_PathRoot, FILE_PATH_FILE_NAME, File_TranslateNtToDosPathForDatFile);

File_GetAttributes_internal(FILE_PATH_FILE_NAME, &File_PathsFileSize, &File_PathsFileDate, NULL);

Expand Down Expand Up @@ -764,14 +764,13 @@ _FX BOOLEAN File_LoadPathTree_internal(LIST* Root, const WCHAR* name, WCHAR* (*T


//---------------------------------------------------------------------------
// File_TranslateDosToNtPath2
// File_TranslateDosToNtPathForDatFile
//---------------------------------------------------------------------------


_FX WCHAR *File_TranslateDosToNtPath2(const WCHAR *DosPath)
_FX WCHAR *File_TranslateDosToNtPathForDatFile(const WCHAR *DosPath)
{
WCHAR *NtPath = NULL;
ULONG len_dos;

if (DosPath && DosPath[0] && DosPath[1]) {

Expand All @@ -782,10 +781,7 @@ _FX WCHAR *File_TranslateDosToNtPath2(const WCHAR *DosPath)
//

DosPath += 2;
len_dos = wcslen(DosPath) + 1;
NtPath = Dll_Alloc((File_MupLen + len_dos) * sizeof(WCHAR));
wmemcpy(NtPath, File_Mup, File_MupLen);
wmemcpy(NtPath + File_MupLen, DosPath, len_dos);
NtPath = File_ConcatPath2(File_Mup, File_MupLen, DosPath, wcslen(DosPath));

} else if (DosPath[0] != L'\\') {

Expand Down Expand Up @@ -815,10 +811,7 @@ _FX WCHAR *File_TranslateDosToNtPath2(const WCHAR *DosPath)
}

DosPath += path_pos;
len_dos = wcslen(DosPath) + 1;
NtPath = Dll_Alloc((drive->len + len_dos) * sizeof(WCHAR));
wmemcpy(NtPath, drive->path, drive->len);
wmemcpy(NtPath + drive->len, DosPath, len_dos);
NtPath = File_ConcatPath2(drive->path, drive->len, DosPath, wcslen(DosPath));

LeaveCriticalSection(File_DrivesAndLinks_CritSec);
}
Expand All @@ -841,7 +834,7 @@ _FX BOOLEAN File_LoadPathTree()

EnterCriticalSection(File_PathRoot_CritSec);

File_LoadPathTree_internal(&File_PathRoot, FILE_PATH_FILE_NAME, File_TranslateDosToNtPath2);
File_LoadPathTree_internal(&File_PathRoot, FILE_PATH_FILE_NAME, File_TranslateDosToNtPathForDatFile);

LeaveCriticalSection(File_PathRoot_CritSec);

Expand Down Expand Up @@ -1038,7 +1031,7 @@ _FX NTSTATUS File_MarkDeleted_v2(const WCHAR* TruePath)
HANDLE hPathsFile;
if (File_OpenDataFile(FILE_PATH_FILE_NAME, &hPathsFile, TRUE))
{
File_AppendPathEntry_internal(hPathsFile, Path, FILE_DELETED_FLAG, NULL, File_TranslateNtToDosPath2);
File_AppendPathEntry_internal(hPathsFile, Path, FILE_DELETED_FLAG, NULL, File_TranslateNtToDosPathForDatFile);

NtClose(hPathsFile);

Expand Down