Possible SecurityException creating processes on Linux

Alan Bateman Alan.Bateman at oracle.com
Sat Aug 28 08:36:03 UTC 2010


Martin Buchholz wrote:
> This is a bug report with fix.
>
> I didn't add enough doPrivileged blocks into my recent 
> UNIXProcess.java.linux.
>
> Not very likely in practice, but has been observed in the wild.
>
> Here's a fix:
>
> http://cr.openjdk.java.net/~martin/webrevs/openjdk7/ProcessDoPrivileged/ 
> <http://cr.openjdk.java.net/%7Emartin/webrevs/openjdk7/ProcessDoPrivileged/>
>
> Please review.
>
> Martin
I've created this:
  6980747: (process) Runtime.exec can fail due to SecurityException (lnx)

The fix looks fine.  It might be good to indent the second and third 
lines of the test summary to make it easier to distinguish the test tags 
from the text. On Windows I assume the "env" command will run the Cygwin 
or MKS "env" program rather than the built-in "env" command. It probably 
matter as the test doesn't actually need the child process to do anything.

-Alan.




More information about the core-libs-dev mailing list