fix: check tracing group before destroying the session
authorJulien Desfossez <jdesfossez@efficios.com>
Thu, 20 Feb 2014 17:01:25 +0000 (12:01 -0500)
committerJulien Desfossez <jdesfossez@efficios.com>
Thu, 20 Feb 2014 17:01:25 +0000 (12:01 -0500)
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
src/lttng-session.c

index 8b0f6414539eb5b20f52d4c0b0af18f004736e06..459fbba625498f5b5d3907aa229af97aac8c57ca 100644 (file)
@@ -402,7 +402,8 @@ int destroy(char *name)
        int sudo = 0;
        char cmd[1024];
 
-       if (getuid() != 0) {
+       ret = system("groups|grep tracing >/dev/null");
+       if (ret != 0 && getuid() != 0) {
                ret = system("sudo -l lttng >/dev/null");
                if (ret < 0) {
                        fprintf(stderr, "[error] You are not root and not "
This page took 0.030463 seconds and 4 git commands to generate.