1 // granted to jtreg 2 grant codebase "file:/net/koori.sfbay/-" { 3 permission java.security.AllPermission; 4 }; 5 6 // granted to the test class 7 grant codebase "file:${test.classes}/" { 8 permission javax.security.auth.AuthPermission "modifyPrincipals"; 9 permission javax.security.auth.AuthPermission "doAs"; 10 permission java.io.FilePermission "/testFile", "read"; 11 }; 12 13 // granted to the test action 14 // -- the test moves the compiled action into the src directory 15 // -- via the shell script. this way we can ensure different 16 // -- codebases for the test and the action 17 grant codebase "file:${test.src}/", 18 principal com.sun.security.auth.SolarisPrincipal "TestPrincipal", 19 principal com.sun.security.auth.SolarisPrincipal "${bad.property}" { 20 permission java.io.FilePermission "/testFile", "read"; 21 };