Commit cb4f4627 authored by ChangZhuo Chen's avatar ChangZhuo Chen

Import openvas-libraries_8.0.7.orig.tar.gz

parent bcb7e7a3
This diff is collapsed.
This diff is collapsed.
......@@ -4,7 +4,7 @@ License information about openvas-libraries
The openvas-libraries module reveals a number
of different licenses of the GNU family of licenses.
Th effective license of the modules as a whole
The effective license of the modules as a whole
is the GNU General Public License Version 2 (GNU GPLv2).
Single files, however, are licensed under either
......@@ -15,73 +15,51 @@ module can be used under the respective licenses.
GPLv2: See file COPYING.GPLv2
LGPLv2: See file COPYING.LGPLv2
BSD2: See file COPYING.BSD2
BSD3: See file COPYING.BSD3
The following overview was initially collected 20100726 based
on the header of the respective files and last updated 20110118:
on the header of the respective files and since then updated
as changes were applied:
base/accessrules.[c|h]: GPLv2+
base/array.[c|h]: GPLv2+
base/certificate.[c|h]: GPLv2+
base/CMakeLists.txt: GPLv2+
base/credentials.[c|h]: GPLv2+
base/cvss.[c|h]: GPLv2+
base/drop_privileges.[c|h]: GPLv2+
base/hash_table_util.[c|h]: GPLv2+
base/gpgme_util.[c|h]: GPLv2+
base/nvti.[c|h]: GPLv2+
base/nvticache.[c|h]: GPLv2+
base/openvas_certificate_file.[c|h]: GPLv2+
base/openvas_file.[c|h]: GPLv2+
base/openvas_hosts.[c|h]: GPLv2+
base/openvas_networking.[c|h]: GPLv2+
base/openvas_string.[c|h]: GPLv2+
base/osp.[c|h]: GPLv2+
base/pwpolicy.[c|h]: GPLv2+
base/pidfile.[c|h]: GPLv2+
base/settings.[c|h]: GPLv2+
base/severity_filter.[c|h]: GPLv2+
hg/CMakeLists.txt: GPLv2+
hg/hg_add_hosts.[c|h]: LGPLv2+
hg/hg_debug.c: LGPLv2+
hg/hg_dns_axfr.[c|h]: LGPLv2+
hg/hg_filter.[c|h]: LGPLv2+
hg/hg_subnet.[c|h]: LGPLv2+
hg/hg_utils.[c|h]: LGPLv2+
hg/hosts_gatherer.[c|h]: LGPLv2+
hg/test.c: LGPLv2+
misc/ads_auth.[c|h]: GPLv2+
misc/arglists.[c|h]: LGPLv2+
misc/bpf_share.c: GPLv2
misc/bpf_share.h: LGPLv2+
misc/CMakeLists.txt: GPLv2
misc/comm.h: GPLv2+
misc/ftp_funcs.[c|h]: LGPLv2+
misc/hash_table_file.[c|h]: GPLv2+
misc/ids_send.[c|h]: LGPLv2+
misc/kb.[c|h]: LGPLv2+
misc/ldap_auth.[c|h]: GPLv2+
misc/internal_com.h: GPLv2+
misc/kb.h: GPLv2+
misc/ldap_connect_auth.[c|h]: GPLv2+
misc/network.[c|h]: LGPLv2+
misc/nvt_categories.h: LGPLv2+
misc/openvas_auth.[c|h]: GPLv2+
misc/openvas_logging.[c|h]: GPLv2+
misc/openvas_proctitle.[c|h]: GPLv2+
misc/openvas_server.[c|h]: GPLv2+
misc/openvas_ssh_login.[c|h]: GPLv2+
misc/openvas_uuid.[c|h]: GPLv2+
misc/otp.h: GPLv2+
misc/pcap.c: LGPLv2+
misc/pcap_openvas.h: LGPLv2+
misc/plugutils.[c|h]: LGPLv2+
misc/popen.[c|h]: LGPLv2+
misc/proctitle.[c|h]: GPLv2
misc/rand.[c|h]: LGPLv2+
misc/resolve.[c|h]: LGPLv2+
misc/resource_request.[c|h]: GPLv2
misc/scanners_utils.[c|h]: LGPLv2+
misc/services1.[c|h]: LGPLv2+
misc/services.[c|h]: LGPLv2+
misc/share_fd.c: BSD2
misc/share_fd.h: LGPLv2+
misc/store.[c|h]: LGPLv2+
misc/system.[c|h]: LGPLv2+
misc/system_internal.h: LGPLv2+
misc/prefs.[c|h]: GPLv2+
misc/kb_redis.c: GPLv2+
misc/support.h: GPLv2+
misc/www_funcs.c: GPLv2
misc/www_funcs.h: LGPLv2+
......@@ -96,14 +74,15 @@ nasl/genrand.c: GPLv2+
nasl/hmacmd5.[c|h]: GPLv2+
nasl/iconv.[c|h]: GPLv2+
nasl/lint.c: GPLv2
nasl/lsearch.c: BSD3
nasl/md4.[c|h]: GPLv2+
nasl/md5.[c|h]: Public Domain
nasl/nasl.[c|h]: GPLv2
nasl/nasl_builtin_find_service.c: GPLv2
nasl/nasl_builtin_nmap.c: GPLv2+
nasl/nasl_builtin_openvas_tcp_scanner.c: GPLv2
nasl/nasl_builtin_plugins.h: GPLv2+
nasl/nasl_builtin_synscan.c: GPLv2
nasl/nasl_cert.[c|h]: GPLv2+
nasl/nasl_cmd_exec.[c|h]: GPLv2
nasl/nasl_crypto2.[c|h]: GPLv2
nasl/nasl_crypto.[c|h]: GPLv2
......@@ -114,12 +93,12 @@ nasl/nasl_grammar.y: GPLv2
nasl/nasl_host.[c|h]: GPLv2
nasl/nasl_http.[c|h]: GPLv2
nasl/nasl_init.[c|h]: GPLv2
nasl/nasl_isotime.[c|h]: GPLv2+
nasl/nasl_lex_ctxt.[c|h]: GPLv2
nasl/nasl_misc_funcs.[c|h]: GPLv2
nasl/nasl_packet_forgery.[c|h]: GPLv2
nasl/nasl_packet_forgery_v6.[c|h]: GPLv2
nasl/nasl_raw.h: GPLv2
nasl/nasl_regex.h: GPLv2
nasl/nasl_scanner_glue.[c|h]: GPLv2
nasl/nasl_signature.[c|h]: GPLv2+
nasl/nasl_smb.[c|h]: GPLv2+
......@@ -131,31 +110,30 @@ nasl/nasl_wmi.[c|h]: GPLv2+
nasl/ntlmssp.[c|h]: GPLv2+
nasl/openvas_smb_interface.h: GPLv2+
nasl/openvas_wmi_interface.h: GPLv2+
nasl/preparse.[c|h]: GPLv2
nasl/proto.h: GPLv2+
nasl/regex.c: GPLv2
nasl/smb_crypt2.c: GPLv2+
nasl/smb_crypt.[c|h]: GPLv2+
nasl/smb.h: GPLv2+
nasl/smb_interface_stub.c: GPLv2+
nasl/smb_signing.[c|h]: GPLv2+
nasl/strutils.[c|h]: GPLv2
nasl/strutils.c: GPLv2+
nasl/wmi_interface_stub.c: GPLv2+
nasl/tests/Makefile: GPLv2
nasl/tests/signed.nasl: GPLv2
nasl/tests/test_blowfish.nasl: GPLv2
nasl/tests/test_bn.nasl: GPLv2
nasl/tests/test_dh.nasl: GPLv2
nasl/tests/test_dsa.nasl: GPLv2
nasl/tests/test_hexstr.nasl: GPLv2
nasl/tests/test_md.nasl: GPLv2
nasl/tests/test_privkey.nasl: GPLv2
nasl/tests/test_rsa.nasl: GPLv2
nasl/tests/test_script_signing.sh: GPLv2
nasl/tests/testsuiteinit.nasl: GPLv2
nasl/tests/testsuitesummary.nasl: GPLv2
nasl/tests/Makefile: GPLv2+
nasl/tests/signed.nasl: GPLv2+
nasl/tests/test_blowfish.nasl: GPLv2+
nasl/tests/test_bn.nasl: GPLv2+
nasl/tests/test_dh.nasl: GPLv2+
nasl/tests/test_dsa.nasl: GPLv2+
nasl/tests/test_hexstr.nasl: GPLv2+
nasl/tests/test_isotime.nasl: GPLv2+
nasl/tests/test_md.nasl: GPLv2+
nasl/tests/test_privkey.nasl: GPLv2+
nasl/tests/test_rsa.nasl: GPLv2+
nasl/tests/test_script_signing.sh: GPLv2+
nasl/tests/test_socket.nasl: GPLv2+
nasl/tests/testsuiteinit.nasl: GPLv2+
nasl/tests/testsuitesummary.nasl: GPLv2+
omp/CMakeLists.txt: GPLv2+
omp/omp.[c|h]: GPLv2+
......
BSD 2-Clause License ("Simplified BSD License" or "FreeBSD License"):
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
BSD 3-Clause License ("New BSD License"):
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the University nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
......@@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
......@@ -55,8 +55,8 @@ patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
......@@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions:
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
......@@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
......@@ -225,7 +225,7 @@ impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
......@@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
......@@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
......@@ -303,17 +303,16 @@ the "copyright" line and a pointer to where the full notice is found.
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 Street, Fifth Floor, Boston, MA 02110-1301 USA
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
......@@ -336,5 +335,5 @@ necessary. Here is a sample; alter the names:
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
GNU LIBRARY GENERAL PUBLIC LICENSE
Version 2, June 1991
GNU LIBRARY GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1991 Free Software Foundation, Inc.
675 Mass Ave, Cambridge, MA 02139, USA
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
[This is the first released version of the library GPL. It is
numbered 2 because it goes with version 2 of the ordinary GPL.]
Preamble
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
......@@ -99,7 +99,7 @@ works together with the library.
Note that it is possible for a library to be covered by the ordinary
General Public License rather than by this special one.
GNU LIBRARY GENERAL PUBLIC LICENSE
GNU LIBRARY GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library which
......@@ -411,7 +411,7 @@ decision will be guided by the two goals of preserving the free status
of all derivatives of our free software and of promoting the sharing
and reuse of software generally.
NO WARRANTY
NO WARRANTY
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
......@@ -434,9 +434,9 @@ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
DAMAGES.
END OF TERMS AND CONDITIONS
END OF TERMS AND CONDITIONS
Appendix: How to Apply These Terms to Your New Libraries
How to Apply These Terms to Your New Libraries
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
......@@ -463,8 +463,8 @@ convey the exclusion of warranty; and each file should have at least the
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; if not, write to the Free
Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
......
This diff is collapsed.
......@@ -2,63 +2,99 @@ INSTALLATION INSTRUCTIONS FOR OPENVAS-LIBRARIES
===============================================
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.
GNU/Linux 'Wheezy' 7. The build might fail on any other system. Also it is
necessary to install dependent development packages.
Compiling openvas-libraries
---------------------------
Prerequisites:
* libglib >= 2.12
* libgnutls >= 2.0
* libpcap
* libgpgme >= 1.1.2
* uuid-dev (from e2fsprogs)
Prerequisites for openvas-libraries
-----------------------------------
Apart from these, some tools are required:
See at the end of this section how to easily install these prerequisites on
some supported platforms.
General build environment:
* a C compiler (e.g. gcc)
* bison
* flex
* cmake
* pkg-config
Specific development libraries:
* libglib >= 2.16
* libgnutls >= 2.12
* libgcrypt
* zlib
* libpcap
* libgpgme >= 1.1.2
* uuid-dev (from e2fsprogs)
* libssh >= 0.5.0
* libhiredis >= 0.10.1
Prerequisites for building documentation:
* Doxygen
* doxygen
* xmltoman (optional, for building man page)
* sqlfairy (optional, for producing database diagram)
Recommended to have WMI support:
* wmiclient library (see doc/wmi-howto.txt)
* openvas-smb
Recommended to have improved SNMP support:
* netsnmp
Recommended to have improved SSL support:
* libksba >= 1.0.7
Recommended to have LDAP support:
* libldap >= 2.4.11
(LDAP can be disabled with -DBUILD_WITHOUT_LDAP=1)
Recommended to have RADIUS support:
* libfreeradius-client >= 1.1.6
(RADIUS can be enabled with -DBUILD_WITH_RADIUS=1)
Install prerequisites on Debian GNU/Linux 'Wheezy' 7:
# apt-get install pkg-config libssh-dev libgnutls-dev libglib2.0-dev libpcap-dev \
libgpgme11-dev uuid-dev bison libksba-dev libhiredis-dev libsnmp-dev
Compiling openvas-libraries
---------------------------
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
set the PKG_CONFIG_PATH environment variable to the location of your pkg-config
files before configuring:
$ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/your/location/lib/pkgconfig
$ export PKG_CONFIG_PATH=/your/location/lib/pkgconfig:$PKG_CONFIG_PATH
Create a build directory and change into it with
$ mkdir build
$ cd build
Configure the build with
$ cmake -DCMAKE_INSTALL_PREFIX=/path/to/your/installation .
$ cmake -DCMAKE_INSTALL_PREFIX=/path/to/your/installation ..
or (if you want to use the default installation path /usr/local)
$ cmake .
$ cmake ..
This only needs to be done once.
Thereafter, the following commands are useful.
$ make # build the scanner
$ make # build the libraries
$ 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 rebuild_cache # rebuild the cmake cache
Please note that you may have to execute "make install" as root, especially if
you have specified a prefix for which your user does not have full permissions.
$ make install
To clean up the build environment, simply remove the contents of the "build"
directory you created above.
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.
Configuration Options
---------------------
......@@ -88,3 +124,60 @@ do not hesitate to contact the OpenVAS developers using the mailing lists or IRC
chat. Don't forget to include the name and version of your system and
distribution in your message.
Building OpenVAS Libraries statically linked
--------------------------------------------
If you want to build a statically linked version of OpenVAS Libraries -- for
example to subsequently build a statically linked OMP command line client or
Nagios plugin from the "openvas-cli" module -- you need statically linked
versions of the prerequisite libraries as well.
This can be a problem with current versions of the GnuTLS library. In most
distributions GnuTLS is built with p11-kit support, which makes linking
statically against the GnuTLS library impossible. To work around this, you can
build the GnuTLS yourself after configuring it without support for p11-kit. This
can be done with the following parameters:
$ ./configure --disable-shared --enable-static --without-p11-kit
Note that you will most likely want to add additional parameters to configure
the GnuTLS library based on your distributions policy and/or your personal
needs, e.g. the correct prefix so OpenVAS Libraries will find you statically
linked version. The "make install" command will then build the GnuTLS library
and install it into the path you configured.
Once you have build and installed the GnuTLS library, configure OpenVAS
Libraries with the following parameters to request statically linked versions of
the "base", "misc" and "omp" modules:
$ cmake -DBUILD_STATIC=1 -DBUILD_SHARED=0 -DOPENVAS_OMP_ONLY=1 ..
Once again, the "make install" command will build and install the requested
modules.
For instructions on building statically linked binaries from the "openvas-cli"
module please see the INSTALL file there.
Static code analysis with the Clang Static Analyzer
---------------------------------------------------
If you want to use the Clang Static Analyzer (http://clang-analyzer.llvm.org/)
to do a static code analysis, you can do so by adding the following parameter
when configuring the build:
-DCMAKE_C_COMPILER=/usr/share/clang/scan-build/ccc-analyzer
Note that the example above uses the default location of ccc-analyzer in Debian
GNU/Linux and may be different in other environments.
To have the analysis results aggregated into a set of HTML files, use the
following command:
$ scan-build make
The tool will provide a hint on how to launch a web browser with the results.
It is recommended to do this analysis in a separate, empty build directory and
to empty the build directory before "scan-build" call.
......@@ -10,10 +10,10 @@ http://www.openvas.org/.
Please see the file COPYING for the license information.
Please refer to the instructions provided in the file INSTALL if you want to
install openvas-libraries. If you are not familiar or comfortable with the
procedure described below, we recommend that you use a binary package provided
by your distribution. Information regarding available binary packages is
available from the OpenVAS website.
install openvas-libraries. If you are not familiar or comfortable with building
from source code, we recommend that you use a install package or use
a prepared virtual machine. Information regarding available binary packages
and virtual machines is available from the download area of the OpenVAS website.
If you have any question or suggestions, please feel free to use the mailing
list and the IRC chat to contact the OpenVAS developers.
......
......@@ -6,12 +6,12 @@
# Matthew Mundell <matthew.mundell@greenbone.net>
#
# Copyright:
# Copyright (C) 2009,2010 Greenbone Networks GmbH
# Copyright (C) 2009,2010,2013 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 free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
......@@ -24,63 +24,87 @@
## Library
set (HARDENING_FLAGS "-Wformat -Wformat-security -O2 -D_FORTIFY_SOURCE=2 -fstack-protector -Wl,-z,relro -Wl,-z,now")
if (NOT MINGW)
set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${HARDENING_FLAGS} -Wall -Werror -fPIC")
# FIXME: certain flags should be defined on the global level,
# because they change the API (e.g. _FILE_OFFSET_BITS).
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${HARDENING_FLAGS} -D_FILE_OFFSET_BITS=64 -Wall -fPIC")
pkg_check_modules (ZLIB REQUIRED zlib)
pkg_check_modules (GIO REQUIRED gio-2.0)
endif (NOT MINGW)
include_directories (${GLIB_INCLUDE_DIRS} ${ZLIB_INCLUDE_DIRS} ${GNUTLS_INCLUDE_DIRS})
if (MINGW)
set (FILES array.c certificate.c credentials.c
hash_table_util.c nvti.c nvticache.c openvas_certificate_file.c
openvas_file.c openvas_string.c pidfile.c severity_filter.c settings.c)
set (HEADERS array.h certificate.h credentials.h
hash_table_util.h nvti.h settings.h openvas_certificate_file.h openvas_file.h
openvas_string.h pidfile.h severity_filter.h)
set (FILES array.c credentials.c openvas_hosts.c cvss.c nvti.c nvticache.c
openvas_file.c openvas_string.c pidfile.c settings.c gpgme_util.c
pwpolicy.c osp.c)
set (HEADERS array.h credentials.h openvas_hosts.h cvss.h nvti.h settings.h
openvas_file.h openvas_string.h pidfile.h gpgme_util.h pwpolicy.h osp.h)
else (MINGW)
set (FILES array.c certificate.c credentials.c drop_privileges.c
hash_table_util.c nvti.c nvticache.c openvas_certificate_file.c
openvas_file.c openvas_string.c pidfile.c severity_filter.c settings.c)
set (HEADERS array.h certificate.h credentials.h drop_privileges.h
hash_table_util.h nvti.h settings.h openvas_certificate_file.h openvas_file.h
openvas_string.h pidfile.h severity_filter.h)
set (FILES array.c credentials.c openvas_hosts.c cvss.c drop_privileges.c
nvti.c nvticache.c openvas_compress.c openvas_file.c openvas_networking.c
openvas_string.c pidfile.c settings.c gpgme_util.c pwpolicy.c osp.c)
set (HEADERS array.h credentials.h openvas_hosts.h cvss.h drop_privileges.h
nvticache.h nvti.h settings.h openvas_compress.h openvas_file.h osp.h
openvas_networking.h openvas_string.h pidfile.h gpgme_util.h pwpolicy.h)
endif (MINGW)
add_library (openvas_base_static STATIC ${FILES})
set_target_properties (openvas_base_static PROPERTIES COMPILE_FLAGS "${GLIB_CFLAGS}")
set_target_properties (openvas_base_static PROPERTIES OUTPUT_NAME "openvas_base")
set_target_properties (openvas_base_static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
set_target_properties (openvas_base_static PROPERTIES PUBLIC_HEADER "${HEADERS}")
if (BUILD_STATIC)
add_library (openvas_base_static STATIC ${FILES})
set_target_properties (openvas_base_static PROPERTIES OUTPUT_NAME "openvas_base")
set_target_properties (openvas_base_static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
set_target_properties (openvas_base_static PROPERTIES PUBLIC_HEADER "${HEADERS}")
endif (BUILD_STATIC)
if (BUILD_SHARED)
add_library (openvas_base_shared SHARED ${FILES})
set_target_properties (openvas_base_shared PROPERTIES OUTPUT_NAME "openvas_base")