提交 766b2c7f 编写于 作者: M Mupceet 提交者: Gitee

Merge branch 'master' of gitee.com:openharmony/startup_init_lite into param_init0428

Signed-off-by: NMupceet <laiguizhong@huawei.com>
......@@ -44,6 +44,22 @@
"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" : [{
......
......@@ -48,6 +48,14 @@
"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": [{
......
......@@ -421,6 +421,12 @@ if (defined(ohos_lite)) {
module_install_dir = "etc/sandbox"
}
ohos_prebuilt_etc("appdata-sandbox.json") {
source = "//base/startup/appspawn_standard/appdata-sandbox.json"
part_name = "init"
module_install_dir = "etc/sandbox"
}
ohos_prebuilt_etc("init.reboot") {
source = "//base/startup/init_lite/services/etc/init.reboot.cfg"
part_name = "init"
......@@ -430,6 +436,7 @@ if (defined(ohos_lite)) {
group("init_etc") {
deps = [
":app-sandbox.json",
":appdata-sandbox.json",
":boot.group",
":charing.group",
":chipset-sandbox.json",
......
......@@ -87,8 +87,8 @@ static void WriteLogoContent(int fd, const std::string &logoPath, uint32_t size)
free(buffer);
return;
}
uint32_t ret = write(fd, buffer, size);
if (ret != size) {
ssize_t ret = write(fd, buffer, size);
if (ret == -1 || ret != size) {
(void)fclose(rgbFile);
free(buffer);
return;
......
......@@ -66,6 +66,7 @@ device_usage_stats:x:3048:
faceauth_host:x:3049:
pinauth_host:x:3050:
dms:x:5522:
update:x:6666:
sensor:x:6688:
input:x:6696:
msdp:x:6699:
......
......@@ -67,6 +67,7 @@ faceauth_host:x:3049:3049:::/bin/false
pinauth_host:x:3050:3050:::/bin/false
dms:x:5522:5522:::/bin/false
dbms:x:6000:6000:::/bin/false
update:x:6666:6666:::/bin/false
sensor:x:6688:6688:::/bin/false
input:x:6696:6696:::/bin/false
msdp:x:6699:6699:::/bin/false
......
......@@ -182,7 +182,7 @@ static int RemoveDeviceNode(const char *deviceNode, char **symLinks)
}
if (symLinks != NULL) {
for (int i = 0; symLinks[i] != NULL; i++) {
char realPath[DEVICE_FILE_SIZE] = {};
char realPath[DEVICE_FILE_SIZE] = {0};
const char *linkName = symLinks[i];
ssize_t ret = readlink(linkName, realPath, DEVICE_FILE_SIZE - 1);
if (ret < 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册