aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt (VMware) <rostedt@goodmis.org>2019-07-23 18:50:45 -0400
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2019-07-24 08:01:27 -0400
commit8eb0d753e658446b584b367a45edbc4884ec8bb5 (patch)
tree4c5339c1d4ba3504e5844bad7ba5366e010236dd
parent0cc751d1d7a5b922b2288dcd6c86a694a2e42eb3 (diff)
downloadtrace-cmd-8eb0d753e658446b584b367a45edbc4884ec8bb5.tar.gz
kernel-shark: Execute kshark-record from same dir as kshark-su-record
Do not trust the PATH environment variable (and in fact that may not even be available with the pkexec). Instead, use the same path as kshark-su-record to find kshark-record. They should always be together anyway. Link: http://lore.kernel.org/linux-trace-devel/20190723225238.701263380@goodmis.org Reviewed-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-rwxr-xr-xkernel-shark/bin/kshark-su-record3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel-shark/bin/kshark-su-record b/kernel-shark/bin/kshark-su-record
index 2477045f..7faff1cb 100755
--- a/kernel-shark/bin/kshark-su-record
+++ b/kernel-shark/bin/kshark-su-record
@@ -5,4 +5,5 @@ then
xhost +si:localuser:root &>/dev/null
fi
-pkexec kshark-record -o ${PWD}/trace.dat
+THIS_DIR=`dirname $0`
+pkexec ${THIS_DIR}/kshark-record -o ${PWD}/trace.dat