Skip to contentSkip to conversation

kernel-shark: Xserver, grant access to user root

PATCH New Tzvetomir Stoyanov (VMware) 1 participant 1 message Jul 25, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kernel-shark: Xserver, grant access to user root

From: Tzvetomir Stoyanov <[email protected]>

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.

---
 kernel-shark/bin/kshark-su-record | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
kernel-shark/bin/kshark-su-record +1 -4
index 8c9fbd0..c14f03d 100755
@@ -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
Signature · 1 line
2.21.0