!8604 安全告警清理

Merge pull request !8604 from 黄师伟/master
This commit is contained in:
openharmony_ci
2024-05-24 03:06:07 +00:00
committed by Gitee
2 changed files with 18 additions and 12 deletions
@@ -4462,7 +4462,7 @@ int AppMgrServiceInner::StartRenderProcess(const pid_t hostPid, const std::strin
int32_t childNumLimit = appRecord->GetIsGPU() ? PHONE_MAX_RENDER_PROCESS_NUM + 1 : PHONE_MAX_RENDER_PROCESS_NUM;
// The phone device allows a maximum of 40 render processes to be created.
if (AAFwk::AppUtils::GetInstance().IsLimitMaximumOfRenderProcess() &&
renderRecordMap.size() >= childNumLimit) {
renderRecordMap.size() >= static_cast<uint32_t>(childNumLimit)) {
TAG_LOGE(AAFwkTag::APPMGR, "Reaching the maximum render process limitation, hostPid:%{public}d", hostPid);
return ERR_REACHING_MAXIMUM_RENDER_PROCESS_LIMITATION;
}
+17 -11
View File
@@ -172,11 +172,13 @@ int32_t AppSpawnClient::SetMountPermission(const AppSpawnStartMsg &startMsg, App
}
}
if (!startMsg.processType.empty() &&
(ret = AppSpawnReqMsgAddExtInfo(reqHandle, MSG_EXT_NAME_PROCESS_TYPE,
reinterpret_cast<const uint8_t*>(startMsg.processType.c_str()), startMsg.processType.size()))) {
HILOG_ERROR("AppSpawnReqMsgAddExtInfo failed, ret: %{public}d", ret);
return ret;
if (!startMsg.processType.empty()) {
ret = AppSpawnReqMsgAddExtInfo(reqHandle, MSG_EXT_NAME_PROCESS_TYPE,
reinterpret_cast<const uint8_t*>(startMsg.processType.c_str()), startMsg.processType.size());
if (ret) {
TAG_LOGE(AAFwkTag::APPMGR, "AppSpawnReqMsgAddExtInfo failed, ret: %{public}d", ret);
return ret;
}
}
return ret;
@@ -216,9 +218,11 @@ int32_t AppSpawnClient::SetAtomicServiceFlag(const AppSpawnStartMsg &startMsg, A
int32_t AppSpawnClient::SetStrictMode(const AppSpawnStartMsg &startMsg, AppSpawnReqMsgHandle reqHandle)
{
int32_t ret = 0;
if (startMsg.strictMode &&
(ret = AppSpawnReqMsgSetAppFlag(reqHandle, APP_FLAGS_ISOLATED_SANDBOX))) {
HILOG_ERROR("AppSpawnReqMsgSetAppFlag failed, ret: %{public}d", ret);
if (startMsg.strictMode) {
ret = AppSpawnReqMsgSetAppFlag(reqHandle, APP_FLAGS_ISOLATED_SANDBOX);
if (ret) {
TAG_LOGE(AAFwkTag::APPMGR, "AppSpawnReqMsgSetAppFlag failed, ret: %{public}d", ret);
}
}
return ret;
}
@@ -226,9 +230,11 @@ int32_t AppSpawnClient::SetStrictMode(const AppSpawnStartMsg &startMsg, AppSpawn
int32_t AppSpawnClient::SetAppExtension(const AppSpawnStartMsg &startMsg, AppSpawnReqMsgHandle reqHandle)
{
int32_t ret = 0;
if (startMsg.isolatedExtension &&
(ret = AppSpawnReqMsgSetAppFlag(reqHandle, APP_FLAGS_EXTENSION_SANDBOX))) {
HILOG_ERROR("AppSpawnReqMsgSetAppFlag failed, ret: %{public}d", ret);
if (startMsg.isolatedExtension) {
ret = AppSpawnReqMsgSetAppFlag(reqHandle, APP_FLAGS_EXTENSION_SANDBOX);
if (ret) {
TAG_LOGE(AAFwkTag::APPMGR, "AppSpawnReqMsgSetAppFlag failed, ret: %{public}d", ret);
}
}
return ret;
}