OSDN Git Service

Automatically assign default seinfo labels using the string "default".
authorRobert Craig <rpcraig@tycho.ncsc.mil>
Fri, 28 Aug 2015 16:11:41 +0000 (12:11 -0400)
committerRobert Craig <rpcraig@tycho.ncsc.mil>
Tue, 1 Sep 2015 09:51:04 +0000 (05:51 -0400)
commit5e16bc5a143b46bbe9a4873adceed85a6241d1d0
tree923d34ce6bc6bd12cd87988fa50a177d4cf99ec0
parent582d16681bf46eb2f11c24132ffbcd9f7cc4b74d
Automatically assign default seinfo labels using the string "default".

default seinfo values are those for which policy lacks a
matching stanza in the corresponding mac_permissions.xml
file. Prior to this change the null object reference was
used to represent the non-matching state. This is in
contrast to a policy supplied default stanza which will
assign a non null seinfo value. Confused yet?

Basically, two default states were distinguished in the
code to describe the two cases where either a policy stanza
spelled out the base case seinfo label or not. Policy
writers could either supply a default stanza or rely on
the class instantiated value assigned by the ApplicationInfo
object. The hope was that the later assignment could be
used to help distinguish the cases where policy writers
intentionally white listed apps. This change will just use
the hard coded "default" string implicitly to describe all
cases and removes the idea of a policy supplied default stanza.

Change-Id: Ib7b01ee004775f24db9a69340a31784b967ce030
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
core/java/android/content/pm/ApplicationInfo.java
services/core/java/com/android/server/pm/SELinuxMMAC.java