Home
last modified time | relevance | path

Searched refs:sandboxNode (Results 1 – 8 of 8) sorted by relevance

/ohos5.0/base/startup/appspawn/modules/sandbox/
H A Dsandbox_manager.c31 if (sandboxNode->source) { in FreePathMountNode()
32 free(sandboxNode->source); in FreePathMountNode()
35 if (sandboxNode->target) { in FreePathMountNode()
36 free(sandboxNode->target); in FreePathMountNode()
43 free(sandboxNode); in FreePathMountNode()
49 if (sandboxNode->target) { in FreeSymbolLinkNode()
53 if (sandboxNode->linkName) { in FreeSymbolLinkNode()
57 free(sandboxNode); in FreeSymbolLinkNode()
89 return (node1->sandboxNode.type == node2->sandboxNode.type) && in PathMountNodeCompare()
98 return (node1->sandboxNode.type == node2->sandboxNode.type) && in SymbolLinkNodeCompare()
[all …]
H A Dappspawn_sandbox.c252 if (sandboxNode->source == NULL || sandboxNode->target == NULL) { in CheckSandboxMountNode()
337 if (!sandboxNode->createDemand) { in CreateDemandSrc()
346 …uid_t uid = sandboxNode->demandInfo->uid != INVALID_UID ? sandboxNode->demandInfo->uid : info->uid; in CreateDemandSrc()
347 …gid_t gid = sandboxNode->demandInfo->gid != INVALID_UID ? sandboxNode->demandInfo->gid : info->gid; in CreateDemandSrc()
421 if (sandboxNode->sandboxNode.type == SANDBOX_TAG_MOUNT_FILE) { in DoSandboxPathNodeMount()
451 if (sandboxNode->linkName == NULL || sandboxNode->target == NULL) { in DoSandboxPathSymLink()
464 errno, sandboxNode->target, sandboxNode->linkName); in DoSandboxPathSymLink()
468 errno, sandboxNode->target, sandboxNode->linkName); in DoSandboxPathSymLink()
479 switch (sandboxNode->type) { in DoSandboxNodeMount()
614 if (sandboxNode != NULL) { in SetSandboxPackageNameConfig()
[all …]
H A Dsandbox_load.c220 APPSPAWN_CHECK_ONLY_EXPER(sandboxNode != NULL, return NULL); in DecodeMountPathConfig()
221 sandboxNode->createDemand = demandInfo != NULL; in DecodeMountPathConfig()
222 sandboxNode->source = strdup(srcPath); in DecodeMountPathConfig()
223 sandboxNode->target = strdup(dstPath); in DecodeMountPathConfig()
225 sandboxNode->destMode = GetChmodFromJson(config); in DecodeMountPathConfig()
232 sandboxNode->appAplName = strdup(value); in DecodeMountPathConfig()
234 FillPathDemandInfo(demandInfo, sandboxNode); in DecodeMountPathConfig()
236 if (sandboxNode->source == NULL || sandboxNode->target == NULL) { in DecodeMountPathConfig()
241 return sandboxNode; in DecodeMountPathConfig()
257 AddSandboxMountNode(&sandboxNode->sandboxNode, section); in ParseMountPathsConfig()
[all …]
H A Dappspawn_permission.c66 OH_ListAddWithOrder(&queue->front, &node->section.sandboxNode.node, PermissionNodeCompareProc); in AddSandboxPermissionNode()
71 OH_ListInit(&node->sandboxNode.node); in AddSandboxPermissionNode()
76 OH_ListAddWithOrder(&queue->front, &node->sandboxNode.node, PermissionNodeCompareProc); in AddSandboxPermissionNode()
86 SandboxMountNode *sandboxNode = (SandboxMountNode *)ListEntry(node, SandboxMountNode, node); in DeleteSandboxPermissions() local
87 OH_ListRemove(&sandboxNode->node); in DeleteSandboxPermissions()
88 OH_ListInit(&sandboxNode->node); in DeleteSandboxPermissions()
90 DeleteSandboxSection((SandboxSection *)sandboxNode); in DeleteSandboxPermissions()
92 free(sandboxNode); in DeleteSandboxPermissions()
H A Dappspawn_sandbox.h112 SandboxMountNode sandboxNode; member
125 SandboxMountNode sandboxNode; member
133 SandboxMountNode sandboxNode; member
233 return section != NULL ? section->sandboxNode.type : SANDBOX_TAG_INVALID; in GetSectionType()
/ohos5.0/base/startup/appspawn/test/unittest/app_spawn_standard_test/
H A Dapp_spawn_sandbox_new_test.cpp993 ASSERT_EQ(sandboxNode != nullptr, 1);
995 …ASSERT_EQ((sandboxNode->section.sandboxShared == 1) && (sandboxNode->section.sandboxSwitch == 1), …
999 GetFirstSandboxMountPathNode(&sandboxNode->section));
1007 GetNextSandboxMountPathNode(&sandboxNode->section, &pathNode->sandboxNode));
1088 ASSERT_EQ(sandboxNode != nullptr, 1);
1091 …ASSERT_EQ((sandboxNode->section.sandboxShared == 0) && (sandboxNode->section.sandboxSwitch == 1), …
1125 ASSERT_EQ(sandboxNode != nullptr, 1);
1126 ASSERT_EQ(strcmp(sandboxNode->section.name, "el5"), 0);
1128 …ASSERT_EQ((sandboxNode->section.sandboxShared == 0) && (sandboxNode->section.sandboxSwitch == 1), …
1131 ASSERT_EQ(sandboxNode->depNode != nullptr, 1);
[all …]
/ohos5.0/base/startup/appspawn/test/mock/
H A Dapp_spawn_stub.h59 void CreateDemandSrc(const SandboxContext *context, const PathMountNode *sandboxNode, const MountAr…
61 const SandboxSection *section, const PathMountNode *sandboxNode, uint32_t operation);
/ohos5.0/base/startup/appspawn/interfaces/innerkits/permission/
H A Dappspawn_mount_permission.h39 SandboxMountNode sandboxNode; member