From 66288c9b6a2c0956129fe6ab2d9bfa42b6fed854 Mon Sep 17 00:00:00 2001 From: YinZong Date: Thu, 13 Mar 2025 06:57:06 +0000 Subject: [PATCH] update modules/common/appspawn_adapter.cpp. Signed-off-by: YinZong --- modules/common/appspawn_adapter.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/common/appspawn_adapter.cpp b/modules/common/appspawn_adapter.cpp index ab2e5e5e..993b5571 100644 --- a/modules/common/appspawn_adapter.cpp +++ b/modules/common/appspawn_adapter.cpp @@ -162,10 +162,16 @@ int SetSeccompFilter(const AppSpawnMgr *content, const AppSpawningCtx *property) } } + // Set seccomp policy for input method security mode. if (CheckAppSpawnMsgFlag(property->message, TLV_MSG_FLAGS, APP_FLAGS_ISOLATED_SANDBOX) != 0) { appName = IMF_EXTENTOIN_NAME; } + // Set seccomp policy for atomic service process. + if (CheckAppMsgFlagsSet(property, APP_FLAGS_ATOMIC_SERVICE) != 0) { + appName = APP_ATOMIC; + } + if (!SetSeccompPolicyWithName(type, appName)) { APPSPAWN_LOGE("Failed to set %{public}s seccomp filter and exit %{public}d", appName, errno); return -EINVAL; -- Gitee