aboutsummaryrefslogtreecommitdiffstats
path: root/netx/net
diff options
context:
space:
mode:
authorAndrew Su <[email protected]>2011-01-21 16:42:18 -0500
committerAndrew Su <[email protected]>2011-01-21 16:42:18 -0500
commitd277b6ba50730b256a3b633c7c95798657d149d8 (patch)
treeb3c330092bfaa989444ab7750eb73269a0c4f097 /netx/net
parentbb6b80c486570b23c058ea0ff9ce97ad3834a53a (diff)
Make log file permissions owner accessible only.
Diffstat (limited to 'netx/net')
-rw-r--r--netx/net/sourceforge/jnlp/AppletLog.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/netx/net/sourceforge/jnlp/AppletLog.java b/netx/net/sourceforge/jnlp/AppletLog.java
index bde8ede..9c178f8 100644
--- a/netx/net/sourceforge/jnlp/AppletLog.java
+++ b/netx/net/sourceforge/jnlp/AppletLog.java
@@ -1,12 +1,15 @@
package net.sourceforge.jnlp;
import java.io.ByteArrayOutputStream;
+import java.io.File;
import java.io.PrintStream;
import java.util.logging.FileHandler;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.logging.XMLFormatter;
+import net.sourceforge.jnlp.util.FileUtils;
+
/**
* This class writes log information to file.
*
@@ -20,8 +23,8 @@ class AppletLog extends Log {
// If logging is enabled, we create logger.
if (enableLogging) {
String fn = icedteaLogDir + "plugin" + java.lang.System.currentTimeMillis() + ".log";
- boolean append = false;
- FileHandler fh = new FileHandler(fn, append);
+ FileUtils.createRestrictedFile(new File(fn), true);
+ FileHandler fh = new FileHandler(fn, false);
fh.setFormatter(new XMLFormatter());
String logClassName = AppletLog.class.getName();
logger = Logger.getLogger(logClassName);