diff mbox series

[1/2] kernel-shark: Revert adding environment variables to kshark-su-record

Message ID 20190725194738.979632340@goodmis.org (mailing list archive)
State Accepted
Commit b95fbd955c1ee1fda031236e9ac10bb6f014a5f1
Headers show
Series kernel-shark: Let polkit decide the environment and path of kshark-record | expand

Commit Message

Steven Rostedt July 25, 2019, 7:45 p.m. UTC
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

This reverts:

  8eb0d753e ("kernel-shark: Execute kshark-record from same dir as kshark-su-record")
  b084eb5aa ("kernel-shark: Set the DISPLAY environment for pkexec kshark-record")

As the policykit (when installed correctly), should handle both the path to
the executable, as well as the DISPLAY and XAUTHORITY environment variables.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 kernel-shark/bin/kshark-su-record | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Yordan Karadzhov July 26, 2019, 7:51 a.m. UTC | #1
On 25.07.19 г. 22:45 ч., Steven Rostedt wrote:
> From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
> 
> This reverts:
> 
>    8eb0d753e ("kernel-shark: Execute kshark-record from same dir as kshark-su-record")
>    b084eb5aa ("kernel-shark: Set the DISPLAY environment for pkexec kshark-record")
> 
> As the policykit (when installed correctly), should handle both the path to
> the executable, as well as the DISPLAY and XAUTHORITY environment variables.
> 
> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>


Reviewed-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>


> ---
>   kernel-shark/bin/kshark-su-record | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/kernel-shark/bin/kshark-su-record b/kernel-shark/bin/kshark-su-record
> index c14f03da9684..70d781d84335 100755
> --- a/kernel-shark/bin/kshark-su-record
> +++ b/kernel-shark/bin/kshark-su-record
> @@ -2,5 +2,4 @@
>   
>   xhost +si:localuser:root &>/dev/null
>   
> -THIS_DIR=`dirname $0`
> -pkexec env DISPLAY=${DISPLAY} ${THIS_DIR}/kshark-record -o ${PWD}/trace.dat
> +pkexec kshark-record -o ${PWD}/trace.dat
>
diff mbox series

Patch

diff --git a/kernel-shark/bin/kshark-su-record b/kernel-shark/bin/kshark-su-record
index c14f03da9684..70d781d84335 100755
--- a/kernel-shark/bin/kshark-su-record
+++ b/kernel-shark/bin/kshark-su-record
@@ -2,5 +2,4 @@ 
 
 xhost +si:localuser:root &>/dev/null
 
-THIS_DIR=`dirname $0`
-pkexec env DISPLAY=${DISPLAY} ${THIS_DIR}/kshark-record -o ${PWD}/trace.dat
+pkexec kshark-record -o ${PWD}/trace.dat