summaryrefslogtreecommitdiff
path: root/package/nmap
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2009-08-23 21:41:25 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2009-08-23 21:41:25 +0200
commit2b198ddc02b3231e43ab8fdddef76ff103a0f5a4 (patch)
tree02cda54987930d677beb7ad60b5bf52cb9d67da9 /package/nmap
parent54893039866e0978bd6563e2b7361f7736341163 (diff)
make allmodconfig work for alix1c eglibc
many upstream package updates, squid, php, asterisk, gnutls, nmap, sqlite, dhcp, git
Diffstat (limited to 'package/nmap')
-rw-r--r--package/nmap/Makefile7
-rw-r--r--package/nmap/extra/sctp.h109
-rw-r--r--package/nmap/patches/patch-configure54
-rw-r--r--package/nmap/patches/patch-ncat_configure93
-rw-r--r--package/nmap/patches/patch-nmap_dns_h8
-rw-r--r--package/nmap/patches/patch-output_cc6
-rw-r--r--package/nmap/patches/patch-scan_engine_cc10
-rw-r--r--package/nmap/patches/patch-tcpip_cc10
-rw-r--r--package/nmap/patches/patch-traceroute_cc14
9 files changed, 268 insertions, 43 deletions
diff --git a/package/nmap/Makefile b/package/nmap/Makefile
index 5e4222551..ecf92a914 100644
--- a/package/nmap/Makefile
+++ b/package/nmap/Makefile
@@ -4,9 +4,9 @@
include ${TOPDIR}/rules.mk
PKG_NAME:= nmap
-PKG_VERSION:= 4.76
+PKG_VERSION:= 5.00
PKG_RELEASE:= 1
-PKG_MD5SUM:= 278dd2e849cc3dbb947df961a1aaffd0
+PKG_MD5SUM:= 32d27de32166c02d670bb4a086185886
PKG_DESCR:= utility for network exploration or security auditing
PKG_SECTION:= net
PKG_DEPENDS:= libdnet libpcap libpcre
@@ -29,11 +29,12 @@ TCPPFLAGS+= -DNOLUA
ifeq ($(ADK_COMPILE_NMAP_WITH_UCLIBCXX),y)
CONFIGURE_ENV+= CXXFLAGS="-fno-builtin -fno-rtti -nostdinc++ \
-I${STAGING_DIR}/usr/include/uClibc++" \
- LIBS="-nodefaultlibs -luClibc++ -lc -lm -lgcc"
+ LIBS="-nodefaultlibs -luClibc++ -lgcc"
endif
CONFIGURE_STYLE:= gnu
CONFIGURE_ARGS+= --without-openssl \
--without-zenmap \
+ --without-ndiff \
--without-liblua \
--with-libdnet="${STAGING_DIR}/usr" \
--with-libpcap="${STAGING_DIR}/usr" \
diff --git a/package/nmap/extra/sctp.h b/package/nmap/extra/sctp.h
new file mode 100644
index 000000000..2c24bfb53
--- /dev/null
+++ b/package/nmap/extra/sctp.h
@@ -0,0 +1,109 @@
+/*
+ * Stream Control Transmission Protocol (RFC 2960).
+ *
+ * Copyright (c) 2008 Daniel Roethlisberger <daniel@roe.ch>
+ * Copyright (c) 2000 Dug Song <dugsong@monkey.org>
+ *
+ */
+
+#ifndef SCTP_H
+#define SCTP_H
+
+#define SCTP_HDR_LEN 12
+
+struct sctp_hdr {
+ uint16_t sh_sport; /* source port */
+ uint16_t sh_dport; /* destination port */
+ uint32_t sh_vtag; /* sctp verification tag */
+ uint32_t sh_sum; /* sctp checksum */
+};
+
+#define SCTP_PORT_MAX 65535
+
+#define sctp_pack_hdr(hdr, sport, dport, vtag) do { \
+ struct sctp_hdr *sctp_pack_p = (struct sctp_hdr *)(hdr); \
+ sctp_pack_p->sh_sport = htons(sport); \
+ sctp_pack_p->sh_dport = htons(dport); \
+ sctp_pack_p->sh_vtag = htonl(vtag); \
+} while (0)
+
+struct sctp_chunkhdr {
+ uint8_t sch_type; /* chunk type */
+ uint8_t sch_flags; /* chunk flags */
+ uint16_t sch_length; /* chunk length */
+};
+
+/* chunk types */
+#define SCTP_DATA 0x00
+#define SCTP_INIT 0x01
+#define SCTP_INIT_ACK 0x02
+#define SCTP_SACK 0x03
+#define SCTP_HEARTBEAT 0x04
+#define SCTP_HEARTBEAT_ACK 0x05
+#define SCTP_ABORT 0x06
+#define SCTP_SHUTDOWN 0x07
+#define SCTP_SHUTDOWN_ACK 0x08
+#define SCTP_ERROR 0x09
+#define SCTP_COOKIE_ECHO 0x0a
+#define SCTP_COOKIE_ACK 0x0b
+#define SCTP_ECNE 0x0c
+#define SCTP_CWR 0x0d
+#define SCTP_SHUTDOWN_COMPLETE 0x0e
+#define SCTP_AUTH 0x0f /* RFC 4895 */
+#define SCTP_ASCONF_ACK 0x80 /* RFC 5061 */
+#define SCTP_PKTDROP 0x81 /* draft-stewart-sctp-pktdrprep-08 */
+#define SCTP_PAD 0x84 /* RFC 4820 */
+#define SCTP_FORWARD_TSN 0xc0 /* RFC 3758 */
+#define SCTP_ASCONF 0xc1 /* RFC 5061 */
+
+/* chunk types bitmask flags */
+#define SCTP_TYPEFLAG_REPORT 1
+#define SCTP_TYPEFLAG_SKIP 2
+
+#define sctp_pack_chunkhdr(hdr, type, flags, length) do { \
+ struct sctp_chunkhdr *sctp_pack_chp = (struct sctp_chunkhdr *)(hdr);\
+ sctp_pack_chp->sch_type = type; \
+ sctp_pack_chp->sch_flags = flags; \
+ sctp_pack_chp->sch_length = htons(length); \
+} while (0)
+
+struct sctp_chunkhdr_init {
+ struct sctp_chunkhdr chunkhdr;
+
+ int32_t schi_itag; /* Initiate Tag */
+ int32_t schi_arwnd; /* Advertised Receiver Window Credit */
+ int16_t schi_nos; /* Number of Outbound Streams */
+ int16_t schi_nis; /* Number of Inbound Streams */
+ int32_t schi_itsn; /* Initial TSN */
+};
+
+#define sctp_pack_chunkhdr_init(hdr, type, flags, length, itag, \
+ arwnd, nos, nis, itsn) do { \
+ struct sctp_chunkhdr_init *sctp_pack_chip = (struct sctp_chunkhdr_init *)(hdr);\
+ sctp_pack_chunkhdr(sctp_pack_chip, type, flags, length);\
+ sctp_pack_chip->schi_itag = htonl(itag); \
+ sctp_pack_chip->schi_arwnd = htonl(arwnd); \
+ sctp_pack_chip->schi_nos = htons(nos); \
+ sctp_pack_chip->schi_nis = htons(nis); \
+ sctp_pack_chip->schi_itsn = htonl(itsn); \
+} while (0)
+
+/*
+ * COOKIE ECHO chunk
+ */
+struct sctp_chunkhdr_cookie_echo {
+ struct sctp_chunkhdr chunkhdr;
+
+ /* empty */
+};
+
+#define sctp_pack_chunkhdr_cookie_echo(hdr, type, flags, length) do { \
+ struct sctp_chunkhdr_cookie_echo *sctp_pack_chip = \
+ (struct sctp_chunkhdr_cookie_echo *)(hdr); \
+ sctp_pack_chunkhdr(sctp_pack_chip, type, flags, length); \
+} while (0)
+
+#endif /* SCTP_H */
+
+
+
diff --git a/package/nmap/patches/patch-configure b/package/nmap/patches/patch-configure
index 378c086e2..2ddd025f1 100644
--- a/package/nmap/patches/patch-configure
+++ b/package/nmap/patches/patch-configure
@@ -1,16 +1,6 @@
-$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
---- nmap-4.76.orig/configure 2008-09-09 01:37:03.000000000 +0200
-+++ nmap-4.76/configure 2008-12-14 18:54:23.000000000 +0100
-@@ -4035,7 +4035,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA=
-
-
- if test -n "$GXX"; then
-- CXXFLAGS="$CXXFLAGS -Wall "
-+ CXXFLAGS="$CXXFLAGS "
- fi
-
- { echo "$as_me:$LINENO: checking whether the compiler is gcc 4 or greater" >&5
-@@ -6656,86 +6656,6 @@ if test $needs_cpp_precomp = yes; then
+--- nmap-5.00.orig/configure 2009-06-24 23:35:54.000000000 +0200
++++ nmap-5.00/configure 2009-07-20 20:36:51.023261444 +0200
+@@ -7074,90 +7074,6 @@ if test $needs_cpp_precomp = yes; then
CXXFLAGS="-no-cpp-precomp $CXXFLAGS"
fi
@@ -26,14 +16,16 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
- # link with -lpcap for the purposes of this test
- LIBS_OLD="$LIBS"
- LIBS="$LIBS -lpcap"
-- { echo "$as_me:$LINENO: checking if libpcap version is recent enough" >&5
--echo $ECHO_N "checking if libpcap version is recent enough... $ECHO_C" >&6; }
+- { $as_echo "$as_me:$LINENO: checking if libpcap version is recent enough" >&5
+-$as_echo_n "checking if libpcap version is recent enough... " >&6; }
- if test "$cross_compiling" = yes; then
-- { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
--echo "$as_me: error: cannot run test program while cross compiling
+-$as_echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-- { (exit 1); exit 1; }; }
+- { (exit 1); exit 1; }; }; }
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
@@ -62,38 +54,40 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
--eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
-- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
--eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
-- echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
-- { echo "$as_me:$LINENO: result: yes" >&5
--echo "${ECHO_T}yes" >&6; }; have_libpcap=yes
+- { $as_echo "$as_me:$LINENO: result: yes" >&5
+-$as_echo "yes" >&6; }; have_libpcap=yes
-else
-- echo "$as_me: program exited with status $ac_status" >&5
--echo "$as_me: failed program was:" >&5
+- $as_echo "$as_me: program exited with status $ac_status" >&5
+-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
--{ echo "$as_me:$LINENO: result: no" >&5
--echo "${ECHO_T}no" >&6; }; have_libpcap=no
+-{ $as_echo "$as_me:$LINENO: result: no" >&5
+-$as_echo "no" >&6; }; have_libpcap=no
-fi
+-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-LIBS="$LIBS_OLD"
-fi
--
+
LIBPCAP_LIBS="-lpcap"
if test $have_libpcap = yes; then
- PCAP_DEPENDS=""
diff --git a/package/nmap/patches/patch-ncat_configure b/package/nmap/patches/patch-ncat_configure
new file mode 100644
index 000000000..1b7371f50
--- /dev/null
+++ b/package/nmap/patches/patch-ncat_configure
@@ -0,0 +1,93 @@
+--- nmap-5.00.orig/ncat/configure 2009-06-11 08:15:24.000000000 +0200
++++ nmap-5.00/ncat/configure 2009-07-20 20:47:33.391408119 +0200
+@@ -7044,90 +7044,6 @@ fi
+ fi
+
+
+-if test $have_libpcap = yes; then
+- if test "${LIBPCAP_INC+set}" = "set"; then
+- _cflags=$CXXFLAGS
+- _ldflags=$LDFLAGS
+-
+- CPPFLAGS="-I$LIBPCAP_INC $CPPFLAGS"
+- LDFLAGS="-L$LIBPCAP_LIB $LDFLAGS"
+- fi
+-
+- # link with -lpcap for the purposes of this test
+- LIBS_OLD="$LIBS"
+- LIBS="$LIBS -lpcap"
+- { $as_echo "$as_me:$LINENO: checking if libpcap version is recent enough" >&5
+-$as_echo_n "checking if libpcap version is recent enough... " >&6; }
+- if test "$cross_compiling" = yes; then
+- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+-See \`config.log' for more details." >&5
+-$as_echo "$as_me: error: cannot run test program while cross compiling
+-See \`config.log' for more details." >&2;}
+- { (exit 1); exit 1; }; }; }
+-else
+- cat >conftest.$ac_ext <<_ACEOF
+-/* confdefs.h. */
+-_ACEOF
+-cat confdefs.h >>conftest.$ac_ext
+-cat >>conftest.$ac_ext <<_ACEOF
+-/* end confdefs.h. */
+-
+-#include <stdio.h>
+-extern char pcap_version[];
+-int main() {
+- int major, minor1, minor2;
+- sscanf(pcap_version,"%d.%d.%d", &major, &minor1, &minor2);
+- if (major > 0)
+- exit(0);
+- if (minor1 < 9)
+- exit(1);
+- if (minor2 < 4)
+- exit(1);
+- exit(0);
+-}
+-_ACEOF
+-rm -f conftest$ac_exeext
+-if { (ac_try="$ac_link"
+-case "(($ac_try" in
+- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+- *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+- (eval "$ac_link") 2>&5
+- ac_status=$?
+- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+- { (case "(($ac_try" in
+- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+- *) ac_try_echo=$ac_try;;
+-esac
+-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+-$as_echo "$ac_try_echo") >&5
+- (eval "$ac_try") 2>&5
+- ac_status=$?
+- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+- (exit $ac_status); }; }; then
+- { $as_echo "$as_me:$LINENO: result: yes" >&5
+-$as_echo "yes" >&6; }; have_libpcap=yes
+-else
+- $as_echo "$as_me: program exited with status $ac_status" >&5
+-$as_echo "$as_me: failed program was:" >&5
+-sed 's/^/| /' conftest.$ac_ext >&5
+-
+-( exit $ac_status )
+-{ $as_echo "$as_me:$LINENO: result: no" >&5
+-$as_echo "no" >&6; }; have_libpcap=no
+-fi
+-rm -rf conftest.dSYM
+-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+-fi
+-
+-
+-LIBS="$LIBS_OLD"
+-fi
+
+ PCAP_LIBS="-lpcap"
+ if test $have_libpcap = yes; then
diff --git a/package/nmap/patches/patch-nmap_dns_h b/package/nmap/patches/patch-nmap_dns_h
index 2868f42ba..31fb4f536 100644
--- a/package/nmap/patches/patch-nmap_dns_h
+++ b/package/nmap/patches/patch-nmap_dns_h
@@ -1,7 +1,7 @@
$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
---- nmap-4.76.orig/nmap_dns.h 2008-08-21 11:24:35.000000000 +0200
-+++ nmap-4.76/nmap_dns.h 2008-12-14 19:40:58.000000000 +0100
-@@ -95,6 +95,9 @@
+--- nmap-5.00.orig/nmap_dns.h 2009-06-24 23:35:54.000000000 +0200
++++ nmap-5.00/nmap_dns.h 2009-07-20 20:33:41.191399691 +0200
+@@ -86,6 +86,9 @@
* *
***************************************************************************/
@@ -10,4 +10,4 @@ $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
+
class Target;
- void nmap_mass_rdns(Target ** targets, int num_targets);
+ #include <string>
diff --git a/package/nmap/patches/patch-output_cc b/package/nmap/patches/patch-output_cc
index cdabf2449..38058b98a 100644
--- a/package/nmap/patches/patch-output_cc
+++ b/package/nmap/patches/patch-output_cc
@@ -1,7 +1,7 @@
$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
---- nmap-4.76.orig/output.cc 2008-09-10 20:32:35.000000000 +0200
-+++ nmap-4.76/output.cc 2008-10-29 13:29:04.000000000 +0100
-@@ -2003,7 +2003,7 @@ struct data_file_record {
+--- nmap-5.00.orig/output.cc 2009-06-24 23:35:54.000000000 +0200
++++ nmap-5.00/output.cc 2009-07-20 20:33:41.267403513 +0200
+@@ -1966,7 +1966,7 @@ struct data_file_record {
/* Compares this record to another. First compare the directory names, then
compare the file names. */
diff --git a/package/nmap/patches/patch-scan_engine_cc b/package/nmap/patches/patch-scan_engine_cc
new file mode 100644
index 000000000..b7c7f6743
--- /dev/null
+++ b/package/nmap/patches/patch-scan_engine_cc
@@ -0,0 +1,10 @@
+--- nmap-5.00.orig/scan_engine.cc 2009-06-24 23:35:54.000000000 +0200
++++ nmap-5.00/scan_engine.cc 2009-07-20 21:04:40.819619295 +0200
+@@ -104,6 +104,7 @@
+ #include "Target.h"
+ #include "targets.h"
+ #include "utils.h"
++#include "sctp.h"
+ #include <math.h>
+ #include <list>
+ #include <map>
diff --git a/package/nmap/patches/patch-tcpip_cc b/package/nmap/patches/patch-tcpip_cc
new file mode 100644
index 000000000..b2156efd4
--- /dev/null
+++ b/package/nmap/patches/patch-tcpip_cc
@@ -0,0 +1,10 @@
+--- nmap-5.00.orig/tcpip.cc 2009-06-24 23:35:54.000000000 +0200
++++ nmap-5.00/tcpip.cc 2009-07-20 20:58:55.362028065 +0200
+@@ -99,6 +99,7 @@
+ #include "NmapOps.h"
+ #include "Target.h"
+ #include "utils.h"
++#include "sctp.h"
+
+ #if HAVE_SYS_TIME_H
+ #include <sys/time.h>
diff --git a/package/nmap/patches/patch-traceroute_cc b/package/nmap/patches/patch-traceroute_cc
index 79514733b..130d4d0fc 100644
--- a/package/nmap/patches/patch-traceroute_cc
+++ b/package/nmap/patches/patch-traceroute_cc
@@ -1,7 +1,15 @@
$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
---- nmap-4.76.orig/traceroute.cc 2008-09-06 06:12:34.000000000 +0200
-+++ nmap-4.76/traceroute.cc 2008-10-29 13:42:16.000000000 +0100
-@@ -850,9 +850,12 @@ Traceroute::outputTarget (Target * t) {
+--- nmap-5.00.orig/traceroute.cc 2009-06-24 23:35:54.000000000 +0200
++++ nmap-5.00/traceroute.cc 2009-07-20 21:07:42.902998599 +0200
+@@ -170,6 +170,7 @@
+ #include "protocols.h"
+ #include "timing.h"
+ #include "utils.h"
++#include "sctp.h"
+ #include <algorithm>
+ #include <stdlib.h>
+
+@@ -905,9 +906,12 @@ Traceroute::outputTarget (Target * t) {
tg = TraceGroups[t->v4host ().s_addr];
/* sort into ttl order */