Port of libselinux to Android.
Move SELINUXMNT definition to public selinux.h for use by init.
Support for building the host library on MacOS X.
Drop src/callbacks.h from LOCAL_COPY_HEADERS.
Do not build if HAVE_SELINUX=false.
Add a selinux_android_restorecon interface for use by the frameworks.
Add selinux_android_seapp_context_reload() to support reloading of
seapp_contexts configuration upon updates, and introduce support for
loading it from /data/system or /.
Check for /data/system/file_contexts first in restorecon.
Define and implement Android property selabel backend.
Revert "Do not build if HAVE_SELINUX=false."

We need to always build libselinux even if it's not being used by
anything in the system image. This makes sure some unrelated change
doesn't accidentally break libselinux.

This reverts commit 6670f53f78cd44a6cb484785b2837439e2ba9178.
Merge from upstream libselinux

Change-Id: I1fd35714001e3fcf9022756334cbb89611ce5c66
Change selabel_open and label backends to take a const struct selinux_opt argument.
Public domain notice
Add support for the new username mapping in JB, and backward compatibility.
Fix handling of app id 0.
Introduce selinux_android_setfilecon2 to support passing seinfo argument.
Introduce new function to return sehandle.

Add function selinux_android_file_context_handle
that opens the correct file_contexts policy file
and returns the available sehandle object.
include selinux/label.h for struct sehandle declaration.
Allow zygote to spawn non matched apps in permissive mode

This patch will allow non-matched apps in seapp_contexts to
still be spawned via the zygote. An error message will be sent
to logcat.

Change-Id: I9fb5dcfeb384a26e6a01d69bffd2ef14af74c51c
Signed-off-by: William Roberts <w.roberts@sta.samsung.com>
Revert "Allow zygote to spawn non matched apps in permissive mode"

This reverts commit 0beab96891a9ee1808b113479f167148cab5c998.