This commit is contained in:
DavidXanatos 2023-03-25 23:41:45 +01:00
parent 97bf5dc492
commit 9af78f9541
3 changed files with 12 additions and 8 deletions

View File

@ -14,9 +14,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
### Changed
- renamed 'DropAppContainerTokens=program.exe,n' to 'DropAppContainerToken=program.exe,n'
- 'DropAppContainerToken=program.exe,y' can now be used in App Compartment boxes is howeever not recomended security whise
### Fixed
- issue with global ini section editing
- fixed issue with *UseRegDeleteV2=y' [#2756](https://github.com/sandboxie-plus/Sandboxie/issues/2756)

View File

@ -1627,8 +1627,9 @@ _FX NTSTATUS Key_NtCreateKeyImpl(
BOOLEAN KeyDeleted = FALSE;
if (!Key_Delete_v2)
if (Key_CheckDeletedKey(*KeyHandle)) {
if (Key_Delete_v2)
KeyDeleted = Key_IsDeleted_v2(TruePath) ? TRUE : FALSE;
else if (Key_CheckDeletedKey(*KeyHandle)) {
KeyDeleted = TRUE;
@ -2538,8 +2539,6 @@ _FX NTSTATUS Key_MarkDeletedAndClose(HANDLE KeyHandle)
if (Key_Delete_v2) {
THREAD_DATA *TlsData = Dll_GetTlsData(NULL);
UNICODE_STRING objname;
WCHAR *TruePath;
WCHAR *CopyPath;
@ -2562,10 +2561,10 @@ _FX NTSTATUS Key_MarkDeletedAndClose(HANDLE KeyHandle)
Key_DiscardMergeByPath(TruePath, TRUE);
}
Dll_PopTlsNameBuffer(TlsData);
__sys_NtDeleteKey(KeyHandle);
Dll_PopTlsNameBuffer(TlsData);
}
else {

View File

@ -371,8 +371,11 @@ _FX NTSTATUS Key_OpenForMerge(
*out_CopyHandle, KeyBasicInformation,
&info, sizeof(KEY_BASIC_INFORMATION), &len);
if (NT_SUCCESS(status) || status == STATUS_BUFFER_OVERFLOW) {
// if (!Key_Delete_v2 &&
if(status == STATUS_BUFFER_OVERFLOW)
status = STATUS_SUCCESS;
if (!Key_Delete_v2)
if (NT_SUCCESS(status)) {
if (IS_DELETE_MARK(&info.LastWriteTime))
status = STATUS_KEY_DELETED;
else