aboutsummaryrefslogtreecommitdiff
path: root/sepolicy/alipay_app.te
blob: 157010861f71d6158991f6b49b2ad627b1ffaec7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# 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 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)