This commit is contained in:
DavidXanatos 2023-02-12 13:47:05 +01:00
parent b328e98444
commit 8f2e3ac6ab
5 changed files with 49 additions and 7 deletions

View File

@ -1539,6 +1539,7 @@ void CAppPage::SetDefaultTemplates7(CBox &box)
SetDefaultTemplates8(box); SetDefaultTemplates8(box);
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// SetDefaultTemplates8 // SetDefaultTemplates8
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@ -1551,6 +1552,7 @@ void CAppPage::SetDefaultTemplates8(CBox& box)
SetDefaultTemplates9(box); SetDefaultTemplates9(box);
} }
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
// SetDefaultTemplates9 // SetDefaultTemplates9
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@ -1575,4 +1577,24 @@ void CAppPage::SetDefaultTemplates9(CBox& box)
box.EnableTemplate(L"OpenBluetooth", TRUE); box.EnableTemplate(L"OpenBluetooth", TRUE);
box.EnableTemplate(L"OpenSmartCard", TRUE); box.EnableTemplate(L"OpenSmartCard", TRUE);
} }
SetDefaultTemplates10(box);
}
//---------------------------------------------------------------------------
// SetDefaultTemplates10
//---------------------------------------------------------------------------
void CAppPage::SetDefaultTemplates10(CBox& box)
{
CSbieIni &ini = CSbieIni::GetInstance();
BOOL bOpenProtectedStorage = FALSE;
ini.GetBool(box.GetName(), L"OpenProtectedStorage", bOpenProtectedStorage, FALSE);
if (bOpenProtectedStorage) {
ini.DelText(box.GetName(), L"OpenProtectedStorage", L"y");
box.EnableTemplate(L"OpenProtectedStorage", TRUE);
}
} }

View File

@ -128,6 +128,7 @@ public:
static void SetDefaultTemplates7(CBox &box); static void SetDefaultTemplates7(CBox &box);
static void SetDefaultTemplates8(CBox& box); static void SetDefaultTemplates8(CBox& box);
static void SetDefaultTemplates9(CBox& box); static void SetDefaultTemplates9(CBox& box);
static void SetDefaultTemplates10(CBox& box);
}; };

View File

@ -226,18 +226,23 @@ void CBox::SetDefaultSettings()
int cfglvl; int cfglvl;
ini.GetNum(m_name, _ConfigLevel, cfglvl); ini.GetNum(m_name, _ConfigLevel, cfglvl);
if (cfglvl >= 9) if (cfglvl >= 10)
return; return;
BOOL ok = TRUE; BOOL ok = TRUE;
if (cfglvl >= 1) { if (cfglvl >= 1) {
ok = ini.SetNum(m_name, _ConfigLevel, 9); ok = ini.SetNum(m_name, _ConfigLevel, 10);
if (ok) { if (ok) {
if (cfglvl == 8) { if (cfglvl == 9) {
CAppPage::SetDefaultTemplates10(*this);
}
else if (cfglvl == 8) {
CAppPage::SetDefaultTemplates9(*this); CAppPage::SetDefaultTemplates9(*this);

View File

@ -47,7 +47,7 @@ CSandBox::CSandBox(const QString& BoxName, class CSbieAPI* pAPI) : CSbieIni(BoxN
// when loading a sandbox that is not initialized, initialize it // when loading a sandbox that is not initialized, initialize it
int cfglvl = GetNum("ConfigLevel"); int cfglvl = GetNum("ConfigLevel");
if (cfglvl >= 9) if (cfglvl >= 10)
return; return;
if (cfglvl == 0) if (cfglvl == 0)
@ -106,7 +106,14 @@ CSandBox::CSandBox(const QString& BoxName, class CSbieAPI* pAPI) : CSbieIni(BoxN
} }
} }
SetNum("ConfigLevel", 9); if (cfglvl < 10)
{
// starting with 5.62.3 OpenProtectedStorage is a template
if(GetBool("OpenProtectedStorage"))
InsertText("Template", "OpenProtectedStorage");
}
SetNum("ConfigLevel", 10);
} }
CSandBox::~CSandBox() CSandBox::~CSandBox()

View File

@ -69,6 +69,11 @@ CTraceEntry::CTraceEntry(quint64 Timestamp, quint32 ProcessId, quint32 ThreadId,
m_SubType = LogData.length() > 2 ? LogData.at(2) : QString(); m_SubType = LogData.length() > 2 ? LogData.at(2) : QString();
m_Type.Flags = Type; m_Type.Flags = Type;
if (m_Type.Type == MONITOR_SYSCALL && !m_SubType.isEmpty()) {
m_Message += ", name=" + m_SubType;
m_SubType.clear();
}
m_TimeStamp = Timestamp ? Timestamp : QDateTime::currentDateTime().toMSecsSinceEpoch(); m_TimeStamp = Timestamp ? Timestamp : QDateTime::currentDateTime().toMSecsSinceEpoch();
m_BoxPtr = 0; m_BoxPtr = 0;
@ -144,9 +149,11 @@ QString CTraceEntry::GetTypeStr() const
Type.append(" / " + m_SubType); Type.append(" / " + m_SubType);
if (m_Type.User) if (m_Type.User)
Type.append(" (U)"); Type.append(" (U)"); // user mode (sbiedll.dll)
//else if (m_Type.Agent)
// Type.append(" (S)"); // system mode (sbiesvc.exe)
else else
Type.append(" (D)"); Type.append(" (K)"); // kernel mode (sbiedrv.sys)
return Type; return Type;
} }