Basic HTML version of Foils prepared May 19 99

Foil 71 JAVA Fine-grained Access Control-7

From Remarks on Internet and Java Security Basic Information Track Computational Science Course CPS616 -- Spring Semester 1999. by Geoffrey Fox, Mehmet Sen


Here is what the usage of privileged code looks like. Note the use of Java's inner classes capability:(If you are using an anonymous inner class, any local variables you access must be final to make JAVA language looks like having closures.)
somemethod() {
<normal code>
AccessController.doPrivileged (new PrivilegedAction()
{
public Object run()
{ <insert dangerous code here> return null; }
});
<more normal code>
}



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Wed May 19 1999