Commit 10e20c0b authored by Petri Hintukainen's avatar Petri Hintukainen

JSM: check reads in checkPermission()

Some code paths in JRE use it directly
parent 53a132b0
......@@ -109,6 +109,16 @@ final class BDJSecurityManager extends SecurityManager {
checkWrite(perm.getName());
return;
}
/* grant read access to BD files */
if (perm.getActions().equals("read")) {
String file = getCanonPath(perm.getName());
if (canRead(file)) {
if (usingUdf) {
BDJLoader.accessFile(file);
}
return;
}
}
}
/* Networking */
......@@ -192,22 +202,6 @@ final class BDJSecurityManager extends SecurityManager {
return false;
}
public void checkRead(String file) {
file = getCanonPath(file);
if (usingUdf) {
BDJLoader.accessFile(file);
}
if (canRead(file)) {
return;
}
//logger.error("Xlet read " + file + " denied at\n" + Logger.dumpStack());
super.checkRead(file);
}
/*
* File write access
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment