Bug 176545 - loadkeys requires root priviledge starting with kernel.org
Summary: loadkeys requires root priviledge starting with kernel.org
Alias: None
Product: Fedora
Classification: Fedora
Component: kbd
Version: 4
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Miloslav Trmač
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2005-12-25 12:38 UTC by Vassili Leonov
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version: 1.12-10.fc4.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2005-12-25 13:12:38 UTC

Attachments (Terms of Use)

Description Vassili Leonov 2005-12-25 12:38:52 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8) Gecko/20051130 Firefox/1.5

Description of problem:
After upgrading kernel to kernel.org logging in as a regular user results in error messages about inability to set keyboard map, since it became a root priviledged operation as a result of patch included in

commit 6ca4c553e663b1eebe5630e70fd7cb39c4b910e3
Author: Daniel Drake <dsd@gentoo.org>
Date:   Fri Dec 2 20:56:21 2005 +0000

    [PATCH] setkeys needs root
    This patch combines commit 0b360adbdb54d5b98b78d57ba0916bc4b8871968 (make
    setkeys root-only) and commit e3f17f0f6e98f58edb13cb38810d93e6d4808e68 (only
    disallow setting by users)
       Because people can play games reprogramming keys and leaving traps for the
       next user of the console.
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. upgrade (patch) kernel.org kernel 2.6.14 to, reboot
2. log in as a regular user
3. watch the error messages

Actual Results:  dhcp04 login: vleo
Last login: Sun Dec 25 00:35:54 from hydra.lml
Keymap 0: Permission denied
Keymap 1: Permission denied
Keymap 2: Permission denied
KDSKBENT: Operation not permitted
loadkeys: could not deallocate keymap 3
[vleo@dhcp04 ~]$

Expected Results:  dhcp04 login: vleo
Last login: Sun Dec 25 00:35:54 from hydra.lml
[vleo@dhcp04 ~]$

Additional info:

I'm also submitting this as a buggy patch complain to the patch contributors. It's easy to fix the problem in an ad hoc way, but needs some architectural thought to fix it properly. I think, since kernel maintainers decided to include the patch into, then they will be able to make recommendation as to how to fix this FC4 problem, or will retract the patch.
I do not think it's a FC4 kernel issue. It's either kbd or kernel.org kernel issue.
This is part of the strace for loadkeys illustrating the new behaviour, run as a regular user:

[pid  2600] open("/dev/tty", O_RDWR)    = 3
[pid  2600] ioctl(3, KDGKBTYPE, 0xbfcb9247) = 0
[pid  2600] ioctl(3, KDGKBMODE, 0xbfcb95f8) = 0
[pid  2600] ioctl(3, KDSKBENT, 0xbfcb92f4) = -1 EPERM (Operation not permitted)

Comment 1 Vassili Leonov 2005-12-25 12:44:20 UTC
file that is patched:


Comment 2 Miloslav Trmač 2005-12-25 13:12:38 UTC
The FC4 update kbd-1.12-10.fc4.1 removes the loadkeys invocation on login,
so these error messages should not appear any more.

Please update to the updated kbd package and reopen this bug report if it fails
to fix the problem.

Comment 3 Vassili Leonov 2005-12-25 15:03:18 UTC
Indeed, update of kbd to kbd-1.12-10.fc4.1 (done with 'yum update kbd') fixed
the problem.

Note You need to log in before you can comment on or make changes to this bug.