[libbluray-devel] BDJSecurityManager: deny exec() and exit()

hpi1 git at videolan.org
Fri Feb 27 11:52:39 CET 2015


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Thu Feb 26 11:01:42 2015 +0200| [07c08e4e02d5b795cc6c7c033fad93419261f657] | committer: hpi1

BDJSecurityManager: deny exec() and exit()

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=07c08e4e02d5b795cc6c7c033fad93419261f657
---

 .../bdj/java/org/videolan/BDJSecurityManager.java      |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/libbluray/bdj/java/org/videolan/BDJSecurityManager.java b/src/libbluray/bdj/java/org/videolan/BDJSecurityManager.java
index 1944886..8a7b682 100644
--- a/src/libbluray/bdj/java/org/videolan/BDJSecurityManager.java
+++ b/src/libbluray/bdj/java/org/videolan/BDJSecurityManager.java
@@ -38,8 +38,24 @@ class BDJSecurityManager extends SecurityManager {
         */
     }
 
+    public void checkExec(String cmd) {
+        logger.error("Exec(" + cmd + ") denied\n" + Logger.dumpStack());
+        throw new SecurityException("exec denied");
+    }
+
+    public void checkExit(int status) {
+        logger.error("Exit(" + status + ") denied\n" + Logger.dumpStack());
+        throw new SecurityException("exit denied");
+    }
+
     public void checkRead(String file) {
         //super.checkRead(file);
         BDJLoader.accessFile(file);
     }
+
+    /*
+     *
+     */
+
+    private static final Logger logger = Logger.getLogger(BDJSecurityManager.class.getName());
 }



More information about the libbluray-devel mailing list