diff options
Diffstat (limited to 'sepolicy/alipay_app.te')
-rw-r--r-- | sepolicy/alipay_app.te | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/sepolicy/alipay_app.te b/sepolicy/alipay_app.te new file mode 100644 index 0000000..6cc3ad2 --- /dev/null +++ b/sepolicy/alipay_app.te @@ -0,0 +1,56 @@ +# Generally based on untrusted_app.te + +type alipay_app, domain; +app_domain(alipay_app) +net_domain(alipay_app) +bluetooth_domain(alipay_app) + +# Some apps ship with shared libraries and binaries that they write out +# to their sandbox directory and then execute. +allow alipay_app app_data_file:file { rx_file_perms execmod }; + +# Used by Finsky / Android "Verify Apps" functionality when +# running "adb install foo.apk". +# TODO: Long term, we don't want apps probing into shell data files. +# Figure out a way to remove these rules. +allow alipay_app shell_data_file:file r_file_perms; +allow alipay_app shell_data_file:dir r_dir_perms; + +# Read and write system app data files passed over Binder. +# Motivating case was /data/data/com.android.settings/cache/*.jpg for +# cropping or taking user photos. +allow alipay_app system_app_data_file:file { read write getattr }; + +# +# Rules migrated from old app domains coalesced into alipay_app. +# This includes what used to be media_app, shared_app, and release_app. +# + +# Access to /data/media. +allow alipay_app media_rw_data_file:dir create_dir_perms; +allow alipay_app media_rw_data_file:file create_file_perms; + +# Traverse into /mnt/media_rw for bypassing FUSE daemon +# TODO: narrow this to just MediaProvider +allow alipay_app mnt_media_rw_file:dir search; + +# Write to /cache. +allow alipay_app cache_file:dir create_dir_perms; +allow alipay_app cache_file:file create_file_perms; + +allow alipay_app battery_service:service_manager find; +allow alipay_app drmserver_service:service_manager find; +allow alipay_app healthd_service:service_manager find; +allow alipay_app mediaserver_service:service_manager find; +allow alipay_app nfc_service:service_manager find; +allow alipay_app radio_service:service_manager find; +allow alipay_app surfaceflinger_service:service_manager find; +allow alipay_app app_api_service:service_manager find; +allow alipay_app ifaadaemon_service:service_manager find; + +# TODO: remove this once priv-apps are no longer running in alipay_app +allow alipay_app system_api_service:service_manager find; + +# Programs routinely attempt to scan through /system, looking +# for files. Suppress the denials when they occur. +dontaudit alipay_app exec_type:file getattr; |