Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9e9061f6 authored by Dimitry Ivanov's avatar Dimitry Ivanov
Browse files

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
parent 9c08f6bb
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -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 */);