goto error;
}
- flags = O_WRONLY | O_CREAT | O_TRUNC;
+ /*
+ * With the session rotation feature on the relay, we might need to seek
+ * and truncate a tracefile, so we need read and write access.
+ */
+ flags = O_RDWR | O_CREAT | O_TRUNC;
/* Open with 660 mode */
mode = S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP;