summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Ludd <solar@gentoo.org>2005-04-24 18:26:17 +0000
committerNed Ludd <solar@gentoo.org>2005-04-24 18:26:17 +0000
commitd983ffbdc5571884d5d2910e9bc05f50d84ec11c (patch)
tree6e482eb7776a64c00032fe7f9c6bacba72225ec7 /sys-devel
parentRemoving a debug statement I left in. (diff)
downloadgentoo-2-d983ffbdc5571884d5d2910e9bc05f50d84ec11c.tar.gz
gentoo-2-d983ffbdc5571884d5d2910e9bc05f50d84ec11c.tar.bz2
gentoo-2-d983ffbdc5571884d5d2910e9bc05f50d84ec11c.zip
- avoid executing arbitrary .gdbinit files in pwd that are not owned by the current uid or that are world writeable. sec bug #88398
(Portage version: 2.0.51.20)
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/gdb/ChangeLog9
-rw-r--r--sys-devel/gdb/Manifest45
-rw-r--r--sys-devel/gdb/files/digest-gdb-6.3-r23
-rw-r--r--sys-devel/gdb/files/gdb-6.3-gdbinit-stat.patch11
-rw-r--r--sys-devel/gdb/gdb-6.3-r2.ebuild98
5 files changed, 144 insertions, 22 deletions
diff --git a/sys-devel/gdb/ChangeLog b/sys-devel/gdb/ChangeLog
index 769327a6ec16..a9695da18610 100644
--- a/sys-devel/gdb/ChangeLog
+++ b/sys-devel/gdb/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-devel/gdb
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/ChangeLog,v 1.63 2005/04/24 06:51:40 corsair Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/ChangeLog,v 1.64 2005/04/24 18:26:17 solar Exp $
+
+*gdb-6.3-r2 (24 Apr 2005)
+
+ 24 Apr 2005; <solar@gentoo.org> +files/gdb-6.3-gdbinit-stat.patch,
+ +gdb-6.3-r2.ebuild:
+ - avoid executing arbitrary .gdbinit files in pwd that are not owned by the
+ current uid or that are world writeable. sec bug #88398
24 Apr 2005; Markus Rothe <corsair@gentoo.org> gdb-6.3.ebuild:
Stable on ppc64
diff --git a/sys-devel/gdb/Manifest b/sys-devel/gdb/Manifest
index 9b3162b4ab1c..4e1ba42199eb 100644
--- a/sys-devel/gdb/Manifest
+++ b/sys-devel/gdb/Manifest
@@ -1,33 +1,36 @@
-MD5 167c9956be01308c205ba9c2eb5aa2aa ChangeLog 9141
+MD5 38589de77f23f062500f1e0c745cdd31 gdb-6.3-r2.ebuild 2709
+MD5 d8fa35af872cf3fa5fcfce605bbdc9b2 gdb-6.3.ebuild 2397
MD5 c2e11638acab3f11b88466a4f261eacc gdb-6.0-r1.ebuild 2043
MD5 e0f3ee7e8ce992eefd2302af54b33d6a gdb-6.0.ebuild 1906
-MD5 686556423ec5590d0341718d4a545189 gdb-6.1.1.ebuild 1850
-MD5 2a52c4cd9bf5e2667c6bc7312e179fa0 gdb-6.1.ebuild 1807
MD5 4fd3e363d0a40676217df9b0faee4d80 gdb-6.2.1-r1.ebuild 1928
-MD5 fb4ab4aaccb90b523c650a5f30d02281 gdb-6.2.1.ebuild 1784
+MD5 1132ec19af9b2fc7b47a59998fe6534c gdb-6.3-r1.ebuild 2660
MD5 44fe1e6f031c991736e4ea4b17697926 gdb-6.2.ebuild 1782
-MD5 d8fa35af872cf3fa5fcfce605bbdc9b2 gdb-6.3.ebuild 2397
+MD5 686556423ec5590d0341718d4a545189 gdb-6.1.1.ebuild 1850
+MD5 fb4ab4aaccb90b523c650a5f30d02281 gdb-6.2.1.ebuild 1784
+MD5 f5cabac554dbed0c6f6965a2cd499cf3 ChangeLog 9396
+MD5 2a52c4cd9bf5e2667c6bc7312e179fa0 gdb-6.1.ebuild 1807
MD5 567094e03359ffc1c95af7356395228d metadata.xml 162
-MD5 1132ec19af9b2fc7b47a59998fe6534c gdb-6.3-r1.ebuild 2660
-MD5 420712ede2a47fedcae76b6f6215b9d4 files/digest-gdb-6.0 62
-MD5 c87a4627da2b7a05406088f51237e5b4 files/digest-gdb-6.0-r1 127
-MD5 460629563df21e6a68b8941c07d4f30b files/digest-gdb-6.1 131
+MD5 c6dfff1373e52fef5872c1bdca4cb706 files/gdb-6.0-info.patch 1108
+MD5 7ea8f83bb7b0d70e7e6d6c8cf42292d3 files/gdb-6.x-crash.patch 678
+MD5 dc01eff75d7495a2159e2ff9fc48f164 files/gdb-6.0-xfreemod-all.patch 1599
MD5 688c499ca8b7c9006c978595fe5461a7 files/digest-gdb-6.1.1 133
-MD5 bcc4ae6718ad45a97ca7822df03bb8af files/digest-gdb-6.2 131
MD5 b3790be989db97b22c599572afbce109 files/digest-gdb-6.2.1 133
+MD5 e497ab2f05d847bde74f4e3441e2c7a2 files/gdb-6.0-coreutils.patch 1964
+MD5 37007f485c9f93564f99675e59b65e7f files/gdb-6.2.1-pass-libdir.patch 300
+MD5 1de0e1b91ac150426719e904f0e1a5cd files/gdb-5.3-sparc-nat-asm.patch 521
MD5 b3790be989db97b22c599572afbce109 files/digest-gdb-6.2.1-r1 133
+MD5 cc65dade388e6a21b5858b146f52b6eb files/gdb-6.1-uclibc.patch 6363
+MD5 a4610ec65e88f73e0b00b525467a5372 files/gdb-6.3-scanmem.patch 6652
+MD5 2657b597618d0c35b48f47e3f808d171 files/gdb-6.3-relative-paths.patch 3286
+MD5 cc707a338c9f8264cf961b457f2c09d9 files/gdb-6.3-gdbinit-stat.patch 429
+MD5 374352fdf0b1516a88eeaf0a921a2208 files/gdb-6.2.1-relative-paths.patch 3499
+MD5 420712ede2a47fedcae76b6f6215b9d4 files/digest-gdb-6.0 62
+MD5 460629563df21e6a68b8941c07d4f30b files/digest-gdb-6.1 131
+MD5 bcc4ae6718ad45a97ca7822df03bb8af files/digest-gdb-6.2 131
MD5 2560a7e81574df415f79e0798503ecc0 files/digest-gdb-6.3 121
-MD5 1de0e1b91ac150426719e904f0e1a5cd files/gdb-5.3-sparc-nat-asm.patch 521
-MD5 e497ab2f05d847bde74f4e3441e2c7a2 files/gdb-6.0-coreutils.patch 1964
-MD5 c6dfff1373e52fef5872c1bdca4cb706 files/gdb-6.0-info.patch 1108
MD5 adbe09f334ca5267284ca9404400d2f5 files/gdb-6.0-threadver-aug2003.patch 4081
-MD5 dc01eff75d7495a2159e2ff9fc48f164 files/gdb-6.0-xfreemod-all.patch 1599
MD5 1da0dcdbff7ba48a06350a28ecdd238e files/gdb-6.1-ppc64-01.patch 359
-MD5 cc65dade388e6a21b5858b146f52b6eb files/gdb-6.1-uclibc.patch 6363
-MD5 37007f485c9f93564f99675e59b65e7f files/gdb-6.2.1-pass-libdir.patch 300
-MD5 374352fdf0b1516a88eeaf0a921a2208 files/gdb-6.2.1-relative-paths.patch 3499
-MD5 2657b597618d0c35b48f47e3f808d171 files/gdb-6.3-relative-paths.patch 3286
-MD5 a4610ec65e88f73e0b00b525467a5372 files/gdb-6.3-scanmem.patch 6652
-MD5 b676fe75d53ccd00bf7a9b762747fe89 files/gdb-6.3-uclibc.patch 6656
-MD5 7ea8f83bb7b0d70e7e6d6c8cf42292d3 files/gdb-6.x-crash.patch 678
+MD5 c87a4627da2b7a05406088f51237e5b4 files/digest-gdb-6.0-r1 127
MD5 6516e95e4ed8409e4173d7f1f66f03b8 files/digest-gdb-6.3-r1 183
+MD5 6516e95e4ed8409e4173d7f1f66f03b8 files/digest-gdb-6.3-r2 183
+MD5 b676fe75d53ccd00bf7a9b762747fe89 files/gdb-6.3-uclibc.patch 6656
diff --git a/sys-devel/gdb/files/digest-gdb-6.3-r2 b/sys-devel/gdb/files/digest-gdb-6.3-r2
new file mode 100644
index 000000000000..081c33419a3e
--- /dev/null
+++ b/sys-devel/gdb/files/digest-gdb-6.3-r2
@@ -0,0 +1,3 @@
+MD5 05b928f41fa5b482e49ca2c24762a0ae gdb-6.3.tar.bz2 13446729
+MD5 f96eec021725e7b4cdc6713ececed89a gdb_6.3-5.diff.gz 149881
+MD5 35e70c29e393433b3847527d808f59c2 gdb_init.txt.bz2 6247
diff --git a/sys-devel/gdb/files/gdb-6.3-gdbinit-stat.patch b/sys-devel/gdb/files/gdb-6.3-gdbinit-stat.patch
new file mode 100644
index 000000000000..36e1289260e2
--- /dev/null
+++ b/sys-devel/gdb/files/gdb-6.3-gdbinit-stat.patch
@@ -0,0 +1,11 @@
+--- gdb/main.c.orig 2005-04-08 18:21:50.000000000 -0400
++++ gdb/main.c 2005-04-08 18:50:58.000000000 -0400
+@@ -693,7 +693,7 @@
+
+ if (!homedir
+ || memcmp ((char *) &homebuf, (char *) &cwdbuf, sizeof (struct stat)))
+- if (!inhibit_gdbinit)
++ if (!inhibit_gdbinit && (cwdbuf.st_uid == getuid()) && (!cwdbuf.st_mode & (S_IWOTH)))
+ {
+ catch_command_errors (source_command, gdbinit, 0, RETURN_MASK_ALL);
+ }
diff --git a/sys-devel/gdb/gdb-6.3-r2.ebuild b/sys-devel/gdb/gdb-6.3-r2.ebuild
new file mode 100644
index 000000000000..e8c978d536b2
--- /dev/null
+++ b/sys-devel/gdb/gdb-6.3-r2.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb/gdb-6.3-r2.ebuild,v 1.1 2005/04/24 18:26:17 solar Exp $
+
+inherit flag-o-matic eutils
+
+export CTARGET=${CTARGET:-${CHOST}}
+if [[ ${CTARGET} == ${CHOST} ]] ; then
+ if [[ ${CATEGORY/cross-} != ${CATEGORY} ]] ; then
+ export CTARGET=${CATEGORY/cross-}
+ fi
+fi
+
+DEB_VER=5
+DESCRIPTION="GNU debugger"
+HOMEPAGE="http://sources.redhat.com/gdb/"
+SRC_URI="http://mirrors.rcn.net/pub/sourceware/gdb/releases/${P}.tar.bz2
+ mirror://debian/pool/main/g/gdb/gdb_${PV}-${DEB_VER}.diff.gz
+ mirror://gentoo/gdb_init.txt.bz2"
+#SRC_URI="${SRC_URI} mirror://gentoo/gdb-6.1-hppa-01.patch.bz2"
+
+LICENSE="GPL-2 LGPL-2"
+[[ ${CTARGET} != ${CHOST} ]] \
+ && SLOT="${CTARGET}" \
+ || SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86"
+IUSE="nls test"
+
+RDEPEND=">=sys-libs/ncurses-5.2-r2"
+DEPEND="${RDEPEND}
+ test? ( dev-util/dejagnu )
+ nls? ( sys-devel/gettext )"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ mv "${WORKDIR}"/gdb_init.txt . || die
+ epatch "${WORKDIR}"/gdb_${PV}-${DEB_VER}.diff
+ for f in $(<debian/patches/series) ; do
+ EPATCH_SINGLE_MSG="Applying Debian's ${f}" \
+ epatch debian/patches/${f}
+ done
+ epatch "${FILESDIR}"/gdb-6.3-uclibc.patch
+ epatch "${FILESDIR}"/gdb-6.3-relative-paths.patch
+ #epatch "${FILESDIR}"/gdb-6.x-crash.patch
+ epatch "${FILESDIR}"/gdb-6.2.1-pass-libdir.patch
+ epatch "${FILESDIR}"/gdb-6.3-scanmem.patch
+ epatch "${FILESDIR}"/gdb-6.3-gdbinit-stat.patch
+
+ strip-linguas -u bfd/po opcodes/po
+}
+
+src_compile() {
+ replace-flags -O? -O2
+ econf $(use_enable nls) || die
+ emake -j1 || die
+}
+
+src_install() {
+ make \
+ prefix="${D}"/usr \
+ mandir="${D}"/usr/share/man \
+ infodir="${D}"/usr/share/info \
+ libdir="${D}"/nukeme includedir="${D}"/nukeme \
+ install || die "install"
+ # The includes and libs are in binutils already
+ rm -r "${D}"/nukeme
+
+ # Don't install docs when building a cross-gdb
+ if [[ ${CTARGET} != ${CHOST} ]] ; then
+ rm -r "${D}"/usr/share
+ return 0
+ fi
+
+ dodoc README
+ docinto gdb
+ dodoc gdb/CONTRIBUTE gdb/README gdb/MAINTAINERS \
+ gdb/NEWS gdb/ChangeLog* gdb/TODO
+ docinto sim
+ dodoc sim/ChangeLog sim/MAINTAINERS sim/README-HACKING
+ docinto mmalloc
+ dodoc mmalloc/MAINTAINERS mmalloc/ChangeLog mmalloc/TODO
+
+ if use x86 ; then
+ dodir /etc/skel/
+ cp "${S}"/gdb_init.txt "${D}"/etc/skel/.gdbinit \
+ || die "install ${D}/etc/skel/.gdbinit"
+ fi
+
+ if ! has noinfo ${FEATURES} ; then
+ make -C "${S}"/gdb/doc \
+ infodir="${D}"/usr/share/info \
+ install-info || die "install doc info"
+ make -C "${S}"/bfd/doc \
+ infodir="${D}"/usr/share/info \
+ install-info || die "install bfd info"
+ fi
+}