diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2021-02-12 10:33:35 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@herrb.eu> | 2021-08-30 20:01:56 +0200 |
commit | 7678de71d24252316015f35eaeafd16826bf0af5 (patch) | |
tree | 26c0d611a77659f73daacd6a5bfe99a3566732f0 /config | |
parent | 6e33ecfd5c2ff079477b7fc1f2ece8541a225be9 (diff) |
chown /dev/dri/ nodes if they exist
Diffstat (limited to 'config')
-rw-r--r-- | config/GiveConsole | 8 | ||||
-rw-r--r-- | config/TakeConsole | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/config/GiveConsole b/config/GiveConsole index 771f8a2..60e568b 100644 --- a/config/GiveConsole +++ b/config/GiveConsole @@ -1,6 +1,6 @@ #!/bin/sh # Assign ownership of the console to the invoking user -# $OpenBSD: GiveConsole,v 1.3 2019/05/12 11:53:06 jsg Exp $ +# $OpenBSD: GiveConsole,v 1.4 2021/02/12 10:33:34 jsg Exp $ # # By convention, both xconsole and xterm -C check that the # console is owned by the invoking user and is readable before attaching @@ -14,4 +14,10 @@ fi if [ -c /dev/drmR128 ]; then chown $USER /dev/drmR128 fi +if [ -c /dev/dri/card0 ]; then + chown $USER /dev/dri/card0 +fi +if [ -c /dev/dri/renderD128 ]; then + chown $USER /dev/dri/renderD128 +fi /usr/X11R6/bin/sessreg -a -l $DISPLAY -u none $USER diff --git a/config/TakeConsole b/config/TakeConsole index 88c9aa8..cf649f9 100644 --- a/config/TakeConsole +++ b/config/TakeConsole @@ -1,7 +1,7 @@ #!/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.4 2019/05/12 11:53:06 jsg Exp $ +# $OpenBSD: TakeConsole,v 1.5 2021/02/12 10:33:34 jsg Exp $ # chown root /dev/console chmod 622 /dev/console @@ -11,4 +11,10 @@ fi if [ -c /dev/drmR128 ]; then chown root /dev/drmR128 fi +if [ -c /dev/dri/card0 ]; then + chown root /dev/dri/card0 +fi +if [ -c /dev/dri/renderD128 ]; then + chown root /dev/dri/renderD128 +fi /usr/X11R6/bin/sessreg -d -l $DISPLAY -u none $USER |