jlahoda opened a new pull request #3386:
URL: https://github.com/apache/netbeans/pull/3386
This is a prototype of an attempt to replace the deprecated SecurityManager
with a custom agent-based hooks.
What functionality is kept:
-preventing inadvertent System.exit
-tracking file I/O (probably the most complex part, might be missing some
hooks)
-checking for deprecated system property access
-checking calls to setAccessible to open Unsafe (this didn't work on JDK 8+,
but can be fixed)
-checking/preventing calls to System.setSecurityManager. Possibly no longer
that critical, as it is not possible to disable the hooks using this method.
-tracking new Window creation (used by internal execution)
What functionality is not kept:
-`checkConnect` for connecting over network. This didn't seem to be actually
used, as the original code:
```
try {
checkPermission(allPermission);
return;
} catch (SecurityException e) {
}
//proceed with the actual check
```
But `checkPermission` seems to always(?) pass, so the check was never
performed
-`checkLogger`, which was disabled anyway
-tweaks related to installation of a custom Swing clipboard - these appear
to exists for JDK-4818143, which is marked as fixed, so presumably not needed
anymore.
When looking at the patch, `TrackingAgent` is the agent class that does
various transformations to install hooks, `TrackingHooks` are the callback,
`TopSecurityManager` (`o.n.bootstrap`), `FileChangedManager` (`masterfs`),
`SecMan` (`core.execution`) are the actual uses of the hooks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists