[prev in list] [next in list] [prev in thread] [next in thread] 

List:       nessus-devel
Subject:    [patch] add --with-nmap option to nessus-plugins configure script
From:       Devin Kowatch <devink () SDSC ! EDU>
Date:       2002-03-05 19:27:36
[Download RAW message or body]

Hi,
Hopefully someone is watching this list :)

The nessus patch manager seems to be down (as does nessus.com), though 
I don't know if this is recent or if it's permanent.  This one is small
enough that I'm just posting it here though.

This patch adds a '--with-nmap' option to the configure script in
nessus-plugins.  This option can be given as:
    --with-nmap=<path to nmap>  Use the given path as the nmap binary

    --with-nmap=<directory>     Search <directory>, <directory>/sbin, 
                                <directory>/bin for nmap

    --with-nmap                 default, search path for nmap

    --without-nmap              Don't use nmap, this also turns off the
                                warnining about not finding nmap at the
                                end

Notes: 
- The default behavior is not changed.
- autoconf needs to be run after applying this patch

-- 
Devin Kowatch
devink@sdsc.edu

["configure.in.diff" (text/plain)]

Index: configure.in
===================================================================
RCS file: /usr/local/cvs/nessus-plugins/configure.in,v
retrieving revision 1.38
diff -c -r1.38 configure.in
*** configure.in	6 Feb 2002 10:56:12 -0000	1.38
--- configure.in	5 Mar 2002 19:19:16 -0000
***************
*** 94,100 ****
  
  AC_ARG_WITH(fetchcmd, [  --with-fetchcmd=[wget|lynx|<cmd>]
  			  Use this command for fetching updates.  This command
- 
  			  must take a url as it's only argument and send the
  			  retrieved file to STDIN.  If you want to use lynx
  			  or wget then no arguments need be specified.
--- 94,99 ----
***************
*** 145,152 ****
      INSTALL_UPDATER=install-updater
  fi
  
  
- AC_PATH_PROG(NMAP, nmap)
  major=0
  minor=0
  test "$NMAP" && {
--- 144,169 ----
      INSTALL_UPDATER=install-updater
  fi
  
+ AC_ARG_WITH(nmap,
+ [  --with-nmap=<path>      Specify a location for nmap])
+ 
+ if test -z "$with_nmap" -o "$with_nmap" != "no" ; then
+     if test -d "$with_nmap" ; then
+         testpath="$with_nmap:$with_nmap/sbin:$with_nmap/bin"
+         AC_PATH_PROG(NMAP, nmap, [], $testpath)
+     elif test -x "$with_nmap" ; then
+         AC_MSG_CHECKING([for nmap])
+         NMAP="$with_nmap"
+         AC_SUBST(NMAP)
+         AC_MSG_RESULT($NMAP)
+     else
+         AC_PATH_PROG(NMAP, nmap)
+     fi
+ else
+     AC_MSG_CHECKING([for nmap])
+     AC_MSG_RESULT([disabled])
+ fi
  
  major=0
  minor=0
  test "$NMAP" && {
***************
*** 199,204 ****
--- 216,223 ----
  nessus-update-plugins
  nessus.tmpl)
  
+ dnl if user specified '--without-nmap' don't warn them.
+ if test -z "$with_nmap" -o "$with_nmap" != "no" ; then
  test -z "$NMAP" -o $major -lt 2 -o  $minor -lt 3 && {
  	AC_WARN(""
  "Nmap 2.3BETA is not installed."
***************
*** 215,219 ****
--- 234,240 ----
  "to build Nessus"
  "")
  } 
+ fi
+ 
  exit 0
  


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic