platform_system_sepolicy/private/aconfigd.te
Dennis Shen f6106361f1 selinux: allow aconfig to read /aepx
Bug: b/312444587
Test: m and avd
Change-Id: I6ac81dd211ad7669952f97f9541c44e14680bec6
2024-05-20 00:44:56 +00:00

43 lines
1.3 KiB
Text

# aconfigd -- manager for aconfig flags
type aconfigd, domain;
type aconfigd_exec, exec_type, file_type, system_file_type;
typeattribute aconfigd coredomain;
init_daemon_domain(aconfigd)
# only init is allowed to enter the aconfigd domain
neverallow { domain -init } aconfigd:process transition;
neverallow * aconfigd:process dyntransition;
allow aconfigd metadata_file:dir search;
allow aconfigd {
aconfig_storage_metadata_file
aconfig_storage_flags_metadata_file
}:dir create_dir_perms;
allow aconfigd {
aconfig_storage_metadata_file
aconfig_storage_flags_metadata_file
}:file create_file_perms;
allow aconfigd aconfigd_socket:unix_stream_socket { accept listen getattr read write };
allow aconfigd aconfigd_socket:sock_file rw_file_perms;
# allow aconfigd to access shell_data_file for atest
userdebug_or_eng(`
allow aconfigd shell_data_file:dir search;
allow aconfigd shell_data_file:file { getattr read open map };
')
# allow aconfigd to log to the kernel.
allow aconfigd kmsg_device:chr_file w_file_perms;
# allow aconfigd to read vendor partition storage files
allow aconfigd vendor_aconfig_storage_file:file r_file_perms;
allow aconfigd vendor_aconfig_storage_file:dir r_dir_perms;
# allow aconfigd to read /apex dir
allow aconfigd apex_mnt_dir:dir r_dir_perms;
allow aconfigd apex_mnt_dir:file r_file_perms;