svgalib program is setuid root but still can't seem to allocate
graphics console
Chris Pressey
cpressey at catseye.mine.nu
Thu Sep 18 12:02:22 PDT 2003
On Thu, 18 Sep 2003 11:00:25 -0700
Chris Pressey <cpressey at catseye.mine.nu> wrote:
> Hi,
>
> I'm trying to write some code that uses /usr/ports/graphics/svgalib.
> I've started off with the first example program on:
>
> http://www.svgalib.org/jay/beginners_guide/beginners_guide.html
>
> As root, I can compile and run it fine, and I get the message:
>
> [svgalib: allocated virtual console #10]
>
> And if I try to run it as a normal user, I get:
>
> svgalib: Cannot get I/O permissions.
>
> This is expected, because the program is not setuid root. So as root
> I chmod u+s it, but then when I run it as a normal user I get:
>
> You must be the owner of the current console to use svgalib.
> Not running in a graphics capable console,
> and unable to find one.
> Using RAGE driver, 8192KB. ChipID:35 MemType:6
> Rage: BIOS reports base frequency=28.636MHz Denominator= 31
> svgalib 1.4.3
> You must be the owner of the current console to use svgalib.
> Not running in a graphics capable console,
> and unable to find one.
> Not running in a graphics capable console,
> and unable to find one.
>
> This is on ttyv0, btw. I'm running X on ttyv9.
Followup: this is happening not just with my own program, but with
programs in the ports tree like /usr/ports/graphics/acidwarp and
/usr/ports/graphics/seejpeg, on both of my FreeBSD machines:
FreeBSD foo 4.9-PRERELEASE FreeBSD 4.9-PRERELEASE #0: Thu Aug 28
11:26:32 CDT 2003 root at foo:/usr/obj/usr/src/sys/FOO i386
FreeBSD bar 4.9-PRERELEASE FreeBSD 4.9-PRERELEASE #3: Tue Sep 9
11:35:09 CDT 2003 root at bar:/usr/obj/usr/src/sys/BAR i386
Both machines contain this in their dmesg:
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on
isa0
But in short this doesn't feel like a video problem, it feels like a
setuid-bit/svgalib/both problem.
Is anyone else experiencing these sorts of problems? Was there some
recent STABLE change regarding setuid/svgalib that I missed?
-Chris
More information about the freebsd-questions
mailing list