ad the share dir to sandbox

Signed-off-by: zhangkaixiang <zhangkaixiang5@huawei.com>
This commit is contained in:
zhangkaixiang 2023-01-29 19:32:39 +08:00
parent 1bc5057f58
commit a693223295
3 changed files with 11 additions and 1 deletions

View File

@ -133,6 +133,11 @@
"sandbox-path" : "/data/storage/ark-profile",
"sandbox-flags" : [ "bind", "rec" ],
"check-action-status": "false"
}, {
"src-path" : "/mnt/share/<currentUserId>/<PackageName>",
"sandbox-path" : "/data/storage/el2/share",
"sandbox-flags" : [ "bind", "rec" ],
"check-action-status": "false"
}
],
"symbol-links" : [{

View File

@ -143,6 +143,11 @@
"sandbox-path" : "/data/storage/ark-profile",
"sandbox-flags" : [ "bind", "rec" ],
"check-action-status": "false"
}, {
"src-path" : "/mnt/share/<currentUserId>/<PackageName>",
"sandbox-path" : "/data/storage/el2/share",
"sandbox-flags" : [ "bind", "rec" ],
"check-action-status": "false"
}
],
"symbol-links" : [{

View File

@ -204,7 +204,7 @@ int32_t SandboxUtils::DoAppSandboxMountOnce(const char *originPath, const char *
ret = mount(originPath, destinationPath, fsType, mountFlags, options);
APPSPAWN_CHECK(ret == 0, return ret, "errno is: %d, bind mount %s to %s failed, just DEBUG MESSAGE here",
errno, originPath, destinationPath);
ret = mount(NULL, destinationPath, NULL, MS_PRIVATE, NULL);
ret = mount(NULL, destinationPath, NULL, MS_SLAVE, NULL);
APPSPAWN_CHECK(ret == 0, return ret, "errno is: %d, private mount to %s failed", errno, destinationPath);
#endif
return 0;