summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Ludd <solar@gentoo.org>2003-11-29 16:40:53 +0000
committerNed Ludd <solar@gentoo.org>2003-11-29 16:40:53 +0000
commit7272b3a77969d860dc3ac9975f8b1d2fd938ead1 (patch)
tree9eb73f9b5412d638325a1aef1cd3fa4c59dffd00 /app-misc
parentcorrected integer overflows in ansi.c/resize.c max window height/width is now... (diff)
downloadhistorical-7272b3a77969d860dc3ac9975f8b1d2fd938ead1.tar.gz
historical-7272b3a77969d860dc3ac9975f8b1d2fd938ead1.tar.bz2
historical-7272b3a77969d860dc3ac9975f8b1d2fd938ead1.zip
corrected integer overflows in ansi.c/resize.c max window height/width is now 1000x1000 Bug: #34599
Diffstat (limited to 'app-misc')
-rw-r--r--app-misc/screen/Manifest4
-rw-r--r--app-misc/screen/files/digest-screen-4.0.1-r11
-rw-r--r--app-misc/screen/files/screen-4.0.1-int-overflow-fix.patch31
-rw-r--r--app-misc/screen/screen-4.0.1-r1.ebuild108
4 files changed, 142 insertions, 2 deletions
diff --git a/app-misc/screen/Manifest b/app-misc/screen/Manifest
index 378b2d6ad7b8..87d3d2100352 100644
--- a/app-misc/screen/Manifest
+++ b/app-misc/screen/Manifest
@@ -1,6 +1,6 @@
-MD5 ba5af1e49ad33879f82067ac5b0470f3 ChangeLog 6789
+MD5 3b71aaa4e29fd32b8706c360530c1d26 ChangeLog 6785
MD5 e885e877b3a21cd1ba13729342b7e880 screen-4.0.1.ebuild 3203
-MD5 8755e186d3e612d27ebf9c86c020ee27 screen-4.0.1-r1.ebuild 3323
+MD5 4387c14be1f8e52afbbb4f74d1e73b21 screen-4.0.1-r1.ebuild 3322
MD5 7d0e47c1deb94a160681be749e95bc91 screen-3.9.13-r4.ebuild 3243
MD5 98e27cdee175021303ef1abb3a8a9177 screen-3.9.15-r1.ebuild 3273
MD5 96757868314ca29cc1879160c7e03ad4 screen-3.9.15.ebuild 3258
diff --git a/app-misc/screen/files/digest-screen-4.0.1-r1 b/app-misc/screen/files/digest-screen-4.0.1-r1
new file mode 100644
index 000000000000..80f199b5715c
--- /dev/null
+++ b/app-misc/screen/files/digest-screen-4.0.1-r1
@@ -0,0 +1 @@
+MD5 2f674d5a7a299abf085d0b69c90de4f8 screen-4.0.1.tar.gz 837445
diff --git a/app-misc/screen/files/screen-4.0.1-int-overflow-fix.patch b/app-misc/screen/files/screen-4.0.1-int-overflow-fix.patch
new file mode 100644
index 000000000000..4a40c8dd2c7c
--- /dev/null
+++ b/app-misc/screen/files/screen-4.0.1-int-overflow-fix.patch
@@ -0,0 +1,31 @@
+--- ansi.c.orig 2003-09-08 10:24:44.000000000 -0400
++++ ansi.c 2003-11-29 10:41:15.000000000 -0500
+@@ -559,7 +559,7 @@
+ {
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+- if (curr->w_NumArgs < MAXARGS)
++ if (curr->w_NumArgs >= 0 && curr->w_NumArgs < MAXARGS)
+ {
+ if (curr->w_args[curr->w_NumArgs] < 100000000)
+ curr->w_args[curr->w_NumArgs] =
+--- resize.c.orig 2003-09-08 10:26:31.000000000 -0400
++++ resize.c 2003-11-29 10:41:50.000000000 -0500
+@@ -682,6 +682,17 @@
+ if (wi == 0)
+ he = hi = 0;
+
++ if (wi > 1000)
++ {
++ Msg(0, "Window width too large, truncated");
++ wi = 1000;
++ }
++ if (he > 1000)
++ {
++ Msg(0, "Window height too large, truncated");
++ he = 1000;
++ }
++
+ if (p->w_width == wi && p->w_height == he && p->w_histheight == hi)
+ {
+ debug("ChangeWindowSize: No change.\n");
diff --git a/app-misc/screen/screen-4.0.1-r1.ebuild b/app-misc/screen/screen-4.0.1-r1.ebuild
new file mode 100644
index 000000000000..c9a7e787440f
--- /dev/null
+++ b/app-misc/screen/screen-4.0.1-r1.ebuild
@@ -0,0 +1,108 @@
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/screen/screen-4.0.1-r1.ebuild,v 1.1 2003/11/29 16:40:50 solar Exp $
+
+inherit flag-o-matic
+
+IUSE="pam"
+DESCRIPTION="Screen is a full-screen window manager that multiplexes a physical terminal between several processes"
+HOMEPAGE="http://www.guckes.net/screen/"
+SRC_URI="ftp://ftp.uni-erlangen.de/pub/utilities/screen/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~x86 ~sparc ~ppc"
+
+DEPEND=">=sys-libs/ncurses-5.2
+ >=sys-apps/sed-4
+ pam? ( >=sys-libs/pam-0.75 )"
+
+src_unpack() {
+ unpack ${A} && cd ${S}
+
+ # Bug: 34599 integer overflow in 4.0.1 (Nov 29 2003 -solar)
+ epatch ${FILESDIR}/${PN}-${PV}-int-overflow-fix.patch
+
+ # Fix manpage.
+ sed -i \
+ -e "s:/usr/local/etc/screenrc:/etc/screenrc:g;
+ s:/usr/local/screens:/var/run/screen:g;
+ s:/local/etc/screenrc:/etc/screenrc:g;
+ s:/etc/utmp:/var/run/utmp:g;
+ s:/local/screens/S-:/var/run/screen/S-:g" doc/screen.1 || \
+ die "sed doc/screen.1 failed"
+}
+
+src_compile() {
+ local myconf
+
+ addpredict "`tty`"
+ addpredict "${SSH_TTY}"
+
+ # check config.h for other settings such as the
+ # max-number of windows allowed by screen.
+ append-flags "-DPTYMODE=0620 -DPTYGROUP=5"
+ use pam && myconf="--enable-pam" && append-flags "-DUSE_PAM"
+
+ econf \
+ --with-socket-dir=/var/run/screen \
+ --with-sys-screenrc=/etc/screenrc \
+ --enable-rxvt_osc ${myconf}
+
+# # Fix bug 12683 by fixing up term.h (remove dups and add missing).
+# # This is really an upstream problem in screen, I think.
+# # (15 Jan 2003 agriffis)
+# mv term.h term.h.old
+# awk '/^#define/ { if (defs[$2]) next; defs[$2] = $3 }
+# { print }
+# END { for (d in defs) {
+# if (d !~ /_C../) continue;
+# d2 = gensub(/C/, "", 1, d);
+# if (d2 in defs) continue;
+# print "#define " d2 " " defs[d]
+# }
+# }' term.h.old > term.h || die "Failed to fix term.h"
+
+ # Second try to fix bug 12683, this time without changing term.h
+ # The last try seemed to break screen at run-time.
+ # (16 Jan 2003 agriffis)
+ LC_ALL=POSIX make term.h || die "Failed making term.h"
+
+ emake || die "emake failed"
+}
+
+src_install () {
+ dobin screen || die "dobin failed"
+ keepdir /var/run/screen
+ fperms 2755 /usr/bin/screen
+ fowners root:utmp /{usr/bin,var/run}/screen
+
+ insinto /usr/share/terminfo ; doins terminfo/screencap
+ insinto /usr/share/screen/utf8encodings ; doins utf8encodings/??
+ insopts -m 644 ; insinto /etc ; doins ${FILESDIR}/screenrc
+
+ use pam && {
+ insinto /etc/pam.d
+ newins ${FILESDIR}/screen.pam.system-auth screen
+ }
+
+ dodoc README ChangeLog INSTALL TODO NEWS* patchlevel.h \
+ doc/{FAQ,README.DOTSCREEN,fdpat.ps,window_to_display.ps} || \
+ die "dodoc failed"
+
+ doman doc/screen.1 || die "doman failed"
+ doinfo doc/screen.info* || die "doinfo failed"
+}
+
+pkg_postinst() {
+ chmod 0775 /var/run/screen
+
+ einfo "Some dangerous key bindings have been removed or changed to more safe values."
+ einfo "For more info, please check /etc/screenrc"
+ echo
+ einfo "screen is not installed as setuid root, which effectively disables multi-user"
+ einfo "mode. To enable it, run:"
+ einfo ""
+ einfo "\tchmod u+s /usr/bin/screen"
+ einfo "\tchmod go-w /var/run/screen"
+}