pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/43975: [PATCH] net/nmap on newer openssl (without MD2)



>Number:         43975
>Category:       pkg
>Synopsis:       [PATCH] net/nmap on newer openssl (without MD2)
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 15 17:00:01 +0000 2010
>Originator:     Rumko
>Release:        /
>Organization:
>Environment:
DragonFly zeus.rumko.net 2.7-DEVELOPMENT DragonFly 
v2.7.3.1285.g544af-DEVELOPMENT #6: Wed Oct 13 09:55:13 CEST 2010     
root%zeus.rumko.net@localhost:/usr/obj/usr/src/sys/MYROUTER  i386
>Description:
In newer openssl, MD2 was removed, but nmap still tries to use md2 related code 
without checking if it is there at all. The patch at 
http://www.rumko.net/pkgsrc/0001-Make-net-nmap-compile-with-newer-openssl.patch 
(a copy of it is also in this report) uses the recipe on 
http://seclists.org/nmap-dev/2010/q3/539 to fix it (OPENSSL_NO_MD2 is already 
defined in openssl's headers, so changes to configure are not needed).
>How-To-Repeat:

>Fix:
From 455a0229ad8fc47f4d3c7c6bb3d9930bfb31c76c Mon Sep 17 00:00:00 2001
From: Rumko <rumcic%gmail.com@localhost>
Date: Tue, 12 Oct 2010 21:55:36 +0200
Subject: [PATCH] Make net/nmap compile with newer openssl.

Openssl has removed MD2 from their code, so nmap needs to be tweaked.
---
 net/nmap/distinfo         |    1 +
 net/nmap/patches/patch-ad |   43 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 0 deletions(-)
 create mode 100644 net/nmap/patches/patch-ad

diff --git a/net/nmap/distinfo b/net/nmap/distinfo
index 9fdd886..ada3657 100644
--- a/net/nmap/distinfo
+++ b/net/nmap/distinfo
@@ -6,4 +6,5 @@ Size (nmap-5.35DC1.tar.bz2) = 11302092 bytes
 SHA1 (patch-aa) = 61593e0479a79bcb4cce2e88b2e5753fa14bc429
 SHA1 (patch-ab) = 22c377e9a340a6e6d7b9a36b63e6ffc47a084b3b
 SHA1 (patch-ac) = c22e8f6411b1152a6e7582c90e5ec5bd4c6acaad
+SHA1 (patch-ad) = 42c478a2d1c0019498f1acd66687f707d4b0b1f5
 SHA1 (patch-aj) = 868440ce24a70c1a747af6d65eed24f20c4bb892
diff --git a/net/nmap/patches/patch-ad b/net/nmap/patches/patch-ad
new file mode 100644
index 0000000..2f03d1e
--- /dev/null
+++ b/net/nmap/patches/patch-ad
@@ -0,0 +1,43 @@
+$NetBSD$
+
+MD2 has been removed from newer openssl.
+Taken from http://seclists.org/nmap-dev/2010/q3/539
+
+--- nse_openssl.cc.orig        2010-10-12 21:46:54 +0200
++++ nse_openssl.cc     2010-10-12 21:48:00 +0200
+@@ -8,7 +8,9 @@
+ #include <openssl/crypto.h>
+ #include <openssl/bn.h>
+ #include <openssl/rand.h>
++#ifndef OPENSSL_NO_MD2
+ #include <openssl/md2.h>
++#endif
+ #include <openssl/md4.h>
+ #include <openssl/md5.h>
+ #include <openssl/sha.h>
+@@ -219,6 +221,7 @@
+   return 1;
+ }
+ 
++#ifndef OPENSSL_NO_MD2
+ static int l_md2(lua_State *L)     /** md2(string s) */
+ {
+   size_t len;
+@@ -228,6 +231,7 @@
+   lua_pushlstring( L, (char *) MD2( s, len, digest ), 16 );
+   return 1;
+ }
++#endif
+ 
+ static int l_md4(lua_State *L)     /** md4(string s) */
+ {
+@@ -515,7 +519,9 @@
+   { "bignum_mod_exp", l_bignum_mod_exp },
+   { "rand_bytes", l_rand_bytes },
+   { "rand_pseudo_bytes", l_rand_pseudo_bytes },
++#ifndef OPENSSL_NO_MD2
+   { "md2", l_md2 },
++#endif
+   { "md4", l_md4 },
+   { "md5", l_md5 },
+   { "sha1", l_sha1 },
-- 
1.7.0.5



Home | Main Index | Thread Index | Old Index