Commit 782bcb9f by Gary Benson Committed by Gary Benson

File.java (renameTo): Fix security checks.

2006-07-12  Gary Benson  <gbenson@redhat.com>

	* java/io/File.java (renameTo): Fix security checks.

From-SVN: r115373
parent b3eb1e0e
2006-07-12 Gary Benson <gbenson@redhat.com>
* java/io/File.java (renameTo): Fix security checks.
2006-07-12 Bryce McKinlay <mckinlay@redhat.com>
PR libgcj/28352
......
......@@ -1298,12 +1298,10 @@ public class File implements Serializable, Comparable
public synchronized boolean renameTo(File dest)
{
SecurityManager s = System.getSecurityManager();
String sname = getName();
String dname = dest.getName();
if (s != null)
{
s.checkWrite (sname);
s.checkWrite (dname);
s.checkWrite (getPath());
s.checkWrite (dest.getPath());
}
return performRenameTo (dest);
}
......
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