2013-07-13 01:33:29 +02:00
|
|
|
###
|
|
|
|
### Untrusted apps.
|
|
|
|
###
|
2014-02-21 19:26:20 +01:00
|
|
|
### Apps are labeled based on mac_permissions.xml (maps signer and
|
|
|
|
### optionally package name to seinfo value) and seapp_contexts (maps UID
|
|
|
|
### and optionally seinfo value to domain for process and type for data
|
|
|
|
### directory). The untrusted_app domain is the default assignment in
|
|
|
|
### seapp_contexts for any app with UID between APP_AID (10000)
|
|
|
|
### and AID_ISOLATED_START (99000) if the app has no specific seinfo
|
|
|
|
### value as determined from mac_permissions.xml. In current AOSP, this
|
|
|
|
### domain is assigned to all non-system apps as well as to any system apps
|
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
|
|
|
### that are not signed by the platform key. To move
|
2014-02-21 19:26:20 +01:00
|
|
|
### a system app into a specific domain, add a signer entry for it to
|
|
|
|
### mac_permissions.xml and assign it one of the pre-existing seinfo values
|
|
|
|
### or define and use a new seinfo value in both mac_permissions.xml and
|
|
|
|
### seapp_contexts.
|
2013-07-13 01:33:29 +02:00
|
|
|
###
|
|
|
|
|
2020-01-20 10:14:48 +01:00
|
|
|
# This file defines the rules for untrusted apps running with
|
2021-06-30 09:41:39 +02:00
|
|
|
# targetSdkVersion >= 30.
|
2016-01-23 00:51:41 +01:00
|
|
|
type untrusted_app, domain;
|
2020-01-20 10:14:48 +01:00
|
|
|
# This file defines the rules for untrusted apps running with
|
|
|
|
# targetSdkVersion = 29.
|
|
|
|
type untrusted_app_29, domain;
|
|
|
|
# This file defines the rules for untrusted apps running with
|
|
|
|
# 25 < targetSdkVersion <= 28.
|
2018-04-03 20:22:38 +02:00
|
|
|
type untrusted_app_27, domain;
|
2020-01-20 10:14:48 +01:00
|
|
|
# This file defines the rules for untrusted apps running with
|
|
|
|
# targetSdkVersion <= 25.
|
2018-04-03 20:22:38 +02:00
|
|
|
type untrusted_app_25, domain;
|