Fix: create lttng run dir regardless of user privilege
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 12 Nov 2017 19:19:01 +0000 (14:19 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Sun, 12 Nov 2017 19:19:01 +0000 (14:19 -0500)
The changes made when centralizing the configuration handling
introduced a regression which cause the rundir to only be
created when running as the root user.

Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/bin/lttng-sessiond/main.c

index 10802aa7b2cc66d87d0946ee53623b05b47a1c0f..76d087a1e5c90c1198afa870f19be9a4ae526d49 100644 (file)
@@ -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) {
This page took 0.026711 seconds and 4 git commands to generate.