mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 18:13:04 +00:00
[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>
This commit is contained in:
parent
eb8e317998
commit
0b360adbdb
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user