/base/startup/init/services/sandbox/ |
H A D | sandbox.c | 320 if (sandbox->rootPath == NULL) { in ParseSandboxConfig() 327 sandbox->rootPath = strdup(rootdir); in ParseSandboxConfig() 328 BEGET_ERROR_CHECK(sandbox->rootPath != NULL, return -1, in ParseSandboxConfig() 467 if (sandbox->rootPath == NULL) { in IsValidSandbox() 479 const char *rootPath = (const char *)data; in MountSandboxNode() local 482 BEGET_ERROR_CHECK(snprintf_s(target, PATH_MAX, PATH_MAX - 1, "%s%s", rootPath, info->target) > 0, in MountSandboxNode() 494 static int MountSandboxInfo(struct ListNode *head, const char *rootPath, SandboxTag tag) in MountSandboxInfo() argument 496 if ((head == NULL) || (rootPath == NULL)) { in MountSandboxInfo() 499 int ret = OH_ListTraversal(head, (void *)rootPath, MountSandboxNode, 1); in MountSandboxInfo() 508 const char *rootPath in LinkSandboxNode() local 525 LinkSandboxInfo(struct ListNode *head, const char *rootPath) LinkSandboxInfo() argument [all...] |
/base/startup/appspawn/modules/sandbox/ |
H A D | appspawn_sandbox.c | 127 uint32_t rootLen = strlen(sandbox->rootPath); in BuildRootPath() 128 char *rootPath = strstr(sandbox->rootPath, PARAMETER_USER_ID); in BuildRootPath() local 129 if (rootPath == NULL) { in BuildRootPath() 130 len = sprintf_s(buffer, bufferLen, "%s/%d", sandbox->rootPath, uid); in BuildRootPath() 132 ret = memcpy_s(buffer, bufferLen, sandbox->rootPath, rootPath - sandbox->rootPath); in BuildRootPath() 133 APPSPAWN_CHECK(ret == 0, return ret, "Failed to copy root path %{public}s", sandbox->rootPath); in BuildRootPath() 134 currLen = rootPath in BuildRootPath() 227 const char *rootPath = GetSandboxRealVar(context, BUFFER_FOR_SOURCE, sandbox->rootPath, NULL, NULL); InitSandboxContext() local 550 const char rootPath[] = "/data/app/el2/"; IsUnlockStatus() local 568 MountDir(AppSpawnMsgDacInfo *info, const char *bundleName, const char *rootPath, const char *targetPath) MountDir() argument 614 const char rootPath[] = "/mnt/sandbox/"; MountDirToShared() local 905 IsSandboxMounted(const AppSpawnSandboxCfg *sandbox, const char *name, const char *rootPath) IsSandboxMounted() argument 921 SetSandboxMounted(const AppSpawnSandboxCfg *sandbox, const char *name, char *rootPath) SetSandboxMounted() argument 935 UnmountPath(char *rootPath, uint32_t len, const SandboxMountNode *sandboxNode) UnmountPath() argument [all...] |
H A D | sandbox_load.c | 597 char *rootPath = GetStringFromJsonObj(json, "sandbox-root"); in ParseGlobalSandboxConfig() local 598 APPSPAWN_CHECK(rootPath != NULL, return APPSPAWN_SYSTEM_ERROR, "No root path in config"); in ParseGlobalSandboxConfig() 599 if (sandbox->rootPath) { in ParseGlobalSandboxConfig() 600 free(sandbox->rootPath); in ParseGlobalSandboxConfig() 602 sandbox->rootPath = strdup(rootPath); in ParseGlobalSandboxConfig() 603 APPSPAWN_CHECK(sandbox->rootPath != NULL, return APPSPAWN_SYSTEM_ERROR, "Failed to copy root path"); in ParseGlobalSandboxConfig()
|
H A D | sandbox_expand.c | 65 context->rootPath, SANDBOX_INSTALL_PATH, libBundleName, libModuleName); in MountAllHsp() 114 context->rootPath, SANDBOX_GROUP_PATH, dataGroupUuid); in MountAllGroup() 162 sandboxContext->rootPath, SANDBOX_OVERLAY_PATH); in SetOverlayAppPath()
|
H A D | appspawn_sandbox.h | 192 char *rootPath; member 219 char *rootPath; member
|
H A D | sandbox_utils.cpp | 1819 const char rootPath[] = "/data/app/el2/"; 1821 size_t allPathSize = strlen(rootPath) + strlen(basePath) + 1 + USER_ID_SIZE + bundleNameLen; 1824 int len = sprintf_s(path, allPathSize, "%s%u%s%s", rootPath, uid, basePath, bundleName); 1838 static void MountDir(const AppSpawningCtx *property, const char *rootPath, const char *srcPath, const char *targetPath) 1847 size_t allPathSize = strlen(rootPath) + strlen(targetPath) + strlen(bundleName) + 2; 1851 int len = sprintf_s(path, allPathSize, "%s%u/%s%s", rootPath, info->uid / userIdBase, bundleName, targetPath); 1892 const char rootPath[] = "/mnt/sandbox/"; 1902 MountDir(property, rootPath, sourcePath.c_str(), el1Path); 1911 MountDir(property, rootPath, nullptr, MOUNT_SHARED_MAP[i].sandboxPath); 1916 MountDir(property, rootPath, nullpt [all...] |
H A D | sandbox_manager.c | 376 if (sandbox->rootPath) { in DeleteAppSpawnSandbox() 377 free(sandbox->rootPath); in DeleteAppSpawnSandbox() 472 APPSPAPWN_DUMP("Sandbox root path: %{public}s", sandbox->rootPath); in DumpAppSpawnSandboxCfg()
|
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/src/ |
H A D | cert_manager_storage.c | 28 int32_t GetRootPath(uint32_t store, char *rootPath, uint32_t pathLen) in GetRootPath() argument 35 ret = memcpy_s(rootPath, pathLen - 1, CREDNTIAL_STORE, strlen(CREDNTIAL_STORE)); in GetRootPath() 38 ret = memcpy_s(rootPath, pathLen - 1, SYSTEM_CA_STORE, strlen(SYSTEM_CA_STORE)); in GetRootPath() 41 ret = memcpy_s(rootPath, pathLen - 1, USER_CA_STORE, strlen(USER_CA_STORE)); in GetRootPath() 44 ret = memcpy_s(rootPath, pathLen - 1, PRI_CREDNTIAL_STORE, strlen(PRI_CREDNTIAL_STORE)); in GetRootPath() 47 ret = memcpy_s(rootPath, pathLen - 1, SYS_CREDNTIAL_STORE, strlen(SYS_CREDNTIAL_STORE)); in GetRootPath() 64 char rootPath[CERT_MAX_PATH_LEN] = { 0 }; in ConstructUserIdPath() local 65 int32_t ret = GetRootPath(store, rootPath, CERT_MAX_PATH_LEN); in ConstructUserIdPath() 70 if (snprintf_s(userIdPath, pathLen, pathLen - 1, "%s%u", rootPath, context->userId) < 0) { in ConstructUserIdPath() 252 char rootPath[CERT_MAX_PATH_LE in CmGetCertConfUserIdDir() local 382 char rootPath[CERT_MAX_PATH_LEN] = { 0 }; CmGetCertBackupDir() local [all...] |
/base/update/updateservice/services/core/ability/utils/src/ |
H A D | file_utils.cpp | 84 void FileUtils::DeleteFile(const std::string &rootPath, bool isDeleteRootDir) in DeleteFile() argument 86 if (!IsFileExist(rootPath)) { in DeleteFile() 87 ENGINE_LOGE("dir[%{public}s] is not exist", rootPath.c_str()); in DeleteFile() 91 auto myPath = std::filesystem::path(rootPath); in DeleteFile()
|
/base/startup/init/services/sandbox/include/ |
H A D | sandbox.h | 51 char *rootPath; // /mnt/sandbox/system|vendor|xxx member
|
/base/update/updateservice/services/core/ability/utils/include/ |
H A D | file_utils.h | 42 static void DeleteFile(const std::string &rootPath, bool isDeleteRootDir);
|
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_engine/main/core/include/ |
H A D | cert_manager_storage.h | 38 int32_t GetRootPath(uint32_t store, char *rootPath, uint32_t pathLen);
|
/base/security/huks/services/huks_standard/huks_service/main/hks_storage/src/ |
H A D | hks_storage.c | 514 char *rootPath = NULL; in StoreDestroy() local 516 rootPath = HKS_KEY_STORE_BAK_PATH; in StoreDestroy() 518 rootPath = HKS_KEY_STORE_PATH; in StoreDestroy() 524 int32_t ret = GetPath(rootPath, processNameEncoded, storePath, HKS_MAX_FILE_NAME_LEN, bakFlag); in StoreDestroy()
|
/base/startup/appspawn/standard/ |
H A D | appspawn_service.c | 1415 char *rootPath = "/mnt/sandbox"; in ProcessSpawnRemountMsg() local 1416 DIR *rootDir = opendir(rootPath); in ProcessSpawnRemountMsg() 1417 APPSPAWN_CHECK(rootDir != NULL, return -1, "Failed to opendir %{public}s, errno %{public}d", rootPath, errno); in ProcessSpawnRemountMsg() 1427 "%s/%s/app-root/mnt/nweb/tmp", rootPath, userId); in ProcessSpawnRemountMsg() 1459 char *rootPath = "/mnt/sandbox"; in ProcessSpawnRemountMsg() local 1460 DIR *rootDir = opendir(rootPath); in ProcessSpawnRemountMsg() 1461 APPSPAWN_CHECK(rootDir != NULL, return -1, "Failed to opendir %{public}s, errno %{public}d", rootPath, errno); in ProcessSpawnRemountMsg() 1471 int ret = snprintf_s(userIdPath, sizeof(userIdPath), sizeof(userIdPath) - 1, "%s/%s", rootPath, userId); in ProcessSpawnRemountMsg()
|
/base/startup/appspawn/test/unittest/app_spawn_standard_test/ |
H A D | app_spawn_sandbox_new_test.cpp | 335 context->rootPath = nullptr; in TestGetSandboxContext() 336 context->rootPath = nullptr; in TestGetSandboxContext() 937 APPSPAWN_LOGV("sandbox->rootPath: %{public}s", sandbox->rootPath); in HWTEST_F() 944 ASSERT_EQ(strcmp(sandbox->rootPath, "/mnt/sandbox/<currentUserId>/app-root"), 0); in HWTEST_F() 987 APPSPAWN_LOGV("sandbox->rootPath: %{public}s", sandbox->rootPath); in HWTEST_F() 1035 APPSPAWN_LOGV("sandbox->rootPath: %{public}s", sandbox->rootPath); in HWTEST_F() 2281 char rootPath[] in HWTEST_F() local 2301 char rootPath[] = "/test/xxxx"; HWTEST_F() local [all...] |
H A D | app_spawn_sandbox_new_mount_test.cpp | 91 context->rootPath = nullptr;
in TestGetSandboxContext() 92 context->rootPath = nullptr;
in TestGetSandboxContext()
|
H A D | app_spawn_sandboxmgr_test.cpp | 555 sandbox->rootPath = strdup("/data/appspawn_ut/sandbox/"); in HWTEST_F()
|