wlc fwupdate implementation

Fix sepolicy problems.

Bug: 183465596
Test: logcat/dmesg grep wlc.
Signed-off-by: Ted Lin <tedlin@google.com>
Change-Id: I834f4d83f822b8189a576ac198bae9a7d77a3e10
This commit is contained in:
Ted Lin 2021-04-01 18:49:53 +08:00 committed by Yuan Tai Lin
parent 1d6ffc2305
commit 69c8212a41
3 changed files with 19 additions and 0 deletions

View file

@ -200,3 +200,6 @@ type uwb_vendor_data_file, file_type, data_file_type, app_data_file_type;
# PixelStats_vendor # PixelStats_vendor
type sysfs_pixelstats, fs_type, sysfs_type; type sysfs_pixelstats, fs_type, sysfs_type;
# WLC FW
type vendor_wlc_fwupdata_file, vendor_file_type, file_type;

View file

@ -664,3 +664,7 @@
# Wifi Firmware config update # Wifi Firmware config update
/data/vendor/firmware/wifi(/.*)? u:object_r:updated_wifi_firmware_data_file:s0 /data/vendor/firmware/wifi(/.*)? u:object_r:updated_wifi_firmware_data_file:s0
# WLC FW update
/vendor/bin/wlc_upt/p9412_mtp u:object_r:vendor_wlc_fwupdata_file:s0
/vendor/bin/wlc_upt/wlc_fw_update\.sh u:object_r:wlcfwupdate_exec:s0

View file

@ -0,0 +1,12 @@
# wlcfwupdate service
type wlcfwupdate, domain;
type wlcfwupdate_exec, vendor_file_type, exec_type, file_type;
init_daemon_domain(wlcfwupdate)
allow wlcfwupdate sysfs_batteryinfo:dir search;
allow wlcfwupdate sysfs_batteryinfo:file r_file_perms;
allow wlcfwupdate sysfs_wlc:dir search;
allow wlcfwupdate sysfs_wlc:file rw_file_perms;
allow wlcfwupdate vendor_toolbox_exec:file execute_no_trans;
allow wlcfwupdate vendor_wlc_fwupdata_file:file execute_no_trans;