From 12b3084ecc9da5b768fb7c9a9180d54b3d24ee43 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Thu, 20 Jun 2013 20:09:43 +0200 Subject: Security: Tighten DynamicLinker*, NativeLibrary and DynamicLibraryBundle access. --- make/joal-alextabstract-CustomJavaCode.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'make/joal-alextabstract-CustomJavaCode.java') diff --git a/make/joal-alextabstract-CustomJavaCode.java b/make/joal-alextabstract-CustomJavaCode.java index e73dc60..e467fc7 100644 --- a/make/joal-alextabstract-CustomJavaCode.java +++ b/make/joal-alextabstract-CustomJavaCode.java @@ -1,11 +1,15 @@ private static final ALExtProcAddressTable alExtProcAddressTable; static { - alExtProcAddressTable = new ALExtProcAddressTable(); - if(null==alExtProcAddressTable) { - throw new RuntimeException("Couldn't instantiate ALExtProcAddressTable"); - } - alExtProcAddressTable.reset(ALImpl.alDynamicLookupHelper); + alExtProcAddressTable = AccessController.doPrivileged(new PrivilegedAction() { + public ALExtProcAddressTable run() { + final ALExtProcAddressTable alExtProcAddressTable = new ALExtProcAddressTable(); + if(null==alExtProcAddressTable) { + throw new RuntimeException("Couldn't instantiate ALExtProcAddressTable"); + } + alExtProcAddressTable.reset(ALImpl.alDynamicLookupHelper); + return alExtProcAddressTable; + } } ); } public static ALExtProcAddressTable getALExtProcAddressTable() { return alExtProcAddressTable; } -- cgit v1.2.3