diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2021-08-30 15:38:28 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@herrb.eu> | 2021-08-30 20:41:27 +0200 |
commit | 4fa5bb88de05a7af4acd4a96f0185a2b55264844 (patch) | |
tree | da1a4130d8c3be99f45d00deeafa843f11ca9f19 /config/TakeConsole.in | |
parent | 2da2e9923a5ec3641444ea0bd5f0fab508b3aeea (diff) |
This was already done partially.
Diffstat (limited to 'config/TakeConsole.in')
-rw-r--r-- | config/TakeConsole.in | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/config/TakeConsole.in b/config/TakeConsole.in new file mode 100644 index 0000000..d5448d5 --- /dev/null +++ b/config/TakeConsole.in @@ -0,0 +1,23 @@ +#!/bin/sh +# Reassign ownership of the console to root, this should disallow +# assignment of console output to any random users's xterm +# $OpenBSD: TakeConsole.in,v 1.1 2021/08/30 15:38:27 matthieu Exp $ +# +prefix="@prefix@" +exec_prefix="@exec_prefix@" + +chown root /dev/console +chmod 622 /dev/console +if [ -c /dev/drm0 ]; then + chown root /dev/drm0 +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 +@bindir@/sessreg -d -l $DISPLAY -u none $USER |