Commit 0b360adb authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] setkeys needs root

Because people can play games reprogramming keys and leaving traps for the
next user of the console.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent eb8e3179
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment