Security fix, bug #71595
authorCiaran McCreesh <ciaranm@gentoo.org>
Sun, 28 Nov 2004 19:31:24 +0000 (19:31 +0000)
committerCiaran McCreesh <ciaranm@gentoo.org>
Sun, 28 Nov 2004 19:31:24 +0000 (19:31 +0000)
dev-util/cscope/ChangeLog
dev-util/cscope/Manifest
dev-util/cscope/cscope-15.5-r2.ebuild [new file with mode: 0644]
dev-util/cscope/files/cscope-15.5-can-2004-0996.patch [new file with mode: 0644]
dev-util/cscope/files/digest-cscope-15.5-r2 [new file with mode: 0644]

index 38f671ad75f3c874ed91df19591cbe4f8176b32a..d2346dcc46492532b268199beb17a45a09e316c3 100644 (file)
@@ -1,6 +1,11 @@
 # ChangeLog for dev-util/cscope
 # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/cscope/ChangeLog,v 1.31 2004/11/18 08:57:25 mkennedy Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/cscope/ChangeLog,v 1.32 2004/11/28 19:31:24 ciaranm Exp $
+
+*cscope-15.5-r2 (28 Nov 2004)
+
+  28 Nov 2004; Ciaran McCreesh <ciaranm@gentoo.org> +cscope-15.5-r2.ebuild:
+  Security fix, bug #71595
 
 *cscope-15.5-r1 (18 Nov 2004)
 
index 3753de01290379a61ddf9271906bcdb7f663ad26..493a0806229d7da91b99b24a2ee0b76fee67c69e 100644 (file)
@@ -1,8 +1,21 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+MD5 336bda89fb52186ad57731559ccbd939 cscope-15.5-r1.ebuild 1604
+MD5 41e5d512305d3ba0905e6b68181342df ChangeLog 4513
 MD5 3c56dcf0da026c9a6ef0e7c204419785 cscope-15.5.ebuild 1417
-MD5 763aa12543b871b0a766f17156ac55c4 ChangeLog 4379
 MD5 79094d1585cb050b3855fbfe440f22b9 metadata.xml 790
-MD5 336bda89fb52186ad57731559ccbd939 cscope-15.5-r1.ebuild 1604
+MD5 cc86c88667d339cb005ca6fd07d2126c cscope-15.5-r2.ebuild 1657
 MD5 28ddc553966bf7045758be324600f5c8 files/50xcscope-gentoo.el 95
-MD5 25ad9fe446a7cabf4c482bbe150c7eaa files/digest-cscope-15.5 63
 MD5 25ad9fe446a7cabf4c482bbe150c7eaa files/digest-cscope-15.5-r1 63
 MD5 22e8d669b78f301c45e9075e2793dfd3 files/15.5-noclobber-tempfile-rexotec.patch 1055
+MD5 c8aeadd309e54712241dec1b77072cbb files/cscope-15.5-can-2004-0996.patch 1125
+MD5 25ad9fe446a7cabf4c482bbe150c7eaa files/digest-cscope-15.5 63
+MD5 25ad9fe446a7cabf4c482bbe150c7eaa files/digest-cscope-15.5-r2 63
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.2.6 (GNU/Linux)
+
+iD8DBQFBqieFLLFUmVNQ7rkRAhXEAKC+bxVlNSmjXXSFa0lWC3P0FCDcNQCfed4j
+88Fl0zofHORRQ/QyoKskQ7A=
+=yJmk
+-----END PGP SIGNATURE-----
diff --git a/dev-util/cscope/cscope-15.5-r2.ebuild b/dev-util/cscope/cscope-15.5-r2.ebuild
new file mode 100644 (file)
index 0000000..0562478
--- /dev/null
@@ -0,0 +1,68 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-util/cscope/cscope-15.5-r2.ebuild,v 1.1 2004/11/28 19:31:24 ciaranm Exp $
+
+inherit gnuconfig elisp-common eutils
+
+DESCRIPTION="Interactively examine a C program"
+HOMEPAGE="http://cscope.sourceforge.net/"
+SRC_URI="mirror://sourceforge/cscope/${P}.tar.gz"
+
+LICENSE="as-is"
+SLOT="0"
+KEYWORDS="~x86 ~ppc sparc mips ~alpha ~arm ~hppa ~amd64 ~ia64 ~s390 ~ppc64"
+IUSE="emacs"
+
+RDEPEND=">=sys-libs/ncurses-5.2"
+DEPEND="${RDEPEND}
+       sys-devel/flex
+       sys-devel/bison
+       emacs? ( virtual/emacs )"
+
+SITEFILE=50xcscope-gentoo.el
+
+src_unpack() {
+       unpack ${A}
+       cd ${S}
+       # Gentoo Bug #71595, http://www.rexotec.com/advisory/RX171104.html
+       epatch ${FILESDIR}/${PV}-noclobber-tempfile-rexotec.patch
+       epatch ${FILESDIR}/${PN}-${PV}-can-2004-0996.patch
+}
+
+src_compile() {
+       gnuconfig_update
+
+       # This fix is no longer needed as of cscope-15.5 which now should
+       # work with bison directly.      (04 Feb 2004 agriffis)
+       #sed -i -e "s:={:{:" src/egrep.y
+
+       econf || die
+       make clean || die
+       emake || die
+
+       if use emacs ; then
+               cd ${S}/contrib/xcscope || die
+               elisp-compile *.el || die
+       fi
+}
+
+src_install() {
+       einstall || die
+       dodoc NEWS AUTHORS TODO ChangeLog INSTALL README* || die
+
+       if use emacs ; then
+               cd ${S}/contrib/xcscope || die
+               elisp-install xcscope *.el *.elc || die
+               elisp-site-file-install ${FILESDIR}/${SITEFILE} xcscope || die
+               dobin cscope-indexer || die
+       fi
+       cp -r ${S}/contrib/webcscope ${D}/usr/share/doc/${PF}/ || die
+}
+
+pkg_postinst() {
+       use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+       use emacs && elisp-site-regen
+}
diff --git a/dev-util/cscope/files/cscope-15.5-can-2004-0996.patch b/dev-util/cscope/files/cscope-15.5-can-2004-0996.patch
new file mode 100644 (file)
index 0000000..4084b13
--- /dev/null
@@ -0,0 +1,38 @@
+--- cscope-15.3.orig/src/main.c
++++ cscope-15.3/src/main.c
+@@ -336,9 +336,32 @@
+       }
+ 
+       /* create the temporary file names */
+-      pid = getpid();
+-      (void) sprintf(temp1, "%s/cscope%d.1", tmpdir, pid);
+-      (void) sprintf(temp2, "%s/cscope%d.2", tmpdir, pid);
++      do {
++              char *tempfile = tempnam(tmpdir, "cscope1");
++              if (!tempfile) {
++                      fprintf (stderr, "Can't create tempfile\n");
++                      exit(1);
++              }
++              if (strlen(tempfile) >= sizeof(temp1)) {
++                      fprintf (stderr, "TMPDIR path is too long\n");
++                      exit(1);
++              }
++              strncpy (temp1, tempfile, sizeof (temp1));
++              free (tempfile);
++      } while (open (temp1, O_CREAT|O_EXCL|O_WRONLY, S_IREAD|S_IWRITE) < 0);
++      do {
++              char *tempfile = tempnam(tmpdir, "cscope2");
++              if (!tempfile) {
++                      fprintf (stderr, "Can't create tempfile\n");
++                      exit(1);
++              }
++              if (strlen(tempfile) >= sizeof(temp2)) {
++                      fprintf (stderr, "TMPDIR path is too long\n");
++                      exit(1);
++              }
++              strncpy (temp2, tempfile, sizeof (temp2));
++              free (tempfile);
++      } while (open (temp2, O_CREAT|O_EXCL|O_WRONLY, S_IREAD|S_IWRITE) < 0);
+ 
+       /* if running in the foreground */
+       if (signal(SIGINT, SIG_IGN) != SIG_IGN) {
diff --git a/dev-util/cscope/files/digest-cscope-15.5-r2 b/dev-util/cscope/files/digest-cscope-15.5-r2
new file mode 100644 (file)
index 0000000..99cb973
--- /dev/null
@@ -0,0 +1 @@
+MD5 beb6032a301bb11524aec74bfb5e4840 cscope-15.5.tar.gz 243793