blob: 65f38636b0e11c7297556a0325769f54d8eab1c2 [file] [log] [blame]
Nick Kralevich748fdef2013-07-12 16:33:29 -07001###
2### Apps signed with the media key.
3###
4
5type media_app, domain;
Nick Kralevich748fdef2013-07-12 16:33:29 -07006app_domain(media_app)
7platform_app_domain(media_app)
Nick Kralevich2e7a3012014-01-10 23:05:25 -08008binder_service(media_app)
Nick Kralevich748fdef2013-07-12 16:33:29 -07009# Access the network.
10net_domain(media_app)
Stephen Smalley56370992013-10-23 13:12:55 -040011# Access /dev/mtp_usb.
12allow media_app mtp_device:chr_file rw_file_perms;
13# Write to /cache.
14allow media_app cache_file:dir rw_dir_perms;
15allow media_app cache_file:file create_file_perms;
16# Stat /cache/lost+found
17allow media_app unlabeled:file getattr;
18allow media_app unlabeled:dir getattr;
19# Stat /cache/backup
20allow media_app cache_backup_file:file getattr;
21allow media_app cache_backup_file:dir getattr;
22# Read files in the rootdir (in particular, file_contexts for restorecon).
23allow media_app rootfs:file r_file_perms;
24allow media_app download_file:dir rw_dir_perms;
25allow media_app download_file:file create_file_perms;
26# Allow platform apps to mark platform app data files as download files
Nick Kralevich748fdef2013-07-12 16:33:29 -070027relabelto_domain(media_app)
Stephen Smalley56370992013-10-23 13:12:55 -040028allow media_app platform_app_data_file:dir relabelfrom;
Nick Kralevich748fdef2013-07-12 16:33:29 -070029allow media_app download_file:dir relabelto;