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>
/* 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) {