Paul Crowley | 5b962cf | 2017-10-13 14:54:32 -0700 | [diff] [blame] | 1 | domain_auto_trans(vold, vold_prepare_subdirs_exec, vold_prepare_subdirs) |
Jin Qian | c012533 | 2017-10-19 14:41:37 -0700 | [diff] [blame] | 2 | |
Alan Stokes | fc0cab8 | 2020-02-11 14:43:05 +0000 | [diff] [blame] | 3 | typeattribute vold_prepare_subdirs mlstrustedsubject; |
| 4 | |
Paul Crowley | 5850a2a | 2017-10-25 13:03:24 -0700 | [diff] [blame] | 5 | allow vold_prepare_subdirs system_file:file execute_no_trans; |
| 6 | allow vold_prepare_subdirs shell_exec:file rx_file_perms; |
| 7 | allow vold_prepare_subdirs toolbox_exec:file rx_file_perms; |
| 8 | allow vold_prepare_subdirs devpts:chr_file rw_file_perms; |
| 9 | allow vold_prepare_subdirs vold:fd use; |
| 10 | allow vold_prepare_subdirs vold:fifo_file { read write }; |
| 11 | allow vold_prepare_subdirs file_contexts_file:file r_file_perms; |
Benjamin Gordon | 342362a | 2018-09-06 16:19:40 -0600 | [diff] [blame] | 12 | allow vold_prepare_subdirs self:global_capability_class_set { chown dac_override dac_read_search fowner }; |
Paul Crowley | 5850a2a | 2017-10-25 13:03:24 -0700 | [diff] [blame] | 13 | allow vold_prepare_subdirs self:process setfscreate; |
Jeff Vander Stoep | d25ccab | 2018-02-07 16:29:06 -0800 | [diff] [blame] | 14 | allow vold_prepare_subdirs { |
| 15 | system_data_file |
| 16 | vendor_data_file |
Joel Galenson | 254a872 | 2018-04-16 14:50:38 -0700 | [diff] [blame] | 17 | }:dir { open read write add_name remove_name rmdir relabelfrom }; |
Paul Crowley | 8096639 | 2018-04-26 13:41:13 -0700 | [diff] [blame] | 18 | allow vold_prepare_subdirs { |
Alexander Dorokhine | 0b2553a | 2021-05-26 09:47:19 -0700 | [diff] [blame^] | 19 | apex_appsearch_data_file |
Orion Hodson | 8f75f76 | 2020-10-16 15:29:55 +0100 | [diff] [blame] | 20 | apex_art_data_file |
Oli Lan | 79b4e1a | 2019-11-19 18:10:16 +0000 | [diff] [blame] | 21 | apex_module_data_file |
Hai Zhang | f301cd2 | 2020-01-16 15:47:02 -0800 | [diff] [blame] | 22 | apex_permission_data_file |
Oli Lan | 91ce5b9 | 2019-12-02 18:29:48 +0000 | [diff] [blame] | 23 | apex_rollback_data_file |
Gavin Corkery | cd3bb57 | 2021-02-14 19:54:59 +0000 | [diff] [blame] | 24 | apex_scheduling_data_file |
Roshan Pius | 8f84cc3 | 2020-02-19 06:59:53 -0800 | [diff] [blame] | 25 | apex_wifi_data_file |
Annie Meng | 4c3d11c | 2019-01-15 21:20:13 +0000 | [diff] [blame] | 26 | backup_data_file |
Kevin Chyn | 91c2580 | 2018-11-15 15:28:07 -0800 | [diff] [blame] | 27 | face_vendor_data_file |
Nick Kralevich | 83f25e2 | 2018-11-19 18:42:11 +0000 | [diff] [blame] | 28 | fingerprint_vendor_data_file |
Kevin Chyn | 91c2580 | 2018-11-15 15:28:07 -0800 | [diff] [blame] | 29 | iris_vendor_data_file |
Narayan Kamath | 2ad229c | 2019-01-14 15:02:12 +0000 | [diff] [blame] | 30 | rollback_data_file |
Paul Crowley | 8096639 | 2018-04-26 13:41:13 -0700 | [diff] [blame] | 31 | storaged_data_file |
Alan Stokes | fc0cab8 | 2020-02-11 14:43:05 +0000 | [diff] [blame] | 32 | system_data_file |
Paul Crowley | 8096639 | 2018-04-26 13:41:13 -0700 | [diff] [blame] | 33 | vold_data_file |
| 34 | }:dir { create_dir_perms relabelto }; |
| 35 | allow vold_prepare_subdirs { |
Alexander Dorokhine | 0b2553a | 2021-05-26 09:47:19 -0700 | [diff] [blame^] | 36 | apex_appsearch_data_file |
Orion Hodson | 8f75f76 | 2020-10-16 15:29:55 +0100 | [diff] [blame] | 37 | apex_art_data_file |
| 38 | apex_art_staging_data_file |
Oli Lan | 79b4e1a | 2019-11-19 18:10:16 +0000 | [diff] [blame] | 39 | apex_module_data_file |
Hai Zhang | f301cd2 | 2020-01-16 15:47:02 -0800 | [diff] [blame] | 40 | apex_permission_data_file |
Oli Lan | 91ce5b9 | 2019-12-02 18:29:48 +0000 | [diff] [blame] | 41 | apex_rollback_data_file |
Gavin Corkery | cd3bb57 | 2021-02-14 19:54:59 +0000 | [diff] [blame] | 42 | apex_scheduling_data_file |
Roshan Pius | 8f84cc3 | 2020-02-19 06:59:53 -0800 | [diff] [blame] | 43 | apex_wifi_data_file |
Annie Meng | 4c3d11c | 2019-01-15 21:20:13 +0000 | [diff] [blame] | 44 | backup_data_file |
Kevin Chyn | 91c2580 | 2018-11-15 15:28:07 -0800 | [diff] [blame] | 45 | face_vendor_data_file |
Nick Kralevich | 83f25e2 | 2018-11-19 18:42:11 +0000 | [diff] [blame] | 46 | fingerprint_vendor_data_file |
Kevin Chyn | 91c2580 | 2018-11-15 15:28:07 -0800 | [diff] [blame] | 47 | iris_vendor_data_file |
Narayan Kamath | 2ad229c | 2019-01-14 15:02:12 +0000 | [diff] [blame] | 48 | rollback_data_file |
Paul Crowley | 8096639 | 2018-04-26 13:41:13 -0700 | [diff] [blame] | 49 | storaged_data_file |
| 50 | system_data_file |
| 51 | vold_data_file |
| 52 | }:file { getattr unlink }; |
Oli Lan | 79b4e1a | 2019-11-19 18:10:16 +0000 | [diff] [blame] | 53 | allow vold_prepare_subdirs apex_mnt_dir:dir { open read }; |
Alan Stokes | fc0cab8 | 2020-02-11 14:43:05 +0000 | [diff] [blame] | 54 | allow vold_prepare_subdirs mnt_expand_file:dir search; |
Alan Stokes | 7aa4041 | 2020-12-04 14:07:52 +0000 | [diff] [blame] | 55 | allow vold_prepare_subdirs user_profile_data_file:dir { search getattr relabelfrom }; |
| 56 | allow vold_prepare_subdirs user_profile_root_file:dir { search getattr relabelfrom relabelto }; |
Alan Stokes | fc0cab8 | 2020-02-11 14:43:05 +0000 | [diff] [blame] | 57 | # /data/misc is unlabeled during early boot. |
| 58 | allow vold_prepare_subdirs unlabeled:dir search; |
Joel Galenson | 5d5ac9a | 2019-05-09 10:43:59 -0700 | [diff] [blame] | 59 | |
| 60 | dontaudit vold_prepare_subdirs { proc unlabeled }:file r_file_perms; |