Author: toad
Date: 2007-03-29 19:58:07 +0000 (Thu, 29 Mar 2007)
New Revision: 12425

Modified:
   trunk/freenet/src/freenet/support/io/FileBucket.java
Log:
comments

Modified: trunk/freenet/src/freenet/support/io/FileBucket.java
===================================================================
--- trunk/freenet/src/freenet/support/io/FileBucket.java        2007-03-29 
19:56:20 UTC (rev 12424)
+++ trunk/freenet/src/freenet/support/io/FileBucket.java        2007-03-29 
19:58:07 UTC (rev 12425)
@@ -154,6 +154,14 @@
                length = 0;
        }

+       /**
+        * Internal OutputStream impl.
+        * If createFileOnly is set, we won't overwrite an existing file, and 
we write to a temp file
+        * then rename over the target. Note that we can't use createNewFile 
then new FOS() because while
+        * createNewFile is atomic, the combination is not, so if we do it we 
are vulnerable to symlink
+        * attacks.
+        * @author toad
+        */
        class FileBucketOutputStream extends FileOutputStream {

                private long restartCount;


Reply via email to