diff options
author | Michael Bestas <mkbestas@lineageos.org> | 2022-10-24 22:57:43 +0300 |
---|---|---|
committer | alk3pInjection <webmaster@raspii.tech> | 2023-06-13 00:20:25 +0800 |
commit | 035cda6cc762f1e0107a34e08dbb9ec5bc689497 (patch) | |
tree | c3c62f0e7aa0240000fb48cc8effbac5a09f721e | |
parent | d35bce436c703b941391e3e4b8c66bd7e8567261 (diff) |
sepolicy_vndr: legacy: Allow init write to discard_max_bytes
system/core/rootdir/init.rc
1110: write /dev/sys/block/by-name/userdata/queue/discard_max_bytes 134217728
1111: write /dev/sys/block/by-name/rootdisk/queue/discard_max_bytes 134217728
Fixes: avc: denied { write } for comm="init" name="discard_max_bytes"
dev="sysfs" ino=55527 scontext=u:r:init:s0
tcontext=u:object_r:sysfs:s0 tclass=file permissive=0
Change-Id: I9db0cde703a2922171a96d8d99570741f487a3db
-rw-r--r-- | legacy/vendor/common/init.te | 2 | ||||
-rw-r--r-- | legacy/vendor/sdm845/file_contexts | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/legacy/vendor/common/init.te b/legacy/vendor/common/init.te index b8255503..73a9d0eb 100644 --- a/legacy/vendor/common/init.te +++ b/legacy/vendor/common/init.te @@ -87,3 +87,5 @@ allow init { #Blocked by neverallow vendor_init { file_type fs_type -init_exec }:file entrypoint; #domain_trans(init, vendor_init_exec, vendor_init); allow init mnt_vendor_file:lnk_file r_file_perms; + +allow init sysfs_mmc_host:file w_file_perms; diff --git a/legacy/vendor/sdm845/file_contexts b/legacy/vendor/sdm845/file_contexts index 976d033f..60284668 100644 --- a/legacy/vendor/sdm845/file_contexts +++ b/legacy/vendor/sdm845/file_contexts @@ -101,3 +101,5 @@ /vendor/lib(64)?/hw/gralloc\.sdm845\.so u:object_r:same_process_hal_file:s0 /vendor/lib(64)?/hw/vulkan\.sdm845\.so u:object_r:same_process_hal_file:s0 /(vendor|system/vendor)/bin/sscrpcd u:object_r:sensors_exec:s0 + +/sys/devices/platform/soc/1d84000.ufshc/host0/target0:0:0/0:0:0:0/block/sda/queue/discard_max_bytes u:object_r:sysfs_mmc_host:s0 |