aboutsummaryrefslogtreecommitdiff
path: root/security/nessus
diff options
context:
space:
mode:
authorTijl Coosemans <tijl@FreeBSD.org>2013-11-11 18:48:29 +0000
committerTijl Coosemans <tijl@FreeBSD.org>2013-11-11 18:48:29 +0000
commit53e29e83dc6fc889a3cbca6af887b94472e9f949 (patch)
tree2f46a3685a2963efd5211ce3fdda10a648b025d5 /security/nessus
parent7e87f067476b3abf1b6f4d6399c898a9fb1e1203 (diff)
downloadports-53e29e83dc6fc889a3cbca6af887b94472e9f949.tar.gz
ports-53e29e83dc6fc889a3cbca6af887b94472e9f949.zip
Notes
Diffstat (limited to 'security/nessus')
-rw-r--r--security/nessus/Makefile77
-rw-r--r--security/nessus/files/nessusd.conf.in (renamed from security/nessus/files/nessusd.conf)16
-rw-r--r--security/nessus/pkg-deinstall (renamed from security/nessus/files/pkg-deinstall.in)14
-rw-r--r--security/nessus/pkg-message4
-rw-r--r--security/nessus/pkg-plist13
-rw-r--r--security/nessus/scripts/move_nessus62
6 files changed, 50 insertions, 136 deletions
diff --git a/security/nessus/Makefile b/security/nessus/Makefile
index 8dd94d7d69f0..65f20831a9ee 100644
--- a/security/nessus/Makefile
+++ b/security/nessus/Makefile
@@ -3,7 +3,7 @@
PORTNAME= nessus
PORTVERSION= 2.2.9
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= security
MASTER_SITES= ftp://ftp.nessus.org/pub/nessus/nessus-${PORTVERSION}/src/ \
ftp://ftp.gwdg.de/pub/linux/misc/nessus/nessus-${PORTVERSION}/src/ \
@@ -11,71 +11,32 @@ MASTER_SITES= ftp://ftp.nessus.org/pub/nessus/nessus-${PORTVERSION}/src/ \
ftp://sunsite.cnlab-switch.ch/mirror/nessus/nessus-${PORTVERSION}/src/ \
ftp://ftp.ayamura.org/pub/nessus/nessus-${PORTVERSION}/src/
DISTNAME= nessus-core-${PORTVERSION}
+DIST_SUBDIR= nessus
MAINTAINER= udo.schweigert@siemens.com
COMMENT= Security scanner: looks for vulnerabilities in a given network
-LIB_DEPENDS= nasl.4:${PORTSDIR}/security/nessus-libnasl
+LICENSE= GPLv2
-DIST_SUBDIR= nessus
-WRKSRC= ${WRKDIR}/nessus-core
-SUB_FILES= pkg-deinstall
-SUB_LIST= PKGNAME=${PKGNAME}
-
-GNU_CONFIGURE= yes
-USE_RC_SUBR= nessusd
-WANT_GNOME= yes
-.if defined(WITHOUT_NESSUS_GTK) || defined(WITHOUT_GTK)
-WITHOUT_GNOME= yes
-.endif
+LIB_DEPENDS= libnasl.so:${PORTSDIR}/security/nessus-libnasl
-NO_STAGE= yes
-.include <bsd.port.pre.mk>
+OPTIONS_DEFINE= GTK2
+OPTIONS_DEFAULT=GTK2
-.if ${HAVE_GNOME:Mgtk20}!=""
-USE_GNOME+= gtk20
-PKGNAMESUFFIX+= -gtk2
-.elif ${HAVE_GNOME:Mgtk12}!=""
-USE_GNOME+= gtk12
-PKGNAMESUFFIX+= -gtk
-.else
-CONFIGURE_ARGS+=--disable-gtk
-.endif
+GTK2_CONFIGURE_ENABLE= gtk
+GTK2_USES= pkgconfig
+GTK2_USE= GNOME=gtk20
-MAN1= nessus.1 nessus-mkrand.1 nessus-mkcert-client.1 nessus-fetch.1
-MAN8= nessusd.8 nessus-adduser.8 nessus-mkcert.8 nessus-rmuser.8
+GNU_CONFIGURE= yes
+MAKE_JOBS_UNSAFE= yes
+SUB_FILES= nessusd.conf
+USE_RC_SUBR= nessusd
+WRKSRC= ${WRKDIR}/nessus-core
post-install:
- @${SED} -e 's;\$${PREFIX};${PREFIX};' ${FILESDIR}/nessusd.conf \
- > ${PREFIX}/etc/nessus/nessusd.conf.dist
- @${SED} -e 's;\$${PREFIX};${PREFIX};' ${FILESDIR}/nessusd.rules \
- > ${PREFIX}/etc/nessus/nessusd.rules.dist
- @${CHMOD} 644 ${PREFIX}/etc/nessus/nessusd.conf.dist \
- ${PREFIX}/etc/nessus/nessusd.rules.dist
- @if [ ! -f ${PREFIX}/etc/nessus/nessusd.conf ]; then \
- ${CP} -p ${PREFIX}/etc/nessus/nessusd.conf.dist \
- ${PREFIX}/etc/nessus/nessusd.conf; \
- fi
- @if [ ! -f ${PREFIX}/etc/nessus/nessusd.rules ]; then \
- ${CP} -p ${PREFIX}/etc/nessus/nessusd.rules.dist \
- ${PREFIX}/etc/nessus/nessusd.rules; \
- fi
- @${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/move_nessus
-.if ! exists(${PREFIX}/var/CA/serverkey.pem)
- @${ECHO} ""
- @${ECHO} "**************************************************************************"
- @${ECHO} "To create and install a new certificate, type \"make cert\""
- @${ECHO} "**************************************************************************"
- @${ECHO} ""
-.endif
- @${CAT} ${PKGMESSAGE}
-
-cert:
- @${ECHO} ""
- @${ECHO} "**************************************************************************"
- @${ECHO} "The new certificate will be saved into ${PREFIX}/var/CA/serverkey.pem"
- @${ECHO} "**************************************************************************"
- @${ECHO} ""
- ${PREFIX}/sbin/nessus-mkcert
+ ${INSTALL_DATA} ${WRKDIR}/nessusd.conf \
+ ${STAGEDIR}${ETCDIR}/nessusd.conf.dist
+ ${INSTALL_DATA} ${FILESDIR}/nessusd.rules \
+ ${STAGEDIR}${ETCDIR}/nessusd.rules.dist
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/security/nessus/files/nessusd.conf b/security/nessus/files/nessusd.conf.in
index b286cd54301e..d0f5b5c43628 100644
--- a/security/nessus/files/nessusd.conf
+++ b/security/nessus/files/nessusd.conf.in
@@ -5,7 +5,7 @@
# Every line starting with a '#' is a comment
# Path to the security checks folder :
-plugins_folder = ${PREFIX}/lib/nessus/plugins
+plugins_folder = %%PREFIX%%/lib/nessus/plugins
# Maximum number of simultaneous hosts tested :
max_hosts = 30
@@ -17,7 +17,7 @@ max_checks = 10
be_nice = no
# Log file (or 'syslog') :
-logfile = ${PREFIX}/var/nessus/logs/nessusd.messages
+logfile = %%PREFIX%%/var/nessus/logs/nessusd.messages
# Shall we log every details of the attack ?
log_whole_attack = yes
@@ -26,13 +26,13 @@ log_whole_attack = yes
log_plugins_name_at_load = no
# Dump file for debugging output, use `-' for stdout
-dumpfile = ${PREFIX}/var/nessus/logs/nessusd.dump
+dumpfile = %%PREFIX%%/var/nessus/logs/nessusd.dump
# Rules file :
-rules = ${PREFIX}/etc/nessus/nessusd.rules
+rules = %%PREFIX%%/etc/nessus/nessusd.rules
# Users database :
-users = ${PREFIX}/etc/nessus/nessusd.users
+users = %%PREFIX%%/etc/nessus/nessusd.users
# CGI paths to check for (cgi-bin:/cgi-aws:/ can do)
cgi_path = /cgi-bin:/scripts
@@ -110,9 +110,9 @@ nasl_no_signature_check = no
#
# Added by nessus-mkcert
#
-cert_file=${PREFIX}/com/CA/servercert.pem
-key_file=${PREFIX}/var/CA/serverkey.pem
-ca_file=${PREFIX}/com/CA/cacert.pem
+cert_file=%%PREFIX%%/com/CA/servercert.pem
+key_file=%%PREFIX%%/var/CA/serverkey.pem
+ca_file=%%PREFIX%%/com/CA/cacert.pem
# If you decide to protect your private key with a password,
# uncomment and change next line
# pem_password=password
diff --git a/security/nessus/files/pkg-deinstall.in b/security/nessus/pkg-deinstall
index 0f43ca05b165..46a340a97d8d 100644
--- a/security/nessus/files/pkg-deinstall.in
+++ b/security/nessus/pkg-deinstall
@@ -8,22 +8,22 @@ ECHO_CMD=echo
case $2 in
POST-DEINSTALL)
${ECHO_CMD}
- ${ECHO_CMD} "The %%PKGNAME%% server package has been deleted."
+ ${ECHO_CMD} "The nessus server package has been deleted."
${ECHO_CMD} "If you're *not* upgrading and won't be using"
${ECHO_CMD} "it any longer, you may want to issue the"
${ECHO_CMD} "following commands:"
${ECHO_CMD}
- if [ -d %%PREFIX%%/var/nessus ]; then
+ if [ -d ${PKG_PREFIX}/var/nessus ]; then
${ECHO_CMD} "- to delete the nessus server permanently (losing all data):"
- ${ECHO_CMD} " rm -Rf %%PREFIX%%/var/nessus"
+ ${ECHO_CMD} " rm -Rf ${PKG_PREFIX}/var/nessus"
${ECHO_CMD}
fi
rm_dir=""
- if [ -d %%PREFIX%%/com/CA ]; then
- rm_dir=" %%PREFIX%%/com/CA"
+ if [ -d ${PKG_PREFIX}/com/CA ]; then
+ rm_dir=" ${PKG_PREFIX}/com/CA"
fi
- if [ -d %%PREFIX%%/var/CA ]; then
- rm_dir="$rm_dir %%PREFIX%%/var/CA"
+ if [ -d ${PKG_PREFIX}/var/CA ]; then
+ rm_dir="$rm_dir ${PKG_PREFIX}/var/CA"
fi
if [ "x$rm_dir" != "x" ]; then
${ECHO_CMD} "- to remove the Certificate Authority associated with nessus:"
diff --git a/security/nessus/pkg-message b/security/nessus/pkg-message
index 16f469e1ce27..98fa77cacf85 100644
--- a/security/nessus/pkg-message
+++ b/security/nessus/pkg-message
@@ -8,3 +8,7 @@ Available variables you add/set to /etc/rc.conf.
- nessusd_enable (bool): Set to "NO" by default.
Set it to "YES" to enable nessusd.
- nessusd_flags (str): Set to "-D" by default.
+
+**************************************************************************
+To create and install a new certificate, run nessus-mkcert
+**************************************************************************
diff --git a/security/nessus/pkg-plist b/security/nessus/pkg-plist
index 53b81cf1b625..fb6e0f732edf 100644
--- a/security/nessus/pkg-plist
+++ b/security/nessus/pkg-plist
@@ -17,20 +17,31 @@ include/nessus/nessusraw.h
include/nessus/nessustcp.h
include/nessus/nessusudp.h
include/nessus/ntcompat.h
+man/man1/nessus.1.gz
+man/man1/nessus-mkrand.1.gz
+man/man1/nessus-mkcert-client.1.gz
+man/man1/nessus-fetch.1.gz
+man/man8/nessusd.8.gz
+man/man8/nessus-adduser.8.gz
+man/man8/nessus-mkcert.8.gz
+man/man8/nessus-rmuser.8.gz
sbin/nessus-adduser
sbin/nessus-check-signature
sbin/nessus-mkcert
sbin/nessus-rmuser
sbin/nessusd
+var/nessus/nessus-services
@exec mkdir -p %D/var/nessus/jobs
@exec mkdir -p %D/var/nessus/logs
+@exec mkdir -p %D/var/nessus/tmp
@exec mkdir -p %D/var/nessus/users
@unexec if [ ! -s %D/var/nessus/logs/nessusd.messages ]; then rm %D/var/nessus/logs/nessusd.messages 2> /dev/null; fi || true
@dirrmtry var/nessus/jobs
@dirrmtry var/nessus/logs
+@dirrmtry var/nessus/tmp
@dirrmtry var/nessus/users
-var/nessus/nessus-services
@dirrmtry var/nessus
+@dirrmtry var
@dirrmtry etc/nessus
@exec mkdir -p %D/lib/nessus/plugins
@dirrmtry lib/nessus/plugins
diff --git a/security/nessus/scripts/move_nessus b/security/nessus/scripts/move_nessus
deleted file mode 100644
index 0ed0367a1e72..000000000000
--- a/security/nessus/scripts/move_nessus
+++ /dev/null
@@ -1,62 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD: /tmp/pcvs/ports/security/nessus/scripts/move_nessus,v 1.3 2004-12-12 21:37:53 sem Exp $
-#
-# set -x
-
-trap ' cleanup ' 0
-trap ' echo_signal; exit 1' 1 2 3 15
-
-cleanup() {
- # No tmp file to remove up to now ;-)
-}
-
-echo_signal() {
- echo "Got Signal -- aborting `basename $0`"
-}
-
-PATH=/bin:/usr/bin
-
-
-if [ -f $PREFIX/etc/nessus/nessusd.conf ]; then
- if grep -q "$PREFIX/etc/nessus/var" $PREFIX/etc/nessus/nessusd.conf; then
- mv $PREFIX/etc/nessus/nessusd.conf $PREFIX/etc/nessus/nessusd.conf.bak
- sed -e "s,$PREFIX/etc/nessus/var,$PREFIX/var,g" \
- -e "s,$PREFIX/etc/nessus/com,$PREFIX/com,g" \
- $PREFIX/etc/nessus/nessusd.conf.bak > $PREFIX/etc/nessus/nessusd.conf
- fi
-fi
-if [ -d $PREFIX/etc/nessus/var/nessus/users ]; then
- rmdir $PREFIX/etc/nessus/var/nessus/users > /dev/null 2>/dev/null
- if [ $? -gt 0 ]; then
- printf "\n\nMigrating nessus to default directory scheme\n"
- printf "============================================\n\n"
- cd $PREFIX/etc/nessus/var/nessus/users
- for i in *; do
- if [ $i != '*' ]; then
- mv $i $PREFIX/var/nessus/users
- printf "Moving nessus user %s\n" $i
- fi
- done
- cd $PREFIX
- rmdir $PREFIX/etc/nessus/var/nessus/users > /dev/null 2>/dev/null
- printf "\n"
- fi
-fi
-if [ ! -d $PREFIX/com/CA ]; then
- if [ -d $PREFIX/etc/nessus/com/CA ]; then
- if [ ! -d $PREFIX/com ]; then
- mkdir -m 755 $PREFIX/com
- fi
- mv $PREFIX/etc/nessus/com/CA $PREFIX/com/CA
- fi
- if [ -d $PREFIX/etc/nessus/var/CA ]; then
- if [ ! -d $PREFIX/var/CA ]; then
- mv $PREFIX/etc/nessus/var/CA $PREFIX/var/CA
- fi
- fi
-fi
-cd $PREFIX
-rmdir $PREFIX/etc/nessus/var > /dev/null 2>/dev/null
-rmdir $PREFIX/etc/nessus/com > /dev/null 2>/dev/null
-exit 0