This commit is contained in:
DavidXanatos 2023-08-30 07:18:10 +02:00
parent ba3ac77c0c
commit 01a2670b9c
3 changed files with 25 additions and 12 deletions

View File

@ -17,6 +17,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- fixed Side logo cut-off in all wizards [#3227](https://github.com/sandboxie-plus/Sandboxie/issues/3227)
- fixed Text cut-off in box creation wizard [#3226](https://github.com/sandboxie-plus/Sandboxie/issues/3226)
- fixed windows 7 compatybility issue with ImBox.exe
- fixed issue with UseNewSymlinkResolver=y

View File

@ -824,6 +824,7 @@ _FX FILE_LINK *File_AddTempLink(WCHAR *path)
WCHAR *newpath;
BOOLEAN stop;
BOOLEAN bPermLinkPath = FALSE;
WCHAR* CopyPath = NULL;
//
// try to open the path
@ -857,9 +858,6 @@ _FX FILE_LINK *File_AddTempLink(WCHAR *path)
{
THREAD_DATA* TlsData = Dll_GetTlsData(NULL);
WCHAR* CopyPath = NULL;
Dll_PushTlsNameBuffer(TlsData);
File_GetCopyPath(path, &CopyPath);
@ -881,8 +879,11 @@ _FX FILE_LINK *File_AddTempLink(WCHAR *path)
NULL, 0);
Dll_PopTlsNameBuffer(TlsData);
if (!NT_SUCCESS(status))
CopyPath = NULL;
}
else
else // its already a copy path
status = STATUS_BAD_INITIAL_PC;
//
@ -918,16 +919,21 @@ _FX FILE_LINK *File_AddTempLink(WCHAR *path)
REPARSE_DATA_BUFFER* reparseDataBuffer = Dll_AllocTemp(MAXIMUM_REPARSE_DATA_BUFFER_SIZE);
status = pNtFsControlFile(handle, NULL, NULL, NULL, &IoStatusBlock, FSCTL_GET_REPARSE_POINT, NULL, 0, reparseDataBuffer, MAXIMUM_REPARSE_DATA_BUFFER_SIZE);
newpath = NULL;
if (NT_SUCCESS(status)) {
WCHAR* input_str = reparseDataBuffer->MountPointReparseBuffer.PathBuffer;
if (_wcsnicmp(input_str, File_BQQB, 4) == 0)
input_str = File_TranslateDosToNtPath(reparseDataBuffer->MountPointReparseBuffer.PathBuffer + 4);
newpath = File_TranslateTempLinks_2(input_str, wcslen(input_str));
if (input_str) {
if (input_str != reparseDataBuffer->MountPointReparseBuffer.PathBuffer)
Dll_Free(input_str);
newpath = File_TranslateTempLinks_2(input_str, wcslen(input_str));
if (input_str != reparseDataBuffer->MountPointReparseBuffer.PathBuffer)
Dll_Free(input_str);
}
/*THREAD_DATA* TlsData = Dll_GetTlsData(NULL);
@ -943,10 +949,16 @@ _FX FILE_LINK *File_AddTempLink(WCHAR *path)
Dll_PopTlsNameBuffer(TlsData);*/
}
else //if (status == STATUS_NOT_A_REPARSE_POINT)
{
newpath = Dll_AllocTemp((wcslen(path) + 1) * sizeof(WCHAR));
wcscpy(newpath, path);
//else if (status == STATUS_NOT_A_REPARSE_POINT)
if (!newpath) {
if (CopyPath) {
newpath = Dll_AllocTemp((wcslen(path) + 1) * sizeof(WCHAR));
wcscpy(newpath, path);
} else
UserReparse = FALSE;
status = STATUS_SUCCESS;
}

View File

@ -3,7 +3,7 @@
#define VERSION_MJR 1
#define VERSION_MIN 11
#define VERSION_REV 0
#define VERSION_UPD 4
#define VERSION_UPD 5
#ifndef STR
#define STR2(X) #X