首页 > 试题广场 >

Describe how the Java protecti

[问答题]

Describe how the Java protection model would be sacrificed if a Java program were allowed to directly alter the annotations of its stack frame.

推荐

When a Java thread issues an access request in a doPrivileged() block,the stack frame of the calling thread is annotated according to the calling thread's protection domain.A thread with an annotated stack frame can make subsequent method calls that require certain privileges.Thus,the annotation serves to mark a calling thread as being privileged.By allowing a Java program to directly alter the annotations of a stack frame,a program could potentially perform an operation for which it does not have the necessary permissions,thus violating the security model of Java.

发表于 2018-03-25 10:23:14 回复(0)