FYI: fix File.deleteOnExit() security check

Gary Benson gbenson@redhat.com
Tue Jul 18 11:27:00 GMT 2006


Hi all,

This commit fixes the security check performed by File.deleteOnExit().
It was only performed on the filename part of the path instead of the
full path.

Cheers,
Gary
-------------- next part --------------
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 115526)
+++ ChangeLog	(working copy)
@@ -1,3 +1,7 @@
+2006-07-18  Gary Benson  <gbenson@redhat.com>
+
+	* java/io/File.java (deleteOnExit): Fix security check.
+
 2006-07-14  Anthony Green  <green@redhat.com>
 
 	* java/io/natFilePosix.cc (performSetLastModified): Return true on
Index: java/io/File.java
===================================================================
--- java/io/File.java	(revision 115526)
+++ java/io/File.java	(working copy)
@@ -1388,7 +1388,7 @@
     // Check the SecurityManager
     SecurityManager sm = System.getSecurityManager();
     if (sm != null)
-      sm.checkDelete (getName());
+      sm.checkDelete (getPath());
 
     DeleteFileHelper.add(this);
   }


More information about the Java-patches mailing list