blob: 5ea77a90e7ae5136f0c7aca52ac20519fee5f58a [file] [log] [blame]
William Roberts80ea1d22012-05-31 09:44:51 -04001type sdcardd, domain;
2type sdcardd_exec, exec_type, file_type;
3
4init_daemon_domain(sdcardd)
Stephen Smalley15abc952013-10-29 14:42:39 -04005
6allow sdcardd cgroup:dir create_dir_perms;
7allow sdcardd fuse_device:chr_file rw_file_perms;
8allow sdcardd rootfs:dir mounton;
Nick Kralevichabfd4272014-09-04 11:04:23 -07009allow sdcardd sdcard_type:filesystem { mount unmount };
Stephen Smalley15abc952013-10-29 14:42:39 -040010allow sdcardd self:capability { setuid setgid dac_override sys_admin sys_resource };
Stephen Smalleye13fabd2013-12-17 14:39:35 -050011
Stephen Smalley7b52ebf2014-02-18 09:19:28 -050012allow sdcardd sdcard_type:dir create_dir_perms;
13allow sdcardd sdcard_type:file create_file_perms;
14
Stephen Smalleye13fabd2013-12-17 14:39:35 -050015type_transition sdcardd system_data_file:{ dir file } media_rw_data_file;
16allow sdcardd media_rw_data_file:dir create_dir_perms;
17allow sdcardd media_rw_data_file:file create_file_perms;
Stephen Smalley15abc952013-10-29 14:42:39 -040018
19# Read /data/system/packages.list.
20allow sdcardd system_data_file:file r_file_perms;
Nick Kralevich792d8652014-07-24 17:07:27 -070021
22# Read /data/.layout_version
23allow sdcardd install_data_file:file r_file_perms;