goto end;
}
- event_pipe = lttng_pipe_open(O_CLOEXEC);
+ event_pipe = lttng_pipe_open(FD_CLOEXEC);
if (!event_pipe) {
ERR("event_pipe creation");
goto error;
}
if (getuid() == 0) {
- ret = chown(sock_path, 0,
- utils_get_group_id(tracing_group_name));
+ gid_t gid;
+
+ ret = utils_get_group_id(config.tracing_group_name.value, true,
+ &gid);
+ if (ret) {
+ /* Default to root group. */
+ gid = 0;
+ }
+
+ ret = chown(sock_path, 0, gid);
if (ret) {
ERR("Failed to set the notification channel socket's group");
ret = -1;