2013-07-13 01:33:29 +02:00
|
|
|
###
|
|
|
|
### Apps signed with the platform key.
|
|
|
|
###
|
|
|
|
|
|
|
|
type platform_app, domain;
|
|
|
|
app_domain(platform_app)
|
|
|
|
# Access the network.
|
|
|
|
net_domain(platform_app)
|
|
|
|
# Access bluetooth.
|
|
|
|
bluetooth_domain(platform_app)
|
2014-03-06 22:03:48 +01:00
|
|
|
# Read from /data/local/tmp or /data/data/com.android.shell.
|
2013-10-23 19:12:55 +02:00
|
|
|
allow platform_app shell_data_file:dir search;
|
|
|
|
allow platform_app shell_data_file:file { open getattr read };
|
|
|
|
# Populate /data/app/vmdl*.tmp, /data/app-private/vmdl*.tmp files
|
|
|
|
# created by system server.
|
2014-07-09 23:58:46 +02:00
|
|
|
allow platform_app { apk_tmp_file apk_private_tmp_file }:dir rw_dir_perms;
|
2013-10-23 19:12:55 +02:00
|
|
|
allow platform_app { apk_tmp_file apk_private_tmp_file }:file rw_file_perms;
|
|
|
|
allow platform_app apk_private_data_file:dir search;
|
|
|
|
# ASEC
|
|
|
|
allow platform_app asec_apk_file:dir create_dir_perms;
|
|
|
|
allow platform_app asec_apk_file:file create_file_perms;
|
|
|
|
|
Coalesce shared_app, media_app, release_app into untrusted_app.
This change folds the shared_app, media_app, and release_app
domains into untrusted_app, reducing the set of app domains down
to just distinct domains for the fixed UID apps (e.g. system_app, bluetooth,
nfc, radio), a single domain for apps signed by the platform key
(platform_app), and a single domain for all other apps (untrusted_app).
Thus, SELinux only distinguishes when already distinguished by a predefined
Android ID (AID) or by the platform certificate (which get the signature-only
Android permissions and thus may require special OS-level accesses).
It is still possible to introduce specific app domains for specific
apps by adding signer and package stanzas to mac_permissions.xml,
but this can be done on an as-needed basis for specialized apps that
require particular OS-level permissions outside the usual set.
As there is now only a single platform app domains, get rid of the
platformappdomain attribute and platform_app_domain() macro. We used
to add mlstrustedsubject to those domains but drop this since we are not
using MLS in AOSP presently; we can revisit which domains need it if/when
we use MLS.
Since we are dropping the shared, media, and release seinfo entries from
seapp_contexts, drop them from mac_permissions.xml as well. However,
we leave the keys.conf entries in case someone wants to add a signer
entry in the future for specific apps signed by those keys to
mac_permissions.xml.
Change-Id: I877192cca07360c4a3c0ef475f016cc273e1d968
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2014-04-04 15:09:25 +02:00
|
|
|
# Access to /data/media.
|
|
|
|
allow platform_app media_rw_data_file:dir create_dir_perms;
|
|
|
|
allow platform_app media_rw_data_file:file create_file_perms;
|
|
|
|
|
|
|
|
# Write to /cache.
|
|
|
|
allow platform_app cache_file:dir create_dir_perms;
|
|
|
|
allow platform_app cache_file:file create_file_perms;
|
2014-07-07 22:56:27 +02:00
|
|
|
|
2014-12-23 02:32:44 +01:00
|
|
|
allow platform_app drmserver_service:service_manager find;
|
2014-12-12 01:01:27 +01:00
|
|
|
allow platform_app mediaserver_service:service_manager find;
|
|
|
|
allow platform_app radio_service:service_manager find;
|
|
|
|
allow platform_app surfaceflinger_service:service_manager find;
|
2014-12-17 00:45:26 +01:00
|
|
|
allow platform_app tmp_system_server_service:service_manager find;
|
2015-04-03 01:50:08 +02:00
|
|
|
allow platform_app app_api_service:service_manager find;
|
|
|
|
allow platform_app system_api_service:service_manager find;
|
2014-12-17 00:45:26 +01:00
|
|
|
|
|
|
|
service_manager_local_audit_domain(platform_app)
|
|
|
|
auditallow platform_app {
|
|
|
|
tmp_system_server_service
|
2015-01-16 00:12:18 +01:00
|
|
|
-display_service
|
2015-01-17 02:27:25 +01:00
|
|
|
-dreams_service
|
2015-01-16 00:12:18 +01:00
|
|
|
-dropbox_service
|
2015-01-17 02:27:25 +01:00
|
|
|
-fingerprint_service
|
2015-03-23 15:56:37 +01:00
|
|
|
-graphicsstats_service
|
2015-01-17 02:27:25 +01:00
|
|
|
-input_method_service
|
2014-12-17 00:45:26 +01:00
|
|
|
-input_service
|
|
|
|
-lock_settings_service
|
2015-01-17 02:27:25 +01:00
|
|
|
-media_projection_service
|
|
|
|
-media_router_service
|
|
|
|
-media_session_service
|
2015-01-16 00:12:18 +01:00
|
|
|
-mount_service
|
2015-01-17 02:27:25 +01:00
|
|
|
-netpolicy_service
|
|
|
|
-netstats_service
|
|
|
|
-network_management_service
|
|
|
|
-notification_service
|
|
|
|
-power_service
|
|
|
|
-registry_service
|
|
|
|
-search_service
|
2015-04-01 23:30:46 +02:00
|
|
|
-sensorservice_service
|
2015-01-17 02:27:25 +01:00
|
|
|
-statusbar_service
|
|
|
|
-trust_service
|
2015-04-01 23:30:46 +02:00
|
|
|
-uimode_service
|
|
|
|
-usb_service
|
2015-01-17 02:27:25 +01:00
|
|
|
-user_service
|
|
|
|
-vibrator_service
|
|
|
|
-wallpaper_service
|
2015-04-01 23:30:46 +02:00
|
|
|
-webviewupdate_service
|
2015-01-17 02:27:25 +01:00
|
|
|
-wifi_service
|
2015-03-23 15:56:37 +01:00
|
|
|
}:service_manager find;
|