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

Stuart Marks smarks at openjdk.java.net
Mon Dec 20 22:35:34 UTC 2021


On Fri, 17 Dec 2021 20:01:27 GMT, Stuart Marks <smarks at openjdk.org> wrote:

> Enable the security manager in rmiregistry's launcher arguments.

I think there's little to worry about with custom configurations of the `rmiregistry` tool. What somebody might do is to enable a customized security manager using properties... of course they'd also have to ensure that the customized SM is somewhere in the classpath as well, by adding more command line options. That seems fairly unlikely to me. Anyone who wants to run an RMI registry service in some specialized configuration would probably just set things up themselves and then use the `LocateRegistry.createRegistry` API instead of trying to tinker with the `rmiregistry` command.

If `rmiregistry` enables the SM using properties, then yes we can probably change the code to assert that the SM is running instead of conditionally enabling it like it does now.

Next headache is that `tools/launcher/VersionCheck.jtr` fails because it sees the warning messages instead of the version string. (Argh!) Interestingly this test passes even though `rmiregistry` currently fails to operate normally, because it runs well enough to print its version string, but not well enough to start up a registry service. (Double argh!)

The warnings policy is a separate issue being discussed elsewhere.

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

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


More information about the security-dev mailing list