Merge pull request #3883 from offhub/fix011
Improved checkbox behavior on isolation change
This commit is contained in:
commit
ff6dd75286
|
@ -132,7 +132,6 @@ void COptionsWindow::LoadAdvanced()
|
|||
ui.chkUseSbieDeskHack->setChecked(m_pBox->GetBool("UseSbieDeskHack", true));
|
||||
ui.chkUseSbieWndStation->setChecked(m_pBox->GetBool("UseSbieWndStation", true));
|
||||
|
||||
ui.chkAddToJob->setChecked(!m_pBox->GetBool("NoAddProcessToJob", false));
|
||||
ui.chkProtectSCM->setChecked(!m_pBox->GetBool("UnrestrictedSCM", false));
|
||||
ui.chkRestrictServices->setChecked(!m_pBox->GetBool("RunServicesAsSystem", false));
|
||||
ui.chkElevateRpcss->setChecked(m_pBox->GetBool("RunRpcssAsSystem", false));
|
||||
|
@ -206,8 +205,6 @@ void COptionsWindow::LoadAdvanced()
|
|||
ui.chkHostProtectMsg->setEnabled(ui.chkHostProtect->isChecked());
|
||||
ui.chkHostProtectMsg->setChecked(m_pBox->GetBool("NotifyImageLoadDenied", true));
|
||||
|
||||
ReadGlobalCheck(ui.chkSbieLogon, "SandboxieLogon", false);
|
||||
|
||||
LoadOptionList();
|
||||
|
||||
bool bGlobalNoMon = m_pBox->GetAPI()->GetGlobalSettings()->GetBool("DisableResourceMonitor", false);
|
||||
|
@ -417,8 +414,8 @@ void COptionsWindow::SaveAdvanced()
|
|||
WriteAdvancedCheck(ui.chkHostProtect, "ProtectHostImages", "y", "");
|
||||
WriteAdvancedCheck(ui.chkHostProtectMsg, "NotifyImageLoadDenied", "", "n");
|
||||
|
||||
|
||||
WriteGlobalCheck(ui.chkSbieLogon, "SandboxieLogon", false);
|
||||
bool bGlobalSbieLogon = m_pBox->GetAPI()->GetGlobalSettings()->GetBool("SandboxieLogon", false);
|
||||
WriteAdvancedCheck(ui.chkSbieLogon, "SandboxieLogon", bGlobalSbieLogon ? "" : "y", bGlobalSbieLogon ? "n" : "");
|
||||
|
||||
SaveOptionList();
|
||||
|
||||
|
@ -559,7 +556,7 @@ void COptionsWindow::UpdateBoxIsolation()
|
|||
{
|
||||
ui.chkNoSecurityFiltering->setEnabled(ui.chkNoSecurityIsolation->isChecked());
|
||||
|
||||
ui.chkAddToJob->setEnabled(!ui.chkNoSecurityIsolation->isChecked());
|
||||
ui.chkAddToJob->setEnabled(!IsAccessEntrySet(eWnd, "", eOpen, "*") && !ui.chkNoSecurityIsolation->isChecked());
|
||||
ui.chkNestedJobs->setEnabled(!ui.chkNoSecurityIsolation->isChecked());
|
||||
|
||||
ui.chkOpenDevCMApi->setEnabled(!ui.chkNoSecurityIsolation->isChecked());
|
||||
|
@ -585,9 +582,19 @@ void COptionsWindow::UpdateBoxIsolation()
|
|||
ui.chkCloseForBox->setEnabled(!ui.chkNoSecurityIsolation->isChecked());
|
||||
ui.chkNoOpenForBox->setEnabled(!ui.chkNoSecurityIsolation->isChecked());
|
||||
|
||||
ui.chkSbieLogon->setEnabled(!ui.chkNoSecurityIsolation->isChecked());
|
||||
|
||||
if (ui.chkNoSecurityIsolation->isChecked()) {
|
||||
ui.chkCloseForBox->setChecked(false);
|
||||
ui.chkNoOpenForBox->setChecked(false);
|
||||
if (!IsAccessEntrySet(eWnd, "", eOpen, "*"))
|
||||
ui.chkAddToJob->setChecked(false);
|
||||
ui.chkSbieLogon->setChecked(false);
|
||||
}
|
||||
else {
|
||||
if (!IsAccessEntrySet(eWnd, "", eOpen, "*"))
|
||||
ui.chkAddToJob->setChecked(!m_pBox->GetBool("NoAddProcessToJob", false));
|
||||
ReadGlobalCheck(ui.chkSbieLogon, "SandboxieLogon", false);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1169,17 +1169,23 @@ void COptionsWindow::UpdateCurrentTab()
|
|||
{
|
||||
ui.chkVmRead->setChecked(IsAccessEntrySet(eIPC, "", eReadOnly, "$:*"));
|
||||
}
|
||||
else if (m_pCurrentTab ==ui.tabPrivileges || m_pCurrentTab == ui.tabSecurity)
|
||||
else if (m_pCurrentTab == ui.tabPrivileges || m_pCurrentTab == ui.tabSecurity)
|
||||
{
|
||||
if (IsAccessEntrySet(eWnd, "", eOpen, "*"))
|
||||
{
|
||||
ui.chkAddToJob->setEnabled(false);
|
||||
ui.chkAddToJob->setChecked(false);
|
||||
if (!ui.chkNoSecurityIsolation->isChecked())
|
||||
{
|
||||
ui.chkAddToJob->setEnabled(false);
|
||||
ui.chkAddToJob->setChecked(false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.chkAddToJob->setEnabled(true);
|
||||
ui.chkAddToJob->setChecked(!m_pBox->GetBool("NoAddProcessToJob", false));
|
||||
if (!ui.chkNoSecurityIsolation->isChecked())
|
||||
{
|
||||
ui.chkAddToJob->setEnabled(true);
|
||||
ui.chkAddToJob->setChecked(!m_pBox->GetBool("NoAddProcessToJob", false));
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (m_pCurrentTab == ui.tabStart || m_pCurrentTab == ui.tabForce)
|
||||
|
|
Loading…
Reference in New Issue