X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fnotification-thread.c;h=9ee208bafc88140178f96bca5be6932b64d31622;hb=d7458e2fdfda5824bb5406c8e05dc48276bf433f;hp=92ac597fa00a58e7720f6710579df372c22cd6a6;hpb=23649f1186d370ae42454b8f82c09ae77c5dbaf1;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/notification-thread.c b/src/bin/lttng-sessiond/notification-thread.c index 92ac597fa..9ee208baf 100644 --- a/src/bin/lttng-sessiond/notification-thread.c +++ b/src/bin/lttng-sessiond/notification-thread.c @@ -235,8 +235,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;