- if (!initialize_dlogutil_line_params(¶ms, (struct buf_params) { })) {
- /* TODO: cleanup discards this value, so there isn't much
- * point setting it. Ideally it would be attached to the
- * reply but that's a protocol change so not worth it atm */
- // retval = -ENOMEM;
- goto cleanup;
- }
-
- /* Note that in this case, the format doesn't matter.
- * Therefore, we just pass OFF as default. */
- retval = get_dlogutil_line_params(msg->data, FORMAT_OFF, ¶ms);
- if (retval < 0) {
- // retval = -ENOMEM; // see above
- goto cleanup;
- }
-
- if (params.file_path) {
- /* Do not trust writer-based readers (only config-based).
- * The control socket's privilege checks are fairly lenient
- * so this prevents people from asking us to overwrite
- * some potentially important files at logger privilege.
- *
- * At some point it would be good to be able to skip the
- * middleman and become able to write to a file directly
- * though. The daemon should become able to receive an
- * opened file descriptor from a writer. */
- // retval = -EPERM; // see above
- goto cleanup;
- }
-
- if (!params.compression)
- goto cleanup;
-
- retval = reader_memory_init_with_writer(&reader, wr, server, params.compression, params.monitor, params.is_dumping);
- if (retval != 0)
- goto cleanup;
-
- int pipe_fd[2] = { -1, -1 };
- retval = create_fifo_fds(server, pipe_fd, 0, reader->is_dumping);
- if (retval < 0)