From: Jérémie Galarneau Date: Sun, 12 Nov 2017 19:59:28 +0000 (-0500) Subject: Fix: kernel consumerd sock paths need rundir substitution X-Git-Tag: v2.10.2~27 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a2483fb47ca4bd66d248d3258c209d10780f6a5e;p=lttng-tools.git Fix: kernel consumerd sock paths need rundir substitution Signed-off-by: Jérémie Galarneau --- diff --git a/src/bin/lttng-sessiond/sessiond-config.c b/src/bin/lttng-sessiond/sessiond-config.c index 9ac5f774e..d710eb4e5 100644 --- a/src/bin/lttng-sessiond/sessiond-config.c +++ b/src/bin/lttng-sessiond/sessiond-config.c @@ -188,10 +188,6 @@ int config_set_paths_root(struct sessiond_config *config) DEFAULT_GLOBAL_APPS_WAIT_SHM_PATH); config_string_set_static(&config->health_unix_sock_path, DEFAULT_GLOBAL_HEALTH_UNIX_SOCK); - config_string_set_static(&config->kconsumerd_err_unix_sock_path, - DEFAULT_KCONSUMERD_ERR_SOCK_PATH); - config_string_set_static(&config->kconsumerd_cmd_unix_sock_path, - DEFAULT_KCONSUMERD_CMD_SOCK_PATH); end: return ret; } @@ -340,6 +336,24 @@ int sessiond_config_init(struct sessiond_config *config) config_string_set(&config->kconsumerd_path, str); str = NULL; + ret = asprintf(&str, DEFAULT_KCONSUMERD_ERR_SOCK_PATH, + config->rundir.value); + if (ret < 0) { + ERR("Failed to set kernel consumer error socket path"); + goto end; + } + config_string_set(&config->kconsumerd_err_unix_sock_path, str); + str = NULL; + + ret = asprintf(&str, DEFAULT_KCONSUMERD_CMD_SOCK_PATH, + config->rundir.value); + if (ret < 0) { + ERR("Failed to set kernel consumer command socket path"); + goto end; + } + config_string_set(&config->kconsumerd_cmd_unix_sock_path, str); + str = NULL; + ret = asprintf(&str, "%s/%s", config->rundir.value, DEFAULT_LTTNG_SESSIOND_PIDFILE); if (ret < 0) {