summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFredrik Orderud <fredrik.orderud@ge.com>2022-11-28 13:49:44 +0100
committerFredrik Orderud <fredrik.orderud@ge.com>2022-12-15 19:31:37 +0100
commit55876d1b4e6a98d8a6ea7a03a0ef3288df4c84e7 (patch)
treea8e282bba378dc11d9af3940fd329fe803c121ce /src
parent9f6b6ec6a51d2dccb08841d44c2f2ce5639ecdb4 (diff)
Extend TestCon with AppContainer sandboxing
TestCon already support starting OLE controls in a "regular" separate process and in a low integrity level (low IL) process. This commit will extend QAxWidget::setClassContext and the impersonation support to also allow starting OLE controls in a AppContainer-isolated process for enhanced security sandboxing. Pick-to: 6.5 Task-number: QTBUG-109184 Change-Id: I525e99ba6934025710bbc97fba0045d0358413b7 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/activeqt/container/qaxselect.cpp6
-rw-r--r--src/activeqt/container/qaxselect.h1
2 files changed, 6 insertions, 1 deletions
diff --git a/src/activeqt/container/qaxselect.cpp b/src/activeqt/container/qaxselect.cpp
index e53def7..b8b2c69 100644
--- a/src/activeqt/container/qaxselect.cpp
+++ b/src/activeqt/container/qaxselect.cpp
@@ -30,6 +30,7 @@ QT_BEGIN_NAMESPACE
\value SandboxingNone No specific sandboxing desired
\value SandboxingProcess Run ActiveX control in a separate process
\value SandboxingLowIntegrity Run ActiveX control in a separate low-integrity process
+ \value SandboxingAppContainer Run ActiveX control in a separate AppContainer-isolated process
Sandboxing requires that the ActiveX is either built as an EXE, or as a DLL with AppID "DllSurrogate" enabled.
*/
@@ -327,7 +328,8 @@ QAxSelect::QAxSelect(QWidget *parent, Qt::WindowFlags flags)
d->filterModel->setSourceModel(new ControlList(this));
d->selectUi.ActiveXList->setModel(d->filterModel);
- QStringList sandboxingOptions = { QLatin1String("None"), QLatin1String("Process isolation"), QLatin1String("Low integrity process") };
+ QStringList sandboxingOptions = { QLatin1String("None"), QLatin1String("Process isolation"),
+ QLatin1String("Low integrity process"), QLatin1String("AppContainer process") };
d->selectUi.SandboxingCombo->addItems(sandboxingOptions);
connect(d->selectUi.ActiveXList->selectionModel(), &QItemSelectionModel::currentChanged,
@@ -373,6 +375,8 @@ QAxSelect::SandboxingLevel QAxSelect::sandboxingLevel() const
return SandboxingProcess;
case 2:
return SandboxingLowIntegrity;
+ case 3:
+ return SandboxingAppContainer;
default:
break;
}
diff --git a/src/activeqt/container/qaxselect.h b/src/activeqt/container/qaxselect.h
index 3e10485..5146d5e 100644
--- a/src/activeqt/container/qaxselect.h
+++ b/src/activeqt/container/qaxselect.h
@@ -18,6 +18,7 @@ public:
SandboxingNone = 0,
SandboxingProcess,
SandboxingLowIntegrity,
+ SandboxingAppContainer,
};
explicit QAxSelect(QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags());