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


1 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.)
2 somemethod() {
3 <normal code>
4 AccessController.doPrivileged (new PrivilegedAction()
5 {
6 public Object run()
7 { <insert dangerous code here> return null; }
8 });
9 <more normal code>
10 }

in Table To:


© 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