This commit is contained in:
DavidXanatos 2023-03-12 16:36:22 +01:00
parent 8fe3b24647
commit bf964b61ad
6 changed files with 120 additions and 15 deletions

View File

@ -21,8 +21,8 @@
#ifndef _MY_VERSION_H
#define _MY_VERSION_H
#define MY_VERSION_BINARY 5,63,0
#define MY_VERSION_STRING "5.63.0"
#define MY_VERSION_BINARY 5,63,1
#define MY_VERSION_STRING "5.63.1"
#define MY_ABI_VERSION 0x56000
// These #defines are used by either Resource Compiler or NSIS installer

View File

@ -483,7 +483,9 @@ _FX void Ipc_CreateObjects(void)
WCHAR *TruePath;
WCHAR *CopyPath;
WCHAR *backslash;
WCHAR *buffer;
WCHAR *buffer = NULL;
WCHAR *BNOLINKS = NULL;
WCHAR *buffer2 = NULL;
HANDLE handle;
WCHAR str[64];
ULONG errlvl = 0;
@ -538,19 +540,113 @@ _FX void Ipc_CreateObjects(void)
goto finish;
}
// todo: fix-me: peroperly reparse symbolicl inks in IPC paths instead of creating dummy for everything
buffer = Dll_Alloc((wcslen(CopyPath) + 32) * sizeof(WCHAR));
//
// create BNOLINKS directory and symbolic links
//
BNOLINKS = Dll_Alloc((wcslen(CopyPath) + 32) * sizeof(WCHAR));
wcscpy(BNOLINKS, CopyPath);
status = STATUS_UNSUCCESSFUL;
backslash = wcsrchr(BNOLINKS, L'\\');
if (backslash) {
*backslash = L'\0';
backslash = wcsrchr(BNOLINKS, L'\\');
if (backslash) {
wcscpy(str, backslash);
*backslash = L'\0';
wcscat(BNOLINKS, L"\\BNOLINKS");
status = STATUS_SUCCESS;
}
}
if (NT_SUCCESS(status))
status = SbieApi_CreateDirOrLink(BNOLINKS, NULL);
if (NT_SUCCESS(status)) {
wcscpy(buffer, BNOLINKS);
wcscat(buffer, str);
status = SbieApi_CreateDirOrLink(buffer, CopyPath);
}
if (! NT_SUCCESS(status)) {
errlvl = 77;
goto finish;
}
//
// create Global directory and symbolic links
//
buffer2 = Dll_Alloc((Dll_BoxIpcPathLen + 32) * sizeof(WCHAR));
wcscpy(buffer2, Dll_BoxIpcPath);
wcscat(buffer2, L"\\BaseNamedObjects");
status = SbieApi_CreateDirOrLink(buffer2, NULL);
if (! NT_SUCCESS(status)) {
errlvl = 88;
goto finish;
}
wcscpy(buffer, buffer2);
wcscat(buffer, L"\\Global");
status = SbieApi_CreateDirOrLink(buffer, buffer2);
if (! NT_SUCCESS(status)) {
errlvl = 51;
goto finish;
}
wcscpy(buffer, buffer2);
wcscat(buffer, L"\\Local");
status = SbieApi_CreateDirOrLink(buffer, buffer2);
if (! NT_SUCCESS(status)) {
errlvl = 52;
goto finish;
}
wcscpy(buffer, buffer2);
wcscat(buffer, L"\\Session");
status = SbieApi_CreateDirOrLink(buffer, BNOLINKS);
if (! NT_SUCCESS(status)) {
errlvl = 53;
goto finish;
}
if (NT_SUCCESS(status)) {
wcscpy(buffer, BNOLINKS);
wcscat(buffer, L"\\0");
status = SbieApi_CreateDirOrLink(buffer, buffer2);
}
if (! NT_SUCCESS(status)) {
errlvl = 66;
goto finish;
}
//
// create Global,Local,Session symbolic links
//
buffer = Dll_Alloc((wcslen(CopyPath) + 32) * sizeof(WCHAR));
wcscpy(buffer, CopyPath);
wcscat(buffer, L"\\Global");
status = SbieApi_CreateDirOrLink(buffer, CopyPath);
status = SbieApi_CreateDirOrLink(buffer, buffer2);
if (! NT_SUCCESS(status)) {
errlvl = 44;
errlvl = 41;
goto finish;
}
@ -560,17 +656,17 @@ _FX void Ipc_CreateObjects(void)
status = SbieApi_CreateDirOrLink(buffer, CopyPath);
if (! NT_SUCCESS(status)) {
errlvl = 55;
errlvl = 42;
goto finish;
}
wcscpy(buffer, CopyPath);
wcscat(buffer, L"\\Session");
status = SbieApi_CreateDirOrLink(buffer, CopyPath);
status = SbieApi_CreateDirOrLink(buffer, BNOLINKS);
if (! NT_SUCCESS(status)) {
errlvl = 66;
errlvl = 43;
goto finish;
}
@ -580,6 +676,13 @@ _FX void Ipc_CreateObjects(void)
finish:
if(buffer)
Dll_Free(buffer);
if(BNOLINKS)
Dll_Free(BNOLINKS);
if(buffer2)
Dll_Free(buffer2);
if (errlvl)
SbieApi_Log(2308, L"[%d / %08X]", errlvl, status);
}

View File

@ -289,7 +289,7 @@ VOID InstrumentationTrace(ULONG_PTR ReturnAddress, NTSTATUS ReturnStatus)
#endif
#ifdef _WIN64
// Note: this would also be needed in native 32 bit, but there instrumentation does not work anyhow
// Note: this would also be needed in native 32 bit
extern SBIELOW_DATA* SbieApi_data;
if (NtFunction == (ULONG_PTR)SbieApi_data->NtDeviceIoControlFile_code)
return; // this is used by our sys call interface, the driver will log this syscall

View File

@ -169,7 +169,7 @@ void CFinder::OnUpdate()
iOptions |= eHighLight;
QString Exp = m_pSearch->text();
QString ExpStr = ((iOptions & CFinder::eRegExp) == 0) ? Exp : (".*" + QRegularExpression::escape(Exp) + ".*");
QString ExpStr = ((iOptions & CFinder::eRegExp) != 0) ? Exp : (".*" + QRegularExpression::escape(Exp).replace("\\","\\\\") + ".*");
m_RegExp = QRegularExpression(ExpStr, (iOptions & CFinder::eCaseSens) != 0 ? QRegularExpression::NoPatternOption : QRegularExpression::CaseInsensitiveOption);
SetFilter(Exp, iOptions, GetColumn());

View File

@ -106,7 +106,7 @@ CTraceTree::~CTraceTree()
void CTraceTree::SetFilter(const QString& Exp, int iOptions, int Column)
{
bool bReset = m_FilterExp != Exp || m_bHighLight != ((iOptions & CFinder::eHighLight) != 0);
bool bReset = m_bHighLight != ((iOptions & CFinder::eHighLight) != 0) || (!m_bHighLight && m_FilterExp != Exp);
//QString ExpStr = ((iOptions & CFinder::eRegExp) == 0) ? Exp : (".*" + QRegularExpression::escape(Exp) + ".*");
//QRegularExpression RegExp(ExpStr, (iOptions & CFinder::eCaseSens) != 0 ? QRegularExpression::NoPatternOption : QRegularExpression::CaseInsensitiveOption);
@ -220,6 +220,7 @@ CTraceView::CTraceView(bool bStandAlone, QWidget* parent) : QWidget(parent)
m_pTraceTid = new QComboBox();
m_pTraceTid->addItem(tr("[All]"), 0);
m_pTraceTid->setMinimumWidth(75);
m_pTraceTid->setEditable(true);
connect(m_pTraceTid, SIGNAL(currentIndexChanged(int)), this, SLOT(OnSetTidFilter()));
m_pTraceToolBar->addWidget(m_pTraceTid);
@ -590,7 +591,8 @@ void CTraceView::OnSetPidFilter()
void CTraceView::OnSetTidFilter()
{
m_FilterTid = m_pTraceTid->currentData().toUInt();
//m_FilterTid = m_pTraceTid->currentData().toUInt();
m_FilterTid = m_pTraceTid->currentText().toUInt();
//m_pSortProxy->m_FilterTid = m_pTraceTid->currentData().toUInt();
//m_pSortProxy->setFilterKeyColumn(m_pSortProxy->filterKeyColumn());

View File

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