blob: 830cbd5bbeadc9605bcc706129434007f11e674b [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)
8# Access the network.
9net_domain(media_app)
Stephen Smalley56370992013-10-23 13:12:55 -040010# Access /dev/mtp_usb.
11allow media_app mtp_device:chr_file rw_file_perms;
12# Write to /cache.
13allow media_app cache_file:dir rw_dir_perms;
14allow media_app cache_file:file create_file_perms;
15# Stat /cache/lost+found
16allow media_app unlabeled:file getattr;
17allow media_app unlabeled:dir getattr;
18# Stat /cache/backup
19allow media_app cache_backup_file:file getattr;
20allow media_app cache_backup_file:dir getattr;
21# Read files in the rootdir (in particular, file_contexts for restorecon).
22allow media_app rootfs:file r_file_perms;
23allow media_app download_file:dir rw_dir_perms;
24allow media_app download_file:file create_file_perms;
25# Allow platform apps to mark platform app data files as download files
Nick Kralevich748fdef2013-07-12 16:33:29 -070026relabelto_domain(media_app)
Stephen Smalley56370992013-10-23 13:12:55 -040027allow media_app platform_app_data_file:dir relabelfrom;
Nick Kralevich748fdef2013-07-12 16:33:29 -070028allow media_app download_file:dir relabelto;