aboutsummaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorVolker Stolz <vs@FreeBSD.org>2004-08-13 14:15:25 +0000
committerVolker Stolz <vs@FreeBSD.org>2004-08-13 14:15:25 +0000
commit00af95661f5474d68cfc0312ebc0bc7aa73e7534 (patch)
tree67d21c25edef5e2bd5b36930cf65a54085f61d56 /security
parent438cd9b0fc6e4a2a9ee4005b97cc76611a804f94 (diff)
downloadports-00af95661f5474d68cfc0312ebc0bc7aa73e7534.tar.gz
ports-00af95661f5474d68cfc0312ebc0bc7aa73e7534.zip
Notes
Diffstat (limited to 'security')
-rw-r--r--security/nessus-devel/Makefile26
-rw-r--r--security/nessus-devel/files/nessusd.sh53
-rw-r--r--security/nessus-devel/pkg-message10
-rw-r--r--security/nessus-devel/pkg-plist2
-rw-r--r--security/nessus-devel/scripts/move_nessus31
-rw-r--r--security/nessus-libnasl-devel/Makefile2
-rw-r--r--security/nessus-libraries-devel/Makefile2
-rw-r--r--security/nessus-plugins-devel/Makefile2
8 files changed, 88 insertions, 40 deletions
diff --git a/security/nessus-devel/Makefile b/security/nessus-devel/Makefile
index 281ca6bb3f28..ccea38d3af10 100644
--- a/security/nessus-devel/Makefile
+++ b/security/nessus-devel/Makefile
@@ -2,9 +2,13 @@
#
# $FreeBSD$
#
+# If you want to only have the command-line client even if gtk is already
+# installed define:
+# WITHOUT_NESSUS_GTK
PORTNAME= nessus-devel
PORTVERSION= 2.1.1
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= ftp://ftp.nessus.org/pub/nessus/nessus-${PORTVERSION}/src/ \
ftp://ftp.gwdg.de/pub/linux/misc/nessus/nessus-${PORTVERSION}/src/ \
@@ -17,17 +21,24 @@ DISTNAME= nessus-core-${PORTVERSION}
MAINTAINER= udo.schweigert@siemens.com
COMMENT= A security scanner: looks for vulnerabilities in a given network
+CONFLICTS= nessus-[0-9]* nessus-gtk-[0-9]* nessus-gtk2-[0-9]*
LIB_DEPENDS= nasl.3:${PORTSDIR}/security/nessus-libnasl-devel
DIST_SUBDIR= nessus
WRKSRC= ${WRKDIR}/nessus-core
USE_LIBTOOL_VER=13
-WANT_GNOME= yes
USE_REINPLACE= YES
+USE_RC_SUBR= YES
+.if !defined(WITHOUT_NESSUS_GTK)
+WANT_GNOME= yes
+.endif
.include <bsd.port.pre.mk>
+.if defined(WITHOUT_NESSUS_GTK)
+CONFIGURE_ARGS+=--disable-gtk
+.else
.if ${HAVE_GNOME:Mgtk20}!=""
USE_GNOME+= gtk20
PKGNAMESUFFIX= -gtk2
@@ -37,16 +48,18 @@ PKGNAMESUFFIX= -gtk
.else
CONFIGURE_ARGS+=--disable-gtk
.endif
+.endif
MAN1= nessus.1 nessus-mkrand.1 nessus-mkcert-client.1
MAN8= nessusd.8 nessus-adduser.8 nessus-mkcert.8 nessus-rmuser.8
-post-extract:
- @${CP} ${FILESDIR}/nessusd.sh ${WRKSRC}/nessusd.sh
- @${REINPLACE_CMD} -E -e 's|%%PREFIX%%|${PREFIX}|g' ${BUILD_WRKSRC}/nessusd.sh
+RC_SCRIPTS_SUB= PREFIX=${PREFIX} \
+ RC_SUBR=${RC_SUBR}
+
post-install:
- ${INSTALL_SCRIPT} ${BUILD_WRKSRC}/nessusd.sh \
- ${LOCALBASE}/etc/rc.d/nessusd.sh.sample
+ @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
+ ${FILESDIR}/nessusd.sh > ${LOCALBASE}/etc/rc.d/nessusd.sh
+ @${CHMOD} +x ${LOCALBASE}/etc/rc.d/nessusd.sh
@${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/move_nessus
.if ! exists(${PREFIX}/var/CA/serverkey.pem)
.if ! defined(BATCH)
@@ -55,5 +68,6 @@ post-install:
${PREFIX}/sbin/nessus-mkcert -q
.endif
.endif
+ @${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
diff --git a/security/nessus-devel/files/nessusd.sh b/security/nessus-devel/files/nessusd.sh
index 6fe58eadd1f0..b72c4f15e78c 100644
--- a/security/nessus-devel/files/nessusd.sh
+++ b/security/nessus-devel/files/nessusd.sh
@@ -1,28 +1,37 @@
-#! /bin/sh
-#
+#!/bin/sh
+
+# Start or stop nessusd
# $FreeBSD$
+
+# PROVIDE: nessusd
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+# KEYWORD: FreeBSD shutdown
#
+# NOTE for FreeBSD 5.0+:
+# If you want this script to start with the base rc scripts
+# move nessusd.sh to /etc/rc.d/nessusd
-umask 022
-arg=${1:-start}
+prefix=%%PREFIX%%
+
+# Define these nessusd_* variables in one of these files:
+# /etc/rc.conf
+# /etc/rc.conf.local
+# /etc/rc.conf.d/nessusd
+#
+# DO NOT CHANGE THESE DEFAULT VALUES HERE
+#
+[ -z "$nessusd_enable" ] && nessusd_enable="NO" # Disable nessusd
+#nessusd_program="${prefix}/sbin/nessusd" # Location of nessusd
+nessusd_flags="-D" # Flags to nessusd program
-nessusd_bin=%%PREFIX%%/sbin/nessusd
-nessus_arg="-D"
-kill_arg=nessusd
+. %%RC_SUBR%%
-echo -n " nessusd"
+name="nessusd"
+rcvar=`set_rcvar`
+command="${prefix}/sbin/nessusd"
+pidfile="/usr/local/var/nessus/nessusd.pid"
+required_files="${prefix}/etc/nessus/nessusd.conf"
-case $arg in
-start)
- test -x $nessusd_bin || exit 1
- $nessusd_bin $nessus_arg
- ;;
-stop)
- killall $kill_arg > /dev/null 2>&1
- ;;
-restart)
- killall $kill_arg > /dev/null 2>&1
- test -x $nessusd_bin || exit 1
- $nessusd_bin $nessus_arg
- ;;
-esac
+load_rc_config $name
+run_rc_command "$1"
diff --git a/security/nessus-devel/pkg-message b/security/nessus-devel/pkg-message
new file mode 100644
index 000000000000..183d6fe4ab71
--- /dev/null
+++ b/security/nessus-devel/pkg-message
@@ -0,0 +1,10 @@
+ ***********************************
+ * !!!!!!!!!!! WARNING !!!!!!!!!!! *
+ ***********************************
+Since 2.1.1_1, to run nessusd server from startup, add nessusd_enable="YES"
+in your /etc/rc.conf.
+
+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.
diff --git a/security/nessus-devel/pkg-plist b/security/nessus-devel/pkg-plist
index 810874f76d06..6c7c66e33bc1 100644
--- a/security/nessus-devel/pkg-plist
+++ b/security/nessus-devel/pkg-plist
@@ -1,4 +1,4 @@
-etc/rc.d/nessusd.sh.sample
+etc/rc.d/nessusd.sh
bin/nessus
bin/nessus-mkcert-client
bin/nessus-mkrand
diff --git a/security/nessus-devel/scripts/move_nessus b/security/nessus-devel/scripts/move_nessus
index 89af532bbd09..32b3b8b872d6 100644
--- a/security/nessus-devel/scripts/move_nessus
+++ b/security/nessus-devel/scripts/move_nessus
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $FreeBSD: /tmp/pcvs/ports/security/nessus-devel/scripts/Attic/move_nessus,v 1.1 2004-02-25 21:18:25 obraun Exp $
+# $FreeBSD: /tmp/pcvs/ports/security/nessus-devel/scripts/Attic/move_nessus,v 1.2 2004-08-13 14:15:25 vs Exp $
#
# set -x
@@ -25,16 +25,21 @@ if [ -f $PREFIX/etc/nessus/nessusd.conf ]; then
$PREFIX/etc/nessus/nessusd.conf.bak > $PREFIX/etc/nessus/nessusd.conf
fi
if [ -d $PREFIX/etc/nessus/var/nessus/users ]; 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
- printf "\n"
+ 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
@@ -49,3 +54,7 @@ if [ ! -d $PREFIX/com/CA ]; then
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
diff --git a/security/nessus-libnasl-devel/Makefile b/security/nessus-libnasl-devel/Makefile
index a4d57ce034dd..e16f8ccd0f2f 100644
--- a/security/nessus-libnasl-devel/Makefile
+++ b/security/nessus-libnasl-devel/Makefile
@@ -17,6 +17,8 @@ DISTNAME= libnasl-${PORTVERSION}
MAINTAINER= udo.schweigert@siemens.com
COMMENT= Nessus Attack Scripting Language
+CONFLICTS= nessus-libnasl-[0-9]*
+
LIB_DEPENDS= nessus.3:${PORTSDIR}/security/nessus-libraries-devel
DIST_SUBDIR= nessus
diff --git a/security/nessus-libraries-devel/Makefile b/security/nessus-libraries-devel/Makefile
index 82aeb70bad7d..d8b69631e85f 100644
--- a/security/nessus-libraries-devel/Makefile
+++ b/security/nessus-libraries-devel/Makefile
@@ -20,6 +20,8 @@ DISTNAME= nessus-libraries-${PORTVERSION}
MAINTAINER= udo.schweigert@siemens.com
COMMENT= Libraries for Nessus, the security scanner
+CONFLICTS= nessus-libraries-[0-9]*
+
DIST_SUBDIR= nessus
WRKSRC= ${WRKDIR}/nessus-libraries
diff --git a/security/nessus-plugins-devel/Makefile b/security/nessus-plugins-devel/Makefile
index 84cc63983916..4f3a8d9d804f 100644
--- a/security/nessus-plugins-devel/Makefile
+++ b/security/nessus-plugins-devel/Makefile
@@ -17,6 +17,8 @@ DISTNAME= nessus-plugins-${PORTVERSION}
MAINTAINER= udo.schweigert@siemens.com
COMMENT= Plugins for Nessus, the security scanner
+CONFLICTS= nessus-plugins-[0-9]*
+
BUILD_DEPENDS= ${LOCALBASE}/include/nessus/nessus-devel.h:${PORTSDIR}/security/nessus-devel
RUN_DEPENDS= ${LOCALBASE}/include/nessus/nessus-devel.h:${PORTSDIR}/security/nessus-devel \
nmap:${PORTSDIR}/security/nmap \