mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-11 07:22:22 +00:00
- Add LICENSE.
- New LIB_DEPENDS syntax. - Staging. - Replace gtk detection with GTK2 option. - Mark MAKE_JOBS_UNSAFE for now. One Makefile has mutilple targets that each call make in the same subdirectory and the Makefile in that directory does the same with one of its subdirectories. - Move files/nessusd.conf to files/nessusd.conf.in and add it to SUB_FILES instead of calling sed from post-install. - Move files/pkg-deinstall.in to pkg-deinstall and replace %%PREFIX%% with ${PKG_PREFIX}. - Remove scripts/move_nessus. It was used to migrate configuration data to a new location. PR: ports/183221 Approved by: "Schweigert, Udo" <Udo.Schweigert@siemens.com> (maintainer)
This commit is contained in:
parent
7e87f06747
commit
53e29e83dc
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=333529
security/nessus
@ -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}
|
||||
LIB_DEPENDS= libnasl.so:${PORTSDIR}/security/nessus-libnasl
|
||||
|
||||
OPTIONS_DEFINE= GTK2
|
||||
OPTIONS_DEFAULT=GTK2
|
||||
|
||||
GTK2_CONFIGURE_ENABLE= gtk
|
||||
GTK2_USES= pkgconfig
|
||||
GTK2_USE= GNOME=gtk20
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
MAKE_JOBS_UNSAFE= yes
|
||||
SUB_FILES= nessusd.conf
|
||||
USE_RC_SUBR= nessusd
|
||||
WANT_GNOME= yes
|
||||
.if defined(WITHOUT_NESSUS_GTK) || defined(WITHOUT_GTK)
|
||||
WITHOUT_GNOME= yes
|
||||
.endif
|
||||
|
||||
NO_STAGE= yes
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${HAVE_GNOME:Mgtk20}!=""
|
||||
USE_GNOME+= gtk20
|
||||
PKGNAMESUFFIX+= -gtk2
|
||||
.elif ${HAVE_GNOME:Mgtk12}!=""
|
||||
USE_GNOME+= gtk12
|
||||
PKGNAMESUFFIX+= -gtk
|
||||
.else
|
||||
CONFIGURE_ARGS+=--disable-gtk
|
||||
.endif
|
||||
|
||||
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
|
||||
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}
|
||||
${INSTALL_DATA} ${WRKDIR}/nessusd.conf \
|
||||
${STAGEDIR}${ETCDIR}/nessusd.conf.dist
|
||||
${INSTALL_DATA} ${FILESDIR}/nessusd.rules \
|
||||
${STAGEDIR}${ETCDIR}/nessusd.rules.dist
|
||||
|
||||
cert:
|
||||
@${ECHO} ""
|
||||
@${ECHO} "**************************************************************************"
|
||||
@${ECHO} "The new certificate will be saved into ${PREFIX}/var/CA/serverkey.pem"
|
||||
@${ECHO} "**************************************************************************"
|
||||
@${ECHO} ""
|
||||
${PREFIX}/sbin/nessus-mkcert
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
.include <bsd.port.mk>
|
||||
|
@ -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
|
@ -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:"
|
@ -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
|
||||
**************************************************************************
|
||||
|
@ -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
|
||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user