Fix missing tracing group when UID=0
authorDavid Goulet <david.goulet@polymtl.ca>
Wed, 6 Jul 2011 18:02:21 +0000 (14:02 -0400)
committerDavid Goulet <david.goulet@polymtl.ca>
Wed, 6 Jul 2011 18:02:21 +0000 (14:02 -0400)
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
ltt-sessiond/main.c

index a3584938134f3cdfb25d865c2d80a67aabacc550..0ab3ad9a73300221092babcbbd3671ea8b5983b5 100644 (file)
@@ -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;
        }
 
This page took 0.032709 seconds and 5 git commands to generate.