diff options
author | Andrew Morton <akpm@osdl.org> | 2005-10-30 23:03:02 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-31 01:37:25 (GMT) |
commit | 0b360adbdb54d5b98b78d57ba0916bc4b8871968 (patch) | |
tree | b793404c03c0ae77929786d0c501030791253163 /drivers/char | |
parent | eb8e317998e55dc1f9e6288564052b577327b766 (diff) | |
download | linux-0b360adbdb54d5b98b78d57ba0916bc4b8871968.tar.xz |
[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>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/vt_ioctl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c index 1d44f69..003dda1 100644 --- a/drivers/char/vt_ioctl.c +++ b/drivers/char/vt_ioctl.c @@ -192,6 +192,9 @@ do_kdgkb_ioctl(int cmd, struct kbsentry __user *user_kdgkb, int perm) int i, j, k; int ret; + if (!capable(CAP_SYS_TTY_CONFIG)) + return -EPERM; + kbs = kmalloc(sizeof(*kbs), GFP_KERNEL); if (!kbs) { ret = -ENOMEM; |