Fix: kernel consumerd sock paths need rundir substitution
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 12 Nov 2017 19:59:28 +0000 (14:59 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 12 Nov 2017 19:59:28 +0000 (14:59 -0500)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/sessiond-config.c

index 9ac5f774eb75a24a23685cb1ff73a2c7c7f3edd6..d710eb4e5689ae8ee60a66db81a1c17d04ec83c3 100644 (file)
@@ -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) {
This page took 0.026141 seconds and 4 git commands to generate.