[jdk18] RFR: JDK-8278967 rmiregistry fails to start because SecurityManager is disabled [v2]

Stuart Marks smarks at openjdk.java.net
Wed Dec 22 01:30:15 UTC 2021


On Wed, 22 Dec 2021 01:18:58 GMT, Stuart Marks <smarks at openjdk.org> wrote:

>> Enable the security manager in rmiregistry's launcher arguments.
>
> Stuart Marks has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Change java.security.manager to "allow"; filter warning lines from VersionCheck

Enabling the security manager using a property, versus setting the property to `allow` and enabling it in code, is mostly a distinction without a difference. I don't think there is really a need to have the different tools be consistent. Local tool considerations probably swamp the need for any cross-tool consistency.

In this case some of the RMI registry tests set the property to `allow` on the command line and then rely on the code to enable the security manager using the API, so it's much easier to switch the `rmiregistry` launcher to use the `allow` technique instead. This is sort-of the tail (the tests) wagging the doc (the tool) but there doesn't seem to any benefit to be gained from fiddling around with the tests and the RMI test library.

I've also updated VersionCheck.java to filter out the security manager warning messages.

-------------

PR: https://git.openjdk.java.net/jdk18/pull/45


More information about the security-dev mailing list