common: Add argosd
authorAndreas Schneider <asn@cryptomilk.org>
Wed, 8 Apr 2020 17:10:44 +0000 (19:10 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 8 Apr 2020 17:10:44 +0000 (19:10 +0200)
Change-Id: Ie4d2e98d6ef26e276091d05f9c67cab2d2a7be93

common/vendor/argosd.te [new file with mode: 0644]
common/vendor/device.te
common/vendor/file.te
common/vendor/file_contexts
common/vendor/genfs_contexts

diff --git a/common/vendor/argosd.te b/common/vendor/argosd.te
new file mode 100644 (file)
index 0000000..3edf5c5
--- /dev/null
@@ -0,0 +1,25 @@
+# argosd.te
+
+type argosd, domain;
+type argosd_exec, exec_type, vendor_file_type, file_type;
+
+# argosd is started by init, type transit from init domain to gpsd domain
+init_daemon_domain(argosd)
+
+# /dev/network_throughput
+allow argosd radio_qos_device:chr_file rw_file_perms;
+
+# /proc/net/dev
+allow argosd proc_net:file r_file_perms;
+
+# /sys/
+allow argosd sysfs:dir r_dir_perms;
+
+# /sys/devices/platform/argos
+# /sys/firmware/devicetree/base/argos
+allow argosd sysfs_argos:dir r_dir_perms;
+allow argosd sysfs_argos:file r_file_perms;
+
+# /sys/class/scsi_host/host0
+allow argosd sysfs_scsi_host_writable:dir r_dir_perms;
+allow argosd sysfs_scsi_host_writable:file r_file_perms;
index f3bcba9451008dad5ea711e722573fe25c74a077..3ba5a9f16551258ebd4cb0b76660eeb56eca978f 100644 (file)
@@ -12,5 +12,6 @@ type bbd_device, dev_type;
 type drb_device, dev_type;
 type fp_sensor_device, dev_type;
 type io_device, dev_type;
+type radio_qos_device, dev_type;
 type ssp_device, dev_type;
 type vendor_radio_device, dev_type;
index 3734c4f972a0b0c4154d84c6147e3c3a0568b1a7..c67ca6d90ee8fff3d908bc16baa59493bed4ecc5 100644 (file)
@@ -21,6 +21,7 @@ type tee_efs_file, file_type;
 type wifi_efs_file, file_type;
 
 ### SYSFS
+type sysfs_argos, sysfs_type, r_fs_type, fs_type;
 type sysfs_battery, sysfs_type, r_fs_type, fs_type;
 type sysfs_fingerprint, sysfs_type, r_fs_type, fs_type;
 type sysfs_iio, sysfs_type, r_fs_type, fs_type;
@@ -38,6 +39,7 @@ type sysfs_battery_writable, sysfs_type, rw_fs_type, fs_type;
 type sysfs_gps_writable, sysfs_type, rw_fs_type, fs_type;
 type sysfs_lcd_writable, sysfs_type, rw_fs_type, fs_type;
 type sysfs_power_writable, sysfs_type, rw_fs_type, fs_type;
+type sysfs_scsi_host_writable, sysfs_type, rw_fs_type, fs_type;
 type sysfs_sensorhub_writable, sysfs_type, rw_fs_type, fs_type;
 type sysfs_sensors_writable, sysfs_type, rw_fs_type, fs_type;
 type sysfs_sim_writable, sysfs_type, rw_fs_type, fs_type;
index d1b39215fc9997fd904cced2fa74bb28675e4e9d..234d9468037695a17b99dae0921b29bf08a4ffb5 100644 (file)
@@ -37,6 +37,9 @@
 /dev/bbd_urgent_patch                        u:object_r:bbd_device:s0
 /dev/ttyBCM[0-9]*                            u:object_r:bbd_device:s0
 
+### qos
+/dev/network_throughput                      u:object_r:radio_qos_device:s0
+
 ### radio
 # DRB
 /dev/drb                                     u:object_r:drb_device:s0
index d17cb2a51984666152551993e2d6b1db8f11e746..c339ab00a5c6d2aa566d8666956200648a1cfa91 100644 (file)
@@ -15,6 +15,7 @@ genfscon sysfs /class/sensors                                             u:obje
 genfscon sysfs /class/timed_output/vibrator/intensity                     u:object_r:sysfs_vibrator:s0
 genfscon sysfs /class/timed_output/vibrator/multi_freq                    u:object_r:sysfs_vibrator:s0
 
+genfscon sysfs /devices/platform/argos                                    u:object_r:sysfs_argos:s0
 genfscon sysfs /devices/platform/battery/power_supply                     u:object_r:sysfs_battery:s0
 genfscon sysfs /devices/platform/battery/power_supply/battery/lcd         u:object_r:sysfs_battery_writable:s0
 genfscon sysfs /devices/platform/panel@0/backlight/panel/brightness       u:object_r:sysfs_backlight_writable:s0