Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Startup Init Lite
提交
bb2b2922
S
Startup Init Lite
项目概览
OpenHarmony
/
Startup Init Lite
1 年多 前同步成功
通知
3
Star
37
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Startup Init Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
bb2b2922
编写于
5月 26, 2022
作者:
M
Mupceet
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of gitee.com:openharmony/startup_init_lite into init526_1
Signed-off-by:
N
Mupceet
<
laiguizhong@huawei.com
>
上级
200377ec
2a001ae8
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
17 addition
and
348 deletion
+17
-348
interfaces/innerkits/sandbox/BUILD.gn
interfaces/innerkits/sandbox/BUILD.gn
+3
-0
interfaces/innerkits/sandbox/app-sandbox.json
interfaces/innerkits/sandbox/app-sandbox.json
+0
-78
interfaces/innerkits/sandbox/app-sandbox64.json
interfaces/innerkits/sandbox/app-sandbox64.json
+0
-78
interfaces/innerkits/sandbox/include/sandbox_namespace.h
interfaces/innerkits/sandbox/include/sandbox_namespace.h
+2
-1
interfaces/innerkits/sandbox/privapp-sandbox.json
interfaces/innerkits/sandbox/privapp-sandbox.json
+0
-82
interfaces/innerkits/sandbox/privapp-sandbox64.json
interfaces/innerkits/sandbox/privapp-sandbox64.json
+0
-74
interfaces/innerkits/sandbox/sandbox.c
interfaces/innerkits/sandbox/sandbox.c
+5
-15
interfaces/innerkits/sandbox/system-sandbox64.json
interfaces/innerkits/sandbox/system-sandbox64.json
+7
-0
services/param/include/param_utils.h
services/param/include/param_utils.h
+0
-1
services/param/manager/param_utils.c
services/param/manager/param_utils.c
+0
-19
未找到文件。
interfaces/innerkits/sandbox/BUILD.gn
浏览文件 @
bb2b2922
...
...
@@ -20,6 +20,9 @@ config("exported_header_files") {
}
ohos_shared_library("libsandbox") {
if (target_cpu == "arm64") {
defines = [ "SUPPORT_64BIT" ]
}
sources = [
"sandbox.c",
"sandbox_namespace.c",
...
...
interfaces/innerkits/sandbox/app-sandbox.json
已删除
100644 → 0
浏览文件 @
200377ec
{
"sandbox-root"
:
"/mnt/sandbox/app"
,
"mount-bind-paths"
:
[{
"src-path"
:
"/mnt"
,
"sandbox-path"
:
"/mnt"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
,
"private"
]
},
{
"src-path"
:
"/system/bin"
,
"sandbox-path"
:
"/system/bin"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
,
"private"
]
},
{
"src-path"
:
"/system/lib"
,
"sandbox-path"
:
"/system/lib"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
,
"private"
]
},
{
"src-path"
:
"/system/lib/module"
,
"sandbox-path"
:
"/system/lib/module"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
,
"private"
]
},
{
"src-path"
:
"/system/etc"
,
"sandbox-path"
:
"/system/etc"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
,
"private"
]
},
{
"src-path"
:
"/sys/kernel/debug/tracing"
,
"sandbox-path"
:
"/sys/kernel/debug/tracing"
,
"sandbox-flags"
:
[
"bind"
,
"private"
]
},
{
"src-path"
:
"/sys/kernel/debug"
,
"sandbox-path"
:
"/sys/kernel/debug"
,
"sandbox-flags"
:
[
"bind"
,
"private"
]
},
{
"src-path"
:
"/sys"
,
"sandbox-path"
:
"/sys"
,
"sandbox-flags"
:
[
"bind"
,
"private"
]
},
{
"src-path"
:
"/proc"
,
"sandbox-path"
:
"/proc"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
]
},
{
"src-path"
:
"/dev"
,
"sandbox-path"
:
"/dev"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
,
"private"
]
},
{
"src-path"
:
"/data"
,
"sandbox-path"
:
"/data"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
,
"private"
]
},
{
"src-path"
:
"/system/fonts"
,
"sandbox-path"
:
"/system/fonts"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
,
"private"
]
},
{
"src-path"
:
"/config"
,
"sandbox-path"
:
"/config"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
]
},
{
"src-path"
:
"/sys_prod"
,
"sandbox-path"
:
"/sys_prod"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
]
},
{
"src-path"
:
"/storage"
,
"sandbox-path"
:
"/storage"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
,
"private"
]
}
],
"mount-bind-files"
:
[{
}],
"symbol-links"
:
[{
"target-name"
:
"/system/bin"
,
"link-name"
:
"/bin"
},
{
"target-name"
:
"/system/lib"
,
"link-name"
:
"/lib"
},
{
"target-name"
:
"/system/etc"
,
"link-name"
:
"/etc"
}
]
}
interfaces/innerkits/sandbox/app-sandbox64.json
已删除
100644 → 0
浏览文件 @
200377ec
{
"sandbox-root"
:
"/mnt/sandbox/app"
,
"mount-bind-paths"
:
[{
"src-path"
:
"/mnt"
,
"sandbox-path"
:
"/mnt"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
,
"private"
]
},
{
"src-path"
:
"/system/bin"
,
"sandbox-path"
:
"/system/bin"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
,
"private"
]
},
{
"src-path"
:
"/system/lib64"
,
"sandbox-path"
:
"/system/lib64"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
,
"private"
]
},
{
"src-path"
:
"/system/lib64/module"
,
"sandbox-path"
:
"/system/lib64/module"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
,
"private"
]
},
{
"src-path"
:
"/system/etc"
,
"sandbox-path"
:
"/system/etc"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
,
"private"
]
},
{
"src-path"
:
"/sys/kernel/debug/tracing"
,
"sandbox-path"
:
"/sys/kernel/debug/tracing"
,
"sandbox-flags"
:
[
"bind"
,
"private"
]
},
{
"src-path"
:
"/sys/kernel/debug"
,
"sandbox-path"
:
"/sys/kernel/debug"
,
"sandbox-flags"
:
[
"bind"
,
"private"
]
},
{
"src-path"
:
"/sys"
,
"sandbox-path"
:
"/sys"
,
"sandbox-flags"
:
[
"bind"
,
"private"
]
},
{
"src-path"
:
"/proc"
,
"sandbox-path"
:
"/proc"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
]
},
{
"src-path"
:
"/dev"
,
"sandbox-path"
:
"/dev"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
,
"private"
]
},
{
"src-path"
:
"/data"
,
"sandbox-path"
:
"/data"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
,
"private"
]
},
{
"src-path"
:
"/system/fonts"
,
"sandbox-path"
:
"/system/fonts"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
,
"private"
]
},
{
"src-path"
:
"/config"
,
"sandbox-path"
:
"/config"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
]
},
{
"src-path"
:
"/sys_prod"
,
"sandbox-path"
:
"/sys_prod"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
]
},
{
"src-path"
:
"/storage"
,
"sandbox-path"
:
"/storage"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
,
"private"
]
}
],
"mount-bind-files"
:
[{
}],
"symbol-links"
:
[{
"target-name"
:
"/system/bin"
,
"link-name"
:
"/bin"
},
{
"target-name"
:
"/system/lib64"
,
"link-name"
:
"/lib64"
},
{
"target-name"
:
"/system/etc"
,
"link-name"
:
"/etc"
}
]
}
interfaces/innerkits/sandbox/include/sandbox_namespace.h
浏览文件 @
bb2b2922
...
...
@@ -33,4 +33,5 @@ void CloseDefaultNamespace(void);
}
#endif
#endif
#endif
\ No newline at end of file
#endif
interfaces/innerkits/sandbox/privapp-sandbox.json
已删除
100644 → 0
浏览文件 @
200377ec
{
"sandbox-root"
:
"/mnt/sandbox/priv-app"
,
"mount-bind-paths"
:
[{
"src-path"
:
"/mnt"
,
"sandbox-path"
:
"/mnt"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
]
},
{
"src-path"
:
"/system/bin"
,
"sandbox-path"
:
"/system/bin"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
]
},
{
"src-path"
:
"/system/bin"
,
"sandbox-path"
:
"/system/common/bin"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
]
},
{
"src-path"
:
"/system/lib"
,
"sandbox-path"
:
"/system/lib"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
]
},
{
"src-path"
:
"/system/lib/module"
,
"sandbox-path"
:
"/system/lib/module"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
]
},
{
"src-path"
:
"/system/etc"
,
"sandbox-path"
:
"/system/etc"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
]
},
{
"src-path"
:
"/sys/kernel/debug/tracing"
,
"sandbox-path"
:
"/sys/kernel/debug/tracing"
,
"sandbox-flags"
:
[
"bind"
,
"private"
]
},
{
"src-path"
:
"/sys/kernel/debug"
,
"sandbox-path"
:
"/sys/kernel/debug"
,
"sandbox-flags"
:
[
"bind"
,
"private"
]
},
{
"src-path"
:
"/sys"
,
"sandbox-path"
:
"/sys"
,
"sandbox-flags"
:
[
"bind"
,
"private"
]
},
{
"src-path"
:
"/proc"
,
"sandbox-path"
:
"/proc"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
]
},
{
"src-path"
:
"/dev"
,
"sandbox-path"
:
"/dev"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
]
},
{
"src-path"
:
"/data"
,
"sandbox-path"
:
"/data"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
]
},
{
"src-path"
:
"/system/fonts"
,
"sandbox-path"
:
"/system/fonts"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
,
"private"
]
},
{
"src-path"
:
"/config"
,
"sandbox-path"
:
"/config"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
]
},
{
"src-path"
:
"/sys_prod"
,
"sandbox-path"
:
"/sys_prod"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
]
},
{
"src-path"
:
"/storage"
,
"sandbox-path"
:
"/storage"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
,
"private"
]
}
],
"mount-bind-files"
:
[{
}],
"symbol-links"
:
[{
"target-name"
:
"/system/bin"
,
"link-name"
:
"/bin"
},
{
"target-name"
:
"/system/lib"
,
"link-name"
:
"/lib"
},
{
"target-name"
:
"/system/etc"
,
"link-name"
:
"/etc"
}
]
}
interfaces/innerkits/sandbox/privapp-sandbox64.json
已删除
100644 → 0
浏览文件 @
200377ec
{
"sandbox-root"
:
"/mnt/sandbox/priv-app"
,
"mount-bind-paths"
:
[{
"src-path"
:
"/mnt"
,
"sandbox-path"
:
"/mnt"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
]
},
{
"src-path"
:
"/system/bin"
,
"sandbox-path"
:
"/system/bin"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
]
},
{
"src-path"
:
"/system/bin"
,
"sandbox-path"
:
"/system/common/bin"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
]
},
{
"src-path"
:
"/system/lib64"
,
"sandbox-path"
:
"/system/lib64"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
]
},
{
"src-path"
:
"/system/lib64/module"
,
"sandbox-path"
:
"/system/lib64/module"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
]
},
{
"src-path"
:
"/system/etc"
,
"sandbox-path"
:
"/system/etc"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
]
},
{
"src-path"
:
"/sys/kernel/debug/tracing"
,
"sandbox-path"
:
"/sys/kernel/debug/tracing"
,
"sandbox-flags"
:
[
"bind"
,
"private"
]
},
{
"src-path"
:
"/sys/kernel/debug"
,
"sandbox-path"
:
"/sys/kernel/debug"
,
"sandbox-flags"
:
[
"bind"
,
"private"
]
},
{
"src-path"
:
"/sys"
,
"sandbox-path"
:
"/sys"
,
"sandbox-flags"
:
[
"bind"
,
"private"
]
},
{
"src-path"
:
"/proc"
,
"sandbox-path"
:
"/proc"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
]
},
{
"src-path"
:
"/dev"
,
"sandbox-path"
:
"/dev"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
]
},
{
"src-path"
:
"/data"
,
"sandbox-path"
:
"/data"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
]
},{
"src-path"
:
"/storage"
,
"sandbox-path"
:
"/storage"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
,
"private"
]
},
{
"src-path"
:
"/system/fonts"
,
"sandbox-path"
:
"/system/fonts"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
,
"private"
]
}
],
"mount-bind-files"
:
[{
}],
"symbol-links"
:
[{
"target-name"
:
"/system/bin"
,
"link-name"
:
"/bin"
},
{
"target-name"
:
"/system/lib64"
,
"link-name"
:
"/lib64"
},
{
"target-name"
:
"/system/etc"
,
"link-name"
:
"/etc"
}
]
}
interfaces/innerkits/sandbox/sandbox.c
浏览文件 @
bb2b2922
...
...
@@ -38,10 +38,13 @@
#define SANDBOX_SYMLINK_TARGET "target-name"
#define SANDBOX_SYMLINK_NAME "link-name"
#ifndef SUPPORT_64BIT
#define SANDBOX_SYSTEM_CONFIG_FILE "/system/etc/sandbox/system-sandbox.json"
#define SANDBOX_CHIPSET_CONFIG_FILE "/system/etc/sandbox/chipset-sandbox.json"
#define SANDBOX_PRIVAPP_CONFIG_FILE "/system/etc/sandbox/privapp-sandbox.json"
#define SANDBOX_APP_CONFIG_FILE "/system/etc/sandbox/app-sandbox.json"
#else
#define SANDBOX_SYSTEM_CONFIG_FILE "/system/etc/sandbox/system-sandbox64.json"
#define SANDBOX_CHIPSET_CONFIG_FILE "/system/etc/sandbox/chipset-sandbox64.json"
#endif
#define SANDBOX_MOUNT_FLAGS_MS_BIND "bind"
#define SANDBOX_MOUNT_FLAGS_MS_PRIVATE "private"
...
...
@@ -72,11 +75,8 @@ static const struct SandboxMountFlags g_flags[] = {
}
};
static
sandbox_t
g_systemSandbox
;
static
sandbox_t
g_chipsetSandbox
;
static
sandbox_t
g_privAppSandbox
;
static
sandbox_t
g_appSandbox
;
struct
SandboxMap
{
const
char
*
name
;
...
...
@@ -94,16 +94,6 @@ static const struct SandboxMap g_map[] = {
.
name
=
"chipset"
,
.
sandbox
=
&
g_chipsetSandbox
,
.
configfile
=
SANDBOX_CHIPSET_CONFIG_FILE
,
},
{
.
name
=
"priv-app"
,
.
sandbox
=
&
g_privAppSandbox
,
.
configfile
=
SANDBOX_PRIVAPP_CONFIG_FILE
,
},
{
.
name
=
"app"
,
.
sandbox
=
&
g_appSandbox
,
.
configfile
=
SANDBOX_APP_CONFIG_FILE
,
}
};
...
...
interfaces/innerkits/sandbox/system-sandbox64.json
浏览文件 @
bb2b2922
...
...
@@ -12,6 +12,10 @@
"src-path"
:
"/system/lib64"
,
"sandbox-path"
:
"/system/lib64"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
,
"private"
]
},
{
"src-path"
:
"/system/lib"
,
"sandbox-path"
:
"/system/lib"
,
"sandbox-flags"
:
[
"bind"
,
"rec"
,
"private"
]
},
{
"src-path"
:
"/system/profile"
,
"sandbox-path"
:
"/system/profile"
,
...
...
@@ -79,6 +83,9 @@
"symbol-links"
:
[{
"target-name"
:
"/system/lib64"
,
"link-name"
:
"/lib64"
},
{
"target-name"
:
"/system/lib"
,
"link-name"
:
"/lib"
},
{
"target-name"
:
"/system/bin"
,
"link-name"
:
"/bin"
...
...
services/param/include/param_utils.h
浏览文件 @
bb2b2922
...
...
@@ -132,7 +132,6 @@ typedef struct cmdLineInfo {
#endif
char
*
GetServiceCtrlName
(
const
char
*
name
,
const
char
*
value
);
void
CheckAndCreateDir
(
const
char
*
fileName
);
int
SpliteString
(
char
*
line
,
const
char
*
exclude
[],
uint32_t
count
,
int
(
*
result
)(
const
uint32_t
*
context
,
const
char
*
name
,
const
char
*
value
),
const
uint32_t
*
context
);
#ifdef __cplusplus
...
...
services/param/manager/param_utils.c
浏览文件 @
bb2b2922
...
...
@@ -28,25 +28,6 @@
#include "init_utils.h"
void
CheckAndCreateDir
(
const
char
*
fileName
)
{
#ifndef __LITEOS_M__
if
(
fileName
==
NULL
||
*
fileName
==
'\0'
)
{
return
;
}
char
*
path
=
strndup
(
fileName
,
strrchr
(
fileName
,
'/'
)
-
fileName
);
if
(
path
==
NULL
)
{
return
;
}
if
(
access
(
path
,
F_OK
)
==
0
)
{
free
(
path
);
return
;
}
MakeDirRecursive
(
path
,
S_IRWXU
|
S_IRGRP
|
S_IXGRP
|
S_IROTH
|
S_IXOTH
);
free
(
path
);
#endif
}
int
SpliteString
(
char
*
line
,
const
char
*
exclude
[],
uint32_t
count
,
int
(
*
result
)(
const
uint32_t
*
context
,
const
char
*
name
,
const
char
*
value
),
const
uint32_t
*
context
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录