sepolicy: make exec_types in /vendor a subset of vendor_file_type

We install all default hal implementations in /vendor/bin/hw along with
a few domains that are defined in vendor policy and installed in
/vendor. These files MUST be a subset of the global 'vendor_file_type'
which is used to address *all files installed in /vendor* throughout the
policy.

Bug: 36463595
Test: Boot sailfish without any new denials

Change-Id: I3d26778f9a26f9095f49d8ecc12f2ec9d2f4cb41
Signed-off-by: Sandeep Patil <sspatil@google.com>
This commit is contained in:
Sandeep Patil 2017-04-10 13:03:28 -07:00
parent c051300e5e
commit 2ee66e7d14
33 changed files with 33 additions and 33 deletions

View file

@ -1,6 +1,6 @@
# mediacodec - audio and video codecs live here # mediacodec - audio and video codecs live here
type mediacodec, domain; type mediacodec, domain;
type mediacodec_exec, exec_type, file_type; type mediacodec_exec, exec_type, vendor_file_type, file_type;
typeattribute mediacodec mlstrustedsubject; typeattribute mediacodec mlstrustedsubject;

View file

@ -1,7 +1,7 @@
type hal_audio_default, domain; type hal_audio_default, domain;
hal_server_domain(hal_audio_default, hal_audio) hal_server_domain(hal_audio_default, hal_audio)
type hal_audio_default_exec, exec_type, file_type; type hal_audio_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_audio_default) init_daemon_domain(hal_audio_default)
hal_client_domain(hal_audio_default, hal_allocator) hal_client_domain(hal_audio_default, hal_allocator)

View file

@ -1,5 +1,5 @@
type hal_bluetooth_default, domain; type hal_bluetooth_default, domain;
hal_server_domain(hal_bluetooth_default, hal_bluetooth) hal_server_domain(hal_bluetooth_default, hal_bluetooth)
type hal_bluetooth_default_exec, exec_type, file_type; type hal_bluetooth_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_bluetooth_default) init_daemon_domain(hal_bluetooth_default)

View file

@ -2,5 +2,5 @@
type hal_bootctl_default, domain; type hal_bootctl_default, domain;
hal_server_domain(hal_bootctl_default, hal_bootctl) hal_server_domain(hal_bootctl_default, hal_bootctl)
type hal_bootctl_default_exec, exec_type, file_type; type hal_bootctl_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_bootctl_default) init_daemon_domain(hal_bootctl_default)

View file

@ -1,7 +1,7 @@
type hal_camera_default, domain; type hal_camera_default, domain;
hal_server_domain(hal_camera_default, hal_camera) hal_server_domain(hal_camera_default, hal_camera)
type hal_camera_default_exec, exec_type, file_type; type hal_camera_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_camera_default) init_daemon_domain(hal_camera_default)
# TODO (b/36601397) move hal_camera's data file to # TODO (b/36601397) move hal_camera's data file to

View file

@ -1,5 +1,5 @@
type hal_configstore_default, domain; type hal_configstore_default, domain;
hal_server_domain(hal_configstore_default, hal_configstore) hal_server_domain(hal_configstore_default, hal_configstore)
type hal_configstore_default_exec, exec_type, file_type; type hal_configstore_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_configstore_default) init_daemon_domain(hal_configstore_default)

View file

@ -1,5 +1,5 @@
type hal_contexthub_default, domain; type hal_contexthub_default, domain;
hal_server_domain(hal_contexthub_default, hal_contexthub) hal_server_domain(hal_contexthub_default, hal_contexthub)
type hal_contexthub_default_exec, exec_type, file_type; type hal_contexthub_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_contexthub_default) init_daemon_domain(hal_contexthub_default)

View file

@ -1,7 +1,7 @@
type hal_drm_default, domain; type hal_drm_default, domain;
hal_server_domain(hal_drm_default, hal_drm) hal_server_domain(hal_drm_default, hal_drm)
type hal_drm_default_exec, exec_type, file_type; type hal_drm_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_drm_default) init_daemon_domain(hal_drm_default)
allow hal_drm_default mediacodec:fd use; allow hal_drm_default mediacodec:fd use;

View file

@ -1,5 +1,5 @@
type hal_dumpstate_default, domain; type hal_dumpstate_default, domain;
hal_server_domain(hal_dumpstate_default, hal_dumpstate) hal_server_domain(hal_dumpstate_default, hal_dumpstate)
type hal_dumpstate_default_exec, exec_type, file_type; type hal_dumpstate_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_dumpstate_default) init_daemon_domain(hal_dumpstate_default)

View file

@ -1,7 +1,7 @@
type hal_fingerprint_default, domain; type hal_fingerprint_default, domain;
hal_server_domain(hal_fingerprint_default, hal_fingerprint) hal_server_domain(hal_fingerprint_default, hal_fingerprint)
type hal_fingerprint_default_exec, exec_type, file_type; type hal_fingerprint_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_fingerprint_default) init_daemon_domain(hal_fingerprint_default)
# TODO (b/36644492) move hal_fingerprint's data file to # TODO (b/36644492) move hal_fingerprint's data file to

View file

@ -1,5 +1,5 @@
type hal_gatekeeper_default, domain; type hal_gatekeeper_default, domain;
hal_server_domain(hal_gatekeeper_default, hal_gatekeeper) hal_server_domain(hal_gatekeeper_default, hal_gatekeeper)
type hal_gatekeeper_default_exec, exec_type, file_type; type hal_gatekeeper_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_gatekeeper_default); init_daemon_domain(hal_gatekeeper_default);

View file

@ -1,7 +1,7 @@
type hal_gnss_default, domain; type hal_gnss_default, domain;
hal_server_domain(hal_gnss_default, hal_gnss) hal_server_domain(hal_gnss_default, hal_gnss)
type hal_gnss_default_exec, exec_type, file_type; type hal_gnss_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_gnss_default) init_daemon_domain(hal_gnss_default)
# Read access to system files for HALs in # Read access to system files for HALs in

View file

@ -1,5 +1,5 @@
type hal_graphics_allocator_default, domain; type hal_graphics_allocator_default, domain;
hal_server_domain(hal_graphics_allocator_default, hal_graphics_allocator) hal_server_domain(hal_graphics_allocator_default, hal_graphics_allocator)
type hal_graphics_allocator_default_exec, exec_type, file_type; type hal_graphics_allocator_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_graphics_allocator_default) init_daemon_domain(hal_graphics_allocator_default)

View file

@ -1,5 +1,5 @@
type hal_graphics_composer_default, domain; type hal_graphics_composer_default, domain;
hal_server_domain(hal_graphics_composer_default, hal_graphics_composer) hal_server_domain(hal_graphics_composer_default, hal_graphics_composer)
type hal_graphics_composer_default_exec, exec_type, file_type; type hal_graphics_composer_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_graphics_composer_default) init_daemon_domain(hal_graphics_composer_default)

View file

@ -2,5 +2,5 @@
type hal_health_default, domain; type hal_health_default, domain;
hal_server_domain(hal_health_default, hal_health) hal_server_domain(hal_health_default, hal_health)
type hal_health_default_exec, exec_type, file_type; type hal_health_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_health_default) init_daemon_domain(hal_health_default)

View file

@ -1,5 +1,5 @@
type hal_ir_default, domain; type hal_ir_default, domain;
hal_server_domain(hal_ir_default, hal_ir) hal_server_domain(hal_ir_default, hal_ir)
type hal_ir_default_exec, exec_type, file_type; type hal_ir_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_ir_default) init_daemon_domain(hal_ir_default)

View file

@ -1,5 +1,5 @@
type hal_keymaster_default, domain; type hal_keymaster_default, domain;
hal_server_domain(hal_keymaster_default, hal_keymaster) hal_server_domain(hal_keymaster_default, hal_keymaster)
type hal_keymaster_default_exec, exec_type, file_type; type hal_keymaster_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_keymaster_default) init_daemon_domain(hal_keymaster_default)

View file

@ -1,5 +1,5 @@
type hal_light_default, domain; type hal_light_default, domain;
hal_server_domain(hal_light_default, hal_light) hal_server_domain(hal_light_default, hal_light)
type hal_light_default_exec, exec_type, file_type; type hal_light_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_light_default) init_daemon_domain(hal_light_default)

View file

@ -1,5 +1,5 @@
type hal_memtrack_default, domain; type hal_memtrack_default, domain;
hal_server_domain(hal_memtrack_default, hal_memtrack) hal_server_domain(hal_memtrack_default, hal_memtrack)
type hal_memtrack_default_exec, exec_type, file_type; type hal_memtrack_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_memtrack_default) init_daemon_domain(hal_memtrack_default)

View file

@ -1,7 +1,7 @@
type hal_nfc_default, domain; type hal_nfc_default, domain;
hal_server_domain(hal_nfc_default, hal_nfc) hal_server_domain(hal_nfc_default, hal_nfc)
type hal_nfc_default_exec, exec_type, file_type; type hal_nfc_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_nfc_default) init_daemon_domain(hal_nfc_default)
# TODO (b/36645109) Remove hal_nfc's access to the nfc app's # TODO (b/36645109) Remove hal_nfc's access to the nfc app's

View file

@ -1,5 +1,5 @@
type hal_power_default, domain; type hal_power_default, domain;
hal_server_domain(hal_power_default, hal_power) hal_server_domain(hal_power_default, hal_power)
type hal_power_default_exec, exec_type, file_type; type hal_power_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_power_default) init_daemon_domain(hal_power_default)

View file

@ -1,5 +1,5 @@
type hal_sensors_default, domain; type hal_sensors_default, domain;
hal_server_domain(hal_sensors_default, hal_sensors) hal_server_domain(hal_sensors_default, hal_sensors)
type hal_sensors_default_exec, exec_type, file_type; type hal_sensors_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_sensors_default) init_daemon_domain(hal_sensors_default)

View file

@ -1,5 +1,5 @@
type hal_thermal_default, domain; type hal_thermal_default, domain;
hal_server_domain(hal_thermal_default, hal_thermal) hal_server_domain(hal_thermal_default, hal_thermal)
type hal_thermal_default_exec, exec_type, file_type; type hal_thermal_default_exec, exec_type, vendor_file_type, vendor_file_type, file_type;
init_daemon_domain(hal_thermal_default) init_daemon_domain(hal_thermal_default)

View file

@ -1,6 +1,6 @@
type hal_tv_input_default, domain; type hal_tv_input_default, domain;
hal_server_domain(hal_tv_input_default, hal_tv_input) hal_server_domain(hal_tv_input_default, hal_tv_input)
type hal_tv_input_default_exec, exec_type, file_type; type hal_tv_input_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_tv_input_default) init_daemon_domain(hal_tv_input_default)

View file

@ -1,5 +1,5 @@
type hal_usb_default, domain; type hal_usb_default, domain;
hal_server_domain(hal_usb_default, hal_usb) hal_server_domain(hal_usb_default, hal_usb)
type hal_usb_default_exec, exec_type, file_type; type hal_usb_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_usb_default) init_daemon_domain(hal_usb_default)

View file

@ -1,5 +1,5 @@
type hal_vibrator_default, domain; type hal_vibrator_default, domain;
hal_server_domain(hal_vibrator_default, hal_vibrator) hal_server_domain(hal_vibrator_default, hal_vibrator)
type hal_vibrator_default_exec, exec_type, file_type; type hal_vibrator_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_vibrator_default) init_daemon_domain(hal_vibrator_default)

View file

@ -1,5 +1,5 @@
type hal_vr_default, domain; type hal_vr_default, domain;
hal_server_domain(hal_vr_default, hal_vr) hal_server_domain(hal_vr_default, hal_vr)
type hal_vr_default_exec, exec_type, file_type; type hal_vr_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_vr_default) init_daemon_domain(hal_vr_default)

View file

@ -1,5 +1,5 @@
type hal_wifi_default, domain; type hal_wifi_default, domain;
hal_server_domain(hal_wifi_default, hal_wifi) hal_server_domain(hal_wifi_default, hal_wifi)
type hal_wifi_default_exec, exec_type, file_type; type hal_wifi_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_wifi_default) init_daemon_domain(hal_wifi_default)

View file

@ -1,7 +1,7 @@
# wpa supplicant or equivalent # wpa supplicant or equivalent
type hal_wifi_supplicant_default, domain; type hal_wifi_supplicant_default, domain;
hal_server_domain(hal_wifi_supplicant_default, hal_wifi_supplicant) hal_server_domain(hal_wifi_supplicant_default, hal_wifi_supplicant)
type hal_wifi_supplicant_default_exec, exec_type, file_type; type hal_wifi_supplicant_default_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hal_wifi_supplicant_default) init_daemon_domain(hal_wifi_supplicant_default)
net_domain(hal_wifi_supplicant_default) net_domain(hal_wifi_supplicant_default)

2
vendor/hostapd.te vendored
View file

@ -1,6 +1,6 @@
# userspace wifi access points # userspace wifi access points
type hostapd, domain; type hostapd, domain;
type hostapd_exec, exec_type, file_type; type hostapd_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(hostapd) init_daemon_domain(hostapd)

2
vendor/rild.te vendored
View file

@ -1,6 +1,6 @@
# type_transition must be private policy the domain_trans rules could stay # type_transition must be private policy the domain_trans rules could stay
# public, but conceptually should go with this # public, but conceptually should go with this
type rild_exec, exec_type, file_type; type rild_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(rild) init_daemon_domain(rild)
# TODO(b/36613472), TODO(b/36718031): Remove this once rild no longer # TODO(b/36613472), TODO(b/36718031): Remove this once rild no longer

2
vendor/tee.te vendored
View file

@ -3,7 +3,7 @@
# #
typeattribute tee domain_deprecated; typeattribute tee domain_deprecated;
type tee_exec, exec_type, file_type; type tee_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(tee) init_daemon_domain(tee)
allow tee self:capability { dac_override }; allow tee self:capability { dac_override };

View file

@ -1,5 +1,5 @@
# vndservicemanager - the Binder context manager for vendor processes # vndservicemanager - the Binder context manager for vendor processes
type vndservicemanager_exec, exec_type, file_type; type vndservicemanager_exec, exec_type, vendor_file_type, file_type;
init_daemon_domain(vndservicemanager); init_daemon_domain(vndservicemanager);