Fix: create lttng run dir regardless of user privilege
[lttng-tools.git] / 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.024396 seconds and 4 git commands to generate.