Re: Keyboard programming needs root

From: Daniël Mantione
Date: Tue Jul 24 2007 - 10:40:23 EST




Op Tue, 24 Jul 2007, schreef Helge Hafting:

> The normal way is to set permissions on the device in
> question - give either root only or the logged-in user
> write access as needed.
>
> It seems to me that "loadkeys" uses /dev/tty / /dev/tty0
> So set permissions on that as needed.

This won't work. Under the old behaviour, if you were owner of the tty,
you were boss of its keymap. Code was added that checks for explicit root
permissions (actually CAP_SYS_TTY_CONFIG, but this is root in practise),
so, currently, nothing regarding permissions works.

I agree, that setting a permission would be ideal, this way the sysadmin
can enforce his prefered policy, rather than having it hardwired into the
kernel.

Daniël