William Roberts | 80ea1d2 | 2012-05-31 09:44:51 -0400 | [diff] [blame] | 1 | type sdcardd, domain; |
| 2 | type sdcardd_exec, exec_type, file_type; |
| 3 | |
| 4 | init_daemon_domain(sdcardd) |
Stephen Smalley | 15abc95 | 2013-10-29 14:42:39 -0400 | [diff] [blame] | 5 | |
| 6 | allow sdcardd cgroup:dir create_dir_perms; |
| 7 | allow sdcardd fuse_device:chr_file rw_file_perms; |
| 8 | allow sdcardd rootfs:dir mounton; |
Nick Kralevich | abfd427 | 2014-09-04 11:04:23 -0700 | [diff] [blame] | 9 | allow sdcardd sdcard_type:filesystem { mount unmount }; |
Stephen Smalley | 15abc95 | 2013-10-29 14:42:39 -0400 | [diff] [blame] | 10 | allow sdcardd self:capability { setuid setgid dac_override sys_admin sys_resource }; |
Stephen Smalley | e13fabd | 2013-12-17 14:39:35 -0500 | [diff] [blame] | 11 | |
Stephen Smalley | 7b52ebf | 2014-02-18 09:19:28 -0500 | [diff] [blame] | 12 | allow sdcardd sdcard_type:dir create_dir_perms; |
| 13 | allow sdcardd sdcard_type:file create_file_perms; |
| 14 | |
Stephen Smalley | e13fabd | 2013-12-17 14:39:35 -0500 | [diff] [blame] | 15 | type_transition sdcardd system_data_file:{ dir file } media_rw_data_file; |
| 16 | allow sdcardd media_rw_data_file:dir create_dir_perms; |
| 17 | allow sdcardd media_rw_data_file:file create_file_perms; |
Stephen Smalley | 15abc95 | 2013-10-29 14:42:39 -0400 | [diff] [blame] | 18 | |
| 19 | # Read /data/system/packages.list. |
| 20 | allow sdcardd system_data_file:file r_file_perms; |
Nick Kralevich | 792d865 | 2014-07-24 17:07:27 -0700 | [diff] [blame] | 21 | |
| 22 | # Read /data/.layout_version |
| 23 | allow sdcardd install_data_file:file r_file_perms; |