summaryrefslogtreecommitdiffstats
path: root/drivers/char/vt_ioctl.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-11-09 01:20:26 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-11-09 01:20:26 -0500
commitc7c6e9494cc9a4a5b1a2ca870ed4531ad2b98a83 (patch)
tree1185ddc2c4cea1c4da09d6b83893f91aefe7cd3d /drivers/char/vt_ioctl.c
parent8cedcfd43a0b00741fff43d6a4c1a8b7748db3b0 (diff)
parent8e8b77dd4846b73f2e0756cf59123ee709246d11 (diff)
Merge branch 'upstream'
Diffstat (limited to 'drivers/char/vt_ioctl.c')
-rw-r--r--drivers/char/vt_ioctl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c
index 003dda147cd..24011e7c81f 100644
--- a/drivers/char/vt_ioctl.c
+++ b/drivers/char/vt_ioctl.c
@@ -80,6 +80,9 @@ do_kdsk_ioctl(int cmd, struct kbentry __user *user_kbe, int perm, struct kbd_str
if (copy_from_user(&tmp, user_kbe, sizeof(struct kbentry)))
return -EFAULT;
+ if (!capable(CAP_SYS_TTY_CONFIG))
+ perm = 0;
+
switch (cmd) {
case KDGKBENT:
key_map = key_maps[s];
@@ -193,7 +196,7 @@ do_kdgkb_ioctl(int cmd, struct kbsentry __user *user_kdgkb, int perm)
int ret;
if (!capable(CAP_SYS_TTY_CONFIG))
- return -EPERM;
+ perm = 0;
kbs = kmalloc(sizeof(*kbs), GFP_KERNEL);
if (!kbs) {