diff options
author | Tzvetomir Stoyanov <tstoyanov@vmware.com> | 2019-07-25 11:53:55 +0300 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2019-07-25 08:50:15 -0400 |
commit | c9b3aa0c5dedeb554e04406cfe8fadc6dac44699 (patch) | |
tree | 492e62baf32a0560d72e863b5ea1d473a4aabba1 | |
parent | 1517dc3a15606850b1b52b789cbdeb554e2c68c6 (diff) | |
download | trace-cmd-c9b3aa0c5dedeb554e04406cfe8fadc6dac44699.tar.gz |
kernel-shark: Xserver, grant access to user root
In order to make connections to the X server, users must be in
the X server allow list. As kernelshark may run with root privileges,
the user "root" must be in this list. There is such logic in
kshark-su-record, but it works only for Wayland X server. Some Linux
distributions use other X servers, so the logic must be executed always.
It grants access to user "root" to initiate connections to the X server from
the local machine.
Link: http://lore.kernel.org/linux-trace-devel/20190725085355.15921-1-tz.stoyanov@gmail.com
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204277
Signed-off-by: Tzvetomir Stoyanov <tstoyanov@vmware.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-rwxr-xr-x | kernel-shark/bin/kshark-su-record | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/kernel-shark/bin/kshark-su-record b/kernel-shark/bin/kshark-su-record index 8c9fbd02..c14f03da 100755 --- a/kernel-shark/bin/kshark-su-record +++ b/kernel-shark/bin/kshark-su-record @@ -1,9 +1,6 @@ #!/bin/bash -if [ "$XDG_SESSION_TYPE" = "wayland" ] -then - xhost +si:localuser:root &>/dev/null -fi +xhost +si:localuser:root &>/dev/null THIS_DIR=`dirname $0` pkexec env DISPLAY=${DISPLAY} ${THIS_DIR}/kshark-record -o ${PWD}/trace.dat |