mirror of
https://github.com/pentoo/pentoo-overlay
synced 2026-04-19 13:20:57 +02:00
kismet: backport critical fix from svn
This commit is contained in:
parent
10c10f8843
commit
f093249f17
3 changed files with 223 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
|||
AUX bluechanfix_r3184.patch 452 RMD160 cc207c174d02c25f60f0e383f39435f35fa843e3 SHA1 a3c95e2cad5b105e2b875bec0631b85ec7e1018b SHA256 f7c9449039c76f5a919ad8399ce49b518c01046db1566bce25fd34496482faf0
|
||||
AUX header_alignment_r3326.patch 2031 RMD160 e6573980e79e9bfcaf91795b26709188d0daf021 SHA1 d17bd21180027f87aea6d8a7fdba4fe43eef7c06 SHA256 0a4afdc0cb74cb0ea7012f912fb886acb3d6bd42345835a26bf44f0a1ab63556
|
||||
AUX kismet-console-scrolling-backport.patch 555 RMD160 f7ed68284e54b1ca60e6d0b4e7972d474e704197 SHA1 6425814984c0d8724857dc71d4b800d3e8b2b42b SHA256 8b3ce7113e5214ffba9dd75b6027adb9f92f6e56dc3dbfde2045c77b5c44223f
|
||||
AUX kismet-pentoo.patch 490 RMD160 374c3be715e6b5741f3232d50ed1194783f9ca11 SHA1 3ae5ae1c6e392a710ee85dfec801c098c4a4129d SHA256 a38b0124e6d07bac442cf7fc62feba2fbd540f2d0cb93daba82238bf124bf63c
|
||||
AUX kismet.confd 403 RMD160 cf6cad4dc844ccf9c807edfb5adec2351c0cd249 SHA1 50ce39c8989ddf214f72b3ac14f2a989d6121d15 SHA256 d2f5bb606e4dac45c8de27843ab460b9dac02e83979e52e1b8b3ca3af841adeb
|
||||
|
|
@ -9,5 +10,6 @@ DIST kismet-2011-03-R2.tar.gz 924988 RMD160 58fcc5e8e438fa9d94959ea0c5b2c914ebf4
|
|||
EBUILD kismet-2011.03.2-r3.ebuild 4527 RMD160 4c8d960c73a2f178c64dedc8b9953bfe0153b663 SHA1 e5a0d769224e1d57c2657a825ec74d01d8031117 SHA256 69436f8371b09f65f1693f1799adfba30ae6db4614ac63f9fd238fc7b76bd571
|
||||
EBUILD kismet-2011.03.2-r4.ebuild 4589 RMD160 9298e8196a454f613d5b2cb6d21eb97f472af44b SHA1 512f6472cca86a277679fe68255b23c9800b4807 SHA256 4201ee0704ac964f64f26be889e2caba964eb0cd1e3395c2d1f682b54ec266e4
|
||||
EBUILD kismet-2011.03.2-r5.ebuild 4307 RMD160 01d751694d6de7f4c8c3e5bc458a5172cb100ff5 SHA1 31d3d3a0ed6deb62aad51683c924336b3e273a84 SHA256 58b400bc688a80f591ab85ee3f8af5237485998e5ca53f47ecc5ae994c057d0c
|
||||
EBUILD kismet-2011.03.2-r6.ebuild 4347 RMD160 2730e6c6a2f550f57fadda0d674b78ffd61bbfe7 SHA1 ecb3bed178a17e0f020fb6641f0a3928544ee41d SHA256 82b7eef46b874a24a120ed82b37e29fc9974dfa5ee44e8b900840fcee1cc5e40
|
||||
EBUILD kismet-9999.ebuild 4279 RMD160 6677218c6c4fec27a765459ba7f45a1f3a97d8d0 SHA1 bdd9af48b7cae45f981bc85880a1a60865cc9e19 SHA256 5055857deae87871b818641dc4af83d124099a555451736a7b56f2f0181f534b
|
||||
MISC metadata.xml 752 RMD160 fab1c88b553c13210494a57a04b2d62536a4f944 SHA1 11fb1ef46c28a2862a850b13e9af6fb405b8a008 SHA256 661ef87ec9fa7e443e0c3741199c1a9217a0932e1023288030a8cfbdbea0256a
|
||||
|
|
|
|||
58
net-wireless/kismet/files/header_alignment_r3326.patch
Normal file
58
net-wireless/kismet/files/header_alignment_r3326.patch
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
diff -Naur kismet-2011-03-R2-orig/packetsource_pcap.cc kismet-2011-03-R2/packetsource_pcap.cc
|
||||
--- kismet-2011-03-R2-orig/packetsource_pcap.cc 2011-01-05 16:52:51.000000000 -0500
|
||||
+++ kismet-2011-03-R2/packetsource_pcap.cc 2012-02-20 22:37:17.973526919 -0500
|
||||
@@ -553,6 +553,9 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
+#define ALIGN_OFFSET(offset, width) \
|
||||
+ ( (((offset) + ((width) - 1)) & (~((width) - 1))) - offset )
|
||||
+
|
||||
/*
|
||||
* Useful combinations of channel characteristics.
|
||||
*/
|
||||
@@ -617,6 +620,8 @@
|
||||
enum ieee80211_radiotap_type bit;
|
||||
int bit0;
|
||||
const u_char *iter;
|
||||
+ const u_char *iter_start;
|
||||
+ unsigned int iter_align;
|
||||
int fcs_cut = 0; // Is the FCS bit set?
|
||||
char errstr[STATUS_MAX];
|
||||
|
||||
@@ -658,7 +663,7 @@
|
||||
|
||||
eight11chunk->dlt = KDLT_IEEE802_11;
|
||||
|
||||
- iter = (u_char*)(last_presentp + 1);
|
||||
+ iter_start = iter = (u_char*)(last_presentp + 1);
|
||||
|
||||
for (bit0 = 0, presentp = &hdr->it_present; presentp <= last_presentp;
|
||||
presentp++, bit0 += 32) {
|
||||
@@ -686,6 +691,9 @@
|
||||
u.i8 = *iter++;
|
||||
break;
|
||||
case IEEE80211_RADIOTAP_CHANNEL:
|
||||
+ iter_align = ALIGN_OFFSET((unsigned int) (iter - iter_start), 2);
|
||||
+ iter += iter_align;
|
||||
+
|
||||
u.u16 = EXTRACT_LE_16BITS(iter);
|
||||
iter += sizeof(u.u16);
|
||||
u2.u16 = EXTRACT_LE_16BITS(iter);
|
||||
@@ -695,10 +703,16 @@
|
||||
case IEEE80211_RADIOTAP_LOCK_QUALITY:
|
||||
case IEEE80211_RADIOTAP_TX_ATTENUATION:
|
||||
case IEEE80211_RADIOTAP_DB_TX_ATTENUATION:
|
||||
+ iter_align = ALIGN_OFFSET((unsigned int) (iter - iter_start), 2);
|
||||
+ iter += iter_align;
|
||||
+
|
||||
u.u16 = EXTRACT_LE_16BITS(iter);
|
||||
iter += sizeof(u.u16);
|
||||
break;
|
||||
case IEEE80211_RADIOTAP_TSFT:
|
||||
+ iter_align = ALIGN_OFFSET((unsigned int) (iter - iter_start), 8);
|
||||
+ iter += iter_align;
|
||||
+
|
||||
u.u64 = EXTRACT_LE_64BITS(iter);
|
||||
iter += sizeof(u.u64);
|
||||
break;
|
||||
163
net-wireless/kismet/kismet-2011.03.2-r6.ebuild
Normal file
163
net-wireless/kismet/kismet-2011.03.2-r6.ebuild
Normal file
|
|
@ -0,0 +1,163 @@
|
|||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: $
|
||||
|
||||
EAPI=4
|
||||
|
||||
inherit toolchain-funcs linux-info eutils
|
||||
|
||||
MY_P=${P/\./-}
|
||||
MY_P=${MY_P/./-R}
|
||||
S=${WORKDIR}/${MY_P}
|
||||
|
||||
if [[ ${PV} == "9999" ]] ; then
|
||||
ESVN_REPO_URI="https://www.kismetwireless.net/code/svn/trunk"
|
||||
inherit subversion
|
||||
KEYWORDS="~amd64 ~arm ~ppc ~x86"
|
||||
else
|
||||
SRC_URI="http://www.kismetwireless.net/code/${MY_P}.tar.gz"
|
||||
#Few dependencies are still not stable. Comment out keywords during repoman testing
|
||||
KEYWORDS="amd64 arm ppc x86"
|
||||
fi
|
||||
|
||||
DESCRIPTION="IEEE 802.11 wireless LAN sniffer"
|
||||
HOMEPAGE="http://www.kismetwireless.net/"
|
||||
|
||||
LICENSE="GPL-2"
|
||||
SLOT="0"
|
||||
IUSE="+ncurses +pcre speech +plugin-autowep +plugin-btscan +plugin-dot15d4 +plugin-ptw +plugin-spectools +ruby +suid"
|
||||
|
||||
RDEPEND="net-wireless/wireless-tools
|
||||
kernel_linux? ( sys-libs/libcap
|
||||
>=dev-libs/libnl-1.1 )
|
||||
net-libs/libpcap
|
||||
pcre? ( dev-libs/libpcre )
|
||||
suid? ( sys-libs/libcap )
|
||||
ncurses? ( sys-libs/ncurses )
|
||||
speech? ( app-accessibility/flite )
|
||||
ruby? ( dev-lang/ruby )
|
||||
plugin-btscan? ( net-wireless/bluez \
|
||||
!=net-wireless/bluez-4.98-r1 )
|
||||
plugin-dot15d4? ( <dev-libs/libusb-1 )
|
||||
plugin-spectools? ( net-wireless/spectools )"
|
||||
|
||||
DEPEND="${RDEPEND}
|
||||
dev-util/pkgconfig"
|
||||
|
||||
src_prepare() {
|
||||
epatch "${FILESDIR}"/kismet-pentoo.patch
|
||||
|
||||
sed -i -e "s:^\(logtemplate\)=\(.*\):\1=/tmp/\2:" \
|
||||
conf/kismet.conf.in
|
||||
|
||||
# Don't strip and set correct mangrp
|
||||
sed -i -e 's| -s||g' \
|
||||
-e 's|@mangrp@|root|g' Makefile.in
|
||||
|
||||
epatch "${FILESDIR}"/makefile.patch
|
||||
epatch "${FILESDIR}"/plugins-ldflags.patch
|
||||
epatch "${FILESDIR}"/bluechanfix_r3184.patch
|
||||
epatch "${FILESDIR}"/kismet-console-scrolling-backport.patch
|
||||
epatch "${FILESDIR}"/header_alignment_r3326.patch
|
||||
}
|
||||
|
||||
src_configure() {
|
||||
if ! use ncurses; then
|
||||
myconf="${myconf} --disable-curses --disable-panel"
|
||||
fi
|
||||
|
||||
if ! use pcre; then
|
||||
myconf="${myconf} --disable-pcre"
|
||||
fi
|
||||
|
||||
econf ${myconf} \
|
||||
--with-linuxheaders="${KV_DIR}"
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
emake
|
||||
|
||||
if use plugin-autowep; then
|
||||
cd "${S}"/plugin-autowep
|
||||
KIS_SRC_DIR="${S}" emake
|
||||
fi
|
||||
if use plugin-btscan; then
|
||||
cd "${S}"/plugin-btscan
|
||||
KIS_SRC_DIR="${S}" emake
|
||||
fi
|
||||
if use plugin-dot15d4; then
|
||||
cd "${S}"/plugin-dot15d4
|
||||
KIS_SRC_DIR="${S}" emake
|
||||
fi
|
||||
if use plugin-ptw; then
|
||||
cd "${S}"/plugin-ptw
|
||||
KIS_SRC_DIR="${S}" emake
|
||||
fi
|
||||
if use plugin-spectools; then
|
||||
cd "${S}"/plugin-spectools
|
||||
KIS_SRC_DIR="${S}" emake
|
||||
fi
|
||||
}
|
||||
|
||||
src_install() {
|
||||
if use plugin-autowep; then
|
||||
cd "${S}"/plugin-autowep
|
||||
KIS_SRC_DIR="${S}" emake DESTDIR="${ED}" LIBDIR="$(get_libdir)" install
|
||||
fi
|
||||
if use plugin-btscan; then
|
||||
cd "${S}"/plugin-btscan
|
||||
KIS_SRC_DIR="${S}" emake DESTDIR="${ED}" LIBDIR="$(get_libdir)" install
|
||||
fi
|
||||
if use plugin-dot15d4; then
|
||||
cd "${S}"/plugin-dot15d4
|
||||
KIS_SRC_DIR="${S}" emake DESTDIR="${ED}" LIBDIR="$(get_libdir)" install
|
||||
fi
|
||||
if use plugin-ptw; then
|
||||
cd "${S}"/plugin-ptw
|
||||
KIS_SRC_DIR="${S}" emake DESTDIR="${ED}" LIBDIR="$(get_libdir)" install
|
||||
fi
|
||||
if use plugin-spectools; then
|
||||
cd "${S}"/plugin-spectools
|
||||
KIS_SRC_DIR="${S}" emake DESTDIR="${ED}" LIBDIR="$(get_libdir)" install
|
||||
fi
|
||||
if use ruby; then
|
||||
cd "${S}"/ruby
|
||||
dobin *.rb
|
||||
fi
|
||||
|
||||
cd "${S}"
|
||||
emake DESTDIR="${D}" commoninstall
|
||||
|
||||
##dragorn would prefer I set fire to my head than do this, but it works
|
||||
##all external kismet plugins (read: kismet-ubertooth) must be rebuilt when kismet is
|
||||
##is there an automatic way to force this?
|
||||
# install headers for external plugins
|
||||
insinto /usr/include/kismet
|
||||
doins *.h || die "Header installation failed"
|
||||
doins Makefile.inc
|
||||
#t#odo write a plugin finder that tells you what needs to be rebuilt when kismet is updated, etc
|
||||
|
||||
dodoc CHANGELOG RELEASENOTES.txt README* docs/DEVEL.client docs/README.newcore || die
|
||||
newinitd "${FILESDIR}"/${PN}.initd kismet
|
||||
newconfd "${FILESDIR}"/${PN}.confd kismet
|
||||
|
||||
insinto /etc
|
||||
doins conf/kismet{,_drone}.conf || die
|
||||
|
||||
if use suid; then
|
||||
dobin kismet_capture || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
if use suid; then
|
||||
enewgroup kismet
|
||||
fowners root:kismet /usr/bin/kismet_capture || die
|
||||
# Need to set the permissions after chowning.
|
||||
# See chown(2)
|
||||
fperms 4550 /usr/bin/kismet_capture || die
|
||||
elog "Kismet has been installed with a setuid-root helper binary"
|
||||
elog "to enable minimal-root operation. Users need to be part of"
|
||||
elog "the 'kismet' group to perform captures from physical devices."
|
||||
fi
|
||||
}
|
||||
Loading…
Reference in a new issue