fix: check tracing group before destroying the session
[lttngtop.git] / 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.022584 seconds and 4 git commands to generate.