Skip to content

Commit ecd9db4

Browse files
brvn0danielml3
authored andcommitted
sweet: sepolicy: fix neverallows
vendor_init.te: set_prop -> get_prop because the init_service_status_prop is a system_restricted_prop which can only be written by /system (and not vendor_init) property.te: specify the property types to vendor_internal_prop because the default property_type is a system_internal_prop (it would trigger a neverallow because vendor accesses them) mi_thermald.te: just move the type definition to property.te Signed-off-by: brvn0 <me@brvn0.de>
1 parent ad81c4f commit ecd9db4

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

BoardConfig.mk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,6 @@ BOARD_VENDOR_SEPOLICY_DIRS += device/qcom/sepolicy_vndr/generic/vendor/msmsteppe
115115
BOARD_VENDOR_SEPOLICY_DIRS += device/qcom/sepolicy_vndr/qva/vendor/msmsteppe
116116
include device/qcom/sepolicy_vndr/SEPolicy.mk
117117

118-
SELINUX_IGNORE_NEVERALLOWS := true
119-
120118
# VINTF
121119
DEVICE_MANIFEST_FILE := $(DEVICE_PATH)/configs/vintf/manifest.xml
122120
DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := $(DEVICE_PATH)/configs/vintf/compatibility_matrix.xml

sepolicy/vendor/mi_thermald.te

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
type mi_thermald, domain;
22
type mi_thermald_exec, exec_type, vendor_file_type, file_type;
33

4-
type vendor_thermal_normal_prop, property_type;
54
type thermal_data_file, data_file_type, file_type;
65

76
init_daemon_domain(mi_thermald)

sepolicy/vendor/property.te

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# Power
2-
type vendor_power_prop, property_type;
2+
vendor_internal_prop(vendor_power_prop);
3+
4+
# Thermal
5+
vendor_internal_prop(vendor_thermal_normal_prop);

sepolicy/vendor/vendor_init.te

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
allow vendor_init persist_file:lnk_file read;
22
set_prop(vendor_init, vendor_power_prop)
3-
set_prop(vendor_init, init_service_status_prop)
3+
get_prop(vendor_init, init_service_status_prop)

0 commit comments

Comments
 (0)