Commit Graph

195 Commits

Author SHA1 Message Date
xionglei6
5b1fde5ead init: fix bugs
Signed-off-by: xionglei6 <xionglei6@huawei.com>
2021-11-17 19:37:18 +08:00
xionglei6
2ba8983131 init: fix bugs
Signed-off-by: xionglei6 <xionglei6@huawei.com>
2021-11-16 10:38:26 +08:00
xionglei6
09f6e68b10 init: fix code style
Signed-off-by: xionglei6 <xionglei6@huawei.com>
2021-11-11 22:27:34 +08:00
xionglei6
5f00c53227 init: fix code style
Signed-off-by: xionglei6 <xionglei6@huawei.com>
2021-11-11 20:12:19 +08:00
xionglei6
72d579a5b9 init: fix ueventd param fsmanager
Signed-off-by: xionglei6 <xionglei6@huawei.com>
2021-11-11 15:37:48 +08:00
xionglei6
36508ac532 init: fix libs
Signed-off-by: xionglei6 <xionglei6@huawei.com>
2021-11-05 17:17:46 +08:00
xionglei6
df15f9fabb init: fix lib bugs
Signed-off-by: xionglei6 <xionglei6@huawei.com>
2021-11-05 16:36:26 +08:00
xionglei6
01d32ed8f7 init: fix reboot lib
Signed-off-by: xionglei6 <xionglei6@huawei.com>
2021-11-04 20:29:49 +08:00
xionglei6
2ae871e730 init: delete static libreboot
Signed-off-by: xionglei6 <xionglei6@huawei.com>
2021-11-04 20:18:11 +08:00
xionglei6
4e36787616 init: fix ohos.param
Signed-off-by: xionglei6 <xionglei6@huawei.com>
2021-11-04 17:45:37 +08:00
xionglei6
e59e4b3aa4 fix log bug
Signed-off-by: xionglei6 <xionglei6@huawei.com>
2021-11-03 15:45:22 +08:00
xionglei6
d50e24d381 fix code style
Signed-off-by: xionglei6 <xionglei6@huawei.com>
2021-11-03 11:16:21 +08:00
xionglei6
cbf190be39 add ut
Signed-off-by: xionglei6 <xionglei6@huawei.com>
2021-11-03 09:35:08 +08:00
xionglei6
8b4d467671 for build_ramdisk script adjustment
Signed-off-by: xionglei6 <xionglei6@huawei.com>
2021-10-28 11:21:02 +08:00
xionglei6
4af662c14b init: fix codedex
Signed-off-by: xionglei6 <xionglei6@huawei.com>
2021-10-27 15:04:18 +08:00
xionglei6
a04ae68117 init: fix bugs
Signed-off-by: xionglei6 <xionglei6@huawei.com>
2021-10-27 14:58:26 +08:00
xionglei6
f98b0e74f8 init: fix bugs
Signed-off-by: xionglei6 <xionglei6@huawei.com>
2021-10-27 14:16:22 +08:00
xionglei6
1135c55724 init: Optimize the code
Signed-off-by: xionglei6 <xionglei6@huawei.com>
2021-10-27 12:03:43 +08:00
xionglei6
99705c0896 init: add service file func
Signed-off-by: xionglei6 <xionglei6@huawei.com>
2021-10-27 10:14:23 +08:00
zmx
9348e53947 samgr part name rectify
Signed-off-by: zmx <1029211721@qq.com>
Change-Id: Ifa0bf35595ef6023ed232386cdb5c99ae0eb59c8
2021-10-22 16:08:10 +08:00
openharmony_ci
e0bbb044a4 !148 fix: init mount in the first stage bugs
Merge pull request !148 from 熊磊/init10200
2021-10-21 10:04:39 +00:00
sun_fan
e911e9284a init: fix fstab mount bugs
Signed-off-by: sun_fan <sun_fan1@hoperun.com>
2021-10-21 17:06:42 +08:00
openharmony_ci
862051c89e !147 修改init
Merge pull request !147 from 熊磊/init10200
2021-10-21 09:04:45 +00:00
openharmony_ci
04ecd45dcc !140 init: support selinux
Merge pull request !140 from Qin Fandong/master
2021-10-21 08:44:46 +00:00
zhong_ning
ab130c7a3f delete unused file
Signed-off-by: zhong_ning <zhong_ning@hoperun.com>
2021-10-21 15:09:07 +08:00
Qin Fandong
55582482ab init: support selinux
此提交使 init 进程有支持 SELinux 的能力。

1. 启动时加载策略并根据策略文件设置进程安全上下文
2. 根据配置文件中的 secon 字段的值设置进程的安全上下文

仅在编译时有宏定义 WITH_SELINUX 时会将此功能引入,而仅在 BUILD.gn 中编译 L2 系统(ohos_executable("init"))时会定义宏 WITH_SELINUX ,因此不影响 L2 以下的系统。

services/BUILD.gn
编译配置,编译此功能时定义宏 -DWITH_SELINUX 并链接到库 libload_policy 、 librestorecon 、 libselinux 。

services/init/standard/init.c
启动时加载策略并根据策略文件设置进程安全上下文。调用接口 load_policy 和 restorencon 。

services/init/include/init_service.h
结构体 Service 中增加了成员字符数组 secon 对应配置文件的新字段 secon 。

services/include/param/init_selinux_param.h
定义了 SELinux 功能需要使用的宏。

services/init/init_service_manager.c
将配置文件的字段 secon 读到内存中。

services/init/standard/init_service.c
根据内存中读到的每个服务的 secon 字段,设置该服务进程的安全上下文。

Signed-off-by: Qin Fandong <qinfd@superred.com.cn>
2021-10-21 09:44:13 +08:00
zhong_ning
e3dc87cd67 fix hilog bug
Signed-off-by: zhong_ning <zhong_ning@hoperun.com>
2021-10-20 17:18:05 +08:00
zhong_ning
f93d708fa9 modify copyright and unsetenv for uv thread
Signed-off-by: zhong_ning <zhong_ning@hoperun.com>
2021-10-20 16:28:12 +08:00
zhong_ning
03a48b969e modify copyright date
Signed-off-by: zhong_ning <zhong_ning@hoperun.com>
2021-10-20 09:22:28 +08:00
zhong_ning
a91b3a0706 format gn
Signed-off-by: zhong_ning <zhong_ning@hoperun.com>
2021-10-19 20:14:22 +08:00
sun_fan
e384733266 init: add boot up logo
Signed-off-by: sun_fan <sun_fan1@hoperun.com>
2021-10-19 15:49:46 +08:00
openharmony_ci
77b2875a0a !142 feat:重构代码
Merge pull request !142 from 熊磊/init1014
2021-10-19 06:42:47 +00:00
411148299@qq.com
87db96dcbc fix code style
Signed-off-by: 411148299@qq.com <411148299@qq.com>
2021-10-19 08:57:00 +08:00
411148299@qq.com
8a5cdb62ac fix code style
Signed-off-by: 411148299@qq.com <411148299@qq.com>
2021-10-18 18:46:37 +08:00
411148299@qq.com
a19fd227f2 fix code style
Signed-off-by: 411148299@qq.com <411148299@qq.com>
2021-10-18 18:32:40 +08:00
zhong_ning
ecdbb6336a fix build error
Signed-off-by: zhong_ning <zhong_ning@hoperun.com>
2021-10-18 17:28:29 +08:00
411148299@qq.com
220326bd54 fix code style
Signed-off-by: 411148299@qq.com <411148299@qq.com>
2021-10-18 12:51:37 +08:00
zmx
d7b08c88df samgr part name rectify
Signed-off-by: zmx <1029211721@qq.com>
Change-Id: I9c9bf6ceb2cb43093eeaebb22117c272b7042cc5
2021-10-18 11:50:57 +08:00
zhong_ning
8bc44fccf6 fix doreset
Signed-off-by: zhong_ning <zhong_ning@hoperun.com>
2021-10-18 11:40:28 +08:00
zhong_ning
fe23db3a5e fix doreset cmd
Signed-off-by: zhong_ning <zhong_ning@hoperun.com>
2021-10-18 11:25:25 +08:00
411148299@qq.com
0ef2b54862 fix code style
Signed-off-by: 411148299@qq.com <411148299@qq.com>
2021-10-16 16:59:47 +08:00
411148299@qq.com
b6ef25b4e5 fix code style
Signed-off-by: 411148299@qq.com <411148299@qq.com>
2021-10-16 15:15:04 +08:00
sun_fan
c488093930 init: fix bugs
Signed-off-by: sun_fan <sun_fan1@hoperun.com>
2021-10-16 14:02:16 +08:00
sun_fan
9ea707c8da init: add disable two step switch
Signed-off-by: sun_fan <sun_fan1@hoperun.com>
2021-10-15 22:17:58 +08:00
sun_fan
8d948a8b02 init: fix codedex
Signed-off-by: sun_fan <sun_fan1@hoperun.com>
2021-10-15 19:23:39 +08:00
sun_fan
f88b96f4be init: fix gn format
Signed-off-by: sun_fan <sun_fan1@hoperun.com>
2021-10-15 14:48:17 +08:00
sun_fan
b6377a40e5 init: fix bugs
Signed-off-by: sun_fan <sun_fan1@hoperun.com>
2021-10-15 12:05:34 +08:00
sun_fan
665ab179fb init: code Refactoring, watchdog, hdc_flashed, ramdisk
Signed-off-by: sun_fan <sun_fan1@hoperun.com>
2021-10-14 16:43:33 +08:00
411148299@qq.com
9913b1d333 fix code style
Signed-off-by: 411148299@qq.com <411148299@qq.com>
2021-10-14 11:52:41 +08:00
411148299@qq.com
e55358eade fix code style
Signed-off-by: 411148299@qq.com <411148299@qq.com>
2021-10-14 11:51:05 +08:00