[arch-commits] Commit in arp-scan/trunk (PKGBUILD socket-error.patch)

Massimiliano Torromeo mtorromeo at archlinux.org
Thu Sep 17 08:37:50 UTC 2015


    Date: Thursday, September 17, 2015 @ 10:37:49
  Author: mtorromeo
Revision: 140391

upgpkg: arp-scan 1.9-2

Applied patch to print error and exit when unable to open socket instead of segfaulting (Fix FS#45939)

Added:
  arp-scan/trunk/socket-error.patch
Modified:
  arp-scan/trunk/PKGBUILD

--------------------+
 PKGBUILD           |   21 ++++++++++++++-------
 socket-error.patch |   15 +++++++++++++++
 2 files changed, 29 insertions(+), 7 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-09-17 08:12:35 UTC (rev 140390)
+++ PKGBUILD	2015-09-17 08:37:49 UTC (rev 140391)
@@ -4,23 +4,30 @@
 
 pkgname=arp-scan
 pkgver=1.9
-pkgrel=1
+pkgrel=2
 pkgdesc="A tool that uses ARP to discover and fingerprint IP hosts on the local network"
 arch=('i686' 'x86_64')
 url="http://www.nta-monitor.com/tools/arp-scan/"
 license=('GPL')
 depends=('libpcap' 'perl-libwww')
-source=(http://www.nta-monitor.com/files/arp-scan/${pkgname}-${pkgver}.tar.gz)
+source=(http://www.nta-monitor.com/files/arp-scan/${pkgname}-${pkgver}.tar.gz
+        socket-error.patch)
 
+prepare() {
+	cd "$srcdir"/$pkgname-$pkgver
+	patch -p1 -i "$srcdir"/socket-error.patch
+}
+
 build() {
-	cd "${srcdir}/${pkgname}-${pkgver}"
-	./configure --prefix=/usr --mandir=/usr/share/man
-	make
+cd "$srcdir"/$pkgname-$pkgver
+./configure --prefix=/usr --mandir=/usr/share/man
+make
 }
 
 package() {
-	cd "${srcdir}/${pkgname}-${pkgver}"
+	cd "$srcdir"/$pkgname-$pkgver
 	make DESTDIR="${pkgdir}" install
 }
 
-sha256sums=('ce908ac71c48e85dddf6dd4fe5151d13c7528b1f49717a98b2a2535bd797d892')
+sha256sums=('ce908ac71c48e85dddf6dd4fe5151d13c7528b1f49717a98b2a2535bd797d892'
+            'bcf605b29dac8d90ecda92558b676521ad764e048250602f7a61fd0c56fd053b')

Added: socket-error.patch
===================================================================
--- socket-error.patch	                        (rev 0)
+++ socket-error.patch	2015-09-17 08:37:49 UTC (rev 140391)
@@ -0,0 +1,15 @@
+diff --git a/link-packet-socket.c b/link-packet-socket.c
+index d25463b..de1eefc 100644
+--- a/link-packet-socket.c
++++ b/link-packet-socket.c
+@@ -68,8 +68,8 @@ link_open(const char *device) {
+    handle = Malloc(sizeof(*handle));
+    memset(handle, '\0', sizeof(*handle));
+    if ((handle->fd = socket(PF_PACKET, SOCK_RAW, 0)) < 0) {
+-      free(handle);
+-      return NULL;
++      warn_msg("ERROR: Cannot open raw packet socket");
++      err_sys("socket");
+    }
+    strlcpy(handle->ifr.ifr_name, device, sizeof(handle->ifr.ifr_name));
+    if ((ioctl(handle->fd, SIOCGIFINDEX, &(handle->ifr))) != 0)



More information about the arch-commits mailing list