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

Import Debian patch 3.2.3-1

parents cc4c4f57 48bf45da
This diff is collapsed.
# OpenVAS
# $Id$
# Description: Top-level cmake control for the Scanner.
#
# Authors:
# Matthew Mundell <matthew.mundell@greenbone.net>
# Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>
#
# Copyright:
# Copyright (C) 2011 Greenbone Networks GmbH
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2,
# or, at your option, any later version as published by the Free
# Software Foundation
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
message ("-- Configuring the Scanner...")
project (openvas-scanner C)
cmake_minimum_required (VERSION 2.6)
if (POLICY CMP0005)
cmake_policy (SET CMP0005 OLD)
endif (POLICY CMP0005)
include (FindPkgConfig)
if (NOT CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE Debug)
endif (NOT CMAKE_BUILD_TYPE)
## Retrieve svn revision (at configure time)
# Not using Subversion_WC_INFO, as it would have to connect to the repo
find_program (SVN_EXECUTABLE svn DOC "subversion command line client")
macro (Subversion_GET_REVISION dir variable)
execute_process (COMMAND ${SVN_EXECUTABLE} info ${CMAKE_SOURCE_DIR}/${dir}
OUTPUT_VARIABLE ${variable}
OUTPUT_STRIP_TRAILING_WHITESPACE)
string (REGEX REPLACE "^(.*\n)?Revision: ([^\n]+).*"
"\\2" ${variable} "${${variable}}")
endmacro (Subversion_GET_REVISION)
if (NOT CMAKE_BUILD_TYPE MATCHES "Release")
if (EXISTS ".svn/")
if (SVN_EXECUTABLE)
Subversion_GET_REVISION(. ProjectRevision)
set (SVN_REVISION ".SVN.r${ProjectRevision}")
else (SVN_EXECUTABLE)
set (SVN_REVISION ".SVN")
endif (SVN_EXECUTABLE)
endif (EXISTS ".svn/")
endif (NOT CMAKE_BUILD_TYPE MATCHES "Release")
# TODO: Check pkg-config (maybe with code like in gsa/CMakeLists.txt).
## CPack configuration
set (CPACK_CMAKE_GENERATOR "Unix Makefiles")
set (CPACK_GENERATOR "TGZ")
set (CPACK_INSTALL_CMAKE_PROJECTS ".;openvas-scanner;ALL;/")
set (CPACK_MODULE_PATH "")
set (CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING")
set (CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README")
set (CPACK_RESOURCE_FILE_WELCOME "${CMAKE_SOURCE_DIR}/README")
set (CPACK_SOURCE_GENERATOR "TGZ")
set (CPACK_SOURCE_TOPLEVEL_TAG "")
set (CPACK_SYSTEM_NAME "")
set (CPACK_TOPLEVEL_TAG "")
set (CPACK_PACKAGE_VERSION_MAJOR "3")
set (CPACK_PACKAGE_VERSION_MINOR "2")
set (CPACK_PACKAGE_VERSION_PATCH "3${SVN_REVISION}")
set (CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
set (CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-${CPACK_PACKAGE_VERSION}")
set (CPACK_SOURCE_PACKAGE_FILE_NAME "${PROJECT_NAME}-${CPACK_PACKAGE_VERSION}")
set (CPACK_PACKAGE_VENDOR "The OpenVAS Project")
set (CPACK_SOURCE_IGNORE_FILES
"/.svn/"
"/_CPack_Packages/"
"/CMakeFiles/"
"cmake$"
"swp$"
"Cache.txt$"
".tar.gz"
"install_manifest.txt"
"Makefile"
"/doc/generated/"
"log.conf$"
"Doxyfile$"
"Doxyfile_full$"
"VERSION$"
"tools/openvas-adduser$"
"tools/openvas-mkcert$"
"tools/openvas-mkcert-client$"
"tools/openvas-rmuser$"
"tools/openvas-nvt-sync$"
)
include (CPack)
## Variables
if (SYSCONF_INSTALL_DIR)
set (SYSCONFDIR "${SYSCONF_INSTALL_DIR}")
endif (SYSCONF_INSTALL_DIR)
if (NOT SYSCONFDIR)
set (SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc")
endif (NOT SYSCONFDIR)
if (NOT EXEC_PREFIX)
set (EXEC_PREFIX "${CMAKE_INSTALL_PREFIX}")
endif (NOT EXEC_PREFIX)
if (NOT BINDIR)
set (BINDIR "${EXEC_PREFIX}/bin")
endif (NOT BINDIR)
if (NOT SBINDIR)
set (SBINDIR "${EXEC_PREFIX}/sbin")
endif (NOT SBINDIR)
if (NOT LIBDIR)
set (LIBDIR "${EXEC_PREFIX}/lib")
endif (NOT LIBDIR)
if (NOT LOCALSTATEDIR)
set (LOCALSTATEDIR "${CMAKE_INSTALL_PREFIX}/var")
endif (NOT LOCALSTATEDIR)
if (NOT DATADIR)
set (DATADIR "${CMAKE_INSTALL_PREFIX}/share")
endif (NOT DATADIR)
#if (NOT SYSCONFDIR)
# set (SYSCONFDIR "${CMAKE_INSTALL_PREFIX}/etc")
#endif (NOT SYSCONFDIR)
set (OPENVAS_DATA_DIR "${DATADIR}/openvas")
set (OPENVAS_STATE_DIR "${LOCALSTATEDIR}/lib/openvas")
set (OPENVAS_LOG_DIR "${LOCALSTATEDIR}/log/openvas")
set (OPENVAS_CACHE_DIR "${LOCALSTATEDIR}/cache/openvas")
set (OPENVAS_PID_DIR "${LOCALSTATEDIR}/run")
set (OPENVAS_SYSCONF_DIR "${SYSCONFDIR}/openvas")
set (OPENVAS_USERS_DIR "${OPENVAS_STATE_DIR}/users")
set (OPENVAS_NVT_DIR "${OPENVAS_STATE_DIR}/plugins")
set (OPENVAS_LIB_INSTALL_DIR "${LIBDIR}")
set (OPENVAS_SCANNER_CERTIFICATE "${OPENVAS_STATE_DIR}/CA/servercert.pem")
set (OPENVAS_SCANNER_KEY "${OPENVAS_STATE_DIR}/private/CA/serverkey.pem")
set (OPENVAS_CLIENT_CERTIFICATE "${OPENVAS_STATE_DIR}/CA/clientcert.pem")
set (OPENVAS_CLIENT_KEY "${OPENVAS_STATE_DIR}/private/CA/clientkey.pem")
set (OPENVAS_CA_CERTIFICATE "${OPENVAS_STATE_DIR}/CA/cacert.pem")
set (OPENVASSD_MESSAGES "${OPENVAS_LOG_DIR}/openvassd.messages")
set (OPENVASSD_DEBUGMSG "${OPENVAS_LOG_DIR}/openvassd.dump")
set (OPENVASSD_CONF "${OPENVAS_SYSCONF_DIR}/openvassd.conf")
set (OPENVASSD_RULES "${OPENVAS_DATA_DIR}/openvassd.rules")
set (NVT_TIMEOUT "320")
message ("-- Install prefix: ${CMAKE_INSTALL_PREFIX}")
## Dependency checks
##
## TODO Also check for headers where needed.
## Improve for workflow: First collect list of missing libs, then print the
## list and throw an error, otherwise long install-cmake-install-cmake cycles
## might occur.
pkg_check_modules (LIBOPENVAS REQUIRED libopenvas>=4.0.0)
pkg_check_modules (GNUTLS REQUIRED gnutls)
pkg_check_modules (GLIB REQUIRED glib-2.0)
message (STATUS "Looking for pcap...")
find_library (PCAP pcap)
message (STATUS "Looking for pcap... ${PCAP}")
if (NOT PCAP)
message (FATAL_ERROR "The pcap library is required.")
endif (NOT PCAP)
message (STATUS "Looking for gpgme...")
find_library (GPGME gpgme)
message (STATUS "Looking for gpgme... ${GPGME}")
if (NOT GPGME)
message (FATAL_ERROR "The gpgme library is required.")
endif (NOT GPGME)
execute_process (COMMAND pkg-config --cflags glib-2.0
OUTPUT_VARIABLE GLIB_CFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process (COMMAND pkg-config --libs glib-2.0
OUTPUT_VARIABLE GLIB_LDFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process (COMMAND pkg-config --cflags libopenvas
OUTPUT_VARIABLE OPENVAS_CFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process (COMMAND pkg-config --libs libopenvas
OUTPUT_VARIABLE OPENVAS_LDFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE)
## Version
string (REPLACE "
" "" OPENVASSD_VERSION ${CPACK_PACKAGE_VERSION})
# Configure Doxyfile with version number
configure_file (doc/Doxyfile.in doc/Doxyfile @ONLY)
configure_file (doc/Doxyfile_full.in doc/Doxyfile_full @ONLY)
configure_file (doc/openvassd.8.in doc/openvassd.8 @ONLY)
configure_file (VERSION.in VERSION @ONLY)
configure_file (tools/openvas-adduser.in tools/openvas-adduser @ONLY)
configure_file (tools/openvas-rmuser.in tools/openvas-rmuser @ONLY)
configure_file (tools/openvas-mkcert.in tools/openvas-mkcert @ONLY)
configure_file (tools/openvas-mkcert-client.in tools/openvas-mkcert-client @ONLY)
configure_file (tools/openvas-nvt-sync.in tools/openvas-nvt-sync @ONLY)
# TODO: Once Scanner has a proper logging mechanism like Manager.
#configure_file (src/openvassd_log_conf.cmake_in src/openvassd_log.conf)
## Program
set (HARDENING_FLAGS "-Wformat -Wformat-security -O2 -D_FORTIFY_SOURCE=2 -fstack-protector -Wl,-z,relro -Wl,-z,now")
set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${HARDENING_FLAGS} -Wall -Werror -D_BSD_SOURCE -D_ISOC99_SOURCE -D_SVID_SOURCE")
add_subdirectory (src)
## Documentation
add_subdirectory (doc)
## Install
## Install
install (FILES src/openvassd
DESTINATION ${SBINDIR}
PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE
GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
# TODO: Once Scanner has a proper logging mechanism like Manager.
#install (FILES openvassd_log.conf
# DESTINATION ${OPENVAS_SYSCONF_DIR})
install (FILES tools/openvas-adduser tools/openvas-rmuser
tools/openvas-mkcert tools/openvas-mkcert-client
tools/greenbone-nvt-sync tools/openvas-nvt-sync
DESTINATION ${SBINDIR}
PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE
GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
install (FILES doc/openvas-adduser.8 doc/openvas-mkcert.8
doc/openvas-nvt-sync.8 doc/openvas-rmuser.8 doc/openvassd.8
doc/greenbone-nvt-sync.8
DESTINATION ${DATADIR}/man/man8 )
install (DIRECTORY DESTINATION ${OPENVAS_NVT_DIR})
install (DIRECTORY DESTINATION ${OPENVAS_CACHE_DIR})
install (DIRECTORY
DESTINATION ${OPENVAS_SYSCONF_DIR}/gnupg
DIRECTORY_PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE)
## Tests
enable_testing ()
## End
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
INSTALLATION INSTRUCTIONS FOR OPENVAS-SCANNER
=============================================
Please note: The reference system used by most of the developers is Debian
GNU/Linux 'Lenny' 5.0. The build might fail on any other systems. Also
it is necessary to install dependent development packages.
Compiling openvas-scanner
-------------------------
Prerequisites:
* cmake
* glib-2.0
* gnutls
* openvas-libraries (4.0.0 or later)
* pkg-config
Prerequisites for building documentation:
* Doxygen
* xmltoman (optional, for building man page)
* sqlfairy (optional, for producing database diagram)
If you have installed required libraries to a non-standard location, remember to
set the PKG_CONFIG_PATH environment variable to the location of you pkg-config
files before configuring:
$ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/your/location/lib/pkgconfig
Then configure the build with
$ cmake -DCMAKE_INSTALL_PREFIX=/path/to/your/installation .
or (if you want to use the default installation path /usr/local)
$ cmake .
This only needs to be done once. Note: It is assumed that the other
OpenVAS components are installed to the same path. If not, you need to set
some paths separately, see below for details.
Thereafter, the following commands are useful.
$ make # build the scanner
$ make doc # build the documentation
$ make doc-full # build more developer-oriented documentation
$ make install # install the build
$ make rebuild_cache # rebuild the make system cache
$ make install
Please note that you may have to execute this command as root, especially if you
have specified a prefix for which your user does not have full permissions.
Setting up openvas-scanner
--------------------------
Setting up an openvas-scanner requires the following steps:
1) The scanner service communicate through an SSL connection.
In order to establish this connection, the scanner needs to have
an SSL certificate it can present to the client to prove its identity. You
can interactively create this certificate by using the following command:
$ openvas-mkcert
This command will guide you through the certificate creation and place the
certificates in the correct locations on your system.
2) In order to run vulnerability scans, you will need a collection of Network
Vulnerability Tests (NVTs) that can be run by openvas-scanner. Initially,
your NVT collection will be empty. It is recommended that you synchronize
with an NVT feed service before starting openvas-scanner for the first time.
Your installation is preconfigured to synchronize with the OpenVAS NVT Feed.
Simply execute the following command to receive thousands of NVTs from this
feed service:
$ openvas-nvt-sync
Please note that you will need at least one of the following tools for a
successful synchronization:
* rsync
* wget
* curl
NVT feeds are usually updated a few times per week. Be sure to update your
NVT collection regularly to detect the latest threats.
Please visit the OpenVAS website for more information on available NVT feeds
and instructions for integrating feeds into your scanner installation.
3) You can launch openvas-scanner using the following command:
$ openvassd
Be aware that the first launch of openvas-scanner after the initial feed
synchronization or after large feed updates will take longer than usual since
the internal scanner cache has to be updated. Subsequent launches will be
much quicker.
Please note that although you can start openvassd as a user without elevated
privileges, it is recommended that you start openvassd as root since a number
of Network Vulnerability Tests (NVTs) require root privileges to perform
certain operations like packet forgery. If you run openvassd as a user
without permission to perform these operations, your scan results are very
likely to be incomplete.
4) Once the scanner has started, openvas-manager can act as a client and control
the scanner. The actual user interfaces (for example GSA, GSD or CLI-OMP)
will only interact with the manager, not the scanner.
It is still possible to use the latest version of the old OpenVAS-Client as
direct client application for the scanner but this will circumvent the whole
vulnerability management storage and processes.
5) [conditional]: If you do plan to use OpenVAS-Client as direct client and do
not plan to use OpenVAS Manager, then you need to create at least one user
for the openvas-scanner to be able to login. This can be done via the command:
$ openvas-adduser
The command will guide you through the user creation and allow you to specify
a name and authentication method for the user and to define rules restricting
the usage of the scanner by this user.
If you plan to use the OpenVAS Manager, you will be guided through
creation of user accounts by the INSTALL file of OpenVAS Manager.
If you encounter problems, the files /var/log/openvas/openvassd.messages and
/var/log/openvas/openvassd.dump may contain useful information. (The exact
location of these files may differ depending on your distribution and
installation method.) Please have these files ready when contacting the OpenVAS
developers through the OpenVAS mailing list or the online chat or submitting bug
reports at http://bugs.openvas.org/ as they may help to pinpoint the source of
your issue.
.root-dir
ChangeLog
CHANGES
cnvts/find_service/find_service.c
cnvts/find_service/Makefile
cnvts/install_plug
cnvts/make_world
cnvts/openvas_tcp_scanner/Makefile
cnvts/openvas_tcp_scanner/openvas_tcp_scanner.c
cnvts/ssl_ciphers/Makefile
cnvts/ssl_ciphers/ssl_ciphers.c
cnvts/synscan/openvasicmp.h
cnvts/synscan/openvasip.h
cnvts/synscan/openvasraw.h
cnvts/synscan/openvastcp.h
cnvts/synscan/openvasudp.h
cnvts/synscan/Makefile
cnvts/synscan/synscan.c
config.guess
config.sub
configure
configure.in
COPYING
doc/Doxyfile
doc/Doxyfile_full
doc/HTTP_authentication.txt
doc/kb_entries.txt
doc/nbe_file_format.txt
doc/nsr_file_format.txt
doc/openvas-adduser.8
doc/openvassd.8.in
doc/openvas-mkcert.8
doc/openvas-mkcert-client.1
doc/openvas-mkrand.1
doc/openvas-nvt-sync.8
doc/openvas-rmuser.8
doc/session_saving.txt
doc/TODO.txt
include/config.h
include/config.h.in
include/corevers.h
include/corevers.h.in
include/includes.h
include/threadcompat.h
install-sh
ltmain.sh
Makefile
MANIFEST
openvas-services
openvassd/attack.c
openvassd/attack.h
openvassd/auth.c
openvassd/auth.h
openvassd/comm.c
openvassd/comm.h
openvassd/hosts.c
openvassd/hosts.h
openvassd/locks.c
openvassd/locks.h
openvassd/log.c
openvassd/log.h
openvassd/Makefile
openvassd/nasl_plugins.c
openvassd/nes_plugins.c
openvassd/ntp_11.c
openvassd/ntp_11.h
openvassd/openvassd.c
openvassd/otp_1_0.c
openvassd/otp_1_0.h
openvassd/oval_plugins.c
openvassd/parser.c
openvassd/parser.h
openvassd/piic.c
openvassd/piic.h
openvassd/pluginlaunch.c
openvassd/pluginlaunch.h
openvassd/pluginload.c
openvassd/pluginload.h
openvassd/pluginscheduler.c
openvassd/pluginscheduler.h
openvassd/plugs_hash.c
openvassd/plugs_hash.h
openvassd/plugs_req.c
openvassd/plugs_req.h
openvassd/preferences.c
openvassd/preferences.h
openvassd/processes.c
openvassd/processes.h
openvassd/rules.c
openvassd/rules.h
openvassd/save_kb.c
openvassd/save_kb.h
openvassd/save_tests.c
openvassd/save_tests.h
openvassd/shared_socket.c
openvassd/shared_socket.h
openvassd/sighand.c
openvassd/sighand.h
openvassd/users.c
openvassd/users.h
openvassd/utils.c
openvassd/utils.h
openvas.tmpl.in
po/Makefile
po/openvas-scripts-de.po
po/README
README
ssl/Makefile
ssl/openvas-mkrand.c
tools/greenbone-nvt-sync
tools/openvas-adduser.in
tools/openvas-mkcert.in
tools/openvas-mkcert-client.in
tools/openvas-nvt-sync.in
tools/openvas-rmuser.in
tools/README
VERSION
# OpenVAS
# $Id: Makefile 7028 2010-03-22 02:25:03Z jfs $
# Description: the OpenVAS Makefile.
#
# Authors: - Renaud Deraison <deraison@nessus.org> (Original pre-fork develoment)
# - Tim Brown <mailto:timb@openvas.org> (Initial fork)
# - Laban Mwangi <mailto:labanm@openvas.org> (Renaming work)
# - Tarik El-Yassem <mailto:tarik@openvas.org> (Headers section)
#
# Copyright:
# Portions Copyright (C) 2006 Software in the Public Interest, Inc.
# Based on work Copyright (C) 1998 - 2006 Tenable Network Security, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2,
# as published by the Free Software Foundation
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
include openvas.tmpl
ALLDEPS = openvas.tmpl
all: $(ALLDEPS) scanner sslstuff man mknvts
openvas.tmpl: openvas.tmpl.in configure VERSION
$(SHELL) configure $(CONFIGURE_ARGS)
touch $@
install: all install-bin install-man install-nvts
@echo
@echo ' --------------------------------------------------------------'
@echo ' openvas-scanner has been sucessfully installed. '
@echo " Make sure that $(bindir) and $(sbindir) are in your PATH before"
@echo " you continue."
@echo " openvassd has been installed into $(sbindir)"
@echo ' --------------------------------------------------------------'
@echo
install-bin:
@test -d $(DESTDIR)${bindir} || $(INSTALL_DIR) -m 755 $(DESTDIR)${bindir}
@test -d $(DESTDIR)${sbindir} || $(INSTALL_DIR) -m 755 $(DESTDIR)${sbindir}
@test -d $(DESTDIR)${sysconfdir} || $(INSTALL_DIR) -m 755 $(DESTDIR)${sysconfdir}
@test -d $(DESTDIR)${sysconfdir}/openvas || $(INSTALL_DIR) -m 755 $(DESTDIR)${sysconfdir}/openvas
@test -d $(DESTDIR)${sysconfdir}/openvas/gnupg || $(INSTALL_DIR) -m 700 $(DESTDIR)${sysconfdir}/openvas/gnupg
@test -d $(DESTDIR)${localstatedir} || $(INSTALL_DIR) -m 755 $(DESTDIR)${localstatedir}
@test -d $(DESTDIR)${OPENVASSD_STATEDIR} || $(INSTALL_DIR) -m 755 $(DESTDIR)${OPENVASSD_STATEDIR}
@test -d $(DESTDIR)${OPENVASSD_STATEDIR}/users || $(INSTALL_DIR) -m 755 $(DESTDIR)${OPENVASSD_STATEDIR}/users
@test -d $(DESTDIR)${OPENVASSD_STATEDIR}/logs || $(INSTALL_DIR) -m 755 $(DESTDIR)${OPENVASSD_STATEDIR}/logs
@test -d $(DESTDIR)${OPENVASSD_STATEDIR}/tmp || $(INSTALL_DIR) -m 755 $(DESTDIR)${OPENVASSD_STATEDIR}/tmp
@test -d $(DESTDIR)${OPENVASSD_STATEDIR}/jobs || $(INSTALL_DIR) -m 755 $(DESTDIR)${OPENVASSD_STATEDIR}/jobs
@test -d $(DESTDIR)${OPENVASSD_STATEDIR}/CA || $(INSTALL_DIR) -m 755 $(DESTDIR)${OPENVASSD_STATEDIR}/CA
@test -d $(DESTDIR)${OPENVASSD_STATEDIR}/private || $(INSTALL_DIR) -m 700 $(DESTDIR)${OPENVASSD_STATEDIR}/private
@test -d $(DESTDIR)${OPENVASSD_STATEDIR}/private/CA || $(INSTALL_DIR) -m 700 $(DESTDIR)${OPENVASSD_STATEDIR}/private/CA
@test -d $(DESTDIR)${OPENVASSD_LOGDIR} || $(INSTALL_DIR) -m 755 $(DESTDIR)${OPENVASSD_LOGDIR}
@test -d $(DESTDIR)${localstatedir}/run || $(INSTALL_DIR) -m 755 $(DESTDIR)${localstatedir}/run
@test -d $(DESTDIR)${includedir} || $(INSTALL_DIR) -m 755 $(DESTDIR)${includedir}
@test -d $(DESTDIR)${includedir}/openvas || $(INSTALL_DIR) -m 755 $(DESTDIR)${includedir}/openvas
@test -d $(DESTDIR)${OPENVASSD_CACHE} || $(INSTALL_DIR) -m 755 $(DESTDIR)${OPENVASSD_CACHE}
$(INSTALL) -m 755 tools/openvas-nvt-sync $(DESTDIR)${sbindir}
$(INSTALL) -m 755 tools/greenbone-nvt-sync $(DESTDIR)${sbindir}
$(INSTALL) -m 755 tools/openvas-mkcert-client $(DESTDIR)${bindir}/openvas-mkcert-client
$(INSTALL) -m 755 ssl/openvas-mkrand $(DESTDIR)${bindir}/openvas-mkrand
$(INSTALL) -m $(SERVERMODE) openvassd/openvassd $(DESTDIR)${sbindir}/openvassd
$(INSTALL) -m 755 tools/openvas-adduser $(DESTDIR)${sbindir}/openvas-adduser
$(INSTALL) -m 755 tools/openvas-rmuser $(DESTDIR)${sbindir}/openvas-rmuser
$(INSTALL) -m 755 tools/openvas-mkcert $(DESTDIR)${sbindir}/openvas-mkcert
$(INSTALL) -c -m 0444 openvas-services $(DESTDIR)${OPENVASSD_STATEDIR}/openvas-services
install-man:
@echo installing man pages ...
@test -d $(DESTDIR)${mandir} || $(INSTALL_DIR) -m 755 $(DESTDIR)${mandir}
@test -d $(DESTDIR)${mandir}/man1 || $(INSTALL_DIR) -m 755 $(DESTDIR)${mandir}/man1
@test -d $(DESTDIR)${mandir}/man8 || $(INSTALL_DIR) -m 755 $(DESTDIR)${mandir}/man8
$(INSTALL) -c -m 0444 doc/openvas-mkrand.1 $(DESTDIR)${mandir}/man1/openvas-mkrand.1
$(INSTALL) -c -m 0444 doc/openvassd.8 $(DESTDIR)${mandir}/man8/openvassd.8
$(INSTALL) -c -m 0444 doc/openvas-nvt-sync.8 $(DESTDIR)${mandir}/man8/openvas-nvt-sync.8
$(INSTALL) -c -m 0444 doc/openvas-adduser.8 $(DESTDIR)${mandir}/man8/openvas-adduser.8
$(INSTALL) -c -m 0444 doc/openvas-rmuser.8 $(DESTDIR)${mandir}/man8/openvas-rmuser.8
$(INSTALL) -c -m 0444 doc/openvas-mkcert.8 $(DESTDIR)${mandir}/man8/openvas-mkcert.8
$(INSTALL) -c -m 0444 doc/openvas-mkcert-client.1 $(DESTDIR)${mandir}/man1/openvas-mkcert-client.1
install-nvts:
test -d $(DESTDIR)${libdir}/openvas || $(INSTALL_DIR) -m 755 \
$(DESTDIR)${libdir}/openvas
test -d $(DESTDIR)${libdir}/openvas/plugins || $(INSTALL_DIR) -m 755 \
$(DESTDIR)${libdir}/openvas/plugins
for plugins in bin/*.nes; do \
$(INSTALL) -m 555 $$plugins \
$(DESTDIR)${libdir}/openvas/plugins; \
done
scanner :
cd openvassd && $(MAKE)
sslstuff :
cd ssl && $(MAKE)
mknvts:
cd cnvts && ./make_world
man : $(MAN_OPENVASSD_8)
$(MAN_OPENVASSD_8) : $(MAN_OPENVASSD_8).in
@sed -e 's?@OPENVASSD_CONFDIR@?${OPENVASSD_CONFDIR}?g;s?@OPENVASSD_DATADIR@?${OPENVASSD_DATADIR}?g;s?@OPENVASSD_PLUGINS@?${OPENVASSD_PLUGINS}?g;' $(MAN_OPENVASSD_8).in >$(MAN_OPENVASSD_8)
clean:
cd openvassd && $(MAKE) clean
cd ssl && $(MAKE) clean
cd cnvts && ./make_world clean
-rm -f bin/*.nes
distclean: clean
[ -z "${rootdir}" ] || rm -f ${rootdir}/include/config.h ${rootdir}/include/corevers.h
rm -f openvas.tmpl doc/openvas.1.cat doc/openvassd.8.cat
[ -z "${make_bindir}" ] || rm -f $(make_bindir)/openvas*
rm -f config.cache config.status config.log
rm -f tools/openvas-nvt-sync
rm -f tools/openvas-adduser
rm -f tools/openvas-rmuser
rm -f tools/openvas-mkcert
rm -f tools/openvas-mkcert-client
[ -z "${MAN_OPENVASSD_8}" ] || rm -f ${MAN_OPENVASSD_8}
dist:
version="`cat VERSION`"; \
rm -rf openvas-scanner-$${version}* ; \
mkdir openvas-scanner-$${version} ; \
tar cf openvas-scanner-$${version}/x.tar `cat MANIFEST`; \
( cd openvas-scanner-$${version} ; tar xf x.tar ; rm -f x.tar ) ; \
tar cf openvas-scanner-$${version}.tar openvas-scanner-$${version} ; \
gzip -9 openvas-scanner-$${version}.tar
distcheck:
find . -type f | sed -e 's/^.\///' -e '/~$$/d' -e '/CVS/d' \
-e '/\.o$$/d' -e '/^openvas.tmpl$$/d' \
-e '/^openvassd\/OBJ\/openvassd$$/d' \
-e '/^bin\/openvassd$$/d' \
-e '/^config\.cache$$/d' \
-e '/^config\.log$$/d' \
-e '/^config\.status$$/d' \
-e '/^include\/config\.h$$/d' \
| sort | diff -cb - MANIFEST
# Generates basic code documentation (placed in doc/generated)
doc :
doxygen doc/Doxyfile