From: Julien Desfossez Date: Thu, 20 Feb 2014 17:01:25 +0000 (-0500) Subject: fix: check tracing group before destroying the session X-Git-Tag: v0.3~25 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=415f00b6208892021330fb13d8ec496846aec59b;p=lttngtop.git fix: check tracing group before destroying the session Signed-off-by: Julien Desfossez --- diff --git a/src/lttng-session.c b/src/lttng-session.c index 8b0f641..459fbba 100644 --- a/src/lttng-session.c +++ b/src/lttng-session.c @@ -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 "