From: Andreas Schneider Date: Mon, 16 Mar 2020 17:33:09 +0000 (+0100) Subject: common: Allow kernel to load firmware from /vendor/firmware X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f4755f22b0918cb559ec824aa748f09e5430f434;p=GitHub%2FLineageOS%2Fandroid_device_samsung_slsi_sepolicy.git common: Allow kernel to load firmware from /vendor/firmware Change-Id: I4ec18a2857d1cc3a63aaf4e94904005a0c5fbc41 --- diff --git a/common/vendor/file.te b/common/vendor/file.te index a1c4b23..8983ac0 100644 --- a/common/vendor/file.te +++ b/common/vendor/file.te @@ -9,3 +9,6 @@ type sysfs_wifi, sysfs_type, r_fs_type, fs_type; type sysfs_backlight_writable, sysfs_type, rw_fs_type, fs_type; type sysfs_wifi_writable, sysfs_type, rw_fs_type, fs_type; + +### VENDOR +type vendor_firmware_file, file_type, vendor_file_type; diff --git a/common/vendor/file_contexts b/common/vendor/file_contexts index b9df724..aa29f77 100644 --- a/common/vendor/file_contexts +++ b/common/vendor/file_contexts @@ -10,3 +10,5 @@ /(vendor|system/vendor)/bin/hw/android\.hardware\.vibrator@[0-9].[0-9]-service\.samsung-haptic u:object_r:hal_vibrator_default_exec:s0 /(vendor|system/vendor)/bin/hw/vendor\.samsung_slsi\.hardware\.configstore@[0-9]\.[0-9]-service u:object_r:hal_vendor_configstore_default_exec:s0 /(vendor|system/vendor)/bin/hw/vendor\.samsung_slsi\.hardware\.ExynosHWCServiceTW@[0-9]\.[0-9]-service u:object_r:hal_vendor_hwcservice_default_exec:s0 + +/(vendor|system/vendor)/firmware(/.*)? u:object_r:vendor_firmware_file:s0 diff --git a/common/vendor/kernel.te b/common/vendor/kernel.te new file mode 100644 index 0000000..b016aad --- /dev/null +++ b/common/vendor/kernel.te @@ -0,0 +1,5 @@ +# kernel.te + +# /vendor/firmware/ +allow kernel vendor_firmware_file:dir r_dir_perms; +allow kernel vendor_firmware_file:file r_file_perms;