summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Bar-Lev <alonbl@gentoo.org>2012-12-14 20:41:12 +0000
committerAlon Bar-Lev <alonbl@gentoo.org>2012-12-14 20:41:12 +0000
commitf02f7370b165f4adafbdd43972f10287128202bf (patch)
tree0c5a093848288284b1a595679150a16d2ca4fbfb /net-wireless
parentStable for amd64 wrt bug #447168 (diff)
downloadgentoo-2-f02f7370b165f4adafbdd43972f10287128202bf.tar.gz
gentoo-2-f02f7370b165f4adafbdd43972f10287128202bf.tar.bz2
gentoo-2-f02f7370b165f4adafbdd43972f10287128202bf.zip
Fix hardened toolchain issue, bug#285703, thanks to Rick Farina <zerochaos@gentoo.org>.
(Portage version: 2.2.0_alpha148/cvs/Linux x86_64, unsigned Manifest commit)
Diffstat (limited to 'net-wireless')
-rw-r--r--net-wireless/aircrack-ng/ChangeLog9
-rw-r--r--net-wireless/aircrack-ng/aircrack-ng-1.1-r1.ebuild70
-rw-r--r--net-wireless/aircrack-ng/files/aircrack-ng-1.1-sse-pic.patch172
3 files changed, 250 insertions, 1 deletions
diff --git a/net-wireless/aircrack-ng/ChangeLog b/net-wireless/aircrack-ng/ChangeLog
index 3ba429f6aa1f..8d3f4a6aaaab 100644
--- a/net-wireless/aircrack-ng/ChangeLog
+++ b/net-wireless/aircrack-ng/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-wireless/aircrack-ng
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-wireless/aircrack-ng/ChangeLog,v 1.61 2012/07/05 16:05:14 zerochaos Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/aircrack-ng/ChangeLog,v 1.62 2012/12/14 20:41:12 alonbl Exp $
+
+*aircrack-ng-1.1-r1 (14 Dec 2012)
+
+ 14 Dec 2012; <alonbl@gentoo.org> +aircrack-ng-1.1-r1.ebuild,
+ +files/aircrack-ng-1.1-sse-pic.patch:
+ Fix hardened toolchain issue, bug#285703, thanks to Rick Farina
+ <zerochaos@gentoo.org>.
05 Jul 2012; Rick Farina <zerochaos@gentoo.org> metadata.xml:
adding myself as maintainer to better keep in sync with upstream
diff --git a/net-wireless/aircrack-ng/aircrack-ng-1.1-r1.ebuild b/net-wireless/aircrack-ng/aircrack-ng-1.1-r1.ebuild
new file mode 100644
index 000000000000..76e636770973
--- /dev/null
+++ b/net-wireless/aircrack-ng/aircrack-ng-1.1-r1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-wireless/aircrack-ng/aircrack-ng-1.1-r1.ebuild,v 1.1 2012/12/14 20:41:12 alonbl Exp $
+
+EAPI="3"
+
+inherit eutils toolchain-funcs versionator
+
+MY_PV="$(replace_version_separator 2 '-')"
+
+DESCRIPTION="WLAN tools for breaking 802.11 WEP/WPA keys"
+HOMEPAGE="http://www.aircrack-ng.org"
+SRC_URI="http://download.aircrack-ng.org/${PN}-${MY_PV}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux ~x86-fbsd"
+IUSE="+sqlite kernel_linux kernel_FreeBSD"
+
+DEPEND="dev-libs/openssl
+ sqlite? ( >=dev-db/sqlite-3.4 )"
+RDEPEND="${DEPEND}
+ kernel_linux? ( net-wireless/iw net-wireless/wireless-tools )"
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+have_sqlite() {
+ use sqlite && echo "true" || echo "false"
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${P}-respect_LDFLAGS.patch"
+ epatch "${FILESDIR}/${PN}-1.0_rc4-fix_build.patch"
+ epatch "${FILESDIR}/${P}-parallelmake.patch"
+ epatch "${FILESDIR}/${P}-sse-pic.patch"
+}
+
+src_compile() {
+ # UNSTABLE=true enables building of buddy-ng, easside-ng, tkiptun-ng and wesside-ng
+ emake CC="$(tc-getCC)" LD="$(tc-getLD)" sqlite="$(have_sqlite)" UNSTABLE=true || die "emake failed"
+}
+
+src_install() {
+ # UNSTABLE=true enables installation of buddy-ng, easside-ng, tkiptun-ng and wesside-ng
+ emake \
+ prefix="${EPREFIX}/usr" \
+ mandir="${EPREFIX}/usr/share/man/man1" \
+ DESTDIR="${D}" \
+ sqlite="$(have_sqlite)" \
+ UNSTABLE=true \
+ install \
+ || die "emake install failed"
+
+ dodoc AUTHORS ChangeLog README
+}
+
+pkg_postinst() {
+ # Message is (c) FreeBSD
+ # http://www.freebsd.org/cgi/cvsweb.cgi/ports/net-mgmt/aircrack-ng/files/pkg-message.in?rev=1.5
+ if use kernel_FreeBSD ; then
+ einfo "Contrary to Linux, it is not necessary to use airmon-ng to enable the monitor"
+ einfo "mode of your wireless card. So do not care about what the manpages say about"
+ einfo "airmon-ng, airodump-ng sets monitor mode automatically."
+ echo
+ einfo "To return from monitor mode, issue the following command:"
+ einfo " ifconfig \${INTERFACE} -mediaopt monitor"
+ einfo
+ einfo "For aireplay-ng you need FreeBSD >= 7.0."
+ fi
+}
diff --git a/net-wireless/aircrack-ng/files/aircrack-ng-1.1-sse-pic.patch b/net-wireless/aircrack-ng/files/aircrack-ng-1.1-sse-pic.patch
new file mode 100644
index 000000000000..8b3e2070e0a7
--- /dev/null
+++ b/net-wireless/aircrack-ng/files/aircrack-ng-1.1-sse-pic.patch
@@ -0,0 +1,172 @@
+Index: src/sha1-sse2.S
+===================================================================
+--- src/sha1-sse2.S (revision 1859)
++++ src/sha1-sse2.S (revision 1860)
+@@ -8,10 +8,37 @@
+ // input blocks must be (four bytes) interleaved.
+
+ #if defined(__x86_64__) && defined(__APPLE__)
++#define PRELOAD(x)
+ #define MANGLE(x) x(%rip)
++#define INIT_PIC()
++#define END_PIC()
+ #else
++#ifdef __PIC__
++
++#ifdef __x86_64__
++#define PRELOAD(x) movq x@GOTPCREL(%rip), %rbx;
++#define MANGLE(x) (%rbx)
++#define INIT_PIC() pushq %rbx
++#define END_PIC() popq %rbx
++#else
++#undef __i686 /* gcc builtin define gets in our way */
++#define PRELOAD(x)
++#define MANGLE(x) x ## @GOTOFF(%ebx)
++#define INIT_PIC() \
++ call __i686.get_pc_thunk.bx ; \
++ addl $_GLOBAL_OFFSET_TABLE_, %ebx
++#define END_PIC()
++#endif
++
++#else
++
++#define PRELOAD(x)
+ #define MANGLE(x) x
++#define INIT_PIC()
++#define END_PIC()
++
+ #endif
++#endif
+
+ #if defined(__i386__) || defined(__x86_64__)
+
+@@ -142,12 +169,15 @@
+ paddd tmp2, e; \
+ movdqa b, tmp2; \
+ pslld $30, b; \
++ PRELOAD(k) \
+ paddd MANGLE(k), e; \
+ psrld $2, tmp2; \
+ por tmp2, b; \
+ movdqa (data*16)(edx_rsi), tmp1; \
+ movdqa tmp1, tmp2; \
++ PRELOAD(const_ff00) \
+ pand MANGLE(const_ff00), tmp1; \
++ PRELOAD(const_00ff) \
+ pand MANGLE(const_00ff), tmp2; \
+ psrld $8, tmp1; \
+ pslld $8, tmp2; \
+@@ -181,6 +211,7 @@
+ paddd tmp2, e; \
+ movdqa b, tmp2; \
+ pslld $30, b; \
++ PRELOAD(k) \
+ paddd MANGLE(k), e; \
+ psrld $2, tmp2; \
+ por tmp2, b;
+@@ -192,10 +223,16 @@
+ shasse2_init:
+ _shasse2_init:
+
++ INIT_PIC()
++ PRELOAD(const_init_a)
+ movdqa MANGLE(const_init_a), ctxa
++ PRELOAD(const_init_b)
+ movdqa MANGLE(const_init_b), ctxb
++ PRELOAD(const_init_c)
+ movdqa MANGLE(const_init_c), ctxc
++ PRELOAD(const_init_d)
+ movdqa MANGLE(const_init_d), ctxd
++ PRELOAD(const_init_e)
+ movdqa MANGLE(const_init_e), ctxe
+
+ movdqa ctxa, 0(eax_rdi)
+@@ -203,6 +240,7 @@
+ movdqa ctxc, 32(eax_rdi)
+ movdqa ctxd, 48(eax_rdi)
+ movdqa ctxe, 64(eax_rdi)
++ END_PIC()
+
+ ret
+
+@@ -212,17 +250,20 @@
+ shasse2_ends:
+ _shasse2_ends:
+
+- movdqa 0(eax_rdi), ctxa
++ INIT_PIC()
++ movdqa 0(eax_rdi), ctxa
+ movdqa 16(eax_rdi), ctxb
+ movdqa 32(eax_rdi), ctxc
+ movdqa 48(eax_rdi), ctxd
+ movdqa 64(eax_rdi), ctxe
+
++ PRELOAD(const_ff00)
+ movdqa MANGLE(const_ff00), tmp3
+ movdqa ctxa, tmp1
+ movdqa ctxb, tmp2
+ pand tmp3, ctxa
+ pand tmp3, ctxb
++ PRELOAD(const_00ff)
+ movdqa MANGLE(const_00ff), tmp3
+ pand tmp3, tmp1
+ pand tmp3, tmp2
+@@ -243,6 +284,7 @@
+ movdqa ctxa, 0(edx_rsi)
+ movdqa ctxb, 16(edx_rsi)
+
++ PRELOAD(const_ff00)
+ movdqa MANGLE(const_ff00), tmp5
+ movdqa ctxc, tmp1
+ movdqa ctxd, tmp2
+@@ -250,6 +292,7 @@
+ pand tmp5, ctxc
+ pand tmp5, ctxd
+ pand tmp5, ctxe
++ PRELOAD(const_00ff)
+ movdqa MANGLE(const_00ff), tmp5
+ pand tmp5, tmp1
+ pand tmp5, tmp2
+@@ -279,6 +322,7 @@
+ movdqa ctxc, 32(edx_rsi)
+ movdqa ctxd, 48(edx_rsi)
+ movdqa ctxe, 64(edx_rsi)
++ END_PIC()
+
+ ret
+
+@@ -289,6 +333,7 @@
+ shasse2_data:
+ _shasse2_data:
+
++ INIT_PIC()
+ movdqa 0(eax_rdi), ctxa
+ movdqa 16(eax_rdi), ctxb
+ movdqa 32(eax_rdi), ctxc
+@@ -400,6 +445,7 @@
+ movdqa ctxc, 32(eax_rdi)
+ movdqa ctxd, 48(eax_rdi)
+ movdqa ctxe, 64(eax_rdi)
++ END_PIC()
+
+ ret
+
+@@ -462,7 +508,18 @@
+ pop %ebx
+ #endif
+ ret
++#ifdef __i386__
++#ifdef __PIC__
++ .section .gnu.linkonce.t.__i686.get_pc_thunk.bx,"ax",@progbits
++.globl __i686.get_pc_thunk.bx
++ .hidden __i686.get_pc_thunk.bx
++ .type __i686.get_pc_thunk.bx,@function
++__i686.get_pc_thunk.bx:
++ movl (%esp), %ebx
++ ret
+ #endif
++#endif
++#endif
+
+
+ #ifdef __ELF__