JDK building from source - Prevent user name leaking into the generated binary?

Jaikiran Pai jai.forums2013 at gmail.com
Mon Jan 11 04:43:53 UTC 2021


I build the JDK from source using "make images". When I use that JDK 
binary, the user name of the user who built the binary "leaks" into some 
of the runtime system properties and (of course as a result) into the 
output of java -version. Here's the output of java -version of such a 
built JDK:


openjdk version "16-internal" 2021-03-16
OpenJDK Runtime Environment (build 16-internal+0-adhoc.jaikiran.jdk16)
OpenJDK 64-Bit Server VM (build 16-internal+0-adhoc.jaikiran.jdk16, 
mixed mode, sharing)


Notice the "jaikiran" in that output - that's the user name who built 
the JDK. Furthermore, this also ends up in runtime properties like:


java.runtime.version = 16-internal+0-adhoc.jaikiran.jdk16
...
java.vm.version = 16-internal+0-adhoc.jaikiran.jdk16


Is there a way/option that I can use while building the JDK that will 
prevent this user name leaking into the built binary? Better still can 
that option be the default?


-Jaikiran





More information about the build-dev mailing list