Fix lttng bug having the wrong sessiond path
authorDavid Goulet <david.goulet@polymtl.ca>
Tue, 17 May 2011 15:57:49 +0000 (11:57 -0400)
committerDavid Goulet <david.goulet@polymtl.ca>
Tue, 17 May 2011 15:57:49 +0000 (11:57 -0400)
Executing lttng with uid=0 and not being in the tracing group was
setting the wrong default session daemon path in the liblttngctl API.

Also adds two debug output for the session daemon.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
liblttngctl/liblttngctl.c
ltt-sessiond/main.c

index 38be54774049532c8d9cef30a67c244454109b96..e400775eaa97a6ffcd983cf4f6cd14da695ec18b 100644 (file)
@@ -431,7 +431,7 @@ static int set_session_daemon_path(void)
 
        /* Are we in the tracing group ? */
        ret = check_tracing_group(tracing_group);
-       if (ret < 0) {
+       if (ret < 0 && getuid() != 0) {
                if (sprintf(sessiond_sock_path, DEFAULT_HOME_CLIENT_UNIX_SOCK,
                                        getenv("HOME")) < 0) {
                        return -ENOMEM;
index c50bfd88c5d7538638081c3d7f44511848724d8a..de601b6f86746ba295b50ba335b44eb68acf537b 100644 (file)
@@ -1102,6 +1102,9 @@ int main(int argc, char **argv)
                }
        }
 
+       DBG("Client socket path %s", client_unix_sock_path);
+       DBG("Application socket path %s", apps_unix_sock_path);
+
        /* See if daemon already exist. If any of the two
         * socket needed by the daemon are present, this test fails
         */
This page took 0.027496 seconds and 4 git commands to generate.