Generalize levelFromUid support.

Generalize levelFromUid support to support per-app, per-user,
or per-combination level assignment.  Adds a new levelFrom=none|app|user|all
syntax for specifying the desired behavior in seapp_contexts.
levelFromUid=true|false is still supported but translated to
levelFrom=app|none.

No change in existing behavior for existing seapp_contexts configurations.

Change-Id: I0e9c18ecf3113fa7079d2101899c92a241ef80a0
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Return an error if no path is supplied to the label backends.

Change-Id: I5af4591d733429b3348bbe87d6711200645af27b
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Adjustments to android property backend.

Allow the android property backend parser to accept the
SELABEL_OPT_VALIDATE option and to perform a validate
callback.

Change-Id: Ifd4b9839df6ff67b868b5cf6448920e8b3aa2a7a
Signed-off-by: Robert Craig <rpcraig@tycho.ncsc.mil>
Move location of policy files

Move location of policy files from /data/system to
/data/security

Change-Id: If75da3889c75ca83eb7dbd6e5540657a4cf65831
Merged in billcroberts/external-libselinux/seandroid-policy-move (pull request #1)

Move location of policy files
Merge branch 'master' into seandroid

Conflicts:
	src/android.c
Merge branch 'master' into seandroid
Sync with master.
Use NULL instead of 0 as terminator to array

Change-Id: I034fb304145529791f275db568cd8ce29748a9fd
Add selinux status functions from upstream libselinux.

These functions allow programs to check whether there has
been a change to the SELinux status without needing to poll a netlink socket.

Change-Id: Ic7f310d69a7c420e48fbc974000cf4a5b9ab4a3b
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Eliminate a memory leak.

Need to free the old seapp_contexts if any before reloading.

Change-Id: I66a9c2895518c6224920c9728157a84dc572d31a
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Merge branch 'master' into seandroid
Merge branch 'master' into seandroid
Merge branch 'master' into seandroid
Merge branch 'master' into seandroid
Merge tag 'android-4.3_r2.1' into cm-10.2

Android 4.3 release 2.1
Merge tag 'android-4.4_r1' into cm-11.0

Android 4.4 Release 1.0