Package: svgalib-bin
Version: 1:1.4.3-21
Severity: normal

The textmode(1) script starts off like so:

----begin----
#!/bin/sh

dir=/etc/vga
[ -w "$dir" ] || dir="$HOME/.vga"
....
----end----

It checks whether or not /etc/vga is writable, even though it will only
be reading saved VGA state files. If you had previously run
savetextmode(1) as root, but then run textmode(1) as a user, the
restore* programs will read from ~/.vga, even if it does not exist.

(This script is not part of the svgalib upstream; it is brought into
being by the 001_fhs_transition patch.)

Aside from this issue, I notice that the script uses both of the VGA
state files (in a given directory) even if only one is present. May I
suggest a different approach?

----begin----
textregs=
fontdata=
for dir in /etc /etc/vga "$HOME/.vga"
do
        test -r "$dir/textregs" && textregs="$dir/textregs"
        test -r "$dir/fontdata" && fontdata="$dir/fontdata"
done
test -n "$textregs" && restoretextmode -r "$textregs"
....

case "$textregs" in
        /etc/vga/*) ;;
        /etc/*) echo >&2 "WARNING: ..." ;;
esac
----end----


-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.11-1-k7
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages svgalib-bin depends on:
ii  libc6                       2.3.2.ds1-22 GNU C Library: Shared libraries an
ii  libsvga1                    1:1.4.3-21   console SVGA display libraries

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to