@@ -129,8 +129,11 @@ IPAManager::IPAManager()
unsigned int ipaCount = 0;
/* User-specified paths take precedence. */
- const char *modulePaths = utils::secure_getenv("LIBCAMERA_IPA_MODULE_PATH");
- if (modulePaths) {
+ const auto confModulePaths =
+ GlobalConfiguration::envOption(
+ "LIBCAMERA_IPA_MODULE_PATH", "ipa.module_paths");
+ if (confModulePaths.has_value()) {
+ const char *modulePaths = confModulePaths.value().c_str();
for (const auto &dir : utils::split(modulePaths, ":")) {
if (dir.empty())
continue;
@@ -308,7 +311,9 @@ bool IPAManager::isSignatureValid([[maybe_unused]] IPAModule *ipa) const
{
#if HAVE_IPA_PUBKEY
char *force = utils::secure_getenv("LIBCAMERA_IPA_FORCE_ISOLATION");
- if (force && force[0] != '\0') {
+ if ((force && force[0] != '\0') ||
+ (!force && GlobalConfiguration::option<bool>("ipa.force_isolation")
+ .value_or(false))) {
LOG(IPAManager, Debug)
<< "Isolation of IPA module " << ipa->path()
<< " forced through environment variable";
@@ -15,6 +15,7 @@
#include <libcamera/base/log.h>
#include <libcamera/base/utils.h>
+#include "libcamera/internal/global_configuration.h"
#include "libcamera/internal/ipa_module.h"
/**
@@ -104,8 +105,11 @@ std::string IPAProxy::configurationFile(const std::string &name) const
std::string ipaName = ipam_->info().name;
/* Check the environment variable first. */
- const char *confPaths = utils::secure_getenv("LIBCAMERA_IPA_CONFIG_PATH");
- if (confPaths) {
+ auto confConfPaths =
+ GlobalConfiguration::envOption(
+ "LIBCAMERA_IPA_CONFIG_PATH", "ipa.config_paths");
+ if (confConfPaths.has_value()) {
+ const char *confPaths = confConfPaths.value().c_str();
for (const auto &dir : utils::split(confPaths, ":")) {
if (dir.empty())
continue;
The configuration snippet: configuration: ipa: config_paths: CONFIG:PATHS:... module_paths: MODULE:PATHS:... force_isolation: BOOL Signed-off-by: Milan Zamazal <mzamazal@redhat.com> --- src/libcamera/ipa_manager.cpp | 11 ++++++++--- src/libcamera/ipa_proxy.cpp | 8 ++++++-- 2 files changed, 14 insertions(+), 5 deletions(-)