ports/49987: Maintainer Update: security/nmap

marius at alchemy.franken.de marius at alchemy.franken.de
Sun Mar 30 20:20:11 UTC 2003


The following reply was made to PR ports/49987; it has been noted by GNATS.

From: marius at alchemy.franken.de
To: freebsd-gnats-submit at FreeBSD.org
Cc: dom at cus.org.uk, alexander at leidinger.net
Subject: Re: ports/49987: Maintainer Update: security/nmap
Date: Sun, 30 Mar 2003 22:14:55 +0200

 --huq684BweRXVnRxX
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 
 meanwhile nmap 3.20 (a stable release) came out. attached is a patch
 to update the port. it's tested on:
 3-stable: i386 (to make sure it doesn't fail without ipv6-support)
 4-stable: i386, alpha
 5-current: i386, sparc64
 
 the added patch patch-nbase::getopt.h is necessary to compile nmap
 with gcc3 and fixes the problem reported in the followup by Yen-Mingi
 Lee and patch-nmap.h fixes compilation on 64bit platforms.
 
 the patch for the nmapfe port fixes this port to use the correct
 pkg-plist, install the gnome desktop entry file to the right location,
 don't kill gnome directories on uninstall and makes portlint happy.
 additionally it adds ALL_TARGETs in order to not compile the nmap-
 binary again.
 both port-patches remove obsolete files (nmap.1 in FILESDIRs, distinfo
 in nmpafe).
 
 
 --huq684BweRXVnRxX
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="security::nmap.diff"
 
 Index: Makefile
 ===================================================================
 RCS file: /usr/data/bsd/cvs/fbsd/ports/security/nmap/Makefile,v
 retrieving revision 1.62
 diff -u -r1.62 Makefile
 --- Makefile	7 Mar 2003 00:16:25 -0000	1.62
 +++ Makefile	30 Mar 2003 16:32:38 -0000
 @@ -7,23 +7,31 @@
  #
  
  PORTNAME?=	nmap
 -PORTVERSION=	3.00
 +PORTVERSION=	3.20
  CATEGORIES=	security
 -MASTER_SITES=	http://download.insecure.org/nmap/dist/  \
 -		http://www.mobis.com/ajax/projects/
 +MASTER_SITES=	http://download.insecure.org/nmap/dist/
  DISTNAME=	nmap-${PORTVERSION:S/.b/BETA/}
 -EXTRACT_SUFX=	.tgz
  
  MAINTAINER=	d.marks at student.umist.ac.uk
  COMMENT?=	Port scanning utility for large networks
  
 +GNU_CONFIGURE=	yes
 +USE_BZIP2=	yes
 +
 +MAN1?=		nmap.1
 +
  .include <bsd.port.pre.mk>
  
 -GNU_CONFIGURE=	yes
  .if ${OSVERSION} < 300004
  CFLAGS+=	-DDLT_RAW=12 # for obsoleted <net/bpf.h>
  .endif
 -MAN1?=		nmap.1
 +
 +CONFIGURE_TARGET=	-build=${ARCH}-portbld-freebsd${OSREL}
 +.if ${PORTNAME} == "nmap"
 +CONFIGURE_ARGS+=	--without-nmapfe
 +.endif
 +ALL_TARGET?=		nmap
 +INSTALL_TARGET?=	install-nmap
  
  .if !target(post-install) && (${PORTNAME} == "nmap")
  post-install:
 Index: distinfo
 ===================================================================
 RCS file: /usr/data/bsd/cvs/fbsd/ports/security/nmap/distinfo,v
 retrieving revision 1.38
 diff -u -r1.38 distinfo
 --- distinfo	5 Aug 2002 20:57:12 -0000	1.38
 +++ distinfo	29 Mar 2003 19:43:43 -0000
 @@ -1 +1 @@
 -MD5 (nmap-3.00.tgz) = 2b648bc66f1cedbeed230ef56f6549a8
 +MD5 (nmap-3.20.tar.bz2) = 00f42f5477cc2499f5f68479702dd224
 Index: files/nmap.1
 ===================================================================
 RCS file: files/nmap.1
 diff -N files/nmap.1
 --- files/nmap.1	31 Aug 1999 01:51:21 -0000	1.2
 +++ /dev/null	1 Jan 1970 00:00:00 -0000
 @@ -1,87 +0,0 @@
 -.\"
 -.\" Copyright (c) 1998 David E. O'Brien
 -.\"
 -.\" All rights reserved.
 -.\"
 -.\" Redistribution and use in source and binary forms, with or without
 -.\" modification, are permitted provided that the following conditions
 -.\" are met:
 -.\" 1. Redistributions of source code must retain the above copyright
 -.\"    notice, this list of conditions and the following disclaimer.
 -.\" 2. Redistributions in binary form must reproduce the above copyright
 -.\"    notice, this list of conditions and the following disclaimer in the
 -.\"    documentation and/or other materials provided with the distribution.
 -.\"
 -.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
 -.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 -.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 -.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
 -.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 -.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 -.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 -.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 -.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 -.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 -.\"
 -.\" $FreeBSD: ports/security/nmap/files/nmap.1,v 1.2 1999/08/31 01:51:21 peter Exp $
 -.\"
 -.\" .TH NMAP 1L local
 -.Dd August 4, 1998
 -.Dt NMAP 1
 -.Os BSD
 -.Sh NAME
 -.Nm nmap
 -.Nd network port scanner
 -.Sh SYNOPSIS
 -.Nm nmap
 -.Op Ar options
 -.Ar hostname
 -.Op Ar /mask
 -.Sh DESCRIPTION
 -.Nm
 -is a utility for port scanning large networks, although it works fine for
 -single hosts. The guiding philosophy for the creation of 
 -.Nm
 -was TMTOWTDI (There's More Than One Way To Do It). This is the Perl slogan, but
 -it is equally applicable to scanners. Sometimes you need speed, other times you
 -may need stealth. In some cases, bypassing firewalls may be required. Not to
 -mention the fact that you may want to scan different protocols (UDP, TCP, ICMP,
 -etc.). You just can't do all this with one scanning mode. And you don't want to
 -have 10 different scanners around, all with different interfaces and
 -capabilities. Thus
 -.Nm 
 -incorporats virtually every scanning technique known.
 -Specifically, 
 -.Nm 
 -supports:
 -
 -      Vanilla TCP connect() scanning, 
 -      TCP SYN (half open) scanning, 
 -      TCP FIN (stealth) scanning, 
 -      TCP ftp proxy (bounce attack) scanning 
 -      SYN/FIN scanning using IP fragments (bypasses packet filters), 
 -      UDP recvfrom() scanning, 
 -      UDP raw ICMP port unreachable scanning, 
 -      ICMP scanning (ping-sweep), and 
 -      Reverse-ident scanning. 
 -
 -.Nm
 -also supports a number of performance and reliability features such as dynamic
 -delay time calculations, packet timeout and retransmission, parallel port
 -scanning, detection of down hosts via parallel pings, and flexible target and
 -port specification. 
 -.Sh FILES
 -none.
 -.Sh SEE ALSO
 -.Xr mscan 1L ,
 -.Xr nc 1L ,
 -.Xr scrobe 1L
 -.Sh DIAGNOSTICS
 -none.
 -.Sh BUGS
 -none known.
 -.Sh AUTHORS
 -This man page has been written by David O'Brien (obrien at cs.ucdavis.edu)
 -.\" .Sh HISTORY
 -.\" .Nm 
 -.\" appeared in FreeBSD 3.0.
 Index: files/patch-aa
 ===================================================================
 RCS file: /usr/data/bsd/cvs/fbsd/ports/security/nmap/files/patch-aa,v
 retrieving revision 1.13
 diff -u -r1.13 patch-aa
 --- files/patch-aa	23 Feb 2002 06:04:44 -0000	1.13
 +++ files/patch-aa	30 Mar 2003 18:36:21 -0000
 @@ -1,25 +1,28 @@
  --- Makefile.in.orig	Fri Mar  9 22:25:19 2001
  +++ Makefile.in	Sun May 27 17:49:17 2001
 -@@ -16,5 +16,5 @@
 +@@ -9,14 +9,14 @@
 + mandir = @mandir@
 + srcdir = @srcdir@
 + nmapdatadir = @datadir@/nmap
 +-deskdir = $(prefix)/share/gnome/apps/Utilities
 ++deskdir = $(X11BASE)/share/gnome/apps/Utilities
 + 
 + NBASEDIR=@NBASEDIR@
 + CC = @CC@
 + CXX = @CXX@
   CCOPT = 
   LIBPCAPDIR = @libpcapdir@
  -INCLS = -I$(LIBPCAPDIR) 
  +#INCLS = -I$(LIBPCAPDIR) 
   DEFS = @DEFS@ -DNMAP_VERSION=\"$(NMAP_VERSION)\" -DNMAP_NAME=\"$(NMAP_NAME)\" -DNMAP_URL=\"$(NMAP_URL)\" -DNMAP_PLATFORM=\"$(NMAP_PLATFORM)\" -DNMAPDATADIR=\"$(nmapdatadir)\"
 - CFLAGS = -g @CFLAGS@ $(CCOPT) $(DEFS) $(INCLS)
 -@@ -171,9 +171,12 @@
 + # For mtrace debugging -- see MTRACE define in main.cc for instructions
 + # Should only be enabled during debugging and not in any real release.
 +@@ -200,7 +200,7 @@
   	$(MAKEDEPEND) $(INCLS) -s "# DO NOT DELETE" -- $(DEFS) -- $(SRCS)
   
 --install: $(TARGET)
 + install-nmap: $(TARGET)
  -	$(SHTOOL) mkdir -f -p -m 755 $(bindir) $(mandir)/man1 $(nmapdatadir) $(deskdir)
 --	$(INSTALL) -c -m 755 nmap $(bindir)/nmap
 -+install-nmapfe:
 - 	@echo "If the next command fails -- you cannot use the X front end"
 -+	$(SHTOOL) mkdir -f -p -m 755 $(deskdir)
 - 	-test -f nmapfe/nmapfe && $(INSTALL) -c -m 755 nmapfe/nmapfe $(bindir)/nmapfe && $(SHTOOL) mkln -f -s $(bindir)/nmapfe $(bindir)/xnmap && $(INSTALL) -c -m 644 nmapfe.desktop $(deskdir)/nmapfe.desktop && $(INSTALL) -c -m 644 docs/nmapfe.1 $(mandir)/man1/nmapfe.1 && $(INSTALL) -c -m 644 docs/xnmap.1 $(mandir)/man1/xnmap.1
 -+
 -+install: $(TARGET)
  +	$(SHTOOL) mkdir -f -p -m 755 $(bindir) $(mandir)/man1 $(nmapdatadir)
 -+	$(INSTALL) -c -m 755 nmap $(bindir)/nmap
 + 	$(INSTALL) -c -m 755 nmap $(bindir)/nmap
   	$(INSTALL) -c -m 644 docs/$(TARGET).1 $(mandir)/man1/$(TARGET).1
   	$(INSTALL) -c -m 644 nmap-os-fingerprints  $(nmapdatadir)/nmap-os-fingerprints
 Index: files/patch-nbase::getopt.h
 ===================================================================
 RCS file: files/patch-nbase::getopt.h
 diff -N files/patch-nbase::getopt.h
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-nbase::getopt.h	29 Mar 2003 21:55:04 -0000
 @@ -0,0 +1,14 @@
 +--- nbase/getopt.h.orig	Sat Mar 29 22:29:42 2003
 ++++ nbase/getopt.h	Sat Mar 29 22:47:18 2003
 +@@ -100,7 +100,11 @@
 +    errors, only prototype getopt for the GNU C library.  */
 + extern int getopt (int argc, char *const *argv, const char *shortopts);
 + #else /* not __GNU_LIBRARY__ */
 ++#if FREEBSD
 ++#include <unistd.h>
 ++#else
 + extern int getopt ();
 ++#endif
 + #endif /* __GNU_LIBRARY__ */
 + extern int getopt_long (int argc, char *const *argv, const char *shortopts,
 + 		        const struct option *longopts, int *longind);
 Index: files/patch-nmap.h
 ===================================================================
 RCS file: files/patch-nmap.h
 diff -N files/patch-nmap.h
 --- /dev/null	1 Jan 1970 00:00:00 -0000
 +++ files/patch-nmap.h	30 Mar 2003 16:59:01 -0000
 @@ -0,0 +1,18 @@
 +--- nmap.h.orig	Sun Mar 30 18:44:33 2003
 ++++ nmap.h	Sun Mar 30 18:51:47 2003
 +@@ -344,9 +344,12 @@
 + #elif defined(UW)
 + #  define NET_SIZE_T size_t
 + #elif defined(__FreeBSD__)
 +-  /* XXX: Apache didn't have this one,
 +-          so watch it be wrong :)... */
 +-#  define NET_SIZE_T size_t
 ++#  if __FreeBSD__ >= 2
 ++#    include <osreldate.h>
 ++#    if __FreeBSD_version >= 400000
 ++#      define NET_SIZE_T socklen_t
 ++#    endif
 ++#  endif
 + #elif defined(OPENBSD)
 + #  define NET_SIZE_T socklen_t
 + #elif defined(NETBSD)
 
 --huq684BweRXVnRxX
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="security::nmapfe.diff"
 
 Index: Makefile
 ===================================================================
 RCS file: /usr/data/bsd/cvs/fbsd/ports/security/nmapfe/Makefile,v
 retrieving revision 1.33
 diff -u -r1.33 Makefile
 --- Makefile	7 Mar 2003 00:16:25 -0000	1.33
 +++ Makefile	30 Mar 2003 13:29:37 -0000
 @@ -6,20 +6,21 @@
  # $FreeBSD: ports/security/nmapfe/Makefile,v 1.33 2003/03/07 00:16:25 ade Exp $
  #
  
 -MASTERDIR=	${.CURDIR}/../nmap
 -COMMENT=	GUI frontend for the nmap scanning utility
 -
  PORTNAME=	nmapfe
  
 +COMMENT=	GUI frontend for the nmap scanning utility
 +
  RUN_DEPENDS=	nmap:${PORTSDIR}/security/nmap
  
 +MASTERDIR=	${.CURDIR}/../nmap
 +PLIST=		${.CURDIR}/pkg-plist
 +
  USE_GNOMENG=	yes
  USE_GNOME=	gtk12
 -INSTALL_TARGET=	install-nmapfe
 +
  MAN1=		nmapfe.1 xnmap.1
  
 -after-install:
 -	test -e ${PREFIX}/bin/nmapfe \
 -	    || (cd ${PREFIX}/bin ; ${LN} -f nmapfe xnmap)
 +ALL_TARGET=	nbase/libnbase.a nmapfe/nmapfe
 +INSTALL_TARGET=	install-nmapfe
  
  .include "${MASTERDIR}/Makefile"
 Index: distinfo
 ===================================================================
 RCS file: distinfo
 diff -N distinfo
 --- distinfo	18 Sep 1999 04:49:23 -0000	1.14
 +++ /dev/null	1 Jan 1970 00:00:00 -0000
 @@ -1 +0,0 @@
 -MD5 (nmapfe-0.9.5.tgz) = f7cd97ddcd1eca49489298ad9bd3bf00
 Index: pkg-plist
 ===================================================================
 RCS file: /usr/data/bsd/cvs/fbsd/ports/security/nmapfe/pkg-plist,v
 retrieving revision 1.8
 diff -u -r1.8 pkg-plist
 --- pkg-plist	23 Feb 2002 06:05:04 -0000	1.8
 +++ pkg-plist	30 Mar 2003 18:39:23 -0000
 @@ -1,7 +1,6 @@
  @comment $FreeBSD: ports/security/nmapfe/pkg-plist,v 1.8 2002/02/23 06:05:04 cjc Exp $
  bin/nmapfe
  bin/xnmap
 + at cwd %%X11BASE%%
  share/gnome/apps/Utilities/nmapfe.desktop
 - at dirrm share/gnome/apps/Utilities
 - at dirrm share/gnome/apps
 - at dirrm share/gnome
 + at cwd %%LOCALBASE%%
 Index: files/nmap.1
 ===================================================================
 RCS file: files/nmap.1
 diff -N files/nmap.1
 --- files/nmap.1	31 Aug 1999 01:51:21 -0000	1.2
 +++ /dev/null	1 Jan 1970 00:00:00 -0000
 @@ -1,87 +0,0 @@
 -.\"
 -.\" Copyright (c) 1998 David E. O'Brien
 -.\"
 -.\" All rights reserved.
 -.\"
 -.\" Redistribution and use in source and binary forms, with or without
 -.\" modification, are permitted provided that the following conditions
 -.\" are met:
 -.\" 1. Redistributions of source code must retain the above copyright
 -.\"    notice, this list of conditions and the following disclaimer.
 -.\" 2. Redistributions in binary form must reproduce the above copyright
 -.\"    notice, this list of conditions and the following disclaimer in the
 -.\"    documentation and/or other materials provided with the distribution.
 -.\"
 -.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
 -.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 -.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 -.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
 -.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 -.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 -.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 -.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 -.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 -.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 -.\"
 -.\" $FreeBSD: ports/security/nmapfe/files/nmap.1,v 1.2 1999/08/31 01:51:21 peter Exp $
 -.\"
 -.\" .TH NMAP 1L local
 -.Dd August 4, 1998
 -.Dt NMAP 1
 -.Os BSD
 -.Sh NAME
 -.Nm nmap
 -.Nd network port scanner
 -.Sh SYNOPSIS
 -.Nm nmap
 -.Op Ar options
 -.Ar hostname
 -.Op Ar /mask
 -.Sh DESCRIPTION
 -.Nm
 -is a utility for port scanning large networks, although it works fine for
 -single hosts. The guiding philosophy for the creation of 
 -.Nm
 -was TMTOWTDI (There's More Than One Way To Do It). This is the Perl slogan, but
 -it is equally applicable to scanners. Sometimes you need speed, other times you
 -may need stealth. In some cases, bypassing firewalls may be required. Not to
 -mention the fact that you may want to scan different protocols (UDP, TCP, ICMP,
 -etc.). You just can't do all this with one scanning mode. And you don't want to
 -have 10 different scanners around, all with different interfaces and
 -capabilities. Thus
 -.Nm 
 -incorporats virtually every scanning technique known.
 -Specifically, 
 -.Nm 
 -supports:
 -
 -      Vanilla TCP connect() scanning, 
 -      TCP SYN (half open) scanning, 
 -      TCP FIN (stealth) scanning, 
 -      TCP ftp proxy (bounce attack) scanning 
 -      SYN/FIN scanning using IP fragments (bypasses packet filters), 
 -      UDP recvfrom() scanning, 
 -      UDP raw ICMP port unreachable scanning, 
 -      ICMP scanning (ping-sweep), and 
 -      Reverse-ident scanning. 
 -
 -.Nm
 -also supports a number of performance and reliability features such as dynamic
 -delay time calculations, packet timeout and retransmission, parallel port
 -scanning, detection of down hosts via parallel pings, and flexible target and
 -port specification. 
 -.Sh FILES
 -none.
 -.Sh SEE ALSO
 -.Xr mscan 1L ,
 -.Xr nc 1L ,
 -.Xr scrobe 1L
 -.Sh DIAGNOSTICS
 -none.
 -.Sh BUGS
 -none known.
 -.Sh AUTHORS
 -This man page has been written by David O'Brien (obrien at cs.ucdavis.edu)
 -.\" .Sh HISTORY
 -.\" .Nm 
 -.\" appeared in FreeBSD 3.0.
 
 --huq684BweRXVnRxX--



More information about the freebsd-ports-bugs mailing list