mirror of
https://gitee.com/openharmony/startup_init
synced 2024-11-23 16:20:00 +00:00
!2684 加载selinux前检测cgroupv1的创建是否完成
Merge pull request !2684 from wenrui/master
This commit is contained in:
commit
5f43d3bdf7
@ -292,6 +292,14 @@ void SystemConfig(const char *uptime)
|
||||
RegisterBootStateChange(BootStateChange);
|
||||
|
||||
INIT_LOGI("boot stage: init finish.");
|
||||
|
||||
// The cgroupv1 hierarchy may be created asynchronously in the early stage,
|
||||
// so make sure it has been done before loading SELinux.
|
||||
struct stat sourceInfo = {0};
|
||||
if (stat("/dev/cgroup", &sourceInfo) == 0) {
|
||||
WaitForFile("/dev/memcg/procs", WAIT_MAX_SECOND);
|
||||
}
|
||||
|
||||
// load SELinux context and policy
|
||||
// Do not move position!
|
||||
PluginExecCmdByName("loadSelinuxPolicy", "");
|
||||
|
Loading…
Reference in New Issue
Block a user