336d0fed4e
I took current AOSP policy as base, then removed sepolicy so that the set of type and attributes was a subset of types and attributes in Q sepolicy, with exception of those that have not yet been cleand up in current AOSP: mediaswcodec_server netd_socket mediaextractor_update_service thermalserviced thermalserviced_exec Bug: 133196056 Test: n/a Change-Id: I863429d61d3fad0272c1d3f1e429cd997513a74a Merged-In: I3e091652fa8d1757b1f71f7559186d5b32f000d5
46 lines
1.8 KiB
Text
46 lines
1.8 KiB
Text
###
|
|
### A domain for android.process.media, which contains both
|
|
### MediaProvider and DownloadProvider and associated services.
|
|
###
|
|
|
|
typeattribute mediaprovider coredomain;
|
|
app_domain(mediaprovider)
|
|
|
|
# DownloadProvider accesses the network.
|
|
net_domain(mediaprovider)
|
|
|
|
# DownloadProvider uses /cache.
|
|
allow mediaprovider cache_file:dir create_dir_perms;
|
|
allow mediaprovider cache_file:file create_file_perms;
|
|
# /cache is a symlink to /data/cache on some devices. Allow reading the link.
|
|
allow mediaprovider cache_file:lnk_file r_file_perms;
|
|
# mediaprovider searches through /cache looking for orphans
|
|
# Ignore denials to /cache/recovery and /cache/backup.
|
|
dontaudit mediaprovider cache_private_backup_file:dir getattr;
|
|
dontaudit mediaprovider cache_recovery_file:dir getattr;
|
|
|
|
# Access external sdcards through /mnt/media_rw
|
|
allow mediaprovider { mnt_media_rw_file }:dir search;
|
|
|
|
allow mediaprovider app_api_service:service_manager find;
|
|
allow mediaprovider audioserver_service:service_manager find;
|
|
allow mediaprovider drmserver_service:service_manager find;
|
|
allow mediaprovider mediaextractor_service:service_manager find;
|
|
allow mediaprovider mediaserver_service:service_manager find;
|
|
|
|
# Allow MediaProvider to read/write cached ringtones (opened by system).
|
|
allow mediaprovider ringtone_file:file { getattr read write };
|
|
|
|
# MtpServer uses /dev/mtp_usb
|
|
allow mediaprovider mtp_device:chr_file rw_file_perms;
|
|
|
|
# MtpServer uses /dev/usb-ffs/mtp
|
|
allow mediaprovider functionfs:dir search;
|
|
allow mediaprovider functionfs:file rw_file_perms;
|
|
allowxperm mediaprovider functionfs:file ioctl FUNCTIONFS_ENDPOINT_DESC;
|
|
|
|
# MtpServer sets sys.usb.ffs.mtp.ready
|
|
set_prop(mediaprovider, ffs_prop)
|
|
set_prop(mediaprovider, exported_ffs_prop)
|
|
|
|
allow mediaprovider ashmem_device:chr_file { getattr read ioctl lock map append write };
|