Track keyboard and mouse usage

Diez B. Roggisch deets at nospam.web.de
Mon Jul 17 16:23:06 EDT 2006


skip at pobox.com schrieb:
>     Diez> You could use the /dev/input/event* devices.
> 
> On the only Linux system I have available (Mojam's CentOS-based web server),
> /dev/input/* are readable only by root.  That doesn't seem like it would be
> very useful to tools like watch unless they were to run suid to root
> (creating other problems).

You don't need to give it root access. A simple rule for the udev that 
looks like this:

KERNEL=="event[0-9]*",		NAME="input/%k", MODE="0444"


will make the devices world readable. While I haven't thought about any 
security implications that might have (and am not especially 
knowledgeable in such things to be honest), I'm convinced it is way less 
likely to introduce any exploitable holes than suid root would.

Diez



More information about the Python-list mailing list