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-alcabstract-CustomJavaCode.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'make/joal-alcabstract-CustomJavaCode.java') diff --git a/make/joal-alcabstract-CustomJavaCode.java b/make/joal-alcabstract-CustomJavaCode.java index 3420cc2..debadad 100755 --- a/make/joal-alcabstract-CustomJavaCode.java +++ b/make/joal-alcabstract-CustomJavaCode.java @@ -1,11 +1,15 @@ private static final ALCProcAddressTable alcProcAddressTable; static { - alcProcAddressTable = new ALCProcAddressTable(); - if(null==alcProcAddressTable) { - throw new RuntimeException("Couldn't instantiate ALCProcAddressTable"); - } - alcProcAddressTable.reset(ALImpl.alDynamicLookupHelper); + alcProcAddressTable = AccessController.doPrivileged(new PrivilegedAction() { + public ALCProcAddressTable run() { + final ALCProcAddressTable alcProcAddressTable = new ALCProcAddressTable(); + if(null==alcProcAddressTable) { + throw new RuntimeException("Couldn't instantiate ALCProcAddressTable"); + } + alcProcAddressTable.reset(ALImpl.alDynamicLookupHelper); + return alcProcAddressTable; + } } ); } public static ALCProcAddressTable getALCProcAddressTable() { return alcProcAddressTable; } -- cgit v1.2.3