Re: svgalib + slackware

Search this archive.

From: Dr. Michael Weller (eowmob@exp-math.uni-essen.de)
Date: Tue 28 Dec 1999 - 18:34:46 IST


On Fri, 24 Dec 1999 CalcPage@aol.com wrote:

>     I just installed svgalib to my zipslack 7.0 (slackware without GUIs on a 
> DOS partition) laptop linux box and have a problem.  I got a very basic 
> console pixel graphics program compiled (gcc -O3 -o testvga testvga.c -lvga) 
> and executed, so I suppose it works and is installed correctly.
> 
>     The problem is with security.  I could not get this to comiple unless I 

Compilation should actually work as a normal user. It might be though,
that some of the svgalib headers or the lib are not readable by non root
users. An exact error message from you might shed a light where the
problem is. Also, a setsuid root binary is typically not writable by
normal users, so it might be the linker just failing a previously compiled
exec by a new one. Just delete it in advance (if you own the directzory
its in). 

> switched to supervisor rights.  Also, the compiled program would not execute 
> unless I had su rights.  I tried what you suggested in the dox with 'chmod 
This is to be expected.

> u+s testvga' but this only changed the permissions from -rwzr-xr-x to 
                        (I'm sure you mean -rwxr-xr-x)
> -rwsr-xr-x when listing the directory.
This is what it ought to do. Also, the binary must be owned by root!
>  The program would not run.  

If binary is owned by root and has the s bit set. It should work.
But you mention it runs on a dos partition. Plain dos files neither
support s bit nor file owners. I assume you actually use an umsdos
partition. It might be it has problems with that. Also, check the mount
options for this filesystem. setsuid binaries might simply be disabled.

>     Also, what I want to do with this is give my AP Computer Science students 
> a graphics library to play with (we're using g++ primarily), so giving them 
> su rights is not a good idea!

svgalib gives them access to the vga card, so they can fry the hardware
anyway. Anyway, as the kernel does not deal with the vga card, svgalib
needs hardware access. This can only be achieved by root. There is/used to
be a package called ioperm (I don't have an url for it). It would allow to
give full i/o priviledge to all their processes and use svgalib as non
root. However, they can still use it to access the harddisk and any other
hardware directly, so it makes it only a bit more difficult to do harm.
 
svgalib allows svga graphix in an MSDOS operation style, but, as MSDOS
gives total hardware access. If you cannot do it this way, you cannot use
svgalib. Check for the new framebuffer device drivers, a simple X11 coding
library, etc..
These are probably better suited for what you intent.

Michael.

--

Michael Weller: eowmob@exp-math.uni-essen.de, eowmob@ms.exp-math.uni-essen.de,
or even mat42b@spi.power.uni-essen.de. If you encounter an eowmob account on
any machine in the net, it's very likely it's me.


This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:23 IST