Skip to content

Can't set java.security.egd system property #5132

@bozakp

Description

@bozakp

Environment

  • jruby 9.1.16.0 (2.3.3) 2018-02-21 8f3f95a Java HotSpot(TM) 64-Bit Server VM 25.161-b12 on 1.8.0_161-b12 +jit [darwin-x86_64]
  • Darwin Kernel Version 16.7.0: Tue Jan 30 11:27:06 PST 2018; root:xnu-3789.73.11~1/RELEASE_X86_64 x86_64

Expected Behavior

  • I expected to be able to set the java.security.egd java system property.

Actual Behavior

$ jruby -e "puts java.lang.System.getProperty('java.security.egd')"
file:/dev/urandom
$ jruby -J-Djava.security.egd=file:/dev/./urandom -e "puts java.lang.System.getProperty('java.security.egd')"
-Djava.security.egd=file:/dev/./urandom

Note that the value of the system property starts with -DJava.security.... Introduced in 1a4f888 (the fix for #4685), the value of JAVA_SECURITY_EGD is set to the whole argument, and not the value substring.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions