SetupSelinux
这个函数实现在system/core/init/selinux.cpp中。主要就是启动SElinux, 然后成功后进入到SecondStageMain。
int SetupSelinux(char** argv) {
MountMissingSystemPartitions();
SelinuxSetupKernelLogging();
LOG(INFO) << "Opening SELinux policy";
// Read the policy before potentially killing snapuserd.
std::string policy;
ReadPolicy(&policy);
LoadSelinuxPolicy(policy);
const char* path = "/system/bin/init";
const char* args[] = {path, "second_stage", nullptr};
execv(path, const_cast(args));
}
版权所有,违者必究,欢迎转载请注明出处。
