aboutsummaryrefslogtreecommitdiffstats
path: root/x11
diff options
context:
space:
mode:
authorse <se@FreeBSD.org>1998-03-05 07:46:12 +0800
committerse <se@FreeBSD.org>1998-03-05 07:46:12 +0800
commitdf48b08e1bb82cf150b8c3dc74dccc3e2ebb15a6 (patch)
tree98f7013b5c4743c826451d5e1a52e3e5d11c11f7 /x11
parent8340dece497bf02c4c255ed8fb9779d93c01f3ab (diff)
downloadfreebsd-ports-graphics-df48b08e1bb82cf150b8c3dc74dccc3e2ebb15a6.tar.gz
freebsd-ports-graphics-df48b08e1bb82cf150b8c3dc74dccc3e2ebb15a6.tar.zst
freebsd-ports-graphics-df48b08e1bb82cf150b8c3dc74dccc3e2ebb15a6.zip
Fix kfmsu2 (which actually should *never* be used on a multi-user system!)
The original version was not compatible with the FreeBSD version of "su" (it assumed that "su - -c CMD" executed CMD as root), and it required root to have a POSIX shell as login shell (not a C shell). The original "xhost +local:root" could mislead the user to assume that only root was given permission to access hist X11 display, but the user parameter is ignored by xhost (as of XFree86 3.3.1). This allows *every* user on the local system to grab all keypresses or screen contents while kfmsu2 has not run to completion. Starting several instances of kfmsu and leaving one will revoke access to the X11 display to all others ... In fact, kfmsu might be considered *that* broken by design, that it should not be installed, but it's a part of kdebase and I do not want to disable it in case somebody has a legitimate use for it ... The non-functionality of kfmsu was pointed out by Glenn Johnson.
Diffstat (limited to 'x11')
-rw-r--r--x11/kdebase11/files/patch-ai23
1 files changed, 23 insertions, 0 deletions
diff --git a/x11/kdebase11/files/patch-ai b/x11/kdebase11/files/patch-ai
new file mode 100644
index 00000000000..103c8247a17
--- /dev/null
+++ b/x11/kdebase11/files/patch-ai
@@ -0,0 +1,23 @@
+*** kfm/kfmsu2.in.orig Sat Feb 28 15:26:31 1998
+--- kfm/kfmsu2.in Sat Feb 28 15:27:14 1998
+***************
+*** 2,10 ****
+ echo "--------------"
+ echo ""
+! echo "Allowing root user to use this display"
+! xhost +local:root
+ echo ""
+ echo "Logging in as super user"
+! su - -c "export DISPLAY=$DISPLAY; @kde_bindir@/kfm -sw >/dev/null"
+! xhost -local:root
+
+--- 2,10 ----
+ echo "--------------"
+ echo ""
+! echo "Allowing ALL (!) local users to use this display"
+! xhost +local:
+ echo ""
+ echo "Logging in as super user"
+! su root -c "echo DISPLAY=$DISPLAY @kde_bindir@/kfm -sw | /bin/sh > /dev/null"
+! xhost -local:
+