I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 373fce29 authored by zzz's avatar zzz
Browse files

change perms on append too

parent 8ac5d5d5
No related branches found
No related tags found
No related merge requests found
...@@ -30,7 +30,7 @@ public class SecureFileOutputStream extends FileOutputStream { ...@@ -30,7 +30,7 @@ public class SecureFileOutputStream extends FileOutputStream {
*/ */
public SecureFileOutputStream(String file, boolean append) throws FileNotFoundException { public SecureFileOutputStream(String file, boolean append) throws FileNotFoundException {
super(file, append); super(file, append);
if (!append) //if (!append)
setPerms(new File(file)); setPerms(new File(file));
} }
...@@ -48,7 +48,7 @@ public class SecureFileOutputStream extends FileOutputStream { ...@@ -48,7 +48,7 @@ public class SecureFileOutputStream extends FileOutputStream {
*/ */
public SecureFileOutputStream(File file, boolean append) throws FileNotFoundException { public SecureFileOutputStream(File file, boolean append) throws FileNotFoundException {
super(file, append); super(file, append);
if (!append) //if (!append)
setPerms(file); setPerms(file);
} }
......
package net.i2p.router; package net.i2p.router;
import java.io.File; import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.PrintStream; import java.io.PrintStream;
import net.i2p.util.SecureFileOutputStream;
/** /**
* This is the class called by the runplain.sh script on linux * This is the class called by the runplain.sh script on linux
* and the i2p.exe launcher on Windows. * and the i2p.exe launcher on Windows.
...@@ -33,7 +34,7 @@ public class RouterLaunch { ...@@ -33,7 +34,7 @@ public class RouterLaunch {
} }
System.setProperty(PROP_WRAPPER_LOG, logfile.getAbsolutePath()); System.setProperty(PROP_WRAPPER_LOG, logfile.getAbsolutePath());
try { try {
System.setOut(new PrintStream(new FileOutputStream(logfile, true))); System.setOut(new PrintStream(new SecureFileOutputStream(logfile, true)));
} catch (IOException ioe) { } catch (IOException ioe) {
ioe.printStackTrace(); ioe.printStackTrace();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment