aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLogan Chien <loganchien@google.com>2017-11-21 17:31:25 +0800
committerLogan Chien <loganchien@google.com>2017-11-22 10:22:40 +0800
commit122c68c8625e2ae6e386d8b6396088f7bd00be4c (patch)
tree87ad8597f6077f9743e4fb095e949bfcfa5ae5be
parentadec3cd8b37ffef548ca8ca9056f6cb2d74f916b (diff)
downloadselinux-122c68c8625e2ae6e386d8b6396088f7bd00be4c.tar.gz
Mark libselinux as VNDK in Android.bp
This commit marks libselinux.so as VNDK, so that vendor variant of libselinux.so can be installed into /system/lib[64]/vndk instead of /vendor/lib[64]. This makes it easier to apply security patches through system-only OTAs. Before this commit, libselinux was not an VNDK library because there was a concern with selabel database file format. This is no longer a concern because the file backend is disabled in vendor variant. Bug: 69587962 Bug: 63866913 Test: /system/lib64/vndk/libselinux.so shows up in GSI Change-Id: I9d3be760bb5b3f8bf50b96ce6d8b938bf75c620a
-rw-r--r--CleanSpec.mk1
-rw-r--r--libselinux/Android.bp5
2 files changed, 6 insertions, 0 deletions
diff --git a/CleanSpec.mk b/CleanSpec.mk
index 5658a407..a67955b0 100644
--- a/CleanSpec.mk
+++ b/CleanSpec.mk
@@ -3,3 +3,4 @@
#
$(call add-clean-step, rm -rf $(OUT_DIR)/host/linux-x86/bin/audit2allow)
$(call add-clean-step, rm -rf $(OUT_DIR)/host/linux-x86/bin/audit2why)
+$(call add-clean-step, rm -rf $(PRODUCT_OUT)/vendor/lib/libselinux.so)
diff --git a/libselinux/Android.bp b/libselinux/Android.bp
index 649e6528..cd92e056 100644
--- a/libselinux/Android.bp
+++ b/libselinux/Android.bp
@@ -105,7 +105,12 @@ cc_defaults {
cc_library {
name: "libselinux",
defaults: ["libselinux_defaults"],
+
vendor_available: true,
+ vndk: {
+ enabled: true,
+ },
+
host_supported: true,
cflags: ["-DUSE_PCRE2"],