2024-02-25 16:44:51 +01:00
|
|
|
# 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;
|
|
|
|
|
2024-03-19 03:33:00 +01:00
|
|
|
allow aconfigd aconfigd_socket:unix_stream_socket { accept listen getattr read write };
|
2024-02-25 16:44:51 +01:00
|
|
|
allow aconfigd aconfigd_socket:sock_file rw_file_perms;
|
|
|
|
|
2024-03-19 03:33:00 +01:00
|
|
|
# allow aconfigd to access shell_data_file for atest
|
|
|
|
userdebug_or_eng(`
|
|
|
|
allow aconfigd shell_data_file:dir search;
|
2024-03-21 19:58:11 +01:00
|
|
|
allow aconfigd shell_data_file:file { getattr read open map };
|
2024-03-19 03:33:00 +01:00
|
|
|
')
|
|
|
|
|
2024-02-25 16:44:51 +01:00
|
|
|
# allow aconfigd to log to the kernel.
|
|
|
|
allow aconfigd kmsg_device:chr_file w_file_perms;
|
2024-02-28 19:08:10 +01:00
|
|
|
|
|
|
|
# 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;
|
2024-05-17 19:24:20 +02:00
|
|
|
|
|
|
|
# allow aconfigd to read /apex dir
|
|
|
|
allow aconfigd apex_mnt_dir:dir r_dir_perms;
|
|
|
|
allow aconfigd apex_mnt_dir:file r_file_perms;
|