blob: eb983522c481fb0803675ccabe8dcb2a8716de01 [file] [log] [blame]
William Roberts80ea1d22012-05-31 09:44:51 -04001type sdcardd, domain;
Nick Kralevich623975f2014-01-11 01:31:03 -08002permissive_or_unconfined(sdcardd)
William Roberts80ea1d22012-05-31 09:44:51 -04003type sdcardd_exec, exec_type, file_type;
4
5init_daemon_domain(sdcardd)
Stephen Smalley15abc952013-10-29 14:42:39 -04006
7allow sdcardd cgroup:dir create_dir_perms;
8allow sdcardd fuse_device:chr_file rw_file_perms;
9allow sdcardd rootfs:dir mounton;
10allow sdcardd sdcard_type:filesystem mount;
11allow sdcardd self:capability { setuid setgid dac_override sys_admin sys_resource };
Stephen Smalleye13fabd2013-12-17 14:39:35 -050012
13type_transition sdcardd system_data_file:{ dir file } media_rw_data_file;
14allow sdcardd media_rw_data_file:dir create_dir_perms;
15allow sdcardd media_rw_data_file:file create_file_perms;
Stephen Smalley15abc952013-10-29 14:42:39 -040016
17# Read /data/system/packages.list.
18allow sdcardd system_data_file:file r_file_perms;
19
20# Compatibility for existing devices with /data/media in system_data_file.
21# TODO: Remove these lines after we have guaranteed that /data/media has been relabeled to media_rw_data_file.
22allow sdcardd system_data_file:dir create_dir_perms;
23allow sdcardd system_data_file:file create_file_perms;