net-analyzer/tcpdump: update to 4.9.3

Update tcpdump to 4.9.3, to address security issue CVE-2018-10103,
mishandling the printing of SMB data.
This commit is contained in:
Dongsu Park 2020-09-17 13:41:45 +02:00
parent 5490b0439c
commit a9a8ee6efc
7 changed files with 115 additions and 102 deletions

View File

@ -1,3 +1,2 @@
DIST tcpdump-4.9.0.tar.gz 1260309 SHA256 eae98121cbb1c9adbedd9a777bf2eae9fa1c1c676424a54740311c8abcee5a5e SHA512 e98d73ae706d42e96b4069e196cf17af892eb97935664eebd08779b55b4da858bc1732d714efd16924f862aad0ba5550ceb2213c68414ed48907c46456c9fc82 WHIRLPOOL bd2284919bd3a2af166c6e05254e6fb7fa757b76f269d1a4951fe0ccfb6ad282a50f5670d3f8a38f6bffd1834bc809effd2e8575f9f0dd2fd7eaa4b4fdce5552 DIST tcpdump-4.10.0rc1.tar.gz 1823212 BLAKE2B aa274e548163eacb09a98edbaa1127dbb06b6fe2f6eb23ffa968a577081d9d9323c339a885a198ee08d7dced04302cf50301ca575fbe95e082a6ed89e115de05 SHA512 b226ca569eeda7cee45fc7a1e42766f404d55ebca8133da544ecd75f975701532346f0cfdbefd4fc708fca12a8d094790c99a7276bd9b563885ef036a3912493
DIST tcpdump-4.9.1.tar.gz 1192832 SHA256 4d1a69eab083d5df91effb805024abd4406e8a592e98558ed8722ef160c58119 SHA512 82ff20ece4c197f4b0142e45227310dc513facc9668c1423cb402eb2b62a18909a172c432ee6b20c012c172d47752ef65e2747f9d93d335073ea0ce3c007f5c9 WHIRLPOOL ed59af89e0c67477db3f10bd2d8c2b9b2dc2b3c7e3906abe37b0eba5024084e93afa98b39690c1c3af94cc6a0955023ee01ccfc5547a454dafe952957807295f DIST tcpdump-4.9.3.tar.gz 2333119 BLAKE2B 21e13fc40d98cfac0bbd5513580cf98313df1f8fea24c48f045f70d494aea3e75230b8481049660c109f9179015c3164f3e3b31acc76c0bfb1f2da5039f1834e SHA512 3aec673f78b996a4df884b1240e5d0a26a2ca81ee7aca8a2e6d50255bb53476e008a5ced4409e278a956710d8a4d31d85bbb800c9f1aab92b0b1046b59292a22
DIST tcpdump-4.9.2.tar.gz 2298386 SHA256 798b3536a29832ce0cbb07fafb1ce5097c95e308a6f592d14052e1ef1505fe79 SHA512 e1bc19a5867d6e3628f3941bdf3ec831bf13784f1233ca1bccc46aac1702f47ee9357d7ff0ca62cddf211b3c8884488c21144cabddd92c861e32398cd8f7c44b WHIRLPOOL 6652a5bb83a082bc8df050610ed640f0119fb846f2938a5148be3008506548e73c3c6437a62752eafdd00910c35b2b5decfd21c207719d156fb7dc8ca9e3443a

View File

@ -0,0 +1,19 @@
--- a/configure.ac
+++ b/configure.ac
@@ -371,7 +371,7 @@
if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
- LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
+ LIBS="-l$ipv6lib $LIBS"
echo "You have $ipv6lib library, using it"
else
if test "$ipv6trylibc" = "yes"; then
@@ -891,7 +891,6 @@
# at the front of the header and library search path.
#
CFLAGS="-I$withval/include $CFLAGS"
- LIBS="-L$withval/lib $LIBS"
fi
],[
#

View File

@ -10,6 +10,7 @@
<flag name="drop-root">Drop privileges to tcpdump:tcpdump when run as root</flag> <flag name="drop-root">Drop privileges to tcpdump:tcpdump when run as root</flag>
</use> </use>
<upstream> <upstream>
<remote-id type="cpe">cpe:/a:tcpdump:tcpdump</remote-id>
<remote-id type="github">the-tcpdump-group/tcpdump</remote-id> <remote-id type="github">the-tcpdump-group/tcpdump</remote-id>
</upstream> </upstream>
</pkgmetadata> </pkgmetadata>

View File

@ -1,45 +1,48 @@
# Copyright 1999-2017 Gentoo Foundation # Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=6 EAPI=7
inherit eutils flag-o-matic toolchain-funcs user inherit autotools user
DESCRIPTION="A Tool for network monitoring and data acquisition" DESCRIPTION="A Tool for network monitoring and data acquisition"
EGIT_REPO_URI="https://github.com/the-tcpdump-group/tcpdump"
HOMEPAGE=" HOMEPAGE="
http://www.tcpdump.org/ https://www.tcpdump.org/
${EGIT_REPO_URI} https://github.com/the-tcpdump-group/tcpdump
"
LICENSE="BSD"
SRC_URI="
https://github.com/the-tcpdump-group/${PN}/archive/${P/_}.tar.gz
" "
LICENSE="BSD"
SLOT="0" SLOT="0"
IUSE="+drop-root libressl smi ssl samba suid test" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
if [[ ${PV} == "9999" ]] ; then IUSE="+drop-root libressl +smi +ssl +samba suid test"
inherit git-r3 RESTRICT="!test? ( test )"
KEYWORDS="" REQUIRED_USE="test? ( samba )"
else
#SRC_URI="https://github.com/the-${PN}-group/${PN}/archive/${P}.tar.gz"
SRC_URI="https://dev.gentoo.org/~zerochaos/distfiles/${P}.tar.gz"
KEYWORDS="~alpha amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
fi
RDEPEND=" RDEPEND="
drop-root? ( sys-libs/libcap-ng )
net-libs/libpcap net-libs/libpcap
drop-root? ( sys-libs/libcap-ng )
smi? ( net-libs/libsmi ) smi? ( net-libs/libsmi )
ssl? ( ssl? (
!libressl? ( >=dev-libs/openssl-0.9.6m:0 ) !libressl? ( >=dev-libs/openssl-0.9.6m:0= )
libressl? ( dev-libs/libressl ) libressl? ( dev-libs/libressl:= )
) )
" "
BDEPEND="
drop-root? ( virtual/pkgconfig )
"
DEPEND=" DEPEND="
${RDEPEND} ${RDEPEND}
drop-root? ( virtual/pkgconfig )
test? ( test? (
|| ( app-arch/sharutils sys-freebsd/freebsd-ubin ) >=net-libs/libpcap-1.9.1
dev-lang/perl dev-lang/perl
) )
" "
PATCHES=(
"${FILESDIR}"/${PN}-9999-libdir.patch
)
S=${WORKDIR}/${PN}-${P/_}
pkg_setup() { pkg_setup() {
if use drop-root || use suid; then if use drop-root || use suid; then
@ -48,30 +51,24 @@ pkg_setup() {
fi fi
} }
src_prepare() {
default
eautoreconf
}
src_configure() { src_configure() {
# tcpdump needs some optimization. see bug #108391
# but do not replace -Os
filter-flags -O[0-9]
has -O? ${CFLAGS} || append-cflags -O2
filter-flags -finline-functions
if use drop-root; then
append-cppflags -DHAVE_CAP_NG_H
export LIBS=$( $(tc-getPKG_CONFIG) --libs libcap-ng )
fi
econf \ econf \
$(use_enable samba smb) \ $(use_enable samba smb) \
$(use_with drop-root cap-ng) \
$(use_with drop-root chroot '') \ $(use_with drop-root chroot '') \
$(use_with smi) \ $(use_with smi) \
$(use_with ssl crypto "${EPREFIX}/usr") \ $(use_with ssl crypto "${ESYSROOT}/usr") \
$(usex drop-root "--with-user=tcpdump" "") $(usex drop-root "--with-user=tcpdump" "")
} }
src_test() { src_test() {
if [[ ${EUID} -ne 0 ]] || ! use drop-root; then if [[ ${EUID} -ne 0 ]] || ! use drop-root; then
sed -i -e '/^\(espudp1\|eapon1\)/d;' tests/TESTLIST || die
emake check emake check
else else
ewarn "If you want to run the test suite, make sure you either" ewarn "If you want to run the test suite, make sure you either"

View File

@ -1,41 +1,43 @@
# Copyright 1999-2017 Gentoo Foundation # Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=6 EAPI=7
inherit flag-o-matic toolchain-funcs user inherit autotools user
DESCRIPTION="A Tool for network monitoring and data acquisition" DESCRIPTION="A Tool for network monitoring and data acquisition"
HOMEPAGE=" HOMEPAGE="
http://www.tcpdump.org/ https://www.tcpdump.org/
https://github.com/the-tcpdump-group/tcpdump https://github.com/the-tcpdump-group/tcpdump
" "
SRC_URI=" SRC_URI="
https://dev.gentoo.org/~jer/${P}.tar.gz https://www.tcpdump.org/release/${P}.tar.gz
" "
# https://github.com/the-${PN}-group/${PN}/archive/${P}.tar.gz
LICENSE="BSD" LICENSE="BSD"
SLOT="0" SLOT="0"
KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
IUSE="+drop-root libressl smi ssl samba suid test" IUSE="+drop-root libressl smi ssl samba suid test"
RESTRICT="!test? ( test )"
RDEPEND=" RDEPEND="
drop-root? ( sys-libs/libcap-ng )
net-libs/libpcap net-libs/libpcap
drop-root? ( sys-libs/libcap-ng )
smi? ( net-libs/libsmi ) smi? ( net-libs/libsmi )
ssl? ( ssl? (
!libressl? ( >=dev-libs/openssl-0.9.6m:0 ) !libressl? ( >=dev-libs/openssl-0.9.6m:0= )
libressl? ( dev-libs/libressl ) libressl? ( dev-libs/libressl:= )
) )
" "
DEPEND=" DEPEND="
${RDEPEND} ${RDEPEND}
drop-root? ( virtual/pkgconfig )
test? ( test? (
|| ( app-arch/sharutils sys-freebsd/freebsd-ubin ) >=net-libs/libpcap-1.9.1
dev-lang/perl dev-lang/perl
) )
" "
PATCHES=(
"${FILESDIR}"/${PN}-9999-libdir.patch
)
pkg_setup() { pkg_setup() {
if use drop-root || use suid; then if use drop-root || use suid; then
@ -44,23 +46,23 @@ pkg_setup() {
fi fi
} }
src_configure() { src_prepare() {
if use drop-root; then default
append-cppflags -DHAVE_CAP_NG_H eautoreconf
export LIBS=$( $(tc-getPKG_CONFIG) --libs libcap-ng ) }
fi
src_configure() {
econf \ econf \
$(use_enable samba smb) \ $(use_enable samba smb) \
$(use_with drop-root cap-ng) \
$(use_with drop-root chroot '') \ $(use_with drop-root chroot '') \
$(use_with smi) \ $(use_with smi) \
$(use_with ssl crypto "${EPREFIX}/usr") \ $(use_with ssl crypto "${ESYSROOT}/usr") \
$(usex drop-root "--with-user=tcpdump" "") $(usex drop-root "--with-user=tcpdump" "")
} }
src_test() { src_test() {
if [[ ${EUID} -ne 0 ]] || ! use drop-root; then if [[ ${EUID} -ne 0 ]] || ! use drop-root; then
sed -i -e '/^\(espudp1\|eapon1\)/d;' tests/TESTLIST || die
emake check emake check
else else
ewarn "If you want to run the test suite, make sure you either" ewarn "If you want to run the test suite, make sure you either"

View File

@ -1,41 +1,42 @@
# Copyright 1999-2017 Gentoo Foundation # Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=6 EAPI=7
inherit flag-o-matic toolchain-funcs user inherit flag-o-matic toolchain-funcs user
DESCRIPTION="A Tool for network monitoring and data acquisition" DESCRIPTION="A Tool for network monitoring and data acquisition"
HOMEPAGE=" HOMEPAGE="
http://www.tcpdump.org/ https://www.tcpdump.org/
https://github.com/the-tcpdump-group/tcpdump https://github.com/the-tcpdump-group/tcpdump
" "
SRC_URI=" SRC_URI="
https://github.com/the-${PN}-group/${PN}/archive/${P}.tar.gz https://www.tcpdump.org/release/${P}.tar.gz
" "
LICENSE="BSD" LICENSE="BSD"
SLOT="0" SLOT="0"
KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux" KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux"
IUSE="+drop-root libressl smi ssl samba suid test" IUSE="+drop-root libressl smi ssl samba suid test"
RESTRICT="!test? ( test )"
RDEPEND=" RDEPEND="
drop-root? ( sys-libs/libcap-ng ) drop-root? ( sys-libs/libcap-ng )
net-libs/libpcap net-libs/libpcap
smi? ( net-libs/libsmi ) smi? ( net-libs/libsmi )
ssl? ( ssl? (
!libressl? ( >=dev-libs/openssl-0.9.6m:0 ) !libressl? ( >=dev-libs/openssl-0.9.6m:0= )
libressl? ( dev-libs/libressl ) libressl? ( dev-libs/libressl:= )
) )
" "
DEPEND=" DEPEND="
${RDEPEND} ${RDEPEND}
drop-root? ( virtual/pkgconfig ) drop-root? ( virtual/pkgconfig )
test? ( test? (
|| ( app-arch/sharutils sys-freebsd/freebsd-ubin ) >=net-libs/libpcap-1.9.1
dev-lang/perl dev-lang/perl
app-arch/sharutils
) )
" "
S=${WORKDIR}/${PN}-${P}
pkg_setup() { pkg_setup() {
if use drop-root || use suid; then if use drop-root || use suid; then
@ -54,13 +55,12 @@ src_configure() {
$(use_enable samba smb) \ $(use_enable samba smb) \
$(use_with drop-root chroot '') \ $(use_with drop-root chroot '') \
$(use_with smi) \ $(use_with smi) \
$(use_with ssl crypto "${EPREFIX}/usr") \ $(use_with ssl crypto "${ESYSROOT}/usr") \
$(usex drop-root "--with-user=tcpdump" "") $(usex drop-root "--with-user=tcpdump" "")
} }
src_test() { src_test() {
if [[ ${EUID} -ne 0 ]] || ! use drop-root; then if [[ ${EUID} -ne 0 ]] || ! use drop-root; then
sed -i -e '/^\(espudp1\|eapon1\)/d;' tests/TESTLIST || die
emake check emake check
else else
ewarn "If you want to run the test suite, make sure you either" ewarn "If you want to run the test suite, make sure you either"

View File

@ -1,44 +1,45 @@
# Copyright 1999-2017 Gentoo Foundation # Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2 # Distributed under the terms of the GNU General Public License v2
EAPI=6 EAPI=7
inherit eutils flag-o-matic toolchain-funcs user inherit autotools git-r3 user
DESCRIPTION="A Tool for network monitoring and data acquisition" DESCRIPTION="A Tool for network monitoring and data acquisition"
EGIT_REPO_URI="https://github.com/the-tcpdump-group/tcpdump"
HOMEPAGE=" HOMEPAGE="
http://www.tcpdump.org/ https://www.tcpdump.org/
${EGIT_REPO_URI} https://github.com/the-tcpdump-group/tcpdump
" "
LICENSE="BSD" LICENSE="BSD"
EGIT_REPO_URI="https://github.com/the-tcpdump-group/tcpdump"
SLOT="0" SLOT="0"
IUSE="+drop-root libressl smi ssl samba suid test" KEYWORDS=""
if [[ ${PV} == "9999" ]] ; then IUSE="+drop-root libressl +smi +ssl +samba suid test"
inherit git-r3 RESTRICT="!test? ( test )"
KEYWORDS="" REQUIRED_USE="test? ( samba )"
else
SRC_URI="https://github.com/the-${PN}-group/${PN}/archive/${P}.tar.gz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux"
fi
RDEPEND=" RDEPEND="
drop-root? ( sys-libs/libcap-ng )
net-libs/libpcap net-libs/libpcap
drop-root? ( sys-libs/libcap-ng )
smi? ( net-libs/libsmi ) smi? ( net-libs/libsmi )
ssl? ( ssl? (
!libressl? ( >=dev-libs/openssl-0.9.6m:0 ) !libressl? ( >=dev-libs/openssl-0.9.6m:0= )
libressl? ( dev-libs/libressl ) libressl? ( dev-libs/libressl:= )
) )
" "
BDEPEND="
drop-root? ( virtual/pkgconfig )
"
DEPEND=" DEPEND="
${RDEPEND} ${RDEPEND}
drop-root? ( virtual/pkgconfig )
test? ( test? (
|| ( app-arch/sharutils sys-freebsd/freebsd-ubin ) >=net-libs/libpcap-1.9.1
dev-lang/perl dev-lang/perl
) )
" "
PATCHES=(
"${FILESDIR}"/${PN}-9999-libdir.patch
)
pkg_setup() { pkg_setup() {
if use drop-root || use suid; then if use drop-root || use suid; then
@ -47,30 +48,24 @@ pkg_setup() {
fi fi
} }
src_prepare() {
default
eautoreconf
}
src_configure() { src_configure() {
# tcpdump needs some optimization. see bug #108391
# but do not replace -Os
filter-flags -O[0-9]
has -O? ${CFLAGS} || append-cflags -O2
filter-flags -finline-functions
if use drop-root; then
append-cppflags -DHAVE_CAP_NG_H
export LIBS=$( $(tc-getPKG_CONFIG) --libs libcap-ng )
fi
econf \ econf \
$(use_enable samba smb) \ $(use_enable samba smb) \
$(use_with drop-root cap-ng) \
$(use_with drop-root chroot '') \ $(use_with drop-root chroot '') \
$(use_with smi) \ $(use_with smi) \
$(use_with ssl crypto "${EPREFIX}/usr") \ $(use_with ssl crypto "${ESYSROOT}/usr") \
$(usex drop-root "--with-user=tcpdump" "") $(usex drop-root "--with-user=tcpdump" "")
} }
src_test() { src_test() {
if [[ ${EUID} -ne 0 ]] || ! use drop-root; then if [[ ${EUID} -ne 0 ]] || ! use drop-root; then
sed -i -e '/^\(espudp1\|eapon1\)/d;' tests/TESTLIST || die
emake check emake check
else else
ewarn "If you want to run the test suite, make sure you either" ewarn "If you want to run the test suite, make sure you either"