svgalib can't open /dev/mem w/1.1.47

svgalib can't open /dev/mem w/1.1.47

Post by -Michael P. Lindn » Fri, 02 Sep 1994 06:35:27



I was running the SLS 2.0 kernel, and built a 1.1.47 kernel from source
(why mess around with older kernels :^).  All of a sudden, things which
svgalib (gs and sasteroids, for example) stopped working with a "can't
open /dev/mem" message.

As root I can open /dev/mem for reading and writing, and as a user, a
program s-bitted to root can do so, but svgalib seems unable to.  I
suspected an incorrect error message was coming from svgalib, but I put
a "printk("got here")" in the open routine for /dev/mem in mem.c, and I
can see it happen when I try to open /dev/mem, and not happen when svgalib
tries it.

Any clues?  I haven't tried it with a non-shared library version of
svgalib.  What I have is (according to ldconfig):

libvga.so.1 => libvga.so.1.1.7

Any help appreciated.

Mike Lindner



--
Mike Lindner

 
 
 

svgalib can't open /dev/mem w/1.1.47

Post by Louis P. Krug » Fri, 02 Sep 1994 12:29:55




Quote:>I was running the SLS 2.0 kernel, and built a 1.1.47 kernel from source
>(why mess around with older kernels :^).  All of a sudden, things which
>svgalib (gs and sasteroids, for example) stopped working with a "can't
>open /dev/mem" message.

I noticed this too.  It appears to be a bug in the kernel when the setreuid()
system call is invoked with a paremeter of -1.  Sasteriods among other programs
use this to preserve superuser status (which svgalib automacially relinquishes)
The following patch to kernel/sys.c seems to fix the problem.

        - Louis

--- sys.c.bak   Wed Aug 31 19:58:40 1994

        if (ruid != (uid_t) -1 ||
            (euid != (uid_t) -1 && euid != old_ruid))
                current->suid = current->euid;
-       current->fsuid = euid;
+
+        if(euid != (uid_t) -1)
+               current->fsuid = euid;
+
        return 0;
 }

 
 
 

svgalib can't open /dev/mem w/1.1.47

Post by -Michael P. Lindn » Sat, 03 Sep 1994 06:44:57





>I noticed this too.  It appears to be a bug in the kernel when the setreuid()
>system call is invoked with a paremeter of -1.  Sasteriods among other programs
>use this to preserve superuser status (which svgalib automacially relinquishes)
>The following patch to kernel/sys.c seems to fix the problem.

>    - Louis

WOW! <6 hour turn around for a kernel fix!  I hope commercial UN*X
vendors take note.  Thanks!
--
Mike Lindner

 
 
 

svgalib can't open /dev/mem w/1.1.47

Post by Christopher Wil » Sat, 03 Sep 1994 00:28:20



: I was running the SLS 2.0 kernel, and built a 1.1.47 kernel from source
: (why mess around with older kernels :^).  All of a sudden, things which
: svgalib (gs and sasteroids, for example) stopped working with a "can't
: open /dev/mem" message.

<snip>

This should be fixed with svgalib 1.1.4.  Just fired off a message to
Harm about both the /dev/mem _and_ dlltools 2.1.6 incompatibility.

-- Chris


       "... but I want to use all eight comm ports SIMULTANEOUSLY!"
   PGP 2.6 public key available by finger for the clinically paranoid.

 
 
 

1. perfmeter won't work after 1.1.47 upgrade

I just upgraded my linux OS from 1.1.4 to 1.1.47 and now I get the
message

  bash# /usr/sbin/rpc.rstatd
  Cannot register service: RPC: Unable to send; errno = Network is unreachable
  unable to register (RSTATPROG, RSTATVERS_TIME, udp).
  bash#

when trying to start the rpc.rstatd  from the rstatd+kernel-patch
patch. This of course used to allow perfmeter to work. Now perfmeter
doesn't work anymore.

Does this look familiar to anyone and can you help?

Thanks, Shawn.
--
           /~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\  
          / /~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\ \  
         / /                  M. Shawn Easter                    \ \

     /~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\
    |                   Get lean, mean, and strong.                    |
    +------------------------------------------------------------------+

2. How do I autostart gpm after X stops??

3. Up to 1.1.47, back to 1.0.8: incoming telnet/rlogin connections hosed

4. K7SEM with SiS 730S chipset

5. 1.1.47 scsi errors & crashes

6. smbmount 2.0.0beta5 and linux 2.2.0pre4

7. Problems compiling kernel 1.1.47

8. Help needed for using FTP or TELNET

9. ? Kernel (1.1.47) ftape incompatibility

10. 4.8 startx can't open /dev/io (or /dev/mem)

11. cannot open /dev/mem: too many open files??

12. Ghostscript:svgalib: can't open /dev/console...why??

13. Can't open /dev/console and Trident 9680 with X/Svgalib