Need help with porting stuff out of classDepth
Fridrich Strba
fridrich.strba at suse.com
Mon Dec 18 16:28:30 UTC 2017
Hello, good people,
After removing some deprecated SecurityManager methods in jdk10, I am
trying to build libbluray, but there is this snippet that obviously is
broken with jdk10:
if (perm instanceof RuntimePermission) {
if (perm.implies(new
RuntimePermission("createSecurityManager"))) {
// allow initializing of javax.crypto.JceSecurityManager
if (classDepth("javax.crypto.JceSecurityManager") < 3) {
return;
}
deny(perm);
}
if (perm.implies(new RuntimePermission("setSecurityManager"))) {
if (classDepth("org.videolan.Libbluray") == 3) {
return;
}
deny(perm);
}
// work around bug in openjdk 7 / 8
// sun.awt.AWTAutoShutdown.notifyThreadBusy is missing
doPrivileged()
// (fixed in jdk9 /
http://hg.openjdk.java.net/jdk9/client/jdk/rev/5b613a3c04be )
if (classDepth("sun.awt.AWTAutoShutdown") > 0) {
return;
}
if (perm.implies(new RuntimePermission("modifyThreadGroup"))) {
/* do check here (no need to log failures) */
super.checkPermission(perm);
}
}
Could you please enlighten me how to port it out of the classDepth in a
way that it would work with jdk8 to jdk10?
Cheers
F.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <https://mail.openjdk.org/pipermail/security-dev/attachments/20171218/b8b0239d/signature.asc>
More information about the security-dev
mailing list