RFR: 8026404 - Logging in Applet can trigger ACE: access denied ("java.lang.RuntimePermission" "modifyThreadGroup")

Alan Bateman Alan.Bateman at oracle.com
Mon Oct 14 18:19:24 UTC 2013


On 14/10/2013 19:05, Daniel Fuchs wrote:
> Hi,
>
> Please find below a fix for:
>
>    8026404: Logging in Applet can trigger ACE:
>          access denied ("java.lang.RuntimePermission"
>          "modifyThreadGroup")
>
> In some circumstances the call to JavaAWTAccess.getAppletContext()
> will trigger a call to ecx.threadGroup.getParent() == null
> The trouble is that this call will require a "modifyThreadGroup"
> permission if it happens that ecx.threadGroup.getParent() is
> the root thread group.
>
> The fix for that is simple - the call to
>     ecx.threadGroup.getParent() == null
> needs to be done within a doPrivileged:
>
> <http://cr.openjdk.java.net/~dfuchs/webrev_8026404/webrev.00/>
>
> The reg test fails without the fix and passes with it.
The change looks okay to me but I would suggest sending to awt-dev so 
that the folks that maintain this area know about it.

On the test then does initializing SunToolkit cause AWT to be 
initialized? I just wonder if this test will run headless.

-Alan.



More information about the core-libs-dev mailing list