Commit 0b360adbdb54d5b98b78d57ba0916bc4b8871968

Authored by Andrew Morton
Committed by Linus Torvalds
1 parent eb8e317998

[PATCH] setkeys needs root

Because people can play games reprogramming keys and leaving traps for the
next user of the console.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Showing 1 changed file with 3 additions and 0 deletions Side-by-side Diff

drivers/char/vt_ioctl.c
... ... @@ -192,6 +192,9 @@
192 192 int i, j, k;
193 193 int ret;
194 194  
  195 + if (!capable(CAP_SYS_TTY_CONFIG))
  196 + return -EPERM;
  197 +
195 198 kbs = kmalloc(sizeof(*kbs), GFP_KERNEL);
196 199 if (!kbs) {
197 200 ret = -ENOMEM;