universal7885: sepolicy: Completely merge samsung_slsi repo

This commit is contained in:
roynatech2544 2021-10-23 22:50:46 +09:00
commit f6da6e72c2
No known key found for this signature in database
GPG key ID: 9675C32163D88D30
82 changed files with 852 additions and 872 deletions

View file

@ -0,0 +1,8 @@
# Tag for read only filesystem type
attribute r_fs_type;
# Tag for read/write filesystem type
attribute rw_fs_type;
# Tag for read/execute filesystem type
attribute rx_fs_type;

View file

@ -0,0 +1,4 @@
# domain.te
# Make sure that labels are used correctly
neverallow { domain -vendor_init -ueventd } r_fs_type:file write;

View file

@ -0,0 +1,12 @@
# file.te
### DATA
type zram_data_file, file_type, data_file_type, core_data_file_type;
## SYSFS
type sysfs_gpu_tmu, sysfs_type, rw_fs_type, fs_type;
type sysfs_flashlight, sysfs_type, rw_fs_type, fs_type;
type sysfs_sec_switch, sysfs_type, r_fs_type, fs_type;
type sysfs_battery, sysfs_type, r_fs_type, fs_type;
type sysfs_battery_writable, sysfs_type, rw_fs_type, fs_type;
type sysfs_sec_switch_writable, sysfs_type, rw_fs_type, fs_type;

View file

@ -0,0 +1,4 @@
genfscon sysfs /devices/platform/11500000.mali/tmu u:object_r:sysfs_gpu_tmu:s0
genfscon sysfs /devices/virtual/camera/flash/torch_brightness_lvl u:object_r:sysfs_flashlight:s0
genfscon sysfs /devices/virtual/camera/flash/torch_brightness_lvl_enable u:object_r:sysfs_flashlight:s0

View file

@ -0,0 +1,5 @@
allow init sysfs_gpu_tmu:file { setattr };
allow init sysfs_flashlight:file { setattr };
allow init selinuxfs:file { setattr };
allow init sysfs_sec_switch_writable:file { setattr };
allow init sysfs_battery_writable:file { setattr }; repo):universal7885-common/sepolicy/public/init.te

View file

@ -0,0 +1,2 @@
### RFKILL
type rfkilldisabled_prop, property_type;

View file

@ -0,0 +1,9 @@
allow system_app sysfs_gpu_tmu:file { read open write getattr };
allow system_app sysfs_flashlight:file { read open write getattr };
allow system_app selinuxfs:file rw_file_perms;
allow system_app sysfs_sec_switch:dir { search };
allow system_app sysfs_sec_switch_writable:file rw_file_perms;
allow system_app sysfs_battery_writeable:file rw_file_perms;
allow system_app sysfs_sec_switch_writable:dir { search };
allow system_app sysfs_battery_writeable:dir { search };
allow system_app sysfs_battery:dir { search };

View file

@ -0,0 +1,8 @@
# teegris_use(domain)
#
# Allow domain to use teegris
define(`teegris_use', `
get_prop($1, vendor_tztsdaemon_prop)
# /dev/tzdev
allow $1 tz_user_device:chr_file rw_file_perms;
')