diff options
author | Nick Kralevich <nnk@google.com> | 2014-07-01 21:13:12 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-07-01 21:13:12 +0000 |
commit | d172419e9a36f61af8c98d316ec2625e1f1304f6 (patch) | |
tree | 2671c1d72d2a0a24f9557a7b3251c39b20052f5d | |
parent | 899c15ef2053f0cebfeda90b5211e80310e6f278 (diff) | |
parent | 9b1a7d4570dd692cf86c385dfcdf057ad966fa57 (diff) | |
download | frameworks_base-d172419e9a36f61af8c98d316ec2625e1f1304f6.zip frameworks_base-d172419e9a36f61af8c98d316ec2625e1f1304f6.tar.gz frameworks_base-d172419e9a36f61af8c98d316ec2625e1f1304f6.tar.bz2 |
am 9b1a7d45: Merge "Allow different SELinux policies for third party apps."
* commit '9b1a7d4570dd692cf86c385dfcdf057ad966fa57':
Allow different SELinux policies for third party apps.
-rw-r--r-- | services/java/com/android/server/pm/SELinuxMMAC.java | 36 |
1 files changed, 13 insertions, 23 deletions
diff --git a/services/java/com/android/server/pm/SELinuxMMAC.java b/services/java/com/android/server/pm/SELinuxMMAC.java index c78249b..81302b9 100644 --- a/services/java/com/android/server/pm/SELinuxMMAC.java +++ b/services/java/com/android/server/pm/SELinuxMMAC.java @@ -346,31 +346,21 @@ public final class SELinuxMMAC { */ public static boolean assignSeinfoValue(PackageParser.Package pkg) { - /* - * Non system installed apps should be treated the same. This - * means that any post-loaded apk will be assigned the default - * tag, if one exists in the policy, else null, without respect - * to the signing key. - */ - if (((pkg.applicationInfo.flags & ApplicationInfo.FLAG_SYSTEM) != 0) || - ((pkg.applicationInfo.flags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0)) { - - // We just want one of the signatures to match. - for (Signature s : pkg.mSignatures) { - if (s == null) - continue; + // We just want one of the signatures to match. + for (Signature s : pkg.mSignatures) { + if (s == null) + continue; - Policy policy = sSigSeinfo.get(s); - if (policy != null) { - String seinfo = policy.checkPolicy(pkg.packageName); - if (seinfo != null) { - pkg.applicationInfo.seinfo = seinfo; - if (DEBUG_POLICY_INSTALL) - Slog.i(TAG, "package (" + pkg.packageName + - ") labeled with seinfo=" + seinfo); + Policy policy = sSigSeinfo.get(s); + if (policy != null) { + String seinfo = policy.checkPolicy(pkg.packageName); + if (seinfo != null) { + pkg.applicationInfo.seinfo = seinfo; + if (DEBUG_POLICY_INSTALL) + Slog.i(TAG, "package (" + pkg.packageName + + ") labeled with seinfo=" + seinfo); - return true; - } + return true; } } } |