Date: Mon, 7 Jul 2014 15:16:06 +0000 (UTC) From: John Marino <marino@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r361098 - in head/security/arpCounterattack: . files Message-ID: <201407071516.s67FG6Gq035304@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marino Date: Mon Jul 7 15:16:05 2014 New Revision: 361098 URL: http://svnweb.freebsd.org/changeset/ports/361098 QAT: https://qat.redports.org/buildarchive/r361098/ Log: security/arpCounterattack: stage, fix on F10+, fix on DragonFly Also: * convert to c++11 for clang builds * convert to new LIB_DEPENDS format * use @sample keyword * pet portlint * USE=tar Added: head/security/arpCounterattack/files/patch-address.hpp (contents, props changed) head/security/arpCounterattack/files/patch-arpCounterattack.cpp (contents, props changed) head/security/arpCounterattack/files/patch-arpCounterattack.hpp (contents, props changed) head/security/arpCounterattack/files/patch-configuration.hpp (contents, props changed) head/security/arpCounterattack/files/patch-ethernetInfo.hpp (contents, props changed) Modified: head/security/arpCounterattack/Makefile head/security/arpCounterattack/pkg-descr head/security/arpCounterattack/pkg-plist Modified: head/security/arpCounterattack/Makefile ============================================================================== --- head/security/arpCounterattack/Makefile Mon Jul 7 14:51:44 2014 (r361097) +++ head/security/arpCounterattack/Makefile Mon Jul 7 15:16:05 2014 (r361098) @@ -3,28 +3,27 @@ PORTNAME= arpCounterattack PORTVERSION= 1.2.0 +PORTREVISION= 1 CATEGORIES= security MASTER_SITES= http://isis.poly.edu/~bk/${PORTNAME}/ \ http://bk.macroblock.net/${PORTNAME}/ -EXTRACT_SUFX= .tbz -MAINTAINER= ports@FreeBSD.org +MAINTAINER= ports@FreeBSD.org COMMENT= Detects and remedies ARP attacks -LIB_DEPENDS= dnet.1:${PORTSDIR}/net/libdnet +LIB_DEPENDS= libdnet.so:${PORTSDIR}/net/libdnet +USES= compiler:c++11-lib tar:tbz +USE_CSTD= c++11 SUB_FILES= pkg-message USE_RC_SUBR= ${PORTNAME} -NO_STAGE= yes -.include <bsd.port.pre.mk> +do-install: + @${MKDIR} ${STAGEDIR}${PREFIX}/etc/arpCounterattack + ${INSTALL_PROGRAM} ${WRKSRC}/arpCounterattack \ + ${STAGEDIR}${PREFIX}/sbin + ${INSTALL_DATA} ${WRKSRC}/arpCounterattack.conf.sample \ + ${WRKSRC}/oui.txt ${STAGEDIR}${PREFIX}/etc/arpCounterattack -post-install: - @if [ ! -f ${PREFIX}/etc/${PORTNAME}/${PORTNAME}.conf ]; then \ - ${CP} -p ${PREFIX}/etc/${PORTNAME}/${PORTNAME}.conf.sample \ - ${PREFIX}/etc/${PORTNAME}/${PORTNAME}.conf ; \ - fi - @${CAT} ${PKGMESSAGE} - -.include <bsd.port.post.mk> +.include <bsd.port.mk> Added: head/security/arpCounterattack/files/patch-address.hpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/arpCounterattack/files/patch-address.hpp Mon Jul 7 15:16:05 2014 (r361098) @@ -0,0 +1,29 @@ +--- address.hpp.orig 2010-09-28 18:12:26.000000000 +0000 ++++ address.hpp +@@ -28,7 +28,7 @@ + #include <sys/socket.h> + + #include <arpa/inet.h> +-#ifdef __FreeBSD__ ++#if defined(__FreeBSD__) || defined(__DragonFly__) + #include <netinet/if_ether.h> + #endif + #ifdef __linux__ +@@ -44,7 +44,7 @@ + std::string textToEthernet(const std::string &textEthernetAddress) { + ether_addr binaryEthernetAddress; + ether_aton_r(textEthernetAddress.c_str(), &binaryEthernetAddress); +- #ifdef __FreeBSD__ ++ #if defined(__FreeBSD__) || defined(__DragonFly__) + return std::string((char*)binaryEthernetAddress.octet, ETHER_ADDR_LEN); + #endif + #ifdef __linux__ +@@ -60,7 +60,7 @@ std::string textToEthernet(const std::st + std::string ethernetToText(const char *binaryEthernetAddress) { + ether_addr _binaryEthernetAddress; + char textEthernetAddress[17]; +- #ifdef __FreeBSD__ ++ #if defined(__FreeBSD__) || defined(__DragonFly__) + memcpy(_binaryEthernetAddress.octet, binaryEthernetAddress, ETHER_ADDR_LEN); + #endif + #ifdef __linux__ Added: head/security/arpCounterattack/files/patch-arpCounterattack.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/arpCounterattack/files/patch-arpCounterattack.cpp Mon Jul 7 15:16:05 2014 (r361098) @@ -0,0 +1,19 @@ +--- arpCounterattack.cpp.orig 2010-11-04 01:26:49.000000000 +0000 ++++ arpCounterattack.cpp +@@ -25,7 +25,7 @@ + #include <fstream> + #include <iostream> + #include <queue> +-#include <tr1/unordered_map> ++#include <unordered_map> + #include <vector> + + #ifdef __FreeBSD__ +@@ -47,7 +47,6 @@ + #include "string.hpp" + + using namespace std; +-using namespace tr1; + + const string programName = "ARP Counterattack 1.2.0"; + string pidFileName = "/var/run/arpCounterattack.pid"; Added: head/security/arpCounterattack/files/patch-arpCounterattack.hpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/arpCounterattack/files/patch-arpCounterattack.hpp Mon Jul 7 15:16:05 2014 (r361098) @@ -0,0 +1,20 @@ +--- arpCounterattack.hpp.orig 2010-11-04 01:26:14.000000000 +0000 ++++ arpCounterattack.hpp +@@ -24,7 +24,7 @@ + + #include <string> + #include <vector> +-#include <tr1/unordered_map> ++#include <unordered_map> + + #include <sys/socket.h> + #include <sys/time.h> +@@ -55,7 +55,7 @@ struct Interface { + std::string replyName; + pcap_t *replyDescriptor; + ModeType mode; +- std::tr1::unordered_map <uint32_t, std::string> pairs; ++ std::unordered_map <uint32_t, std::string> pairs; + }; + + struct ARPCorrection { Added: head/security/arpCounterattack/files/patch-configuration.hpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/arpCounterattack/files/patch-configuration.hpp Mon Jul 7 15:16:05 2014 (r361098) @@ -0,0 +1,10 @@ +--- configuration.hpp.orig 2010-09-28 18:09:56.000000000 +0000 ++++ configuration.hpp +@@ -26,6 +26,7 @@ + #define CONFIGURATION_HPP + + #include <fstream> ++#include <stdlib.h> + #include <limits> + #include <map> + #include <string> Added: head/security/arpCounterattack/files/patch-ethernetInfo.hpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/arpCounterattack/files/patch-ethernetInfo.hpp Mon Jul 7 15:16:05 2014 (r361098) @@ -0,0 +1,22 @@ +--- ethernetInfo.hpp.orig 2010-10-11 21:46:00.000000000 +0000 ++++ ethernetInfo.hpp +@@ -27,7 +27,7 @@ + + #include <fstream> + #include <string> +-#include <tr1/unordered_map> ++#include <unordered_map> + + #include <arpa/inet.h> + +@@ -46,8 +46,8 @@ class EthernetInfo { + const std::string &find(const std::string oui); + const std::string &find(const char *oui); + private: +- std::tr1::unordered_map <std::string, std::string> ouiMap; +- std::tr1::unordered_map <std::string, std::string>::const_iterator ouiItr; ++ std::unordered_map <std::string, std::string> ouiMap; ++ std::unordered_map <std::string, std::string>::const_iterator ouiItr; + std::string _oui; + std::string empty; + std::string multicast; Modified: head/security/arpCounterattack/pkg-descr ============================================================================== --- head/security/arpCounterattack/pkg-descr Mon Jul 7 14:51:44 2014 (r361097) +++ head/security/arpCounterattack/pkg-descr Mon Jul 7 15:16:05 2014 (r361098) @@ -11,5 +11,3 @@ and corrective gratuitous ARP reply can other than the one that the attack was seen on. WWW: http://acm.poly.edu/wiki/ARP_Counterattack - --Boris Kochergin <spawk@acm.poly.edu> Modified: head/security/arpCounterattack/pkg-plist ============================================================================== --- head/security/arpCounterattack/pkg-plist Mon Jul 7 14:51:44 2014 (r361097) +++ head/security/arpCounterattack/pkg-plist Mon Jul 7 15:16:05 2014 (r361098) @@ -1,6 +1,4 @@ sbin/arpCounterattack -@unexec if cmp -s %D/etc/arpCounterattack/arpCounterattack.conf.sample %D/etc/arpCounterattack/arpCounterattack.conf; then rm -f %D/etc/arpCounterattack/arpCounterattack.conf; fi -etc/arpCounterattack/arpCounterattack.conf.sample -@exec if [ ! -f %D/etc/arpCounterattack/arpCounterattack.conf ] ; then cp -p %D/%F %B/arpCounterattack.conf; fi +@sample etc/arpCounterattack/arpCounterattack.conf.sample etc/arpCounterattack/oui.txt @dirrmtry etc/arpCounterattack
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407071516.s67FG6Gq035304>