Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import java.io.IOException;
import java.nio.channels.FileLock;

import jline.internal.Log;
import org.apache.jute.BinaryInputArchive;
import org.apache.jute.BinaryOutputArchive;
import org.apache.jute.InputArchive;
Expand Down Expand Up @@ -133,8 +134,12 @@ public synchronized void update(long logZxid, long snapZxid) throws IOException
}

if (!statusFile.exists()) {
System.out.println("Creating file " + statusFile.getAbsolutePath());
Log.info("BackupStatus::update(): Creating statusFile " + statusFile.getAbsolutePath());
statusFile.createNewFile();
statusFile.setReadable(true, false);
// TODO: potentially insecure. making this writable might make this vulnerable to tampering
// TODO: but file lock file needs to be worldwide-writable
statusFile.setWritable(true, false);
}

FileOutputStream os = null;
Expand Down