Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b0894915 authored by Jeffrey Vander Stoep's avatar Jeffrey Vander Stoep Committed by Android Git Automerger
Browse files

am 6b6d1a30: am a2e511d6: am 8b626548: Merge "Pass privapp specifier for selinux labeling"

* commit '6b6d1a30':
  Pass privapp specifier for selinux labeling
parents 05c0e092 6b6d1a30
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -100,6 +100,9 @@ public final class SELinuxMMAC {
    private static final String SEAPP_HASH_FILE =
            Environment.getDataDirectory().toString() + "/system/seapp_hash";

    // Append privapp to existing seinfo label
    private static final String PRIVILEGED_APP_STR = ":privapp";

    /**
     * Load the mac_permissions.xml file containing all seinfo assignments used to
     * label apps. The loaded mac_permissions.xml file is determined by the
@@ -313,6 +316,9 @@ public final class SELinuxMMAC {
            }
        }

        if (pkg.applicationInfo.isPrivilegedApp())
            pkg.applicationInfo.seinfo += PRIVILEGED_APP_STR;

        if (DEBUG_POLICY_INSTALL) {
            Slog.i(TAG, "package (" + pkg.packageName + ") labeled with " +
                    "seinfo=" + pkg.applicationInfo.seinfo);