8034043/8034026 - clean up of a few native code issues to align things with modules
Alan Bateman
Alan.Bateman at oracle.com
Mon Feb 10 11:47:17 UTC 2014
This patch is a clean-up to fix a number issues that arise trying to
align native libraries with possible future modules.
The first is the preferences API where the native code is currently
linked into libjava for Windows/Linux/Solaris and libosx on OS X. This
patch moves the native sources down to a prefs sub-directory (to follow
long standing conventions) and links the resulting code into a new
libprefs (all platforms). The rational for this is that the preferences
API is a reasonable candidate for a module and it is odd to have its
native methods in libraries that are likely to be in other modules. See
also JDK-8034074 [1] for an opportunity for anyone so inclined to
eliminate some of this code.
The logging API is another case where it has native code linked into
libjava. It's for the somewhat obscure case where the VM is running as a
setuid process and the FileHandler is configured to include the user's
home directory. For now, I've moved this to sun.misc.VM on the
assumption that there may be other places where we need to know if we
are running with setuid. We have to do a general clean-up of sun.misc
and that may be the time to move it to a better home.
In the security area then the OS X implementation of the native methods
for sun.security.krb5.SCDynamicStoreConfig were put in the wrong
location by the OS X port (src/macosx/native/java/util???) and also
linked to the wrong library (libosx.dylib). This patch moves the source
and links it into existing libosxkrb5.dylib along with the other OS X
specific Kerberos code. This is code that is not exercised by the tests
as it requires Open Directory to be configured. Thanks to Max Wang for
trying out a preliminary version of this patch to ensure that it
continues to work.
One comment on SecurityLibraries.gmk is it's using hardcoded paths to
the OS X frameworks. Erik Joelsson told me that this is on the build
group's list of things to fix up in the future.
The webrev with the proposed changes is here:
http://cr.openjdk.java.net/~alanb/8034043%2b8034026/webrev/
-Alan.
[1] https://bugs.openjdk.java.net/browse/JDK-8034074
More information about the security-dev
mailing list