Linux-Trace-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] kernel-shark: Xserver, grant access to user root
@ 2019-07-25  8:53 Tzvetomir Stoyanov (VMware)
  0 siblings, 0 replies; only message in thread
From: Tzvetomir Stoyanov (VMware) @ 2019-07-25  8:53 UTC (permalink / raw)
  To: rostedt; +Cc: linux-trace-devel

From: Tzvetomir Stoyanov <tstoyanov@vmware.com>

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.

Signed-off-by: Tzvetomir Stoyanov <tstoyanov@vmware.com>
---
 kernel-shark/bin/kshark-su-record | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/kernel-shark/bin/kshark-su-record b/kernel-shark/bin/kshark-su-record
index 8c9fbd0..c14f03d 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
-- 
2.21.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-25  8:53 [PATCH] kernel-shark: Xserver, grant access to user root Tzvetomir Stoyanov (VMware)

Linux-Trace-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-trace-devel/0 linux-trace-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-trace-devel linux-trace-devel/ https://lore.kernel.org/linux-trace-devel \
		linux-trace-devel@vger.kernel.org linux-trace-devel@archiver.kernel.org
	public-inbox-index linux-trace-devel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-trace-devel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox