Dennis Shen | 2659257 | 2024-02-25 15:44:51 +0000 | [diff] [blame] | 1 | # aconfigd -- manager for aconfig flags |
| 2 | type aconfigd, domain; |
| 3 | type aconfigd_exec, exec_type, file_type, system_file_type; |
| 4 | |
| 5 | typeattribute aconfigd coredomain; |
| 6 | |
| 7 | init_daemon_domain(aconfigd) |
| 8 | |
| 9 | # only init is allowed to enter the aconfigd domain |
| 10 | neverallow { domain -init } aconfigd:process transition; |
| 11 | neverallow * aconfigd:process dyntransition; |
| 12 | |
| 13 | allow aconfigd metadata_file:dir search; |
| 14 | |
| 15 | allow aconfigd { |
| 16 | aconfig_storage_metadata_file |
| 17 | aconfig_storage_flags_metadata_file |
| 18 | }:dir create_dir_perms; |
| 19 | |
| 20 | allow aconfigd { |
| 21 | aconfig_storage_metadata_file |
| 22 | aconfig_storage_flags_metadata_file |
| 23 | }:file create_file_perms; |
| 24 | |
| 25 | allow aconfigd aconfigd_socket:sock_file rw_file_perms; |
| 26 | |
| 27 | # allow aconfigd to log to the kernel. |
| 28 | allow aconfigd kmsg_device:chr_file w_file_perms; |
Dennis Shen | f008c29 | 2024-02-28 18:08:10 +0000 | [diff] [blame] | 29 | |
| 30 | # allow aconfigd to read system/system_ext/product partition storage files |
| 31 | allow aconfigd system_aconfig_storage_file:file r_file_perms; |
| 32 | allow aconfigd system_aconfig_storage_file:dir r_dir_perms; |
| 33 | |
| 34 | # allow aconfigd to read vendor partition storage files |
| 35 | allow aconfigd vendor_aconfig_storage_file:file r_file_perms; |
| 36 | allow aconfigd vendor_aconfig_storage_file:dir r_dir_perms; |