提交 0b360adb 编写于 作者: A Andrew Morton 提交者: 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: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册