X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Fbin%2Flttng-sessiond%2Fhealth.c;h=9ff6bd1ae1013d9b86e5e178f920ff7286e63114;hb=208ddc0608797ba50c3ce007ba7b4f887e83d87c;hp=921b45261846cb79d62b71d13503478ce10d240c;hpb=21fa020ee12d44632c5efde063869d542897bdd1;p=lttng-tools.git diff --git a/src/bin/lttng-sessiond/health.c b/src/bin/lttng-sessiond/health.c index 921b45261..9ff6bd1ae 100644 --- a/src/bin/lttng-sessiond/health.c +++ b/src/bin/lttng-sessiond/health.c @@ -95,8 +95,15 @@ static void *thread_manage_health(void *data) if (is_root) { /* lttng health client socket path permissions */ - ret = chown(config.health_unix_sock_path.value, 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(config.health_unix_sock_path.value, 0, gid); if (ret < 0) { ERR("Unable to set group on %s", config.health_unix_sock_path.value); PERROR("chown"); @@ -158,11 +165,6 @@ restart: revents = LTTNG_POLL_GETEV(&events, i); pollfd = LTTNG_POLL_GETFD(&events, i); - if (!revents) { - /* No activity for this FD (poll implementation). */ - continue; - } - /* Event on the registration socket */ if (pollfd == sock) { if (revents & LPOLLIN) {