X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fmain.c;h=3d0a65def51a0a727c3a5d08539c035f341701f5;hb=93563adf01858a4decafcd4be52905003de7833a;hp=10802aa7b2cc66d87d0946ee53623b05b47a1c0f;hpb=87c3f04b102fced6eaaffb2ede4ec14df999f238;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/main.c b/src/bin/lttng-sessiond/main.c index 10802aa7b..3d0a65def 100644 --- a/src/bin/lttng-sessiond/main.c +++ b/src/bin/lttng-sessiond/main.c @@ -2413,9 +2413,9 @@ static pid_t spawn_consumerd(struct consumer_data *consumer_data) * fallback on the 32-bit one, */ DBG3("Looking for a kernel consumer at these locations:"); - DBG3(" 1) %s", config.consumerd64_bin_path.value); + DBG3(" 1) %s", config.consumerd64_bin_path.value ? : "NULL"); DBG3(" 2) %s/%s", INSTALL_BIN_PATH, DEFAULT_CONSUMERD_FILE); - DBG3(" 3) %s", config.consumerd32_bin_path.value); + DBG3(" 3) %s", config.consumerd32_bin_path.value ? : "NULL"); if (stat(config.consumerd64_bin_path.value, &st) == 0) { DBG3("Found location #1"); consumer_to_use = config.consumerd64_bin_path.value; @@ -5584,12 +5584,13 @@ int main(int argc, char **argv) /* Check if daemon is UID = 0 */ is_root = !getuid(); + if (create_lttng_rundir()) { + retval = -1; + goto exit_init_data; + } + if (is_root) { /* Create global run dir with root access */ - if (create_lttng_rundir()) { - retval = -1; - goto exit_init_data; - } kernel_channel_monitor_pipe = lttng_pipe_open(0); if (!kernel_channel_monitor_pipe) {