Merge "Pass targetSdkVersion specifier for SELinux labeling" am: 4516240b47
am: f8cefed995
Change-Id: Ie71368e7b4571d209d8c3a824bbf1a8c738f56a8
This commit is contained in:
@@ -69,6 +69,9 @@ public final class SELinuxMMAC {
|
|||||||
// Append autoplay to existing seinfo label
|
// Append autoplay to existing seinfo label
|
||||||
private static final String AUTOPLAY_APP_STR = ":autoplayapp";
|
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
|
* Load the mac_permissions.xml file containing all seinfo assignments used to
|
||||||
* label apps. The loaded mac_permissions.xml file is determined by the
|
* label apps. The loaded mac_permissions.xml file is determined by the
|
||||||
@@ -290,6 +293,8 @@ public final class SELinuxMMAC {
|
|||||||
if (pkg.applicationInfo.isPrivilegedApp())
|
if (pkg.applicationInfo.isPrivilegedApp())
|
||||||
pkg.applicationInfo.seinfo += PRIVILEGED_APP_STR;
|
pkg.applicationInfo.seinfo += PRIVILEGED_APP_STR;
|
||||||
|
|
||||||
|
pkg.applicationInfo.seinfo += TARGETSDKVERSION_STR + pkg.applicationInfo.targetSdkVersion;
|
||||||
|
|
||||||
if (DEBUG_POLICY_INSTALL) {
|
if (DEBUG_POLICY_INSTALL) {
|
||||||
Slog.i(TAG, "package (" + pkg.packageName + ") labeled with " +
|
Slog.i(TAG, "package (" + pkg.packageName + ") labeled with " +
|
||||||
"seinfo=" + pkg.applicationInfo.seinfo);
|
"seinfo=" + pkg.applicationInfo.seinfo);
|
||||||
|
|||||||
Reference in New Issue
Block a user