Commit 92832aea authored by Javier Fernandez-Sanguino Pen~a's avatar Javier Fernandez-Sanguino Pen~a Committed by Lock Lin

Import Debian patch 3.2.3-4

parent 4da3b7b4
openvas-scanner (3.2.3-4) experimental; urgency=low
* debian/control: Adjust description
* debian/openvas-scanner.postrm:
- Change if to case statement.
- Move all purge code to a function
- Only remove configuration files if they still exist
- Echoed lines are sent to stderr to prevent debconf from breaking
the script
- SubDirectories created within purged directories are now also removed
* debian/openvas-scanner.{prerm,preinst,postrm,config}: Make it possible
to debug the scripts by setting DEBIAN_SCRIPT_DEBUG
-- Javier Fernandez-Sanguino Pen~a <jfs@debian.org> Sat, 14 May 2011 00:30:17 +0200
openvas-scanner (3.2.3-3) experimental; urgency=low
* debian/rules: set CMAKE_INSTALL_PREFIX to an empty variable and define
......
......@@ -15,15 +15,15 @@ Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, openssl
Replaces: openvas-server, openvas-plugins
Conflicts: openvas-server, openvas-plugins, openvas-plugins-base, openvas-plugins-dfsg (<= 1.0.7-6+svn20100320)
Recommends: rsync, nmap
Suggests: openvas-client, snmp, pnscan, netdiag, ike-scan
Recommends: rsync, nmap, openvas-administator
Suggests: openvas-cli, snmp, pnscan, netdiag, ike-scan
Description: remote network security auditor - scanner
The Open Vulnerability Assessment System is a modular security auditing
tool, used for testing remote systems for vulnerabilities that should be
fixed.
tool, used for testing remote systems for security vulnerabilities that should
be fixed.
.
It is made up of two parts: a scan server, and a client. The scanner/daemon,
openvassd, is in charge of the attacks, whereas the client,
OpenVAS-Client, provides an X11/GTK+ user interface.
It is made up of several parts: a scan server, a manager, an adminsitrator and
a client. The scanner/daemon, openvassd, is in charge of the attacks, whereas
the clients, such as openvas-cli or gsad provide a user interface.
.
This package provides the scanner.
#!/bin/sh -e
#!/bin/sh
set -e
test $DEBIAN_SCRIPT_DEBUG && set -v -x
# Only ask debconf questions if no certificate is present
......
......@@ -33,6 +33,7 @@ DAEMON=/usr/sbin/openvassd
PIDFILE=/var/run/openvassd.pid
NAME=openvassd
LABEL="OpenVAS Scanner"
CONFIG=/etc/openvas/openvassd.conf
test -x $DAEMON || exit 0
......@@ -75,9 +76,14 @@ check_certs() {
}
openvas_start() {
if [ ! -r /etc/openvas/openvassd.conf ] ; then
echo -n "ERROR: Cannot read openvas configuration file, are you root?" >&2
if [ ! -e "$CONFIG" ] ; then
echo -n "ERROR: Required configuration file $CONFIG does not exist" >&2;
return 1
else
if [ ! -r "$CONFIG" ] ; then
echo -n "ERROR: Cannot read configuration file $CONFIG, are you root?" >&2
return 1
fi
fi
check_certs
start-stop-daemon --start --pidfile $PIDFILE --exec $DAEMON -- $DAEMONOPTS 2>&1 >/dev/null
......
#!/bin/sh
set -e
test $DEBIAN_SCRIPT_DEBUG && set -v -x
if [ "$1" = "purge" ]; then
purge_package_files() {
# Remove logs
if [ -e /var/log/openvassd.messages ] ; then
echo -n "Removing the OpenVAS Scanner logs"
rm -f /var/log/openvasmd.log* /var/log/openvassd.dump*
echo -n "Removing the OpenVAS Scanner logs" >&2
rm -f /var/log/openvasmd.log* /var/log/openvassd.dump* || true
if [ $? -eq 0 ] ; then
echo "..done"
echo "..done" >&2
else
echo "..ERROR"
echo "..ERROR" >&2
fi
fi
# Remove configuration files
echo -e "Removing the OpenVAS Scanner configuration files"
rm -f /etc/openvas/openvassd.conf /etc/openvas/openvassd.rules
if [ $? -eq 0 ] ; then
echo "..done"
else
echo "..ERROR"
fi
echo -n "Removing the OpenVAS Scanner configuration files" >&2
[ -e /etc/openvas/openvassd.conf ] && rm /etc/openvas/openvassd.conf
[ -e /etc/openvas/openvassd.rules ] && rm /etc/openvas/openvassd.rules
echo "..done" >&2
# Remove certificates
OPENVASPRIV="/var/lib/openvas/private/CA"
......@@ -33,17 +32,27 @@ if [ "$1" = "purge" ]; then
[ -e "$file" ] && rm -f $file
done
# Remove the rest of the directories that we create
# Remove the rest of the directories that the daemon creates
for DIR in /var/lib/openvas/plugins /var/lib/openvas/users \
/usr/lib/openvas/plugins/.desc/
/usr/lib/openvas/plugins/.desc/ /var/cache/openvas/
do
if [ -d $DIR ] ; then
find $DIR -type f -o -type l | xargs rm -f
find $DIR -type f -o -type l | xargs rm -f || true
find $DIR -type d | sort -r | grep -v '^${DIR}$' | xargs rmdir || true
fi
done
update-rc.d openvas-scanner remove >/dev/null
fi
}
case "$1" in
purge|disappear)
purge_package_files
;;
remove|upgrade|failed-upgrade|abort-install|abort-upgrade)
# nothing
;;
esac
#DEBHELPER#
......
#!/bin/sh
set -e
test $DEBIAN_SCRIPT_DEBUG && set -v -x
case "$1" in
......
#!/bin/sh
set -e
test $DEBIAN_SCRIPT_DEBUG && set -v -x
if [ "$1" != "upgrade" ]; then
if [ -x "/etc/init.d/openvas-scanner" ] ; then
......
......@@ -30,7 +30,7 @@ build-stamp: patch-stamp
dh_testdir
# Create a build directory
mkdir BUILD_DIR && tar -c --exclude='debian/*' --exclude='BUILD_DIR/*' --exclude=debian --exclude=BUILD_DIR -f - * | tar -C BUILD_DIR -xf -
cd BUILD_DIR && cmake -DCMAKE_INSTALL_PREFIX= -DSYSCONFDIR=/etc -DEXEC_PREFIX=/usr -DDATADIR=/var/share -DMANDIR=/usr/share/man/man8 -DLIBDIR=/var/lib -DLOCALSTATEDIR=/var -DCPACK_SET_DESTDIR=ON .
cd BUILD_DIR && cmake -DCMAKE_INSTALL_PREFIX= -DSYSCONFDIR=/etc -DEXEC_PREFIX=/usr -DDATADIR=/usr/share -DMANDIR=/usr/share/man/man8 -DLIBDIR=/var/lib -DLOCALSTATEDIR=/var -DCPACK_SET_DESTDIR=ON .
cd BUILD_DIR && $(MAKE)
cd BUILD_DIR && $(MAKE) doc
# For the time being we do not build the documentation with Doxygen since it does not add too much value. If added it
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment