Relax namespace restriction on system server classloader

Add java.library.path to list of permitted paths
for system server classloader. This allows libraries
loaded in system server classloader namespace to
dlopen libraries under /system/lib/somedir

Test: m
Bug: http://b/31652397
Change-Id: Ief70aaa81cde4983c8de1e07b4ef23e1fadf35a0
This commit is contained in:
Dimitry Ivanov
2016-09-20 10:50:40 -07:00
parent 9c08f6bb82
commit 9e9061f608

View File

@@ -476,11 +476,11 @@ public class ZygoteInit {
*/
private static PathClassLoader createSystemServerClassLoader(String systemServerClasspath,
int targetSdkVersion) {
String librarySearchPath = System.getProperty("java.library.path");
String libraryPath = System.getProperty("java.library.path");
return PathClassLoaderFactory.createClassLoader(systemServerClasspath,
librarySearchPath,
null /* libraryPermittedPath */,
libraryPath,
libraryPath,
ClassLoader.getSystemClassLoader(),
targetSdkVersion,
true /* isNamespaceShared */);