From f5a3099c509cf9b8a4ce9c3073a4db47e14a23bc Mon Sep 17 00:00:00 2001 From: Dmitriy Ivanov Date: Wed, 11 Nov 2015 14:18:55 -0800 Subject: Use isolated namespaces for app native libs Linker namespaces provide necessary level of isolation for application native libraries. The native libraries will no longer be able to mistakenly depend on platform private libraries like /system/lib/libssl.so This change creates one namespace for each instance of class-loader and uses it when loading native libraries. For backwards compatibility with older apps we keep using default namespace and LD_LIBRARY_PATH if target sdk version is <= 23. (currently set to 0 for testing) Bug: http://b/22548808 Change-Id: I64e97af7450fbf7e3740ccddda96bb2f7c52e03b --- runtime/java_vm_ext.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'runtime/java_vm_ext.h') diff --git a/runtime/java_vm_ext.h b/runtime/java_vm_ext.h index 618f6faad5..85597695af 100644 --- a/runtime/java_vm_ext.h +++ b/runtime/java_vm_ext.h @@ -82,11 +82,11 @@ class JavaVMExt : public JavaVM { /** * Loads the given shared library. 'path' is an absolute pathname. * - * Returns 'true' on success. On failure, sets 'detail' to a + * Returns 'true' on success. On failure, sets 'error_msg' to a * human-readable description of the error. */ bool LoadNativeLibrary(JNIEnv* env, const std::string& path, jobject javaLoader, - std::string* error_msg); + jstring library_path, jstring permitted_path, std::string* error_msg); // Unload native libraries with cleared class loaders. void UnloadNativeLibraries() -- cgit v1.2.3-59-g8ed1b