X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fnotification-thread.c;h=9ee208bafc88140178f96bca5be6932b64d31622;hb=0052cc6026ed9cba2903b8bfec7e283fe99cbf22;hp=c47b36533e2bdef05ad3ba4c609b9382e10856ed;hpb=800c5e109dd3f8052ec4d3f53c0b54d8d4e36df1;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/notification-thread.c b/src/bin/lttng-sessiond/notification-thread.c index c47b36533..9ee208baf 100644 --- a/src/bin/lttng-sessiond/notification-thread.c +++ b/src/bin/lttng-sessiond/notification-thread.c @@ -96,7 +96,7 @@ struct notification_thread_handle *notification_thread_handle_create( 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; @@ -235,8 +235,16 @@ int notification_channel_socket_create(void) } 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;