Don't honor LIBC_HOOKS_ENABLE across a security boundary
Similar to the way we handle LIBC_DEBUG_MALLOC_OPTIONS
(bug 68003719), filter LIBC_HOOKS_ENABLE when we cross a
security boundary. This prevents modifying the allocation
behavior of a privileged program.
Introduced in
https://android.googlesource.com/platform/bionic/+/db478a627482c73c52df9e3929fe7a39f03e4eeb%5E%21/#F0
(bug 30561479)
Test: compiles and boots
Change-Id: I59a7c224734b0991fd62efb45ab599dab8570723
diff --git a/libc/bionic/libc_init_common.cpp b/libc/bionic/libc_init_common.cpp
index 42787d5..1f099cf 100644
--- a/libc/bionic/libc_init_common.cpp
+++ b/libc/bionic/libc_init_common.cpp
@@ -243,6 +243,7 @@
"LD_SHOW_AUXV",
"LD_USE_LOAD_BIAS",
"LIBC_DEBUG_MALLOC_OPTIONS",
+ "LIBC_HOOKS_ENABLE",
"LOCALDOMAIN",
"LOCPATH",
"MALLOC_CHECK_",