[libbluray-devel] JSM: allow deleting writable files
hpi1
git at videolan.org
Mon Mar 23 11:51:44 CET 2015
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Mar 23 12:27:54 2015 +0200| [44fc7126a11a4bfcaa87ffa1e8dbb3c0e1c265fb] | committer: hpi1
JSM: allow deleting writable files
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=44fc7126a11a4bfcaa87ffa1e8dbb3c0e1c265fb
---
src/libbluray/bdj/java/org/videolan/BDJSecurityManager.java | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/libbluray/bdj/java/org/videolan/BDJSecurityManager.java b/src/libbluray/bdj/java/org/videolan/BDJSecurityManager.java
index 0176a36..abbd667 100644
--- a/src/libbluray/bdj/java/org/videolan/BDJSecurityManager.java
+++ b/src/libbluray/bdj/java/org/videolan/BDJSecurityManager.java
@@ -99,6 +99,17 @@ final class BDJSecurityManager extends SecurityManager {
}
}
+ else if (perm instanceof FilePermission) {
+ /* grant delete for writable files */
+ if (perm.getActions().equals("delete")) {
+ if (canReadWrite(perm.getName())) {
+ return;
+ }
+ checkWrite(perm.getName());
+ return;
+ }
+ }
+
/* Networking */
else if (perm instanceof java.net.SocketPermission) {
if (new java.net.SocketPermission("*", "connect,resolve").implies(perm)) {
More information about the libbluray-devel
mailing list