diff options
author | tv <tv> | 2005-11-03 16:45:13 +0000 |
---|---|---|
committer | tv <tv> | 2005-11-03 16:45:13 +0000 |
commit | a0714af9720c6e90e8764b84cf392b6121a7edbd (patch) | |
tree | b25df8c8d616b46e4f9cde816196918e1cfa5949 /security | |
parent | f768a79b1b3ca61aa0116c44639afdfcfc42f431 (diff) | |
download | pkgsrc-a0714af9720c6e90e8764b84cf392b6121a7edbd.tar.gz |
osfinger.c forgot to include <arpa/inet.h> for htons().
Use traditional recv loop over a stream socket rather than depending on
MSG_WAITALL to be available. (Interix doesn't have MSG_WAITALL.)
Diffstat (limited to 'security')
-rw-r--r-- | security/arirang/Makefile | 3 | ||||
-rw-r--r-- | security/arirang/patches/patch-aa | 28 |
2 files changed, 30 insertions, 1 deletions
diff --git a/security/arirang/Makefile b/security/arirang/Makefile index 8b7edc93e86..3d810ceb907 100644 --- a/security/arirang/Makefile +++ b/security/arirang/Makefile @@ -1,7 +1,8 @@ -# $NetBSD: Makefile,v 1.10 2005/06/17 03:50:31 jlam Exp $ +# $NetBSD: Makefile,v 1.11 2005/11/03 16:45:13 tv Exp $ # DISTNAME= arirang-1.6 +PKGREVISION= 1 CATEGORIES= security www MASTER_SITES= http://monkey.org/~pilot/arirang/ diff --git a/security/arirang/patches/patch-aa b/security/arirang/patches/patch-aa new file mode 100644 index 00000000000..ac0ca429239 --- /dev/null +++ b/security/arirang/patches/patch-aa @@ -0,0 +1,28 @@ +$NetBSD: patch-aa,v 1.3 2005/11/03 16:45:13 tv Exp $ + +--- osfinger.c.orig 2002-07-21 02:49:32.000000000 -0400 ++++ osfinger.c +@@ -33,6 +33,7 @@ + #include <sys/socket.h> + #include <netinet/in.h> + #include <netdb.h> ++#include <arpa/inet.h> + #include <signal.h> + + #include "arirang.h" +@@ -71,7 +72,14 @@ osdetect(char *scanhost) + } + snprintf(osfinger, sizeof(osfinger), "GET %s%s HTTP/1.0\n\n", NETCRAFT_FINGER, scanhost); + send(sock, osfinger, strlen(osfinger), 0); +- recv(sock, headBuff, sizeof(headBuff), MSG_WAITALL); ++ ++ { ++ int toRead = sizeof(headBuff); ++ int wasRead; ++ ++ while ((wasRead = recv(sock, headBuff, toRead, 0)) > 0) ++ toRead -= wasRead; ++ } + + ptr = strstr(headBuff, "running <b>"); + |