blob: de0fde48a34f3271d3ad1dd8106346a7ae8421b7 [file] [log] [blame]
Alex Klyubinf5446eb2017-03-23 14:27:32 -07001typeattribute vold coredomain;
2
dcashmancc39f632016-07-22 13:13:11 -07003init_daemon_domain(vold)
4
5# Switch to more restrictive domains when executing common tools
6domain_auto_trans(vold, sgdisk_exec, sgdisk);
7domain_auto_trans(vold, sdcardd_exec, sdcardd);
8
9# For a handful of probing tools, we choose an even more restrictive
10# domain when working with untrusted block devices
Paul Crowleyf9f75392018-11-30 15:58:26 -080011domain_trans(vold, blkid_exec, blkid);
12domain_trans(vold, blkid_exec, blkid_untrusted);
dcashmancc39f632016-07-22 13:13:11 -070013domain_trans(vold, fsck_exec, fsck);
14domain_trans(vold, fsck_exec, fsck_untrusted);
15
16# Newly created storage dirs are always treated as mount stubs to prevent us
17# from accidentally writing when the mount point isn't present.
18type_transition vold storage_file:dir storage_stub_file;
19type_transition vold mnt_media_rw_file:dir mnt_media_rw_stub_file;
Inseob Kim55e5c9b2020-03-04 17:20:35 +090020
21# Property Service
Inseob Kim3f5a7d22020-04-06 20:49:17 +090022get_prop(vold, vold_config_prop)
Martijn Coenen01234d32020-04-10 14:11:49 +020023get_prop(vold, storage_config_prop);
Songchun Fan9fdcbcd2020-04-28 13:24:54 -070024get_prop(vold, incremental_prop);
Inseob Kim3f5a7d22020-04-06 20:49:17 +090025
Eric Biggers040ce192021-04-22 16:09:56 -070026set_prop(vold, vold_post_fs_data_prop)
Inseob Kim55e5c9b2020-03-04 17:20:35 +090027set_prop(vold, vold_prop)
Inseob Kim3f5a7d22020-04-06 20:49:17 +090028set_prop(vold, vold_status_prop)
Inseob Kim55e5c9b2020-03-04 17:20:35 +090029set_prop(vold, powerctl_prop)
30set_prop(vold, ctl_fuse_prop)
31set_prop(vold, restorecon_prop)
32set_prop(vold, ota_prop)
33set_prop(vold, boottime_prop)
Inseob Kim42c7d892020-03-04 17:20:35 +090034set_prop(vold, boottime_public_prop)
Janis Danisevskis32d77382020-07-31 22:22:49 -070035
36# Vold will use Keystore instead of using Keymint directly. But it still needs
37# to manage its Keymint blobs. This is why it needs the `manage_blob` permission.
38allow vold vold_key:keystore2_key {
Satya Tangirala06533742021-03-08 09:48:42 -080039 convert_storage_key_to_ephemeral
Janis Danisevskis32d77382020-07-31 22:22:49 -070040 delete
41 get_info
Janis Danisevskis32d77382020-07-31 22:22:49 -070042 manage_blob
43 rebind
44 req_forced_op
45 update
46 use
47};
Xin Li11da9e62020-08-29 01:45:24 -070048
Satya Tangiralaa9990042021-03-01 02:53:46 -080049# vold needs to call keystore methods
50allow vold keystore:binder call;
51
Satya Tangirala5ef86862021-03-11 03:57:03 -080052# vold needs to find keystore2 services
Satya Tangiralaa9990042021-03-01 02:53:46 -080053allow vold keystore_service:service_manager find;
Satya Tangirala5ef86862021-03-11 03:57:03 -080054allow vold keystore_maintenance_service:service_manager find;
55
Paul Crowleybf29c3a2021-08-06 15:11:53 -070056# vold needs to be able to call earlyBootEnded() and deleteAllKeys()
Satya Tangirala5ef86862021-03-11 03:57:03 -080057allow vold keystore:keystore2 early_boot_ended;
Paul Crowleybf29c3a2021-08-06 15:11:53 -070058allow vold keystore:keystore2 delete_all_keys;
Satya Tangirala5ef86862021-03-11 03:57:03 -080059
Yo Chiangffe786e2020-10-07 13:59:52 +080060neverallow {
61 domain
62 -system_server
63 -vdc
64 -vold
65 -update_verifier
66 -apexd
67 -gsid
68} vold_service:service_manager find;