aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/common/os/DynamicLinker.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-01-30 21:09:17 +0100
committerSven Gothel <[email protected]>2015-01-30 21:09:17 +0100
commit12feaa7d3b1544098f684d851e3caff1ec88cbc8 (patch)
tree2d979c57cca37220bc026a8ee08ee479ae0508bf /src/java/com/jogamp/common/os/DynamicLinker.java
parent3caf446e29a3934900b9983dfd72cb8aa0d9e8d7 (diff)
Refine Native Library Code: Bulk Permissions, Cleanup DynamicLinker impl. - and fix Android AArch64 BionicDynamicLinker (Bug 1122)
- Bulk Permissions ProcAddressTable.reset(..) performs address lookup in one block. Now claiming all permissions upfront once, and releasing them afterwards. - Cleanup DynamicLinker impl. Proper top-down impl. of DynamicLinkerImpl, handling all security code and validations. - Fix Android AArch64 BionicDynamicLinker (Bug 1122) Dalvik uses diff RTLD_* defines for AArch64!
Diffstat (limited to 'src/java/com/jogamp/common/os/DynamicLinker.java')
-rw-r--r--src/java/com/jogamp/common/os/DynamicLinker.java17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/java/com/jogamp/common/os/DynamicLinker.java b/src/java/com/jogamp/common/os/DynamicLinker.java
index 3b1ec3f..4019c77 100644
--- a/src/java/com/jogamp/common/os/DynamicLinker.java
+++ b/src/java/com/jogamp/common/os/DynamicLinker.java
@@ -34,6 +34,16 @@ public interface DynamicLinker {
public static final boolean DEBUG_LOOKUP = NativeLibrary.DEBUG_LOOKUP;
/**
+ * @throws SecurityException if user is not granted global access
+ */
+ public void claimAllLinkPermission() throws SecurityException;
+
+ /**
+ * @throws SecurityException if user is not granted global access
+ */
+ public void releaseAllLinkPermission() throws SecurityException;
+
+ /**
* If a {@link SecurityManager} is installed, user needs link permissions
* for the named library.
* <p>
@@ -80,8 +90,9 @@ public interface DynamicLinker {
* @param symbolName global symbol name to lookup up system wide.
* @return the library handle, maybe 0 if not found.
* @throws IllegalArgumentException in case case <code>libraryHandle</code> is unknown.
+ * @throws SecurityException if user is not granted access for the given library handle
*/
- public long lookupSymbol(long libraryHandle, String symbolName) throws IllegalArgumentException;
+ public long lookupSymbol(long libraryHandle, String symbolName) throws SecurityException, IllegalArgumentException;
/**
* Security checks are implicit by previous call of
@@ -89,9 +100,11 @@ public interface DynamicLinker {
* retrieving the <code>librarHandle</code>.
*
* @param libraryHandle a library handle previously retrieved via {@link #openLibraryLocal(String, boolean)} or {@link #openLibraryGlobal(String, boolean)}.
+ * @param debug set to true to enable debugging
* @throws IllegalArgumentException in case case <code>libraryHandle</code> is unknown.
+ * @throws SecurityException if user is not granted access for the given library handle
*/
- public void closeLibrary(long libraryHandle) throws IllegalArgumentException;
+ public void closeLibrary(long libraryHandle, boolean debug) throws SecurityException, IllegalArgumentException;
/**
* Returns a string containing the last error.