summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Theisen <djt@hxx.in>2021-10-04 12:15:51 +0000
committerDan Theisen <djt@hxx.in>2021-10-04 12:15:51 +0000
commita935cb2e1828f3a7601c04ca7920f07ef4fba67e (patch)
tree0cddbad176e842f727681a618959e3163fefd9ea
parent21bc83d0b4ab1b70bfabf4636ca9f7ddbf92dd4f (diff)
downloadpackages-a935cb2e1828f3a7601c04ca7920f07ef4fba67e.tar.gz
packages-a935cb2e1828f3a7601c04ca7920f07ef4fba67e.tar.bz2
packages-a935cb2e1828f3a7601c04ca7920f07ef4fba67e.tar.xz
packages-a935cb2e1828f3a7601c04ca7920f07ef4fba67e.zip
user/nmap: bump to 7.92
-rw-r--r--user/nmap/APKBUILD15
-rw-r--r--user/nmap/nmap-7.80-fix_addrset.patch74
2 files changed, 4 insertions, 85 deletions
diff --git a/user/nmap/APKBUILD b/user/nmap/APKBUILD
index 304c94cae..2743df7ae 100644
--- a/user/nmap/APKBUILD
+++ b/user/nmap/APKBUILD
@@ -1,6 +1,6 @@
# Maintainer: Dan Theisen <djt@hxx.in>
pkgname=nmap
-pkgver=7.80
+pkgver=7.92
pkgrel=0
pkgdesc="A network exploration tool and security/port scanner"
url="https://nmap.org/"
@@ -17,18 +17,12 @@ subpackages="
$pkgname-ncat
$pkgname-ncat-doc:ncat_doc
netcat::noarch"
-source="https://nmap.org/dist/$pkgname-$pkgver.tar.bz2
- nmap-7.80-fix_addrset.patch"
+source="https://nmap.org/dist/$pkgname-$pkgver.tar.bz2"
# secfixes:
# 7.80-r0:
# - CVE-2018-15173
-prepare() {
- default_prepare
- update_config_sub
-}
-
build() {
# zenmap and ndiff require python 2
export CFLAGS=-g3
@@ -58,7 +52,7 @@ check() {
package() {
make DESTDIR="$pkgdir" install
- install -Dm644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
}
scripts() {
@@ -107,5 +101,4 @@ netcat() {
ln -s ncat "$subpkgdir"/usr/bin/nc
}
-sha512sums="d4384d3ebf4f3abf3588eed5433f733874ecdceb9342a718dc36db19634b0cc819d73399974eb0a9a9c9dd9e5c88473e07644ec91db28b0c072552b54430be6b nmap-7.80.tar.bz2
-e079c07716bc847b44cb5ba0c1f71fe7d95e786c7a18dad7927ca29e6f2e20fce3674d939335db038e509755945d1db05a1746b508ada3df011fafb890ab9033 nmap-7.80-fix_addrset.patch"
+sha512sums="7828367f9dc76ff4d1e8c821260e565fb0c3cb6aba0473d24759133a3006cdf2cb087574f0dd7d2ba47a63754ba4f72e0b78cdae1333a58f05c41d428b56ad59 nmap-7.92.tar.bz2"
diff --git a/user/nmap/nmap-7.80-fix_addrset.patch b/user/nmap/nmap-7.80-fix_addrset.patch
deleted file mode 100644
index 3fa009c84..000000000
--- a/user/nmap/nmap-7.80-fix_addrset.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-diff --git a/nbase/nbase_addrset.c b/nbase/nbase_addrset.c
-index 6f91bc1b2a..849044e4e3 100644
---- a/nbase/nbase_addrset.c
-+++ b/nbase/nbase_addrset.c
-@@ -477,30 +477,32 @@ static int sockaddr_to_addr(const struct sockaddr *sa, u32 *addr)
-
- static int sockaddr_to_mask (const struct sockaddr *sa, int bits, u32 *mask)
- {
-- s8 i;
-- int unmasked_bits = 0;
-+ int i, k;
- if (bits >= 0) {
- if (sa->sa_family == AF_INET) {
-- unmasked_bits = 32 - bits;
-+ bits += 96;
- }
- #ifdef HAVE_IPV6
- else if (sa->sa_family == AF_INET6) {
-- unmasked_bits = 128 - bits;
-+ ; /* do nothing */
- }
- #endif
- else {
- return 0;
- }
- }
-+ else
-+ bits = 128;
-+ k = bits / 32;
- for (i=0; i < 4; i++) {
-- if (unmasked_bits <= 32 * (3 - i)) {
-+ if (i < k) {
- mask[i] = 0xffffffff;
- }
-- else if (unmasked_bits >= 32 * (4 - i)) {
-+ else if (i > k) {
- mask[i] = 0;
- }
- else {
-- mask[i] = ~((1 << (unmasked_bits - (32 * (4 - i)))) - 1);
-+ mask[i] = 0xfffffffe << (31 - bits % 32);
- }
- }
- return 1;
-diff --git a/ncat/test/test-addrset.sh b/ncat/test/test-addrset.sh
-index 7f54023c52..285c7b675a 100755
---- a/ncat/test/test-addrset.sh
-+++ b/ncat/test/test-addrset.sh
-@@ -208,6 +208,25 @@ test_addrset "1:2::0003/120" "1:2::3 1:2::0 1:2::ff" <<EOF
- 1:3::3
- EOF
-
-+# IPv6 CIDR netmask.
-+test_addrset "1:2::3:4:5/95" "1:2::3:4:5 1:2::2:0:0 1:2::3:ffff:ffff" <<EOF
-+1:2::3:4:5
-+1:2::1:ffff:ffff
-+1:2::2:0:0
-+1:2::3:ffff:ffff
-+1:2::4:0:0
-+1:3::3
-+EOF
-+
-+# IPv6 CIDR netmask.
-+test_addrset "11::2/15" "11::2:3:4:5 10::1 11:ffff:ffff:ffff:ffff:ffff:ffff:ffff" <<EOF
-+11::2:3:4:5
-+9:ffff:ffff:ffff:ffff:ffff:ffff:ffff
-+10::1
-+11:ffff:ffff:ffff:ffff:ffff:ffff:ffff
-+12::0
-+EOF
-+
- # /128 netmask.
- test_addrset "1:2::0003/128" "1:2::3" <<EOF
- 1:2::3