blob: 15b6a85eb87c7849629cda2efa90744adcad75d6 [file] [log] [blame]
Jeff Sharkeyf063f462015-03-27 11:25:39 -07001# blkid called from vold
2type blkid, domain;
3type blkid_exec, exec_type, file_type;
4
Jeff Sharkey84e1c612015-04-01 10:15:51 -07005# Allowed read-only access to encrypted devices to extract UUID/label
Jeff Sharkeyf063f462015-03-27 11:25:39 -07006allow blkid block_device:dir search;
Jeff Sharkey84e1c612015-04-01 10:15:51 -07007allow blkid userdata_block_device:blk_file r_file_perms;
8allow blkid dm_device:blk_file r_file_perms;
Jeff Sharkeyf063f462015-03-27 11:25:39 -07009
10# Allow stdin/out back to vold
11allow blkid vold:fd use;
12allow blkid vold:fifo_file { read write getattr };
13
Jeff Sharkey84e1c612015-04-01 10:15:51 -070014# For blkid launched through popen()
15allow blkid blkid_exec:file rx_file_perms;
16
Jeff Sharkeyf063f462015-03-27 11:25:39 -070017# Only allow entry from vold
18neverallow { domain -vold } blkid:process transition;
19neverallow domain blkid:process dyntransition;
Jeff Sharkey84e1c612015-04-01 10:15:51 -070020neverallow blkid { file_type fs_type -blkid_exec -shell_exec }:file entrypoint;