DockerActionManager: fix bug with collabora using seccomp if it is globally disabled

Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
Simon L. 2025-11-24 10:08:12 +01:00
parent 595b5db9fb
commit 0fe8008777
2 changed files with 14 additions and 5 deletions

View file

@ -209,7 +209,7 @@ class ConfigurationManager
public function SetFulltextsearchEnabledState(int $value) : void {
// Elasticsearch does not work on kernels without seccomp anymore. See https://github.com/nextcloud/all-in-one/discussions/5768
if ($this->GetCollaboraSeccompDisabledState() === 'true') {
if ($this->isSeccompDisabled()) {
$value = 0;
}
@ -757,7 +757,7 @@ class ConfigurationManager
public function GetCollaboraSeccompPolicy() : string {
$defaultString = '--o:security.seccomp=';
if ($this->GetCollaboraSeccompDisabledState() !== 'true') {
if ($this->isSeccompDisabled()) {
return $defaultString . 'true';
}
return $defaultString . 'false';
@ -770,6 +770,13 @@ class ConfigurationManager
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
}
public function isSeccompDisabled() : bool {
if ($this->GetCollaboraSeccompDisabledState() === 'true') {
return true;
}
return false;
}
/**
* @throws InvalidSettingConfigurationException
*/