diff options
author | Dimitry Ivanov | 2016-05-16 19:08:06 -0500 |
---|---|---|
committer | Dimitry Ivanov | 2016-05-16 19:08:06 -0500 |
commit | b31caa95ec1ab9da7b300544e9716c1cac92d8f8 (patch) | |
tree | 3bbcffa2dbd5833476745d2916901c490590ef19 /libnativeloader | |
parent | 422492c5063956e4f69bdbe01a30b0bc54a5fb2c (diff) | |
download | platform-system-core-b31caa95ec1ab9da7b300544e9716c1cac92d8f8.tar.gz platform-system-core-b31caa95ec1ab9da7b300544e9716c1cac92d8f8.tar.xz platform-system-core-b31caa95ec1ab9da7b300544e9716c1cac92d8f8.zip |
Pass permitted_path to the linker as is.
Now that we have the fixed list of whitelisted libraries
there is no longer need to check if java_permitted_path is nullptr.
In fact checking it prevents custom classloaders created by apps
from loading libraries using absolute path.
Bug: http://b/28659864
Change-Id: I1bfc16a573b090f70f078ecccd0e4016939a5dc0
Diffstat (limited to 'libnativeloader')
-rw-r--r-- | libnativeloader/native_loader.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libnativeloader/native_loader.cpp b/libnativeloader/native_loader.cpp index 927cbec67..79518cac5 100644 --- a/libnativeloader/native_loader.cpp +++ b/libnativeloader/native_loader.cpp | |||
@@ -99,9 +99,7 @@ class LibraryNamespaces { | |||
99 | nullptr, | 99 | nullptr, |
100 | library_path.c_str(), | 100 | library_path.c_str(), |
101 | namespace_type, | 101 | namespace_type, |
102 | java_permitted_path != nullptr ? | 102 | permitted_path.c_str()); |
103 | permitted_path.c_str() : | ||
104 | nullptr); | ||
105 | 103 | ||
106 | if (ns != nullptr) { | 104 | if (ns != nullptr) { |
107 | namespaces_.push_back(std::make_pair(env->NewWeakGlobalRef(class_loader), ns)); | 105 | namespaces_.push_back(std::make_pair(env->NewWeakGlobalRef(class_loader), ns)); |