aboutsummaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2003-09-24 16:13:29 +0800
committeredwin <edwin@FreeBSD.org>2003-09-24 16:13:29 +0800
commit96692c0a038689a05386f7324f355c74b5452dd9 (patch)
tree264218336af65c453b445c0c179ee71ef46c6d20 /graphics
parent692a6ff77f6a470c9c5d7c7eba5eb0773cbe151d (diff)
downloadfreebsd-ports-gnome-96692c0a038689a05386f7324f355c74b5452dd9.tar.gz
freebsd-ports-gnome-96692c0a038689a05386f7324f355c74b5452dd9.tar.zst
freebsd-ports-gnome-96692c0a038689a05386f7324f355c74b5452dd9.zip
[patch] graphics/svgalib checks wrong virtual console for ownership
graphics/svgalib contains an off-by-one error in the code that checks that the user is the owner of the current virtual terminal. Instead of checking /dev/ttyv[X], it checks /dev/ttyv[X+1]. Submitted by: Chris Pressey <cpressey@catseye.mine.nu> This happens because svgalib was written for Linnex, and they start tty numbering from 1, contrary to FreeBSD, which does it from 0. I always knew that FreeBSD is better: who counts from 1 in this world?! ;-) PR: ports/57052 Submitted by: Alexey Dokuchaev <danfe@regency.nsu.ru>
Diffstat (limited to 'graphics')
-rw-r--r--graphics/svgalib/files/patch-am2
1 files changed, 1 insertions, 1 deletions
diff --git a/graphics/svgalib/files/patch-am b/graphics/svgalib/files/patch-am
index 81d8b9504c94..f40bed3091d3 100644
--- a/graphics/svgalib/files/patch-am
+++ b/graphics/svgalib/files/patch-am
@@ -83,7 +83,7 @@
return 1; /* root can do it always */
#endif
- sprintf(fname, "/dev/tty%d", vc);
-+ sprintf(fname, "/dev/ttyv%x", vc);
++ sprintf(fname, "/dev/ttyv%x", vc - 1);
if ((stat(fname, &sbuf) >= 0) && (getuid() == sbuf.st_uid)) {
return 1;
}