/ohos5.0/base/security/code_signature/interfaces/innerkits/code_sign_attr_utils/src/ |
H A D | code_sign_attr_utils.c | 45 static int DoSetXpmOwnerId(int fd, uint32_t idType, const char *ownerId) in DoSetXpmOwnerId() argument 55 if ((ownerId != NULL) && (strlen(ownerId) != 0)) { in DoSetXpmOwnerId() 56 if (memcpy_s(config.ownerId, sizeof(config.ownerId) - 1, ownerId, strlen(ownerId)) != EOK) { in DoSetXpmOwnerId() 57 LOG_ERROR("Memcpy ownerId failed, ownerId: %{public}s", ownerId); in DoSetXpmOwnerId() 62 LOG_DEBUG("Set type = %{public}u, ownerId = %{public}s", idType, ownerId ? ownerId : "NULL"); in DoSetXpmOwnerId() 67 int InitXpm(int enableJitFort, uint32_t idType, const char *ownerId) in InitXpm() argument 90 idType = ConvertIdType(idType, ownerId); in InitXpm() 91 ret = DoSetXpmOwnerId(fd, idType, ownerId); in InitXpm() 99 int SetXpmOwnerId(uint32_t idType, const char *ownerId) in SetXpmOwnerId() argument 106 int ret = DoSetXpmOwnerId(fd, idType, ownerId); in SetXpmOwnerId()
|
H A D | ownerid_utils.cpp | 39 uint32_t ConvertIdType(int idType, const char *ownerId) in ConvertIdType() argument 41 if (ownerId == nullptr) { in ConvertIdType() 48 std::string ownerIdStr(ownerId); in ConvertIdType()
|
/ohos5.0/base/security/code_signature/interfaces/innerkits/code_sign_utils/src/ |
H A D | code_sign_enable_multi_task.cpp | 86 int32_t CodeSignEnableMultiTask::ExecuteEnableCodeSignTask(const std::string &ownerId, in ExecuteEnableCodeSignTask() argument 96 ExecuteEnableCodeSignTask(i, taskRet, ownerId, path, func); in ExecuteEnableCodeSignTask() 130 const std::string &ownerId, const std::string &path, CallbackFunc &func) in ExecuteEnableCodeSignTask() argument 132 auto enableCodeSignTask = [this, index, &ownerId, &path, &func, &taskRet]() { in ExecuteEnableCodeSignTask() 145 int32_t ret = CheckOwnerId(path, ownerId, in ExecuteEnableCodeSignTask() 165 int32_t CodeSignEnableMultiTask::CheckOwnerId(const std::string &path, const std::string &ownerId, in CheckOwnerId() argument 168 if (ownerId.empty()) { in CheckOwnerId() 178 ReportInvalidOwner(path, ownerId, "invalid"); in CheckOwnerId() 180 } else if (retId != ownerId) { in CheckOwnerId() 182 ReportInvalidOwner(path, ownerId, retId); in CheckOwnerId() [all …]
|
H A D | code_sign_helper.cpp | 32 int32_t CodeSignHelper::ProcessMultiTask(const std::string &ownerId, const std::string &path, Callb… in ProcessMultiTask() argument 44 return ExecuteMultiTask(ownerId, path, func); in ProcessMultiTask() 67 int32_t CodeSignHelper::ExecuteMultiTask(const std::string &ownerId, in ExecuteMultiTask() argument 70 return multiTask_.ExecuteEnableCodeSignTask(ownerId, path, func); in ExecuteMultiTask()
|
H A D | code_sign_utils.cpp | 197 int32_t CodeSignUtils::EnforceCodeSignForAppWithOwnerId(const std::string &ownerId, const std::stri… in EnforceCodeSignForAppWithOwnerId() argument 215 int ret = ProcessCodeSignBlock(ownerId, path, type); in EnforceCodeSignForAppWithOwnerId() 218 ret = ProcessCodeSignBlock(ownerId, path, type); in EnforceCodeSignForAppWithOwnerId() 225 int32_t CodeSignUtils::ProcessCodeSignBlock(const std::string &ownerId, const std::string &path, Fi… in ProcessCodeSignBlock() argument 237 ret = codeSignHelper.ProcessMultiTask(ownerId, path, EnableCodeSignForFile); in ProcessCodeSignBlock()
|
/ohos5.0/base/security/code_signature/interfaces/innerkits/code_sign_attr_utils/include/ |
H A D | code_sign_attr_utils.h | 74 char ownerId[MAX_OWNERID_LEN]; member 77 int InitXpm(int enableJitFort, uint32_t idType, const char *ownerId); 79 int SetXpmOwnerId(uint32_t idType, const char *ownerId);
|
H A D | ownerid_utils.h | 23 uint32_t ConvertIdType(int idType, const char *ownerId);
|
/ohos5.0/base/security/code_signature/interfaces/innerkits/code_sign_utils/include/ |
H A D | code_sign_enable_multi_task.h | 51 int32_t ExecuteEnableCodeSignTask(const std::string &ownerId, 62 void ExecuteEnableCodeSignTask(uint32_t &index, int32_t &taskRet, const std::string &ownerId, 64 int32_t CheckOwnerId(const std::string &path, const std::string &ownerId,
|
H A D | code_sign_helper.h | 43 … int32_t ProcessMultiTask(const std::string &ownerId, const std::string &path, CallbackFunc &func); 46 … int32_t ExecuteMultiTask(const std::string &ownerId, const std::string &path, CallbackFunc &func);
|
H A D | code_sign_utils.h | 70 int32_t EnforceCodeSignForAppWithOwnerId(const std::string &ownerId, const std::string &path, 127 … int32_t ProcessCodeSignBlock(const std::string &ownerId, const std::string &path, FileType type);
|
/ohos5.0/base/security/code_signature/ |
H A D | README_zh.md | 47 | int32_t EnforceCodeSignForAppWithOwnerId(std::string ownerId, const std::string &path, const Entr… 54 | int InitXpm(int enableJitFort, uint32_t idType, const char *ownerId); | 初始化XPM相关资源(XPM地址范围、JitFor… 55 | int SetXpmOwnerId(uint32_t idType, const char *ownerId); | 设置OwnerId |
|
H A D | README.md | 45 | int32_t EnforceCodeSignForAppWithOwnerId(std::string ownerId, const std::string &path, const Entr… 52 | int InitXpm(int enableJitFort, uint32_t idType, const char *ownerId); | Initializes XPM related r… 53 | int SetXpmOwnerId(uint32_t idType, const char *ownerId); | Sets an owner ID.|
|
/ohos5.0/base/startup/appspawn/modules/common/ |
H A D | appspawn_common.c | 210 const char *ownerId = NULL; in SetXpmConfig() local 217 ownerId = ownerInfo->ownerId; in SetXpmConfig() 220 ownerId = ownerInfo->ownerId; in SetXpmConfig() 222 int ret = InitXpm(jitfortEnable, idType, ownerId); in SetXpmConfig()
|
/ohos5.0/commonlibrary/memory_utils/libdmabufheap/src/ |
H A D | dmabuf_alloc.c | 56 void SetOwnerIdForHeapFlags(DmabufHeapBuffer *buffer, enum DmaHeapFlagOwnerId ownerId) in SetOwnerIdForHeapFlags() argument 59 set_owner_id_for_heap_flags(&buffer->heapFlags, ownerId); in SetOwnerIdForHeapFlags()
|
/ohos5.0/foundation/ability/ability_runtime/services/appmgr/src/ |
H A D | app_spawn_msg_wrapper.cpp | 105 if (strcpy_s(msg_->ownerId, sizeof(msg_->ownerId), startMsg.ownerId.c_str()) != EOK) { in AssembleMsg()
|
H A D | app_spawn_client.cpp | 382 if (startMsg.ownerId.size()) { in AppspawnCreateDefaultMsg() 383 ret = AppSpawnReqMsgSetAppOwnerId(reqHandle, startMsg.ownerId.c_str()); in AppspawnCreateDefaultMsg() 386 startMsg.ownerId.c_str(), ret); in AppspawnCreateDefaultMsg()
|
/ohos5.0/commonlibrary/memory_utils/libdmabufheap/include/ |
H A D | dmabuf_alloc.h | 51 void SetOwnerIdForHeapFlags(DmabufHeapBuffer *buffer, enum DmaHeapFlagOwnerId ownerId);
|
/ohos5.0/base/startup/appspawn/modules/module_engine/include/ |
H A D | appspawn_msg.h | 102 char ownerId[0]; // app identifier id member
|
/ohos5.0/commonlibrary/memory_utils/libdmabufheap/test/unittest/libdmabufheap/ |
H A D | dmabuf_alloc_test.cpp | 89 __u64 ownerId = get_owner_id_from_heap_flags(buffer.heapFlags); variable 91 ASSERT_EQ(DMA_OWNER_MEDIA_CODEC, ownerId);
|
/ohos5.0/base/startup/appspawn/interfaces/innerkits/client/ |
H A D | appspawn_msg.c | 505 int AppSpawnReqMsgSetAppOwnerId(AppSpawnReqMsgHandle reqHandle, const char *ownerId) in AppSpawnReqMsgSetAppOwnerId() argument 509 int ret = CheckInputString("TLV_OWNER_INFO", ownerId, APP_OWNER_ID_LEN); in AppSpawnReqMsgSetAppOwnerId() 513 data[0].data = (uint8_t *)ownerId; in AppSpawnReqMsgSetAppOwnerId() 514 data[0].dataLen = strlen(ownerId); in AppSpawnReqMsgSetAppOwnerId()
|
/ohos5.0/base/startup/appspawn/test/unittest/app_spawn_client_test/ |
H A D | app_spawn_client_test.cpp | 388 const char *ownerId = "test 2222222222222222222222222222222222222222222222223451234567"; variable 389 ret = AppSpawnReqMsgSetAppOwnerId(reqHandle, ownerId); 398 APPSPAWN_LOGV("owner->ownerId %{public}s", owner->ownerId); 399 …APPSPAWN_CHECK(strcmp(owner->ownerId, ownerId) == 0, break, "Invalid ownerId %{public}s", ownerId);
|
H A D | app_spawn_interface_test.cpp | 350 …const char *ownerId[] = {"FILE_ACCESS_MANAGER", name1.data(), name2.data(), name3.data(), "", null… variable 352 for (size_t j = 0; j < ARRAY_LENGTH(ownerId); j++) { 354 ret = AppSpawnReqMsgSetAppOwnerId(inputHandle[i], ownerId[j]);
|
/ohos5.0/base/startup/appspawn/test/moduletest/ |
H A D | appspawn_test_cmder.cpp | 288 std::string ownerId = GetStringFromJsonObj(appInfoConfig, "owner-id"); in BuildMsgFromJson() local 289 if (!ownerId.empty()) { in BuildMsgFromJson() 290 ret = AppSpawnReqMsgSetAppOwnerId(reqHandle, ownerId.c_str()); in BuildMsgFromJson()
|
/ohos5.0/base/startup/appspawn/interfaces/innerkits/include/ |
H A D | appspawn.h | 236 int AppSpawnReqMsgSetAppOwnerId(AppSpawnReqMsgHandle reqHandle, const char *ownerId);
|
/ohos5.0/base/startup/appspawn/test/fuzztest/appspawnclient_fuzzer/ |
H A D | appspawnclient_fuzzer.cpp | 233 std::string ownerId(reinterpret_cast<const char*>(data), size); in FuzzAppSpawnReqMsgSetAppOwnerId() 234 (void)AppSpawnReqMsgSetAppOwnerId(reqHandle, ownerId.c_str()); in FuzzAppSpawnReqMsgSetAppOwnerId()
|