aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/jogamp/common/os/UnixDynamicLinkerImpl.java
Commit message (Collapse)AuthorAgeFilesLines
* UnixDynamicLinkerImpl: Unify impl. of openLibraryLocal(..), ↵Sven Gothel2013-06-251-0/+22
| | | | openLibraryGlobal(..) and lookupSymbolGlobal(..) - removing duplicate code.
* Security: Tighten DynamicLinker*, NativeLibrary and DynamicLibraryBundle ↵Sven Gothel2013-06-211-6/+9
| | | | | | | | | | | | | | | | | | | | | | access (2) - Completes 23341a2df2d2ea36784a16fa1db8bc7385351a12 - Replace 'DynamicLinker' interface w/ well documented one - All DynamicLinker methods are now considered secure, i.e.: - open/lookup and close utilize reference counting on handle via a hash map. - lookupSymbol(..) and close(..) impl. validate the passed library handle whether it's retrieved via open*. This is the fast path, not that expensive. - lookupSymbolGlobal(..) performs Check acccess of 'new RuntimePermission("loadLibrary.*")' if SecurityManager is installed. This is the slow path. - DynamicLibraryBundleInfo now reflects the security requirements, i.e. whether priviledged access is needed.
* DynamicLinker*: Proper Override notationSven Gothel2013-06-201-0/+3
|
* Security: Tighten DynamicLinker*, NativeLibrary and DynamicLibraryBundle access.Sven Gothel2013-06-201-51/+41
|
* Robostness: Catch Throwables on NativeLibrary.open(..) and be verbose in ↵Sven Gothel2013-06-181-1/+4
| | | | DEBUG mode ; DynamicLinker: Add 'String getLastError()'.
* Fix DynamicLinker Impl: Add Bionic specialization using Bionic's non POSIX ↵Sven Gothel2013-06-161-15/+14
| | | | | | | | | | | | | | | values; Using same pattern for Mac OS X. Add Bionic specialization using Bionic's non POSIX values - derive from UnixDynamicLinkerImpl - specify own flag and mode values - use UnixDynamicLinkerImpl native code Using same pattern for Mac OS X - derive from UnixDynamicLinkerImpl - specify own flag and mode values - use UnixDynamicLinkerImpl native code - drop MacOSXDynamicLinkerImpl native code
* Bug 752: Review Code Vulnerabilities (Permission Checks of new exposed code ↵Sven Gothel2013-06-111-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and privileged access) This review focuses on how we perform permission checks, or better - do we circumvent some assuming full privileges ? Some native methods do need extra permission validation, i.e. loading native libraries. Further more AccessController.doPrivileged(..) shall not cover generic code exposing a critical feature to the user. Further more .. we should rely on the SecuritManager, i.e. AccessControlContext's 'checkPermission(Permission)' code to comply w/ fine grained permission access. It is also possible to have full permission w/o having any certificates (-> policy file). +++ We remove implicit AccessController.doPrivileged(..) from within our trusted code for generic methods, like Property access, temp. files. +++ SecurityUtil: - Remove 'getCommonAccessControlContext(Class<?> clz)', which returned a local AccessControlContext for later restriction if the passed class contains all certificates as the 'trusted' GlueGen class has. - Simply expose convenient permission check methods relying on SecurityManager / AccessControlContext. PropertyAccess: - 'protected static void addTrustedPrefix(..)' requires AllPermissions if SecurityManager is installed. - Remove implicit doPrivileged(..) triggered by passed AccessControlContext instance, only leave it for trusted prefixes. IOUtil: - Remove all doPrivileged(..) - Elevation shall be performed by caller. DynamicLinker: - 'public long openLibraryLocal(..)' and 'public long openLibraryGlobal(..)' may throw SecurityException, if a SecurityManager is installed and the dyn. link permission is not granted in the calling code. Implemented in their respective Unix, OSX and Windows manifestation. Caller has to elevate privileges via 'doPrivileged(..) {}' ! +++ Tests: - Property access - File access - Native library loading Manual Applet test (unsigned, but w/ SecurityManager and policy file): > gluegen/test/applet Applet has been tested w/ signed JAR w/ Firefox and Java7 on GNU/Linux as well. Manual Application test (unsigned, but w/ SecurityManager and policy file): com.jogamp.junit.sec.TestSecIOUtil01 - Run w/ SecurityManager and policy file: - gluegen/scripts/runtest-secmgr.sh - Run w/o SecurityManager: - gluegen/scripts/runtest.sh
* gluegen: remove executable bit from java and c source filesHarvey Harrison2013-04-091-0/+0
| | | | Signed-off-by: Harvey Harrison <[email protected]>
* DynamicLibraryBundle (enhancement)Sven Gothel2012-02-121-2/+10
| | | | | | | - Hold DEBUG, DEBUG_LOOKUP in DynamicLookupHelper - Tool complete only if named tool's GetProcAddressFunc is avail - Allow no tool/glue lib's - Use DEBUG_LOCKUP for lockup symbol trace
* Hide DynamicLinker impl.; Remove public AndroidPackageUtil ; ↵Sven Gothel2011-08-031-0/+65
GluegenVersionActivity uses ApplicationContext Hide DynamicLinker impl.: - com.jogamp.common.os.*DynamicLinkerImpl -> jogamp.common.os