Merge "init: clarify comment for the restorecon of second stage init"
am: 424ffa2df9
Change-Id: I6756899be70781ab4f1a5cd2f7d8daf28cb56a23
This commit is contained in:
commit
f1e6db5567
1 changed files with 4 additions and 3 deletions
|
|
@ -138,9 +138,10 @@ int main(int argc, char** argv) {
|
||||||
SelinuxSetupKernelLogging();
|
SelinuxSetupKernelLogging();
|
||||||
SelinuxInitialize();
|
SelinuxInitialize();
|
||||||
|
|
||||||
// Unneeded? It's an ext4 file system so shouldn't it have the right domain already?
|
// We're in the kernel domain and want to transition to the init domain when we exec second
|
||||||
// We're in the kernel domain, so re-exec init to transition to the init domain now
|
// stage init. File systems that store SELabels in their xattrs, such as ext4 do not need an
|
||||||
// that the SELinux policy has been loaded.
|
// explicit restorecon here, but other file systems do. In particular, this is needed for
|
||||||
|
// ramdisks such as the recovery image for A/B devices.
|
||||||
if (selinux_android_restorecon("/system/bin/init", 0) == -1) {
|
if (selinux_android_restorecon("/system/bin/init", 0) == -1) {
|
||||||
PLOG(FATAL) << "restorecon failed of /system/bin/init failed";
|
PLOG(FATAL) << "restorecon failed of /system/bin/init failed";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue