Skip to content
Snippets Groups Projects
Commit ed89000b authored by Francesco Pham's avatar Francesco Pham
Browse files

remove-root-uid-check.patch: remove patch


The patch was a hacky way to allow starting of demo hap applications from a root user.
The proper way to start the demo apps is by running `aa start ...` from the system user.
For example:
```
$ hdc shell "su system -c 'aa start -a ohos.samples.clock.MainAbility -b ohos.samples.clock'"
```

Signed-off-by: default avatarFrancesco Pham <francesco.pham@huawei.com>
parent b0eb5958
No related branches found
No related tags found
1 merge request!90Remove patches that are not needed
# 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);
......@@ -71,7 +71,6 @@ SRC_URI += "file://base_hiviewdfx_hiview-libfaultlogger-static.patch;patchdir=${
SRC_URI += "file://foundation_distributedschedule_safwk-slash-system-symlink.patch;patchdir=${S}/foundation/distributedschedule/safwk"
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"
SRC_URI += "file://test-xts-acts-timeout-increment.patch;patchdir=${S}/test/xts/acts"
SRC_URI += "file://start-ability-timeout-increment.patch;patchdir=${S}/test/xts/acts"
SRC_URI += "file://test-xts-acts-fix-Defpermission-typo.patch;patchdir=${S}/test/xts/acts"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment