Loading init/property_service.cpp +10 −2 Original line number Original line Diff line number Diff line Loading @@ -762,13 +762,21 @@ void CreateSerializedPropertyInfo() { // Don't check for failure here, so we always have a sane list of properties. // Don't check for failure here, so we always have a sane list of properties. // E.g. In case of recovery, the vendor partition will not have mounted and we // E.g. In case of recovery, the vendor partition will not have mounted and we // still need the system / platform properties to function. // still need the system / platform properties to function. LoadPropertyInfoFromFile("/vendor/etc/selinux/nonplat_property_contexts", &property_infos); if (!LoadPropertyInfoFromFile("/vendor/etc/selinux/vendor_property_contexts", &property_infos)) { // Fallback to nonplat_* if vendor_* doesn't exist. LoadPropertyInfoFromFile("/vendor/etc/selinux/nonplat_property_contexts", &property_infos); } } else { } else { if (!LoadPropertyInfoFromFile("/plat_property_contexts", &property_infos)) { if (!LoadPropertyInfoFromFile("/plat_property_contexts", &property_infos)) { return; return; } } if (!LoadPropertyInfoFromFile("/vendor_property_contexts", &property_infos)) { // Fallback to nonplat_* if vendor_* doesn't exist. LoadPropertyInfoFromFile("/nonplat_property_contexts", &property_infos); LoadPropertyInfoFromFile("/nonplat_property_contexts", &property_infos); } } } auto serialized_contexts = std::string(); auto serialized_contexts = std::string(); auto error = std::string(); auto error = std::string(); Loading init/selinux.cpp +4 −0 Original line number Original line Diff line number Diff line Loading @@ -423,12 +423,16 @@ void SelinuxRestoreContext() { selinux_android_restorecon("/vendor_file_contexts", 0); selinux_android_restorecon("/vendor_file_contexts", 0); selinux_android_restorecon("/plat_property_contexts", 0); selinux_android_restorecon("/plat_property_contexts", 0); selinux_android_restorecon("/nonplat_property_contexts", 0); selinux_android_restorecon("/nonplat_property_contexts", 0); selinux_android_restorecon("/vendor_property_contexts", 0); selinux_android_restorecon("/plat_seapp_contexts", 0); selinux_android_restorecon("/plat_seapp_contexts", 0); selinux_android_restorecon("/nonplat_seapp_contexts", 0); selinux_android_restorecon("/nonplat_seapp_contexts", 0); selinux_android_restorecon("/vendor_seapp_contexts", 0); selinux_android_restorecon("/plat_service_contexts", 0); selinux_android_restorecon("/plat_service_contexts", 0); selinux_android_restorecon("/nonplat_service_contexts", 0); selinux_android_restorecon("/nonplat_service_contexts", 0); selinux_android_restorecon("/vendor_service_contexts", 0); selinux_android_restorecon("/plat_hwservice_contexts", 0); selinux_android_restorecon("/plat_hwservice_contexts", 0); selinux_android_restorecon("/nonplat_hwservice_contexts", 0); selinux_android_restorecon("/nonplat_hwservice_contexts", 0); selinux_android_restorecon("/vendor_hwservice_contexts", 0); selinux_android_restorecon("/sepolicy", 0); selinux_android_restorecon("/sepolicy", 0); selinux_android_restorecon("/vndservice_contexts", 0); selinux_android_restorecon("/vndservice_contexts", 0); Loading Loading
init/property_service.cpp +10 −2 Original line number Original line Diff line number Diff line Loading @@ -762,13 +762,21 @@ void CreateSerializedPropertyInfo() { // Don't check for failure here, so we always have a sane list of properties. // Don't check for failure here, so we always have a sane list of properties. // E.g. In case of recovery, the vendor partition will not have mounted and we // E.g. In case of recovery, the vendor partition will not have mounted and we // still need the system / platform properties to function. // still need the system / platform properties to function. LoadPropertyInfoFromFile("/vendor/etc/selinux/nonplat_property_contexts", &property_infos); if (!LoadPropertyInfoFromFile("/vendor/etc/selinux/vendor_property_contexts", &property_infos)) { // Fallback to nonplat_* if vendor_* doesn't exist. LoadPropertyInfoFromFile("/vendor/etc/selinux/nonplat_property_contexts", &property_infos); } } else { } else { if (!LoadPropertyInfoFromFile("/plat_property_contexts", &property_infos)) { if (!LoadPropertyInfoFromFile("/plat_property_contexts", &property_infos)) { return; return; } } if (!LoadPropertyInfoFromFile("/vendor_property_contexts", &property_infos)) { // Fallback to nonplat_* if vendor_* doesn't exist. LoadPropertyInfoFromFile("/nonplat_property_contexts", &property_infos); LoadPropertyInfoFromFile("/nonplat_property_contexts", &property_infos); } } } auto serialized_contexts = std::string(); auto serialized_contexts = std::string(); auto error = std::string(); auto error = std::string(); Loading
init/selinux.cpp +4 −0 Original line number Original line Diff line number Diff line Loading @@ -423,12 +423,16 @@ void SelinuxRestoreContext() { selinux_android_restorecon("/vendor_file_contexts", 0); selinux_android_restorecon("/vendor_file_contexts", 0); selinux_android_restorecon("/plat_property_contexts", 0); selinux_android_restorecon("/plat_property_contexts", 0); selinux_android_restorecon("/nonplat_property_contexts", 0); selinux_android_restorecon("/nonplat_property_contexts", 0); selinux_android_restorecon("/vendor_property_contexts", 0); selinux_android_restorecon("/plat_seapp_contexts", 0); selinux_android_restorecon("/plat_seapp_contexts", 0); selinux_android_restorecon("/nonplat_seapp_contexts", 0); selinux_android_restorecon("/nonplat_seapp_contexts", 0); selinux_android_restorecon("/vendor_seapp_contexts", 0); selinux_android_restorecon("/plat_service_contexts", 0); selinux_android_restorecon("/plat_service_contexts", 0); selinux_android_restorecon("/nonplat_service_contexts", 0); selinux_android_restorecon("/nonplat_service_contexts", 0); selinux_android_restorecon("/vendor_service_contexts", 0); selinux_android_restorecon("/plat_hwservice_contexts", 0); selinux_android_restorecon("/plat_hwservice_contexts", 0); selinux_android_restorecon("/nonplat_hwservice_contexts", 0); selinux_android_restorecon("/nonplat_hwservice_contexts", 0); selinux_android_restorecon("/vendor_hwservice_contexts", 0); selinux_android_restorecon("/sepolicy", 0); selinux_android_restorecon("/sepolicy", 0); selinux_android_restorecon("/vndservice_contexts", 0); selinux_android_restorecon("/vndservice_contexts", 0); Loading