#!/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 2018/07/11 19:20:40 matthieu Exp $
#
chown root /dev/console
chmod 622 /dev/console
if [ -c /dev/drm0 ]; then
    chown root /dev/drm0
fi
/usr/X11R6/bin/sessreg -d -l $DISPLAY -u none $USER
