/[linux-patches]/genpatches-2.6/tags/2.6.14-5/1100_setkeys-needs-root.patch
Gentoo

Contents of /genpatches-2.6/tags/2.6.14-5/1100_setkeys-needs-root.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 226 - (show annotations) (download)
Fri Dec 2 12:14:55 2005 UTC (13 years ago) by dsd
File size: 806 byte(s)
2.6.14-5 release
1 From: Andrew Morton <akpm@osdl.org>
2 Date: Sun, 30 Oct 2005 23:03:02 +0000 (-0800)
3 Subject: [PATCH] setkeys needs root
4 X-Git-Tag: v2.6.15-rc1
5 X-Git-Url: http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=0b360adbdb54d5b98b78d57ba0916bc4b8871968
6
7 [PATCH] setkeys needs root
8
9 Because people can play games reprogramming keys and leaving traps for the
10 next user of the console.
11
12 Signed-off-by: Andrew Morton <akpm@osdl.org>
13 Signed-off-by: Linus Torvalds <torvalds@osdl.org>
14 ---
15
16 --- a/drivers/char/vt_ioctl.c
17 +++ b/drivers/char/vt_ioctl.c
18 @@ -192,6 +192,9 @@ do_kdgkb_ioctl(int cmd, struct kbsentry
19 int i, j, k;
20 int ret;
21
22 + if (!capable(CAP_SYS_TTY_CONFIG))
23 + return -EPERM;
24 +
25 kbs = kmalloc(sizeof(*kbs), GFP_KERNEL);
26 if (!kbs) {
27 ret = -ENOMEM;

  ViewVC Help
Powered by ViewVC 1.1.20