From 02e12df2e4d69baab5347668c502ecfde1370d35 Mon Sep 17 00:00:00 2001 From: shangwx Date: Fri, 7 Feb 2025 07:51:12 +0000 Subject: [PATCH] =?UTF-8?q?update=20modules/common/appspawn=5Fadapter.cpp.?= =?UTF-8?q?=20=E4=BF=AE=E5=A4=8D=E7=B3=BB=E7=BB=9F=E4=B8=8D=E4=BD=BF?= =?UTF-8?q?=E7=94=A8selinux=E6=97=B6=E7=BC=96=E8=AF=91=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: shangwx --- modules/common/appspawn_adapter.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/common/appspawn_adapter.cpp b/modules/common/appspawn_adapter.cpp index 7f4d0395..e665d940 100644 --- a/modules/common/appspawn_adapter.cpp +++ b/modules/common/appspawn_adapter.cpp @@ -65,9 +65,9 @@ int SetAppAccessToken(const AppSpawnMgr *content, const AppSpawningCtx *property return 0; } +#if defined(WITH_SELINUX) && !defined(APPSPAWN_TEST) int SetSelinuxConNweb(const AppSpawnMgr *content, const AppSpawningCtx *property) { -#if defined(WITH_SELINUX) && !defined(APPSPAWN_TEST) uint32_t len = 0; std::string processType = reinterpret_cast(GetAppPropertyExt(property, MSG_EXT_NAME_PROCESS_TYPE, &len)); @@ -78,9 +78,10 @@ int SetSelinuxConNweb(const AppSpawnMgr *content, const AppSpawningCtx *property ret = setcon("u:r:isolated_gpu:s0"); } APPSPAWN_CHECK_ONLY_LOG(ret == 0, "Setcon failed, errno: %{public}d", errno); -#endif + return 0; } +#endif #ifdef WITH_SELINUX void SetHapDomainInfo(HapDomainInfo *hapDomainInfo, const AppSpawningCtx *property, -- Gitee