Commit a51df242 authored by Sophie Brun's avatar Sophie Brun

Imported Upstream version 1.4.4

parent 0dac3831
openvas-cli 1.4.4 (2016-04-25)
This is the fourth maintenance release of the 1.4 version of the OpenVAS Command
Line Interface (CLI) for the Open Vulnerability Assessment System release 8
(OpenVAS-8).
Many thanks to everyone who has contributed to this release:
Michael Wiegand.
Main changes compared to 1.4.3:
* check_omp now supports the 'errors' element in a report.
* The build process has been updated to be more efficient and more consistent
with other modules.
openvas-cli 1.4.3 (2015-10-12)
This is the third maintenance release of the 1.4 version of the OpenVAS Command
Line Interface (CLI) for the Open Vulnerability Assessment System release 8
(OpenVAS-8).
Many thanks to everyone who has contributed to this release:
Hani Benhabiles, Sven Haardiek and Michael Wiegand.
Main changes compared to 1.4.2:
* check_omp now supports treating empty results as UNKNOWN instead of OK with
the new "--empty-as-unknown" option.
* The build process has been updated to be more efficient and more consistent
with other modules.
openvas-cli 1.4.2 (2015-07-09)
This is the second maintenance release of the 1.4 version of the OpenVAS Command
......
......@@ -54,9 +54,9 @@ if (NOT CMAKE_BUILD_TYPE MATCHES "Release")
if (EXISTS "${CMAKE_SOURCE_DIR}/.svn/")
if (SVN_EXECUTABLE)
Subversion_GET_REVISION(. ProjectRevision)
set (SVN_REVISION ".SVN.r${ProjectRevision}")
set (SVN_REVISION "~svn${ProjectRevision}")
else (SVN_EXECUTABLE)
set (SVN_REVISION ".SVN")
set (SVN_REVISION "~svn")
endif (SVN_EXECUTABLE)
endif (EXISTS "${CMAKE_SOURCE_DIR}/.svn/")
endif (NOT CMAKE_BUILD_TYPE MATCHES "Release")
......@@ -78,7 +78,7 @@ set (CPACK_PACKAGE_VERSION_MAJOR "1")
set (CPACK_PACKAGE_VERSION_MINOR "4")
# Use this scheme for stable releases:
set (CPACK_PACKAGE_VERSION_PATCH "2${SVN_REVISION}")
set (CPACK_PACKAGE_VERSION_PATCH "4${SVN_REVISION}")
set (CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
# Use this scheme for +betaN and +rcN releases:
#set (CPACK_PACKAGE_VERSION_PATCH "+beta1${SVN_REVISION}")
......@@ -88,21 +88,11 @@ 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
"${CMAKE_BINARY_DIR}"
"/.svn/"
"/.hg/"
"/.git/"
"/_CPack_Packages/"
"/CMakeFiles/"
"cmake$"
"swp$"
"Cache.txt$"
".tar.gz"
"install_manifest.txt"
"Makefile"
"/doc/generated/"
"Doxyfile$"
"Doxyfile_full$"
"VERSION$"
)
include (CPack)
......@@ -148,11 +138,6 @@ endif (NOT INCLUDEDIR)
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_OMP REQUIRED libopenvas_omp>=8.0.4)
pkg_check_modules (LIBOPENVAS_BASE REQUIRED libopenvas_base>=8.0.0)
......@@ -160,69 +145,38 @@ pkg_check_modules (LIBOPENVAS_MISC REQUIRED libopenvas_misc>=8.0.0)
pkg_check_modules (GNUTLS REQUIRED gnutls>=2.8)
pkg_check_modules (GLIB REQUIRED glib-2.0)
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)
if (BUILD_STATIC_NAGIOS OR BUILD_STATIC_OMP)
execute_process (COMMAND pkg-config --static --cflags gnutls
OUTPUT_VARIABLE GNUTLS_CFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process (COMMAND pkg-config --static --libs gnutls
OUTPUT_VARIABLE GNUTLS_LDFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process (COMMAND pkg-config --static --cflags libopenvas_omp
OUTPUT_VARIABLE OPENVAS_OMP_CFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process (COMMAND pkg-config --static --libs libopenvas_omp
OUTPUT_VARIABLE OPENVAS_OMP_LDFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process (COMMAND pkg-config --static --cflags libopenvas_misc
OUTPUT_VARIABLE OPENVAS_MISC_CFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process (COMMAND pkg-config --static --libs libopenvas_misc
OUTPUT_VARIABLE OPENVAS_MISC_LDFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process (COMMAND pkg-config --static --cflags libopenvas_base
OUTPUT_VARIABLE OPENVAS_BASE_CFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process (COMMAND pkg-config --static --libs libopenvas_base
OUTPUT_VARIABLE OPENVAS_BASE_LDFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE)
else (BUILD_STATIC_NAGIOS OR BUILD_STATIC_OMP)
execute_process (COMMAND pkg-config --cflags gnutls
OUTPUT_VARIABLE GNUTLS_CFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process (COMMAND pkg-config --libs gnutls
OUTPUT_VARIABLE GNUTLS_LDFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process (COMMAND pkg-config --cflags libopenvas_omp
OUTPUT_VARIABLE OPENVAS_OMP_CFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process (COMMAND pkg-config --libs libopenvas_omp
OUTPUT_VARIABLE OPENVAS_OMP_LDFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process (COMMAND pkg-config --cflags libopenvas_misc
OUTPUT_VARIABLE OPENVAS_MISC_CFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process (COMMAND pkg-config --libs libopenvas_misc
OUTPUT_VARIABLE OPENVAS_MISC_LDFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process (COMMAND pkg-config --cflags libopenvas_base
OUTPUT_VARIABLE OPENVAS_BASE_CFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process (COMMAND pkg-config --libs libopenvas_base
OUTPUT_VARIABLE OPENVAS_BASE_LDFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE)
message (STATUS "Looking for libgcrypt...")
find_library (LIBGCRYPT gcrypt)
if (NOT LIBGCRYPT)
message (SEND_ERROR "The libgcrypt library is required.")
else (NOT LIBGCRYPT)
message (STATUS "Looking for libgcrypt... ${LIBGCRYPT}")
execute_process (COMMAND libgcrypt-config --cflags
OUTPUT_VARIABLE GCRYPT_CFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process (COMMAND libgcrypt-config --libs
OUTPUT_VARIABLE GCRYPT_LDFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif (NOT LIBGCRYPT)
message (STATUS "Looking for gpgme...")
find_library (GPGME gpgme)
if (NOT GPGME)
message (SEND_ERROR "The gpgme library is required.")
else (NOT GPGME)
message (STATUS "Looking for gpgme... ${GPGME}")
execute_process (COMMAND gpgme-config --cflags
OUTPUT_VARIABLE GPGME_CFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process (COMMAND gpgme-config --libs
OUTPUT_VARIABLE GPGME_LDFLAGS
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif (NOT GPGME)
endif (BUILD_STATIC_NAGIOS OR BUILD_STATIC_OMP)
set (OPENVAS_CFLAGS "${OPENVAS_OMP_CFLAGS} ${OPENVAS_MISC_CFLAGS} ${OPENVAS_BASE_CFLAGS}")
set (OPENVAS_LDFLAGS "${OPENVAS_OMP_LDFLAGS} ${OPENVAS_MISC_LDFLAGS} ${OPENVAS_BASE_LDFLAGS}")
set (OPENVAS_CFLAGS "${LIBOPENVAS_OMP_CFLAGS} ${LIBOPENVAS_BASE_CFLAGS} ${LIBOPENVAS_MISC_CFLAGS}")
set (OPENVAS_LDFLAGS "${LIBOPENVAS_OMP_LDFLAGS} ${LIBOPENVAS_BASE_LDFLAGS} ${LIBOPENVAS_MISC_LDFLAGS}")
## Version
string (REPLACE "
......@@ -238,11 +192,12 @@ configure_file (VERSION.in VERSION)
if (MINGW)
set (HARDENING_FLAGS "-Wformat -Wformat-security -O2 -D_FORTIFY_SOURCE=2")
else (MINGW)
set (HARDENING_FLAGS "-Wformat -Wformat-security -O2 -D_FORTIFY_SOURCE=2 -fstack-protector -Wl,-z,relro -Wl,-z,now")
set (HARDENING_FLAGS "-Wformat -Wformat-security -O2 -D_FORTIFY_SOURCE=2 -fstack-protector")
set (LINKER_HARDENING_FLAGS "-Wl,-z,relro -Wl,-z,now")
endif (MINGW)
set (CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Werror")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${HARDENING_FLAGS} -Wall")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${HARDENING_FLAGS} -Wall -Wextra")
add_subdirectory (omp)
add_subdirectory (nagios)
......
2016-04-25 Michael Wiegand <michael.wiegand@greenbone.net>
Preparing the openvas-cli 1.4.4 release.
* CHANGES: Updated.
2016-04-22 Michael Wiegand <michael.wiegand@greenbone.net>
* nagios/check_omp.c, omp/omp.c: Bump copyright years.
2016-04-22 Michael Wiegand <michael.wiegand@greenbone.net>
* nagios/check_omp.c (filter_report): Add support for handling the
'errors' element in a report. Note the the 'errors' element was
introduced in OMP 6.0, so this feature will only be available for
connections using OMP 6.0 or newer.
2016-04-18 Michael Wiegand <michael.wiegand@greenbone.net>
* CMakeLists.txt: Simplify CPACK_SOURCE_IGNORE_FILES by ignoring the
entire build directory.
2016-01-21 Michael Wiegand <michael.wiegand@greenbone.net>
Initialize terminating GOptionEntry elements explicitly to avoid
having uninitialized fields.
* nagios/check_omp.c (main): Ensure terminating GOptionEntry is fully
initialized as well.
* omp/omp.c (main): Ensure terminating GOptionEntry is fully
initialized as well.
2016-01-11 Michael Wiegand <michael.wiegand@greenbone.net>
Make a better distinction between hardening flags for compiling and
for linking to avoid using flags in a context where they make no
sense.
* CMakeLists.txt: Separate linker hardening flags from compiler
hardening flags.
* nagios/CMakeLists.txt, omp/CMakeLists.txt: Use linker hardening
flags when linking.
2015-10-12 Michael Wiegand <michael.wiegand@greenbone.net>
Post release version bump.
* CMakeLists.txt: Updated version to 1.4.4.
2015-10-12 Michael Wiegand <michael.wiegand@greenbone.net>
Preparing the openvas-cli 1.4.3 release.
* CHANGES: Updated.
2015-09-30 Michael Wiegand <michael.wiegand@greenbone.net>
* nagios/check_omp.c: Add support for treating empty results as
UNKNOWN instead of OK.
(main): Add new command line parameter "empty-as-unknown".
(filter_report): Consider "empty-as-unknown" value when determining
the response code.
2015-08-11 Michael Wiegand <michael.wiegand@greenbone.net>
* nagios/CMakeLists.txt: Link against libopenvas_base even though it
is not strictly necessary, but required due to incomplete separation
and circular dependencies inside openvas-libraries.
2015-08-11 Michael Wiegand <michael.wiegand@greenbone.net>
Simplify handling of library flags in CMakeLists.txt files, thereby
removing the need for clumsy workarounds.
* CMakeLists.txt: Remove redundant queries of library flags which were
already retrieved by CMake. Retrieve flags for libgcrypt and libgpgme,
but only for static linking. Remove outdated todo.
* nagios/CMakeLists.txt: Set include directories with
include_directories instead of target properties. Remove quotes in
target_link_libraries so that CMake lists get expanded correctly.
Remove use of HEADER_TEMP and LIB_TEMP variables. Use GPGME_LDFLAGS
retrieved from gpgme-config instead of hardcoded values.
* omp/CMakeLists.txt: Set include directories with
include_directories instead of target properties. Remove quotes in
target_link_libraries so that CMake lists get expanded correctly. Use
GPGME_LDFLAGS retrieved from gpgme-config instead of hardcoded values.
2014-08-05 Hani Benhabiles <hani.benhabiles@greenbone.net>
* CMakeLists.txt: Add -Wextra compiler flag.
2015-07-30 Sven Haardiek <sven.haardiek@greenbone.net>
* CMakeLists.txt: Change non release version style to fit better to debian
2015-07-10 Michael Wiegand <michael.wiegand@greenbone.net>
* doc/Doxyfile.in, doc/Doxyfile_full.in: Harmonized settings with
Doxygen configurations of other OpenVAS modules.
2015-07-10 Michael Wiegand <michael.wiegand@greenbone.net>
* doc/Doxyfile.in, doc/Doxyfile_full.in: Updated Doxygen configuration
files with Doxygen 1.8.8.
2015-07-09 Michael Wiegand <michael.wiegand@greenbone.net>
Post release version bump.
* CMakeLists.txt: Updated version to 1.4.3.
2015-07-09 Michael Wiegand <michael.wiegand@greenbone.net>
Preparing the openvas-cli 1.4.2 release.
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -24,17 +24,10 @@
## Config
if (OPENVAS_HEADER_INSTALL_DIR)
set (HEADER_TEMP "-I${OPENVAS_HEADER_INSTALL_DIR}")
else (OPENVAS_HEADER_INSTALL_DIR)
set (HEADER_TEMP "")
endif (OPENVAS_HEADER_INSTALL_DIR)
if (OPENVAS_LIB_INSTALL_DIR)
set (LIB_TEMP "-L${OPENVAS_LIB_INSTALL_DIR}")
else (OPENVAS_LIB_INSTALL_DIR)
set (LIB_TEMP "")
endif (OPENVAS_LIB_INSTALL_DIR)
include_directories (${GLIB_INCLUDE_DIRS} ${GNUTLS_INCLUDE_DIRS}
${LIBOPENVAS_OMP_INCLUDE_DIRS}
${LIBOPENVAS_BASE_INCLUDE_DIRS}
${LIBOPENVAS_MISC_INCLUDE_DIRS})
## Program
......@@ -70,9 +63,6 @@ if (MINGW)
target_link_libraries (check_omp "${GLIB_LDFLAGS} ${OPENVAS_LDFLAGS} -lglib-2.0 -lgnutls -lws2_32 -lgcrypt -lintl -lgpg-error -liconv -lz -lole32 -lopenvas_omp -lopenvas_misc")
else (MINGW)
set_target_properties (check_omp PROPERTIES COMPILE_FLAGS
"${HEADER_TEMP} ${GNUTLS_CFLAGS} ${OPENVAS_CFLAGS} ${GLIB_CFLAGS}")
if (BUILD_STATIC_NAGIOS)
set(CMAKE_EXE_LINKER_FLAGS -static)
set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
......@@ -81,15 +71,25 @@ else (MINGW)
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS)
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
target_link_libraries (check_omp "${OPENVAS_LDFLAGS} -lgpg-error -lgpgme")
target_link_libraries (check_omp
${GNUTLS_STATIC_LDFLAGS}
${GLIB_STATIC_LDFLAGS}
${GCRYPT_LDFLAGS}
${LIBOPENVAS_OMP_STATIC_LDFLAGS}
${LIBOPENVAS_BASE_STATIC_LDFLAGS}
${LIBOPENVAS_MISC_STATIC_LDFLAGS}
${GPGME_LDFLAGS})
else (BUILD_STATIC_NAGIOS)
target_link_libraries (check_omp "${GNUTLS_LDFLAGS} ${GLIB_LDFLAGS} ${LIB_TEMP} ${OPENVAS_LDFLAGS}")
target_link_libraries (check_omp
${GNUTLS_LDFLAGS}
${GLIB_LDFLAGS}
${LIBOPENVAS_OMP_LDFLAGS}
${LIBOPENVAS_BASE_LDFLAGS}
${LIBOPENVAS_MISC_LDFLAGS}
${LINKER_HARDENING_FLAGS})
endif (BUILD_STATIC_NAGIOS)
endif (MINGW)
mark_as_advanced (LIB_TEMP)
mark_as_advanced (HEADER_TEMP)
## Install
install (TARGETS check_omp
......
......@@ -9,7 +9,7 @@
* Werner Koch <wk@gnupg.org>
*
* Copyright:
* Copyright (C) 2009-2015 Greenbone Networks GmbH
* Copyright (C) 2009-2016 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
......@@ -147,6 +147,7 @@ typedef struct
gboolean scan_end; ///< TRUE if the time the scan finished should be included
guint autofp; ///< Whether to trust vendor security updates. 0 No, 1 full match, 2 partial.
gint timeout; ///< Timeout of request.
gboolean empty_as_unknown; ///< TRUE if empty results should produce an UNKNOWN response instead of OK
} cmd_status_opts_t;
/* Prototypes. */
......@@ -373,11 +374,13 @@ filter_report (entity_t report, const char *host_filter,
entity_t results;
entities_t elems;
entity_t elem;
entity_t errors;
int any_found = 0;
int high_count = 0;
int medium_count = 0;
int low_count = 0;
int log_count = 0;
int error_count = 0;
int response_code = NAGIOS_OK;
GPtrArray *high_oids = NULL;
GPtrArray *medium_oids = NULL;
......@@ -649,6 +652,17 @@ filter_report (entity_t report, const char *host_filter,
elems = next_entities (elems);
}
errors = entity_child (report, "errors");
if (errors != NULL)
{
entity_t count_child;
const char *error_text;
count_child = entity_child (errors, "count");
error_text = entity_text (count_child);
error_count = atoi (error_text);
}
if (high_count > 0)
{
response_code = NAGIOS_CRITICAL;
......@@ -658,6 +672,17 @@ filter_report (entity_t report, const char *host_filter,
response_code = NAGIOS_WARNING;
}
if ((results->entities == NULL) || (!any_found && host_filter))
{
if (status_opts.empty_as_unknown)
response_code = NAGIOS_UNKNOWN;
}
if ((error_count > 0) && (response_code == NAGIOS_OK))
{
response_code = NAGIOS_UNKNOWN;
}
respond (response_code, "%i vulnerabilities found - High: %i Medium: %i Low: %i\n",
(high_count + medium_count + low_count), high_count, medium_count, low_count);
......@@ -666,6 +691,9 @@ filter_report (entity_t report, const char *host_filter,
else if (!any_found && host_filter)
respond_data ("Report did not contain vulnerabilities for IP %s\n", host_filter);
if (error_count > 0)
respond_data ("Report did contain %i errors\n", error_count);
if (status_opts.report_link)
respond_data ("https://%s/omp?cmd=get_report&report_id=%s\n",
(gchar *) status_opts.manager_host, entity_attribute (report,
......@@ -975,6 +1003,7 @@ main (int argc, char **argv)
static gboolean display_log_messages = FALSE;
static gboolean display_scan_end = FALSE;
static guint autofp = 0;
static gboolean empty_as_unknown = FALSE;
/* The rest of the args. */
static gchar **rest = NULL;
......@@ -1034,9 +1063,11 @@ main (int argc, char **argv)
"Include timestamp of scan end in output", NULL},
{"autofp", 0, 0, G_OPTION_ARG_INT, &autofp,
"Trust vendor security updates for automatic false positive filtering (0=No, 1=full match, 2=partial).", "<n>"},
{"empty-as-unknown", 'e', 0, G_OPTION_ARG_NONE, &empty_as_unknown,
"Respond with UNKNOWN on empty results", NULL},
{G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_STRING_ARRAY, &rest,
NULL, NULL},
{NULL}
{NULL, 0, 0, 0, NULL, NULL, NULL}
};
if (setlocale (LC_ALL, "") == NULL)
......@@ -1057,7 +1088,7 @@ main (int argc, char **argv)
if (print_version)
{
printf ("Check-OMP Nagios Command Plugin %s\n", OPENVASCLI_VERSION);
printf ("Copyright (C) 2015 Greenbone Networks GmbH\n");
printf ("Copyright (C) 2016 Greenbone Networks GmbH\n");
printf ("License GPLv2+: GNU GPL version 2 or later\n");
printf
("This is free software: you are free to change and redistribute it.\n"
......@@ -1198,6 +1229,7 @@ main (int argc, char **argv)
status_opts.scan_end = display_scan_end;
status_opts.autofp = autofp;
status_opts.timeout = timeout;
status_opts.empty_as_unknown = empty_as_unknown;
/* Returns 0 on success, 2 on timeout, -1 or OMP code on error. */
switch (omp_get_tasks_ext (&(connection->session), opts, &status))
......
......@@ -22,6 +22,11 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
include_directories (${GLIB_INCLUDE_DIRS} ${GNUTLS_INCLUDE_DIRS}
${LIBOPENVAS_OMP_INCLUDE_DIRS}
${LIBOPENVAS_BASE_INCLUDE_DIRS}
${LIBOPENVAS_MISC_INCLUDE_DIRS})
## Program
add_executable (omp omp.c)
......@@ -63,9 +68,6 @@ if (MINGW)
target_link_libraries (omp "${GLIB_LDFLAGS} ${OPENVAS_LDFLAGS} -lopenvas_omp -lopenvas_misc -lglib-2.0 -lgthread-2.0 -lgnutls -ltasn1 -lkdewin -lws2_32 -lgcrypt -lintl -lgpg-error -liconv -lz -lole32 -lwinmm")
else (MINGW)
set_target_properties (omp PROPERTIES COMPILE_FLAGS
"${GNUTLS_CFLAGS} ${OPENVAS_CFLAGS} ${GLIB_CFLAGS}")
if (BUILD_STATIC_OMP)
set(CMAKE_EXE_LINKER_FLAGS -static)
set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
......@@ -74,9 +76,22 @@ else (MINGW)
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS)
set_property(GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS FALSE)
target_link_libraries (omp "${OPENVAS_LDFLAGS} -lgpg-error -lgpgme")
target_link_libraries (omp
${GNUTLS_STATIC_LDFLAGS}
${GLIB_STATIC_LDFLAGS}
${GCRYPT_LDFLAGS}
${LIBOPENVAS_OMP_STATIC_LDFLAGS}
${LIBOPENVAS_BASE_STATIC_LDFLAGS}
${LIBOPENVAS_MISC_STATIC_LDFLAGS}
${GPGME_LDFLAGS})
else (BUILD_STATIC_OMP)
target_link_libraries (omp "${GNUTLS_LDFLAGS} ${GLIB_LDFLAGS} ${OPENVAS_LDFLAGS}")
target_link_libraries (omp
${GNUTLS_LDFLAGS}
${GLIB_LDFLAGS}
${LIBOPENVAS_OMP_LDFLAGS}
${LIBOPENVAS_BASE_LDFLAGS}
${LIBOPENVAS_MISC_LDFLAGS}
${LINKER_HARDENING_FLAGS})
endif (BUILD_STATIC_OMP)
endif (MINGW)
......
......@@ -7,7 +7,7 @@
* Michael Wiegand <michael.wiegand@greenbone.net>
*
* Copyright:
* Copyright (C) 2009, 2010, 2015 Greenbone Networks GmbH
* Copyright (C) 2009, 2010, 2015, 2016 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
......@@ -1149,7 +1149,7 @@ main (int argc, char **argv)
/* Enable details */
{"details", 0, 0, G_OPTION_ARG_NONE, &cmd_details,
"Enable detailed view.", NULL},
{NULL}
{NULL, 0, 0, 0, NULL, NULL, NULL}
};
if (setlocale (LC_ALL, "") == NULL)
......@@ -1180,7 +1180,7 @@ main (int argc, char **argv)
if (print_version)
{
printf ("OMP Command Line Interface %s\n", OPENVASCLI_VERSION);
printf ("Copyright (C) 2010-2015 Greenbone Networks GmbH\n");
printf ("Copyright (C) 2010-2016 Greenbone Networks GmbH\n");
printf ("License GPLv2+: GNU GPL version 2 or later\n");
printf
("This is free software: you are free to change and redistribute it.\n"
......
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