提交 8fcf0cbf 编写于 作者: C cheng_jinsong

fixed 55a187b3 from https://gitee.com/chneg-jinsong/startup_init_lite/pulls/1340

fix sandbox config to support Third-party manufacturers
Signed-off-by: Ncheng_jinsong <chengjinsong2@huawei.com>
上级 77bce3a3
......@@ -16,7 +16,10 @@ import("//build/ohos.gni")
config("exported_header_files") {
visibility = [ ":*" ]
include_dirs = [ "//base/startup/init/interfaces/innerkits/sandbox/include" ]
include_dirs = [
"//base/startup/init/interfaces/innerkits/sandbox/include",
"//base/customization/config_policy/interfaces/inner_api/include",
]
}
ohos_static_library("sandbox") {
......
......@@ -21,33 +21,33 @@ extern "C" {
#endif
#include <stdbool.h>
#include "init_utils.h"
#include "list.h"
typedef struct {
typedef enum SandboxTag {
SANDBOX_TAG_MOUNT_PATH = 0,
SANDBOX_TAG_MOUNT_FILE,
SANDBOX_TAG_SYMLINK
} SandboxTag;
typedef struct MountList {
char *source; // source 目录,一般是全局的fs 目录
char *target; // 沙盒化后的目录
unsigned long flags;
bool ignoreErrors;
} mount_t;
typedef struct MountList {
mount_t *info;
struct MountList *next;
SandboxTag tag;
struct ListNode node;
} mountlist_t;
typedef struct {
typedef struct LinkList {
char *target;
char *linkName;
} linker_t;
typedef struct LinkList {
linker_t *info;
struct LinkList *next;
struct ListNode node;
} linklist_t;
typedef struct {
mountlist_t *pathMounts;
mountlist_t *fileMounts;
linklist_t *links;
ListNode pathMountsHead;
ListNode fileMountsHead;
ListNode linksHead;
char *rootPath; // /mnt/sandbox/system|vendor|xxx
char name[MAX_BUFFER_LEN]; // name of sandbox. i.e system, chipset etc.
bool isCreated; // sandbox already created or not
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册