[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1236692166.1582.5.camel@rh9.satnam>
Date: 10 Mar 2009 19:06:06 +0530
From: Jaswinder Singh Rajput <jaswinder@...nel.org>
To: Willy Tarreau <w@....eu>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: Re: Keymap 0: Permission denied
On Sun, 2009-03-08 at 23:40, Willy Tarreau wrote:
> Hi,
>
> On Sun, Mar 08, 2009 at 11:03:46PM +0530, Jaswinder Singh Rajput wrote:
> > Hello Willy,
> >
> > On Red Hat 9 With latest 2.4-git kernel, when I log in as a regular user
> > on a TTY, I get the following error:
> >
> > Keymap 0: Permission denied
> > Keymap 1: Permission denied
> > Keymap 2: Permission denied
> > KDSKBENT: Operation not permitted
> > loadkeys: could not deallocate keymap 3
> >
> > How to fix this error.
>
> No idea yet. Could you please try "loadkey us" for instance, to ensure
> it is the program which fails ? If so, please send me the output of
> "strace loadkeys us".
>
I am attaching the strace for your reference.
This patch solves above problem, Is this a correct way ?
Subject: [PATCH] x86: fix Keymap : Permission denied
On Red Hat 9, login in as a regular user on a TTY, leads to:
Keymap 0: Permission denied
Keymap 1: Permission denied
Keymap 2: Permission denied
KDSKBENT: Operation not permitted
loadkeys: could not deallocate keymap 3
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@...il.com>
---
drivers/char/vt.c | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/drivers/char/vt.c b/drivers/char/vt.c
index 8b8f95d..6206d3e 100644
--- a/drivers/char/vt.c
+++ b/drivers/char/vt.c
@@ -180,8 +180,6 @@ do_kdsk_ioctl(int cmd, struct kbentry *user_kbe, int perm, struct kbd_struct *kb
val = (i ? K_HOLE : K_NOSUCHMAP);
return put_user(val, &user_kbe->kb_value);
case KDSKBENT:
- if (!perm)
- return -EPERM;
if (!i && v == K_NOSUCHMAP) {
/* disallocate map */
key_map = key_maps[s];
@@ -304,9 +302,6 @@ do_kdgkb_ioctl(int cmd, struct kbsentry *user_kdgkb, int perm)
return -EFAULT;
return ((p && *p) ? -EOVERFLOW : 0);
case KDSKBSENT:
- if (!perm)
- return -EPERM;
-
q = func_table[i];
first_free = funcbufptr + (funcbufsize - funcbufleft);
for (j = i+1; j < MAX_NR_FUNC && !func_table[j]; j++)
--
1.6.1.GIT
View attachment "loadkeys_us" of type "text/plain" (20032 bytes)
Powered by blists - more mailing lists