diff --git a/modules/common/appspawn_silk.c b/modules/common/appspawn_silk.c index 2f8d9141062478031e78286e85cd0aede4c30a75..b709edeaae20249c4f4224b6d606348b860ae5e9 100644 --- a/modules/common/appspawn_silk.c +++ b/modules/common/appspawn_silk.c @@ -110,7 +110,7 @@ APPSPAWN_STATIC bool ParseSilkConfig(const cJSON *root, struct SilkConfig *confi void LoadSilkConfig(void) { cJSON *root = GetJsonObjFromFile(SILK_JSON_CONFIG_PATH); - APPSPAWN_CHECK(root != NULL, return, "Failed to load silk config"); + APPSPAWN_CHECK_LOGW(root != NULL, return, "Failed to load silk config"); (void)ParseSilkConfig(root, &g_silkConfig); cJSON_Delete(root); } diff --git a/modules/sandbox/normal/sandbox_common.cpp b/modules/sandbox/normal/sandbox_common.cpp index 9eca40fcceac87c6e97377e583ce1b45db680cfa..d7c3481d4cfa02b1f9d25bf47c52fe4cd2d25f71 100644 --- a/modules/sandbox/normal/sandbox_common.cpp +++ b/modules/sandbox/normal/sandbox_common.cpp @@ -507,8 +507,13 @@ bool SandboxCommon::IsCreateSandboxPathEnabled(cJSON *json, std::string srcPath) bool SandboxCommon::IsTotalSandboxEnabled(const AppSpawningCtx *appProperty) // CheckTotalSandboxSwitchStatus { - SandboxCommonDef::SandboxConfigType type = CheckAppMsgFlagsSet(appProperty, APP_FLAGS_ISOLATED_SANDBOX_TYPE) ? - SandboxCommonDef::SANDBOX_ISOLATED_JSON_CONFIG : SandboxCommonDef::SANDBOX_APP_JSON_CONFIG; + + if (appProperty == nullptr) { + SandboxCommonDef::SandboxConfigType type = SandboxCommonDef::SANDBOX_APP_JSON_CONFIG; + } else { + SandboxCommonDef::SandboxConfigType type = CheckAppMsgFlagsSet(appProperty, APP_FLAGS_ISOLATED_SANDBOX_TYPE) ? + SandboxCommonDef::SANDBOX_ISOLATED_JSON_CONFIG : SandboxCommonDef::SANDBOX_APP_JSON_CONFIG; + } for (auto& wholeConfig : GetCJsonConfig(type)) { // 获取 "common" 数组 diff --git a/modules/sandbox/sandbox_dec.c b/modules/sandbox/sandbox_dec.c index 8e36ea2e4113757d97e0ab797eb7b2e865b14136..58ffa3ca10dc4b22f93c0e535a2f323d224681f0 100644 --- a/modules/sandbox/sandbox_dec.c +++ b/modules/sandbox/sandbox_dec.c @@ -106,7 +106,7 @@ static int SetDenyConstraintDirs(AppSpawnMgr *content) const char *decFilename = "/dev/dec"; int fd = open(decFilename, O_RDWR); if (fd < 0) { - APPSPAWN_LOGE("open dec file fail."); + APPSPAWN_LOGW("open dec file fail."); return 0; } @@ -140,7 +140,7 @@ static int SetForcedPrefixDirs(AppSpawnMgr *content) const char *decFilename = "/dev/dec"; int fd = open(decFilename, O_RDWR); if (fd < 0) { - APPSPAWN_LOGE("open dec file fail."); + APPSPAWN_LOGW("open dec file fail."); return 0; } @@ -175,7 +175,7 @@ void SetDecPolicy(void) const char *decFilename = "/dev/dec"; int fd = open(decFilename, O_RDWR); if (fd < 0) { - APPSPAWN_LOGE("open dec file fail."); + APPSPAWN_LOGW("open dec file fail."); DestroyDecPolicyInfos(g_decPolicyInfos); g_decPolicyInfos = NULL; return; diff --git a/standard/appspawn_kickdog.c b/standard/appspawn_kickdog.c index ef01677b8802e50df7c776abfa727d1e3bfed14c..73acd4e4c0a522e75f0d89ba64a7a411314c7f31 100644 --- a/standard/appspawn_kickdog.c +++ b/standard/appspawn_kickdog.c @@ -127,7 +127,7 @@ static int CheckKernelType(bool *isLinux) APPSPAWN_STATIC int SpawnKickDogStart(AppSpawnMgr *mgrContent) { APPSPAWN_CHECK(mgrContent != NULL, return 0, "content is null"); - APPSPAWN_CHECK((mgrContent->content.mode == MODE_FOR_APP_SPAWN) || + APPSPAWN_CHECK_LOGW((mgrContent->content.mode == MODE_FOR_APP_SPAWN) || (mgrContent->content.mode == MODE_FOR_NWEB_SPAWN) || (mgrContent->content.mode == MODE_FOR_HYBRID_SPAWN), return 0, "Mode %{public}u no need enable watchdog", mgrContent->content.mode);