android_device_xiaomi_sdm66.../sepolicy/vendor/init.te
Jaegeuk Kim 1d9c6314b2 sdm660-common: sepolicy: Allow ioctl to zram_swap for performance
This fixes permission denied when setting F2FS_PIN_FILE.

[   46.726131] init: [libfs_mgr]Failed to set pin_file for f2fs: /data/per_boot/zram_swap: Permission denied
[   46.726151] init: [libfs_mgr]Failure of zram backing device file for '/dev/block/zram0'
[   46.726341] type=1400 audit(1601025878.312:17): avc: denied { ioctl } for comm="init" path="/data/per_boot/zram_swap" dev="dm-9" ino=4868 ioctlcmd=0xf50d scontext=u:r:init:s0 tcontext=u:object_r:per_boot_file:s0 tclass=file permissive=0

Bug: 169311165
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
Change-Id: I982f70556284ac55d659bae6aff93b84d71e67f0
Signed-off-by: pix106 <sbordenave@gmail.com>
2024-01-14 17:18:17 +01:00

33 lines
1 KiB
Text

get_prop(init, exported_default_prop)
allow init adsprpcd_file:file mounton;
allow init apex_metadata_file:lnk_file read;
allow init socket_device:sock_file { unlink setattr create };
allow init sysfs_graphics:file { read open };
allow init sysfs_graphics:lnk_file read;
allow init sysfs_battery_supply:file setattr;
allow init vendor_default_prop:property_service set;
allow init sysfs_info:file { open read };
allow init firmware_file:filesystem { getattr };
allow init bt_firmware_file:filesystem { getattr };
allow init apex_metadata_file:lnk_file { read };
# Vibrator
allow init sysfs_leds:file { rw_file_perms };
allow init sysfs:file { setattr };
allow init debugfs_tracing_debug:dir { mounton };
allow init sysfs_emmc_host:file rw_file_perms;
allow init system_file:file mounton;
allow init {
vendor_configs_file
vendor_framework_file
vendor_app_file
vendor_overlay_file
}:file mounton;
allow init hal_fingerprint_sdm660:process ptrace;
allow init per_boot_file:file ioctl;
allowxperm init per_boot_file:file ioctl { F2FS_IOC_SET_PIN_FILE };