OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb8e317
)
[PATCH] setkeys needs root
author
Andrew Morton
<akpm@osdl.org>
Sun, 30 Oct 2005 23:03:02 +0000
(15:03 -0800)
committer
Linus Torvalds
<torvalds@g5.osdl.org>
Mon, 31 Oct 2005 01:37:25 +0000
(17:37 -0800)
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>
drivers/char/vt_ioctl.c
patch
|
blob
|
history
diff --git
a/drivers/char/vt_ioctl.c
b/drivers/char/vt_ioctl.c
index
1d44f69
..
003dda1
100644
(file)
--- a/
drivers/char/vt_ioctl.c
+++ b/
drivers/char/vt_ioctl.c
@@
-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;