diff --git a/recipes-openharmony/openharmony/openharmony-standard-3.0/remove-root-uid-check.patch b/recipes-openharmony/openharmony/openharmony-standard-3.0/remove-root-uid-check.patch new file mode 100644 index 0000000000000000000000000000000000000000..330fc3f0c826ae8cbaef8bf90e324c013af9f132 --- /dev/null +++ b/recipes-openharmony/openharmony/openharmony-standard-3.0/remove-root-uid-check.patch @@ -0,0 +1,33 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# +# SPDX-License-Identifier: Apache-2.0 + +OpenHarmony uses couple of UIDs/GIDs for running it's services. +Currently in meta-openharmony we have everything run as root, which +causes some issues in starting abilities. As a temporary workaround +we are removing the Uid check. + +Apply to foundation/aafwk/standard + +Signed-off-by: Francesco Pham <francesco.pham@huawei.com> +Upstream-Status: Inappropriate + +diff --git a/services/abilitymgr/include/ability_util.h b/services/abilitymgr/include/ability_util.h +index a090a1eb..d495a75b 100644 +--- a/services/abilitymgr/include/ability_util.h ++++ b/services/abilitymgr/include/ability_util.h +@@ -144,10 +144,10 @@ static sptr<AppExecFwk::IBundleMgr> GetBundleManager() + if (callerUid == -1) { + callerUid = IPCSkeleton::GetCallingUid(); + } +- if (ROOT_UID == callerUid) { +- HILOG_ERROR("uid is root,ability cannot be start when the visible is false"); +- return ABILITY_VISIBLE_FALSE_DENY_REQUEST; +- } ++ // if (ROOT_UID == callerUid) { ++ // HILOG_ERROR("uid is root,ability cannot be start when the visible is false"); ++ // return ABILITY_VISIBLE_FALSE_DENY_REQUEST; ++ // } + auto bms = GetBundleManager(); + CHECK_POINTER_AND_RETURN(bms, GET_ABILITY_SERVICE_FAILED); + auto isSystemApp = bms->CheckIsSystemAppByUid(callerUid); diff --git a/recipes-openharmony/openharmony/openharmony-standard_3.0.bb b/recipes-openharmony/openharmony/openharmony-standard_3.0.bb index d347fb04062e6b965fa3c7e4d48f10aaa3a0a84b..6f99180a926b6e2a1d978b956565c9b9fb8bc742 100644 --- a/recipes-openharmony/openharmony/openharmony-standard_3.0.bb +++ b/recipes-openharmony/openharmony/openharmony-standard_3.0.bb @@ -72,6 +72,7 @@ SRC_URI += "file://foundation_distributedschedule_safwk-slash-system-symlink.pat SRC_URI += "file://test-xts-acts-Start-tests-from-onInit.patch;patchdir=${S}/test/xts/acts" SRC_URI += "file://RenderText-PerformLayout-remove-sigsegv-code.patch;patchdir=${S}/foundation/ace/ace_engine" +SRC_URI += "file://remove-root-uid-check.patch;patchdir=${S}/foundation/aafwk/standard" inherit python3native gn_base ptest