From: David Goulet Date: Wed, 6 Jul 2011 18:02:21 +0000 (-0400) Subject: Fix missing tracing group when UID=0 X-Git-Tag: v2.0-pre1~53 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a463f419cf8678aac3251d3f6b1783288bcaa97c;p=lttng-tools.git Fix missing tracing group when UID=0 Signed-off-by: David Goulet --- diff --git a/ltt-sessiond/main.c b/ltt-sessiond/main.c index a35849381..0ab3ad9a7 100644 --- a/ltt-sessiond/main.c +++ b/ltt-sessiond/main.c @@ -1761,7 +1761,7 @@ static int check_existing_daemon() * Set the tracing group gid onto the client socket. * * Race window between mkdir and chown is OK because we are going from - * less permissive (root.root) to more permissive (root.tracing). + * more permissive (root.root) to les permissive (root.tracing). */ static int set_permissions(void) { @@ -1774,8 +1774,13 @@ static int set_permissions(void) (grp = getgrnam(default_tracing_group)); if (grp == NULL) { - ERR("Missing tracing group. Aborting execution.\n"); - ret = -1; + if (is_root) { + WARN("No tracing group detected"); + ret = 0; + } else { + ERR("Missing tracing group. Aborting execution."); + ret = -1; + } goto end; }