*Grumble*
authorsapanb <sapanb@8c455092-636d-4788-adf5-e71def0336e8>
Tue, 1 Jul 2008 18:02:33 +0000 (18:02 +0000)
committersapanb <sapanb@8c455092-636d-4788-adf5-e71def0336e8>
Tue, 1 Jul 2008 18:02:33 +0000 (18:02 +0000)
git-svn-id: http://svn.planet-lab.org/svn/fprobe-ulog/trunk@9771 8c455092-636d-4788-adf5-e71def0336e8

src/fprobe-ulog.c

index 38ceebf..d7b5206 100644 (file)
@@ -417,7 +417,7 @@ void update_cur_epoch_file(int n) {
        int fd, len;
        char snum[MAX_EPOCH_SIZE];
        len=snprintf(snum, MAX_EPOCH_SIZE-1,"%d", n);
-       fd = open(LAST_EPOCH_FILE, O_WRONLY|O_CREAT|O_TRUNC);
+       fd = open(LAST_EPOCH_FILE, O_WRONLY|O_CREAT|O_TRUNC,O_RDWR|O_CREAT|O_TRUNC,S_IRWXU|S_IRGRP|S_IROTH);
        if (fd == -1) {
                my_log(LOG_ERR, "open() failed: %s.The next restart will resume logging from epoch id 0.",LAST_EPOCH_FILE);
                return;