[Openvas-commits] r1703 - in trunk/openvas-server: . include openvasd
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Nov 12 14:52:45 CET 2008
Author: felix
Date: 2008-11-12 14:52:41 +0100 (Wed, 12 Nov 2008)
New Revision: 1703
Modified:
trunk/openvas-server/ChangeLog
trunk/openvas-server/configure
trunk/openvas-server/configure.in
trunk/openvas-server/include/config.h.in
trunk/openvas-server/openvasd/ntp_11.c
trunk/openvas-server/openvasd/otp_1_0.c
trunk/openvas-server/openvasd/otp_1_0.h
trunk/openvas-server/openvasd/oval_plugins.c
Log:
* configure.in : Macros for gpgme public key support added.
* include/config.h.in : undef _FILE_OFFSET_BITS for AC_SYS_LARGEFILE
* configure : regenerated.
* openvasd/otp_1_0.h : proto added.
* openvasd/otp_1_0.c (otp_1_0_server_send_certificates) : nasl, glib
includes. Does send real information, not dummystrings.
* openvasd/ntp_11.c : removed interpretation of a void return.
* openvasd/oval_plugins.c : Includes ordered and missing ones added.
* ChangeLog : shamefully changed typos with my own email adress.
M openvas-server/openvasd/otp_1_0.c
M openvas-server/openvasd/ntp_11.c
M openvas-server/openvasd/otp_1_0.h
M openvas-server/openvasd/oval_plugins.c
M openvas-server/configure
M openvas-server/include/config.h.in
M openvas-server/configure.in
M openvas-server/ChangeLog
Modified: trunk/openvas-server/ChangeLog
===================================================================
--- trunk/openvas-server/ChangeLog 2008-11-12 13:50:27 UTC (rev 1702)
+++ trunk/openvas-server/ChangeLog 2008-11-12 13:52:41 UTC (rev 1703)
@@ -1,3 +1,29 @@
+2008-11-12 Felix Wolfsteller <felix.wolfsteller at intevation.de>
+
+ Work on Change Request #17 (http://www.openvas.org/openvas-cr-17.html -
+ "OTP: Make NVT signatures available to OpenVAS-Client").
+ Certificate information sending functionality improved. Sends real
+ information, not dummystrings.
+
+ ATTENTION: needs openvas-libnasl rev. 1702 to compile smoothly.
+
+ * configure.in : Macros for gpgme public key support added.
+
+ * include/config.h.in : undef _FILE_OFFSET_BITS for AC_SYS_LARGEFILE
+
+ * configure : regenerated.
+
+ * openvasd/otp_1_0.h : proto added.
+
+ * openvasd/otp_1_0.c (otp_1_0_server_send_certificates) : nasl, glib
+ includes. Does send real information, not dummystrings.
+
+ * openvasd/ntp_11.c : removed interpretation of a void return.
+
+ * openvasd/oval_plugins.c : Includes ordered and missing ones added.
+
+ * ChangeLog : shamefully changed typos with my own email adress.
+
2008-11-12 Michael Wiegand <michael.wiegand at intevation.de>
* configure.in: Added AC_PREREQ directive to tell autoconf to generate
@@ -38,7 +64,7 @@
* Makefile: Updated.
-2008-11-07 Felix Wolfsteller <felix.wolfstelller at intevation.de>
+2008-11-07 Felix Wolfsteller <felix.wolfsteller at intevation.de>
* openvasd/nasl_plugins: Removed printfs.
@@ -52,7 +78,7 @@
execution of unsigned plugins, if server preference is set.
-2008-11-06 Felix Wolfsteller <felix.wolfstelller at intevation.de>
+2008-11-06 Felix Wolfsteller <felix.wolfsteller at intevation.de>
* openvasd/otp_1_0.c (otp_1_0_server_send_certificates): Fixed bug
(wrong type released) that caused definite server crash.
@@ -68,7 +94,7 @@
* openvasd/attack.c (launch_plugin): Use OIDs instead of IDs when
logging information about NVT execution to KB.
-2008-11-05 Felix Wolfsteller <felix.wolfstelller at intevation.de>
+2008-11-05 Felix Wolfsteller <felix.wolfsteller at intevation.de>
Work on Change Request #17 (http://www.openvas.org/openvas-cr-17.html -
"OTP: Make NVT signatures available to OpenVAS-Client").
@@ -89,7 +115,7 @@
* configure.in: Updated version requirements for -libraries and
-libnasl.
-2008-10-31 Felix Wolfsteller <felix.wolfstelller at intevation.de>
+2008-10-31 Felix Wolfsteller <felix.wolfsteller at intevation.de>
Steps to an implementation of Change Request #17
(http://www.openvas.org/openvas-cr-17.html - "Make NVT signatures
Modified: trunk/openvas-server/configure
===================================================================
--- trunk/openvas-server/configure 2008-11-12 13:50:27 UTC (rev 1702)
+++ trunk/openvas-server/configure 2008-11-12 13:52:41 UTC (rev 1703)
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.in Revision: 1686 .
+# From configure.in Revision: 1699 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61.
#
@@ -1324,6 +1324,7 @@
--enable-install=user for debugging, install as non-root user
--enable-syslog log messages via syslog()
--enable-tcpwrappers use the libwrap.a library
+ --disable-largefile omit support for large files
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -8059,6 +8060,544 @@
fi
+# Check whether --enable-largefile was given.
+if test "${enable_largefile+set}" = set; then
+ enableval=$enable_largefile;
+fi
+
+if test "$enable_largefile" != no; then
+
+ { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
+echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; }
+if test "${ac_cv_sys_largefile_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_cv_sys_largefile_CC=no
+ if test "$GCC" != yes; then
+ ac_save_CC=$CC
+ while :; do
+ # IRIX 6.2 and later do not support large files by default,
+ # so use the C compiler's -n32 option if that helps.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext
+ CC="$CC -n32"
+ rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_sys_largefile_CC=' -n32'; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext
+ break
+ done
+ CC=$ac_save_CC
+ rm -f conftest.$ac_ext
+ fi
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
+echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; }
+ if test "$ac_cv_sys_largefile_CC" != no; then
+ CC=$CC$ac_cv_sys_largefile_CC
+ fi
+
+ { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; }
+if test "${ac_cv_sys_file_offset_bits+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_sys_file_offset_bits=no; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#define _FILE_OFFSET_BITS 64
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_sys_file_offset_bits=64; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_sys_file_offset_bits=unknown
+ break
+done
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
+echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; }
+case $ac_cv_sys_file_offset_bits in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
+_ACEOF
+;;
+esac
+rm -f conftest*
+ if test $ac_cv_sys_file_offset_bits = unknown; then
+ { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
+echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; }
+if test "${ac_cv_sys_large_files+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_sys_large_files=no; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#define _LARGE_FILES 1
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_sys_large_files=1; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_sys_large_files=unknown
+ break
+done
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
+echo "${ECHO_T}$ac_cv_sys_large_files" >&6; }
+case $ac_cv_sys_large_files in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define _LARGE_FILES $ac_cv_sys_large_files
+_ACEOF
+;;
+esac
+rm -f conftest*
+ fi
+fi
+
+{ echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
+echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; }
+if test "${ac_cv_sys_largefile_source+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h> /* for off_t */
+ #include <stdio.h>
+int
+main ()
+{
+int (*fp) (FILE *, off_t, int) = fseeko;
+ return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_sys_largefile_source=no; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#define _LARGEFILE_SOURCE 1
+#include <sys/types.h> /* for off_t */
+ #include <stdio.h>
+int
+main ()
+{
+int (*fp) (FILE *, off_t, int) = fseeko;
+ return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ ac_cv_sys_largefile_source=1; break
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_cv_sys_largefile_source=unknown
+ break
+done
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
+echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; }
+case $ac_cv_sys_largefile_source in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
+_ACEOF
+;;
+esac
+rm -f conftest*
+
+# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
+# in glibc 2.1.3, but that breaks too many other things.
+# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
+if test $ac_cv_sys_largefile_source != unknown; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FSEEKO 1
+_ACEOF
+
+fi
+
+{ echo "$as_me:$LINENO: checking for off_t" >&5
+echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
+if test "${ac_cv_type_off_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+typedef off_t ac__type_new_;
+int
+main ()
+{
+if ((ac__type_new_ *) 0)
+ return 0;
+if (sizeof (ac__type_new_))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_type_off_t=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_off_t=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
+echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
+if test $ac_cv_type_off_t = yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define off_t long int
+_ACEOF
+
+fi
+
+
{ echo "$as_me:$LINENO: checking for struct timeval" >&5
echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; }
cat >conftest.$ac_ext <<_ACEOF
Modified: trunk/openvas-server/configure.in
===================================================================
--- trunk/openvas-server/configure.in 2008-11-12 13:50:27 UTC (rev 1702)
+++ trunk/openvas-server/configure.in 2008-11-12 13:52:41 UTC (rev 1703)
@@ -267,6 +267,10 @@
AC_TYPE_SIZE_T
AC_TYPE_UID_T
+AC_SYS_LARGEFILE
+AC_FUNC_FSEEKO
+AC_TYPE_OFF_T
+
dnl this routine has been adopted from the GNU emacs20 distrubution
AC_MSG_CHECKING(for struct timeval)
AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
Modified: trunk/openvas-server/include/config.h.in
===================================================================
--- trunk/openvas-server/include/config.h.in 2008-11-12 13:50:27 UTC (rev 1702)
+++ trunk/openvas-server/include/config.h.in 2008-11-12 13:52:41 UTC (rev 1703)
@@ -159,7 +159,13 @@
*/
#undef BSD_BYTE_ORDERING
+
/*
+ * Set by AC_SYS_LARGEFILE, needed for gpgme key retrieval
+ */
+#undef _FILE_OFFSET_BITS
+
+/*
* STOP ! Don't edit anything after this line !
*/
#ifndef _CYGWIN_
Modified: trunk/openvas-server/openvasd/ntp_11.c
===================================================================
--- trunk/openvas-server/openvasd/ntp_11.c 2008-11-12 13:50:27 UTC (rev 1702)
+++ trunk/openvas-server/openvasd/ntp_11.c 2008-11-12 13:52:41 UTC (rev 1703)
@@ -88,6 +88,7 @@
}
str[0] = '\0';
+
if( strcmp(input, "CLIENT") == 0 )
{
input = str + 5;
@@ -108,7 +109,7 @@
break;
case CREQ_CERTIFICATES:
- result = otp_1_0_server_send_certificates(globals);
+ otp_1_0_server_send_certificates(globals);
break;
case CREQ_OPENVAS_VERSION:
Modified: trunk/openvas-server/openvasd/otp_1_0.c
===================================================================
--- trunk/openvas-server/openvasd/otp_1_0.c 2008-11-12 13:50:27 UTC (rev 1702)
+++ trunk/openvas-server/openvasd/otp_1_0.c 2008-11-12 13:52:41 UTC (rev 1703)
@@ -23,13 +23,19 @@
*
*/
+#include <includes.h>
+
#include <string.h>
#include <corevers.h>
#include <network.h>
+#include <nasl.h>
+
#include "otp_1_0.h"
+
#include <gpgme.h>
+#include <glib.h>
/* Find the enum identifier for the client request which is given
* as string.
@@ -63,47 +69,38 @@
OPENVAS_VERSION);
}
-/* Send server response to certificate request by client.
+
+/**
+ * Send server response to certificate request by client.
*/
void otp_1_0_server_send_certificates(struct arglist* globals)
{
auth_printf(globals, "SERVER <|> CERTIFICATES\n");
- // TODO: felix CR#17 - implement certificate sending here
- // Need a -D_FILE_OFFSET_BITS=64 in order to read key files
- // Certificate retrieval
- // Send dummystrings, basically
- gpgme_error_t err;
- gpgme_ctx_t ctx = init_openvas_gpgme_ctx();
- err = gpgme_op_keylist_ext_start(ctx, NULL, 0, 0);
- if (err)
- {
- log_write("otp_1_0_send_certificates: gpgme key listing error: %s.\n", strerror(err));
- }
+ GSList* certificates = nasl_get_all_certificates();
+ GSList* cert_list_elem = g_slist_nth(certificates, 0);
- while (!err)
+ // Iterate over certificates
+ while(cert_list_elem != NULL)
{
- gpgme_key_t key;
- err = gpgme_op_keylist_next (ctx, &key);
- if (err)
- break;
- auth_printf(globals, "%s <|> %s <|> %s <|> %d <|> %s\n",
- key->subkeys->fpr,
- key->uids->name, "untrusted",
- 8, // key size
- "dummykey");
- gpgme_key_release (key);
- }
+ openvas_certificate* cert = cert_list_elem->data;
+
+ // Replace newlines by semicolons
+ char* pos = cert->full_public_key;
+ while(pos[0] != '\0')
+ {
+ if(pos[0] == '\n') pos[0] = ';';
+ pos++;
+ }
- if (!err)
- {
- if (gpg_err_code (err) != GPG_ERR_EOF)
- {
- log_write("otp_1_0_send_certificates: gpgme can not list keys: %s\n", gpgme_strerror (err));
- }
+ char* trustlevel = (cert->trusted == TRUE)? "trusted" : "notrust";
+ cert_list_elem = g_slist_next(cert_list_elem);
+ auth_printf(globals, "%s <|> %s <|> %s <|> %d <|> %s\n", cert->fpr,
+ cert->ownername, trustlevel,
+ strlen(cert->full_public_key),
+ cert->full_public_key);
}
-
- gpgme_release(ctx);
- // Certificate retrieval end
+ // Releases
+
auth_printf(globals, "<|> SERVER\n");
}
Modified: trunk/openvas-server/openvasd/otp_1_0.h
===================================================================
--- trunk/openvas-server/openvasd/otp_1_0.h 2008-11-12 13:50:27 UTC (rev 1702)
+++ trunk/openvas-server/openvasd/otp_1_0.h 2008-11-12 13:52:41 UTC (rev 1703)
@@ -46,4 +46,6 @@
void otp_1_0_server_openvas_version(struct arglist *);
+void otp_1_0_server_send_certificates(struct arglist* globals);
+
#endif
Modified: trunk/openvas-server/openvasd/oval_plugins.c
===================================================================
--- trunk/openvas-server/openvasd/oval_plugins.c 2008-11-12 13:50:27 UTC (rev 1702)
+++ trunk/openvas-server/openvasd/oval_plugins.c 2008-11-12 13:52:41 UTC (rev 1703)
@@ -30,12 +30,15 @@
*/
#include <includes.h>
+#include <nasl.h>
+#include <glib.h>
+#include "corevers.h"
+#include "log.h"
#include "pluginload.h"
-#include "log.h"
-#include <glib.h>
+#include "preferences.h"
#include "processes.h"
-#include "corevers.h"
+
static void oval_thread(struct arglist *);
void ovaldi_launch(struct arglist * g_args);
@@ -201,7 +204,7 @@
if ( preferences_nasl_no_signature_check(preferences) == 0
&& nasl_verify_signature( fullname) != 0)
{
- log_write("%s: signature of nvt could not been verified/ is missing.");
+ log_write("%s: signature of nvt could not been verified/ is missing.", fullname);
return NULL;
}
@@ -283,10 +286,8 @@
arg_set_value(plugin, "preferences", -1, preferences);
arg_add_value(plugin, "key", ARG_PTR, -1, kb);
- // TODO felix get preferences from global context and check the signature.
- // Otherwise a client can start unsigned oval plugins even if the server
- // preference is set to "no"!
- // if( nasl_verify_signature( arg_get_value(g_args, "name")) )
+ // TODO felix get Preferences from global context and check the signature
+ //if( nasl_verify_signature( arg_get_value(g_args, "name")) )
// post_log( g_args, 0, "Attempt to start signed oval plugin.");
module = create_process((process_func_t)oval_thread, plugin);
@@ -484,7 +485,7 @@
argv[8] = NULL;
// log_write("Launching ovaldi with: %s\n", g_strjoinv(" ", argv));
- if(g_spawn_sync(NULL, argv, NULL, G_SPAWN_SEARCH_PATH, child_setup, NULL, NULL, NULL, NULL, NULL))
+ if(g_spawn_sync(NULL, argv, NULL, 0, child_setup, NULL, NULL, NULL, NULL, NULL))
{
GMarkupParser parser;
GMarkupParseContext *context = NULL;
More information about the Openvas-commits
mailing list