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

[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
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;