Revert "Delete "libselinux.so.1""

The mac build is broken. Reverting while I figure out an appropriate solution.

external/selinux/libselinux/src/avc_internal.c:21:10: fatal error: 'linux/types.h' file not found
#include <linux/types.h>

This reverts commit 85457a374f.

Bug: 33170640
Change-Id: I285d0b4d138897725f54180812a6c816755d4db5
This commit is contained in:
Nick Kralevich 2016-11-29 01:07:55 +00:00
parent 85457a374f
commit 715ff04e5c
7 changed files with 29 additions and 41 deletions

View file

@ -41,59 +41,53 @@ cc_library {
host_supported: true,
srcs: [
"src/avc.c",
"src/avc_internal.c",
"src/avc_sidtab.c",
"src/booleans.c",
"src/callbacks.c",
"src/compute_av.c",
"src/compute_create.c",
"src/compute_member.c",
"src/context.c",
"src/enabled.c",
"src/freecon.c",
"src/getenforce.c",
"src/getfilecon.c",
"src/get_initial_context.c",
"src/init.c",
"src/label_backends_android.c",
"src/label.c",
"src/label_file.c",
"src/label_support.c",
"src/load_policy.c",
"src/mapping.c",
"src/matchpathcon.c",
"src/procattr.c",
"src/label_backends_android.c",
"src/regex.c",
"src/setexecfilecon.c",
"src/label_support.c",
"src/matchpathcon.c",
"src/setrans_client.c",
"src/sha1.c",
"src/stringrep.c",
"src/booleans.c",
],
target: {
host: {
srcs: [
"src/android/android_host.c",
],
},
android: {
srcs: [
"src/android/android.c",
"src/canonicalize_context.c",
"src/checkAccess.c",
"src/check_context.c",
"src/deny_unknown.c",
"src/disable.c",
"src/enabled.c",
"src/init.c",
"src/fgetfilecon.c",
"src/fsetfilecon.c",
"src/getenforce.c",
"src/getfilecon.c",
"src/getpeercon.c",
"src/lgetfilecon.c",
"src/load_policy.c",
"src/lsetfilecon.c",
"src/policyvers.c",
"src/sestatus.c",
"src/procattr.c",
"src/setenforce.c",
"src/setfilecon.c",
"src/context.c",
"src/mapping.c",
"src/stringrep.c",
"src/compute_create.c",
"src/compute_member.c",
"src/compute_av.c",
"src/avc.c",
"src/avc_internal.c",
"src/avc_sidtab.c",
"src/get_initial_context.c",
"src/checkAccess.c",
"src/sestatus.c",
"src/deny_unknown.c",
"src/check_context.c",
"src/android/android.c",
],
shared_libs: [

View file

@ -1,8 +0,0 @@
#include <stdlib.h>
// HACK: placeholder for a library the python bindings expect.
// Delete after b/33170640 is fixed.
const char *selinux_openssh_contexts_path(void)
{
abort();
}

View file

@ -2,7 +2,7 @@
unamestr=`uname`
if [ "$unamestr" = "Linux" -o "$unamestr" = "linux" ]; then
export LD_PRELOAD=$ANDROID_HOST_OUT/lib64/libselinux.so
export LD_LIBRARY_PATH=$ANDROID_BUILD_TOP/external/selinux/prebuilts/lib
export PYTHONPATH=$ANDROID_BUILD_TOP/prebuilts/python/linux-x86/2.7.5/lib/python2.7/site-packages
python $ANDROID_BUILD_TOP/external/selinux/python/audit2allow/audit2allow "$@"
else

View file

@ -2,7 +2,7 @@
unamestr=`uname`
if [ "$unamestr" = "Linux" -o "$unamestr" = "linux" ]; then
export LD_PRELOAD=$ANDROID_HOST_OUT/lib64/libselinux.so
export LD_LIBRARY_PATH=$ANDROID_BUILD_TOP/external/selinux/prebuilts/lib
export PYTHONPATH=$ANDROID_BUILD_TOP/prebuilts/python/linux-x86/2.7.5/lib/python2.7/site-packages
exec python $ANDROID_BUILD_TOP/external/selinux/python/audit2allow/audit2why "$@"
else

View file

@ -2,6 +2,7 @@
unamestr=`uname`
if [ "$unamestr" = "Linux" -o "$unamestr" = "linux" ]; then
export LD_LIBRARY_PATH=$ANDROID_BUILD_TOP/external/selinux/prebuilts/lib
export PYTHONPATH=$ANDROID_BUILD_TOP/prebuilts/python/linux-x86/2.7.5/lib/python2.7/site-packages
python $ANDROID_BUILD_TOP/external/selinux/prebuilts/bin/sediff.py "$@"
else

View file

@ -2,6 +2,7 @@
unamestr=`uname`
if [ "$unamestr" = "Linux" -o "$unamestr" = "linux" ]; then
export LD_LIBRARY_PATH=$ANDROID_BUILD_TOP/external/selinux/prebuilts/lib
export PYTHONPATH=$ANDROID_BUILD_TOP/prebuilts/python/linux-x86/2.7.5/lib/python2.7/site-packages
python $ANDROID_BUILD_TOP/external/selinux/prebuilts/bin/sesearch.py "$@"
else

BIN
prebuilts/lib/libselinux.so.1 Executable file

Binary file not shown.