diff options
Diffstat (limited to 'src/java/jogamp/common/os/MacOSXDynamicLinkerImpl.java')
-rw-r--r-- | src/java/jogamp/common/os/MacOSXDynamicLinkerImpl.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/java/jogamp/common/os/MacOSXDynamicLinkerImpl.java b/src/java/jogamp/common/os/MacOSXDynamicLinkerImpl.java index 4eb381f..95f7e63 100644 --- a/src/java/jogamp/common/os/MacOSXDynamicLinkerImpl.java +++ b/src/java/jogamp/common/os/MacOSXDynamicLinkerImpl.java @@ -3,6 +3,7 @@ package jogamp.common.os; import com.jogamp.common.os.DynamicLinker; +import com.jogamp.common.util.SecurityUtil; public class MacOSXDynamicLinkerImpl implements DynamicLinker { @@ -28,7 +29,7 @@ public class MacOSXDynamicLinkerImpl implements DynamicLinker { // --- Begin CustomJavaCode .cfg declarations - public long openLibraryLocal(String pathname, boolean debug) { + public long openLibraryLocal(String pathname, boolean debug) throws SecurityException { // Note we use RTLD_LOCAL visibility to _NOT_ allow this functionality to // be used to pre-resolve dependent libraries of JNI code without // requiring that all references to symbols in those libraries be @@ -36,10 +37,11 @@ public class MacOSXDynamicLinkerImpl implements DynamicLinker { // other words, one can actually link against the library instead of // having to dlsym all entry points. System.loadLibrary() uses // RTLD_LOCAL visibility so can't be used for this purpose. + SecurityUtil.checkLinkPermission(pathname); return dlopen(pathname, RTLD_LAZY | RTLD_LOCAL); } - public long openLibraryGlobal(String pathname, boolean debug) { + public long openLibraryGlobal(String pathname, boolean debug) throws SecurityException { // Note we use RTLD_GLOBAL visibility to allow this functionality to // be used to pre-resolve dependent libraries of JNI code without // requiring that all references to symbols in those libraries be @@ -47,6 +49,7 @@ public class MacOSXDynamicLinkerImpl implements DynamicLinker { // other words, one can actually link against the library instead of // having to dlsym all entry points. System.loadLibrary() uses // RTLD_LOCAL visibility so can't be used for this purpose. + SecurityUtil.checkLinkPermission(pathname); return dlopen(pathname, RTLD_LAZY | RTLD_GLOBAL); } |