• Home
  • Raw
  • Download

Lines Matching refs:rootPath

316     if (sandbox->rootPath == NULL) {  in ParseSandboxConfig()
323 sandbox->rootPath = strdup(rootdir); in ParseSandboxConfig()
324 BEGET_ERROR_CHECK(sandbox->rootPath != NULL, return -1, in ParseSandboxConfig()
465 if (sandbox->rootPath == NULL) { in IsValidSandbox()
477 const char *rootPath = (const char *)data; in MountSandboxNode() local
480 … BEGET_ERROR_CHECK(snprintf_s(target, PATH_MAX, PATH_MAX - 1, "%s%s", rootPath, info->target) > 0, in MountSandboxNode()
492 static int MountSandboxInfo(struct ListNode *head, const char *rootPath, SandboxTag tag) in MountSandboxInfo() argument
494 if ((head == NULL) || (rootPath == NULL)) { in MountSandboxInfo()
497 int ret = OH_ListTraversal(head, (void *)rootPath, MountSandboxNode, 1); in MountSandboxInfo()
506 const char *rootPath = (const char *)data; in LinkSandboxNode() local
509 …BEGET_ERROR_CHECK(!(snprintf_s(linkName, PATH_MAX, PATH_MAX - 1, "%s%s", rootPath, info->linkName)… in LinkSandboxNode()
523 static int LinkSandboxInfo(struct ListNode *head, const char *rootPath) in LinkSandboxInfo() argument
525 if ((head == NULL) || (rootPath == NULL)) { in LinkSandboxInfo()
528 int ret = OH_ListTraversal(head, (void *)rootPath, LinkSandboxNode, 1); in LinkSandboxInfo()
541 BEGET_CHECK(sandbox->rootPath != NULL, return -1); in PrepareSandbox()
543 …EGET_ERROR_CHECK(CheckAndMakeDir(sandbox->rootPath, mode) == 0, return -1, "Failed root %s.", sand… in PrepareSandbox()
546 rc = BindMount(sandbox->rootPath, sandbox->rootPath, MS_BIND | MS_REC, SANDBOX_TAG_MOUNT_PATH); in PrepareSandbox()
550 rc = MountSandboxInfo(&sandbox->pathMountsHead, sandbox->rootPath, SANDBOX_TAG_MOUNT_PATH); in PrepareSandbox()
553 rc = MountSandboxInfo(&sandbox->fileMountsHead, sandbox->rootPath, SANDBOX_TAG_MOUNT_FILE); in PrepareSandbox()
557 rc = LinkSandboxInfo(&sandbox->linksHead, sandbox->rootPath); in PrepareSandbox()
560 …BEGET_ERROR_CHECK(chdir(sandbox->rootPath) == 0, return -1, "Change to %s, err = %d", sandbox->roo… in PrepareSandbox()
561 BEGET_ERROR_CHECK(syscall(SYS_pivot_root, sandbox->rootPath, sandbox->rootPath) == 0, return -1, in PrepareSandbox()
602 if (sandbox->rootPath != NULL) { in DestroySandbox()
603 free(sandbox->rootPath); in DestroySandbox()
604 sandbox->rootPath = NULL; in DestroySandbox()
692 printf("Sandbox root path is %s. \n", map->sandbox->rootPath); in DumpSandboxByName()