From cb1d4b815c5561dff84e9a68bb2b7a936d107ec3 Mon Sep 17 00:00:00 2001 From: dianlujitao Date: Wed, 16 Nov 2016 12:09:37 +0800 Subject: z2plus: Unblock alipay Change-Id: I91fb623d37bd82eacdded181ebbd63e1f068772d --- sepolicy/alipay_app.te | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/sepolicy/alipay_app.te b/sepolicy/alipay_app.te index 1c80dd2..1570108 100644 --- a/sepolicy/alipay_app.te +++ b/sepolicy/alipay_app.te @@ -4,3 +4,62 @@ 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 audioserver_service:service_manager find; +allow alipay_app battery_service:service_manager find; +allow alipay_app cameraserver_service:service_manager find; +allow alipay_app drmserver_service:service_manager find; +allow alipay_app ifaadaemon_service:service_manager find; +allow alipay_app mediaserver_service:service_manager find; +allow alipay_app mediaextractor_service:service_manager find; +allow alipay_app mediacodec_service:service_manager find; +allow alipay_app mediadrmserver_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; + +# Programs routinely attempt to scan through /system, looking +# for files. Suppress the denials when they occur. +dontaudit alipay_app exec_type:file getattr; + +# TODO: switch to meminfo service +allow alipay_app proc_meminfo:file r_file_perms; + +# https://code.google.com/p/chromium/issues/detail?id=586021 +allow alipay_app proc:file r_file_perms; +# access /proc/net/xt_qtguid/stats +r_dir_file(alipay_app, proc_net) -- cgit v1.2.3