goto error;
}
- ret = mkdir_recursive(session->path, S_IRWXU | S_IRWXG,
- geteuid(), allowed_group());
+ ret = asprintf(&session->kernel_session->trace_path, "%s/kernel",
+ session->path);
+ if (ret < 0) {
+ perror("asprintf kernel traces path");
+ goto error;
+ }
+
+ ret = mkdir_recursive(session->kernel_session->trace_path,
+ S_IRWXU | S_IRWXG, geteuid(), allowed_group());
if (ret < 0) {
if (ret != -EEXIST) {
ERR("Trace directory creation error");
DBG("Processing client command %d", cmd_ctx->lsm->cmd_type);
- /* Listing commands don't need a session */
+ /*
+ * Commands that DO NOT need a session.
+ */
switch (cmd_ctx->lsm->cmd_type) {
case LTTNG_CREATE_SESSION:
case LTTNG_LIST_SESSIONS:
DBG("Creating kernel channel");
ret = kernel_create_channel(cmd_ctx->session->kernel_session,
- &cmd_ctx->lsm->u.channel.chan, cmd_ctx->session->path);
+ &cmd_ctx->lsm->u.channel.chan,
+ cmd_ctx->session->kernel_session->trace_path);
if (ret < 0) {
ret = LTTCOMM_KERN_CHAN_FAIL;
goto error;
}
ret = kernel_create_channel(cmd_ctx->session->kernel_session,
- chan, cmd_ctx->session->path);
+ chan, cmd_ctx->session->kernel_session->trace_path);
if (ret < 0) {
ret = LTTCOMM_KERN_CHAN_FAIL;
goto error;
}
ret = kernel_create_channel(cmd_ctx->session->kernel_session,
- chan, cmd_ctx->session->path);
+ chan, cmd_ctx->session->kernel_session->trace_path);
if (ret < 0) {
ret = LTTCOMM_KERN_CHAN_FAIL;
goto error;
if (cmd_ctx->session->kernel_session->metadata == NULL) {
DBG("Open kernel metadata");
ret = kernel_open_metadata(cmd_ctx->session->kernel_session,
- cmd_ctx->session->path);
+ cmd_ctx->session->kernel_session->trace_path);
if (ret < 0) {
ret = LTTCOMM_KERN_META_FAIL;
goto error;