diff options
author | Jeff Garzik <jgarzik@pobox.com> | 2005-11-11 05:54:37 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@pobox.com> | 2005-11-11 05:54:37 -0500 |
commit | e532c37858fdcc18e9a91d24c2e22cd21aa22561 (patch) | |
tree | d2d27707914fa6690774be7051ac98e6fce4e755 /drivers/char/vt_ioctl.c | |
parent | 87199134b4a85de56a7508c551ab3b3a3ee35035 (diff) | |
parent | 5e04e7fe774794b837e1d3897e6b96ae2d06679a (diff) |
Merge branch 'master'
Diffstat (limited to 'drivers/char/vt_ioctl.c')
-rw-r--r-- | drivers/char/vt_ioctl.c | 5 |
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) { |