aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--netx/net/sourceforge/jnlp/AppletLog.java7
2 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 9c508b8..9d6c341 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2011-01-20 Andrew Su <[email protected]>
+ * netx/net/sourceforge/jnlp/AppletLog.java: Restrict log files to
+ owner accessible only.
+
+2011-01-20 Andrew Su <[email protected]>
+
Removing dead/commented/unused code.
* plugin/icedteanp/java/sun/applet/GetWindowPluginCallRequest.java:
Removed unused imports.
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);