Re: --with-gpm-mouse problems



Hi, Walery!

I could reprodice your problem on Linux 2.4.7-ac3 with devfs
(devfsd-2.4.3-12 from RedHat 7.1)

There are two problems:

1) /dev/gpmctl should be readable and writeable by users.  It is not.

2) libgpm wants the tty to be in the form "/dev/ttyN" and doesn't
understand "/dev/vc/N"

Here's the patch against gpm-1.19.3.  I don't guarantee that it's secure.

--------------------------------
--- gpm.c
+++ gpm.c
@@ -1029,7 +1029,7 @@ int main(int argc, char **argv)
   maxfd=max(maxfd,ctlfd);

 /* only allow the console user to access. */
-  chmod(GPM_NODE_CTL,0700);
+  chmod(GPM_NODE_CTL,0777);

 /*....................................... get screen dimensions */

--- liblow.c
+++ liblow.c
@@ -235,7 +235,7 @@ int Gpm_Open(Gpm_Connect *conn, int flag
           if (!t && isatty(2)) t = ttyname(2); /* stderr */
           if (!t) goto err;
           strcpy(tty,t);
-          if (strncmp(tty,"/dev/tty",8) || !isdigit(tty[8]))
+          if ((strncmp(tty,"/dev/tty",8) && strncmp(tty,"/dev/vc/",8)) || !isdigit(tty[8]))
             goto err;
           conn->vc=atoi(tty+8);
         }
--------------------------------

The problem is not in MC.

-- 
Regards,
Pavel Roskin





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]