blob: 8a689a1133d4398f3d3c362b4f069dff2539f3c3 [file] [log] [blame]
Jeff Sharkeyf063f462015-03-27 11:25:39 -07001# sgdisk called from vold
2type sgdisk, domain;
3type sgdisk_exec, exec_type, file_type;
4
5# Allowed to read/write low-level partition tables
6allow sgdisk block_device:dir search;
7allow sgdisk vold_device:blk_file rw_file_perms;
8
Jeff Sharkey81888302015-03-31 18:10:19 -07009# Inherit and use pty created by android_fork_execvp()
10allow sgdisk devpts:chr_file { read write ioctl getattr };
11
Jeff Sharkeyf063f462015-03-27 11:25:39 -070012# Allow stdin/out back to vold
13allow sgdisk vold:fd use;
14allow sgdisk vold:fifo_file { read write getattr };
15
Jeff Sharkey81888302015-03-31 18:10:19 -070016# Used to probe kernel to reload partition tables
17allow sgdisk self:capability sys_admin;
18
Jeff Sharkeyf063f462015-03-27 11:25:39 -070019# Only allow entry from vold
20neverallow { domain -vold } sgdisk:process transition;
21neverallow domain sgdisk:process dyntransition;
22neverallow sgdisk { file_type fs_type -sgdisk_exec }:file entrypoint;