diff options
| author | 2017-02-14 23:50:17 +0000 | |
|---|---|---|
| committer | 2017-02-14 23:50:17 +0000 | |
| commit | f8cefed995a160cf1c74e15c186e05db07000259 (patch) | |
| tree | 30f7d6bf42a3185eb192aeb209f7d4413720a088 | |
| parent | 6c1ac4dd80e50682c595e8e1aba8a119132fd7b9 (diff) | |
| parent | 4516240b4737c7552ccb861c1d21b0169198c1b4 (diff) | |
Merge "Pass targetSdkVersion specifier for SELinux labeling"
am: 4516240b47
Change-Id: Ic61c4dc30f075d01a85d8b60cfe4ae1de773aa09
| -rw-r--r-- | services/core/java/com/android/server/pm/SELinuxMMAC.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/pm/SELinuxMMAC.java b/services/core/java/com/android/server/pm/SELinuxMMAC.java index 0fe15396fad7..522c2e83a9ae 100644 --- a/services/core/java/com/android/server/pm/SELinuxMMAC.java +++ b/services/core/java/com/android/server/pm/SELinuxMMAC.java @@ -69,6 +69,9 @@ public final class SELinuxMMAC { // Append autoplay to existing seinfo label private static final String AUTOPLAY_APP_STR = ":autoplayapp"; + // Append targetSdkVersion=n to existing seinfo label where n is the app's targetSdkVersion + private static final String TARGETSDKVERSION_STR = ":targetSdkVersion="; + /** * Load the mac_permissions.xml file containing all seinfo assignments used to * label apps. The loaded mac_permissions.xml file is determined by the @@ -290,6 +293,8 @@ public final class SELinuxMMAC { if (pkg.applicationInfo.isPrivilegedApp()) pkg.applicationInfo.seinfo += PRIVILEGED_APP_STR; + pkg.applicationInfo.seinfo += TARGETSDKVERSION_STR + pkg.applicationInfo.targetSdkVersion; + if (DEBUG_POLICY_INSTALL) { Slog.i(TAG, "package (" + pkg.packageName + ") labeled with " + "seinfo=" + pkg.applicationInfo.seinfo); |