forked from KITPraktomatTeam/Praktomat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove Java's Security Manager deprecation message from Checker-Outputs.
add some documentation information into java.policy and junit.policy see KITPraktomatTeam#350 see KITPraktomatTeam#307 closes KITPraktomatTeam#307
- Loading branch information
Robert Hartmann (FB02, H-BRS)
authored and
Robert Hartmann (FB02, H-BRS)
committed
Jan 23, 2023
1 parent
92d1cf5
commit b7101a2
Showing
9 changed files
with
112 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,41 @@ | ||
// Default java policy for the praktomat | ||
// Set as $POLICY by ScriptChecker and used by ./src/checker/scripts/java | ||
// Set as $POLICY by ScriptChecker and DejaGnuChecker via settings.JVM_POLICY and used by ./src/checker/scripts/java | ||
grant { | ||
// If Java (and student solutions) should be allowed to read the temporary created working directory, than activate the following three lines: | ||
// permission java.util.PropertyPermission "user.dir", "read"; // user.dir contains the name of a temporary folder inside work-data/SolutionSandbox | ||
// permission java.io.FilePermission "${user.dir}" , "read"; // allow to read user.dir, where uploaded files were stored temporary | ||
// permission java.io.FilePermission "${user.dir}${/}-" , "read"; // allow to read directory and recursivly all files and subdirectories | ||
//// Following information about special pathnames taken from Java 18 API class FilePermission: | ||
//// permission java.io.FilePermission "*" , "read"; // read all files in current directory | ||
//// permission java.io.FilePermission "-", "read"; // read all files in current directory and recursivly all files and subdirectories | ||
//// permission java.io.FilePermission "<<ALL FILES>>", "read"; // read all files on disc ... | ||
|
||
/////////////// | ||
|
||
permission java.lang.RuntimePermission "shutdownHooks"; | ||
permission java.lang.RuntimePermission "setIO"; | ||
permission java.lang.RuntimePermission "setIO"; // change sysout, stderr, stdin | ||
}; | ||
|
||
// Settings for own java-based TestFrameworks started via ScriptChecker ... perhaps switch to use JavaChecker and junit.policy | ||
|
||
grant codeBase "file:TestRunner.jar" { | ||
permission java.lang.RuntimePermission "createClassLoader"; | ||
permission java.util.PropertyPermission "user.dir", "read"; // get current working dir | ||
permission java.io.FilePermission "${user.dir}" , "read"; | ||
permission java.io.FilePermission "${user.dir}${/}-" , "read"; | ||
// Following information about special pathnames taken from Java 18 API class FilePermission: | ||
// permission java.io.FilePermission "*" , "read"; // read all files in current directory | ||
permission java.io.FilePermission "-", "read"; // read all files in current directory and recursivly all files and subdirectories | ||
// permission java.io.FilePermission "<<ALL FILES>>", "read"; // read all files on disc ... | ||
permission java.io.FilePermission "debug.log", "write"; | ||
permission java.lang.RuntimePermission "setIO"; // change sysout, stderr, stdin | ||
}; | ||
|
||
grant codeBase "file:TestSuite.jar" { | ||
// TestIO | ||
permission java.lang.RuntimePermission "setIO"; // change sysout, syserr & sysin | ||
|
||
// TypeChecks | ||
permission java.lang.RuntimePermission "accessDeclaredMembers"; | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters