From 783f743e28e1cbd17daa8975ad98dd26a87d51c1 Mon Sep 17 00:00:00 2001 From: matthieu Date: Mon, 18 Nov 2013 20:39:48 +0000 Subject: [PATCH] Give /dev/drm0 to the user logging into xdm to be able to run OpenGL applications. ok kettenis@, naddy@ --- app/xdm/config/GiveConsole | 5 ++++- app/xdm/config/TakeConsole | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/xdm/config/GiveConsole b/app/xdm/config/GiveConsole index 39144cbe1..22e75c556 100644 --- a/app/xdm/config/GiveConsole +++ b/app/xdm/config/GiveConsole @@ -1,6 +1,6 @@ #!/bin/sh # Assign ownership of the console to the invoking user -# $OpenBSD: GiveConsole,v 1.3 2010/03/28 09:33:02 matthieu Exp $ +# $OpenBSD: GiveConsole,v 1.4 2013/11/18 20:39:48 matthieu Exp $ # # By convention, both xconsole and xterm -C check that the # console is owned by the invoking user and is readable before attaching @@ -8,4 +8,7 @@ # causing serious grief. # chown $USER /dev/console +if [ -c /dev/drm0 ]; then + chown $USER /dev/drm0 +fi /usr/X11R6/bin/sessreg -a -l $DISPLAY -u none -x /usr/X11R6/lib/X11/xdm/Xservers $USER diff --git a/app/xdm/config/TakeConsole b/app/xdm/config/TakeConsole index 0a94d017a..89ca69cf7 100644 --- a/app/xdm/config/TakeConsole +++ b/app/xdm/config/TakeConsole @@ -1,8 +1,11 @@ #!/bin/sh # Reassign ownership of the console to root, this should disallow # assignment of console output to any random users's xterm -# $OpenBSD: TakeConsole,v 1.3 2010/03/28 09:33:02 matthieu Exp $ +# $OpenBSD: TakeConsole,v 1.4 2013/11/18 20:39:48 matthieu Exp $ # chmod 622 /dev/console chown root /dev/console +if [ -c /dev/drm0 ]; then + chown root /dev/drm0 +fi /usr/X11R6/bin/sessreg -d -l $DISPLAY -u /var/run/utmp -x /usr/X11R6/lib/X11/xdm/Xservers $USER