X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fnotification-thread.c;h=8c2892bda85e9905f642f26d61c5c6eaf26dfeb7;hb=bbc4768c20f1c552222e1746f9475d145d7bf04e;hp=b42b282e10cfbc98e262eca77ad6fd6dbeac1213;hpb=4a91420cefb94afc4a20042bdbe2564086dad3cb;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/notification-thread.c b/src/bin/lttng-sessiond/notification-thread.c index b42b282e1..8c2892bda 100644 --- a/src/bin/lttng-sessiond/notification-thread.c +++ b/src/bin/lttng-sessiond/notification-thread.c @@ -239,8 +239,16 @@ int notification_channel_socket_create(void) } if (getuid() == 0) { - ret = chown(sock_path, 0, - utils_get_group_id(config.tracing_group_name.value)); + 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; @@ -562,9 +570,6 @@ void *thread_notification(void *data) int fd = LTTNG_POLL_GETFD(&state.events, i); uint32_t revents = LTTNG_POLL_GETEV(&state.events, i); - if (!revents) { - continue; - } DBG("[notification-thread] Handling fd (%i) activity (%u)", fd, revents); if (fd == state.notification_channel_socket) {