2011-04-15  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 2.0.3 release.

	* CHANGES: Updated.

2011-04-15  Michael Wiegand <michael.wiegand@greenbone.net>

	* src/manage_sql.c (delete_report_format): Free allocated char on
	failure.

2011-04-15  Michael Wiegand <michael.wiegand@greenbone.net>

	Make predefined report formats always available. Adapted from trunk
	from code committed by Matthew Mundell in r10777.

	* src/omp.c (omp_xml_handle_end_element): In OMP GET_REPORT_FORMATS
	allow predefined formats always.

	* src/manage_sql.c (manage_report, manage_send_report): Allow predefined
	formats always.

2011-04-15  Michael Wiegand <michael.wiegand@greenbone.net>

	Refuse to delete predefined report formats. Adapted from trunk from
	code committed by Matthew Mundell in r10776.

	* src/manage_sql.c (delete_report_format): Fail if format is predefined.
	(report_format_predefined): New function.

	* src/manage.h: Add header accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_REPORTS remove
	erroneous case and add predefined case.

2011-04-15  Michael Wiegand <michael.wiegand@greenbone.net>

	Require that format trust is "yes". Backport from trunk; initially
	committed by Matthew Mundell in r10774.

	* src/manage_sql.c (manage_report, manage_send_report): Accept only
	trusted report formats.
	(report_format_trust): New function.

	* src/manage.h: Add header accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_REPORTS check
	report format trust.

2011-04-15  Michael Wiegand <michael.wiegand@greenbone.net>

	Drop privileges in report creation when running as root. Backport from
	trunk; initially committed by Matthew Mundell in r10772.

	* CMakeLists.txt: Create the user report_formats directory, so that it's
	world readable, for nobody.  Make the predefined report formats world
	readable, for nobody.

	* src/manage_sql.c (manage_report, manage_send_report): Drop to nobody
	within the spawned command when running as root.  This prevents the report
	formats from having root access.
	(create_report_format): Ensure that nobody can access the installed report
	formats.

2011-04-14  Michael Wiegand <michael.wiegand@greenbone.net>

	* src/manage_sql.c (init_manage_process): Reduce permissions if they are
	too loose. Backport from trunk; initially committed by Matthew Mundell
	in r10762 and r10763.

2011-04-14  Michael Wiegand <michael.wiegand@greenbone.net>

	* src/openvasmd.c (main): Set very restrictive umask. Backport from
	trunk; initially committed by Matthew Mundell in r10758.

2011-03-31  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (find_report_format): Add a user check to the
	constraint XML because multiple users can import the same report format.
	Backport from trunk; initially committed in r10632.

2011-03-31  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (migrate_37_to_38): Use "mv" to do the move, because
	"rename" requires the dirs to be on the same file system.  Backport from
	trunk; initially committed in r10663.

2011-03-08  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (delete_lsc_credential)
	(init_lsc_credential_iterator): Check both credentials in targets.

2011-03-02  Michael Wiegand <michael.wiegand@greenbone.net>

	Post release version bump.

	* CMakeLists.txt: Updated version number.

2011-03-02  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 2.0.2 release.

	* CHANGES: Updated.

2011-02-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (migrate_21_to_22): Keep going if it's a predefined
	format and the old directory is missing.

2011-02-24  Matthew Mundell <matthew.mundell@greenbone.net>

	Close some leaks found by Felix Wolfsteller.

	* src/manage_sql.c (PRINT): Close stream.
	(print_report_xml): Note about leaks.
	(create_target, create_agent): Free quoted_name before returning on error.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_TASKS free
	first_report.

2011-02-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/lsc_user.c (create_nsis_script): Compare fopen return to NULL
	instead of an integer.  From Felix Wolfsteller.

2011-02-23  Matthew Mundell <matthew.mundell@greenbone.net>

	Correct the host counting change from 2011-02-19, which overlooked many
	cases.  Add test manage_max_hosts_0 to test the basic cases.

	* src/manage_sql.c (manage_max_hosts): Replace the initial hostname check
	with similar checks on each host, done after the list is split into host.

	* src/tests/CMakeLists.txt: Add test manage_max_hosts_0.

	* src/tests/manage_max_hosts_0.c: New file.

2011-02-23  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.c, src/tests/common.h,
	src/tests/make_report_uuid_0.c: Correct include locations, so that more
	tests compile.

2011-02-21  Michael Wiegand <michael.wiegand@greenbone.net>

	Post release version bump.

	* CMakeLists.txt: Updated version number.

2011-02-21  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 2.0.1 release.

	* CHANGES: Updated.

2011-02-21  Michael Wiegand <michael.wiegand@greenbone.net>

	* INSTALL: Add gnupg and wget as optional prerequisites. Add a note
	regarding the optional prerequisites to the main prerequisites
	section. Fix typos.

2011-02-21  Matthew Mundell <matthew.mundell@greenbone.net>

	Prefer the feed to the imported signature when verifying report
	formats.  Hence increase database version to 41.  Add database
	migration from version 40 to 41.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 41.

	* src/manage_sql.c (migrate_40_to_41): New function.
	(database_migrators): Add migrate_40_to_41.
	(verify_report_format): Check the feed signature if there is one,
	otherwise check the database signature if there is one.  Remove storage
	of signature in database from feed.

	* doc/db.png: Update for version change.

2011-02-21  Matthew Mundell <matthew.mundell@greenbone.net>

	* report_formats/simple_topo_plot/create_report_import: In signature
	source file creation, remove empty param and order params as in the XML.

2011-02-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (manage_max_hosts): Explicitly deal with hostnames
	first.

2011-02-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (get_report_format_files): Mandate the C locale.

	* src/report_formats/create_signatures: Correct LC_ALL export.  Spotted by
	Michael Wiegand.  List files with ls instead of glob.

2011-02-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/report_formats/create_signatures: Mandate the locale.

2011-02-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/report_formats/create_signatures: Setup fake PDF/latex.xsl.  Quote
	$name in if test.  Add more verbose output.  Include parameters in signed
	file.

2011-02-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (setup_full_config_prefs): Remove duplicates.

2011-02-16  Matthew Mundell <matthew.mundell@greenbone.net>

	Set "unscanned_closed" to yes in the predefined configs.  Hence increase
	database version to 40.  Add database migration from version 39 to 40.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 40.

	* src/manage_sql.c (migrate_39_to_40_set_pref, migrate_39_to_40): New
	functions.
	(database_migrators): Add migrate_39_to_40.
	(setup_full_config_prefs): Set "unscanned_closed" to "yes".

	* doc/db.png: Update for version change.

2011-02-16  Michael Wiegand <michael.wiegand@greenbone.net>

	Fix the location where openvasmd looks for signatures.

	* CMakeLists.txt: Ensure OPENVAS_NVT_DIR is set.

	* src/CMakeLists.txt: Expose OPENVAS_NVT_DIR.

	* src/manage_sql.c (find_signature): Look for signatures in the
	subdirs of OPENVAS_NVT_DIR instead of
	OPENVAS_LIB_INSTALL_DIR/openvas/plugins.

2011-02-11  Matthew Mundell <matthew.mundell@greenbone.net>

	Make the fallback system report case more like the others.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_SYSTEM_REPORTS let
	init_system_report_type_iterator and manage_system_report produce the
	fallback report.  Set the format to txt for the fallback report.  Return
	the entire fallback report always, even when brief is true.

	* src/manage.c (get_system_report_types, manage_system_report): Return the
	fallback report on openvasmr failure.
	(init_system_report_type_iterator): Include fallback return in check.
	(FALLBACK_SYSTEM_REPORT_HEADER): New define.

2011-02-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_SYSTEM_REPORTS
	add a simple fallback text report to the error response.

2011-02-09  Stephan Kleine

	* CMakeLists.txt: Fix out of surce builds.

2011-02-08  Michael Wiegand <michael.wiegand@greenbone.net>

	Post release version bump.

	* CMakeLists.txt: Updated version number.

2011-02-08  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 2.0.0 release.

	* CMakeLists.txt: Updated version number.

2011-02-08  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* CHANGES: Updated for 2.0.0.

2011-02-08  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/XML/OMP.xml: Add MAX_NVT_COUNT and KNOWN_NVT_COUNT
	to CONFIG in GET_CONFIGS response.

	* doc/omp.rnc, doc/omp.html: Update from source.

2011-02-08  Michael Wiegand <michael.wiegand@greenbone.net>

	Consolidation: Move most of configuration and installation handling to
	top level CMakeLists.txt.

	* CMakeLists.txt: Move sqlite3 and uuid detection to pkg-config. Set
	all _CFLAGS and _LDFLAGS properly. Add all defines to CMAKE_C_FLAGS.
	Handle installation of logging configuration, report formats and
	schema formats.

	* src/CMakeLists.txt: Remove most configuration and installation. Use
	the LINK_FLAGS and COMPILE_FLAGS reported by pkg-config instead of
	hard coding them.

2011-02-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (report_counts_id_filt): Doc all params.

	* doc/db.png: Update for version change.

2011-02-07  Michael Wiegand <michael.wiegand@greenbone.net>

	* README: Remove inaccurate and redundant information.

2011-02-07  Matthew Mundell <matthew.mundell@greenbone.net>

	Remove the slow w3af NVT from the predefined configs.  Hence increase
	database version to 39.  Add database migration from version 38 to 39.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 39.

	* src/manage_sql.c (migrate_38_to_39): New function.
	(database_migrators): Add migrate_38_to_39.
	(init_manage): Add w3af excluder to the "all" NVT selector.  Adjust
	predefined config comments to match.

2011-02-07  Michael Wiegand <michael.wiegand@greenbone.net>

	* doc/CMakeLists.txt: Enable man and man-html targets only if the
	required tools have been found. Enable install target always since we
	ship pregenerated files as well.

2011-02-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (migrate_37_to_38): Succeed even if one of the old
	directories is missing.

2011-02-07  Matthew Mundell <matthew.mundell@greenbone.net>

	Enable logging of key informational messages when --verbose is given.

	* src/openvasmd_log_conf.cmake_in: Change levels to show all levels below
	DEBUG.

	* src/tracef.h (infof): New macro.

	* src/openvasmd.c, src/ompd.c, src/omp.c, src/manage_sql.c: Change
	appropriate tracefs to infos.

2011-02-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (init_config_task_iterator): Select current user's
	tasks only.

2011-02-04  Michael Wiegand <michael.wiegand@greenbone.net>

	Post release version bump.

	* CMakeLists.txt: Updated version number.

2011-02-04  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 2.0+rc4 crelease.

	* CHANGES: Updated.

2011-02-04  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* doc/db.png: Updated to DB rev 38.

2011-02-04  Matthew Mundell <matthew.mundell@greenbone.net>

	Place report formats in the directories required by the FHS.  Hence
	increase database version to 38.  Add database migration from version
	37 to 38.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 38.

	* src/manage_sql.c (migrate_37_to_38): New function.
	(database_migrators): Add migrate_37_to_38.
	(manage_report, manage_send_report, create_report_format)
	(delete_report_format): User data dir for global report formats, and state
	dir for user report formats.

	* src/manage.c (init_report_format_file_iterator): User data dir for
	global report formats, and state dir for user report formats.

	* src/CMakeLists.txt: Install global report formats to data dir.

2011-02-04  Michael Wiegand <michael.wiegand@greenbone.net>

	Place global schema formats into the correct directory to comply with
	the Filesystem Hierarchy Standard (FHS), version 2.3.

	* src/CMakeLists.txt: Install global schema formats to
	OPENVAS_DATA_DIR instead of OPENVAS_SYSCONF_DIR.

	* src/manage_sql.c (manage_schema): Read global schema formats from
	OPENVAS_DATA_DIR instead of OPENVAS_SYSCONF_DIR.

2011-02-04  Michael Wiegand <michael.wiegand@greenbone.net>

	* CMakeLists.txt: Remove obsolete comment.

2011-02-04  Michael Wiegand <michael.wiegand@greenbone.net>

	* doc/openvasmd.8.xml: Fix typos, add missing option.

	* doc/openvasmd.html, doc/openvasmd.8: Regenerated.

2011-02-04  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/report_formats/HTML/HTML.xsl (report): Include host in port selection.

2011-02-03  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* CMakeLists.txt: Removed check for libopenvas_base as
	this is already tested via pkgconf.

2011-02-03  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* doc/openvasmd.8.xml: Updated.

	* doc/openvasmd.html, doc/openvasmd.8: Rebuild.

2011-02-01  Michael Wiegand <michael.wiegand@greenbone.net>

	Switch openvas-manager to pkg-config.

	* CMakeLists.txt: Move checks for openvas-libraries, glib and gnutls
	to pkg-config.

	* INSTALL: Update requirements and installation instructions.

	* src/CMakeLists.txt, src/tests/CMakeLists.txt: Replace calls to
	libopenvas-config with the appropriate pkg-config calls.

2011-01-29  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* INSTALL: Added sections on database initialization and
	migration.

2011-01-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_NOTE and
	CLIENT_CREATE_OVERRIDE only count the hosts when hosts where given.

2011-01-28  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* INSTALL: Added section on creating initial admin user.

2011-01-21  Michael Wiegand <michael.wiegand@greenbone.net>

	Post release version bump.

	* CMakeLists.txt: Updated version number.

2011-01-21  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 2.0+rc3 crelease.

	* CHANGES: Updated.

	* INSTALL: Updated prerequisites.

2011-01-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd_log_conf.cmake_in: Add warning about passwords.

2011-01-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd_log_conf.cmake_in: Reduce max log level to warning in all
	groups, to prevent loggin of passwords in the standard install.

2011-01-19  Matthew Mundell <matthew.mundell@greenbone.net>

	Cleanup an error in the 35 to 36 migrator, in a new migrator.  Increase
	database version to 37.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 37.

	* src/manage_sql.c (migrate_36_to_37): New function.
	(database_migrators): Add migrate_36_to_37.

2011-01-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (migrate_35_to_36): Set target and config from correct
	table.

2011-01-19  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* src/otp.c, src/omp.c: Fix include path for nvt_categories.h.

2011-01-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (run_slave_task): Add SMB credential arg.
	(run_task): Pass SMB credential to run_slave_task.
	(delete_slave_task): Remove SMB credential too.

2011-01-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (run_slave_task): Check if the target has a credential,
	before creating one.

2011-01-15  Matthew Mundell <matthew.mundell@greenbone.net>

	Validate CREATE_ESCALATOR addresses.

	* src/manage_sql.c (validate_email): New function.
	(create_escalator): Validate email method addresses.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_ESCALATOR
	add validation error.

2011-01-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (email): Pass user supplied data via files instead
	of directly in the command.

2011-01-11  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* packaging/debian/control, packaging/debian/compat,
	packaging/debian/openvas-manager.dirs, packaging/debian/changelog,
	packaging/debian/copyright, packaging/debian/openvas-manager.install,
	packaging/debian/rules, packaging/debian/, packaging/: Removed.
	These packaging files are hopeless out of date and better packages
	are available by third parties already.

2011-01-10  Michael Wiegand <michael.wiegand@greenbone.net>

	Post release version bump.

	* CMakeLists.txt: Updated version number.

2011-01-10  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 2.0+rc2 crelease.

	* CHANGES: Updated.

2011-01-08  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/lsc_user.c (check_is_dir): Remove.
	(file_utils_rmdir_rf): Use libraries version of check_is_dir.

2011-01-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (manage_schema): Correct comments.

2011-01-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/lsc_user.c (ssh_privkey_create, ssh_pubkey_create): Restore command
	logging, masking out passwords.

2011-01-04  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/lsc_user.c (ssh_privkey_create, ssh_pubkey_create): Remove command
	logging.

	* src/manage_sql.c (sql_quiet): New function.
	(create_lsc_credential): Use sql_quiet instead of sql, to prevent password
	logging.

2011-01-03  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/manage.c (send_user_rules): Extended todo comment about another
	location that deals with the rules file format.

2010-12-30  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* src/openvasmd.c (main): Added forgotten license note.

2010-12-30  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* src/openvasmd.c (main): Adapted --version output to
	comply with GNU Coding Standards
	(http://www.gnu.org/prep/standards/standards.html#g_t_002d_002dversion)

2010-12-29  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* src/openvasmd.c (main): Improved description text.

2010-12-22  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/XML/OMP.xml: Update version to 2.0.

	* doc/omp.rnc, doc/omp.html: Update from source.

2010-12-21  Michael Wiegand <michael.wiegand@greenbone.net>

	Post release version bump.

	* CMakeLists.txt: Updated version number.

2010-12-21  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 2.0+rc1 release.

	* CHANGES: Updated.

	* CMakeLists.txt: Updated version number.

2010-12-21  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/report_formats/LaTeX/latex.xsl (results-overview)
	(results-overview-table-single-host-row): Add Log.

2010-12-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/omp.rnc, doc/omp.html: Update from source.

2010-12-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/XML/OMP.xml: Remove GET_TASKS RESULT_COUNT.

2010-12-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/XML/OMP.xml: Split CREATE_TARGETS and GET_TARGETS
	LSC credentials into SSH and SMB credentials.

2010-12-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/XML/OMP.xml: Add port range to CREATE_TARGET and
	GET_TARGETS.

2010-12-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/XML/OMP.xml: Neaten comment.

2010-12-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/XML/OMP.xml: Adjust GET_REPORTS result counts for
	recent filtering additions.

2010-12-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/XML/OMP.xml: Add trust time to GET_AGENTS.

2010-12-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/XML/OMP.xml: Modify CREATE_TASK, GET_SYSTEM_REPORTS,
	GET_TASKS and MODIFY_TASK for OMP 2.0 master slave feature.

2010-12-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/XML/OMP.xml: Add CVE and BID to RESULT/NVT in
	GET_RESULTS, GET_NOTES and GET_OVERRIDES.

2010-12-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/XML/OMP.xml: Remove tabs.

2010-12-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/XML/OMP.xml: Update GET_REPORTS for OMP 2.0.

2010-12-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/XML/OMP.xml: Update help text in help example.

	* doc/omp.html: Update from source.

2010-12-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/XML/OMP.xml: Add remaining commands new in OMP 2.

	* doc/omp.rnc, doc/omp.html: Update from source.

2010-12-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_TASKS set progress
	to 1 if 0 and 99 if 100, so it looks like something is going on when it
	is.

2010-12-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/XML/OMP.xml: Note report filtering changes.

2010-12-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (validate_port_range): New function.
	(create_target): Validate port range.

	* src/omp.c (omp_xml_handle_start_element): Init port range in
	CREATE_TARGET PORT_RANGE, so that the port range is empty instead of NULL
	when the port range element is empty.
	(omp_xml_handle_end_element): In CLIENT_CREATE_TARGET handle port range
	error.

2010-12-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (print_report_xml): Only send filtered results for
	requested threat levels.

2010-12-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (report_counts_match): Move up in file.
	(report_counts_filtered, report_counts_id_filt): Make constraints NULL if
	"".  Check constraints properly.

2010-12-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (report_count_filtered, report_counts_match): New
	functions.
	(report_counts_id_filt): New function.  Body from report_counts_id.  Add
	filtered result counting.
	(report_counts_id): Call through to report_counts_id_filt.
	(print_report_xml): Add filtered counts.

2010-12-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (migrate_35_to_36): Ensure example task references are
	IDs.  Set port range on any leftover targets to "default".

2010-12-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (init_manage_process): Correct error message.

2010-12-16  Matthew Mundell <matthew.mundell@greenbone.net>

	Move port range from config into target.  Hence increase database version
	to 36.  Add database migration from version 35 to 36.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 36.

	* src/manage_sql.c (duplicate_target, sql_uniquify): New functions.
	(create_tables): Add port_range to table targets.
	(migrate_35_to_36): New function.
	(database_migrators): Add migrate_35_to_36.
	(init_manage_process): Create SQL function uniquify.
	(create_target): Add port_range arg.
	(init_target_iterator): Add port_range field.
	(target_iterator_port_range): New function.
	(manage_nvt_preference_add): Prevent addition of port range.

	* src/manage.c (send_config_preferences): Skip over port range, just in
	case.
	(run_task): Send port range from target.

	* src/manage.h, src/manage_sql.h: Update headers accordingly.

	* src/omp.c (create_target_data_t, create_target_data_reset)
	(client_state_t): Add CREATE_TARGET port range.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Add PORT_RANGE to TARGET.  Send port range in
	GET_TARGETS.

2010-12-16  Michael Wiegand <michael.wiegand@greenbone.net>

	* CMakeLists.txt: Add a collection of code hardening flags to
	CMAKE_C_FLAGS, inspired by hardening-wrapper on Debian. Add -Werror to
	CMAKE_C_FLAGS to make all warnings fatal.

2010-12-16  Michael Wiegand <michael.wiegand@greenbone.net>

	* doc/CMakeLists.txt: Handle absence of doxygen more gracefully.

2010-12-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* README: Update gsa-desktop to GSD.

2010-12-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/db_postgres.sql (targets): Add smb_lsc_credential.

	* doc/db.png: Update from SQL.

2010-12-13  Matthew Mundell <matthew.mundell@greenbone.net>

	Split target credential into SSH credential and SMB credential.  Hence
	increase database version to 35.  Add database migration from version
	34 to 35.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 35.

	* src/manage_sql.c (create_tables): Add smb_lsc_credential to table
	targets.
	(migrate_34_to_35): New function.
	(database_migrators): Add migrate_34_to_35.
	(create_target): Convert single credential arg into two.
	(init_target_iterator): Add extra credential field.
	(target_iterator_lsc_credential, target_lsc_credential): Remove.  Replace
	with SSH versions.
	(target_iterator_smb_credential, target_iterator_ssh_credential)
	(target_ssh_lsc_credential, target_smb_lsc_credential): New functions.
	(init_lsc_credential_target_iterator): Select targets used by both
	credentials.

	* src/manage.c (run_task): Send SSH and SMB preferences separately.

	* src/manage.h, src/manage_sql.h: Update headers accordingly.

	* src/omp.c (create_target_data_t, create_target_data_reset)
	(client_state_t): Convert single credential field into two.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Convert
	CREATE_TARGET LSC_CREDENTIAL into SSH and SMB entities.  Same for TARGET
	in GET_TARGETS.

2010-12-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/XML/OMP.xml: Add some of the commands new in OMP 2.

	* doc/omp.rnc, doc/omp.html: Update from source.

2010-12-10  Michael Wiegand <michael.wiegand@greenbone.net>

	Post release version bump.

	* CMakeLists.txt: Updated version number.

2010-12-10  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 2.0+beta3 release.

	* CHANGES: Updated.

2010-12-09  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/CMakeLists.txt (C_FILES): Add lsc_user.c.

2010-12-09  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (lsc_credential_iterator_rpm)
	(lsc_credential_iterator_deb, lsc_credential_iterator_exe): Get
	login name from right column.

2010-12-09  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/report_formats/LaTeX/latex.xsl
	(result-details-host-port-threat): Add threat to subsubsection
	name.

2010-12-09  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/report_formats/LaTeX/latex.xsl (latex-subsection)
	(latex-subsubsection, latex-hyperref): Escape name.

2010-12-09  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/report_formats/LaTeX/latex.xsl
	(single-host-overview-table-row): Add threat to hyperref target.
	(result-details-host-port-threat): Add threat to label.

2010-12-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (manage_max_hosts): Limit range size in octet ranges
	to 256.

2010-12-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/HTML/HTML.xsl (command): Correct contents number.

	* doc/omp.html: Update from source.

2010-12-06  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/HTML/HTML.xsl (structure-line): Add C case.  In R
	case add _response suffix and shorten description.  Emit element suffix
	after "One of" in OR case.

	* doc/omp.html: Update from source.

2010-12-06  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/XML/OMP.xml: Add commands to COMMANDS pattern.

	* doc/omp.rnc, doc/omp.html: Update from source.

2010-12-06  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/RNC/rnc.xsl,
	src/schema_formats/HTML/rnc.xsl (ele): Inline the body of the type
	element, otherwise the ele will have the same name as the type element.

	* doc/omp.rnc, doc/omp.html: Update from source.

2010-12-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (REPORT_NOTICE_FORMAT, escalate_1): Add note above
	report if report was truncated.

2010-12-03  Tim Brown <timb@openvas.org>

	* report_formats/IVIL/IVIL.xml, report_formats/IVIL/generate: New.
	Preliminary support for IVIL (http://ivil.sourceforge.net/).

2010-12-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (SIMPLE_NOTICE_FORMAT, escalate_1): Add generic event
	description to sentence about condition.

2010-12-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (REPORT_NOTICE_FORMAT, escalate_1): Add task name and
	event to first two sentences.

2010-12-02  Matthew Mundell <matthew.mundell@greenbone.net>

	Increase database version to 33 to ensure change the "NTLMSSP" preference
	on the "Login Configurations" checkbox.  Add database migration from
	version 33 to 34.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 34.

	* src/manage_sql.c (migrate_33_to_34, migrate_33_to_34_set_pref): New
	functions.
	(database_migrators): Add migrate_33_to_34.
	(setup_full_config_prefs): Set NTLMSSP to yes.

2010-12-01  Michael Wiegand <michael.wiegand@greenbone.net>

	Post release version bump.

	* CMakeLists.txt: Updated version number.

2010-11-30  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/HTML/HTML.xsl (structure-line): Remove type check
	from global element case, because the type is the global element type.

	* doc/omp.html: Update from source.

2010-11-30  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/HTML/HTML.xsl (structure-line): In the global element
	case link the tag text to the element details.

	* doc/omp.html: Update from source.

2010-11-30  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/HTML/HTML.xsl (structure-line): Handle the global
	element case separately, so that summaries show up.

	* doc/omp.html: Update from source.

2010-11-30  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/XML/OMP.xml: Remove fullstops from summaries.

	* doc/omp.rnc, doc/omp.html: Update from source.

2010-11-30  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* CHANGES: Updated for upcoming 2.0 beta2.

2010-11-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* ChangeLog, TODO, src/lsc_user.c, src/lsc_user.h, src/manage_sql.h,
	src/schema_formats/HTML/rnc.xsl, src/schema_formats/RNC/rnc.xsl,
	src/tests/omp_authenticate_0.c, src/tests/omp_commands_0.c,
	src/tests/omp_create_config_0.c, src/tests/omp_create_config_1.c,
	src/tests/omp_create_lsc_credential_0.c,
	src/tests/omp_create_lsc_credential_1.c, src/tests/omp_create_target_0.c,
	src/tests/omp_create_target_1.c, src/tests/omp_create_task_2.c,
	src/tests/omp_create_task_3.c, src/tests/omp_create_task_4.c,
	src/tests/omp_delete_config_0.c, src/tests/omp_delete_config_1.c,
	src/tests/omp_delete_lsc_credential_0.c, src/tests/omp_delete_target_0.c,
	src/tests/omp_delete_target_1.c, src/tests/omp_get_configs_0.c,
	src/tests/omp_get_configs_1.c, src/tests/omp_get_configs_2.c,
	src/tests/omp_get_configs_3.c, src/tests/omp_get_lsc_credentials_0.c,
	src/tests/omp_get_lsc_credentials_1.c,
	src/tests/omp_get_lsc_credentials_2.c, src/tests/omp_get_report_8.c,
	src/tests/omp_get_targets_0.c, src/tests/omp_get_targets_1.c,
	src/tests/omp_start_task_3.c, src/tests/omp_start_task_5.c: Replace
	Intevation addresses with Greenbone ones.

2010-11-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* CMakeLists.txt, ChangeLog, doc/CMakeLists.txt, doc/openvasmd.8.xml,
	src/CMakeLists.txt, src/logf.h, src/manage.c, src/manage.h,
	src/manage_sql.c, src/omp.c, src/omp.h, src/ompd.c, src/ompd.h,
	src/openvasmd.c, src/otp.c, src/otp.h, src/otpd.c, src/otpd.h,
	src/ovas-mngr-comm.c, src/oxpd.c, src/oxpd.h, src/splint.h,
	src/tests/CMakeLists.txt, src/tests/common.c, src/tests/common.h,
	src/tests/make_report_uuid_0.c, src/tests/omp_abort_task_0.c,
	src/tests/omp_bogus_0.c, src/tests/omp_bogus_1.c,
	src/tests/omp_create_task_0.c, src/tests/omp_create_task_1.c,
	src/tests/omp_delete_report_0.c, src/tests/omp_delete_report_1.c,
	src/tests/omp_delete_task_0.c, src/tests/omp_delete_task_1.c,
	src/tests/omp_delete_task_2.c, src/tests/omp_get_certificates_0.c,
	src/tests/omp_get_certificates_1.c, src/tests/omp_get_dependencies_0.c,
	src/tests/omp_get_dependencies_1.c, src/tests/omp_get_nvt_all_0.c,
	src/tests/omp_get_nvt_all_1.c, src/tests/omp_get_nvt_details_0.c,
	src/tests/omp_get_nvt_details_1.c, src/tests/omp_get_nvt_details_2.c,
	src/tests/omp_get_nvt_details_3.c, src/tests/omp_get_nvt_details_4.c,
	src/tests/omp_get_nvt_feed_checksum_0.c,
	src/tests/omp_get_nvt_feed_checksum_1.c,
	src/tests/omp_get_nvt_feed_checksum_2.c,
	src/tests/omp_get_nvt_feed_checksum_3.c,
	src/tests/omp_get_nvt_feed_checksum_4.c,
	src/tests/omp_get_nvt_feed_checksum_5.c,
	src/tests/omp_get_preferences_0.c, src/tests/omp_get_preferences_1.c,
	src/tests/omp_get_preferences_2.c, src/tests/omp_get_report_0.c,
	src/tests/omp_get_report_1.c, src/tests/omp_get_report_2.c,
	src/tests/omp_get_report_3.c, src/tests/omp_get_report_4.c,
	src/tests/omp_get_report_5.c, src/tests/omp_get_report_6.c,
	src/tests/omp_get_report_7.c, src/tests/omp_get_rules_0.c,
	src/tests/omp_get_rules_1.c, src/tests/omp_get_status_0.c,
	src/tests/omp_get_status_1.c, src/tests/omp_get_status_2.c,
	src/tests/omp_get_status_3.c, src/tests/omp_get_status_4.c,
	src/tests/omp_get_status_5.c, src/tests/omp_get_version_0.c,
	src/tests/omp_help_0.c, src/tests/omp_help_1.c,
	src/tests/omp_modify_report_0.c, src/tests/omp_modify_task_0.c,
	src/tests/omp_modify_task_1.c, src/tests/omp_start_task_0.c,
	src/tests/omp_start_task_1.c, src/tests/omp_start_task_2.c,
	src/tests/omp_start_task_4.c, src/tests/read_protocol_0.c,
	src/tests/strip_space_0.c, src/tests/strip_space_1.c,
	src/tests/strip_space_2.c, src/tests/strip_space_3.c,
	src/tests/timeout_0.c, src/tracef.h, src/types.h: Use Greenbone address.

2010-11-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (set_nvts_md5sum): Doc arg.

	* src/manage.h (create_report_format_param_t): Doc fields.

2010-11-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/HTML/HTML.xsl (rnc-preamble): New template.
	(protocol): Add RNC preamble section.  Adjust index numbers accordingly.

	* src/schema_formats/HTML/rnc.xsl (preamble): New template.  From ../RNC/.

	* src/schema_formats/RNC/rnc.xsl (preamble): New template.  From RNC.xsl.

	* src/schema_formats/RNC/RNC.xsl (preamble): Remove.  To rnc.xsl.

	* doc/omp.html: Update from source.

2010-11-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/XML/OMP.xml: Add COMMAND/EXAMPLE to the schema case
	of HELP.

	* doc/omp.rnc, doc/omp.html: Update from source.

2010-11-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/XML/OMP.xml: Add COMMAND/RESPONSE to the schema case
	of HELP.

	* doc/omp.rnc, doc/omp.html: Update from source.

2010-11-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (http_get, manage_report, manage_send_report)
	(manage_schema): Make trace messages g_debug instead of g_message.
	(init_manage_process): Make failure messages g_warnings.

	* src/omp.c, src/openvasmd.c: Downgrade messages of possibly interesting
	events to level info.

2010-11-26  Matthew Mundell <matthew.mundell@greenbone.net>

	Add the schema parts of the HELP command to the HELP response, including
	an example.  To make it easier to define the recursive parts of the HELP
	response syntax, add a new PROTOCOL element, ELEMENT, alongside TYPE and
	COMMAND.

	* src/schema_formats/XML/OMP.xml: Add schema parts of HELP.

	* src/schema_formats/HTML/rnc.xsl,
	src/schema_formats/RNC/rnc.xsl (e): Adjust for new top level ELEMENTs.
	Update callers accordingly.
	(ele): Adjust for new TYPE property, which allows ELEs to be defined
	by refering to ELEMENTs instead of including PATTERNs.

	* src/schema_formats/RNC/rnc.xsl (elements): New template.
	(protocol): Add elements section.

	* src/schema_formats/HTML/HTML.xsl (pretty): Special case p to preserve
	formatting.
	(type [details], type-details, command, command-summary)
	(command-details): Update section numbers.
	(element [index], element-summary, element): New templates.
	(protocol): Add element sections.

	* doc/omp.rnc, doc/omp.html: Update from source.

2010-11-25  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c, src/manage_sql.c: Include unistd.h, for when tracing is
	off.

2010-11-25  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/HTML/HTML.xsl (func:string-left-trim-nl)
	(func:string-right-trim-nl, func:string-trim-nl): New function.
	(pretty): Special case help_response to preserve formatting.

	* src/schema_formats/XML/OMP.xml: Add HELP example.

	* doc/omp.html: Update from source.

2010-11-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ompd.c (serve_omp): Make the second timeout check like the first.
	Make the second timeout trace message unique.

2010-11-23  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (sql_x): Remove warning for too few rows, as caller can
	legitimately provide SQL that will select too few rows, for example when
	checking for existence.
	(sql_int): Add row expectation to doc.
	(sql_string): Note NULL ambiguity in return doc.

2010-11-23  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (compare_message_types_desc)
	(compare_message_types_asc, compare_port_threat): Include host in
	comparison.
	(print_report_xml): Account for host when removing duplicates.

2010-11-22  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (compare_message_types_desc)
	(compare_message_types_asc): Include port in comparison.
	(compare_port_threat): New function.
	(print_report_xml): Also do the threat sorting when sort_field is NULL,
	because init_result_iterator will have sorted by threat.  Call
	compare_port_threat instead of alphasort so that the ports are sorted
	by port and threat.  Remove array index with g_array_remove_index so that
	order is preserved.

2010-11-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (report_counts_id): Count false positives too.
	(task_trend): Request false positive count, as report_counts_id is faster
	with this count.

2010-11-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/report_formats/LaTeX/latex.xsl
	(latex-replace-backslash-dollar): Correct template name.

2010-11-19  Matthew Mundell <matthew.mundell@greenbone.net>

	Speed up row wrapping in the LaTeX report XSLT.

	* src/report_formats/LaTeX/latex.xsl (wrap-row-indented): New template.
	The indented case of wrap-row.
	(wrap-row): Remove indented test, which is covered by wrap-row-indented.
	Inline latex-newline.
	(break-into-rows-indented): New template.  The indented case of
	break-into-rows.
	(break-into-rows): Remove indented and max params.  Call break-into-rows
	instead of recursing with these params.

2010-11-19  Michael Wiegand <michael.wiegand@greenbone.net>

	Increased required openvas-libraries version.

	* CMakeLists.txt: Updated LO_MAJOR_MIN_VER and LO_MINOR_MIN_VER.

	* INSTALL: Document required version.

2010-11-19  Michael Wiegand <michael.wiegand@greenbone.net>

	Post release version bump.

	* CMakeLists.txt: Updated version number.

2010-11-19  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 2.0+beta1 release.

	* CHANGES: Fixed typos.

	* CMakeLists.txt: Updated version number. Changed
	CPACK_PACKAGE_VERSION for use with "+beta" versioning scheme.

2010-11-19  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* CHANGES: Improved.

2010-11-19  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* CHANGES: Updated.

2010-11-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/report_formats/LaTeX/latex.xsl (wrap-row): Call escape_verb_env
	directly, instead of as the value of a variable, to increase speed.

2010-11-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (create_config_data_reset)
	(create_report_format_data_reset): Check item exists, in case array is
	NULL terminated.

	* ChangeLog: Restore overwritten entry.

2010-11-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (report_counts_id): Remove initialisation of debugs
	from "all" case.
	(task_trend): Pass logs to report_counts_id, as this is faster.

2010-11-12  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (report_counts_id): If all levels are required count
	them all in one go, using the three part select from report_count.

2010-11-12  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (report_count): Put the zero comparisons first in the
	overrides select.

2010-11-12  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (report_count): Convert the complex override select to
	multiple simpler selects, to increase speed.

2010-11-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (report_count): Only do the overrides case if the user
	has overrides.

2010-11-11  Raimund Renkert <raimund.renkert@greenbone.net>

	* report_formats/simple_map_plot/generate: Generate the symbol for
	non-georeferenced IPs using twopi.

	* report_formats/simple_map_plot/non-georeferenced.map: Render png symbol
	instead of a label on the map.

	* report_formats/simple_map_plot/create_report_import: Added new files.

	* report_formats/simple_map_plot/non-georeferenced.dot: New.

2010-11-10  Matthew Mundell <matthew.mundell@greenbone.net>

	Speed up GET_TASKS.

	* src/manage_sql.c (create_tables): Add more indexes.
	(report_count): Select ID fields as integers instead of strings.  Reorder
	the constraints in the standard case.
	(report_counts_id): Just set debugs and false_positives to 0, to save some
	time.
	(delete_agent): Select ID fields as integers instead of strings.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_TASKS remove the
	result counts over all scans for a task, use the report count for the
	first report for the last and second last reports if they are the same
	report and turn off the progress tracing.

2010-11-10  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (create_tables): Add a task index for table results.

2010-11-09  Matthew Mundell <matthew.mundell@greenbone.net>

	Create LSC credential packages on every GET_LSC_CREDENTIAL, instead of
	once in CREATE_LSC_CREDENTIAL.

	* src/lsc_user.c (lsc_user_keys_create, lsc_user_rpm_recreate)
	(lsc_user_deb_recreate, lsc_user_exe_recreate): New functions.
	(alien_found): Move up in file.

	* src/manage.h: Add headers accordingly.

	* src/manage_sql.c (create_lsc_credential): Just create the keys,
	instead of all packages.
	(lsc_credential_iterator_rpm, lsc_credential_iterator_deb)
	(lsc_credential_iterator_exe): Create packages instead of returning
	cached packages.

2010-11-09  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* src/ompd.c, src/otpd.c, src/lsc_user.h, src/manage.c,
	src/omp.c, src/openvasmd.c, src/manage.h: Adjusted include
	patch for header files of libopenvas_misc.

2010-11-09  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/HTML/HTML.xsl (type [details]): Add RNC heading.
	Print type RNC as a type instead of as an element.

	* src/schema_formats/HTML/rnc.xsl, src/schema_formats/RNC/rnc.xsl: Work
	around RNC restrictions on treating element text as data when element
	contains other elements.

	* src/schema_formats/XML/OMP.xml: Remove GET_TASKS elements left over from
	sample.

	* doc/omp.html, doc/omp.rnc: Update from source.

2010-11-09  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/HTML/HTML.xsl (type [details]): Add RNC heading.
	Print type RNC as a type instead of as an element.

	* src/schema_formats/HTML/rnc.xsl: Normalise space as in RNC version.
	Remove rare wrap to match RNC version.

	* src/schema_formats/RNC/rnc.xsl: Match to HTML version.

	* src/schema_formats/XML/OMP.xml: Correct typos and GET_REPORTS element
	name.

2010-11-09  Raimund Renkert <raimund.renkert@greenbone.net>

	* report_formats/simple_map_plot/generate: Render label for
	non-georeferenced IPs on the world map.

	* report_formats/simple_map_plot/world_map.map: Include Layer for
	non-georeferenced IPs.

	* report_formats/simple_map_plot/non-georeferenced.map: New.

2010-11-08  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/XML/OMP.xml: Add remaining GET commands.

	* src/schema_formats/HTML/HTML.xsl (pretty): Remove extra select.
	(type [details], command): Make RNC blocks wider.

	* src/schema_formats/HTML/rnc.xsl (wrap): Only add the final newline
	when the text contains newlines.
	(wrap-line): Bring width down to 76.

	* src/schema_formats/RNC/RNC.xsl (types): Normalise space of pattern.

	* src/schema_formats/RNC/rnc.xsl (rnc-type, attrib, t, ele): Normalise
	space.

2010-11-04  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/XML/OMP.xml: Add more GET commands.

	* src/schema_formats/HTML/HTML.xsl (print-attributes): Add level arg to
	print each attribute after first on a new line.  Update callers.

	* src/schema_formats/HTML/rnc.xsl (wrap, wrap-line): New templates.
	(pattern): Wrap text in patterns.

	* doc/omp.html, doc/omp.rnc: Update from source.

2010-11-04  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* report_formats/simple_map_plot/README.txt: Added note
	on required tools.

2010-11-04  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* report_formats/simple_map_plot/,
	report_formats/simple_map_plot/join.awk,
	report_formats/simple_map_plot/world_map.map,
	report_formats/simple_map_plot/FreeSans.ttf,
	report_formats/simple_map_plot/locations.csv,
	report_formats/simple_map_plot/fonts.txt,
	report_formats/simple_map_plot/create_report_import,
	report_formats/simple_map_plot/hosts.vrt,
	report_formats/simple_map_plot/report_to_csv_host.xsl,
	report_formats/simple_map_plot/generate,
	report_formats/simple_map_plot/README.txt,
	report_formats/simple_map_plot/world_map.tiff: New.
	Report Format plugin that rednders host scan results
	on a world map. Most work done by Raimund Renkert.

2010-11-04  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/report_formats/LaTeX/latex.xsl, src/report_formats/HTML/HTML.xsl,
	src/report_formats/TXT/TXT.xsl: Describe which results are in the report,
	below the description of which filters are in effect.

2010-11-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/XML/OMP.xml: Add GET_PREFERENCES.

	* doc/omp.html, doc/omp.rnc: Update from source.

2010-11-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/HTML/HTML.xsl (type): Skip link for type "text".

	* doc/omp.html: Update from source.

2010-11-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/HTML/HTML.xsl: Remove more bold.

2010-11-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/HTML/HTML.xsl: Rename command "breakdown" to
	"structure".

2010-11-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/HTML/HTML.xsl: Reduce the amount of bold, so that the
	headings stand out a bit better.

2010-11-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/HTML/HTML.xsl: Match contents items to real headings.
	Link command breakdown attribute types to type details.  Use @ instead of
	quotations to mark attribs in command breakdown.

	* doc/omp.html, doc/omp.rnc: Update from source.

2010-11-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/XML/OMP.xml: Add missing type summaries.

2010-11-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/HTML/HTML.xsl: Add a small contents section.

2010-11-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/HTML/HTML.xsl: Add "Data Types".

2010-11-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/HTML/HTML.xsl, src/schema_formats/RNC/RNC.xsl: Add
	version.

2010-11-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (manage_schema): Doc param.

2010-11-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/XML/OMP.xml: Add more get commands.
	(create_escalator): Make data elements "any".
	(get_version): Add VERSION.

	* src/schema_formats/HTML/HTML.xsl: Normalize space for summary, in case
	the closing SUMMARY tag is on a new line.

	* doc/omp.html, doc/omp.rnc: Update from source.

2010-11-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/report_formats/LaTeX/latex.xsl (longtable-continue-block): Rename
	Result Overview columns with threat names.

2010-11-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (init_host_iterator): Add const to arg.

	* src/manage.h: Update headers accordingly.

	* src/report_formats/PDF/generate: Use batch mode, so TeX does its best
	to produce the document, including dealing with missing Unicode chars
	or other binary in the doc.

2010-10-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/HTML/HTML.xsl (type): New template.
	(breakdown-line): Add alts, for types that are a simple choice of strings.
	Add g, to group elements in patterns.

	* src/schema_formats/HTML/rnc.xsl,
	src/schema_formats/RNC/rnc.xsl (rnc-type): New template.
	(attrib): Call type template instead of matching.
	(t): Add alts handling.
	(pattern-part): Add g handling.

	* doc/omp.html, doc/omp.rnc: Update from source.

	* src/schema_formats/XML/OMP.xml: Add more get commands.  Use alts
	instead of xsd:token string for file modify_task attach action.

2010-10-27  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (MANAGE_SEND_REPORT_CHUNK64_SIZE)
	(MANAGE_SEND_REPORT_CHUNK_SIZE): New defines.
	(manage_send_report, report_format_content_type)
	(report_format_extension): New functions.

	* src/manage.h: Update headers accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_REPORTS call
	manage_send_report instead of using manage_report, so that big reports
	are sent in chunks.

2010-10-27  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/XML/OMP.xml: Add create commmands.

	* src/schema_formats/HTML/HTML.xsl (description): Add lists.
	(pretty): Explicitly indent element text.
	(breakdown-line): Add r, to refer to command responses.

	* src/schema_formats/HTML/rnc.xsl, src/schema_formats/RNC/rnc.xsl: Add r
	to pattern, to refer to command responses.

	* doc/omp.html, doc/omp.rnc: Update from source.

2010-10-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/report_formats/LaTeX/latex.xsl (header): Define another character
	that seems to be missing from Debian Lenny ucs LaTeX package.

2010-10-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/HTML/rnc.xsl, src/schema_formats/RNC/rnc.xsl: Always
	print the text content of an element.

	* doc/omp.html, doc/omp.rnc: Update from source.

2010-10-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/XML/OMP.xml: Add modify commmands.

2010-10-25  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (strbchr, manage_max_hosts): New functions.  From
	omp.c.
	(create_target): Count hosts here, to ensure within limit in import case.

	* src/omp.c (strbchr, max_hosts, MAX_HOSTS): Remove.  To manage_sql.c and
	manage.h.  Update callers.
	(omp_xml_handle_end_element): In CREATE_TARGET move hosts error cases into
	create_target returns.

	* src/manage.h: Add header accordingly.
	(MANAGE_MAX_HOSTS): New define.

2010-10-25  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/CMakeLists.txt (doc, doc-full): Add OMP docs.
	(omp.rnc, omp.html): New targets.

	* doc/omp.html, doc/omp.rnc: New files.  Generated from XML source.

2010-10-25  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/XML/OMP.xml: Add task control commmands.

2010-10-25  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/report-format-HOWTO: Note the extra report element.

	* report_formats/simple_pie_chart/create_report_import: Add param Height.

	* report_formats/simple_pie_chart/pieplot.xsl: Read height from new param.

	* report_formats/simple_topo_plot/create_report_import: Add params "Graph
	Type" and "Node Distance".

	* report_formats/simple_topo_plot/generate: Read plot tool from param.

	* report_formats/simple_topo_plot/hostvisdot-summary.xsl: Read nodesep
	from param.

2010-10-25  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): Increase GET_VERSION version.

2010-10-25  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (check_host_netmasks): Remove.
	(MAX_HOSTS): New define.
	(omp_xml_handle_end_element): Limit number of hosts in CREATE_NOTE,
	CREATE_OVERRIDE and CREATE_TARGET to 4095.

2010-10-21  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/XML/OMP.xml: Add AUTHENTICATE.

2010-10-21  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/schema_formats/XML/OMP.xml: Add missing delete commands.

2010-10-21  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (create_config_data_reset)
	(create_report_format_data_reset): Iterate over array using length,
	instead of depending on terminator.

2010-10-21  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/report_formats/TXT/TXT.xsl (override): Only include override when
	overrides are in effect, as in other reports.

2010-10-21  Matthew Mundell <matthew.mundell@greenbone.net>

	Ensure that the TXT report matches the GSA report in terms of note and
	override information.

	* src/report_formats/TXT/TXT.xsl (wrap-line): Bring max down to 80.
	(note, override): Replace HTML with text.
	(result [issue]): Add space after "Overriden from".  Remove arg.  Enable
	notes and overrides selections.
	(report): Add details of what the report includes.

2010-10-21  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (modify_override): Add "False Positive" to possible
	new_threat values.

2010-10-20  Matthew Mundell <matthew.mundell@greenbone.net>

	Ensure that the LaTeX and HTML reports match the GSA report in terms of
	note and override information.

	* src/report_formats/LaTeX/latex.xsl (wrap-row, break-into-rows)
	(text-to-escaped-row): Add colour param.
	(results-overview): Say whether notes are included.  Match filters by
	text so they show up.
	(single-host-overview-table-row): Match threat by text.
	(threat-to-color): Add False Positive.
	(notes): New template.
	(overrides): Add the original threat to the heading.  Use
	text-to-escaped-row for the text, in case there are newlines.
	(result-details-host-port-threat): Match threat by text.  Add original
	threat to heading.
	(result-details-host-port-threat): Include notes.
	(results-per-host-single-host-findings): Correct False Positive select.

	* src/report_formats/HTML/HTML.xsl (override): Only include when overrides
	are in effect.
	(report): Note what the report contains.

2010-10-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (init_manage): Set flags to enable report formats when
	creating them.

2010-10-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (max_hosts): Add counting for IPv6 addresses.

2010-10-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (print_report_xml): Correct param doc.
	(manage_report): Correct error message.  Free params in same order.

2010-10-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (max_hosts): Ensure mask has dots in subnet mask case.

2010-10-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (check_host_netmasks): New function.  From GSA
	validate_hosts_parameter.
	(omp_xml_handle_end_element): Check host netmasks for CREATE_TARGET,
	CREATE_NOTE and CREATE_OVERRIDE.

2010-10-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_TARGET only
	allow creation if max_hosts succeeds on the hosts value.

2010-10-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (strbchr): New function.
	(max_hosts): Handle addresses with ranges.

2010-10-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/Doxyfile.in: Remove accidental junk from last commit.

2010-10-18  Matthew Mundell <matthew.mundell@greenbone.net>

	Extend OMP HELP to return a documented partial OMP schema in various
	formats.

	* src/omp (help_data_t): New type.
	(help_data_reset): New function.
	(command_data_t): Add help.
	(help_data): New variable.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Add format
	attribute to OMP HELP.

	* src/manage_sql.c (manage_schema): New function.  Returns schema in
	given format.

	* src/manage.h: Add header accordingly.

	* src/CMakeLists.txt: Install schema formats.

	* src/schema_formats/, src/schema_formats/HTML/,
	src/schema_formats/HTML/HTML.xsl, src/schema_formats/HTML/generate,
	src/schema_formats/HTML/rnc.xsl, src/schema_formats/RNC/,
	src/schema_formats/RNC/RNC.xsl, src/schema_formats/RNC/generate,
	src/schema_formats/RNC/rnc.xsl, src/schema_formats/XML/,
	src/schema_formats/XML/OMP.xml, src/schema_formats/XML/generate: New dirs
	and files.  First schema formats.

2010-10-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp (omp_xml_handle_end_element): Terminate MODIFY_CONFIG arrays at
	the close of the associated element instead of before handling the
	request.  This ensures that the arrays are always terminated, even in the
	error response cases.

2010-10-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (create_lsc_credential): Correct comment on second
	last commit, which is actually moving the login check so that
	password-only credentials can have any login.

2010-10-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (init_param_option_iterator): Correct doc param name.

2010-10-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (create_lsc_credential): Move password check into
	package case, so that password-only credentials can have any password.

2010-10-07  Matthew Mundell <matthew.mundell@greenbone.net>

	Add OMP command MODIFY_LSC_CREDENTIAL.

	* src/manage_sql.c (set_lsc_credential_name, set_lsc_credential_comment)
	(set_lsc_credential_login, set_lsc_credential_password)
	(lsc_credential_packaged): New functions.

	* src/manage.h: Add headers accordingly.

	* src/omp.c (help_text): Add new command.
	(modify_lsc_credential_data_t): New type.
	(modify_lsc_credential_data_reset): New function.
	(command_data_t, client_state_t): Add new command elements.
	(modify_lsc_credential_data): New variable.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Add MODIFY_LSC_CREDENTIAL handling.

2010-10-06  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (create_report_format): Remove stray variable.

2010-10-06  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (create_report_format): Check param type names.

	* src/omp.c (omp_xml_handle_end_element): In CREATE_REPORT_FORMAT add
	param type name error case.

2010-10-06  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (create_report_format): Check for duplicate param
	names.

	* src/omp.c (omp_xml_handle_end_element): In CREATE_REPORT_FORMAT add
	duplicate param case.

2010-10-06  Matthew Mundell <matthew.mundell@greenbone.net>

	* report_formats/simple_bar_chart/create_report_import: Cleanup
	range end examples after second last commit.

2010-10-06  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (create_report_format): Always remove format dir on
	failure.  Always free dir.

2010-10-06  Matthew Mundell <matthew.mundell@greenbone.net>

	* report_formats/simple_bar_chart/create_report_import: Remove + from
	example range end, to ensure verification succeeds.

2010-10-06  Matthew Mundell <matthew.mundell@greenbone.net>

	* report_formats/simple_topo_plot/create_report_import: Remove extra FILE.

2010-10-06  Matthew Mundell <matthew.mundell@greenbone.net>

	Include params in report format verification.

	* src/manage_sql.c (create_report_format): Get param type and value the
	right way round for verification.  Add type min, type max and fallback to
	verification.  Require params to have a type.  Use range ends to indicate
	when type min and max were left out.  Require params to have a fallback.
	(verify_report_format): Add param type qualifiers.
	(init_report_format_param_iterator): Add type_regex.
	(report_format_param_iterator_type_regex)
	(report_format_param_iterator_fallback): New functions.

	* src/manage.h: Add header accordingly.

	* src/omp.c (omp_xml_handle_start_element)
	(omp_xml_handle_end_element): In CREATE_REPORT_FORMAT PARAM require TYPE,
	require DEFAULT and use range ends to indicate when TYPE MIN and MAX are
	left out.

	* report_formats/simple_bar_chart/create_report_import,
	report_formats/simple_pie_chart/create_report_import: Add params to
	signature.

2010-10-05  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/db_postgres.sql (report_format_params): Add type, type_min,
	type_max, type_regex and fallback.
	(report_format_param_options): New table.

	* doc/db.png: Update from SQL.

2010-10-05  Matthew Mundell <matthew.mundell@greenbone.net>

	* report_formats/simple_bar_chart/create_report_import: Add example MINs,
	MAXes and DEFAULT.

	* report_formats/simple_bar_chart/plot-plt.xsl: Correct description.

2010-10-05  Matthew Mundell <matthew.mundell@greenbone.net>

	Add report format param defaults and validation.  Hence increase database
	version to 33.  Add database migration from version 32 to 33.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 33.

	* src/manage_sql.c (create_tables): Add type_min, type_max, type_regex
	and fallback columns to report_format_params table.
	(migrate_32_to_33): New function.
	(database_migrators): Add migrate_32_to_33.
	(create_report_format): Add min and max param type qualifiers, and param
	value validation according to type.
	(report_format_param_type, report_format_param_type_max)
	(report_format_param_type_max, validate_param_value): New functions.
	(set_report_format_param): Ensure that the param exists.  Validate value
	according to param type.
	(init_report_format_param_iterator): Add new columns.
	(report_format_param_iterator_type_min)
	(report_format_param_iterator_type_max)
	(report_format_param_iterator_fallback): New functions.

	* src/manage.h: Update headers accordingly.
	(create_report_format_param_t): New type.

	* src/omp.c (create_report_format_data_t)
	(create_report_format_data_reset, client_state_t): Add param entries.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Add
	PARAM/DEFAULT, PARAM/TYPE/MIN and PARAM/TYPE/MAX handling to
	CREATE_REPORT_FORMAT/REPORT_FORMAT.  Add same to GET_REPORT_FORMATS
	response.  Expand the set_report_format_param check to include param
	validation.

	* src/CMakeLists.txt: Define feature macros for c99, for LLONG_MAX and
	LLONG_MIN.

2010-10-05  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (create_target): Add missing arg list in SQL.
	(delete_report_format): Remove param options too.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_TARGET make the
	assertions about the values instead of the addresses.

2010-10-04  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (migrate_31_to_32): Ensure table report_format_params
	exists.

2010-09-30  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (escalate_1): Cast format length specifier to int for
	64 bit.

2010-09-30  Matthew Mundell <matthew.mundell@greenbone.net>

	Add report format param types.  Hence increase database version to 32.
	Add database migration from version 31 to 32.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 32.

	* src/manage_sql.c (create_tables): Add report_format_param_options table.
	Add type column to report_format_params table.
	(migrate_31_to_32): New function.
	(database_migrators): Add migrate_31_to_32.
	(create_report_format): Add params_options arg.
	(set_report_format_param): Add value_64 NULL guard.
	(init_report_format_param_iterator): Add type.
	(report_format_param_iterator_param)
	(report_format_param_iterator_type_name)
	(report_format_param_iterator_type, init_param_option_iterator)
	(param_option_iterator_value): New function.

	* src/manage.c (report_format_param_type_name)
	(report_format_param_type_from_name): New functions.

	* src/manage.h: Update headers accordingly.
	(report_format_param_t, report_format_param_type_t): New types.

	* src/manage_sql.h (rowid_t): New type.

	* src/omp.c (create_report_format_data_t)
	(create_report_format_data_reset, client_state_t): Add param option
	entries.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Add
	OPTIONS/OPTION handling to CREATE_REPORT_FORMAT/REPORT_FORMAT/PARAM.
	Add options to GET_REPORT_FORMATS response.

	* report_formats/simple_bar_chart/create_report_import: Neaten name.
	Switch to XSL plot file.  Add a report param of each types.

	* report_formats/simple_bar_chart/generate: Generate the plot file too,
	in order to access the report format params.

	* report_formats/simple_bar_chart/plot.plt: Remove.  Replaced with XSL.

	* report_formats/simple_bar_chart/plot-plt.xsl: New file.

2010-09-29  Matthew Mundell <matthew.mundell@greenbone.net>

	Add ACTIVE to OMP MODIFY_REPORT_FORMAT.

	* src/manage_sql.c (set_report_format_active): New function.

	* src/manage.h: Add header accordingly.

	* src/omp.c (modify_report_format_data_t)
	(modify_report_format_data_reset, client_state_t): Add active name and
	value.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Add MODIFY_REPORT_FORMAT ACTIVE handling.

2010-09-29  Matthew Mundell <matthew.mundell@greenbone.net>

	Add PARAM to OMP MODIFY_REPORT_FORMAT.

	* src/manage_sql.c (set_report_format_param): New function.

	* src/manage.h: Add header accordingly.

	* src/omp.c (modify_report_format_data_t)
	(modify_report_format_data_reset, client_state_t): Add param name and
	value.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Add MODIFY_REPORT_FORMAT PARAM handling.

2010-09-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (delete_report_format): Remove params too.

2010-09-29  Matthew Mundell <matthew.mundell@greenbone.net>

	Add a param to the Pie chart, as an example.

	* report_formats/simple_pie_chart/create_report_import: Add "Width" param.

	* report_formats/simple_pie_chart/generate: Pipe error output to files.

	* report_formats/simple_pie_chart/pieplot.xsl: Respect "Width" param.

2010-09-29  Matthew Mundell <matthew.mundell@greenbone.net>

	Ensure GET_SYSTEM_REPORTS responds properly when the given type is
	missing.

	* src/manage.c (get_system_report_types): Return 1 on failure to find
	report.  Always init types args when getting all reports.
	(init_system_report_type_iterator): Add fail returns.

	* src/manage.h: Update headers accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_SYSTEM_REPORTS
	correct error response variable and bring line width in range.

2010-09-28  Matthew Mundell <matthew.mundell@greenbone.net>

	Extend GET_SYSTEM_REPORTS for getting slave system reports.

	* src/manage.c (get_slave_system_report_types): New function.
	(get_system_report_types, init_system_report_type_iterator): Add slave
	arg.
	(slave_system_report): New function.
	(manage_system_report): Add slave arg.

	* src/manage.h: Update headers accordingly.

	* src/omp.c (get_system_reports_data_t)
	(get_system_reports_data_reset): Add slave_id.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Add slave_id
	attribute to GET_SYSTEM_REPORTS.

2010-09-27  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (set_report_scan_run_status): New function.

	* src/manage_sql.h: Add header accordingly.

	* src/manage.c (run_slave_task): Revert last change.
	(run_task): In the resume case, mark just the report as requested before
	forking, to match the normal behaviour.

2010-09-27  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (run_slave_task): Set task to requested after START_TASK.

2010-09-27  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (trim_report): New function.

	* src/manage_sql.h: Add header accordingly.

	* src/manage.c (run_slave_task): When resuming and the task UUID is
	missing or the resume fails in OMP, then start the task from the
	beginning.  This can happen if someone edits the slave of the task,
	or messes with the task on the slave.
	(run_task): Similarly, in the resume case, clear the slave record.

2010-09-27  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): Note contention hole.

2010-09-27  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_TASKS free target
	UUID.

2010-09-27  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (run_slave_task): Create slave resources with comments.

2010-09-27  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (modify_task_data_t, modify_task_data_reset): Add slave_id.
	(client_state_t): Add slave entry.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Add slave
	handling to MODIFY_TASK.

2010-09-27  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_TASKS add slave to
	response.

2010-09-24  Matthew Mundell <matthew.mundell@greenbone.net>

	Add slaves.  Use slaves instead of targets to represent slave managers.
	Hence increase database version to 31.  Add database migration from
	version 30 to 31.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 31.

	* src/manage_sql.c (create_tables): Add slaves table.
	(migrate_30_to_31): New function.
	(database_migrators): Add migrate_30_to_31.
	(task_slave, set_task_slave): Use slave_t for slave.
	(target_in_use): Remove slave constraint.
	(find_slave, create_slave, delete_slave, init_slave_iterator)
	(slave_iterator_slave, slave_iterator_uuid, slave_iterator_name)
	(slave_iterator_comment, slave_iterator_host, slave_iterator_port)
	(slave_iterator_login, slave_iterator_password, slave_uuid)
	(slave_name, slave_host, slave_login, slave_password, slave_port)
	(set_slave_host, slave_in_use, init_slave_task_iterator)
	(slave_task_iterator_name, slave_task_iterator_uuid): New functions.

	* src/manage.h: Add headers accordingly.
	(slave_t): New type.

	* src/manage.c (slave_authenticate): Replace credential param with slave.
	(run_slave_task, delete_slave_task): Use slave_t interface for slaves.

	* src/omp.c (help_text): Add slave commands.
	(create_slave_data_t, delete_slave_data_t, get_slaves_data_t): New slave
	types.
	(create_slave_data_reset, delete_slave_data_reset)
	(get_slaves_data_reset): New slave functions.
	(command_data_t): Add slave fields.
	(create_slave_data, delete_slave_data, get_slaves_data): New slave
	variables.
	(client_state_t): Add states for slave commands.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Add slave command handling.  In CLIENT_CREATE_TASK
	use slave_t interface for slaves.

2010-09-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/db.png: Update from SQL.

2010-09-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/db_postgres.sql (agents): Add installer_trust_time.
	(tasks): Add slave.
	(reports): Add slave_progress and slave_task_uuid.
	(report_formats): Add trust_time and flags.
	(slaves): New table.

2010-09-23  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (run_task): Correct typo in comment.

2010-09-22  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (modify_report_data_t, modify_report_data_reset): Alphabetise.
	(omp_xml_handle_end_element): Correct command name in CLIENT_MODIFY_CONFIG
	response.  Init report in CLIENT_MODIFY_REPORT.

2010-09-22  Matthew Mundell <matthew.mundell@greenbone.net>

	Add OMP command MODIFY_REPORT_FORMAT.

	* src/manage_sql.c (set_report_format_name)
	(set_report_format_summary): New functions.
	(init_report_format_iterator): Add installer and installer signature
	(report_format_iterator_installer): New functions.  Adjust other accessors
	accordingly.

	* src/manage.h: Add headers accordingly.

	* src/omp.c (help_text): Add new command.
	(modify_report_format_data_t): New type.
	(modify_report_format_data_reset): New function.
	(command_data_t, client_state_t): Add new command elements.
	(modify_report_format_data): New variable.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Add
	MODIFY_REPORT_FORMAT handling.

2010-09-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/report_formats/LaTeX/latex.xsl (header): Define two Greek characters
	that seem to be missing from Debian Lenny ucs LaTeX package.

2010-09-16  Matthew Mundell <matthew.mundell@greenbone.net>

	Add OMP command VERIFY_AGENT.

	* src/manage_sql.c (verify_agent): New function.
	(init_agent_iterator): Add installer and installer signature
	(agent_iterator_installer): New functions.  Adjust other accessors
	accordingly.

	* src/manage.h: Add headers accordingly.

	* src/omp.c (help_text): Add new command.
	(verify_agent_data_t): New type.
	(verify_agent_data_reset): New function.
	(command_data_t, client_state_t): Add new command elements.
	(verify_agent_data): New variable.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Add
	VERIFY_AGENT handling.

2010-09-16  Matthew Mundell <matthew.mundell@greenbone.net>

	Add agent trust time.  Hence increase database version to 30.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 30.

	* src/manage_sql.c (create_tables): Add installer_trust_time to table
	agents.
	(migrate_29_to_30): New function.
	(database_migrators): Add migrate_29_to_30.
	(create_agent): Set installer_trust_time.
	(init_agent_iterator): Include installer_trust_time.
	(agent_iterator_trust_time): New function.  Adjust other accessors
	accordingly.

	* src/manage.h: Add header accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_AGENTS add trust
	time to standard response.

2010-09-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (MAX_CONTENT_LENGTH): Set to something sensible.

2010-09-16  Matthew Mundell <matthew.mundell@greenbone.net>

	Include report in summary version of email escalator.

	* src/omp.c (buffer_results_xml): Export for manage_sql.c.
	(result_type_threat): Remove.
	(compare_message_types_desc, compare_message_types_asc)
	(array_add_new_string, PRINT, print_report_xml): Remove.  Moved to
	manage_sql.c.
	(omp_xml_handle_end_element): In CLIENT_GET_REPORTS replace report
	generation with call to manage_report.

	* src/manage.c (manage_result_type_threat): New function.  Body from
	result_type_threat from omp.c.  Update callers.

	* src/manage_sql.c (array_add_new_string, PRINT, print_report_xml): New
	functions.  From omp.c.
	(REPORT_NOTICE_FORMAT, MAX_CONTENT_LENGTH): New defines.
	(escalate_1): Include report in mail in place of summary message.
	(compare_message_types_desc, compare_message_types_asc)
	(print_report_xml): New functions.  From omp.c.
	(PRINT): New macro.  From omp.c.
	(manage_report): New function.  Body based on report generation code from
	omp.c.

	* src/manage.h: Add headers accordingly.

2010-09-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (run_task): Note how the targets are controlled when
	resuming a stopped task.

2010-09-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (delete_report): Set the task to the status of the
	newest report, whatever the report status is.

2010-09-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (scanner): Init.

2010-09-15  Matthew Mundell <matthew.mundell@greenbone.net>

	Make tasks with slaves run on the slaves.

	* src/manage.c (update_slave_progress, update_from_slave)
	(slave_authenticate): New functions.  Support for run_slave_task and
	delete_slave_task.
	(buffer_config_preference_xml): New header.
	(run_slave_task): New function.
	(run_task): Use run_slave_task if the task has a slave.
	(delete_slave_task): New function.

	* src/manage_sql.c (delete_slave_task): New header.
	(delete_report): Remove slave task if the task has a slave.

2010-09-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (delete_report): Before updating the report status
	check that there was actually a report.

2010-09-14  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (set_task_parameter): Pass config UUID instead of name
	to find_config.

2010-09-14  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_DEPENDENCIES
	pass data to g_hash_table_find for send_dependency.

2010-09-14  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/CMakeLists.txt: Turn off building of tests temporarily.

2010-09-14  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (delete_reports): Handle delete_report return.

2010-09-14  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (delete_report): If the newest report is stopped after
	removing the report, then set the task to stopped.
	(manage_delete_report): Add return value to doc.

2010-09-14  Matthew Mundell <matthew.mundell@greenbone.net>

	Make report deletion atomic.

	* src/manage_sql.c (delete_report): Add doc about transaction.
	(manage_delete_report): New function.
	(delete_task): Add transaction.

	* src/manage.h, src/manage_sql.h: Update headers accordingly.

	* src/manage.c (delete_reports): Remove transaction todo.  Add doc about
	safe context.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_DELETE_REPORT call
	manage_delete_report instead of delete_report.

2010-09-14  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_TASKS use the
	slave progress when the report is from a slave.

2010-09-14  Matthew Mundell <matthew.mundell@greenbone.net>

	Store slave task UUID.  Hence increase database version to 29.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 29.

	* src/manage_sql.c (create_tables): Add slave_task_uuid to table reports.
	(migrate_28_to_29): New function.
	(database_migrators): Add migrate_28_to_29.
	(init_manage, make_report): Init slave_task_uuid.
	(report_slave_task_uuid, set_report_slave_task_uuid): New functions.

	* src/manage.h, src/manage_sql.h: Add headers accordingly.

2010-09-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (switch_representation): Free selector at end, because
	it's used in the body.

2010-09-13  Matthew Mundell <matthew.mundell@greenbone.net>

	Add an active flag to the report formats.  Hence increase database
	version to 28.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 28.

	* src/manage_sql.c (create_tables): Add flags to table report_formats.
	(migrate_27_to_28): New function.
	(database_migrators): Add migrate_27_to_28.
	(report_format_flag_t): New type.
	(create_report_format): Init flags column.
	(report_format_active): New function.
	(init_report_format_iterator): Add flags.
	(report_format_iterator_active): New function.

	* src/manage.h: Add headers accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_REPORTS require
	that the report format be active.  In CLIENT_GET_REPORT_FORMATS add the
	active flag to the response.

2010-09-10  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* report_formats/sourcefire/sourcefire.xsl: Make description
	a single line. Fix the parsing of port and protocol
	so that it works also for "general/tcp".

2010-09-09  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* report_formats/sourcefire/sourcefire.xsl: Create "AddHost"
	entries and avoid empt line with white spaces.

2010-09-09  Matthew Mundell <matthew.mundell@greenbone.net>

	Add HTTP GET escalator.

	* src/manage.c (escalator_method_t): Add ESCALATOR_METHOD_HTTP_GET.

	* src/manage.c (escalator_method_name, escalator_method_from_name): Add
	HTTP GET escalator.

	* src/manage_sql.c (http_get): New function.
	(escalate_1): Add ESCALATOR_METHOD_HTTP_GET case.

2010-09-08  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/report_formats/HTML/HTML.xsl (wrap): Replace with line-tokenizing
	version which calls wrap-line.
	(wrap-line): New template.  Copy of old `wrap' template.
	(report): Select ports from port summary instead of from results.

	* src/report_formats/LaTeX/latex.xsl (text-to-escaped-row): Use
	str:tokenize to split string into lines.

	* src/report_formats/TXT/TXT.xsl (wrap): Replace with line-tokenizing
	version which calls wrap-line.
	(wrap-line): New template.  Copy of old `wrap' template from HTML format.
	(report): Select ports from port summary instead of from results.

2010-09-08  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* CMakeLists.txt: Added check for subversion directory if build type
	is not release to avoid an incomplete version number.

2010-09-07  Matthew Mundell <matthew.mundell@greenbone.net>

	Add SLAVE to OMP CREATE_TASK.

	* src/omp.c (create_task_data_t, create_task_data_reset)
	(client_state_t): Add slave elements.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Add
	CREATE_TASK SLAVE handling.
	(buffer_overrides_xml): Export for upcoming slave running patch.

2010-09-07  Matthew Mundell <matthew.mundell@greenbone.net>

	Add database migration from version 26 to 27.

	* src/manage_sql.c (migrate_26_to_27): New function.
	(database_migrators): Add migrate_26_to_27.

2010-09-07  Matthew Mundell <matthew.mundell@greenbone.net>

	Add slave support to management interface.  Hence increase database
	version to 27.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 27.

	* src/manage_sql.c (create_tables): Add slave_progress to table reports.
	Add slave to table tasks.
	(init_manage): Init slave column in predefined task.
	(task_slave, set_task_slave, report_slave_progress)
	(set_report_slave_progress): New functions.
	(make_task): Init slave column.
	(target_in_use): Add slave check.

	* src/manage.h, src/manage_sql.h: Add headers accordingly.

2010-09-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (create_lsc_credential): Add semicolon to SQL for
	consistency.

2010-09-07  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* report_formats/simple_pie_chart/,
	report_formats/simple_pie_chart/pieplot.xsl,
	report_formats/simple_pie_chart/create_report_import,
	report_formats/simple_pie_chart/generate: New. A simple
	report format that produces a pie chart using pychart.

2010-09-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): Format comments like rest of
	file.

2010-09-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (compare_ports_desc, compare_ports_asc): Remove.
	(compare_message_types_desc, compare_message_types_asc): New functions.
	Based on compare_ports_desc and compare_ports_asc.
	(print_report_xml): Get the results for the port summary sorted in the
	way the caller requested the main results.  This ensures that the correct
	results are considered if a subset of the results are requested using
	first_result or max_results.  As a result add duplicate removal to the
	threat and ROWID sorting case.

2010-09-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (init_result_iterator): Add sorting by ROWID.

2010-09-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): Align closing brace properly.

2010-09-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (event_description): Add task name arg.  Update callers.

	* src/manage.h: Update headers accordingly.

	* src/manage_sql.c (SIMPLE_NOTICE_FORMAT): New define.
	(escalate_1): Flesh out the message body.

2010-09-02  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* report_formats/simple_topo_plot/hostvisdot-summary.xsl:
	Acticated Ports to be displayed, applied rounded boxes
	for scanned hosts and ports. Non-arrow between hosts and ports.
	Applied label everywhere even if identical with node name.

	* doc/report-format-HOWTO: Added "./" for easier c&p.

2010-09-01  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.h (set_task_target): Correct arg type.

2010-08-31  Matthew Mundell <matthew.mundell@greenbone.net>

	* README: Note SIGHUP.

	* doc/openvasmd.8.xml: Add SIGNALS section.

	* doc/openvasmd.8, doc/openvasmd.html: Update from source.

2010-08-31  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/openvasmd.8.xml: Replace tabs with spaces.

2010-08-31  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (fork_update_nvt_cache): Call the rebuild version of
	update_or_rebuild_nvt_cache.

2010-08-31  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (update_or_rebuild_nvt_cache): Correct doc typo.

2010-08-31  Matthew Mundell <matthew.mundell@greenbone.net>

	Update the memory NVT cache on receiving SIGHUP.

	* src/manage_sql.c (update_nvt_cache, manage_update_nvti_cache): New
	functions.
	(init_manage): Setup nvti cache flag.  Move nvti cache update into
	update_nvt_cache and call update_nvt_cache.
	(set_nvts_md5sum): Queue nvti cache update.

	* src/manage_sql.h: Add header accordingly.

	* src/manage.c (manage_schedule): Update NVT cache if requested.

2010-08-31  Matthew Mundell <matthew.mundell@greenbone.net>

	Update the database NVT cache on receiving SIGHUP.

	* src/openvasmd.c (scanner_port, scanner_address_string): New variables.
	From main.
	(sighup_update_nvt_cache): New variable.
	(handle_sighup_update): New function.
	(update_or_rebuild_nvt_cache): Add flag for registering atexit handler.
	Update caller.
	(fork_update_nvt_cache): New function.
	(serve_and_schedule): Call fork_update_nvt_cache if flag set.
	(main): Use update version of SIGHUP handler.

2010-08-31  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (update_or_rebuild_nvt_cache): Indent comments properly.

2010-08-31  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (main_loop): Remove.
	(serve_and_schedule): New function.  Rename from main_loop for clarity.
	Make the @brief doc brief.  Move `if' comments about true case inside
	`if'.  Mark stranded location like others.
	(main): Space comment like others.  Mark stranded location like others.

2010-08-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/report_formats/create_signatures: Only create a signature if the
	associated directory exists.

2010-08-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (init_report_format_iterator): Add trust_time.
	(report_format_iterator_trust_time): New function.

	* src/manage.h: Add header accordingly.

	* src/omp.c (omp_xml_handle_end_element): Add trust time to report format.
	Skip sending trust when exporting.

2010-08-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (sign, generate_report_format_signature): Remove.
	(init_manage): Verify the predefined report formats instead of signing
	them.

2010-08-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (find_signature): Clarify argument allocation.
	(create_report_format): Free format_signature.

2010-08-26  Matthew Mundell <matthew.mundell@greenbone.net>

	Add OMP command VERIFY_REPORT_FORMAT.

	* src/manage_sql.c (verify_report_format): New function.

	* src/manage.h: Add header accordingly.

	* src/omp.c (help_text): Add new command.
	(verify_report_format_data_t): New type.
	(verify_report_format_data_reset): New function.
	(command_data_t, client_state_t): Add new command elements.
	(verify_report_format_data): New variable.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Add
	VERIFY_REPORT_FORMAT handling.

2010-08-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (backup_file_name): New function.
	(get_report_format_files): Leave out backup files.

2010-08-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/report_formats/XML/generate: Flush trailing whitespace.

2010-08-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/report-format-HOWTO,
	report_formats/simple_bar_chart/create_report_import,
	report_formats/simple_topo_plot/create_report_import,
	report_formats/sourcefire/create_report_import: Note file ordering
	requirement.

	* src/manage.c (get_report_format_files): Order files alphabetically.

	* src/report_formats/create_signatures: Quote variable to preserve
	newlines.  Add trailing newline to content, as in Manager.

2010-08-25  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (init_manage): Add trust_time to SQL for last commit.

2010-08-25  Matthew Mundell <matthew.mundell@greenbone.net>

	Add report format signature verification timestamps.  Hence increase
	database version to 26.  Add database migration from version 25 to 26.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 26.

	* src/manage_sql.c (create_tables): Add signature verification time to
	table report_formats.
	(migrate_25_to_26): New function.
	(database_migrators): Add migrate_25_to_26.
	(init_manage): Init predefined format verification times.
	(create_report_format): Set verification time.

2010-08-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (run_task): Terminate array in fail case.

2010-08-24  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* report_formats/sourcefire/sourcefire.xsl
	(bid_recurse, bids): Removed work-around for parsing BID
	from description.
	(result): Direct use of new element "nvt/bid".

2010-08-24  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* report_formats/sourcefire/sourcefire.xsl
	(collapse_to_sourcefire_cve_id, cves): Removed
	work-around for parsing CVE from description.
	(result): Direct use of new element "nvt/cve".

2010-08-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (init_manage): Include CVE and BID in NVT cache.
	(result_iterator_nvt_cve, result_iterator_nvt_bid): New functions.

	* src/manage.h: Update headers accordingly.

	* src/omp.c (buffer_results_xml): Add CVE and BID to RESULT.

2010-08-24  Michael Wiegand <michael.wiegand@greenbone.net>

	* report_formats/simple_topo_plot/hostvisdot-summary.xsl: Improved
	visualisation for routes without intermediate hosts.

2010-08-24  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* report_formats/sourcefire/,
	report_formats/sourcefire/create_report_import,
	report_formats/sourcefire/generate,
	report_formats/sourcefire/sourcefire.xsl: New.
	A report format that create Sourcefire Host Input.
	Most work done by Felix Wolfsteller.

2010-08-23  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (manage_set_config_preference): Return 2 if value is
	empty with a radio and -1 if any radio option is empty.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_MODIFY_CONFIG add
	new manage_set_config_preference return case.

2010-08-23  Matthew Mundell <matthew.mundell@greenbone.net>

	Add database migration from version 24 to 25, to rectify any
	radio NVT preference value errors caused by missing chunking
	handling in the GSA.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 25.

	* src/manage_sql.c (migrate_24_to_25): New function.
	(database_migrators): Add migrate_24_to_25.

2010-08-23  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/report-format-HOWTO: Improve steps slightly.

2010-08-23  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/report_formats/create_signatures: New file.

2010-08-20  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_LSC_CREDENTIAL
	added more explanation to error text.

2010-08-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* report_formats/README: Reorder sections.  Rewrite the "Developing
	a new..." section in terms of the example report formats.

2010-08-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (create_lsc_credential): Limit name to alphanums.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_LSC_CREDENTIAL
	remove chars from error response.

2010-08-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (email): Pipe sendmail output to /dev/null instead of
	to temp file.

2010-08-19  Matthew Mundell <matthew.mundell@greenbone.net>

	Add database migration from version 23 to 24, to convert task owner
	values to NULL as they may be 0 due to the 8 to 9 migrator.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 24.

	* src/manage_sql.c (migrate_23_to_24): New function.
	(database_migrators): Add migrate_23_to_24.

2010-08-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_REPORTS pipe
	generator error output to /dev/null instead of a temp file.

	* src/report_formats/PDF/generate: Pipe pdflatex output to /dev/null
	instead of temp file.

2010-08-19  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/tests/CMakeLists.txt: Removed a couple of to-be-obsolete tests,
	re-added report_format tests.

2010-08-19  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* README: Added description of other invocation of tests.

	* src/tests/CMakeLists.txt: Added new tests regarding lsc credentials
	installer packages.

	* src/tests/lsc_user_0.c: New, base for tests.

2010-08-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (migrate_1_to_2): Use generic iterator.
	(migrate_5_to_6): Define out update_all_config_caches call, as this now
	conflicts with the version 6 database.

2010-08-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (sign, find_signature): Doc missing args.

2010-08-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (migrate_21_to_22): Ensure that report_formats exists.

2010-08-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (create_lsc_credential): Allow - in login.

	* src/omp.c (omp_xml_handle_end_element): Add - to message in
	CLIENT_CREATE_LSC_CREDENTIAL.

2010-08-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/db_postgres.sql (report_format_params, report_formats): New tables.

	* doc/db.png: Update from SQL.

2010-08-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/Doxyfile.in, doc/Doxyfile_full.in: Add doc to EXAMPLE_PATH, so that
	manual page is found.

2010-08-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/Doxyfile.in, doc/Doxyfile_full.in: Turn off "RECURSIVE", to stop the
	subdir README files from overriding the root README.

2010-08-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (init_manage): Ensure every part of the predefined
	NVT selector exists, instead of just checking if there is at least one
	part.

2010-08-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (sign): Return "" on error instead of -1.
	(init_manage): Set predefined report format trust to "unknown" instead of
	failing, on signature error.

2010-08-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (nvt_selector_remove): Add parens to SQL to get
	precedence right.

2010-08-12  Matthew Mundell <matthew.mundell@greenbone.net>

	* ChangeLog: Add entry for last commit.

2010-08-12  Matthew Mundell <matthew.mundell@greenbone.net>

	* report_formats/readme.txt: Remove.  Rename to README to match .. naming.

	* report_formats/README: New file.

2010-08-12  Matthew Mundell <matthew.mundell@greenbone.net>

	* report_formats/readme.txt: Correct typos.  Fill paragraphs properly.

2010-08-12  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* report_formats/simple_topo_plot/create_report_import,
	report_formats/simple_bar_chart/create_report_import: remove temporary
	uuid file.

	* report_formats/readme.txt: New. Some words on how to create
	a import file.

2010-08-12  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/report_formats/TXT/TXT.xsl: In text report, list details for
	each issue.

	* src/tests/report_formats/expected_output/report_base.txt: Updated.

	* src/tests/report_formats/CMakeLists.txt,
	src/tests/report_formats/expected_output/report_base.html: Added
	simple test for html report format.

2010-08-12  Matthew Mundell <matthew.mundell@greenbone.net>

	* report_formats/simple_topo_plot/create_report_import,
	report_formats/simple_bar_chart/create_report_import: Include signature.

2010-08-11  Matthew Mundell <matthew.mundell@greenbone.net>

	Add report format signatures.  Hence increase database version to 23.
	Add database migration from version 22 to 23.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 23.

	* src/manage_sql.c (sign, generate_report_format_signature): New
	functions.
	(create_tables): Add signature and trust columns to table report_formats.
	(migrate_22_to_23): New function.
	(database_migrators): Add migrate_21_to_22.
	(init_manage): Init signature and trust of predefined formats.
	(find_signature): Add a location arg.  Update caller.
	(create_report_format): Add a signature arg.  Verify the signature or a
	signature in the feed.
	(init_report_format_iterator): Add signature and trust.
	(report_format_iterator_signature, report_format_iterator_trust): New
	functions.

	* src/manage.h: Update headers accordingly.

	* src/omp.c (create_report_format_data_t): Add signature.
	(client_state_t): Add signature and trust.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Add handling of CREATE_REPORT_FORMAT REPORT_FORMAT
	SIGNATURE and TRUST.  Add trust and signature to GET_REPORT_FORMATS
	response.

2010-08-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.h: Update header.  Missing part of 2010-08-10
	CREATE_REPORT_FORMAT commit.

2010-08-10  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_REPORT_FORMAT
	add missing word to error message.

2010-08-10  Matthew Mundell <matthew.mundell@greenbone.net>

	In CREATE_REPORT_FORMAT use the given UUID.

	* src/manage_sql.c (create_report_format): Require UUID as arg instead of
	generating it.

	* src/omp.c (is_uuid): New function.
	(create_report_format_data_t, create_report_format_data_reset): Add ID
	field.
	(omp_xml_handle_start_element): Parse CREATE_REPORT_FORMAT REPORT_FORMAT
	ID.
	(omp_xml_handle_end_element): In CLIENT_CREATE_REPORT_FORMAT pass ID to
	create_report_format.

2010-08-10  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* report_formats/simple_topo_plot/,
	report_formats/simple_topo_plot/hostvisdot-summary.xsl,
	report_formats/simple_topo_plot/create_report_import,
	report_formats/simple_topo_plot/generate: New.
	A report format demonstrating a simple network topology plot
	via dot. The report format was developed by
	Michael Wiegand.

2010-08-10  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (create_report_format): Remove premature free.

2010-08-10  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (where_levels): Remove trailing paren as false positive
	is now the final case.

2010-08-10  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (migrate_21_to_22): If the new dir already exists then
	simply remove the old dir.

2010-08-10  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/tests/report_formats/CMakeLists.txt: Donate unique name to test.

	* src/tests/report_formats/test_report_format: Do not use tee to keep
	meaningful exit code, cat instead. Admit bashism.

2010-08-09  Matthew Mundell <matthew.mundell@greenbone.net>

	Use the UUIDs of report formats for the names of the directories on
	disk.  Reference report formats in GET_REPORTS by UUID instead of name.
	Hence increase database version to 22.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 22.

	* src/CMakeLists.txt: Install report formats to UUID directories.

	* src/manage_sql.c (migrate_21_to_22): New function.
	(database_migrators): Add migrate_21_to_22.
	(init_manage): Use predefined UUIDs for the predefined report formats.
	(create_report_format, delete_report_format): Use UUID for report format
	dir instead of name.

	* src/manage.c (get_report_format_files): Add dir name to error message.
	(init_report_format_file_iterator): Use UUID for report format dir instead
	of name.

	* src/omp.c (get_reports_data_t, get_preferences_data_reset)
	(omp_xml_handle_start_element): Rename format to format_id.
	(omp_xml_handle_end_element): In CLIENT_GET_REPORTS expect report format
	as UUID instead of name, and respond with ID instead of name.

2010-08-09  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (init_task_iterator): Include example task when a task
	ID is given.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_REPORTS check
	chdir return to quiet compiler.

2010-08-09  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* report_formats/, report_formats/simple_bar_chart/,
	report_formats/simple_bar_chart/plot.xsl,
	report_formats/simple_bar_chart/plot.plt,
	report_formats/simple_bar_chart/generate,
	report_formats/simple_bar_chart/create_report_import: New.
	A report format demonstrating a simple plot
	with gnuplot. The report format was developed by
	Matthew Mundell.
	Running create_report_import will create a
	xml file that can be imported as report format.
	The creation process for this xml file is coarse
	and need a more generic approach.

2010-08-09  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* doc/openvasmd.8.xml: Fixed typo.

	* doc/openvasmd.html, doc/openvasmd.8: Updated.

2010-08-09  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* doc/openvasmd.html, doc/openvasmd.8: Updated.

2010-08-08  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* doc/openvasmd.8.xml: Fixed typo and improved general
	description.

2010-08-07  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* src/CMakeLists.txt: Install TXT report.

	* src/manage_sql.c (init_manage): Adding default meta data
	for "TXT" report format.

2010-08-07  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* src/report_formats/LaTeX/, src/report_formats/LaTeX/generate: New.

	* src/report_formats/LaTeX/latex.xsl: New. Moved from PDF directory.

	* src/report_formats/PDF/latex.xsl: Moved away to LaTeX directory.

	* src/CMakeLists.txt: Install LaTeX report. Adapt file for
	PDF installation.

	* src/manage_sql.c (init_manage): Adding default meta data
	for "LaTeX" report format.

2010-08-06  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/report_formats/TXT, src/report_formats/TXT/generate,
	src/report_formats/TXT/TXT.xsl: Added first part of text report
	generator.

2010-08-06  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/report_formats/NBE/NBE.xsl: Fixed to conform old nbe format.

2010-08-06  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/report_formats/HTML/generate, src/report_formats/CPE/generate,
	src/report_formats/NBE/generate, src/report_formats/PDF/generate:
	Remove trailing whitespace, fixed typo.

2010-08-06  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Added test for upcoming text report format.

	* src/tests/report_formats/CMakeLists.txt: Declare new test.

	* src/tests/report_formats/expected_output/report_base.txt: New file.

2010-08-06  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Add simple setup to check report format outputs against expected
	output. Added testing suite consisting of a single, simple test.

	* src/tests/CMakeLists.txt: Add report_formats testing subdirectory.

	* src/tests/report_formats, src/tests/report_formats/CMakeLists.txt,
	src/tests/report_formats/expected_output,
	src/tests/report_formats/generated_output,
	src/tests/report_formats/input, src/tests/report_formats/README,
	src/tests/report_formats/test_report_format: New, test infrastructure.

	* src/tests/report_formats/input/report_base.xml,
	src/tests/report_formats/expected_output/report_base.nbe: New, data for
	test.

2010-08-05  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/report-format-HOWTO: Convert tabs to spaces.

2010-08-05  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/report-format-HOWTO: New file.

2010-08-05  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (nvt_preference_iterator_config_value): Add ordering
	by type to SQL in case a broken GSA filled the database with server
	preferences with the NVT preference name.

2010-08-05  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (nvt_preference_iterator_config_value): Remove type
	constraint from SQL, as the preference may also be a server pref.  This
	reverts r8583.

2010-08-05  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): Remove quotation marks from
	CLIENT_RESUME_OR_START_TASK error responses.

2010-08-05  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* src/CMakeLists.txt: Adding install targets for ITG.

	* src/manage_sql.c (init_manage): Adding default meta data
	for "ITG" report format.

	* src/report_formats/ITG/, src/report_formats/ITG/ITG.xsl,
	src/report_formats/ITG/generate: Report generator for
	ITG by Matthew Mundell.

2010-08-04  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* src/CMakeLists.txt: Adding install targets for CPE.

	* src/manage_sql.c (init_manage): Adding default meta data
	for "CPE" report format.

	* src/report_formats/CPE/, src/report_formats/CPE/generate,
	src/report_formats/CPE/CPE.xsl: Report generator for
	CPE by Matthew Mundell.

2010-08-04  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* src/CMakeLists.txt: Adding install targets for PDF.

	* src/manage_sql.c (init_manage): Adding default meta data
	for "PDF" report format.

	* src/report_formats/PDF/, src/report_formats/PDF/latex.xsl,
	src/report_formats/PDF/generate: Report generator for
	PDF by Felix Wolfsteller.

2010-08-04  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* src/CMakeLists.txt: Replace tabs by spaces and thus
	fix indenting.

2010-08-04  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* src/report_formats/HTML/HTML.xsl: Removed URLs into gsa
	service. These do not make sense for a report export.

2010-08-04  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* src/CMakeLists.txt: Adding install targets for HTML and NBE.

2010-08-04  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* src/manage_sql.c (init_manage): Adding default meta data for "HTML"
	report format.

	* src/report_formats/HTML/, src/report_formats/HTML/HTML.xsl,
	src/report_formats/HTML/generate: Report generator for
	HTML by Matthew Mundell.

2010-08-04  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* src/manage_sql.c (init_manage): Adding default meta data for "NBE"
	report format.

	* src/report_formats/NBE/,  src/report_formats/NBE/NBE.xsl,
	src/report_formats/NBE/generate: New. Report generator for
	NBE by Matthew Mundell.

2010-08-04  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* src/report_formats/XML/generate: Fixed/improved description
	and added Author section.

2010-07-29  Matthew Mundell <matthew.mundell@greenbone.net>

	Make the report framework use loadable report formats.

	Remove all previous report formats.  Add new predefined loadable report
	format XML.

	As a result add new OMP commands CREATE_REPORT_FORMAT,
	DELETE_REPORT_FORMAT and GET_REPORT_FORMATS.

	* src/CMakeLists.txt: Remove old report XSL installs.  Add XML report
	XSL install.

	* src/manage.c (get_report_format_files, init_report_format_file_iterator)
	(cleanup_file_iterator, next_file, file_iterator_name)
	(file_iterator_content_64): New functions.

	* src/manage_sql.c (user_owns): New function.
	(create_tables): Add tables report_formats and report_format_params.
	(init_manage): Ensure predefined report format XML exists.
	(find_report_format, lookup_report_format, create_report_format)
	(delete_report_format, report_format_uuid, report_format_name)
	(report_format_global)
	(init_report_format_iterator, report_format_iterator_report_format)
	(report_format_iterator_uuid, report_format_iterator_name)
	(report_format_iterator_extension, report_format_iterator_content_type)
	(report_format_iterator_summary)
	(report_format_iterator_description, report_format_iterator_global)
	(init_report_format_param_iterator, report_format_param_iterator_name)
	(report_format_param_iterator_value): New
	functions.  Interface to report formats.

	* src/manage.h: Add headers accordingly.
	(report_format_t, file_iterator_t): New types.

	* src/omp.c (file_utils_rmdir_rf): Export for manage_sql.c.
	(help_text): Add report format commands.
	(create_report_format_data_t, delete_report_format_data_t)
	(get_report_formats_data_t): New report format types.
	(create_report_format_data_reset, delete_report_format_data_reset)
	(get_report_formats_data_reset): New report format functions.
	(command_data_t): Add report format fields.
	(create_report_format_data, delete_report_format_data)
	(get_report_formats_data): New report format variables.
	(client_state_t): Add states for report format commands.
	(omp_xml_handle_start_element): Add report format commands handling.
	(PRINT): New macro.  Helper for print_report_xml.
	(print_report_xml): Switch to fuller XML format previously sent for "xml"
	format.
	(next_break, latex_print_verbatim_text, latex_escape_text)
	(latex_severity_heading, latex_severity_colour, latex_header)
	(latex_footer, print_report_notes_latex, print_report_overrides_latex)
	(print_report_latex): Remove.  Replaced by Felix's XSL.
	(omp_xml_handle_end_element): Add report format commands handling.  In
	particular in CLIENT_GET_REPORTS remove previous static report generation
	cases and add a single generic generator.
	(omp_xml_handle_text): Add report format commands handling.

	* src/ITG.xsl, src/CPE.xsl, src/openvasmd_report_html.xsl: Remove.

	* src/report_formats/, src/report_formats/XML/,
	src/report_formats/XML/generate: New dir and files.  Report generator for
	XML report format.

2010-07-29  Michael Wiegand <michael.wiegand@greenbone.net>

	Post branch version bump.

	* CMakeLists.txt: Updated version number.

2010-07-29  Michael Wiegand <michael.wiegand@greenbone.net>

	Post release version bump.

	* CMakeLists.txt: Updated version number.

2010-07-29  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 1.0.0 release.

	* CHANGES: Updated.

	* CMakeLists.txt: Updated version number.

2010-07-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (nvt_preference_iterator_config_value): Add type
	constraint to SQL in case a broken GSA filled the database with server
	preferences with the NVT preference name.

2010-07-21  Matthew Mundell <matthew.mundell@greenbone.net>

	* TODO: Remove entry about FIXes in code.

	* README: Neaten About section.  In particular, use either the module name
	like "openvas-cli" or the proper name "OpenVAS CLI", instead of mixing the
	two, like in "OpenVAS-CLI".

2010-07-24  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* README: Slightly extended general description of module.

2010-07-24  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* INSTALL: Fixed min. version of openvas-libraries.

2010-07-22  Michael Wiegand <michael.wiegand@greenbone.net>

	* CMakeLists.txt: Fixed openvas-libraries version detection.

2010-07-21  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (nvt_selector_plugin): Remove extra semicolon.

	* src/manage_sql.c (create_agent): Free installer and signature on error.

	* src/omp.c (print_report_latex): Note memory leak.

	* src/splint.h (uuid_error, uuid_create, uuid_export): Remove.  From
	previous UUID library.

2010-07-21  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (report_count, report_counts_id): Add host limiter arg.
	Update callers.

	* src/manage.h: Update header accordingly.

	* src/omp.c (print_report_latex, omp_xml_handle_end_element): Pass host to
	report_counts_id.

2010-07-21  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/manage_sql.h: Formatted using indent.

	* src/lsc_user.c (get_rpm_generator_path),
	src/omp.c (buffer_results_xml): Tiny improvements of doc.

	* src/tests/CMakeLists.txt: Lowercased commands.

2010-07-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c: Convert all FIX comments to @todo's.
	(stop_task, pause_task, resume_paused_task, resume_stopped_task)
	(manage_check_current_task): Remove FIXes about credential checks, because
	the argument is a task_t so the credentials will have been checked already.

	* src/omp.c: Convert all FIX comments to @todo's.
	(omp_xml_handle_start_element): Remove FIX about checking for a
	reauthentication, as this would just complicate things.

	* src/ompd.c: Convert all FIX comments to @todo's.
	(serve_omp): Remove FIX about time as argument is always NULL.

	* src/manage.h, src/manage_sql.c, src/omp.h, src/ompd.h, src/openvasmd.c,
	src/otp.c, src/otp.h, src/ovas-mngr-comm.c, src/oxpd.c, src/splint.h,
	src/tests/read_protocol_0.c, src/tests/timeout_0.c: Convert all FIX comments
	to @todo's.

2010-07-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/oxpd.c: Remove FIX about making offset variables pointers, as they
	are fully entrenched as integers now.

2010-07-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (OPENVASMD_VERSION, OPENVAS_OS_NAME): Set to -1.
	(serve_client, accept_and_maybe_fork, fork_connection_for_schedular)
	(main): Remove FIXes about getting the previous socket flags value, as
	the sockets are all used locally.

2010-07-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (restore_db): Remove.
	(manage_migrate): Remove outline for backing up database around migration,
	as the SQL transactions have the same effect.

2010-07-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (init_manage_process): Remove FIXes on aborts, as
	they're consistent with the rest of the function.

	* src/omp.c (send_nvt): Remove FIX about old spec.
	(print_report_latex): Correct ordering comment.

	* src/otp.c (parse_scanner_server, process_otp_scanner_input): Make
	abort legitimate behaviour for out of memory failures.

2010-07-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (make_task): Abort on memory failure.
	(append_to_task_comment, append_to_task_name)
	(add_task_description_line): Remove returns.

	* src/manage.h: Update headers accordingly.

	* src/omp.c (omp_xml_handle_start_element): Remove old assertion.
	Remove return checks for make_task and add_task_description_line.

2010-07-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ompd.c: Format @todo like others.

2010-07-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c, src/ompd.c, src/openvasmd.c, src/ovas-mngr-comm.c: Convert
	"\todo"s to "@todo"s.  Remove \todo about performance.

2010-07-19  Michael Meyer <michael.meyer@greenbone.net>

	* src/tests/new_task_small_rc,
	src/tests/new_task_small__many_plugins_yes_rc,
	src/tests/new_task_medium_rc,
	src/tests/new_task_small__missing_targets_rc:
	Removed references to nonexistent OIDs. Changed OID 10180 to 100315.

2010-07-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* TODO: Update.

2010-07-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (make_task): Quote name and comment for SQL.  Add
	quotation marks around name in SQL.

2010-07-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/lsc_user.c, src/manage_sql.c, src/omp.c, src/otp.c, src/otpd.c,
	src/oxpd.c: Convert "TODO"s to "@todo"s.  Remove TODO about efficiency.

2010-07-16  Stephan Kleine

	* src/manage_sql.c (escalate_1): Fix some "format not a string
	literal and no format arguments" error.

2010-07-16  Michael Wiegand <michael.wiegand@greenbone.net>

	* CMakeLists.txt: Replace check for PREPARE_RELEASE with check for
	CMAKE_BUILD_TYPE == "Release".

2010-07-16  Michael Wiegand <michael.wiegand@greenbone.net>

	Post-release version bump.

	* CMakeLists.txt: Updated version number.

2010-07-16  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 1.0.0.rc1 release.

	* CHANGES: Updated.

	* CMakeLists.txt: Updated version number.

2010-07-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/openvasmd.8, doc/openvasmd.html: Update from source.

2010-07-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/db_postgres.sql (agents, nvts): Add new columns.
	(escalators, targets, configs, lsc_credentials): Add UUID column.
	(overrides): New table.

	* doc/db.png: Update from SQL.

2010-07-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c, src/omp.c, src/ompd.c, src/openvasmd.c,
	src/otp.c: Bring static docs up to date.

2010-07-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/Doxyfile.in, doc/Doxyfile_full.in: Add expansion of DEF_ACCESS
	macro.  Replace tasks_sql.h with manage_sql.c.

	* src/manage_sql.c: Bring docs up to date.

2010-07-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (create_note_data_t, create_note_data_reset): Remove note_id.
	(create_override_data_t, create_override_data_reset): Remove override_id.
	(modify_note_data_t, modify_note_data_reset, modify_override_data_t)
	(modify_override_data_reset): Implement directly, instead of shadowing
	create counterparts.

2010-07-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.h, src/openvasmd.c, src/omp.c: Bring docs up to date.

	* src/manage_sql.c: Add @file doc.

2010-07-15  Matthew Mundell <matthew.mundell@greenbone.net>

	Try flush the to_client buffer when it fills up during OMP processing.

	* src/omp.c (omp_parser_t): New type.
	(omp_parser_new, omp_parser_free): New functions.
	(send_to_client): Add write_to_client callback and data args.  If the
	buffer is too full for the message, try write the buffer to the client.
	Update all callers.
	(send_element_error_to_client, send_find_error_to_client): Add passthrough
	args for send_to_client.  Update all callers.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Expect
	write_to_client callback and data arg in user_data arg via an omp_parser.
	(send_requirement, send_dependency): Expect write_to_client callback and
	data arg in data arg.  Update callers.
	(send_nvt, send_reports): Add write_to_client callback and data arg args.
	Update callers.
	(init_omp_process): Add write_to_client callback and data arg args.  Set
	omp_parser as callback user data.
	(process_omp_client_input): Add note about return.

	* src/omp.h: Update header accordingly.

	* src/ompd.c (init_ompd_process, serve_omp): Pass client writer and data
	to init_omp_process.  Extend complications comment.

2010-07-14  Matthew Mundell <matthew.mundell@greenbone.net>

	Reduce GET_VERSION to single fixed version.  Enable GET_VERSION before
	authentication.

	* src/omp.c (client_state_t): Add CLIENT_GET_VERSION_AUTHENTIC.
	(omp_xml_handle_start_element): Add GET_VERSION check to CLIENT_TOP.
	Improve first command error message.  Close a single COMMANDS if in
	one or more COMMANDS when the first command error occurs.  Use new
	special state for GET_VERSION after authenticate.
	(omp_xml_handle_end_element): Reduce GET_VERSION response.  Check which
	state to use after GET_VERSION.

2010-07-14  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd_report_html.xsl (report): Leave sorting to Manager.

2010-07-13  Matthew Mundell <matthew.mundell@greenbone.net>

	Make GET_SYSTEM_REPORTS more like other commands.

	* src/manage.c (get_system_report_types): Add required_type and start
	arguments, to limit to a single type.
	(init_system_report_type_iterator): Add type argument.

	* src/manage.h: Add header accordingly.

	* src/omp.c (get_system_report_data_t): Add brief.
	(omp_xml_handle_start_element): Parse GET_SYSTEM_REPORTS brief attrib.
	(omp_xml_handle_end_element): In CLIENT_GET_SYSTEM_REPORTS return all
	reports if name is NULL and skip the report images if brief is true.

2010-07-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (init_agent_iterator): Add installer_filename to
	columns.  Adjust accessors accordingly.
	(agent_iterator_installer_filename): New function.

	* src/manage.h: Add header accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_AGENTS add
	FILENAME to PACKAGE for installer.

2010-07-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (find_signature): Change extension to "asc".

	* INSTALL: Correct xsltproc name.

2010-07-12  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/CMakeLists.txt: Add OPENVAS_LIB_INSTALL_DIR define to definitions.

	* src/manage_sql.c (find_signature): New function.
	(create_agent): Check feed signature if the given signature is empty.

2010-07-09  Matthew Mundell <matthew.mundell@greenbone.net>

	Move installer_filename addition from database version 20 to new version
	21.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 21.

	* src/manage_sql.c (migrate_19_to_20): Remove addition of
	installer_filename column.
	(migrate_20_to_21): New function.
	(database_migrators): Add migrate_20_to_21.

2010-07-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (task_threat_level, task_previous_threat_level): Take
	overrides into account, so that condition_met and hence escalation also
	do.

2010-07-07  Matthew Mundell <matthew.mundell@greenbone.net>

	Extend agents with installer filenames.  Bundle this change into the 19
	to 20 migrator.

	* src/manage_sql.c (create_tables): Add installer_filename to table agents.
	(migrate_19_to_20): Add installer_filename column.
	(create_agent): Add installer_filename arg.  Store filename in db.

	* src/manage.h: Update header accordingly.

	* src/omp.c (create_agent_data_t, create_agent_data_reset)
	(client_state_t): Add CREATE_AGENT INSTALLER/FILENAME element.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Add CREATE_AGENT INSTALLER/FILENAME handling.

2010-07-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (main): Set GNUPGHOME.

2010-07-07  Michael Wiegand <michael.wiegand@greenbone.net>

	* CMakeLists.txt: Make cmake environment more flexible as discussed on
	openvas-devel: Set CMAKE_BUILD_TYPE only to "Debug" if it is not
	already set. Do not set CMAKE_VERBOSE_MAKEFILE, let it default to OFF.
	Remove redundant flags from CMAKE_C_FLAGS_DEBUG.

2010-07-06  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (create_agent): Init sizes.  Use known installer size.

2010-07-06  Matthew Mundell <matthew.mundell@greenbone.net>

	Add database migration from version 19 to 20.

	* src/manage_sql.c (migrate_19_to_20): New function.
	(database_migrators): Add migrate_19_to_20.

2010-07-06  Matthew Mundell <matthew.mundell@greenbone.net>

	Extend agents with signatures.  Hence increase database version to 20.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 20.

	* src/manage_sql.c (TRUST_ERROR, TRUST_YES, TRUST_NO, TRUST_UNKNOWN): New
	defines.
	(create_tables): Add installer_64, installer_signature_64 and
	installer_trust to table agents.
	(verify_signature): New function.
	(create_agent): Add installer_signature_64 arg.  Rename installer arg to
	installer_64.  Verify the signature if given.  Store the result of the
	verification and store the plain version of the installer alongside the
	base64 version.
	(init_agent_iterator): Use new base64 installer column, add installer
	trust column.  Adjust accessors accordingly.
	(agent_iterator_trust): New function.

	* src/manage.h: Update headers accordingly.

	* src/omp.c (create_agent_data_t, create_agent_data_reset)
	(client_state_t): Add CREATE_AGENT INSTALLER/SIGNATURE element.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Add
	CREATE_AGENT INSTALLER/SIGNATURE handling and add INSTALLER/TRUST to the
	GET_AGENTS brief response.

2010-07-05  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (buffer_overrides_xml): Add THREAT to terse case.

2010-07-05  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (backup_db): Make arg const.
	(manage_backup_db): Make arg const.  Add fallback database name.
	(manage_migrate): Temporarily turn off backup and restore.

	* src/manage.h: Update header accordingly.

2010-07-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (escalator_method_name, escalator_method_from_name): Add
	syslog method.

	* src/manage.h (escalator_method_t): Add syslog method.

	* src/manage_sql.c (escalate_1): Add syslog method case.

	* src/openvasmd_log_conf.cmake_in (event syslog, event snmp): New groups.

2010-07-02  Matthew Mundell <matthew.mundell@greenbone.net>

	Add a --backup option.

	* src/manage_sql.c (backup_db): Add args and implementation.  Make static.
	(manage_backup_db): New function.
	(manage_migrate): Turn off backup temporarily.

	* src/manage.h: Add header accordingly.

	* src/openvasmd.c (main): Add --backup option with calls manage_backup_db.

2010-07-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd_report_html.xsl (report): Add False Positive column.

2010-07-02  Matthew Mundell <matthew.mundell@greenbone.net>

	Add false positive "threat" for overrides.

	* src/manage.c (threat_message_type, message_type_threat): Add False
	Positive.

	* src/manage_sql.c (collate_threat, task_threat_level)
	(where_levels, task_previous_threat_level): Add False Positive.
	(init_result_iterator, report_counts, report_counts_id): Add false
	positive arg.  Update callers.
	(create_override): Check new_threat too.

	* src/manage.h: Update headers accordingly.

	* src/omp.c (result_type_threat): Add False Positive.
	(send_reports, omp_xml_handle_end_element): Send FALSE_POSITIVE in
	REPORT/RESULT_COUNT.

2010-06-30  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_NVTS,
	CLIENT_GET_REPORTS and CLIENT_GET_TASKS cleanup iterator in fail cases.

2010-06-30  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (create_target_data_t, create_target_data_reset)
	(client_state_t): Rename target locator elements with target locator
	prefix.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Adjust handlers for renaming.  Change
	GET_TARGET_LOCATORS/TARGET_LOCATOR/@name to an entity.

2010-06-30  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (create_note_data_t, create_note_data_reset)
	(create_override_data_t, create_override_data_reset): Rename task to
	task_id.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Expect CREATE_NOTE, CREATE_OVERRIDE, MODIFY_NOTE,
	MODIFY_OVERRIDE TASK ID in attribute instead of text, to match other
	CREATE and MODIFY commands.

2010-06-30  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (create_note_data_t, create_note_data_reset)
	(create_override_data_t, create_override_data_reset): Rename nvt to
	nvt_oid, result to result_id.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Expect CREATE_NOTE, CREATE_OVERRIDE, MODIFY_NOTE,
	MODIFY_OVERRIDE NVT and RESULT ids in attribute instead of text, to match
	other CREATE and MODIFY commands.

2010-06-30  Michael Wiegand <michael.wiegand@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): Add event logging to
	protocol events.

2010-06-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c: Neaten internal doc slightly.

2010-06-29  Matthew Mundell <matthew.mundell@greenbone.net>

	Move NVT and TASK in GET_NOTES and GET_OVERRIDES to attributes nvt_oid
	and task_id, to match other GET commands.

	* src/omp.c (client_state_t): Remove NVT and TASK elements.
	(omp_xml_handle_start_element): Add nvt_oid and task_id parsing.  Remove
	NVT and TASK handling.
	(omp_xml_handle_end_element): Remove NVT and TASK handling.

2010-06-29  Matthew Mundell <matthew.mundell@greenbone.net>

	Rename "oid" attributes to "nvt_oid".

	* src/omp.c (get_dependencies_data_t, get_dependencies_data_reset)
	(get_nvts_data_t, get_nvts_data_reset, get_preferences_data_t)
	(get_preferences_data_reset): Rename oid to nvt_oid.  Update caller.
	(omp_xml_handle_start_element): Rename oid to nvt_oid in GET_DEPENDENCIES,
	GET_NVTS an GET_PREFERENCES.

2010-06-29  Michael Wiegand <michael.wiegand@greenbone.net>

	* src/manage_sql.c (set_task_run_status): Add event logging to run
	status changes.

2010-06-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_DELETE_LSC_CREDENTIAL
	and CLIENT_DELETE_TARGET correct command name in structure and message.

2010-06-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (help_text, client_state_t, omp_xml_handle_start_element)
	(omp_xml_handle_end_element): Comment out GET_CERTIFICATES.

2010-06-27  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (get_targets_data_t): Add tasks.
	(client_state_t): Move TARGET_LOCATORS into order.
	(omp_xml_handle_start_element): Parse GET_TARGETS/@tasks.
	(omp_xml_handle_end_element): Make GET_TARGETS TASKS depend on "tasks"
	attrib, and only include the enclosing element if the attrib is present.

2010-06-27  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (manage_system_report): Use 86400 if duration is NULL.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_SYSTEM_REPORTS
	add a name check and use 86400 if duration is missing.

2010-06-27  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (init_result_iterator): Add all results case.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_RESULTS remove the
	single result restriction.  In CLIENT_GET_LSC_CREDENTIALS add NULL checks
	to the format cases.

2010-06-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (send_reports): Leave TIMESTAMP alone.  It's the report
	creation time, whereas SCAN_START is the start time sent by the Scanner.

2010-06-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (client_state_t, omp_xml_handle_start_element)
	(omp_xml_handle_end_element): Rename CLIENT_VERSION to CLIENT_GET_VERSION.

2010-06-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (send_reports): Rename MESSAGES to RESULT_COUNT.
	(omp_xml_handle_end_element): In CLIENT_GET_REPORTS rename
	SCAN_RESULT_COUNT to RESULT_COUNT, move threat counts into that
	entity, and rename MESSAGES to RESULT_COUNT.

2010-06-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_TASKS correct
	TASK/CONFIG uuid and name, which were swapped.

2010-06-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_REPORTS always
	exit on internal error within the loop.

2010-06-26  Matthew Mundell <matthew.mundell@greenbone.net>

	Remove GET_RULES.

	* src/omp.c (help_text, client_state_t): Remove GET_RULES element.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Remove
	GET_RULES handling.

2010-06-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (init_report_iterator): Add report arg.
	(report_iterator_uuid): New function.

	* src/manage.h: Update headers accordingly.

	* src/manage.c (delete_reports): Update init_report_iterator call.

	* src/omp.c (internal_error_send_to_client): New function.
	(send_reports): Update init_report_iterator call.
	(omp_xml_handle_end_element): In CLIENT_GET_REPORTS add the case that
	responds with all reports.

2010-06-25  Michael Wiegand <michael.wiegand@greenbone.net>

	* src/manage_sql.c (escalate_1): Added event logging to escalator
	execution.

2010-06-24  Matthew Mundell <matthew.mundell@greenbone.net>

	Rename GET_REPORT to GET_REPORTS.

	* src/omp.c (help_text, client_state_t, command_data_t): Rename
	GET_REPORT element.
	(get_report_data_t, get_report_data_reset, get_report_data): Remove.
	(get_reports_data_t, get_reports_data_reset, get_reports_data): New.  Renamed
	from "get_report" counterparts.
	(omp_xml_handle_start_element, send_reports, print_report_xml)
	(print_report_latex, omp_xml_handle_end_element): Rename GET_REPORT.

2010-06-24  Matthew Mundell <matthew.mundell@greenbone.net>

	Add oid attribute to GET_DEPENDENCIES.

	* src/omp.c (get_dependencies_data_t): New type.
	(get_dependencies_data_reset): New function.
	(command_data_t): Add get_dependencies.
	(get_dependencies_data): New variable.
	(omp_xml_handle_start_element): Parse GET_DEPENDENCIES oid attrib.
	(omp_xml_handle_end_element): In CLIENT_GET_DEPENDENCIES add single NVT
	case.

2010-06-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (send_requirement): Replace NEED with NVT.
	(send_dependency): Replace DEPENDENCY/NEEDER with NVT/REQUIRES and move
	the requirement into the REQUIRES.

2010-06-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (send_nvt): Leave closing tag to caller.
	(omp_xml_handle_end_element): In CLIENT_GET_NVTS send prefs inside NVT.

2010-06-23  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (init_nvt_iterator): Improve family arg doc.
	Add assertion.

	* src/omp.c (get_nvts_data_t): Add new flag attribs.
	(omp_xml_handle_start_element): Parse new flags attribs.
	(omp_xml_handle_end_element): In CLIENT_GET_NVTS integrate the single NVT
	case into the multiple NVTs case, using new details flags.

2010-06-23  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_NVTS integrate the
	brief case into the details case.

2010-06-23  Matthew Mundell <matthew.mundell@greenbone.net>

	Rename GET_NVT_DETAILS to GET_NVTS.

	* src/omp.c (help_text, client_state_t, command_data_t): Rename
	GET_NVT_DETAILS element.
	(get_nvt_details_data_t, get_nvt_details_data_reset)
	(get_nvt_details_data): Remove.
	(get_nvts_data_t, get_nvts_data_reset, get_nvts_data): New.  Renamed from
	"nvt_details" counterparts.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Rename
	GET_NVT_DETAILS.

2010-06-23  Matthew Mundell <matthew.mundell@greenbone.net>

	Merge GET_NVT_ALL into GET_NVT_DETAILS.

	* src/omp.c (help_text): Remove GET_NVT_ALL.  Improve GET_NVT_DETAILS.
	(get_nvt_details_data_t): Add details.
	(client_state_t): Remove GET_NVT_ALL state.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Move
	GET_NVT_ALL handling into GET_NVT_DETAILS.

2010-06-23  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_MODIFY_TASK improve
	FILE name error message.

2010-06-23  Matthew Mundell <matthew.mundell@greenbone.net>

	Replace MODIFY_REPORT PARAMETER element with COMMENT, to better match
	other modifier commands.

	* src/omp.c (modify_task_data_t, modify_task_data_reset): Remove parameter_id
	and parameter_value.  Add comment.
	(client_state_t): Remove PARAMETER state.  Add COMMENT state.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Remove PARAMETER handling.  Add COMMENT handling.

	* src/manage_sql.c (set_report_parameter): Make value param const.

	* src/manage.h: Update header accordingly.

2010-06-23  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (manage_task_update_file): Remove extra doc param.

2010-06-22  Matthew Mundell <matthew.mundell@greenbone.net>

	Remove redundant MODIFY_TASK PARAMETER element.

	* src/omp.c (modify_task_data_t, modify_task_data_reset): Remove parameter
	and value.
	(client_state_t): Remove PARAMETER state.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Remove PARAMETER handling.

2010-06-22  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (client_state_t, omp_xml_handle_start_element)
	(omp_xml_handle_end_element, omp_xml_handle_text): Include AUTHENTICATE
	in CREDENTIALS state name.

2010-06-22  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (help_text, command_data_t): Move STOP_TASK entry into
	alphabetical order.
	(stop_task_data_t, stop_task_data_reset, stop_task_data): Move into
	alphabetical order.
	(client_state_t): Move CLIENT_STOP_TASK into alphabetical order.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Move STOP_TASK
	cases into alphabetical order.

2010-06-22  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (manage_schedule): Call omp_stop_task instead of
	omp_abort_task.

2010-06-22  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (create_agent_data_reset): Correct name in doc.

2010-06-22  Matthew Mundell <matthew.mundell@greenbone.net>

	Rename OMP ABORT_TASK to STOP_TASK.

	* src/omp.c (help_text): Rename STOP_TASK.
	(abort_task_data_t, abort_task_data_reset, abort_task_data): Remove.
	(stop_task_data_t, stop_task_data_reset, stop_task_data): New.  Renamed
	with "stop" instead of "abort".
	(command_data_t): Replace abort_task with stop_task.
	(client_state_t): Replace CLIENT_ABORT_TASK with CLIENT_STOP_TASK.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Rename for
	STOP_TASK.

2010-06-21  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (create_lsc_credential): Add '_' to chars allowed in
	login name.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_LSC_CREDENTIAL
	correct login char error message.

2010-06-21  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (task_trend): Add override flag.

	* src/manage.h: Update header accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_TASKS pass
	apply_overrides to task_trend.

2010-06-21  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (report_scan_result_count): Add override flag.

	* src/manage.h: Update header accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_REPORT pass
	apply_override to report_scan_result_count.

2010-06-21  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_TASKS send
	APPLY_OVERRIDE alongside SORT in response.

2010-06-19  Matthew Mundell <matthew.mundell@greenbone.net>

	Add an apply_override attribute to GET_TASKS.

	* src/omp.c (get_tasks_data_t): Add apply_overrides.
	(omp_xml_handle_start_element): Parse apply_overrides for GET_TASKS.
	(send_reports): Add apply_overrides arg.
	(omp_xml_handle_end_element): In CLIENT_GET_TASKS apply overrides
	according to apply_overrrides.

2010-06-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (get_report_data_t, get_results_data_t): Add apply_overrides.
	(omp_xml_handle_start_element): Parse apply_overrides for GET_REPORT and
	GET_RESULTS.
	(print_report_xml, print_report_latex, omp_xml_handle_end_element): Apply
	overrides according to "apply_overrides" instead of "overrides".

2010-06-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (help_text, get_tasks_data_t, get_tasks_data_reset)
	(get_tasks_data): Move into alphabetical order.
	(command_data_t): Move get_tasks into alphabetical order.
	(client_state_t): Move CLIENT_GET_TASKS into alphabetical order.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Move GET_TASKS
	cases into alphabetical order.

2010-06-18  Matthew Mundell <matthew.mundell@greenbone.net>

	Rename GET_STATUS to GET_TASKS.

	* src/omp.c (help_text): Rename GET_STATUS.
	(get_status_data_t, get_status_data_reset, get_status_data): Remove.
	(get_tasks_data_t, get_tasks_data_reset, get_tasks_data): New.  Renamed
	with "tasks" instead of "status".
	(command_data_t): Replace get_status with get_tasks.
	(client_state_t): Replace CLIENT_GET_STATUS with CLIENT_GET_TASKS.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Rename for
	GET_TASKS.

2010-06-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (init_task_iterator): Add UUID to SQL.
	(task_iterator_uuid): New function.  Adjust other accessors accordingly.

	* src/manage.h: Add header accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_STATUS add the
	single task case to the all tasks loop, allowing the all tasks case to
	respect the details attribute.

2010-06-17  Matthew Mundell <matthew.mundell@greenbone.net>

	Add a details attribute to GET_STATUS.

	* src/omp.c (get_status_data_t): Add details field.
	(omp_xml_handle_start_element): Parse details attribute for GET_STATUS.
	(omp_xml_handle_end_element): In CLIENT_GET_STATUS for the single task
	case, only send the detailed format if the details attrib was present,
	otherwise send the summary format as with the all tasks case.

2010-06-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (init_task_iterator): Add task arg.  Update caller.

	* src/manage.h: Update header accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_STATUS update
	init_task_iterator call.

2010-06-17  Matthew Mundell <matthew.mundell@greenbone.net>

	Replace task_iterator_t with the generic iterator_t.

	* src/manage_sql.c (migrate_8_to_9): Replace task iteration with single
	statement.
	(init_task_iterator): Expect an iterator_t.
	(cleanup_task_iterator, next_task): Remove.
	(task_iterator_task, task_iterator_run_status): New functions.
	(init_manage): Use new task iterator and accessors.

	* src/manage.h: Update headers accordingly.
	(task_iterator_t): Remove.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_STATUS use new
	task iterator.

2010-06-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (print_tasks): Remove.  Out of use.

2010-06-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_STATUS leave the
	empty string case for find_task to find, as in the other GET commands.

2010-06-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (CONFIG_UUID_FULL_AND_VERY_DEEP_ULTIMATE): Indent.

2010-06-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_TASK
	include ID in response as attribute instead of as entity.

2010-06-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_TARGET
	include ID in response.

2010-06-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (create_override): Add override return arg.
	(override_uuid): New function.

	* src/manage.h: Update headers accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_OVERRIDE and
	CLIENT_CREATE_SCHEDULE include ID in response.

2010-06-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (create_note): Add note return arg.
	(note_uuid): New function.

	* src/manage.h: Update header accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_NOTE include
	ID in response.

2010-06-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (XML_OK_CREATED_ID): Drop create prefix.
	(omp_xml_handle_end_element): In CLIENT_CREATE_AGENT add create prefix.

2010-06-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (create_lsc_credential): Add credential return arg.

	* src/manage.h: Update header accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_LSC_CREDENTIAL
	include ID in response.

2010-06-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (create_escalator): Add escalator return param.
	(escalator_uuid): New function.

	* src/manage.h: Update headers accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_ESCALATOR
	include ID in response.

2010-06-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (create_config): Create uuid param with config param.
	(config_uuid): New function.
	(create_config_rc): Rename uuid to selector_uuid.  Add UUID to INSERT.
	(copy_config): Add config return param.

	* src/manage.h: Update headers accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_CONFIG include
	ID in response.

2010-06-17  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* doc/openvasmd.8.xml: Updated link.

2010-06-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (init_result_iterator, report_count): Sort override
	selection, giving the override constraints a precedence ordering.

2010-06-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (init_result_iterator, report_count): Also check task
	constraint when selecting override.

2010-06-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd_report_html.xsl (result [issue]): Skip CVSS if overridden.

2010-06-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (latex_severity_header): Drop prefix.  Add Log check.
	(print_report_latex): Add override to result heading.

2010-06-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd_report_html.xsl (override): New template.
	(result [issue]): Add override to result heading.  Add override boxes.

2010-06-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (print_report_latex): Note override state in report.

2010-06-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (latex_header): Add override colour.
	(print_report_overrides_latex): Add threat to override heading.

2010-06-16  Matthew Mundell <matthew.mundell@greenbone.net>

	Add threat overrides.

	* src/manage_sql.c (create_tables): Add table overrides.
	(where_levels_type): New function.
	(init_result_iterator): Add override flag.
	(result_iterator_original_type): New function.  Adjust other accessors
	accordingly.
	(report_scan_result_count): Use where_levels_type.
	(REPORT_COUNT): Remove.  Replace with report_count.
	(report_count): New function.  Counts reports with override.
	(report_counts, report_counts_id): Add override flag.  Adjust callers.
	(find_override, create_override, delete_override, modify_override)
	(init_override_iterator, override_iterator_uuid, override_iterator_nvt_oid)
	(override_iterator_creation_time, override_iterator_modification_time)
	(override_iterator_text, override_iterator_hosts, override_iterator_port)
	(override_iterator_threat, override_iterator_new_threat)
	(override_iterator_task, override_iterator_result)
	(override_iterator_nvt_name): New functions.
	(OVERRIDE_COLUMNS): New define.

	* src/manage.h: Update headers accordingly.
	(override_t): New type.

	* src/omp.c (buffer_results_xml): Add override args.
	(help_text): Add overrides commands.
	(create_override_data_t, delete_override_data_t, get_overrides_data_t)
	(modify_override_data_t): New type.
	(create_override_data_reset, delete_override_data_reset)
	(get_overrides_data_reset, modify_override_data_reset): New functions.
	(get_report_data_t, get_results_data_t): Add overrides fields.
	(command_data_t): Add create_override, delete_override and get_overrides.
	(create_override_data, delete_override_data, get_overrides_data)
	(modify_override_data): New variable.
	(client_state_t): Add override command states.
	(omp_xml_handle_end_element, omp_xml_handle_start_element)
	(omp_xml_handle_text): Add override command handling.  Add override flags
	to GET_REPORT and GET_RESULTS.
	(buffer_overrides_xml): New function.
	(buffer_results_xml): Add overrides flags.

2010-06-14  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (create_agent): Add agent return.
	(agent_uuid): New function.

	* src/manage.h: Update headers accordingly.

	* src/omp.c (XML_OK_CREATED_ID): New define.
	(omp_xml_handle_end_element): Add id attribute to CREATE_AGENT response.

2010-06-14  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (task_infos_size): Correct severity name in SQL.

2010-06-10  Matthew Mundell <matthew.mundell@greenbone.net>

	Add database migration from version 18 to 19.  This covers UUID
	modifications made since 2010-06-02.

	* src/manage_sql.c (migrate_18_to_19): New function.
	(database_migrators): Add migrate_18_to_19.

2010-06-10  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element) [CLIENT_START_TASK]: Improved
	response when attribute is missing.

2010-06-10  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/lsc_user.c: Lowercased todos.

	* src/manage_sql.c, src/omp.c: Improved documentation.

2010-06-10  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (CONFIG_UUID_FULL_AND_FAST)
	(CONFIG_UUID_FULL_AND_FAST_ULTIMATE, CONFIG_UUID_FULL_AND_VERY_DEEP)
	(CONFIG_UUID_FULL_AND_VERY_DEEP_ULTIMATE, CONFIG_UUID_EMPTY)
	(TARGET_UUID_LOCALHOST): New defines.
	(init_manage): Add UUIDs to predefined configs and target.

2010-06-10  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/CMakeLists.txt: Lowercased commands.

2010-06-10  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/manage_sql.c (sql_insert): Fixed after parameter renaming.

2010-06-10  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Updated documentation.

	* doc/Doxyfile.in: Updated file list.

	* src/manage.c (resume_paused_task, send_file, send_config_rules):
	Added missing parameter documentation.

	* src/manage_sql.c, src/ompd.c, src/openvasmd.c: Updated documentation.

2010-06-10  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_TASK free
	description if the initial check fails and cleanup properly in the
	escalator and schedule fail cases.

2010-06-10  Matthew Mundell <matthew.mundell@greenbone.net>

	Add config UUIDs.

	* src/manage_sql.c (user_owns): Remove.  Everything uses user_owns_uuid.
	(create_tables): Add column uuid to configs.
	(task_config_uuid): New function.
	(find_config): Convert name arg to UUID.
	(create_config): Add uuid return arg.  Init UUID column.
	(copy_config): Init UUID column.
	(CONFIG_ITERATOR_FIELDS): Add UUID.
	(config_iterator_uuid): New function.  Adjust other accessors accordingly.

	* src/manage.h: Update headers accordingly.

	* src/omp.c (create_task_data_t, create_task_data_reset): Replace config
	with config_id.
	(delete_config_data_t, delete_config_data_reset)
	(get_configs_data_t, get_configs_data_reset)
	(modify_config_data_t, modify_config_data_reset): Replace name with
	config_id.
	(get_nvt_details_data_t, get_nvt_details_data_reset)
	(get_preferences_data_t, get_preferences_data_reset): Rename config to
	config_id.
	(client_state_t): Remove config name states.
	(omp_xml_handle_start_element): Replace config and name attributes with
	config_id for commands that take a config.  Remove CLIENT_DELETE_CONFIG
	and CLIENT_MODIFY_CONFIG NAME processing.
	(omp_xml_handle_end_element): In CLIENT_GET_PREFERENCES,
	CLIENT_GET_NVT_DETAILS, CLIENT_DELETE_CONFIG, CLIENT_MODIFY_CONFIG,
	CLIENT_CREATE_TASK and CLIENT_GET_CONFIGS expect UUID instead of name.  In
	CLIENT_CREATE_CONFIG, CLIENT_GET_STATUS and CLIENT_GET_CONFIGS add
	UUID attribute to CONFIG.  Remove CLIENT_MODIFY_CONFIG NAME processing.
	(omp_xml_handle_text): Remove config name and text processing.

2010-06-09  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/omp.c: Updated documentation.
	(omp_xml_handle_start_element): Fixed some alignment issues.

2010-06-09  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/omp.c (append_attribute): New function, extracted from
	omp_xml_handle_start_element.
	(omp_xml_handle_start_element): Call new function.

2010-06-09  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (client_state_t): Remove old name states.
	(omp_xml_handle_start_element): Remove old name element processing.

2010-06-09  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (create_task_data_t, create_task_data_reset): Replace schedule
	with schedule_id.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Get schedule ID from attribute instead of text, as
	in other elements.

2010-06-09  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (init_result_iterator): Collate hosts with collate_ip.

2010-06-09  Matthew Mundell <matthew.mundell@greenbone.net>

	Add target UUIDs.

	* src/manage_sql.c (create_tables): Add column uuid to targets.
	(find_target): Convert name arg to UUID.
	(create_target): Init UUID column.
	(init_target_iterator, init_lsc_credential_target_iterator): Add UUID.
	(target_iterator_uuid, lsc_credential_target_iterator_uuid): New function.
	Adjust other accessors accordingly.
	(target_uuid): New function.

	* src/manage.h: Add headers accordingly.

	* src/omp.c (create_task_data_t, create_task_data_reset): Replace
	target with target_id.
	(delete_target_data_t, delete_target_data_reset)
	(get_targets_data_t, get_targets_data_reset): Replace name with target_id.
	(client_state_t): Remove CLIENT_DELETE_TARGET_NAME.
	(omp_xml_handle_start_element): Read target ID attributes for
	DELETE_TARGET, GET_TARGETS and CREATE_TASK/TARGET.  Remove
	CLIENT_DELETE_TARGET NAME processing.
	(omp_xml_handle_end_element): In CLIENT_DELETE_TARGET, CLIENT_CREATE_TASK
	and CLIENT_GET_TARGETS expect UUID instead of name.  In
	CLIENT_GET_TARGETS, CLIENT_GET_LSC_CREDENTIALS and CLIENT_GET_STATUS add
	UUID attribute to TARGET.
	(omp_xml_handle_text): Remove target name processing.

2010-06-08  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (send_config_preferences): Free uuid and value on fail.

2010-06-08  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (send_config_preferences): Send empty value if file pref
	is empty.

2010-06-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (collate_ip): Limit the last scanned number of each IP
	to the digits in the string, as there may be more digits directly after it
	in memory.

2010-06-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): Neaten name of credentials in
	messages.

2010-06-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_TARGET add
	missing breaks.

2010-06-07  Matthew Mundell <matthew.mundell@greenbone.net>

	Add LSC credential UUIDs.

	* src/manage_sql.c (create_tables): Add column uuid to lsc_credentials.
	(find_lsc_credential): Convert name arg to UUID.
	(create_lsc_credential): Init UUID column.
	(init_lsc_credential_iterator): Add UUID.
	(lsc_credential_iterator_uuid): New function.  Adjust other accessors
	accordingly.
	(lsc_credential_uuid): New function.

	* src/manage.h: Add headers accordingly.

	* src/omp.c (create_target_data_t, create_target_data_reset): Replace
	lsc_credential with lsc_credential_id.
	(delete_lsc_credential_data_t, delete_lsc_credential_data_reset)
	(get_lsc_credentials_data_t, get_lsc_credentials_data_reset): Replace name
	with lsc_credential_id.
	(omp_xml_handle_start_element): Read LSC credential ID attributes for
	DELETE_LSC_CREDENTIAL and GET_LSC_CREDENTIALS.
	(omp_xml_handle_end_element): In CLIENT_DELETE_LSC_CREDENTIAL,
	CLIENT_CREATE_TARGET and CLIENT_GET_LSC_CREDENTIALS expect UUID instead of
	name.  In CLIENT_GET_LSC_CREDENTIALS and CLIENT_GET_TARGETS add UUID to
	LSC_CREDENTIAL.
	(omp_xml_handle_text): Remove LSC credential name processing.

2010-06-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_text): Indent case labels properly.

2010-06-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_TARGET
	cleanup switch formatting.

2010-06-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (create_target): Correct spelling of "parameters".

	* src/omp.c: Space out all the reset functions in the same way.
	(omp_xml_handle_end_element): In CLIENT_GET_TARGET_LOCATORS bring line
	width within range.  In CLIENT_CREATE_TARGET remove extra parens.

2010-06-06  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (task_second_last_report): Get the second row of the
	query.
	(task_trend): Remove accessors for total message counts which were
	overwriting the report counts.
	(task_debugs_size, task_holes_size, task_infos_size, task_logs_size)
	(task_warnings_size): Correct doc.

2010-06-06  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (condition_met): In the THREAT_LEVEL_CHANGED case also
	return 1 if there is a threat level and the previous threat level in one.
	(task_threat_level, task_previous_threat_level): Add NULL checks.

2010-06-06  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_MODIFY_TASK accept "0"
	instead of "" to remove the escalator.

2010-06-06  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_MODIFY_TASK remove the
	`fail' declarations so that the existing variable is set.

2010-06-06  Matthew Mundell <matthew.mundell@greenbone.net>

	Add escalator UUIDs.

	* src/manage_sql.c (create_tables): Add column uuid to escalators.
	(find_escalator): Convert name arg to UUID.
	(create_escalator): Init UUID column.
	(init_escalator_iterator): Add UUID.
	(escalator_iterator_uuid): New function.  Adjust other accessors accordingly.
	(task_escalator_uuid): New function.

	* src/manage.h: Add headers accordingly.

	* src/omp.c (create_task_data_t, create_task_data_reset): Replace
	escalator with escalator_id.
	(delete_escalator_data_t, delete_escalator_data_reset)
	(get_escalators_data_t, get_escalators_data_reset)
	(test_escalator_data_t, test_escalator_data_reset): Replace name
	with escalator_id.
	(omp_xml_handle_start_element): Read escalator ID attributes for
	DELETE_ESCALATOR, GET_ESCALATORS, TEST_ESCALATOR and CREATE_TASK.
	(omp_xml_handle_end_element): In CLIENT_DELETE_ESCALATOR,
	CLIENT_CREATE_TASK, CLIENT_TEST_ESCALATOR, CLIENT_GET_STATUS and
	CLIENT_GET_ESCALATORS expect UUID instead of name.  In
	CLIENT_GET_ESCALATORS add UUID to ESCALATOR.
	(omp_xml_handle_text): Remove escalator name processing.

2010-06-04  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (print_report_latex): Only print NVT name row if there is an
	NVT name.

2010-06-04  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (print_report_latex): Escape NVT name.

2010-06-04  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/manage.h (create_target): Removed names from arguments.

2010-06-04  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Renamed GET_SOURCE to GET_TARGET_LOCATORS.

	* src/manage_sql.c (create_target): Renamed source to target_locator.

	* src/omp.c (help_text, create_target_data_t)
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_end_element, omp_xml_handle_text): Renamed source to
	target_locator.

	* src/tests/omp_help_0.c: Adjusted to help text.

2010-06-04  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/manage_sql.c (create_target): When fetching targets from external
	source, separate them with a comma and a space, to easy breaking long
	string in display.

2010-06-04  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Mainly formatting changes, pointed out by Matthew Mundell.

	* src/omp.c (create_target_data_t): Remove newline, sort fields
	alphabetically.
	(omp_xml_handle_end_element): Corrected formatting according to style
	guide, improved wording. Collapsed else- switch code block.

	* src/manage_sql.c: Corrected wording in comments.

2010-06-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_AGENTS rename
	AGENT agent_id attrib to id, to match other resources.

2010-06-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (print_report_xml, omp_xml_handle_end_element): Print empty
	string instead of NULL, when report host end time is NULL.

2010-06-03  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/tests/omp_help_0.c (help_text): Adjusted to current help text.

2010-06-03  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/manage.c (slist_free): Added todo, as we have a duplicate in
	openvas-libraries.

	* src/omp.c (omp_xml_handle_end_element): Use utility function to free
	list of pointers.

2010-06-03  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Added optional SOURCE, PASSWORD and USERNAME elements to CREATE_TARGET
	command. This allows to fetch targets from an external source via the
	CREATE_TARGET command.

	* src/omp.c (client_state_t): Added new states.
	(create_target_data_t): Added new fields.
	(create_target_data_reset): Free new fields.
	(omp_xml_handle_start_element): Added state transitions.
	(omp_xml_handle_end_element): Added state transitions, check for
	malconditions in create_target command handling, updated calls to
	create_target.
	(omp_xml_handle_text): Fill new elements.

	* src/manage_sql.c (create_target): Added parameters needed to query
	external source to import targets from.

	* src/manage.h (create_target): Updated proto.

2010-06-03  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Added new GET_SOURCES command that returns a list of external sources
	from which targets can be imported, if any are configured.

	* src/omp.c: Include new resource_request module.
	(help_text): Added new command.
	(client_state_t): Added new state.
	(omp_xml_handle_start_element): Added state transition, handle
	contained elements as error.
	(omp_xml_handle_end_element): Respond with list of (target-) sources.

	* CMakeLists.txt: Increased minimum required openvas-libraries version.

2010-06-03  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/omp.c: Add documentation (modified copy of documentation in
	openvas-administrator/src/oap.c).

2010-06-02  Matthew Mundell <matthew.mundell@greenbone.net>

	Add agent UUIDs.  Hence increase database version to 19.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 19.

	* src/manage_sql.c (create_tables): Add column uuid to agents.
	(find_agent): Convert name arg to UUID.
	(create_agent): Init UUID column.
	(init_agent_iterator): Add UUID.
	(agent_iterator_uuid): New function.  Adjust other accessors accordingly.

	* src/manage.h: Add header accordingly.

	* src/omp.c (delete_agent_data_t, delete_agent_data_reset)
	(get_agents_data_t, get_agents_data_reset): Rename name to agent_id.
	(client_state_t): Remove agent name state.
	(omp_xml_handle_start_element): Get agent ids from attrib for DELETE_AGENT
	and GET_AGENTS.  Remove DELETE_AGENT NAME element.
	(omp_xml_handle_end_element): In CLIENT_DELETE_AGENT and CLIENT_GET_AGENTS
	expect UUID instead of name.  In CLIENT_GET_AGENTS add UUID to AGENT.
	(omp_xml_handle_text): Remove agent name processing.

2010-06-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_AGENTS rename var.

2010-06-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (current_array_1, current_array_2, current_array_3)
	(current_int_1, current_int_2, current_int_3, current_int_4)
	(current_client_task): Remove.  Globals from old callback data mechanism.
	(omp_xml_handle_end_element): Remove assertion about current_client_task.
	(omp_xml_handle_text): Remove doc reference to current_client_task.

2010-06-02  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch GET_STATUS to the new callback data mechanism.

	* src/omp.c (get_status_data_t): New type.
	(get_status_data_reset): New function.
	(command_data_t): Add get_status.
	(get_status_data): New variable.
	(current_uuid, current_format): Remove.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Make
	GET_STATUS cases use command_data.

2010-06-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (current_name): Remove.  Out of use.
	(omp_xml_handle_start_element): In CLIENT_AUTHENTIC in the GET_REPORT
	case, expect the sort field in the command data instead of in
	current_name.

2010-06-02  Matthew Mundell <matthew.mundell@greenbone.net>

	Remove TEST_ESCALATOR element NAME, which has been replaced by a
	"name" attribute.

	* src/omp.c (modify_task_name): Remove.  Out of use.
	(client_state_t): Remove name state.
	(omp_xml_handle_start_element): Remove name test.
	(omp_xml_handle_end_element, omp_xml_handle_text): Remove name cases.

2010-06-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): Remove stray free from
	CLIENT_DELETE_SCHEDULE.

2010-06-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_TARGETS and
	CLIENT_GET_ESCALATORS pass the sort order from the data instead of
	current_int_2 to the task iterator.

2010-06-02  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch GET_TARGETS to the new callback data mechanism.

	* src/omp.c (get_targets_data_t): New type.
	(get_targets_data_reset): New function.
	(command_data_t): Add get_targets.
	(get_targets_data): New variable.
	(modify_task_value): Remove.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Make
	GET_TARGETS cases use command_data.

2010-06-02  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch GET_NVT_FAMILIES to the new callback data mechanism.

	* src/omp.c (get_nvt_families_data_t): New type.
	(get_nvt_families_data_reset): New function.
	(command_data_t): Add get_nvt_families.
	(get_nvt_families_data): New variable.
	(modify_task_value): Remove.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Make
	GET_NVT_FAMILIES cases use command_data.

2010-06-02  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch GET_NVT_DETAILS to the new callback data mechanism.

	* src/omp.c (get_nvt_details_data_t): New type.
	(get_nvt_details_data_reset): New function.
	(command_data_t): Add get_nvt_details.
	(get_nvt_details_data): New variable.
	(modify_task_value): Remove.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Make
	GET_NVT_DETAILS cases use command_data.

2010-06-02  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch GET_NVT_FEED_CHECKSUM to the new callback data mechanism.

	* src/omp.c (get_nvt_feed_checksum_data_t): New type.
	(get_nvt_feed_checksum_data_reset): New function.
	(command_data_t): Add get_nvt_feed_checksum.
	(get_nvt_feed_checksum_data): New variable.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Make
	GET_NVT_FEED_CHECKSUM cases use command_data.

2010-06-02  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch GET_LSC_CREDENTIALS to the new callback data mechanism.

	* src/omp.c (get_lsc_credentials_data_t): New type.
	(get_lsc_credentials_data_reset): New function.
	(command_data_t): Add get_lsc_credentials.
	(get_lsc_credentials_data): New variable.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Make
	GET_LSC_CREDENTIALS cases use command_data.

2010-06-02  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch GET_ESCALATORS to the new callback data mechanism.

	* src/omp.c (get_escalators_data_t): New type.
	(get_escalators_data_reset): New function.
	(command_data_t): Add get_escalators.
	(get_escalators_data): New variable.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Make
	GET_ESCALATORS cases use command_data.

2010-06-02  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch GET_CONFIGS to the new callback data mechanism.

	* src/omp.c (get_configs_data_t): New type.
	(get_configs_data_reset): New function.
	(command_data_t): Add get_configs.
	(get_configs_data): New variable.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Make
	GET_CONFIGS cases use command_data.

2010-06-01  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch GET_AGENTS to the new callback data mechanism.

	* src/omp.c (get_agents_data_t): New type.
	(get_agents_data_reset): New function.
	(command_data_t): Add get_agents.
	(get_agents_data): New variable.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Make
	GET_AGENTS cases use command_data.

2010-06-01  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (print_report_xml, omp_xml_handle_end_element): Initialize
	result_hosts always, to quiet a compiler warning.

2010-05-28  Michael Wiegand <michael.wiegand@greenbone.net>

	Post-release version bump.

	* CMakeLists.txt: Updated version number.

2010-05-28  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 1.0.0-beta7 release.

	* CHANGES: Updated.

2010-05-27  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch MODIFY_TASK to the new callback data mechanism.

	* src/omp.c (modify_task_data_t): Add fields for remaining values.
	(modify_task_data_reset): Free new fields.
	(modify_task_parameter, modify_task_comment, modify_task_file)
	(modify_task_rcfile): Remove.  Out of use global vars.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Make MODIFY_TASK cases use command_data for all
	data.

2010-05-27  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch MODIFY_CONFIG to the new callback data mechanism.

	* src/omp.c (modify_config_data_t): New type.
	(modify_config_data_reset): New function.
	(command_data_t): Add modify_config.
	(modify_config_data): New variable.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Make MODIFY_CONFIG cases use command_data.

2010-05-26  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch MODIFY_REPORT to the new callback data mechanism.

	* src/omp.c (modify_report_data_t): New type.
	(modify_report_data_reset): New function.
	(command_data_t): Add modify_report.
	(modify_report_data): New variable.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Make MODIFY_REPORT cases use command_data.

2010-05-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/CMakeLists.txt: Lowercase commands.

2010-05-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (fork_connection_for_schedular): Add certificates to
	openvas_server_new call.

	* src/ompd.c (CACERT, CLIENTCERT, CLIENTKEY): New defines.
	(recreate_session): Add certificates to openvas_server_new call.

2010-05-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c: Repair indentation put out in revision 7409.

2010-05-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (run_task): Only send the base64 part of the public key.

2010-05-25  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (run_task): If the credential has a public key, send the
	passphrase for the "SSH Authorization" NVT.  Also send public and private
	keys as attached files.

2010-05-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (migrate_17_to_18_set_pref): New function.
	(migrate_17_to_18): Ensure "Mark unrechable Hosts as dead" is set to "yes"
	for "Ping Host" NVT in predefined configs.

2010-05-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (setup_full_config_prefs): Set "Mark unrechable Hosts
	as dead" to "yes" for "Ping Host" NVT.

2010-05-24  Matthew Mundell <matthew.mundell@greenbone.net>

	Increase database version to 18 to ensure "Ping Host" is in the "All"
	NVT selector.  Add database migration from version 17 to 18.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 18.

	* src/manage_sql.c (migrate_17_to_18): New function.
	(database_migrators): Add migrate_17_to_18.

2010-05-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (init_manage): Add "Ping Host" portscanner to "All" NVT
	selector.

2010-05-21  Matthew Mundell <matthew.mundell@greenbone.net>

	Recover speed of report result iteration.

	* src/manage_sql.c (where_cvss_base): Get the cvss_base with an embedded
	SELECT.
	(init_result_iterator, report_scan_result_count): Remove "nvts" from the
	selected tables, as the WHERE clause now SELECTs on that table.

2010-05-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (manage_complete_nvt_cache_update): Remove prefs from
	configs where the pref has vanished from the NVT.

2010-05-19  Matthew Mundell <matthew.mundell@greenbone.net>

	Respect OMP GET_REPORT min_cvss_base for XML based and NBE formats.

	* src/omp.c (print_report_xml, print_report_latex): Add min_cvss_base
	arg.  Pass through to init_result_iterator.
	(omp_xml_handle_end_element): In CLIENT_GET_REPORT in the "nbe" and XML
	based cases, respect the min_cvss_base attribute.

2010-03-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd_report_html.xsl (issue): Add CVSS to header.

2010-05-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (print_report_latex): Add NVT name and CVSS to result headers.

2010-05-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (print_report_latex): Include result_hosts_only in details of
	report contents.

2010-05-19  Matthew Mundell <matthew.mundell@greenbone.net>

	Add CVSS constraint to OMP GET_REPORT.

	* src/omp.c (get_report_data_t): Add min_cvss_base.
	(get_report_data_reset): Free min_cvss_base.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Add
	min_cvss_base handle to the XML format of GET_REPORT.

	* src/manage_sql.c (where_cvss_base): New function.
	(init_result_iterator, report_scan_result_count): Add min_cvss_base arg.

	* src/manage.h: Update headers accordingly.

2010-05-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_REPORT in the "nbe"
	case, respect the OMP GET_REPORT result_hosts_only attribute.

2010-05-18  Matthew Mundell <matthew.mundell@greenbone.net>

	Respect the OMP GET_REPORT result_hosts_only attrib for XML based reports.

	* src/omp.c (array_add_new_string): Move up in file.
	(print_report_xml): Add result_hosts_only arg.
	(omp_xml_handle_end_element): In CLIENT_GET_REPORT pass result_hosts_only
	attrib to print_report_xml.

2010-05-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): Repair more CLIENT_GET_REPORT
	formatting put out in revision 6521.

2010-05-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): Repair CLIENT_GET_REPORT arg
	overhang formatting put out in revision 6521.

2010-05-18  Matthew Mundell <matthew.mundell@greenbone.net>

	Respect the OMP GET_REPORT result_hosts_only attrib for LaTeX reports.

	* src/omp.c (print_report_latex): Add result_hosts_only arg.
	(omp_xml_handle_end_element): In CLIENT_GET_REPORT pass result_hosts_only
	attrib to print_report_latex.

	* src/manage_sql.c (manage_report_host_has_results): New function.

	* src/manage.h: Add header accordingly.

2010-05-18  Matthew Mundell <matthew.mundell@greenbone.net>

	Add an attrib to OMP GET_REPORT to limit the host info to hosts that have
	results.

	* src/omp.c (get_report_data_t): Add result_hosts_only.
	(omp_xml_handle_start_element): Parse GET_REPORT result_hosts_only attrib.
	(array_add_new_string): New function.
	(omp_xml_handle_end_element): In CLIENT_GET_REPORT send host info
	according to result_hosts_only.

	* src/manage_sql.c (init_host_iterator): Add host constraint arg.  Update
	all callers.

	* src/manage.h: Update header accordingly.

	* src/manage.c: Update init_host_iterator callers.

2010-05-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_REPORT align
	SEND* args properly.

2010-05-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_TEST_ESCALATOR replace
	old current_uuid with command_data.

2010-05-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (init_manage): Add CVSS base and risk factor to nvti
	cache.
	(result_iterator_nvt_cvss_base, result_iterator_nvt_risk_factor): New
	functions.

	* src/manage.h: Add headers accordingly.

	* src/omp.c (buffer_results_xml): Add CVSS_BASE and RISK_FACTOR to
	RESULT/NVT.

2010-05-14  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch CREATE_ESCALATOR to the new callback data mechanism.

	* src/omp.c (create_escalator_data_t): New type.
	(create_escalator_data_reset): New function.
	(command_data_t): Add create_escalator.
	(create_escalator_data): New variable.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Make CREATE_ESCALATOR cases use command_data.

2010-05-14  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch CREATE_TASK to the new callback data mechanism.

	* src/omp.c (create_task_data_t): New type.
	(create_task_data_reset): New function.
	(command_data_t): Add create_task.
	(create_task_data): New variable.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Make CREATE_TASK cases use command_data.

2010-05-14  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch CREATE_AGENT to the new callback data mechanism.

	* src/omp.c (create_agent_data_t): New type.
	(create_agent_data_reset): New function.
	(command_data_t): Add create_agent.
	(create_agent_data): New variable.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Make CREATE_AGENT cases use command_data.

2010-05-13  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch CREATE_CONFIG to the new callback data mechanism.

	* src/omp.c (create_config_data_t): Add remaining elements.
	(create_config_data_reset): Free new elements.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Make CREATE_CONFIG cases use command_data.

2010-05-13  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch CREATE_LSC_CREDENTIAL to the new callback data mechanism.

	* src/omp.c (create_lsc_credential_data_t): New type.
	(create_lsc_credential_data_reset): New function.
	(command_data_t): Add create_lsc_credential.
	(create_lsc_credential_data): New variable.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Make CREATE_LSC_CREDENTIAL cases use command_data.

2010-05-13  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch TEST_ESCALATOR to the new callback data mechanism.

	* src/omp.c (test_escalator_data_t): New type.
	(test_escalator_data_reset): New function.
	(command_data_t): Add test_escalator.
	(test_escalator_data): New variable.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Make
	TEST_ESCALATOR cases use command_data.

2010-05-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (help_text): Sort lines.
	(omp_xml_handle_start_element): Sort comparisons in CLIENT_AUTHENTIC.

2010-05-13  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch DELETE_REPORT and DELETE_TASK to the new callback data mechanism.

	* src/omp.c (delete_report_data_t, delete_task_data_t): New types.
	(delete_report_data_reset, delete_task_data_reset): New functions.
	(command_data_t): Add fields for delete commands.
	(delete_report_data, delete_task_data): New variables.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Make delete
	command cases use command_data.

2010-05-13  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch DELETE_AGENT, DELETE_CONFIG, DELETE_ESCALATOR,
	DELETE_LSC_CREDENTIAL and DELETE_TARGET to the new callback data
	mechanism.

	* src/omp.c (delete_agent_data_t, delete_config_data_t)
	(delete_escalator_data_t, delete_lsc_credential_data_t)
	(delete_target_t): New types.
	(delete_agent_data_reset, delete_config_data_reset)
	(delete_escalator_data_reset, delete_lsc_credential_data_reset)
	(delete_target_data_reset): New functions.
	(command_data_t): Add fields for delete commands.
	(delete_agent_data, delete_config_data, delete_escalator_data)
	(delete_lsc_credential_data, delete_target_data): New variables.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Make delete command cases use command_data.

2010-05-13  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch START_TASK to the new callback data mechanism.

	* src/omp.c (start_task_data_t): New type.
	(start_task_data_reset): New function.
	(command_data_t): Add start_task.
	(start_task_data): New variable.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Make
	START_TASK cases use command_data.

2010-05-13  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch RESUME_STOPPED_TASK to the new callback data mechanism.

	* src/omp.c (resume_stopped_task_data_t): New type.
	(resume_stopped_task_data_reset): New function.
	(command_data_t): Add resume_stopped_task.
	(resume_stopped_task_data): New variable.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Make
	RESUME_STOPPED_TASK cases use command_data.

2010-05-13  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch RESUME_PAUSED_TASK to the new callback data mechanism.

	* src/omp.c (resume_paused_task_data_t): New type.
	(resume_paused_task_data_reset): New function.
	(command_data_t): Add resume_paused_task.
	(resume_paused_task_data): New variable.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Make
	RESUME_PAUSED_TASK cases use command_data.

2010-05-13  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch RESUME_OR_START_TASK to the new callback data mechanism.

	* src/omp.c (resume_or_start_task_data_t): New type.
	(resume_or_start_task_data_reset): New function.
	(command_data_t): Add resume_or_start_task.
	(resume_or_start_task_data): New variable.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Make
	RESUME_OR_START_TASK cases use command_data.

2010-05-13  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch PAUSE_TASK to the new callback data mechanism.

	* src/omp.c (pause_task_data_t): New type.
	(pause_task_data_reset): New function.
	(command_data_t): Add pause_task.
	(pause_task_data): New variable.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Make
	PAUSE_TASK cases use command_data.

2010-05-13  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch ABORT_TASK to the new callback data mechanism.

	* src/omp.c (abort_task_data_t): New type.
	(abort_task_data_reset): New function.
	(command_data_t): Add abort_task.
	(abort_task_data): New variable.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Make
	ABORT_TASK cases use command_data.

2010-05-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (task_current_report): Include reports with end times,
	as the report gets an end time when the task is stopped.

2010-05-13  Matthew Mundell <matthew.mundell@greenbone.net>

	Remove code for potential ABORT_TASK extension.

	* src/omp.c (client_state_t): Remove CLIENT_ABORT_TASK_CRITERION.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Remove
	ABORT_TASK CRITERION handling.

2010-05-13  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch CREATE_TARGET to the new callback data mechanism.

	* src/omp.c (create_target_data_t): New type.
	(create_target_data_reset): New function.
	(command_data_t): Add create_target.
	(create_target_data): New variable.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Switch CREATE_TARGET cases to use command_data.

2010-05-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c: Sort command data types and functions alphabetically.

2010-05-13  Matthew Mundell <matthew.mundell@greenbone.net>

	Remove experimental command data type.

	* src/omp.c (name_command_data_t, name_command_data_reset): Remove.
	(command_data_t): Remove name_command.

2010-05-12  Matthew Mundell <matthew.mundell@greenbone.net>

	Add database migration from version 16 to 17.

	* src/manage_sql.c (migrate_16_to_17): New function.
	(database_migrators): Add migrate_16_to_17.

	* src/otp.c (parse_tags): Remove.  To manage.c.

	* src/manage.c (parse_tags): New function.  From otp.c.

	* src/manage.h: Add header accordingly.

2010-05-12  Matthew Mundell <matthew.mundell@greenbone.net>

	Add CVSS base and risk factor to NVTs.  Hence increase database
	version to 17.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 17.

	* src/manage_sql.c (create_tables): Add cvss_base and risk_factor to nvts.
	(make_nvt_from_nvti): Set CVSS base and risk factor.
	(init_nvt_iterator, select_config_nvts): Add CVSS base and risk factor to
	selection.
	(nvt_iterator_cvss_base, nvt_iterator_risk_factor): New functions.

	* src/manage.h: Add headers accordingly.

	* src/omp.c (send_nvt): Add CVSS base and risk factor to detailed
	response.

	* src/otp.c (parse_tags): New function.
	(parse_scanner_plugin_list_tags): Separate out CVSS base and risk factor
	from other tags.

2010-05-12  Matthew Mundell <matthew.mundell@greenbone.net>

	Add open ports to report results.

	* src/manage_sql.c (append_task_open_port): Add host arg.  Take port as
	string.  Add port to results as log message.

	* src/manage.h: Update header accordingly.

	* src/otp.c (process_otp_scanner_input): Set current_host in
	SCANNER_PORT_HOST.  Adjust SCANNER_PORT_NUMBER to updated
	append_task_open_port, freeing current_host.

2010-05-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (buffer_config_preference_xml): Neaten formatting.  Free
	data.
	(omp_xml_handle_end_element): In CLIENT_GET_NVT_DETAILS and
	CLIENT_GET_CONFIGS, buffer preferences with buffer_config_preference_xml
	instead of doing the work directly.

2010-05-11  Matthew Mundell <matthew.mundell@greenbone.net>

	Extend OMP GET_PREFERENCES for getting subsets of all preferences and
	for getting the values of preferences on a particular config.

	* src/manage_sql.c (manage_nvt_name): New function.

	* src/manage.h: Add header accordingly.

	* src/omp.c (get_preferences_data_t): New type.
	(get_preferences_data_reset, buffer_config_preference_xml): New functions.
	(command_data_t): Add get_preferences.
	(get_preferences_data): New variable.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Add "oid",
	"config" and "preference" attribs to GET_PREFERENCES.

2010-05-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (run_task): Correct var name in comment.

2010-05-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (init_nvt_preference_iterator): Remove stray semicolon
	from SQL.

2010-05-10  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.h: Neaten copyright date.
	(task_status_t): Improve doc.

	* src/openvasmd.c: Neaten copyright date.  Flush trailing whitespace.
	(fork_connection_for_schedular): Move arg to separate line for clarity.
	(update_or_rebuild_nvt_cache): Align two lines properly.

	* src/manage.c (send_user_rules): Remove resolved todo.  Reduce line
	length.  Remove trivial todo.

2010-05-10  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (init_manage): Skip task consistency checks when in
	cache update mode.

2010-05-10  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (task_current_report): Correct SQL.

2010-05-10  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (task_current_report): New function.

	* src/manage.h: Add header accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_STATUS get the
	current report instead of the running report, so that the response
	includes progress info for stopped and paused tasks.

2010-05-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (create_lsc_credential): Bring line within 80 chars.

2010-05-07  Michael Wiegand <michael.wiegand@greenbone.net>

	* src/manage_sql.c (create_lsc_credential): Allow "." and "@"
	characters in LSC credentials.

2010-05-06  Matthew Mundell <matthew.mundell@greenbone.net>

	Add "threat level changed" escalator condition.

	* src/manage.h (escalator_condition_t): Add THREAT_LEVEL_CHANGED entry.

	* src/manage.c (escalator_condition_name)
	(escalator_condition_description, escalator_condition_from_name): Add
	THREAT_LEVEL_CHANGED cases.

	* src/manage_sql.c (task_previous_threat_level): New function.
	(condition_met): Add THREAT_LEVEL_CHANGED check.

2010-05-06  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (send_config_preferences): Add task files arg.  Send the
	preference value instead of a UUID when there is a task file named by the
	preference value.
	(slist_free): New function.
	(run_task): Pass the task files to send_config_preferences.

2010-05-06  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (run_task): When sending preference files, if there's a
	task file with the same name as value of the preference file, then skip
	sending the preference value as a file.

2010-05-05  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (send_config_preferences): Add arg for collecting files
	to send to scanner.
	(send_file): New function.
	(run_task): Send files stored in config preferences to scanner.

2010-05-04  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c: Update free_array calls to array_free.

2010-05-04  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/CMakeLists.txt: Replace tasks_sql.h with manage_sql.c in tags files.

2010-05-04  Matthew Mundell <matthew.mundell@greenbone.net>

	* INSTALL: Add spaces after full stops.

2010-05-04  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Moved shared code between openvas-administrator and openvas-manager
	into openvas-libraries.

	* src/manage.c (make_array, free_array): Moved to
	openvas-libraries/base/array module.

	* src/manage.h: Removed typedef and protos, include array module from
	openvas-libraries/base .

	* src/omp.c (array_add, array_terminate, array_reset): Moved to array
	module in openvas-libraries/base .

2010-04-27  Michael Wiegand <michael.wiegand@greenbone.net>

	* INSTALL: Updated instructions for certificate generation, added a
	few headings and moved paragraphs to improve readability.

2010-04-27  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Use new openvas-libraries/base/credentials module, removed duplicate
	code.

	* src/manage.h (task_status_t): Include new header, removed protos.

	* src/manage.c (free_credentials, append_to_credentials_username)
	(append_to_credentials_password): Moved to new module.

2010-04-27  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/manage.h (task_status_t): Document, fix numerical values.

2010-04-27  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Reviving formerly reverted changes (penultimate commit). The issue
	was solved elsewhere, two minor additional changes.

	* src/manage.h, src/manage.c, src/manage_sql.c, src/openvasmd.c:
	Reverted to penultimate commit.

	* src/manage.c (run_task): Added todo about possible code collapse.
	(manage_schedule): Fixed setting of owner_uuid (second in list).

2010-04-26  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Reverting last commit due to not yet identified bug that leads to
	crashes with most authentication attempts.

	* src/manage.h, src/manage.c, src/manage_sql.c, src/openvasmd.c:
	Reverted last commit.

2010-04-26  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Use openvas libraries to access the correct users rules, even if user
	is remotely authenticated.
	Therefore, store users uuid for scheduled tasks.

	* src/manage.h: Added 2010 to copyright statement.
	(get_scheduled_user_uuid, set_scheduled_user_uuid): Added protos.
	(manage_schedule): Adjusted proto.

	* src/manage.c (send_user_rules): Call openvas_auth_user_uuid_rules and
	pass current credentials uuid to access the correct rules for
	remotely authenticated users.
	(schedule_user_uuid): New variable that holds uuid of user in case of
	a scheduled task.
	(get_scheduled_user_uuid): New. Getter for schedule_user_uuid.
	(set_scheduled_user_uuid): New. Setter for schedule_user_uuid.
	(manage_schedule): Adjusted signature, get, set, use and free the
	uuid of a user that scheduled a task.

	* src/manage_sql.c (authenticate): In case of a scheduled task, set the
	previously stored uuid.

	* src/openvasmd.c: Added 2010 to copyright statement.
	(fork_connection_for_schedular): Added new parameter to signature,
	set users uuid for scheduled tasks.

2010-04-26  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/manage.c: Added 2010 to copyright statement.
	(free_credentials): Removed unneeded conditional, resolves part of
	todo.

2010-04-26  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/manage_sql.c: Added 2010 to copyright statement.
	(sql_x): Removed newline in log messages.

2010-04-26  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/manage_sql.c (sql_quote, sql_nquote): Added documentation.

2010-04-26  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* CMakeLists.txt: Lower-cased cmake commands as in CMakeLists.txt files
	of other modules.

2010-04-26  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Improve SQL statement to fetch the ROWID of an report in progress of
	a running task. This change can prevent issues that occurred when the
	database was left in an inconsistent state (e.g. due to
	"malformed disk image" issues).

	* src/manage_sql.c (task_running_report): Made the SQL
	statement to fetch the ROWID of the report in progress of a running
	task more robust. Ensure that the report is in "running" state.
	If multiple such reports should exist (should occur only if serious
	errors came up before), select the last one.

2010-04-26  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Ensure that after every fork the database is reopened in the child.
	This is required by sqlite3 in order to prevent race conditions that
	lead to "malformed disk image"s of the database.

	* src/manage_sql.c (task_db_name): New variable to hold the database
	file name.
	(reinit_manage_process): New function.
	(init_manage): Store the database name in new variable.

	* src/manage_sql.h: Added proto.

	* src/manage.c (run_task), src/openvasmd.c (accept_and_maybe_fork):
	Reinit manage process after fork.

2010-04-23  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/manage_sql.c (init_manage): Improved doc.
	(authenticate): Added todo wrt remotely authenticated users.

2010-04-23  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Extracted two functions from main to enhance readability.

	* src/openvasmd.c (update_or_rebuild_nvt_cache): New function
	containing the nvt cache update and rebuild code.
	(main_loop): New function containing the main loop code.
	(main): Extracted code, call respective new functions.

2010-04-23  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/openvasmd.c (cleanup): Made function static.
	(main): Use multiline comments as in the rest of the module, made
	comments full sentences.

2010-04-23  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/manage.c (send_user_rules): Added todo, as function has to be
	consolidated and moved into libraries to allow proper rules sending
	of remotely authenticated users.
	(manage_schedule): Added comments, renamed local uuid variables in
	task_uuid to make future addition of a user_uuid variable easier to
	comprehend.

2010-04-23  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/openvasmd.c: Added stub for documentation subsection about
	forking behaviour of openvasmd.
	(accept_and_maybe_fork): Made static.
	(main): Added comments, collapsed unconditioned statement.

2010-04-23  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/openvasmd.c: Removed setting of experimental FORK flag.
	(accept_and_maybe_fork): Removed pathes that were started to have a
	non-forking manager.

2010-04-22  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/openvasmd.c (main, cleanup): Moved call to
	openvas_auth_tear_down to cleanup function as suggested by Matthew
	Mundell.

2010-04-21  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* doc/Doxyfile.in, doc/Doxyfile_full.in: Added missing file to INPUT
	file list.

2010-04-16  Stephan Kleine

	* src/manage.h (cleanup_manage_process): Add gboolean parameter.

	* src/openvasmd.c (cleanup): Add TRUE to cleanup_manage_process call.

2010-04-16  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/manage.c (send_config_rules): Extracted code to
	openvas-libraries/openvas_auth module to allow easier future
	integration of remote authentication methods.
	(free_credentials): Added todo about possible memleak and improvability
	of readability.

2010-04-16  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/openvasmd.c (main): Initialize and tear down authentication
	system.

2010-04-15  Stephan Kleine

	* src/CMakeLists.txt, src/tests/CMakeLists.txt: Fix linking issues.

2010-04-15  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* CMakeLists.txt, INSTALL: Raised required version of openvas-libraries
	to 3.0.6 .

2010-04-15  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Moved code to openvas-libraries/misc/openvas_auth module.

	* src/manage_sql.c (openvas_user_uuid, openvas_authenticate_uuid):
	Moved to openvas-libraries/misc/openvas_auth module.
	(authenticate): Added comment.

2010-04-15  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Moved code to openvas-libraries/misc/openvas_uuid module.

	* src/manage.c (make_report_uuid): Removed.
	(make_task_uuid): Removed.

	* src/manage.h (make_report_uuid, make_task_uuid): Removed headers
	accordingly.

	* src/manage_sql.c (sql_make_uuid, openvas_user_uuid, migrate_9_to_10)
	(migrate_12_to_13, create_report, make_task, create_config)
	(create_config_rc, copy_config, create_note): Added include, reflect
	function name change.

	* src/tests/make_report_uuid_0.c (main): Added include.
	Reflect function name change in code.

2010-04-15  Michael Wiegand <michael.wiegand@greenbone.net>

	Post-release version bump.

	* CMakeLists.txt: Updated version number.

2010-04-15  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 1.0.0-beta6 release.

	* CHANGES: Updated.

	* CMakeLists.txt: Added autogenerated files to
	CPACK_SOURCE_IGNORE_FILES.

2010-04-14 Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Cosmetics.

	* src/otp.c (category_number): Doc string formatting.

	* src/omp.c (omp_xml_handle_end_element): Added comments.

2010-04-13 Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* INSTALL: Added some missing optional runtime dependencies, as
	suggested by "seph" on the openvas-devel mailinglist.

2010-04-10 Stephan Kleine

	* src/CMakeLists.txt: Fix build with as-needed

	* src/tests/CMakeLists.txt: Fix build with as-needed

2010-04-10 Stephan Kleine

	* CMakeLists.txt: Add support for out-of-source builds.

2010-04-10  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* INSTALL: Improved hint on prerequisites for credentials packages.

2010-03-31  Matthew Mundell <matthew.mundell@greenbone.net>

	Add OMP commands PAUSE_TASK and RESUME_PAUSED_TASK.

	* src/omp.c (help_text): Add new commands.
	(client_state_t): Add new command states.
	(omp_xml_handle_end_element, omp_xml_handle_start_element): Add
	RESUME_OR_START_TASK handling.
	(process_omp_change): New function.

	* src/omp.h: Add header accordingly.

	* src/manage.c (run_status_name, stop_task): Add pause and resume states.
	(pause_task, resume_paused_task): New functions.
	(manage_check_current_task): Add pausing and resuming.

	* src/manage.h: Add headers accordingly.

	* src/ompd.c (serve_omp): Periodically call process_omp_change.

	* src/otp.c (process_otp_scanner_input): Add OTP pause and resume
	handling.

	* src/manage_sql.c (init_manage, set_task_requested, delete_report):
	Include pause and resume states.

2010-03-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (migrate_15_to_16): Also clear all task comments.

2010-03-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_start_element): In CLIENT_MODIFY_TASK
	initialise modify_task_comment in case the comment is empty.

2010-03-29  Matthew Mundell <matthew.mundell@greenbone.net>

	Add ESCALATOR to OMP command MODIFY_TASK.

	* src/omp.c (modify_task_data_t): Add escalator_id.
	(modify_task_data_reset): Free escalator_id.
	(client_state_t): Add CLIENT_MODIFY_TASK_ESCALATOR.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Add ESCALATOR
	to MODIFY_TASK handling.

	* src/manage_sql.c (task_escalator, set_task_escalator): New functions.

	* src/manage.h: Add headers accordingly.

2010-03-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (task_escalator): Remove.  Renamed to
	task_escalator_name.
	(task_escalator_name): New function.  Was task_escalator.

	* src/manage.h: Add header accordingly.

	* src/omp.c (omp_xml_handle_end_element): Rename task_escalator calls.

2010-03-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (make_task): Allow comment to be NULL.  Add SQL quotes
	for comment.  Init schedule_next_time.

2010-03-28  Matthew Mundell <matthew.mundell@greenbone.net>

	Add SCHEDULE to OMP command MODIFY_TASK.

	* src/omp.c (modify_task_data_t): New type.
	(modify_task_data_reset): New function.
	(command_data_t): Add modify_task.
	(modify_task_data): New variable.
	(client_state_t): Add CLIENT_MODIFY_TASK_SCHEDULE.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Add SCHEDULE
	to MODIFY_TASK handling.  Add missing CLIENT_MODIFY_TASK_COMMENT end case.

2010-03-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_STATUS add COMMENT
	to TASK.

2010-03-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/db_postgres.sql (schedules): Add column period_months.

	* doc/db.png: Update from SQL.

2010-03-28  Matthew Mundell <matthew.mundell@greenbone.net>

	Add database migration from version 15 to 16.

	* src/manage_sql.c (migrate_15_to_16): New function.
	(database_migrators): Add migrate_15_to_16.

2010-03-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): Check period and duration last.
	Ensure that duration is less than period when period is given in months.

2010-03-27  Matthew Mundell <matthew.mundell@greenbone.net>

	Add calendar month periods to scheduling.  Hence increase database
	version to 16.  Extend OMP SCHEDULE command so clients can specify
	duration and period in months or other calendar units.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 16.

	* src/manage_sql.c (create_tables): Add period_months to table schedules.
	(create_schedule): Add period_months arg.
	(MONTHS_WITHIN_YEAR): New macro.
	(months_between, add_months, schedule_iterator_period_months)
	(task_schedule_iterator_period_months): New functions.
	(init_schedule_iterator, init_task_schedule_iterator): Add period_months to
	columns.  Adjust iterator accessor columns accordingly.
	(task_schedule_iterator_stop_due): Add calendar month period handling.

	* src/manage_sql.h, src/manage.h: Update headers accordingly.

	* src/manage.c (manage_schedule): Remove next time assert from periodic
	case.  Add case for calendar month periods.

	* src/omp.c (interval_from_strings): New function.
	(create_schedule_data_t): Add period_unit and duration_unit.
	(create_schedule_data_reset): Free period_unit and duration_unit.
	(client_state_t): Add duration and period unit states.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Add UNIT to PERIOD and DURATION in OMP SCHEDULE.
	(buffer_schedules_xml): Add PERIOD_MONTHS to SCHEDULE.

	* src/openvasmd.c (main): Set timezone to UTC.

2010-03-25  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_help_0.c (help_text): Bring in line with Manager.

2010-03-25  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/CMakeLists.txt: Replace tasks_sql.h with manage_sql.c.

	* doc/db_postgres.sql (tasks): Add columns schedule and
	schedule_next_time.
	(schedules): New table.

	* doc/db.png: Update from SQL.

2010-03-25  Matthew Mundell <matthew.mundell@greenbone.net>

	Add IN_USE to the details case of OMP GET_SCHEDULE.

	* src/manage_sql.c (init_schedule_iterator): Add field for "in use".
	(schedule_iterator_in_use): New function.

	* src/manage.h: Add header accordingly.

	* src/omp.c (buffer_schedules_xml): Add IN_USE in details case.

2010-03-25  Matthew Mundell <matthew.mundell@greenbone.net>

	Add database migration from version 14 to 15.

	* src/manage_sql.c (migrate_14_to_15): New function.
	(database_migrators): Add migrate_14_to_15.

2010-03-25  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (manage_schedule): Call omp_resume_or_start_task instead
	of omp_start_task to start tasks.

2010-03-25  Matthew Mundell <matthew.mundell@greenbone.net>

	Add OMP command RESUME_OR_START_TASK.

	* src/manage.c (run_task): Convert arg from_stopped to from, and add
	"resume or start" behaviour if from is 2.  Update callers.
	(resume_or_start_task): New function.  Wraps run_task.

	* src/manage.h: Add header accordingly.

	* src/omp.c (help_text): Add RESUME_OR_START_TASK.
	(omp_xml_handle_end_element, omp_xml_handle_start_element): Add
	RESUME_OR_START_TASK handling.

2010-03-25  Matthew Mundell <matthew.mundell@greenbone.net>

	In the schedular, stop tasks with durations at the end of their durations.

	* src/manage.c (manage_schedule): Ensure that start happens within the
	duration if the schedule has a duration.  Correct assert about next and
	first time in start of periodic task.  Collect and stop tasks due for
	stopping.

	* src/manage_sql.c (init_task_schedule_iterator): Add duration.  Adjust
	iterator accessor columns accordingly.
	(task_schedule_iterator_duration): New function.
	(task_schedule_iterator_stop_due): Implement.

	* src/manage_sql.h: Add header accordingly.

2010-03-25  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_SCHEDULE ensure
	that the period is at least as big as the duration.

2010-03-25  Matthew Mundell <matthew.mundell@greenbone.net>

	Init forked child in schedular callback with init_manage_process instead
	of with init_manage, otherwise it resets all the tasks.

	* src/ompd.c (init_ompd_process): New function.

	* src/ompd.h: Add header accordingly.

	* src/openvasmd.c (fork_connection_for_schedular): Init child with
	init_ompd_process.

2010-03-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (time_from_strings): Remove offsetting of day of month.

2010-03-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (time_from_strings): Turn month into offset for mktime.  Match
	daylight saving value of local time.

2010-03-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (schedule_iterator_next_time): Add calculation for
	periodic case.

	* src/omp.c (buffer_schedules_xml): Send schedule times as formatted strings.
	(omp_xml_handle_end_element): Ditto in CLIENT_GET_STATUS.

2010-03-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* ChangeLog: Resurrect overwritten entry.

2010-03-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (task_schedule_iterator_first_time): Make external.

	* src/manage_sql.h: Add header accordingly.

	* src/manage.c (manage_schedule): Ensure periodic task starts within a
	short interval at the beginning of the schedule period.

2010-03-24  Matthew Mundell <matthew.mundell@greenbone.net>

	Account for period in scheduling.

	* src/manage_sql.c (init_task_schedule_iterator): Add schedule period and
	first_time.  Adjust iterator accessor columns accordingly.
	(task_schedule_iterator_period, task_schedule_iterator_first_time): New
	function.

	* src/manage.c (manage_schedule): Account for period when setting next
	schedule time of task.

	* src/manage_sql.h: Add headers accordingly.

2010-03-24  Matthew Mundell <matthew.mundell@greenbone.net>

	Add SCHEDULE to OMP command CREATE_TASK.

	* src/manage_sql.c (set_task_schedule): New function.
	(make_task): Clear schedule.

	* src/manage.h: Add header accordingly.

	* src/omp.c (client_state_t): Add CLIENT_CREATE_TASK_SCHEDULE.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Add SCHEDULE to CREATE_TASK.

2010-03-23  Matthew Mundell <matthew.mundell@greenbone.net>

	Add OMP command CREATE_SCHEDULE.

	* src/manage_sql.c (create_schedule): New function.

	* src/manage.h: Add header accordingly.

	* src/omp.c (time_from_strings): New function.
	(help_text): Add CREATE_SCHEDULE.
	(create_schedule_data_t): New type.
	(create_schedule_data_reset): New define.
	(command_data_t): Add create_schedule.
	(create_schedule_data): New variable.
	(client_state_t): Add CREATE_SCHEDULE states.
	(omp_xml_handle_end_element, omp_xml_handle_start_element)
	(omp_xml_handle_text): Add CREATE_SCHEDULE handling.

2010-03-22  Matthew Mundell <matthew.mundell@greenbone.net>

	Add OMP command DELETE_SCHEDULE.

	* src/manage_sql.c (delete_schedule): New function.

	* src/manage.h: Add header accordingly.

	* src/omp.c (help_text): Add DELETE_SCHEDULE.
	(delete_schedule_data_t): New type.
	(delete_schedule_data_reset): New define.
	(command_data_t): Add delete_schedule.
	(delete_schedule_data): New variable.
	(client_state_t): Add CLIENT_DELETE_SCHEDULE.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Add
	DELETE_SCHEDULE handling.

2010-03-22  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (buffer_schedules_xml): Add tasks that use the schedular to
	response.

	* src/manage_sql.c (schedule_iterator_schedule)
	(init_schedule_task_iterator, schedule_task_iterator_uuid)
	(schedule_task_iterator_name): New functions.

	* src/manage.h: Add headers accordingly.

2010-03-21  Matthew Mundell <matthew.mundell@greenbone.net>

	Give the schedular a socket to a forked Manager, instead of having it
	connect to the main Manager process.

	* src/manage.c (authenticate_allow_all): New variable.
	(manage_auth_allow_all): New function.
	(manage_schedule): Take a callback instead of a host and port.  Call the
	callback to get a child that is already connected to the manager, and
	start the task from the child.

	* src/manage_sql.c (authenticate_allow_all): New header.
	(cleanup_manage_process): Only set the current task if doing all cleanups.
	(authenticate): Always auth with success if authenticate_allow_all is set.
	(init_task_schedule_iterator): Add columns for task owner info.
	(task_schedule_iterator_owner_uuid, task_schedule_iterator_owner_name):
	New functions.

	* src/manage_sql.h, src/manage.h: Add headers accordingly.

	* src/openvasmd.c (SCHEDULE_PERIOD): New define.
	(fork_connection_for_schedular): New function.
	(main): Make manage_schedule run only about every SCHEDULE_PERIOD, instead
	of letting in run after any interrupt.

	* src/omp.c (omp_xml_handle_start_element): In CLIENT_AUTHENTICATE
	initialise the password so that it can be empty.

2010-03-20  Stephan Kleine

	* src/CMakeLists.txt: Install openvasmd into ${SBINDIR} since it is a service.

2010-03-18  Matthew Mundell <matthew.mundell@greenbone.net>

	Move schedule "next time" from schedule to task.  Add the task "next time"
	to the GET_STATUS response.

	* src/manage_sql.c (create_tables): Remove column next_time from
	schedules.  Add column schedule_next_time to tasks.
	(task_schedule_next_time, set_task_schedule_next_time): New functions.
	(set_schedule_next_time): Remove.
	(init_schedule_iterator): Remove next_time from SELECT columns.
	(schedule_iterator_first_time, schedule_iterator_period)
	(schedule_iterator_duration): Change returns to time_t's.
	(schedule_iterator_next_time): Calculate the hypothetical next time.
	(init_task_schedule_iterator): Get next time from tasks instead of
	schedules.

	* src/manage_sql.h, src/manage.h: Update headers accordingly.

	* src/manage.c (manage_schedule): Set next time on task instead of
	schedule.

	* src/omp.c (buffer_schedules_xml): Adjust format to new schedule iterator
	time_t types.
	(omp_xml_handle_end_element): In CLIENT_GET_STATUS add task NEXT_TIME to
	SCHEDULE.

2010-03-18  Matthew Mundell <matthew.mundell@greenbone.net>

	Add OMP command GET_SCHEDULES.

	* src/manage_sql.c (find_schedule, init_schedule_iterator)
	(schedule_iterator_uuid, schedule_iterator_name, schedule_iterator_name)
	(schedule_iterator_first_time, schedule_iterator_next_time)
	(schedule_iterator_period, schedule_iterator_duration): New functions.

	* src/manage.h: Add headers accordingly.

	* src/omp.c (help_text): Add GET_SCHEDULES.
	(get_schedules_data_t): New type.
	(get_schedules_data_reset): New define.
	(command_data_t): Add get_schedules.
	(get_schedules_data): New variable.
	(client_state_t): Add CLIENT_GET_SCHEDULES.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Add
	GET_SCHEDULES handling.
	(buffer_schedules_xml): New function.

2010-03-17  Matthew Mundell <matthew.mundell@greenbone.net>

	Add basis for task scheduling.  Hence increase database version to 15.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 15.

	* src/openvasmd.c (main): Add periodic manage_schedule call to the
	listen loop.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_STATUS add
	SCHEDULE to TASK.

	* src/manage.c (run_task): Only set report_id if an address.
	(manage_schedule): New function.  Forks processes to start scheduled
	tasks.

	* src/manage_sql.c (create_tables): Add table schedules.  Add field
	"schedule" to table tasks.
	(cleanup_manage_process): Add cleanup arg.  Just clear db handle if
	false, for forked processes.
	(task_schedule, schedule_uuid, schedule_name, set_schedule_next_time)
	(init_task_schedule_iterator, cleanup_task_schedule_iterator)
	(task_schedule_iterator_task, task_schedule_iterator_schedule)
	(task_schedule_iterator_next_time, task_schedule_iterator_start_due)
	(task_schedule_iterator_stop_due): New functions.
	(create_report): Allow report_id to be NULL.

	* src/manage.h: Add headers accordingly.
	(schedule_t): New type.

	* src/manage_sql.h: Add headers accordingly.

2010-03-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): Correct command names in
	CLIENT_GET_TARGETS.  Closes #1329 (http://bugs.openvas.org/1329).

2010-03-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* README: Add testing heading and note about authenticating "om".
	Thanks to Hartmut Goebel for suggestion.  Also add a space and an
	apostrophe.

2010-03-12  Matthew Mundell <matthew.mundell@greenbone.net>

	Add resuming of stopped tasks, and hence new OMP command
	RESUME_STOPPED_TASK.

	* src/manage_sql.c (task_last_stopped_report, trim_partial_report): New
	functions.
	(set_task_end_time, set_scan_end_time): If time is NULL, NULL the field.

	* src/manage.c (send_user_rules): Add stopped_report arg.  If given ensure
	that already-completed hosts are denied.
	(run_task): New function.  Body from start_task.  If from_stopped arg is
	true, setup task report for resuming task, and pass report to
	send_user_rules.
	(start_task): Call through to run_task.
	(resume_stopped_task): New function.

	* src/manage.h: Add headers accordingly.

	* src/omp.c (help_text): Add RESUME_STOPPED_TASK.
	(client_state_t): Add CLIENT_RESUME_STOPPED_TASK.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Add RESUME_STOPPED_TASK handling.

2010-03-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* CMakeLists.txt: Indent certificate values like others.

2010-03-11  Michael Wiegand <michael.wiegand@greenbone.net>

	Switched to certificate based authentication.

	* src/openvasmd.c (serve_client, main): Pass our client
	certificate to openvas_server_new when establishing a
	connection. Add fallback defines for CLIENTCERT and CLIENTKEY if
	the are not defined externally.

	* CMakeLists.txt: Set OPENVAS_CLIENT_CERTIFICATE and
	OPENVAS_CLIENT_KEY to the expected certificate and key
	locations.

	* src/CMakeLists.txt: Set defines for certificate and key.

	* src/ompd.c (write_to_scanner): Set the password to a dummy
	value to stay OTP compatible and explain the reason in a
	comment.

	* INSTALL: Document setup for certificate based authentication.

	* README: Updated.

2010-03-04  Matthew Mundell <matthew.mundell@greenbone.net>

	Add task trends.

	* src/manage_sql.c (task_last_report, task_second_last_report)
	(task_trend): New functions.
	(REPORT_COUNT): Only set the variable if an address is given.

	* src/manage.h: Add header accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_STATUS send TREND
	in TASK.

2010-03-04  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (manage_set_config_families): When updating the cache
	when the entire family is selected, increment the family count if the
	family is being newly selected instead of if the family was already
	selected.

2010-03-04  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (select_config_nvts): Remove table qualifier from
	sort field, now that fallback has such.

2010-03-04  Michael Wiegand <michael.wiegand@greenbone.net>

	Post-release version bump.

	* CMakeLists.txt: Updated version number.

2010-03-04  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 1.0.0-beta5 release.

	* CHANGES: Updated.

2010-03-04  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_REPORT pipe
	xsltproc output instead of using -o, so that the file is still created
	when the transformation result is empty.

2010-03-04  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (select_config_nvts, init_note_iterator): Ensure
	fallback sort fields include table when selecting in multiple tables.

2010-03-04  Michael Wiegand <michael.wiegand@greenbone.net>

	* src/CPE.xsl: New file.

	* src/CMakeLists.txt: Install CPE.xsl.

2010-03-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd_report_html.xsl: Add copyright header.

2010-03-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (init_manage): Improve test for example task.  Insert
	config and target of example task as IDs instead of names.

2010-03-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ITG.xsl: New file.

	* src/CMakeLists.txt: Install ITG.xsl.

2010-03-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_REPORT try create
	the report from a configured stylesheet if all the other format cases
	fail to match the format.

2010-03-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* README: Update usage.

	* src/openvasmd.c (otp): New variable.
	(serve_client): Only serve OTP if OTP is enabled.
	(main): Add --otp.

2010-03-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd_report_html.xsl (wrap): Select substring correctly after
	wrap.

2010-02-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (sql, sql_x, sql_int, sql_string, sql_int64): Make
	static.

	* src/manage_sql.h (sql): Remove.

2010-02-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (set_task_requested): New function.

	* src/manage_sql.h: Add header accordingly.

	* src/manage.c (start_task): Use set_task_requested.

2010-02-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.c (init_nvt_iterator, select_config_nvts): If sort_field
	is NULL use name instead of ROWID, because name is selected.

2010-02-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage_sql.h: Use work email address.

2010-02-26  Matthew Mundell <matthew.mundell@greenbone.net>

	Make manage library work now that the SQL portion is a real C file.

	* src/manage_sql.h: New file.

	* src/manage.c: Include manage_sql.h instead of tasks_sql.h.
	(inc_task_report_count, dec_task_report_count, print_tasks): Remove.  Old
	headers.
	(escalator_data): Move to manage_sql.h.
	(threat_message_type, message_type_threat, delete_reports): Make external
	so manage_sql.c can use them.

	* src/manage_sql.c: Add includes.
	(threat_message_type, message_type_threat, delete_reports): New
	declarations.  For private functions defined in manage.c.
	(init_otp_pref_iterator, otp_pref_iterator_name, otp_pref_iterator_value)
	(escalator_data, create_report, task_file_iterator_name)
	(target_lsc_credential): Make external so manage.c can use them.

	* TODO: Remove entry about file system backend.

2010-02-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/CMakeLists.txt: Link manage_sql to manage.

2010-02-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h: Rename to src/manage_sql.c.

	* src/manage_sql.c: New file.  Was src/tasks_sql.h.

2010-02-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/CMakeLists.txt: Remove TASKS_SQL directive.

2010-02-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.h, src/manage.c: Remove file system based task alternatives.

2010-02-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/CMakeLists.txt: Set -lsqlite3 on openvasmd directly.

2010-02-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (select_config_nvts): Add missing "ORDER BY"s.

2010-02-25  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (buffer_notes_xml): Add ORPHAN entity to indicate if note's
	task has been removed.

2010-02-25  Matthew Mundell <matthew.mundell@greenbone.net>

	Add a result attribute to OMP GET_NOTES.

	* src/omp.c (get_notes_data_t): Add result.
	(omp_xml_handle_start_element): Parse result attribute.
	(buffer_notes_xml): Add include_result arg.  Update caller.
	(omp_xml_handle_end_element): Pass result attribute to buffer_notes_xml.

2010-02-25  Matthew Mundell <matthew.mundell@greenbone.net>

	Add OMP MODIFY_NOTE.

	* src/tasks_sql.h (modify_note): New function.

	* src/manage.h: Add header accordingly.

	* src/omp.c (help_text): Add MODIFY_NOTE.
	(create_note_data_t): Add note_id.
	(create_note_data_reset): Free note_id.
	(modify_note_data_t): New type.
	(modify_note_data_reset): New define.
	(modify_note_data): New variable.
	(client_state_t): Add MODIFY_NOTE states.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Add MODIFY_NOTE handling.
	(print_report_notes_latex, buffer_results_xml): Sort notes by creation
	time.

2010-02-23  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (print_report_latex): Correct typo in abstract.

2010-02-23  Matthew Mundell <matthew.mundell@greenbone.net>

	Improve the HTML report.

	* src/openvasmd_report_html.xsl (scan_start, scan_end, note): Switch from
	tables to divs.  Add GSA-like style.
	(result) [list] [table]: Remove.
	(result) [issue]: Switch to divs.  Add GSA-like style.
	(report): Make summary like LaTeX report.  Improve layout a bit.  Use new
	issue names (High, Medium...).  Add more headings.  Ensure that each port
	is listed only once in the port summary.
	(/): Wrap everything in a styled table in a styled div.  Add end message.

2010-02-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_REPORT add a "dvi"
	format with the "pdf" case.

2010-02-19  Matthew Mundell <matthew.mundell@greenbone.net>

	Get notes into the LaTeX report.

	* src/omp.c (latex_print_verbatim_text): Add row_colour arg.  Update
	callers.
	(latex_header): Define colour openvas_user_note.
	(print_report_notes_latex): New function.
	(print_report_latex): Add task arg.  Update callers.  Print notes.
	(omp_xml_handle_end_element): In CLIENT_GET_REPORT in the "pdf" case, get
	the task for print_report_latex.

2010-02-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd_report_html.xsl: Convert tabs to spaces.

2010-02-19  Matthew Mundell <matthew.mundell@greenbone.net>

	Get notes into the HTML report.

	* src/omp.c (print_report_xml): Add task arg.  Call buffer_results_xml to
	get results to print.
	(omp_xml_handle_end_element): In CLIENT_GET_REPORT in the "html" and
	"html-pdf" cases pass task to print_report_xml and output the "html"
	xsl tranform errors to a file.

	* src/openvasmd_report_html.xsl (wrap, note): New templates.
	(result) [issue]: Output notes.

2010-02-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_note_iterator): Remove table specifier from sort
	columns.

2010-02-18  Matthew Mundell <matthew.mundell@greenbone.net>

	Add TASK to OMP GET_NOTES.

	* src/omp.c (get_notes_data_t): Add task_id.
	(get_notes_data_reset): Free task_id.
	(client_state_t): Add CLIENT_GET_NOTES_TASK.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Add NVT to
	GET_NOTES.

	* src/tasks_sql.h (NOTE_COLUMNS): New define.
	(init_note_iterator): If result is 0 and task is above 0, then select
	all notes on the task, otherwise select all notes on the result as before.

2010-02-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* ChangeLog: Restore overwritten entry.

2010-02-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/db_postgres.sql (notes): Link to result instead of report.

	* doc/db.png: New file.

2010-02-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (message_type_threat): New function.

	* src/tasks_sql.h (note_iterator_threat): Convert message type to threat.

2010-02-17  Matthew Mundell <matthew.mundell@greenbone.net>

	Add a details flag to OMP GET_NOTES.

	* src/omp.c (get_results_data_t): Add details.
	(omp_xml_handle_start_element): Init GET_NOTES details flag.
	(buffer_notes_xml): New function.  Body from buffer_results_xml.
	(buffer_results_xml): Call buffer_notes_xml.
	(omp_xml_handle_end_element): In CLIENT_GET_NOTES call buffer_notes_xml
	to create body of response.

2010-02-17  Matthew Mundell <matthew.mundell@greenbone.net>

	Add NVT to OMP GET_NOTES.

	* src/tasks_sql.h (init_note_iterator): Add nvt arg.

	* src/manage.h: Update header accordingly.

	* src/omp.c: Update init_note_iterator callers.
	(get_notes_data_t): Add nvt_oid.
	(get_notes_data_reset): Free nvt_oid.
	(client_state_t): Add CLIENT_GET_NOTES_NVT.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Add NVT to
	GET_NOTES.

2010-02-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_NOTES also send
	the note text.

2010-02-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_REPORT in the XML
	case include notes in filter details.

2010-02-17  Matthew Mundell <matthew.mundell@greenbone.net>

	Add OMP GET_RESULTS.

	* src/tasks_sql.h (init_result_iterator): Add result arg.

	* src/manage.h: Update header accordingly.

	* src/omp.c: Add result arg to init_result_iterator calls.
	(help_text): Add GET_RESULTS.
	(get_results_data_t): New type.
	(get_results_data_reset): New function.
	(command_data_t): Add get_results.
	(get_results_data): New variable.
	(client_state_t): Add CLIENT_GET_RESULTS.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Add
	GET_RESULTS handling.

2010-02-17  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): When creating a task, break
	if malcondition was found. Free modify_task_name in success condition.

2010-02-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (insert_nvt_selectors): Set family when inserting family
	selector.

2010-02-16  Matthew Mundell <matthew.mundell@greenbone.net>

	Implement more note constraints.  Create results with UUIDs.

	* src/tasks_sql.h (sql_hosts_contains): New function.
	(init_manage_process): Add SQL function hosts_contains.
	(init_manage): Give predefined result a UUID.
	(make_result): Initialise result UUID.
	(create_note): Translate the threat to a message type before inserting.
	(init_note_iterator): Add task param.  Limit iteration according to hosts,
	port, threat and task.

	* src/manage.h: Update header accordingly.

	* src/manage.c (threat_message_type): New function.

	* src/omp.c (buffer_results_xml): Get notes flags from params.  Add task
	param and pass to init_note_iterator.  Update caller.
	(omp_xml_handle_end_element): In CLIENT_GET_NOTES pass task to
	init_note_iterator.

2010-02-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_NOTE correct
	message typo.

2010-02-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (buffer_xml_append_printf, buffer_results_xml): New functions.
	(omp_xml_handle_end_element): In CLIENT_GET_REPORT in the XML case, output
	the results entity with buffer_results_xml.

2010-02-15  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* INSTALL: List doc-full as possible make target.

2010-02-15  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* INSTALL: Sorted library dependencies alphabetically, added glib,
	raised required openvas-libraries version.

2010-02-12  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (print_report_xml): Add id to RESULT.
	(omp_xml_handle_end_element): In CLIENT_GET_REPORT in the XML case, add
	id to RESULT.

2010-02-12  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ovas-mngr-comm.c (sendn_to_server): Use %zu for size_t's.

2010-02-12  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_note_iterator): Ensure the note applies to the NVT
	of the result.
	(note_iterator_creation_time, note_iterator_modification_time): Switch
	return to int.

	* src/manage.h: Update headers accordingly.

	* src/omp.c (ctime_strip_newline): New function.
	(omp_xml_handle_end_element): In CLIENT_GET_REPORT send formatted dates
	instead of integers.

2010-02-12  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_note_iterator): Include notes applied to all
	results when the request is for a single result.

2010-02-12  Matthew Mundell <matthew.mundell@greenbone.net>

	Add a "notes_details" attribute to GET_REPORT.

	* src/tasks_sql.h (result_uuid, note_iterator_creation_time)
	(note_iterator_modification_time, note_iterator_text, note_iterator_hosts)
	(note_iterator_port, note_iterator_threat, note_iterator_task)
	(note_iterator_result): New functions.

	* src/manage.h: Add headers accordingly.

	* src/omp.c (get_report_data_t): Add notes_details flag.
	(omp_xml_handle_start_element): Parse GET_REPORT notes_details flag.
	(omp_xml_handle_end_element): In CLIENT_GET_REPORT in the XML case send
	all notes info if the notes_details flag is set.

2010-02-11  Matthew Mundell <matthew.mundell@greenbone.net>

	Add a "notes" attribute to GET_REPORT.

	* src/tasks_sql.h (init_result_iterator): Add ROWID.
	(result_iterator_result): New function.
	(result_iterator_subnet, result_iterator_host)
	(result_iterator_port, result_iterator_nvt_oid)
	(result_iterator_type, result_iterator_descr): Increment positions.
	(init_note_iterator): Add result arg.

	* src/manage.h: Update headers accordingly.

	* src/omp.c (get_report_data_t): Add notes flag.
	(omp_xml_handle_start_element): Parse GET_REPORT notes flag.
	(omp_xml_handle_end_element): In CLIENT_GET_REPORT in the XML case send
	the notes if the notes flag is set.

2010-02-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (create_tables): Rename report to result in table notes.
	(create_note, init_note_iterator): Use "result" instead of "report" for
	result column.

2010-02-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (user_owns_result): In SQL specify table for UUID
	and correct table name.

2010-02-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_NOTE pass
	&result to find_result instead of passing &task.

2010-02-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (find_note): Remove redundant owner constraint.

2010-02-11  Matthew Mundell <matthew.mundell@greenbone.net>

	Add OMP GET_NOTES.

	* src/tasks_sql.h (init_note_iterator, note_iterator_uuid)
	(note_iterator_nvt_oid, note_iterator_nvt_name): New functions.

	* src/manage.h: Add headers accordingly.

	* src/omp.c (help_text): Add GET_NOTES.
	(get_notes_data_t): New type.
	(get_notes_data_reset): New function.
	(command_data_t): Add get_notes.
	(get_notes_data): New variable.
	(client_state_t): Add CLIENT_GET_NOTES.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Add
	GET_NOTES handling.

2010-02-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (main): Include --rebuild in error message.

2010-02-11  Matthew Mundell <matthew.mundell@greenbone.net>

	Add OMP DELETE_NOTE.

	* src/tasks_sql.h (find_note, delete_note): New functions.

	* src/manage.h: Add headers accordingly.
	(note_t): New type.

	* src/omp.c (help_text): Add DELETE_NOTE.
	(delete_note_data_t): New type.
	(delete_note_data_reset): New function.
	(command_data_t): Add delete_note.
	(delete_note_data): New variable.
	(client_state_t): Add CLIENT_DELETE_NOTE.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Add
	DELETE_NOTE handling.

	* src/tests/omp_help_0.c (help_text): Add DELETE_NOTE.

2010-02-11  Matthew Mundell <matthew.mundell@greenbone.net>

	Add OMP CREATE_NOTE.

	* src/tasks_sql.h (user_owns_result, find_result, create_note): New
	functions.
	(create_tables): Add notes table.

	* src/manage.h: Add headers accordingly.

	* src/omp.c (help_text): Add CREATE_NOTE.
	(create_note_data_t): New type.
	(create_note_data_reset): New function.
	(command_data_t): Add create_note.
	(create_note_data): New variable.
	(client_state_t): Add CREATE_NOTE states.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Add CREATE_NOTE handling.

	* doc/db_postgres.sql (notes): New table.
	(results): Add uuid.

	* src/tests/omp_help_0.c (help_text): Add CREATE_NOTE.

2010-02-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* README: Correct typo and grammar.

2010-02-11  Matthew Mundell <matthew.mundell@greenbone.net>

	Add result UUIDs.  Hence increase database version to 14.  Add
	database migration from 13 to 14.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 14.

	* src/tasks_sql.h (sql_make_uuid, migrate_13_to_14): New functions.
	(create_tables): Add UUID column to results.
	(database_migrators): Add migrate_13_to_14.
	(init_manage_process): Setup SQL function make_uuid.

2010-02-10  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (print_report_latex): Note in the abstract if the task was
	still running.  Check host end time before printing it.

2010-02-10  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (find_target, find_lsc_credential, find_agent): Quote
	name.
	(find_config): Free quoted_name on error too.

2010-02-10  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (find_config): Look for the config owned by the current
	user.
	(create_config, create_config_rc, copy_config): Limit the "already exists"
	check to the config owned by the current user.
	(delete_config): Remove config by ROWID instead of by name.

2010-02-10  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (find_escalator): Look for the escalator owned by the
	current user.
	(create_escalator): Limit the "already exists" check to the escalator
	owned by the current user.

2010-02-10  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (add_task_escalator): Take escalator_t instead of name.

	* src/manage.h: Update header accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_TASK pass
	escalator_t instead of name to add_task_escalator.

2010-02-10  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (find_lsc_credential): Look for the LSC credential owned
	by the current user.
	(create_lsc_credential): Limit the "already exists" check to the LSC
	credentials owned by the current user.

2010-02-10  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (user_owns, user_owns_uuid, find_target)
	(create_target): Terminate SQL statements.
	(find_agent): Look for the agent owned by the current user.
	(create_agent): Limit the "already exists" check to the agents owned by
	the current user.

2010-02-10  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/lsc_user.c (file_utils_copy_file): Remove G_GSIZE_MODIFIER from
	format string.  Thanks to Stephan Kleine.

2010-02-09  Matthew Mundell <matthew.mundell@greenbone.net>

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 13.  (Missing
	file from commit yesterday).

2010-02-09  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (find_target): Look for the target owned by the current
	user.
	(create_target): Limit the "already exists" check to the targets owned by
	the current user.

2010-02-09  Matthew Mundell <matthew.mundell@greenbone.net>

	Use UUIDs for NVT selector names instead of using the name of the
	associated config.  Hence increase database version to 13.  Add
	database migration from 12 to 13.  Preparation for enabling users
	to name their configs with names used by other users.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 13.

	* src/tasks_sql.h (MANAGE_NVT_SELECTOR_UUID_ALL): New define.
	(insert_rc_into_config): Add NVT selector arg.  Update callers.
	(migrate_12_to_13): New function.
	(database_migrators): Add migrate_12_to_13.
	(init_manage): Use UUID for predefined "All" NVT selector.
	(create_config, create_config_rc, copy_config): Set NVT selector name to
	generated UUID.
	(clude): Rename arg config_name to nvt_selector.
	(delete_config): Get NVT selector name from right column.
	(init_nvt_selector_iterator): Remove completed todo.

2010-02-09  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ovas-mngr-comm.c (sendn_to_server, write_string_to_server)
	(write_to_server_buffer): Cast string format precision modifier to int.
	Thanks to Stephan Kleine.

2010-02-09  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.h (manage_complete_nvt_cache_update): Add missing arg.
	Thanks to Stephan Kleine.

2010-02-08  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): Ensure all parameter lists
	that are on the line following the function name are indented with a
	single character.

2010-02-08  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/otp.c (blank_control_chars): New function.
	(process_otp_scanner_input): Blank control chars in iso_field before
	converting to UTF-8.

2010-02-08  Michael Wiegand <michael.wiegand@greenbone.net>

	Post-release version bump.

	* CMakeLists.txt: Updated version number.

2010-02-08  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 1.0.0-beta4 release.

	* CHANGES: Updated.

2010-02-05  Matthew Mundell <matthew.mundell@greenbone.net>

	* TODO: Flush tabs from within entries.

	* doc/openvasmd.8, doc/openvasmd.html: Sync with generated version.

2010-02-05  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (restore_db): Add missing argument.  Thanks to
	Stephan Kleine for reporting.

2010-02-05  Matthew Mundell <matthew.mundell@greenbone.net>

	Thanks to Stephan Kleine for reporting these.

	* src/omp.c (send_to_client, send_certificate): Use %zu for size_t.

	* src/oxpd.c (read_protocol): Cast precision arg to int.

	* src/lsc_user.c (file_utils_copy_file): Use the right format specifiers.

	* src/tasks_sql.h (escalate_1): Return -1 if to_address is NULL.

2010-02-05  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (latex_escape_text): New function.
	(print_report_latex): Put close paren on line with code.  Pass port in
	summary table column and subsubsection through latex_escape_text.

2010-02-05  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (create_target): Take lsc_credential_t instead of name.

	* src/manage.h: Update header accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_TARGET
	pass lsc_credential_t instead of credential name to create_target.

2010-02-05  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (manage_set_config_nvts): Init new_nvt_count.

	* src/ompd.c (serve_omp): Ensure client_input_stalled in always
	initialised.

2010-02-05  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_escalator_task_iterator): Take escalator_t instead
	of name.

	* src/manage.h: Update header accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_ESCALATORS
	pass escalator_t instead of escalator name to init_escalator_task_iterator.

2010-02-05  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_escalator_iterator): Take escalator_t instead of
	name.  Update caller.

	* src/manage.h: Update header accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_ESCALATORS
	pass escalator_t instead of escalator name to init_escalator_iterator.

2010-02-05  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (find_escalator): Move to top of page like on other
	pages.
	(delete_escalator): Take escalator_t instead of name.

	* src/manage.h: Update header accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_DELETE_ESCALATOR
	pass escalator_t instead of escalator name to delete_escalator.

2010-02-05  Michael Wiegand <michael.wiegand@greenbone.net>

	Post-release version bump.

	* CMakeLists.txt: Updated version number.

2010-02-05  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 1.0.0-beta3 release.

	* CHANGES: Updated.

2010-02-04  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (config_insert_preferences): Init quoted_nvt_name from
	NVT name instead of preference name.

2010-02-04  Matthew Mundell <matthew.mundell@greenbone.net>

	Remove UNIQUE constraint from name of user resource tables.  Hence
	increase database version to 12.  Add database migration from 11 to 12.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 12.

	* src/tasks_sql.h (create_tables): Remove UNIQUE from name column of
	tables agents, configs and escalators.
	(migrate_11_to_12): New function.
	(database_migrators): Add migrate_11_to_12.

	* doc/db_postgres.sql (agents, escalators, targets, configs)
	(lsc_credentials): Remove UNIQUE from name.

2010-02-04  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_agent_iterator): Take config_t instead of name.

	* src/manage.h: Update header accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_AGENTS pass
	agent_t to init_agent_iterator instead of passing name.

2010-02-04  Matthew Mundell <matthew.mundell@greenbone.net>

	Reference targets and configs by ID in the tasks table, instead of by
	name.  Hence increase database version to 11.  Add database migration
	from 10 to 11.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 11.

	* src/tasks_sql.h (create_tables): Make config and target in table tasks
	INTEGERs.
	(migrate_10_to_11): New function.
	(database_migrators): Add migrate_10_to_11.
	(task_config, task_config_name, delete_config, config_in_use)
	(manage_set_config_preference, manage_set_config_preference)
	(manage_set_config_nvts, init_config_task_iterator): Treat task config
	reference as integer.
	(set_task_config): Change config from name to integer.
	(task_target, delete_target, target_in_use)
	(init_target_task_iterator): Treat task target reference as integer.
	(set_task_target): Change target from name to integer.
	(append_to_task_config, append_to_task_target): Remove.
	(create_target): Return created target via arg.
	(create_config_rc): Return created config via arg.

	* src/manage.h: Update headers accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_CONFIG and
	CLIENT_CREATE_TARGET add dummy return args to create_target and
	create_config_rc calls.  In CLIENT_CREATE_TASK set the task config and
	target from the given names.
	(omp_xml_handle_text): In CLIENT_CREATE_TASK_CONFIG and
	CLIENT_CREATE_TASK_TARGET append to global instead of appending into
	task.

2010-02-04  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/task_sql.h (openvas_user_uuid, authenticate): Minor doc.
	(openvas_authenticate_uuid): Added comments.

2010-02-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (latex_header): Switch encoding to UTF-8.

2010-02-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (insert_nvt_selectors): Move to NVT selectors page.
	(find_config): Move to top of page like on other pages.
	(insert_rc_into_config): Doc config_name param.

2010-02-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (config_id_nvt_selector): Remove.  Rename
	config_nvt_selector.  Update callers.
	(config_nvt_selector): New function.  Was config_id_nvt_selector.

	* src/manage.h: Update header accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_TASK update
	config_id_nvt_selector call name.

2010-02-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (copy_config): Take config_t instead of name.

	* src/manage.h: Update header accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_CONFIG
	pass config_t instead of config name to copy_config.

2010-02-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (start_task): Get the config directly, instead of via the
	config name.

2010-02-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_otp_pref_iterator): Take config_t instead of
	name.

	* src/manage.c (send_config_preferences): Take config_t instead of
	name.  Pass config_t to init_otp_pref_iterator.
	(start_task): Pass config_t to send_config_preferences.

2010-02-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_config_pref_iterator)
	(config_pref_iterator_name, config_pref_iterator_value): Remove,
	superceded by newer iterators.

	* src/manage.h: Remove headers accordingly.

2010-02-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_preference_iterator): Take config_t instead of
	name.
	(make_task_rcfile): Pass config_t to init_preference_iterator.

2010-02-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (delete_config): Take config_t instead of name.

	* src/manage.h: Update header accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_DELETE_CONFIG
	pass config_t instead of config name to delete_config.

2010-02-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_DELETE_TARGET
	remove auth case from delete_target return check.

2010-02-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (set_target_hosts, target_hosts)
	(target_lsc_credential, set_target_hosts): Take target_t instead of name.
	(task_target): Return target_t instead of name.
	(make_task_rcfile): Work with target_t instead of name.
	(target_name): New function.

	* src/manage.h: Update headers accordingly.

	* src/manage.c (start_task): Work with target_t instead of name.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_TASK and
	CLIENT_GET_STATUS work with target_t instead of target name.

2010-02-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (serve_omp): Convert scanner input to UTF-8 before
	logging.

	* src/otp.c (process_otp_scanner_input): Turn off tracing of ISO input.

2010-02-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_target_iterator): Add ROWID.
	(target_iterator_target): New function.
	(target_iterator_name, target_iterator_hosts, target_iterator_comment)
	(target_iterator_lsc_credential): Shift column positions.
	(target_in_use): Take target_t instead of name.

	* src/manage.h: Update headers accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_TARGETS pass a
	target_t to target_in_use instead of passing a name.

2010-02-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_target_task_iterator): Take target_t instead of
	name.

	* src/manage.h: Update header accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_TARGETS pass a
	target_t to init_target_task_iterator instead of passing a name.

2010-02-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_target_iterator): Take target_t instead of name.

	* src/manage.h: Update header accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_TARGETS pass a
	target_t to init_target_iterator instead of passing a name.

2010-02-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (find_target): New function.
	(delete_target): Take target_t instead of name.

	* src/manage.h: Update headers accordingly.
	(target_t): New type.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_DELETE_TARGET pass
	target_t to delete_target instead of passing a name.

2010-02-01  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_lsc_credential_iterator): Add ROWID.
	(lsc_credential_iterator_lsc_credential): New function.
	(lsc_credential_iterator_name, lsc_credential_iterator_login)
	(lsc_credential_iterator_password, lsc_credential_iterator_public_key)
	(lsc_credential_iterator_private_key, lsc_credential_iterator_rpm)
	(lsc_credential_iterator_deb, lsc_credential_iterator_exe)
	(lsc_credential_iterator_comment, lsc_credential_iterator_in_use): Adjust
	column position.
	(init_lsc_credential_target_iterator): Take lsc_credential_t instead of
	name.

	* src/manage.h: Add header accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_LSC_CREDENTIALS
	Pass lsc_credential_t to init_lsc_credential_target_iterator instead of
	passing name.

2010-02-01  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (target_lsc_credential_name): Remove.
	(target_lsc_credential): New function.
	(init_lsc_credential_iterator): Take lsc_credential_t instead of
	credential name.

	* src/manage.h: Update header accordingly.

	* src/manage.c (start_task): Pass lsc_credential_t to
	init_lsc_credential_iterator instead of name.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_LSC_CREDENTIALS
	pass lsc_credential_t to init_lsc_credential_iterator instead of name.

2010-02-01  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_manage): Put fullstop on empty config description.

2010-02-01  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (migrate_9_to_10): Correct comment typo.
	(config_in_use): Also check for empty config.

2010-02-01  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (manage_set_config_nvts): Update family count when
	updating cached config info.

2010-02-01  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (handle_sigabrt): Check if already in handler.

	* src/tasks_sql.h (manage_set_config_nvts)
	(manage_set_config_families): Free selector after last use.

	* src/tracef.h (tracef) [TRACE]: Remove UTF-8 conversion.

2010-01-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/CMakeLists.txt: Make warnings errors.

2010-01-28  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* doc/openvasmd.8.xml: Added some of the new commands.

2010-01-27  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_start_element): In
	CLIENT_CREATE_LSC_CREDENTIAL init modify_task_parameter in the
	password case, to indicate that the element has been received.

2010-01-27  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (find_lsc_credential): New function.
	(delete_lsc_credential): Switch name arg to a lsc_credential_t.

	* src/manage.h: Update headers accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_DELETE_LSC_CREDENTIAL
	pass lsc_credential_t to delete_lsc_credential instead of name.

2010-01-27  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_manage): Include only the Nmap scanner from
	"Port scanners" in the "All" NVT selector.

2010-01-27  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (print_report_latex): Spread headings out like rest of file.
	Bring line lengths under 80.

2010-01-27  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (CONFIG_ITERATOR_FIELDS): New define.
	(init_config_iterator, update_all_config_caches): Use
	CONFIG_ITERATOR_FIELDS for SELECT fields, so that both functions
	always use the same fields.
	(family_count): Always count, otherwise the initial value sticks during
	an update.

2010-01-26  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	Post-release version bump.

	* CMakeLists.txt: Updated version number.

2010-01-26  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	Preparing the openvas-manager 1.0.0-beta2 release.

	* CMakeLists.txt: Updated version number.

	* CHANGES: Updated.

2010-01-26  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/ovas-mngr-comm.h (make_session, end_session): Removed prototypes
	(there is no implementation).

2010-01-26  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/omp.c (latex_header): Define "inactive" (gray) color.
	(print_report_latex): Print placeholder text about filters, if some
	shown results are filtered, added respective TODO.

2010-01-26  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): "Early break" if requested
	report uuid is NULL.

2010-01-26  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/tasks_sql.h (migrate_9_to_10): Create a "dummy" uuid in memory
	for users that do not have one on disk (e.g. because they were
	deleted).

2010-01-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (agent_t): Remove.  Move to manage.h.
	(find_agent): New function.
	(delete_agent): Take an agent instead of agent name.

	* src/manage.h: Update headers accordingly.
	(agent_t): New type.  From tasks_sql.h.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_DELETE_AGENT find
	agent and pass agent_t to delete_agent.

2010-01-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (migrate_8_to_9): Ensure that tables added since version
	8 exist.

2010-01-25  Matthew Mundell <matthew.mundell@greenbone.net>

	Add user UUIDs.  Hence increase database version to 10.  Add database
	migration from 9 to 10.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 10.

	* src/manage.h (credentials_t): Add uuid.

	* src/tasks_sql.h (task_owner_uuid, openvas_user_uuid)
	(openvas_authenticate_uuid, migrate_9_to_10): New functions.
	(user_owns, user_owns_uuid, create_escalator, init_escalator_iterator)
	(init_escalator_task_iterator, init_task_iterator, task_count)
	(make_report, make_task, create_target, init_target_iterator)
	(init_target_task_iterator, create_config, create_config_rc)
	(copy_config, init_config_iterator, create_lsc_credential)
	(init_lsc_credential_iterator, create_agent, init_agent_iterator): Get
	the user ROWID by UUID instead of by name.
	(create_tables): Add "uuid" to users.  Drop UNIQUE from users "name".
	(database_migrators): Add migrate_9_to_10.
	(init_manage): Init current_credentials uuid.  Set UUIDs instead of
	names around calls to task functions.
	(authenticate): Ensure a user with the UUID of the authenticated user
	exists in the database.
	(request_delete_task, delete_task): Check for credential UUID instead of
	name.

	* doc/db_postgres.sql (users): Add uuid, remove unique from name.

2010-01-25  Matthew Mundell <matthew.mundell@greenbone.net>

	* README: Capitalise names.

2010-01-25  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/otpd.c (serve_otp): Filter logging of input that may contain
	passwords.

2010-01-25  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ompd.c (serve_omp): Filter logging of input that may contain
	passwords.

	* src/oxpd.c (read_protocol): Filter logging of input that may contain
	passwords.

2010-01-25  Matthew Mundell <matthew.mundell@greenbone.net>

	Add rest of NSIS package generation.

	* src/lsc_user.c (ssh_privkey_create, ssh_pubkey_create): Free astdout
	and astderr.
	(lsc_user_rpm_create): Init and free standard_out and standard_err.
	Neaten messages.
	(execute_alien): Print command output on error. Neaten message.
	(create_nsis_script, execute_makensis, lsc_user_exe_create): New
	functions.
	(lsc_user_all_create): Enable and complete NSIS generation.

2010-01-25  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* README: Added note from INSTALL about special "om" user.

2010-01-22  Matthew Mundell <matthew.mundell@greenbone.net>

	Clean up the database better on exits from signals.

	* src/omp.c (cleanup_manage_process): Set any running task to stopped,
	whatever its state is.
	(manage_cleanup_process_error): New function.

	* src/manage.h: Add header accordingly.

	* src/openvasmd.c (handle_sigabrt, handle_sigsegv): New functions.
	(handle_sigterm, handle_sighup, handle_sigint): Call
	cleanup_manage_process before exit.
	(main): Register SIGABRT and SIGSEGV handlers.

2010-01-22  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (send_reports): Wrap the reports in a REPORTS.

2010-01-22  Matthew Mundell <matthew.mundell@greenbone.net>

	When starting a task send the rules from the user's OpenVAS auth
	directory, instead of from preferences.

	* CMakeLists.txt: Setup OPENVAS_USERS_DIR.

	* src/CMakeLists.txt: Pass OPENVAS_USERS_DIR to compiler.

	* src/manage.c (send_config_rules): Define out.
	(send_user_rules): New function.
	(start_task): Send rules with send_user_rules.

2010-01-21  Matthew Mundell <matthew.mundell@greenbone.net>

	* README: Add --rebuild example.  Note when to update cache.

2010-01-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* INSTALL: Update UUID library.

2010-01-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (create_lsc_credential): Allow \ in login name.  Move
	name quotation to follow login name check.

2010-01-18  Matthew Mundell <matthew.mundell@greenbone.net>

	Hack ISO-8859-1 to UTF-8 conversion on OTP input.  Covers most cases.

	* src/otp.c (process_otp_scanner_input): In the <|> loop convert field
	to UTF-8 before processing.  As a consequence jump instead of returning
	to ease freeing the converted string, and use "match" instead of "field"
	to read past the end of the field.

	* src/omp.c (send_to_client, send_certificate, DEF, send_nvt): Remove
	previous UTF-8 hacks.

	* src/manage.c: Add query about sending ISO-8859-1 to server.

2010-01-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_manage): Setup dummy user around find_task.

2010-01-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (config_nvt_selector): Make static.
	(task_config): New function.

	* src/manage.h: Update header accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_TASK use
	config_id_nvt_selector instead of config_nvt_selector.

2010-01-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (update_config_caches, init_config_iterator): Change
	config type to config_t.  Update callers.

	* src/manage.h: Update header accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_CONFIGS if the
	request includes a config then find config and pass the config_t to
	init_config_iterator instead of the config name.

2010-01-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h: (CONFIG_ID_FULL_AND_FAST)
	(CONFIG_ID_FULL_AND_FAST_ULTIMATE, CONFIG_ID_FULL_AND_VERY_DEEP)
	(CONFIG_ID_FULL_AND_VERY_DEEP_ULTIMATE): New defines.
	(init_manage): Use defines for config IDs.
	(config_in_use, init_config_task_iterator, init_nvt_selector_iterator)
	(config_family_count, config_nvt_count): Change config arg from name to
	config_t.

	* src/manage.h: Update headers accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_CONFIGS within
	the config iteration pass config_t to config functions instead of the
	config name.

2010-01-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_config_iterator): Add ROWID to selection.  Adjust
	column numbers in callers.
	(config_iterator_config): New function.
	(nvt_preference_iterator_config_value): Change config parameter to a
	config_t.

	* src/manage.h: Update headers accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_NVT_DETAILS
	pass config_t to nvt_preference_iterator_config_value.

2010-01-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_manage): Init current user around
	set_task_run_status, so event check will work.
	(task_owner_name): New function.

	* src/manage.h: Update header accordingly.

2010-01-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (config_nvt_timeout): Change config from name to
	config_t.

	* src/manage.h: Update header accordingly.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_NVT_DETAILS
	find config if given, and pass config_t to config_nvt_timeout.

2010-01-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/db_postgres.sql (agents, escalators, targets, configs, reports)
	(lsc_credentials): Add owner field.
	(tasks): Move owner up in definition.

2010-01-16  Matthew Mundell <matthew.mundell@greenbone.net>

	Add ownership of targets, configs, lsc_credentials, escalators, reports
	and agents.  Hence increase database version to 9.  Add database
	migration from 8 to 9.  Check ownership before performing any OMP
	command that accesses or modifies these resources.  Limit resource
	listing operations to the resources owned by the current user.  Allow
	any user to access the predefined resources as well as any resources
	defined prior to migration to version 9.

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): Increase to 9.

	* src/tasks_sql.h: Improve doc on writing a migrator.
	(create_tables): Add owner column to targets, configs, lsc_credentials,
	escalators, reports and agents.  Make owner in tasks an integer, and move
	it forward in the definition.
	(config_t): Remove.  Move to manage.h.
	(find_config): Move declaration to manage.h.  Change task_t param to
	config_t.  Quote name.
	(update_config_caches): Add arg to declaration.
	(update_all_config_caches, user_owns, user_owns_uuid)
	(update_config_cache): New static functions.
	(set_target_hosts): Make static in declaration.
	(next): Correct param description in doc.
	(migrate_5_to_6, manage_complete_nvt_cache_update): Use the "all users"
	config cacher, update_all_config_caches.
	(migrate_8_to_9, config_id_nvt_selector): New functions.
	(database_migrators): Add migrate_8_to_9.
	(create_escalator, make_report, create_target, create_config)
	(create_config_rc, copy_config, create_lsc_credential, create_agent): Set
	owner.
	(delete_escalator, find_escalator, find_task, find_report, delete_target)
	(target_hosts, target_lsc_credential_name, config_nvt_timeout)
	(delete_config, config_nvt_selector, delete_lsc_credential)
	(delete_agent): Check ownership.
	(init_escalator_iterator, init_escalator_task_iterator)
	(init_task_iterator, task_count, init_target_iterator)
	(init_target_task_iterator, init_config_iterator)
	(init_lsc_credential_iterator, init_agent_iterator): Restrict to resources
	owned by current user.
	(inc_task_int, dec_task_int): Remove.
	(append_to_task_string): Make static.
	(init_manage): Init owner columns in predefined resources.  Improve
	find_task call for example task.
	(task_config): Remove.  Rename to task_config.  Update callers.
	(init_report_iterator): Remove alternate behaviour for NULL task.
	(init_result_iterator, init_host_iterator): Remove alternate behaviour for
	NULL report.
	(make_task): Match the users SQL to other such statements.
	(manage_set_config_preference, init_nvt_iterator, config_nvts_growing)
	(config_families_growing, manage_set_config_families): Change the config
	parameter from the config name to a config_t.  Update callers.
	(manage_set_config_nvts, switch_representation)
	(select_config_nvts): Change the config parameter from the config name to
	a config_t.  Use the selector name to refer to the selector instead of the
	config name; both strings should be the same anyway.  Update callers.
	(update_config_caches): Call update_config_cache.
	(nvt_preference_iterator_config_value): Add doc.

	* src/manage.c (nvt_selector_plugins): Change the config parameter from
	the config name to a config_t.  This is required because init_nvt_iterator
	now takes a config_t.
	(start_task): Pass config_t to nvt_selector_plugins.
	(COMMAND): Add doc.

	* src/manage.h: Update headers accordingly.
	(config_t): New type.  Moved from tasks_sql.h.

	* src/omp.c (STATUS_ERROR_ACCESS, STATUS_ERROR_ACCESS_TEXT)
	(STATUS_ERROR_BUSY, STATUS_ERROR_BUSY_TEXT): New defines.  The BUSY ones
	are just to match the Administrator.
	(command_data_init, command_data, create_config_data, get_report_data)
	(get_system_reports_data, import_config_data): Add docs.
	(XML_ERROR_ACCESS): New macro.
	(omp_xml_handle_end_element): In CLIENT_GET_NVT_DETAILS and
	CLIENT_MODIFY_CONFIG find the named config first, so that the permission
	checks are performed.  In CLIENT_DELETE_AGENT, CLIENT_DELETE_CONFIG,
	CLIENT_DELETE_ESCALATOR, CLIENT_DELETE_LSC_CREDENTIAL and
	CLIENT_DELETE_TARGET handle new permission returns.

2010-01-15  Matthew Mundell <matthew.mundell@greenbone.net>

	Prevent deleting of active reports.

	* src/tasks_sql.h (delete_report): Just return 2 if report is active.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_DELETE_REPORT handle
	delete_report active report return.

2010-01-12  Michael Wiegand <michael.wiegand@greenbone.net>

	Post-release version bump.

	* CMakeLists.txt: Updated version number.

2010-01-12  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 1.0.0-beta1 release.

	* CMakeLists.txt: Updated version number.

	* CHANGES: Updated.

2010-01-11  Matthew Mundell <matthew.mundell@greenbone.net>

	Add a search_phrase attribute to OMP GET_REPORT and switch GET_REPORT to
	the new callback data mechanism.

	* src/tasks_sql.h (where_levels): Make static.  Add NULL check.
	(where_search_phrase): New function.
	(init_result_iterator, report_scan_result_count): Add param search_phrase.

	* src/manage.h: Update headers accordingly.

	* src/omp.c (create_config_data_reset, get_system_reports_data_reset)
	(command_data_init): Make static.
	(name_command_data_reset): Define out for now.
	(get_report_data_t): New type.
	(get_report_data_reset): New function.
	(get_report_data): New variable.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(print_report_latex, print_report_xml): Switch GET_REPORT to pass data
	between callbacks via get_report_data.  Add GET_REPORT attribute
	"search_phrase".

2010-01-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_otp_pref_iterator): Correct string in assertion.

2010-01-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_manage): Add NVT names to cache.
	(result_iterator_nvt): Remove, rename with _oid.
	(result_iterator_nvt_oid, result_iterator_nvt_name): New functions.

	* src/manage.h: Update headers accordingly.

	* src/omp.c: Update result_iterator_nvt callers.
	(print_report_xml): Add name to NVT element.
	(omp_xml_handle_end_element): In CLIENT_GET_REPORT XML report, add name
	to NVT element.

2010-01-11  Matthew Mundell <matthew.mundell@greenbone.net>

	Send all preferences when starting a task, even those which have the
	same value on the server, to match the client behaviour.

	* src/tasks_sql.h (init_otp_pref_iterator, otp_pref_iterator_name)
	(otp_pref_iterator_value): New functions.

	* src/manage.c (send_config_preferences): Iterate with otp_pref_iterator
	functions.

2010-01-08  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (manage_system_report): If the graph is empty, try get
	the "blank" graph.

	* INSTALL: Add note about openvasmr blank type.

	* README: Add space.

2010-01-07  Matthew Mundell <matthew.mundell@greenbone.net>

	Add OMP command GET_SYSTEM_REPORTS.

	* src/manage.c (make_array, free_array): New functions.  From omp.c.
	(get_system_report_types, init_system_report_type_iterator)
	(cleanup_report_type_iterator, next_report_type)
	(report_type_iterator_name, report_type_iterator_title)
	(manage_system_report): New functions.

	* src/manage.h: Add headers accordingly.
	(report_type_iterator_t): New type.

	* src/omp.c (make_array, free_array): Remove.  Move to manage.c.
	(help_text): Add GET_SYSTEM_REPORTS.
	(name_command_data_t, get_system_report_data_t): New types.
	(name_command_data_reset, get_system_report_data_reset): New functions.
	(command_data_t): Add get_system_report and name_command.
	(get_system_reports_data): New variable.
	(client_state_t): Add CLIENT_GET_SYSTEM_REPORTS.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Add
	GET_SYSTEM_REPORTS handling.  In CLIENT_GET_TARGETS free current_name.

	* INSTALL: Add run time requirements.

	* src/tests/omp_help_0.c (help_text): Add GET_SYSTEM_REPORTS.

2010-01-06  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (insert_nvt_selectors): Set the family column when
	inserting the NVTs.  Improve checking of types of given selectors.

2010-01-06  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (create_config): Add name return arg.  Find a unique
	name if a config with the same name exists already.

	* src/manage.h: Update header accordingly.

	* src/omp.c (omp_xml_handle_end_element): Include config name in
	CREATE_CONFIG import response.

2010-01-06  Matthew Mundell <matthew.mundell@greenbone.net>

	* README: Note OPENVAS_TEST_HOST and OPENVAS_TEST_PORT.

2010-01-06  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* CMakeLists.txt: Added clumsy for check for libopenvas version from
	gsad.

2010-01-05  Matthew Mundell <matthew.mundell@greenbone.net>

	Convert the GET_CONFIGS "nvt_selector" attribute to an "export"
	attribute.  Add importing of entire configs to CREATE_CONFIG.
	Use a cleaner style of passing data between the parser callbacks for
	the import implementation, as a start towards using a cleaner data
	passing mechanism throughout.

	* src/tasks_sql.h (insert_nvt_selectors, config_insert_preferences)
	(create_config_rc): New functions.
	(create_config): Move body to create_config_rc.  Reimplement to expect
	full config.
	(update_config_caches): Add config arg.  Update caller.

	* src/manage.h: Adjust headers accordingly.
	(array_t, preference_t, nvt_selector_t): New types.

	* src/omp.c (array_add): Convert string arg type to gpointer.
	(free_array): Add NULL check.
	(array_reset, preference_new, nvt_selector_new)
	(create_config_data_reset, command_data_init): New functions.
	(import_config_data_t, create_config_data_t, command_data_t): New type.
	(command_data, create_config_data, import_config_data): New variables.
	(client_state_t): Add GET_CONFIGS import states.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Convert
	GET_CONFIGS "nvt_selectors" to "export", which responds with data suitable
	for import.  Add CREATE_CONFIG import handling.
	(omp_xml_handle_text): Add CREATE_CONFIG import handling.
	(init_omp): Initialise command_data.

2010-01-05  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/omp.c (print_report_latex): Fixed size issues in service/port per
	host overview table by shortening text that is displayed when page
	breaks within the table occur.

2010-01-04  Matthew Mundell <matthew.mundell@greenbone.net>

	Add an option to OMP command GET_CONFIGS for getting the NVT selectors of
	the configs.

	* src/tasks_sql.h (NVT_SELECTOR_TYPE_ALL, NVT_SELECTOR_TYPE_FAMILY)
	(NVT_SELECTOR_TYPE_NVT, NVT_SELECTOR_TYPE_ANY): Move to tasks_sql.h.
	(init_nvt_selector_iterator): Export.  Add config argument.
	(nvt_selector_iterator_include, nvt_selector_iterator_nvt)
	(nvt_selector_iterator_name): Export.
	(nvt_selector_iterator_type): New function.

	* src/manage.h: Update headers accordingly.

	* src/omp.c (current_int_4): New variable.
	(omp_xml_handle_start_element): Store GET_CONFIGS nvt_selectors attribute.
	(omp_xml_handle_end_element): In CLIENT_GET_CONFIGS respond with NVT
	selectors according to nvt_selectors attribute.

2010-01-04  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	In PDF report, enabled page-breaks in service/port per host overview
	table. Initial commit, size issues still exists (e.g. table header
	bigger than table).

	* src/omp.c (print_report_latex): Use longtable environment instead of
	tabularx environment when printing the service per host overview
	table.

2010-01-04  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	In PDF report, enabled page-breaks in result overview table.

	* src/omp.c (print_report_latex): Use longtable environment instead of
	tabularx environment when printing the result overview table.

2010-01-04  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Fixed bug that could result in endless loops in pdf report generation.

	* src/omp.c (next_break): Corrected position of remembered last space
	character in input string.
	(latex_print_verbatim_text): Removed ampersand condition, as we are in
	verbatim environment.
	(print_report_latex): Removed done todo, minor style edit.

2009-12-31  Matthew Mundell <matthew.mundell@greenbone.net>

	Add OMP command TEST_ESCALATOR.

	* src/manage.h (escalate): New header.
	(MANAGE_EXAMPLE_TASK_UUID): New definition.

	* src/tasks_sql.h (escalator_condition, escalator_method, escalate): New
	functions.
	(email): Add from_address arg.  Rename address to to_address.
	(escalate_1): New function, renamed from escalate.  Pass from address from
	method data to email.
	(event): Call escalate_1 instead of escalate.
	(init_manage): Use MANAGE_EXAMPLE_TASK_UUID to create example task.

	* src/omp.c (help_text): Add TEST_ESCALATOR.
	(client_state_t): Add TEST_ESCALATOR states.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Handle TEST_ESCALATOR.

	* src/tests/omp_help_0.c (help_text): Add TEST_ESCALATOR.

2009-12-30  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h: Replace SQL END with ROLLBACK.

2009-12-30  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_help_0.c (help_text): Match to current value.

	* src/tests/omp_get_configs_0.c, src/tests/omp_get_configs_1.c,
	src/tests/omp_get_configs_3.c, src/tests/omp_get_configs_2.c: Clear
	expected NVT growing state for "Full and fast".

	* src/tests/omp_get_status_5.c: Add config, escalator and target
	entities to expected response.

	* src/tests/omp_create_lsc_credential_1.c,
	src/tests/omp_delete_lsc_credential_0.c,
	src/tests/omp_create_lsc_credential_0.c,
	src/tests/omp_get_lsc_credentials_0.c: Add LOGIN to CREATE_LSC_CREDENTIAL.

	* src/tests/omp_start_task_4.c: Swap success and failure.

	* src/tests/omp_get_lsc_credentials_1.c,
	src/tests/omp_get_lsc_credentials_2.c: New files.

	* src/tests/CMakeLists.txt: Add omp_get_lsc_credentials_1 and
	omp_get_lsc_credentials_2.

2009-12-30  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (where_levels): Neaten doc formatting.

	* src/ompd.c (serve_omp): Just read and log a character on select
	exception, instead of failing.  Recalculate nfds after recreating
	the scanner session.

	* src/omp.c (omp_xml_handle_end_element): Correct entity name in error
	message.  In the task start mechanism prevent the child from forking
	instead of the parent.
	(process_omp_client_input): Flag start_task children specially.

	* src/manage.c (start_task): Clear current report in the child on failure
	and in the parent always.

2009-12-30  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Applied patch from Vladimir Nadvornik to build static libraries only,
	as shared libs are neither installed nor used.

	* src/CMakeLists.txt: Declared libraries as static.

2009-12-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_escalator_task_iterator)
	(init_target_task_iterator, init_config_task_iterator): Leave out hidden
	tasks.
	(init_manage): Use %u to insert task status.  Correct example task config.
	Init status of example report.

2009-12-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (make_report): Add status arg.  Use as initial status
	of report.
	(create_report): Add status arg.  Pass to make_report.

	* src/manage.c (start_task): Create report with requested status, as the
	fork additions have moved the report task association to the end of the
	function.

2009-12-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_escalator_iterator): Add name arg.  Update caller.
	(init_escalator_task_iterator, escalator_task_iterator_name)
	(escalator_task_iterator_uuid): New functions.

	* src/manage.h: Update headers accordingly.

	* src/omp.c (omp_xml_handle_start_element): Get name attrib for
	GET_ESCALATORS.
	(omp_xml_handle_end_element): In CLIENT_GET_ESCALATORS return task list
	if name attribute is present.

2009-12-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (manage_set_config_preference)
	(manage_set_config_nvts, manage_set_config_families): Return 1 if the
	config is in use.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_MODIFY_CONFIG respond
	with error if config is in use.

2009-12-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ovas-mngr-comm.c (sendn_to_server, write_string_to_server)
	(write_to_server_buffer): Add actual data to tracing.

2009-12-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (lsc_credential_iterator_in_use): Correct column.
	(init_lsc_credential_target_iterator)
	(lsc_credential_target_iterator_name): New functions.

	* src/manage.h: Add headers accordingly.

	* src/omp.c (omp_xml_handle_end_element): Rename variable targets to
	credentials.  Send targets using the credential with each credential in
	list version.

2009-12-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (collate_ip_compare, collate_ip): New functions.
	(init_manage_process): Add SQL collation function collate_ip.
	(init_host_iterator): Order by hosts with IP collation.

2009-12-27  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (collate_threat): New function.
	(condition_met): Call collate_threat to compare threats.

2009-12-27  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_target_iterator): Add name arg.
	(init_target_task_iterator, target_task_iterator_name)
	(target_task_iterator_uuid): New functions.

	* src/manage.h: Update headers accordingly.

	* src/omp.c (omp_xml_handle_start_element): Get name attrib for
	GET_TARGETS.
	(omp_xml_handle_end_element): In CLIENT_GET_TARGETS return task list
	if name attribute present.

2009-12-25  Matthew Mundell <matthew.mundell@greenbone.net>

	* CMakeLists.txt (OPENVASMD_DATABASE_VERSION): New variable.

	* doc/CMakeLists.txt: Add database version to db PNG and HTML.

	* src/CMakeLists.txt: Pass OPENVASMD_DATABASE_VERSION to compiler.

	* src/tasks_sql.h: Replace DATABASE_VERSION with
	OPENVASMD_DATABASE_VERSION.

2009-12-25  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/db_postgres.sql (nvt_selectors): Add id field.
	(targets): Add id field.
	(tasks): Describe description.  Refer to config and target by id.

2009-12-25  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/db_postgres.sql (agents, escalator_condition_data)
	(escalator_event_data, escalator_method_data, escalators)
	(task_files, task_escalators, nvt_preferences): New tables.
	(meta): Add field id.  Add type to name.
	(nvt_selectors): Add field family.
	(targets): Add fields comment and lsc_credential.
	(config): Add comment and cache fields.
	(tasks): Add fields hidden, description, run_status, start_time, end_time,
	Move field comment up.
	(reports): Add fields hidden and scan_run_status.
	(report_hosts): Add fields attack_state, current_port and max_port.
	(lsc_credentials): Add fields login, password, public_key and private_key.
	Rename dog to exe.

2009-12-25  Matthew Mundell <matthew.mundell@greenbone.net>

	Add new condition "Threat level at least".

	* src/manage.c (escalator_data): Declare.
	(escalator_condition_name, escalator_condition_from_name): Add new
	condition.
	(escalator_condition_description): New function.

	* src/manage.h (escalator_condition_t): Add new condition.
	(escalator_condition_description): New header.

	* src/tasks_sql.h (escalate): Use condition description instead of name
	in email body.
	(condition_met): Add escalator arg.  Add check for new condition.  Update
	caller.
	(task_last_report_id, task_second_last_report_id): Correct doc.
	(task_threat_level): New function.

2009-12-25  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (email): Add simple implementation.
	(escalate): Add newline to body.

2009-12-25  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (event_description): New function.

	* src/manage.h: Add header.

	* src/tasks_sql.h (escalate): Flesh out email.

2009-12-24  Matthew Mundell <matthew.mundell@greenbone.net>

	Add escalator support, including OMP commands CREATE_ESCALATOR,
	DELETE_ESCALATOR and GET_ESCALATORS, and CREATE_TASK element ESCALATOR.

	* src/manage.c (escalator_condition_name, event_name)
	(escalator_method_name, escalator_condition_from_name, event_from_name)
	(escalator_method_from_name): New function.

	* src/tasks_sql.h (create_tables): Add tables escalator_condition_data,
	escalator_event_data, escalator_method_data, escalators and
	task_escalators.
	(create_escalator, delete_escalator, find_escalator)
	(init_escalator_iterator, escalator_iterator_escalator)
	(escalator_iterator_name, escalator_iterator_comment)
	(escalator_iterator_event, escalator_iterator_condition)
	(escalator_iterator_method, escalator_iterator_in_use)
	(init_escalator_data_iterator, escalator_data_iterator_name)
	(escalator_data_iterator_data, escalator_data, email, escalate)
	(event_applies, condition_met, event): New functions.
	(set_task_run_status, task_escalator, add_task_escalator): Add event.
	(delete_task): Delete escalator.

	* src/manage.h: Add headers accordingly.
	(escalator_t, event_t, escalator_method_t, escalator_condition_t): New
	types.

	* src/omp.c (help_text): Add escalator commands.
	(client_state_t): Add escalator states.
	(omp_xml_handle_start_element, omp_xml_handle_start_element)
	(omp_xml_handle_text): Handle new commands for escalators.

2009-12-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (create_tables): Sort better.

2009-12-24  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch the global OMP array variables to GPtrArrays.

	* src/tasks_sql.h (member): Switch array to GPtrArray.
	(manage_set_config_nvts): Switch selected_nvts to GPtrArray.
	(manage_set_config_families): Switch families args to GPtrArray.

	* src/manage.h: Update headers accordingly.

	* src/omp.c (make_array, array_add, array_terminate): New functions.
	(free_array): Switch arg to GPtrArray.
	(current_array_1, current_array_2, current_array_3): Switch type to
	GPtrArray.
	(omp_xml_handle_start_element): Create arrays with make_array.
	(omp_xml_handle_end_element): Terminate arrays before use.  Free
	arrays with free_array.  Append to arrays with array_add.

2009-12-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (help_text): Sort.  Correct article.

	* src/tasks_sql.h (set_task_run_status): Neaten doc.

	* src/manage.h [!TASKS_SQL] (lsc_credential_t): New type.

2009-12-21  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_help_0.c (help_text): Add agent commands.

2009-12-21  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/openvasmd.html, doc/openvasmd.8: New files.

	* doc/CMakeLists.txt: Remove groff comments.  Prevent "clean" from
	removing extra documentation.
	(man, man-html): New targets.

2009-12-21  Michael Wiegand <michael.wiegand@greenbone.net>

	Post-release version bump.

	* CMakeLists.txt: Updated version number.

2009-12-21  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 0.9.8 release.

	* CHANGES: Updated.

2009-12-21  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_AGENT require
	an installer.

2009-12-21  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* CMakeLists.txt: Don't ignore necessary files when creating the source
	tarball.

2009-12-17  Matthew Mundell <matthew.mundell@greenbone.net>

	Complete support for creating agent with associated files.

	* src/tasks_sql.h (create_agent): Add installer and howto args.  Expect
	the installer and howtos to be base64 encoded already.
	(init_agent_iterator): Remove comma from SQL.

	* src/manage.h: Update header.

	* src/omp.c (omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Add installer and howto entities to CREATE_AGENT.

2009-12-18  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	Add agent support.

	* src/tasks_sql.h (agent_t): New type.
	(create_tables): Added "agents" table.
	(create_agent, delete_agent, init_agent_iterator, agent_iterator_name)
	(agent_iterator_comment, agent_iterator_installer)
	(agent_iterator_howto_install, agent_iterator_howto_use, agent_name): New
	functions.

	* src/manage.h: Added protos accordingly.

	* src/omp.c (help_text, client_state_t): Extended with agent
	commands/states.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Added handling for agent commands.

2009-12-18  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Changed installation destination for openvasmd_report_html.xsl as
	proposed by Stephan Kleine.

	* src/CMakeLists.txt: Install openvasmd_report_html.xsl to datadir
	instead of sysconfdir.

	* src/omp.c (omp_xml_handle_end_element): Adjusted to changed location
	of openvasmd_report_html.xsl

2009-12-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_config_task_iterator, config_task_iterator_name)
	(config_task_iterator_uuid): New functions.

	* src/manage.h: Add headers.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_STATUS send
	config and target with task.  In CLIENT_GET_CONFIGS send list of tasks
	that use the config.

2009-12-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_STATUS send sort
	information back with task list.

2009-12-17  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Revived VERSION file, as its present in other modules, too.

	* VERSION.in: Template for the VERSION file.

	* CMakeLists.txt: Do not add the template files to package, configure
	the VERSION file.

2009-12-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/otp.c (process_otp_scanner_input): In SCANNER_SERVER correct
	scanner state for "DEBUG".

2009-12-16  Matthew Mundell <matthew.mundell@greenbone.net>

	Add message counts to GET_REPORT XML response.

	* src/tasks_sql.h (REPORT_COUNT): Take report arg instead of using
	report UUID variable.
	(report_counts_id): New function.
	(report_counts): Call through to report_counts_id.

	* src/manage.h: Add header.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_REPORT add message
	counts to XML format response.

2009-12-16  Matthew Mundell <matthew.mundell@greenbone.net>

	Add filtered count to OMP GET_REPORT XML report.

	* src/tasks_sql.h (where_levels): New function.
	(init_result_iterator): Move levels WHERE calc to where_levels.
	(report_scan_result_count): Add a levels arg.

	* src/manage.h: Update header.

	* src/omp.c (omp_xml_handle_end_element): In the XML case of
	CLIENT_GET_REPORT add a filtered count to SCAN_RESULT_COUNT.

2009-12-16  Matthew Mundell <matthew.mundell@greenbone.net>

	Add database migration from version 7 to 8.

	* src/tasks_sql.h (migrate_7_to_8): New function.
	(database_migrators): Add migrate_7_to_8.

2009-12-16  Matthew Mundell <matthew.mundell@greenbone.net>

	Separate credential name and login name for LSC credentials.

	* src/tasks_sql.h (DATABASE_VERSION): Increase to 8, for changes to table
	lsc_credentials.
	(create_tables): Add login column to lsc_credentials.
	(create_lsc_credential): Add login param.
	(init_lsc_credential_iterator): Include login.
	(lsc_credential_iterator_login): New function.  Adjust positions of other
	accessors accordingly.

	* src/manage.h: Add headers.

	* src/manage.c (start_task): Send login to scanner instead of name.

	* src/omp.c (client_state_t): Add CLIENT_CREATE_LSC_CREDENTIAL_LOGIN.
	(omp_xml_handle_start_element, omp_xml_handle_start_element)
	(omp_xml_handle_text): Add login to LSC credential handling.

2009-12-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* CMakeLists.txt: Add fullstop to Description.

2009-12-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_NVT_DETAILS all
	case cleanup iterator afterwards.

2009-12-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h: Put nvt_selectors before nvts when joining these tables
	in SQL, as suggested by Michael Wiegand.
	(create_tables): Add indexes on nvt_selectors and nvts.  ANALYZE after
	creating table.

2009-12-15  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Made the openvasmd and doxygen- generated documentation aware of the
	svn revision in the same way as the package does already.
	That means, in analogy to the source_package target, only if configured
	with -DPREPARE_RELEASE=1 no revision number will occur in the version
	string.
	Note that this works at configure time, thus you have to execute
	`cmake [OPTIONS] .` to update revision/version numbers in the
	documentation and as answer to `openvasmd --version`.

	* VERSION: Removed, mechanism replaced by cmake-based one.

	* CMakeLists.txt: Do not read in content of VERSION, use
	CPACK_PACKAGE_VERSION instead. Configure the two Doxyfiles.
	Added TODO about missing checks (pkg-config, sqlite3).

	* doc/Doxyfile, doc/Doxyfile_full: Removed. Are generated in configure
	step.

	* doc/Doxyfile.in, doc/Doxyfile_full.in: New. Used to generate
	doc/Doxyfile and doc/Doxyfile_full during configure step with
	automatically updated project version number.

2009-12-01  Michael Wiegand <michael.wiegand@greenbone.net>

	Post-release version bump.

	* VERSION: Set to 0.9.8.SVN.

	* CMakeLists.txt: CPACK_PACKAGE_VERSION_PATCH updated.

	* doc/Doxyfile, doc/Doxyfile_full: Updated PROJECT_NUMBER.

2009-12-01  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 0.9.7 release.

	* VERSION: Set to 0.9.7.

	* doc/Doxyfile, doc/Doxyfile_full: Updated PROJECT_NUMBER.

	* CHANGES: Updated.

2009-12-07  Tim Brown <timb@openvas.org>

	* src/omp.c: Fixed up some free()s.

2009-12-02  Michael Wiegand <michael.wiegand@greenbone.net>

	Fixed a bug which caused NVT selections in non-growing families to be
	wrongly calculated.

	* src/tasks_sql.h (manage_set_config_nvts): Defer determining the old
	NVT count until we know whether the family is growing or not, hand the
	correct growing flag to nvt_selector_nvt_count ().

2009-12-01  Michael Wiegand <michael.wiegand@greenbone.net>

	Post-release version bump.

	* VERSION: Set to 0.9.7.SVN.

	* CMakeLists.txt: CPACK_PACKAGE_VERSION_PATCH updated.

	* doc/Doxyfile, doc/Doxyfile_full: Updated PROJECT_NUMBER.

2009-12-01  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 0.9.6 release.

	* VERSION: Set to 0.9.6.

	* doc/Doxyfile, doc/Doxyfile_full: Updated PROJECT_NUMBER.

	* CHANGES: Updated.

2009-12-01  Michael Wiegand <michael.wiegand@greenbone.net>

	Set up an empty scan config as template for new configs.

	* src/tasks_sql.h (init_manage): Make sure the scan config 'empty'
	exists, create it if it does not.
	(delete_config): Refuse to delete 'empty'.
	(config_in_use): Set 'empty' as in use.

2009-11-30  Michael Wiegand <michael.wiegand@greenbone.net>

	Post-release version bump.

	* VERSION: Set to 0.9.6.SVN.

	* CMakeLists.txt: CPACK_PACKAGE_VERSION_PATCH updated.

	* doc/Doxyfile, doc/Doxyfile_full: Updated PROJECT_NUMBER.

2009-11-30  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 0.9.5 release.

	* VERSION: Set to 0.9.5.

	* CMakeLists.txt: CPACK_PACKAGE_VERSION_PATCH updated.

	* doc/Doxyfile, doc/Doxyfile_full: Updated PROJECT_NUMBER.

	* CHANGES: Updated.

2009-11-28  Matthew Mundell <matthew.mundell@greenbone.net>

	As a quick way around the very long OMP START_TASK response time, fork
	the manager when starting a task, respond in the parent, and let the
	child slowly start the task.

	* src/manage.c (start_task): Set the task status early, so that other
	processes know that the task is being started.  Check and set the task
	status in an atomic block.  Fork a child to do the bulk of the work, so
	that the current process can return to respond to the client.

	* src/omp.c (current_error, forked): New variables.
	(omp_xml_handle_end_element): Use forked to prevent the client-serving
	process from forking more than once.  Use globals to return fork status
	to process_omp_client_input.
	(init_omp_process): Init forked.
	(process_omp_client_input): Use globals to return fork status to caller.

	* src/ompd.c (recreate_session): If server_socket is zero skip freeing
	the session.
	(serve_omp): When process_omp_client_input has forked create a new scanner
	session in the parent so the child can use the old one, and end the client
	interaction in the child.  Prevent closing and freeing the respective old
	sessions as this would affect the other branch of the fork because the
	actual session is forked.

2009-11-27  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (latex_print_verbatim_text): Print equal signs is separate
	verb environments that use dash to begin and end the environment.

2009-11-27  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_help_0.c (help_text): Add new commands.

2009-11-27  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* CMakeLists.txt: Switched method of svn revision extraction to
	"offline" check.

2009-11-27  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* CMakeLists.txt: Made wording more consistent.

2009-11-27  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/tasks_sql.h: Minor doc improvement.

2009-11-27  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* CMakeLists.txt: At configure time, add svn revision to version
	number if PREPARE_RELEASE flag is not set.

2009-11-26  Matthew Mundell <matthew.mundell@greenbone.net>

	Try to stabilise the verbatim LaTeX printing.

	* src/omp.c (next_break): Remove extra nchars-- from "\r" case.  Return
	one more than the newline when a newline ends the line so that the caller
	finds the newline before wrapping.  Try improve the doc comment.  Document
	the code.  Init last_space to -1, as 0 is a valid value for last_space.
	Move the line_width check into the while loop so that it need only be done
	once.  Do the counter increments inside each case instead of decrementing
	just to be incremented.  Make the prefix operators postfix to match the
	rest of the module and general convention.  Use an else for the '\\' case
	instead of breaking in the other branches, to make the behaviour more
	explicit for the reader.
	(latex_print_verbatim_text): Increment pos before calling next_break on
	finding a newline, otherwise next_break will just find the same newline.
	Improve the doc comment.  Document the code.  Do the counter increments
	inside each case instead of decrementing just to be incremented.  Make
	the prefix operators postfix to match the rest of the module and general
	convention.  Use an else for the '\\' case instead of breaking in the
	other branches, to make the behaviour more explicit for the reader.

2009-11-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* CMakeLists.txt: Make formatting more consistent.  Add missing .SVN to
	version.  Streamline TODO.  Match the dependency checks to the other
	check in the module.  Turn build verbosity back on.

2009-11-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ompd.c: Include string.h, which was previously included via
	ossp/uuid.h via manage.h via otp.h.

2009-11-26  Matthew Mundell <matthew.mundell@greenbone.net>

	When updating the cache, remove preferences before inserting them.

	* src/tasks_sql.h (nvt_selector_family_count): Correct return doc.
	(manage_nvt_preference_add): Add option to remove preference before
	inserting it.

	* src/otp.c (parse_scanner_preference_value): Send remove flag to
	manage_nvt_preference_add according to cache mode.

	* src/manage.h: Update header.

2009-11-26  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* CMakeLists.txt: Corrected version string change that was left over
	from debugging.

2009-11-26  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Fixing certain wrong installation locations that could be set through
	cmake. This partly fixes bug #1206 (http://bugs.openvas.org/1206).

	* CMakeLists.txt: Respect SYSCONF_INSTALL_DIR if set.

2009-11-26  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/manage.c (make_report_uuid): Minor reformatting, and replace
	incorrect call to isnull with call to uuid_is_null.

2009-11-26  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Changed checks for used libraries, with help of Matthew Mundell.

	* CMakeLists.txt: Removed explicit PATH specification in find_library
	calls, removed respective todo. Replaced check for libopenvas by check
	for libopenvas_base.

2009-11-26  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Changed used library for UUID generation from ossp-uuid to libuuid from
	e2fsprogs.

	* src/manage.h: Removed include.
	src/manage.c, src/splint.h: Changed include.
	src/manage.c (make_report_uuid): Use functionality from libuuid rather
	than from ossp-uuid.
	src/CMakeLists.txt, src/test/CMakeLists.txt: Changed library to link
	against.

2009-11-25  Matthew Mundell <matthew.mundell@greenbone.net>

	Make --update update the cache a single item at a time, locking the
	database only around the modification of each item.  Add a new option,
	--rebuild, which completely rebuilds the cache from scratch, locking
	the database for the entire duration of the rebuild.

	* src/openvasmd.c (main): Add --rebuild option.

	* src/ompd.c (init_ompd): Update param doc.
	(write_to_scanner): Add update states by refering to ompd_nvt_cache_mode.
	(serve_omp): Set ompd_nvt_cache_mode directly from client_socket, which
	determines which update mode to use.  Add update states to select setup.

	* src/omp.c (init_omp_process): Update param doc.

	* src/tasks_sql.h (init_manage_process): Update param doc.  Only remove
	NVT and preference caches when rebuilding the cache.  Move COMMIT to
	manage_complete_nvt_cache_update.
	(make_nvt_from_nvti): Add argument to control removal of NVT before
	inserting.
	(manage_complete_nvt_cache_update): Add mode argument; COMMIT if rebuild.

	* src/manage.h: Update headers.

	* src/otp.h (scanner_init_state_t): Add new states.

	* src/otp.c (parse_scanner_preference_value): Add update state.
	(parse_scanner_plugin_list_tags): Pass NVT removal flag.
	(process_otp_scanner_input): Add update states.  In particular, pass mode
	to manage_complete_nvt_cache_update.

	* README: Update usage message.

2009-11-25  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (start_task): Only do the credential iteration if the
	target has a credential.

2009-11-25  Matthew Mundell <matthew.mundell@greenbone.net>

	Add support for per-NVT timeout preferences.

	* src/omp.c (send_nvt): Add timeout arg.  Update callers.
	(omp_xml_handle_end_element): In CLIENT_GET_NVT_DETAILS and
	CLIENT_GET_NVT_DETAILS send TIMEOUT in PREFERENCES and NVT. In
	CLIENT_MODIFY_CONFIG_PREFERENCE_VALUE initialise the string that will
	hold the value, so that it is always some string when the OMP caller
	sends a VALUE and only NULL if the caller leaves out VALUE entirely.

	* src/tasks_sql.h (config_nvt_timeout): New function.
	(manage_set_config_preference): Enable the preference removal section.
	Remove type decoration in removal section for scanner preferences.

2009-11-25  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Added stubs for dependency checks during configure/build time.
	Fixes bug #1208 (http://bugs.openvas.org/1208) for certain
	environments.

	* CMakeLists.txt: Added stubs for (dependency) checks for glib2,
	gnutls, openvas-libraries, pcap, gpgme and uuid.

2009-11-23  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (manage_set_config_preference): Strip type decorations
	off names of scanner preferences.  If nvt is NULL assume the preference
	is a SERVER_PREF.
	(nvt_preference_iterator_config_value): Select any type of preference, so
	that server preferences are selected too.

2009-11-23  Michael Wiegand <michael.wiegand@greenbone.net>

	Post-release version bump.

	* VERSION: Set to 0.9.5.SVN.

	* CMakeLists.txt: CPACK_PACKAGE_VERSION_PATCH updated.

	* doc/Doxyfile, doc/Doxyfile_full: Updated PROJECT_NUMBER.

2009-11-23  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 0.9.4 release.

	* VERSION: Set to 0.9.4.

	* CMakeLists.txt: CPACK_PACKAGE_VERSION_PATCH updated.

	* doc/Doxyfile, doc/Doxyfile_full: Updated PROJECT_NUMBER.

	* CHANGES: Updated.

2009-11-23  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/omp.c (latex_header): Added fix to allow special characters like
	umlauts in latex/pdf reports.

2009-11-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (nvt_selector_plugins): Implement outstanding cases by
	iterating over NVT's per family.  Hence take config instead of selector.
	(start_task): Pass config to nvt_selector_plugins.

2009-11-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (copy_config): Correct format type in SQL string.

2009-11-20  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/manage.c (latex_print_verbatim_text): Escape ampersands, as we
	are in a tabular environment.

2009-11-20  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/manage.c (start_task): Corrected preference string to send for
	(SMB) local security checks .

2009-11-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (manage_set_config_nvts): Determine whether to include
	or exclude by checking if the family is growing in the selector, instead
	of checking for an "all" or "family include" in the selector.

2009-11-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_REPORT for the
	"html" and "html-pdf" formats, convert in a directory and remove the
	directory after sending the report.

2009-11-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (check_is_dir, file_utils_rmdir_rf): New functions.
	(omp_xml_handle_end_element): In CLIENT_GET_REPORT process the LaTeX in
	a directory and remove the directory after sending the report.

2009-11-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (create_tables_version_4): New function.
	(migrate_4_to_5): Call create_tables_version_4 to create the tables.

2009-11-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (migrate_6_to_7): Add fullstop to comment.

	* src/manage.c (start_task): Remove space from beginning of preference
	name.

2009-11-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (collate_message_type): Heed lengths in comparisons.
	Reverse order: Medium is less than High, etc.

	* src/omp.c (compare_ports_desc, compare_ports_asc): Switch arg order.

2009-11-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (target_lsc_credential_name): Add missing sql_string
	arg.
	(init_lsc_credential_iterator): Doc missing arg.

	* ChangeLog: Format migrator entry like others.

2009-11-19  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/manage.c (start_task): Corrected preference strings for
	"credential" preferences to send.

2009-11-19  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Add database migration from version 6 to 7.

	* src/tasks_sql.h (migrate_6_to_7): Added migrator that adds the new
	column in targets table.
	(database_migrators): Added migrator.
	Declared a section of the documentation as section for doxygen.

2009-11-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_LSC_CREDENTIALS
	add TYPE to LSC_CREDENTIALS.

2009-11-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (create_target, target_lsc_credential_name): Use
	lsc_credential_t for credential.
	(delete_lsc_credential): Enable in use check.

2009-11-19  Matthew Mundell <matthew.mundell@greenbone.net>

	Add IN_USE to OMP GET_LSC_CREDENTIALS response.  Move GET_TARGETS
	credential name into NAME entity.

	* src/tasks_sql.h (init_lsc_credential_iterator): Add "in use" field.
	(lsc_credential_iterator_in_use): New function.

	* src/manage.h: Add header.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_LSC_CREDENTIALS
	send IN_USE with credential.  In CLIENT_GET_TARGETS move credential name
	into NAME entity.

2009-11-19  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/manage.c (send_config_preferences): Renamed parameter and local
	variable to avoid confusion.
	(start_task): Made trace message more explicit.

2009-11-19  Matthew Mundell <matthew.mundell@greenbone.net>

	Add support for creating password-only credentials and for associating
	credentials with targets.

	* src/tasks_sql.h (DATABASE_VERSION): Increase to 7, for changes to table
	targets.
	(init_manage): Add column lsc_credential to table targets.
	(create_target): Take credential parameter.
	(init_target_iterator): Add lsc_credential column.
	(target_iterator_lsc_credential, target_lsc_credential_name)
	(lsc_credential_name): New functions.
	(create_lsc_credential): Add given_password argument.

	* src/manage.h: Update and add headers.
	(lsc_credential_t): New type.

	* src/omp.c (client_state_t): Add new LSC states.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Add PASSWORD to CREATE_LSC_CREDENTIAL.  Add
	LSC_CREDENTIAL to CREATE_TARGET.  Add LSC_CREDENTIAL to GET_TARGETS
	response.

	* src/manage.c (start_task): Send credential preferences if there's a
	credential linked to the target.

2009-11-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_manage): Set requested and running reports to
	stopped.

2009-11-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_nvt_preference_iterator): Order by name ascending.

2009-11-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_NVT_DETAILS and
	CLIENT_GET_CONFIGS send empty PREFERENCE VALUEs when type is password.

2009-11-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h: Format migration procedure like other comments.  Add a
	description of NVT selectors.

2009-11-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (clude): Skip NVT if NVT or NVT family is missing from
	cache.
	(nvt_selector_nvt_count): Remove handling of NULL family in the family
	case.

2009-11-17  Matthew Mundell <matthew.mundell@greenbone.net>

	Improve migrators.

	* src/tasks_sql.h: Add comment with procedure for writing a migrator.
	(migrate_0_to_1, migrate_1_to_2, migrate_3_to_4): Check version inside
	transaction.
	(migrate_2_to_3): Check version inside transaction.  Ensure table
	lsc_credentials exists.  Add missing public_key and private_key columns.
	Make exe column text.
	(migrate_4_to_5): Check version inside transaction.  Ensure tables
	nvt_preferences and task_files exist.
	(migrate_5_to_6_move_other_config): New function.
	(migrate_5_to_6): Check version inside transaction.  Succeed even if the
	predefined configs are missing.  Move any configs having the predefined
	ID's.

2009-11-16  Matthew Mundell <matthew.mundell@greenbone.net>

	Add database migration from version 5 to 6.  Remove predefined config
	"Empty and fast".

	* src/tasks_sql.h (migrate_5_to_6): New function.
	(database_migrators): Add migrate_5_to_6.
	(init_manage): Remove config "Empty and fast".
	(update_config_caches): New function, body from
	manage_complete_nvt_cache_update.
	(manage_complete_nvt_cache_update): Call update_config_caches.

2009-11-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (insert_rc_into_config): Also cache the config counts in
	the growing case.

2009-11-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (switch_representation): Free selector after last use.
	Free quoted_selector.

2009-11-15  Matthew Mundell <matthew.mundell@greenbone.net>

	Implement toggling of whether new families are added.

	* src/tasks_sql.h (copy_config): Free selector.
	(switch_representation): Implement.
	(nvt_selector_family_growing): Neaten formatting.
	(nvt_selector_remove_selector): Add NVT_SELECTOR_TYPE_ALL case.
	(nvt_selector_add): Correct comment.
	(manage_set_config_families): Move BEGIN before representation switch.
	Proceed with modification after switching.  Also set new_nvt_count for
	the generating growing_all case.

2009-11-14  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (set_db_version): Remove out of date assertion.
	(migrate_0_to_1, migrate_1_to_2, migrate_2_to_3, migrate_3_to_4): Enclose
	update in transaction.
	(migrate_5_to_6): Move version number update into transaction.

2009-11-14  Matthew Mundell <matthew.mundell@greenbone.net>

	Update cached config counts after caching the NVT's.

	* src/tasks_sql.h (manage_complete_nvt_cache_update): New function.
	(nvt_selector_family_count): Recalculate the count intead of returning
	the cached value.
	(config_family_count, config_nvt_count): New functions.  Return cached
	values.
	(nvt_selector_family_selected_count): Rename to nvt_selector_count.
	Update callers.
	(nvt_selector_nvt_count): Rename to config_nvt_count.  Now new function
	renamed from nvt_selector_count.  If family is NULL return count for all
	families.
	(nvt_selector_families_growing, nvt_selector_nvts_growing): Make static.
	(nvt_selector_nvts_growing_2): Ensure return is at most 1.
	(init_family_iterator): Note when param is used in doc.
	(select_config_nvts): Improve return doc.
	(manage_set_config_families): Cleanup family iterator before exit.

	* src/manage.h: Update headers.

	* src/omp.c (omp_xml_handle_end_element): Call config_family_count,
	config_nvt_count and nvt_selector_nvt_count instead of
	nvt_selector_family_count, nvt_selector_nvt_count and
	nvt_selector_family_selected_count.

	* src/otp.c (process_otp_scanner_input): In SCANNER_PREFERENCE_NAME cache
	mode exit, call manage_complete_nvt_cache_update.

2009-11-13  Matthew Mundell <matthew.mundell@greenbone.net>

	Add OMP commands GET_NVT_FAMILIES and MODIFY_CONFIG.  Correct and
	complete most of the NVT selector implementation.  Add a COPY_CONFIG
	alternative to OMP's CREATE_CONFIG.  Extend and improve OMP's
	CLIENT_GET_NVT_DETAILS and GET_CONFIGS.

	* src/tasks_sql.h (DATABASE_VERSION): Increase to 6, for predefined
	config ID's and addition of count caching to growing configs.
	(NVT_SELECTOR_TYPE_ANY): New define.
	(member, copy_config, manage_set_config_preference)
	(manage_set_config_nvts, switch_representation, family_count)
	(nvt_selector_nvts_growing_2, nvt_selector_remove)
	(nvt_selector_remove_selector, nvt_selector_add, family_is_selected)
	(nvt_selector_has, manage_set_config_families): New functions.
	(init_manage): Set predefined config ID's to fixed values.  Add new
	config "Empty and fast".
	(init_nvt_iterator): Add iteration of an entire family.  Add missing
	ORDER BY.
	(nvt_cache_present): Remove.  Cache is always present.  Remove from
	callers.
	(family_nvt_count): Add counting of all NVT's in all families.
	(nvt_selector_nvts_growing): Call nvt_selector_nvts_growing_2.
	(nvt_selector_family_count, nvt_selector_nvt_count): Simply read cached
	value.
	(init_family_iterator): Add iteration of all families.  Correct behaviour.
	(nvt_selector_family_growing): Correct "all" case.
	(nvt_selector_family_selected_count): Account for excluded NVT's in
	growing case.
	(select_config_nvts): Add missing cases and correct existing ones.
	(nvt_preference_iterator_real_name): Add example.  Include any trailing
	colon in the name for consistency.

	* src/manage.h: Add headers for new functions.

	* src/omp.c (free_array): New function.
	(help_text): Add GET_NVT_FAMILIES and MODIFY_CONFIG.
	(current_array_1, current_array_2, current_array_3): New variables.
	(client_state_t): Add states for new commands.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Add GET_NVT_FAMILIES and MODIFY_CONFIG handling.
	Add a COPY_CONFIG alternative to CREATE_CONFIG.  Add NVT name and ID and
	radio alternatives to CLIENT_GET_NVT_DETAILS when given an NVT.  In the
	CLIENT_GET_NVT_DETAILS all case, also count preferences when just a family
	is given.  In GET_CONFIGS pass family growth to init_family_iterator and
	nvt_selector_family_growing instead of nvt growth, always call into
	the library to get the family selected count, and send alternative values
	for radios in separate entities.

	* src/manage.c (nvt_selector_plugins): Add temporary notes.

2009-11-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c: Make brief comments single lines.  Move todos out of doc
	comments so the doc is easier to read.  Match some formatting to the rest
	of the module.
	(latex_print_text, latex_escape_text): Remove.  Can be added back if
	needed.

2009-11-13  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/omp.c (send_to_client): Fixed currently not evaluated code,
	declared parameter const.
	(latex_header): Enabled color for log messages in latex/pdf report.

2009-11-10  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (manage_db_version): Check version instead of number.

2009-11-10  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Improved pdf reports. Text of issues like "security warning" is printed
	verbatim. To allow for page breaks in issue tables, put one verbatim
	line into one row of the table. Break lines at 80 characters and do
	word wrapping. Indicate "artificial" line breaks with a special symbol.
	Indicate that tables were broken over pages.

	* src/omp.c (print_report_latex): Use more features of the longtable
	environment in latex/pdf report.
	(next_break): New. Used for the line and word wrapping in
	latex_print_verbatim_text.
	(latex_print_verbatim_text): New. Prints verbatim text, doing line and
	word wrapping.

2009-11-09  Michael Wiegand <michael.wiegand@greenbone.net>

	Post-release version bump.

	* VERSION: Set to 0.9.4.SVN.

	* CMakeLists.txt: CPACK_PACKAGE_VERSION_PATCH updated.

	* doc/Doxyfile, doc/Doxyfile_full: Updated PROJECT_NUMBER.

2009-11-09  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 0.9.3 release.

	* VERSION: Set to 0.9.3.

	* CMakeLists.txt: CPACK_PACKAGE_VERSION_PATCH updated.

	* doc/Doxyfile, doc/Doxyfile_full: Updated PROJECT_NUMBER.

	* CHANGES: Updated.

2009-11-06  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Improved pdf report generation: Use longtable environment for issues
	(like security hole, security warning etc.) to allow for tables across
	multiple pages. For tables to break across pages, text in the tables
	has to be put in multiple rows.
	Some issues persist, added respective todos.

	* src/omp.c (latex_print_text): Replace "\n" by linebreak/
	row-termination "\\" instead of two newlines
	(print_report_latex): Use longtable instead of tabularx environment,
	added todos.

2009-11-06  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/omp.c (latex_print_text): New, extracted from latex_escape_text.
	Writes to file directly (bufferless) in contrast to memory.
	(latex_escape_text): Added todo, function might be obsolete.
	(print_report_latex): Use (new) latex_print_text.

2009-11-05  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_result_iterator): Include all levels if levels is
	NULL.  Add level 'd' for type "Debug Message".  Simplify the SQL if all
	levels are requested.

	* src/omp.c (omp_xml_handle_end_element): Ensure globals used for
	sort_field and levels attributes are cleared after commands.  In
	CLIENT_GET_REPORT correct attribute name in error response, set levels
	to all levels if the attribute is NULL, add a 'd' entry in FILTERS and
	add a NULL check on current_name.

2009-11-05  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (latex_severity_colour): Replace openvas_text with
	openvas_report.
	(latex_header): Remove openvas_text.  Match threat colours to GSA.
	(latex_footer): Correct typo.

2009-11-04  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_result_iterator): Add sorting and filtering args.

	* src/manage.h: Update headers.
	(collate_message_type): New header.

	* src/omp.c (compare_ports_desc, compare_ports_asc): New functions.
	(omp_xml_handle_start_element): Add sorting and filtering attributes to
	GET_REPORT.
	(print_report_xml, print_report_latex): Add sorting args.  Pass through
	sorting and filtering attributes to init_result_iterator.  Remove LaTeX
	report hack which was filtering less important messages.
	(omp_xml_handle_end_element): For the XML report, include the filtering
	and sorting info in the response, add a port summary section.  Pass
	sorting and filtering attributes to init_result_iterator.
	(omp_xml_handle_end_element): In CLIENT_GET_CONFIGS send OID
	with NVT in PREFERENCE.

2009-11-04  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Made the nbe output of manager and openvas-client more similar.

	* src/omp.c (omp_xml_handle_end_element): Do not put pipe symbol at
	the end of "result" lines.

2009-11-04  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (nvt_oid): New function.

	* src/manage.h: Add header.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_CONFIGS send OID
	with NVT in PREFERENCE.

2009-11-04  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_nvt_preference_iterator): Filter out
	client-specific and server_info preferences.

2009-11-03  Matthew Mundell <matthew.mundell@greenbone.net>

	Send preference counts with OMP GET_NVT_DETAILS and preferences with
	OMP GET_CONFIGS.

	* src/tasks_sql.h (nvt_preference_iterator_real_name): Return name anyway
	if sscanf fails to match.
	(nvt_preference_iterator_nvt, nvt_preference_count): New functions.

	* src/manage.h: Update headers.

	* src/omp.c (current_int_3): New variable.
	(omp_xml_handle_start_element): Add "preferences" attribute to
	GET_CONFIGS.
	(send_nvt): Send preference count from new arg pref_count.
	(omp_xml_handle_end_element): In CLIENT_GET_NVT_DETAILS check type exists
	before strcmp and send preference count with each NVT.  In
	CLIENT_GET_CONFIGS send preferences according to "preferences" attribute.

2009-11-02  Matthew Mundell <matthew.mundell@greenbone.net>

	Send NVT preferences with OMP GET_NVT_DETAILS.

	* src/tasks_sql.h (init_config_pref_iterator, config_pref_iterator_name)
	(config_pref_iterator_value, nvt_preference_iterator_real_name)
	(nvt_preference_iterator_type, nvt_preference_iterator_config_value): New
	functions.
	(init_nvt_preference_iterator): Add name arg for getting prefs for given

	* src/manage.h: Update headers.

	* src/omp.c (omp_xml_handle_end_element): Update CLIENT_GET_PREFERENCES
	init_nvt_preference_iterator call.  In CLIENT_GET_NVT_DETAILS send each
	NVT's prefs with the NVT when the config attribute is present.

2009-11-02  Matthew Mundell <matthew.mundell@greenbone.net>

	Add sorting parameters to most OMP data retrieval commands, for very basic
	sorting.

	* src/tasks_sql.h (init_iterator): Make sql a printf style format string.
	(select_config_nvts, init_task_iterator, init_target_iterator)
	(init_config_iterator, init_nvt_iterator, init_family_iterator)
	(select_config_nvts, init_lsc_credential_iterator): Add args that control
	sorting.  Update all callers.

	* src/manage.h: Update headers.

	* src/manage.c: Update calls to init_task_iterator and init_nvt_iterator.

	* src/omp.c: Update iterator calls with sorting args.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Add sort_field
	and sort_order attributes to GET_CONFIGS, GET_LSC_CREDENTIALS,
	GET_NVT_DETAILS, GET_TARGETS and GET_STATUS.

2009-10-31  Matthew Mundell <matthew.mundell@greenbone.net>

	Add config and family attributes to OMP GET_NVT_DETAILS, for getting
	NVT's in one family for a config.

	* src/tasks_sql.h (select_config_nvts): New function.
	(init_nvt_iterator): Add args for requesting from a family in a config
	only.  Update all callers.

	* src/manage.h: Update header.

	* src/manage.c: Update call to init_nvt_iterator.

	* src/omp.c (omp_xml_handle_start_element, omp_xml_handle_end_element):
	Add config and family attributes to GET_NVT_DETAILS, to limit the list of
	NVT's.

2009-10-31  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h: Correct revision number in comment.

2009-10-31  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h: Update migrator comments about appending columns.

2009-10-31  Matthew Mundell <matthew.mundell@greenbone.net>

	Name columns explicitly in SELECT statements instead of using wildcards.
	This makes it safe for a migrator to add a missing column to the end of
	the table when create_table would have created the column somewhere
	before the end.

	* src/tasks_sql.h (init_result_iterator, init_host_iterator)
	(init_task_file_iterator, init_target_iterator, init_config_iterator)
	(init_preference_iterator, init_nvt_iterator, init_nvt_selector_iterator)
	(init_nvt_preference_iterator, init_lsc_credential_iterator): Name columns
	explicitly in SELECTs.
	(config_nvt_selector): Break long string.
	(COL_CONFIG_PREFERENCES__NAME, COL_CONFIG_PREFERENCES__VALUE)
	(COL_CONFIGS__NAME, COL_CONFIGS__NVT_SELECTOR, COL_CONFIGS__COMMENT)
	(COL_CONFIGS__FAMILIES_GROWING, COL_CONFIGS__NVTS_GROWING)
	(COL_LSC_CREDENTIALS__NAME, COL_LSC_CREDENTIALS__PASSWORD)
	(COL_LSC_CREDENTIALS__COMMENT, COL_LSC_CREDENTIALS__PUBLIC_KEY)
	(COL_LSC_CREDENTIALS__PRIVATE_KEY, COL_LSC_CREDENTIALS__RPM)
	(COL_LSC_CREDENTIALS__DEB, COL_LSC_CREDENTIALS__EXE)
	(COL_NVT_PREFERENCES__NAME, COL_NVT_PREFERENCES__VALUE)
	(COL_NVT_SELECTORS__NAME, COL_NVT_SELECTORS__NVT, COL_NVTS__OID)
	(COL_NVTS__VERSION, COL_NVTS__NAME, COL_NVTS__SUMMARY)
	(COL_NVTS__DESCRIPTION, COL_NVTS__COPYRIGHT, COL_NVTS__CVE, COL_NVTS__BID)
	(COL_NVTS__XREF, COL_NVTS__TAG, COL_NVTS__SIGN_KEY_IDS)
	(COL_NVTS__CATEGORY, COL_NVTS__FAMILY, COL_REPORT_HOSTS__HOST)
	(COL_REPORT_HOSTS__START_TIME, COL_REPORT_HOSTS__END_TIME)
	(COL_REPORT_HOSTS__ATTACK_STATE, COL_REPORT_HOSTS__CURRENT_PORT)
	(COL_REPORT_HOSTS__MAX_PORT, COL_TARGETS__NAME, COL_TARGETS__HOSTS)
	(COL_TARGETS__COMMENT, COL_TASK_FILES__NAME, COL_TASK_FILES__CONTENT):
	Remove.  Revert to integers in all iterator access functions.

2009-10-31  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_report_iterator, init_result_iterator)
	(init_host_iterator, init_task_file_iterator, init_target_iterator)
	(init_config_iterator, init_preference_iterator, init_nvt_iterator)
	(init_nvt_selector_iterator, init_family_iterator)
	(init_nvt_preference_iterator, init_lsc_credential_iterator): Use
	init_iterator.
	(init_table_iterator): Remove.

2009-10-31  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/lsc_user.c (file_utils_copy_file): Correct check of
	g_file_get_contents return.
	(lsc_user_rpm_create): Rename oltap_path to generator_path.

2009-10-31  Matthew Mundell <matthew.mundell@greenbone.net>

	Add database migration from version 4 to 5.

	* src/tasks_sql.h: Move database column definitions up in file.
	(create_tables): New function, body from init_manage.
	(sql_insert, init_iterator, iterator_int64, iterator_string)
	(migrate_4_to_5_copy_data): New functions.
	(cleanup_iterator, next): Move up in file.
	(migrate_0_to_1, migrate_1_to_2, migrate_2_to_3, migrate_3_to_4): Make
	static.  Improve comments.
	(migrate_4_to_5): Enable.  Make static.  Complete.
	(database_migrators): Enable 4 to 5 migrator.
	(init_manage): Move table creation to create_tables.

2009-10-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/splint.h (g_strfreev, g_key_file_free, g_string_free)
	(g_option_context_free): New headers, as in Administrator.

	* src/openvasmd.c: Include splint.h.

2009-10-29  Matthew Mundell <matthew.mundell@greenbone.net>

	Cleanup after static analysis.

	* src/ovas-mngr-comm.c (sendf_to_server): Declare variables at start of
	block.

	* src/tasks_sql.h: Include splint.h.  Move variable declarations to block
	starts.  Mark /*@unused@*/ params.  Work around cpp string concatenation
	for splint.
	(init_manage): Free database_version.
	(make_task_rcfile): Remove name variable.
	(clude): Free formatted in same place as other prepare loops.
	(create_lsc_credential): Free rand and formatted.

	* src/splint.h: Include gnutls.h and uuid.h.
	(g_malloc, g_malloc0): Update types.
	(g_dir_read_name, g_dir_close, g_rand_new, g_rand_free): New headers.

	* src/oxpd.h (from_buffer_size): Add extern.

	* src/lsc_user.c: Include splint.h.  Move variable declarations to block
	starts.
	(file_utils_rmdir_rf): Check error before using it.  Free g_build_filename
	return.
	(file_utils_copy_file): Change bytes_written to a size_t.  Check error
	before using it.
	(ssh_privkey_create, ssh_pubkey_create): Free command.
	(get_rpm_generator_path): Make return const.
	(lsc_user_rpm_create): Make oltap_path const.

	* src/lsc_user.h (lsc_user_all_create): Remove param names.

	* src/manage.c: Move variable declarations to block starts.
	(delete_reports): Cleanup iterator afterwards.
	(start_task): Free hosts.

	* src/manage.h [!TASKS_SQL]: Add dummy declarations for splint.
	(host_iterator_end_time): Remove duplicate declaration.

	* src/omp.c: Move variable declarations to block starts.  Mark
	/*@unused@*/ params.
	(send_nvt): Work around macro for splint.
	(print_report_xml): Use fputs instead of fprintf for fixed string.
	(print_report_latex): Add RATS comments about fprintf args.
	(omp_xml_handle_end_element): Add RATS comments about system args.
	Remove duplicate free of description.

	* src/openvasmd.c: Move variable declarations to block starts.  Mark
	/*@unused@*/ params.
	(accept_and_maybe_fork): Add RATS comment about signal arg.
	(main): Use char syntax for char literal 0.  Free option_context.

2009-10-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/otp.c (process_otp_scanner_input): Add RATS comments about sscanf
	field lengths.  Put a fullstop on a comment.

2009-10-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (config_preference): Add the config to the query.
	(init_preference_iterator): Use "is NULL" instead of "= NULL" in query.
	(nvt_selector_family_count): Add the growing case where there is an "all"
	selector with only "include" selectors.
	(nvt_selector_nvt_count): Add naive handling of the growing case where
	there is an "all" selector with other selectors.
	(nvt_selector_family_selected_count): Handle NULL family for static
	selection.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_CONFIGS handle the
	NULL family, rename FAMILY/SELECTED_COUNT to FAMILY/NVT_COUNT and
	FAMILY/NVT_COUNT to FAMILY/MAX_NVT_COUNT, and add MAX_NVT_COUNT and
	KNOWN_NVT_COUNT to the config.

2009-10-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (start_task): Set current_scanner_task before task run
	status, so that report run status is set with task run status.

2009-10-26  Matthew Mundell <matthew.mundell@greenbone.net>

	Add an id column to each table to force VACUUM to respect ROWID.  This
	makes it safe to use ROWID as a foreign key.

	* src/tasks_sql.h (DATABASE_VERSION): Increase to 5, for new id columns.
	(init_manage): Add an id column to every table with constraints INTEGER
	PRIMARY KEY.
	[0] (migrate_4_to_5): Add outline of 4 to 5 migrator.
	(COL_CONFIG_PREFERENCES__NAME, COL_CONFIG_PREFERENCES__VALUE)
	(COL_CONFIGS__NAME, COL_CONFIGS__NVT_SELECTOR, COL_CONFIGS__COMMENT)
	(COL_CONFIGS__FAMILIES_GROWING, COL_CONFIGS__NVTS_GROWING)
	(COL_LSC_CREDENTIALS__NAME, COL_LSC_CREDENTIALS__PASSWORD)
	(COL_LSC_CREDENTIALS__COMMENT, COL_LSC_CREDENTIALS__PUBLIC_KEY)
	(COL_LSC_CREDENTIALS__PRIVATE_KEY, COL_LSC_CREDENTIALS__RPM)
	(COL_LSC_CREDENTIALS__DEB, COL_LSC_CREDENTIALS__EXE)
	(COL_NVT_PREFERENCES__NAME, COL_NVT_PREFERENCES__VALUE)
	(COL_NVT_SELECTORS__NAME, COL_NVT_SELECTORS__NVT, COL_NVTS__OID)
	(COL_NVTS__VERSION, COL_NVTS__NAME, COL_NVTS__SUMMARY)
	(COL_NVTS__DESCRIPTION, COL_NVTS__COPYRIGHT, COL_NVTS__CVE, COL_NVTS__BID)
	(COL_NVTS__XREF, COL_NVTS__TAG, COL_NVTS__SIGN_KEY_IDS)
	(COL_NVTS__CATEGORY, COL_NVTS__FAMILY, COL_REPORT_HOSTS__HOST)
	(COL_REPORT_HOSTS__START_TIME, COL_REPORT_HOSTS__END_TIME)
	(COL_REPORT_HOSTS__ATTACK_STATE, COL_REPORT_HOSTS__CURRENT_PORT)
	(COL_REPORT_HOSTS__MAX_PORT, COL_TARGETS__NAME, COL_TARGETS__HOSTS)
	(COL_TARGETS__COMMENT, COL_TASK_FILES__NAME, COL_TASK_FILES__CONTENT): New
	defines.  Use instead of integers in all iterator access functions.

2009-10-26  Matthew Mundell <matthew.mundell@greenbone.net>

	Add database migration from version 3 to 4.

	* src/tasks_sql.h (nvt_selector_iterator_name): New header.
	(migrate_3_to_4, nvt_selector_iterator_name): New functions.
	(database_migrators): Enable 3 to 4 migration.
	(init_nvt_selector_iterator): If name is NULL do all selectors.

2009-10-26  Matthew Mundell <matthew.mundell@greenbone.net>

	Add database migration from version 2 to 3.

	* src/tasks_sql.h (migrate_2_to_3): New function.
	(database_migrators): Enable 2 to 3 migration.

2009-10-26  Michael Wiegand <michael.wiegand@greenbone.net>

	Post-release version bump.

	* VERSION: Set to 0.9.3.SVN.

	* CMakeLists.txt: CPACK_PACKAGE_VERSION_PATCH updated.

	* doc/Doxyfile, doc/Doxyfile_full: Updated PROJECT_NUMBER.

2009-10-26  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 0.9.2 release.

	* VERSION: Set to 0.9.2.

	* CMakeLists.txt: CPACK_PACKAGE_VERSION_PATCH updated.

	* doc/Doxyfile, doc/Doxyfile_full: Updated PROJECT_NUMBER.

	* CHANGES: Updated.

2009-10-26  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/otp.c (process_otp_scanner_input): In OTP, NVT descriptions do
	not contain newlines, they are instead replaced by semicolons.
	Undo this before descriptions enter nvti structures and ultimately the
	database.

2009-10-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_get_lsc_credentials_0.c,
	src/tests/omp_create_lsc_credentials_0.c,
	src/tests/omp_create_lsc_credentials_1.c,
	src/tests/omp_delete_lsc_credential_0.c: Remove underscores and spaces
	from LSC names.

2009-10-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/lsc_user.c (ssh_privkey_create): Quote passwords for openssl.

2009-10-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (create_lsc_credential): Check that name is all
	alphanumeric.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_LSC_CREDENTIAL
	handle name error.

2009-10-24  Matthew Mundell <matthew.mundell@greenbone.net>

	In LSC generator, improve command exit checking and pass args around
	directly instead of via a structure.

	* src/lsc_user.c (ssh_privkey_create): Make args const.
	(ssh_pubkey_create): Make args const.  Add function to tracing.
	(lsc_user_rpm_create): Take user name and public key path directly.
	Check command exit status properly.
	(execute_alien): Check command exit status properly.  Separate function
	exit variable from command exit.
	(lsc_user_deb_create): Take user name directly.  Free the lowercased name.
	(lsc_user_all_create): Pass parameters to functions directly, instead of
	using a login structure.

2009-10-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/lsc_user.c: Add fullstops to a few comments.  Convert printfs to
	g_debugs.

2009-10-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/lsc_user.c: Make docs and comments consistent.

2009-10-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/lsc_user.c: Tidy.  Match formatting to standard.

2009-10-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (collate_message_type): New function.
	(init_manage_process): Create collate_message_type collation.
	(init_result_iterator): Order types with collation collate_message_type.

2009-10-23  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (print_report_latex): Skip Log and Debug messages.

2009-10-23  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* src/omp.c (latex_severity_heading, print_report_latex): Use
	High/Medium/Low terms.

2009-10-23  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/lsc_user.c (ssh_privkey_create, ssh_pubkey_create): Make return int.
	(ssh_key_create): Remove.
	(lsc_user_all_create): Call key create functions directly.  Access paths
	with variables.

2009-10-23  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/lsc_user.c: Remove alternate sections.  Add missing __FUNCTION__
	args to g_debug's.

2009-10-23  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/lsc_user.c: Replace show_error with g_debug, remove gettext _.

2009-10-23  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* src/omp.c (print_report_latex): Better avoidance of
	overlong pages.

2009-10-23  Matthew Mundell <matthew.mundell@greenbone.net>

	Cleanup LSC package generation a bit.

	* src/lsc_user.c: Cleanup some indenting and comments.  Add some tracing.
	(ssh_pubkey_create): Remove existence check.  Quote some command args.
	Free GError.
	(ssh_key_create_unlink_files): Remove.
	(get_rpm_generator_path): Use new location and name for RPM generator.
	Just search in one place.
	(lsc_user_rpm_create): Create temp dir with mkdtemp.  Use new name for
	RPM generator.  Make rmdir failure an error.
	(lsc_user_all_create): Create temp dir for keys.  Free mem and remove dirs
	on exit.

	* CMakeLists.txt (DATADIR, OPENVAS_DATA_DIR): New variables.

	* src/CMakeLists.txt: Define OPENVAS_DATA_DIR if possible.

2009-10-23  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (accept_and_maybe_fork): Set SIGCHLD handler to
	SIG_DFL in child.
	(main): Revert SIGCHLD handler to SIG_IGN.

2009-10-23  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* src/omp.c (latex_header, latex_footer, print_report_latex):
	Generalized LaTeX-based PDF Report (not "OpenVAS"-specific).
	Also added table of contents.

2009-10-23  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_get_preferences_2.c: Correct test number.

2009-10-23  Matthew Mundell <matthew.mundell@greenbone.net>

	Add families to NVT selectors in database when creating selectors from
	RC file.

	* src/tasks_sql.h (clude): Add a families arg.  Insert the NVT family in
	families and the database.
	(insert_rc_into_config): Let clude do the families inserting.
	(nvt_selector_family_growing): Correct column name in SQL.

2009-10-23  Matthew Mundell <matthew.mundell@greenbone.net>

	Extend OMP GET_CONFIGS for retrieving a single config with a summary
	of the selected families.

	* src/tasks_sql.h (DATABASE_VERSION): Increase to 4, for change to
	nvt_selectors.
	(init_manage): Add row family to nvt_selectors.
	(init_config_iterator): Add name arg.
	(family_nvt_count, init_family_iterator, family_iterator_name)
	(nvt_selector_family_growing, nvt_selector_family_selected_count): New
	functions.

	* src/manage.h: Update headers.

	* src/omp.c (omp_xml_handle_start_element, omp_xml_handle_end_element):
	Add name and families attributes to GET_CONFIGS.

2009-10-22  Matthew Mundell <matthew.mundell@greenbone.net>

	Add generation of LSC user keys and packages (RPM and Debian).  Extend OMP
	GET_LSC_CREDENTIALS for retrieving packages.

	* src/lsc_user.c, src/lsc_user.h: New files.  Key and package generation.

	* src/CMakeLists.txt (manage): Add lsc_user.c.

	* src/openvasmd.c (main): Enable SIGCHLD.  Neaten some formatting.
	(serve_client): Goto fail case if read_protocol failed completely.
	(cleanup): Neaten some formatting.

	* src/tasks_sql.h (DATABASE_VERSION): Increase to 3 for changes to
	lsc_credentials table.
	(init_manage): Add password column to table lsc_credentials, rename column
	dog to exe, make the package columns of type text.
	(clude): Change sqlite3_bind_text free function to SQLITE_TRANSIENT.
	(create_lsc_credential): Create keys and packages.
	(init_lsc_credential_iterator): New function.
	(lsc_credential_iterator_password, lsc_credential_iterator_public_key)
	(lsc_credential_iterator_private_key, lsc_credential_iterator_rpm)
	(lsc_credential_iterator_deb, lsc_credential_iterator_exe): New functions.
	(lsc_credential_iterator_comment): Update column number.

	* src/manage.h: Update headers.

	* src/omp.c (omp_xml_handle_start_element, omp_xml_handle_end_element):
	Add name and format flags to GET_LSC_CREDENTIALS.

2009-10-21  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* src/openvasmd.c (cleanup, main): Factored out pidfile management.

2009-10-21  Matthew Mundell <matthew.mundell@greenbone.net>

	Add database migration from version 1 to 2.

	* src/tasks_sql.h (migrate_0_to_1): Clarify note slightly.
	(migrate_1_to_2): New function.
	(database_migrators): Enable 1 to 2 migration.
	(init_manage): Note that db may still need an update after migration.

2009-10-21  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_manage): Init current_credentials.

2009-10-20  Matthew Mundell <matthew.mundell@greenbone.net>

	Add database migration from version 0 to 1.

	* src/tasks_sql.h (manage_db_version): Correct doc.
	(set_db_version): New function.
	(migrate_0_to_1): Enable, and add implementation.
	(database_migrators): Enable 0 to 1 migration.
	(init_manage): Use set_db_version.

	* ChangeLog: Add actual versions at DATABASE_VERSION changes.  Replace
	indent spaces with tabs.

2009-10-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h: Bring docs up to date.  Remove docs from DEF_ACCESS
	invocations so that they're all the same.

2009-10-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_get_preferences_0.c: Expect success always, now that the
	manager only loads if the preferences are cached.

2009-10-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_start_task_0.c: Also expect REPORT_ID in response.

2009-10-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_get_status_5.c: Add FINISHED to REPORT_COUNT in
	expected response.

2009-10-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (cleanup): Add comment to #endif.

2009-10-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (manage_nvt_preference_add): Make args const.
	* src/manage.h: Update header.

2009-10-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/otp.c (parse_scanner_preference_value): Only add the preference when
	in caching mode.
	(process_otp_scanner_input): After successfully parsing a preference, free
	current_scanner_preference and set it NULL.

2009-10-19  Michael Wiegand <michael.wiegand@greenbone.net>

	Post-release version bump.

	* VERSION: Set to 0.9.2.SVN.

	* CMakeLists.txt: CPACK_PACKAGE_VERSION_PATCH updated.

	* doc/Doxyfile, doc/Doxyfile_full: Updated PROJECT_NUMBER.

2009-10-19  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 0.9.1 release.

	* VERSION: Set to 0.9.1.

	* CMakeLists.txt: CPACK_PACKAGE_VERSION_PATCH updated.

	* doc/Doxyfile, doc/Doxyfile_full: Updated PROJECT_NUMBER.

	* CHANGES: Updated.

2009-10-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (report_counts): Swap infos and warnings.
	(task_infos_size): Count Notes instead of Warnings.
	(task_notes_size): Remove.
	(task_warnings_size): New function.
	* src/manage.h: Update header.

	* src/omp.c (omp_xml_handle_end_element): Call task_warnings_size instead
	of task_notes_size.

2009-10-19  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/omp.c (convert_to_newlines): Handle backslashes not followed by
	'n' or 'r' correctly.

2009-10-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (result_type_threat): New function.
	(omp_xml_handle_end_element): In CLIENT_GET_REPORT change the XML report
	TYPE to THREAT.

2009-10-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (send_to_client): Temporarily add conversion of msg from
	iso_8859-1 to utf-8, to catch iso chars originating from the OTP messages.

2009-10-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (rc_preference): Check whether there is a value to
	duplicate after an equal sign.

2009-10-16  Matthew Mundell <matthew.mundell@greenbone.net>

	Include report ID in OMP START_TASK response.

	* src/tasks_sql.h (create_report): Add report_id output arg.

	* src/manage.c (start_task): Add report_id output arg.  Pass to
	create_report.
	* src/manage.h: Update header.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_START_TASK add report
	ID to OK response.

2009-10-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (set_task_parameter): Remove all task files when
	setting RC file.

2009-10-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (get_files_to_send): Cleanup a little formatting.
	(start_task): Update LSC comment.

2009-10-15  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	Do not do any logic when sending files, just send all we have in the
	db.

	* src/manage.c (files_append_lsc): Removed, replaced by
	get_files_to_send.
	(get_files_to_send): New, creates a list of files to send.
	(preference_value, send_config_preferences): Do not modify list of
	files to send.
	(start_task): Do not collect list of files to send via calls to
	preference_value and files_append_lsc, but use new get_files_to_send
	instead.

2009-10-15  Michael Wiegand <michael.wiegand@greenbone.net>

	Make sure the parent pidfile is only removed when the parent exits.

	* src/openvasmd.c: Introduce global is_parent indicator.
	(accept_and_maybe_fork): Set is_parent to 0 in the child immediately
	after forking.
	(cleanup): Check if this process is the parent before removing the
	pidfile.

2009-10-13  Matthew Mundell <matthew.mundell@greenbone.net>

	Add parsing of NVT category from OTP.

	* src/otp.c: Include openvas/nvt_categories.h.
	(category_number): New function.
	(process_otp_scanner_input): In SCANNER_PLUGIN_LIST_CATEGORY set the
	category number according to the OTP field.

	* src/tasks_sql.h (DATABASE_VERSION): Increase to 2, due to nvts category
	column type specification.
	(init_manage): Specify type for category column in table nvts.
	(make_nvt_from_nvti): Insert category as int.
	(nvt_iterator_category): Change return to int.

	* src/manage.h: Update header.

	* src/omp.c: Include openvas/nvt_categories.h.
	(category_name): New function.
	(send_nvt): Convert category number into name.

2009-10-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): Free modify_task_file.

2009-10-12  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (delete_task): Delete task files too.

2009-10-12  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (manage_task_update_file): Add missing arg to sql call.

2009-10-12  Matthew Mundell <matthew.mundell@greenbone.net>

	Add a --database option.

	* src/tasks_sql.h (manage_migrate, init_manage_process, init_manage): Add
	database arg.  Use to init database.  Update callers.
	* src/manage.h: Update headers.

	* src/omp.c (init_omp, init_omp_process): Add database arg.  Update
	callers.
	* src/omp.h: Update headers.

	* src/ompd.c (init_ompd, serve_omp): Add database arg.  Update callers.
	* src/ompd.h: Update headers.

	* src/openvasmd.c (database): New variable.
	(main): Add --database.

2009-10-09  Matthew Mundell <matthew.mundell@greenbone.net>

	Add FILE to OMP MODIFY_TASK, for clients to send files referenced by
	preferences.  Associate files with tasks instead of with configs.

	* src/otp.c (process_otp_scanner_input): Handle OTP FILE_ACCEPTED.

	* src/ovas-mngr-comm.c (sendn_to_server): Switch message type to void.
	* src/ovas-mngr-comm.h: Update header.

	* src/omp.c (current_name, modify_task_file): New variables.
	(client_state_t): Add CLIENT_MODIFY_TASK_FILE.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Add MODIFY_TASK FILE handling.

	* src/tasks_sql.h (init_manage): Rename table config_files to task_files,
	associating the file with a task instead of a config.
	(manage_task_update_file, manage_task_remove_file)
	(init_task_file_iterator, task_file_iterator_content)
	(task_file_iterator_length): New functions.
	(init_config_file_iterator, config_file_iterator_content)
	(config_file_iterator_length): Remove.

	* src/manage.c (send_task_file): New function.  Renamed from
	send_config_file.  Adjust for new task-file association.

	* src/manage.h: Update headers.

2009-10-09  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (latex_escape_text): Replace $\backslash with $\\backslash in
	string literals.  Adjust the backslash case to move the correct portion
	of the string forward, and to move the character pointer to the correct
	final location.

2009-10-09  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (report_notes, report_warnings): Add missing args to
	calls.

2009-10-09  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (report_holes): Add missing arg to call.

2009-10-09  Matthew Mundell <matthew.mundell@greenbone.net>

	Add support for storing files referenced in preferences, and sending
	of the files to the scanner.

	* src/tasks_sql.h (init_manage): Add table config_files.
	(init_config_file_iterator, config_file_iterator_content)
	(config_file_iterator_length): New functions.

	* src/manage.c (preference_value): Add file type parsing, which pushes
	file onto new arg "files".
	(send_config_preferences): Pass files list through.
	(send_config_file): New function.
	(start_task): Send files gathered with sending preferences.

	* src/manage.h: Add new headers.

2009-10-08  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (preference_value): New function.  Handles radio
	preference type parsing.
	(send_config_preferences): Get actual value of preference with
	preference_value.

2009-10-08  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (set_task_parameter): Free rc on fail.  Moving setting
	the task description and targets to precede filling the config, as
	insert_rc_into_config modifies its rc argument.

2009-10-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (make_task_rcfile): Remove append of name.

2009-10-06  Tim Brown <timb@openvas.org>

	* src/otp.c: Fixed memory leak.

2009-10-06  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_manage): Log database versions on version failure.

2009-10-06  Matthew Mundell <matthew.mundell@greenbone.net>

	Complete database initialisation check started yesterday.

	* src/tasks_sql.h (init_manage): Add nvt_cache_mode arg.  Update caller.
	Enable and complete database initialisation check.
	* src/manage.h: Update header.

	* src/omp.c (init_omp): Add nvt_cache_mode arg.  Update caller.
	* src/omp.h: Update header.

	* src/ompd.c (init_ompd): Add nvt_cache_mode arg.  Update caller.
	* src/ompd.h: Update header.

	* src/openvasmd.c (main): Add "must init" failure to init_ompd return
	checks.

2009-10-05  Matthew Mundell <matthew.mundell@greenbone.net>

	Move caching of NVT preferences to the database.

	* src/otp.h (scanner_init_state_t): Add SCANNER_INIT_DONE_CACHE_MODE.

	* src/ompd.c (init_ompd): In SCANNER_INIT_GOT_PLUGINS set scanner init to
	special cache done state when in cache mode.  Add
	SCANNER_INIT_DONE_CACHE_MODE to error check.
	(serve_omp): Add SCANNER_INIT_DONE_CACHE_MODE to select setup.

	* src/otp.c (current_scanner_preferences, make_scanner_preferences)
	(add_scanner_preference): Remove.
	(init_otp_data): Remove scanner.preferences init.
	(parse_scanner_preference_value): Call manage_nvt_preference_add instead
	of add_scanner_preference.
	(process_otp_scanner_input): Add SCANNER_INIT_DONE_CACHE_MODE alongside
	SCANNER_INIT_DONE.  In NVT cache mode, instead of exiting when the
	NVTs are cached, continue to read the preferences and exit after that.

	* src/tasks_sql.h (init_manage_process): Also clear NVT prefs.
	(init_manage): Add outline for database initialisation check.  Add table
	nvt_preferences.
	(manage_nvt_preference_add, manage_nvt_preferences_enable)
	(init_nvt_preference_iterator, nvt_preference_iterator_name)
	(nvt_preference_iterator_value): New functions.

	* src/manage.h: Add headers.
	(scanner_t): Remove preferences slot.

	* src/omp.c (send_preference): Remove.
	(omp_xml_handle_end_element): In CLIENT_GET_PREFERENCES use new
	preferences iterator to send preferences.

2009-10-05  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ompd.c (recreate_session): Add openvas_server_free to fnctl fail.
	(serve_omp): Put the credential args the right way round.

2009-10-03  Matthew Mundell <matthew.mundell@greenbone.net>

	When parsing the OTP PREFERENCES, read in all the preferences before
	enabling them, otherwise OMP GET_PREFERENCES might return a partial
	set of preferences.

	* src/otp.c (current_scanner_preferences): New variable.
	(make_scanner_preferences): Return preferences instead of setting scanner.
	(add_scanner_preference): Set preference on a given preference table
	instead of on scanner.preferences.  Update caller.
	(process_otp_scanner_input): Initialise current_scanner_preferences
	with the make_scanner_preferences return.  In SCANNER_PREFERENCE_NAME set
	scanner.preferences to current_scanner_preferences.

	* src/tests/omp_get_preferences_2.c: New file.  Tests that first two
	successful returns from GET_PREFERENCES are identical.

	* src/tests/CMakeLists.txt: Add omp_get_preferences_2.

2009-09-30  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	Post-release version bump.

	* VERSION: Set to 0.9.1.SVN.

	* CMakeLists.txt: CPACK_PACKAGE_VERSION_PATCH updated.

	* doc/Doxyfile, doc/Doxyfile_full: Updated PROJECT_NUMBER.

2009-09-30  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	Preparing the openvas-manager 0.9.0 release.

	* VERSION: Set to 0.9.0.

	* CMakeLists.txt: CPACK_PACKAGE_VERSION_PATCH updated.

	* doc/Doxyfile, doc/Doxyfile_full: Updated PROJECT_NUMBER.

	* CHANGES: Updated.

2009-09-30  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (DATABASE_VERSION): Increase to 1, for column added
	2009-08-28.

2009-09-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* CMakeLists.txt: Rename server to scanner in defs, to match code.

	* src/CMakeLists.txt: Rename server to scanner in defs, to match code.

2009-09-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_manage): Move targets table creation up.
	(delete_config, config_in_use): Special case predefined configs.

2009-09-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* INSTALL: Note need for om user.

2009-09-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* CMakeLists.txt: Set minimum cmake version to 2.6.

2009-09-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/db_postgres.sql (meta, nvts, lsc_credentials): New tables.
	(configs): Move up to match manager.

2009-09-28  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* doc/openvasmd.8.xml, README: Renaming openvasd to openvassd.

2009-09-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ompd.c, src/otpd.c: Add missing arg docs.

2009-09-25  Matthew Mundell <matthew.mundell@greenbone.net>

	Add OMP commands CREATE_LSC_CREDENTIAL, DELETE_LSC_CREDENTIAL and
	GET_LSC_CREDENTIALS.

	* src/tasks_sql.h (init_manage): Create table lsc_credentials.
	(create_lsc_credential, delete_lsc_credential)
	(init_lsc_credential_iterator, lsc_credential_iterator_name)
	(lsc_credential_iterator_comment): New functions.
	* src/manage.h: Add headers.

	* src/omp.c (help_text): Add new commands.
	(client_state_t): Add new states.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Add handling of new commands.

	* src/tests/omp_help_0.c: Update help text.

	* src/tests/omp_create_lsc_credential_0,
	src/tests/omp_create_lsc_credential_1,
	src/tests/omp_delete_lsc_credential_0,
	src/tests/omp_get_lsc_credentials_0: New files.

	* src/tests/CMakeLists.txt: Add omp_create_lsc_credential_0,
	omp_create_lsc_credential_1, omp_delete_lsc_credential_0 and
	omp_get_lsc_credentials_0.

2009-09-25  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd_log_conf.cmake_in (*): Send logs to openvasmd.log
	instead of openvas.log.

2009-09-25  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch entirely to the openvas_server library interface for handling the
	client and scanner sessions.

	* src/openvasmd.c (client_session, client_credentials): New variables.
	(serve_client, accept_and_maybe_fork, main): Use openvas_server interface
	instead of ovas_scanner interface for the client session.  Switch to
	openvas_server_new for the scanner session.  Ensure that O_NONBLOCK is
	set on the scanner socket (as this was previously done in
	openvas_server_session_new).  Remove initialisation of client session in
	NVT cache updating mode.
	(cleanup): Remove ovas_scanner_context cleanup.

	* src/otpd.c (serve_otp): Add credentials arg.  Call openvas_server_free
	instead of close_stream_connection.

	* src/otpd.h: Add include.
	(serve_otp): Add args.

	* src/ompd.c (serve_omp): Add credentials arg.  Call openvas_server_free
	instead of close_stream_connection.
	(recreate_session): Switch to openvas_server_free and openvas_server_new.
	Ensure O_NONBLOCK is set on the socket.

	* src/ompd.h (serve_omp): Add credential arg.

	* src/CMakeLists.txt (openvasmd): Remove LINK_FLAGS symbol hack for
	openvas_get_socket_from_connection.

2009-09-25  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/tests/common.h: Adjusted include.

2009-09-25  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/manage.c, src/manage.h, src/omp.c, src/otp.c, src/tests/common.h:
	Adjusted includes to recent changes in trunk (headers from
	openvas-libraries/base get installed to openvas/base/).

2009-09-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/rmdir_recursively_0.c,
	src/tests/rmdir_recursively_1.c: Remove.

2009-09-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_get_nvt_feed_checksum_1.c,
	src/tests/omp_get_nvt_details_4.c,
	src/tests/omp_get_nvt_feed_checksum_5.c,
	src/tests/omp_modify_report_0.c, src/tests/omp_get_status_2.c,
	src/tests/omp_get_status_4.c, src/tests/omp_get_nvt_all_1.c,
	src/tests/omp_get_report_5.c, src/tests/omp_start_task_1.c,
	src/tests/omp_get_report_7.c, src/tests/omp_start_task_3.c,
	src/tests/omp_delete_task_1.c, src/tests/omp_get_configs_2.c,
	src/tests/omp_get_rules_1.c, src/tests/omp_delete_report_0.c,
	src/tests/omp_get_preferences_1.c, src/tests/omp_get_nvt_details_1.c,
	src/tests/omp_get_nvt_feed_checksum_4.c, src/tests/omp_get_status_3.c,
	src/tests/omp_get_dependencies_1.c, src/tests/omp_abort_task_0.c,
	src/tests/omp_get_certificates_1.c, src/tests/omp_get_report_0.c,
	src/tests/omp_get_report_4.c, src/tests/omp_get_report_6.c,
	src/tests/omp_start_task_2.c, src/tests/omp_get_report_8.c,
	src/tests/omp_delete_task_0.c, src/tests/omp_delete_task_2.c,
	src/tests/omp_get_configs_3.c: Replace "server"	with "scanner" everywhere.

2009-09-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ompd.c, src/omp.h, src/otp.c, src/ovas-mngr-comm.c,
	src/otpd.c, src/otp.h, src/tasks_sql.h, src/oxpd.c, src/oxpd.h,
	src/manage.c, src/omp.c, src/openvasmd.c, src/manage.h: Replace "server"
	with "scanner" everywhere.

2009-09-23  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/openvasmd.c: Replaced server by scanner, openvasd by openvassd.
	Reflect API change (openvas_server_context -> openvas_scanner_context).

2009-09-23  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/CMakeLists.txt: All libraries depend on libopenvas(base), added
	the 'libopenvas-config --cflag' to the compile flags.

	* src/ompd.c, src/otpd.c, src/oxpd.c: In comments, replaced 'Server' by
	'Scanner', openvasd by openvassd.

2009-09-22  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/CMakeLists.txt (DOC_FILES): Remove string.c and file.c.

	* INSTALL: Update reference system to Lenny.  Add space after fullstop.

	* README, src/tests/common.c: Correct doc typos.

	* src/omp.c, src/ompd.c, src/ovas-mngr-comm.c, src/otp.c, src/manage.c: In
	doc comments, put conditionals around macro function definitions and
	references to static functions.  Doc a missing param.  Refer to
	to_server more generically.

	* src/openvasmd.c (\mainpage): Update.
	(FORK): Doc.

2009-09-22  Matthew Mundell <matthew.mundell@greenbone.net>

	Remove the file library, which is out of use.

	* src/file.c, src/file.h: Remove.

2009-09-22  Matthew Mundell <matthew.mundell@greenbone.net>

	Remove the file library, which is out of use.

	* doc/Doxyfile, doc/Doxyfile_full: Remove file.c.

	* src/tests/CMakeLists.txt: Remove linkage to libfile.
	(rmdir_recursively_0, rmdir_recursively_1): Remove.

	* src/manage.c: Remove file.h include.

	* src/CMakeLists.txt: Remove file and string linkage.
	(libfile): Remove.
	(C_FILES): Remove file.c.

2009-09-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): Ensure that before every
	g_base64_encode call there is a check that prevents passing NULL or an
	empty string to g_base64_encode.

2009-09-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd_log_conf.cmake_in: Match time prepend formats to
	openvas-libraries.
	(md string, libopenvas, libnasl, openvasd): Remove.
	(*): Add %t to prepend, to match other entries.

	* src/openvasmd.c (main): Remove g_log_set_handler calls, as that's what
	setup_log_handlers does.  Rename NESSUS_ENCAPS_TLSv1 to
	OPENVAS_ENCAPS_TLSv1.

2009-09-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_create_task_2.c: Update predefined config name.

2009-09-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.c (setup_test): Set g_log_default_log_handler to
	openvas_log_func.

	* src/tests/omp_get_nvt_all_0.c, src/tests/omp_get_nvt_details_0.c,
	src/tests/omp_get_nvt_feed_checksum_0.c,
	src/tests/omp_get_nvt_feed_checksum_2.c: Add checks for successful
	responses.

	* src/tests/omp_create_task_3.c, src/tests/omp_start_task_3.c,
	src/tests/omp_delete_target_1.c: Correct predefined config names.

	* src/tests/omp_get_report_7.c: Correct heading typo.

	* src/tests/omp_get_rules_0.c: Update expected result.

	* src/tests/omp_create_task_4.c: Match expected target to RC.

	* src/tests/new_task_small__many_plugins_yes_rc: New file.  Missing RC
	for omp_create_task_4.

2009-09-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_delete_target_0.c, src/tests/omp_get_targets_1.c,
	src/tests/omp_modify_task_0.c, src/tests/omp_get_nvt_details_0.c,
	src/tests/omp_get_nvt_feed_checksum_1.c, src/tests/omp_get_nvt_details_2.c,
	src/tests/omp_get_nvt_feed_checksum_3.c, src/tests/omp_get_nvt_details_4.c,
	src/tests/omp_get_nvt_feed_checksum_5.c, src/tests/omp_get_status_0.c,
	src/tests/omp_modify_report_0.c, src/tests/omp_get_status_2.c,
	src/tests/omp_get_dependencies_0.c, src/tests/omp_get_status_4.c,
	src/tests/omp_create_task_1.c, src/tests/omp_delete_config_0.c,
	src/tests/omp_create_task_3.c, src/tests/omp_get_nvt_all_1.c,
	src/tests/omp_get_certificates_0.c, src/tests/omp_create_target_0.c,
	src/tests/omp_get_report_1.c, src/tests/omp_get_report_3.c,
	src/tests/omp_get_report_5.c, src/tests/omp_start_task_1.c,
	src/tests/read_protocol_0.c, src/tests/omp_get_report_7.c,
	src/tests/omp_start_task_3.c, src/tests/omp_start_task_5.c,
	src/tests/omp_get_version_0.c, src/tests/omp_delete_task_1.c,
	src/tests/omp_get_configs_0.c, src/tests/omp_create_config_0.c,
	src/tests/omp_get_configs_2.c, src/tests/omp_get_rules_1.c,
	src/tests/omp_delete_report_0.c, src/tests/omp_commands_0.c,
	src/tests/omp_get_preferences_1.c, src/tests/omp_get_targets_0.c,
	src/tests/omp_delete_target_1.c, src/tests/omp_modify_task_1.c,
	src/tests/omp_get_nvt_feed_checksum_0.c, src/tests/omp_get_nvt_details_1.c,
	src/tests/omp_get_nvt_feed_checksum_2.c, src/tests/omp_get_nvt_details_3.c,
	src/tests/omp_get_nvt_feed_checksum_4.c, src/tests/omp_bogus_1.c,
	src/tests/omp_get_status_1.c, src/tests/omp_create_task_0.c,
	src/tests/omp_get_status_3.c, src/tests/omp_get_dependencies_1.c,
	src/tests/omp_create_task_2.c, src/tests/omp_get_status_5.c,
	src/tests/omp_delete_config_1.c, src/tests/omp_abort_task_0.c,
	src/tests/omp_create_task_4.c, src/tests/omp_get_nvt_all_0.c,
	src/tests/omp_get_certificates_1.c, src/tests/omp_get_report_0.c,
	src/tests/omp_create_target_1.c, src/tests/timeout_0.c,
	src/tests/omp_get_report_2.c, src/tests/omp_get_report_4.c,
	src/tests/omp_start_task_0.c, src/tests/omp_get_report_6.c,
	src/tests/omp_start_task_2.c, src/tests/omp_get_report_8.c,
	src/tests/omp_start_task_4.c, src/tests/omp_delete_task_0.c,
	src/tests/omp_delete_task_2.c, src/tests/omp_help_0.c,
	src/tests/omp_get_configs_1.c, src/tests/omp_get_rules_0.c,
	src/tests/omp_create_config_1.c, src/tests/omp_get_configs_3.c,
	src/tests/omp_delete_report_1.c, src/tests/omp_get_preferences_0.c:	Use
	new openvas-library/omp interface names.

2009-09-18  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch to openvas-libraries string functions.

	* src/string.h, src/string.c: Remove.

	* doc/Doxyfile_full, doc/Doxyfile: Remove string.c.

	* src/omp.c, src/otp.c, src/manage.c: Switch to openvas-libraries string
	functions.

	* src/CMakeLists.txt: Remove string library.

	* src/tests/CMakeLists.txt: Drop string linkage.

	* src/tests/common.h: Include openvas_string.h for tests.

	* src/tests/strip_space_3.c, src/tests/omp_get_targets_1.c,
	src/tests/omp_get_nvt_feed_checksum_1.c,
	src/tests/omp_get_nvt_feed_checksum_5.c, src/tests/omp_get_nvt_all_1.c,
	src/tests/omp_get_report_5.c, src/tests/omp_get_report_7.c,
	src/tests/omp_get_configs_0.c, src/tests/omp_get_configs_2.c,
	src/tests/strip_space_0.c, src/tests/strip_space_2.c,
	src/tests/omp_get_targets_0.c, src/tests/omp_get_nvt_feed_checksum_4.c,
	src/tests/omp_get_report_0.c, src/tests/omp_get_report_4.c,
	src/tests/omp_get_report_6.c, src/tests/omp_get_report_8.c,
	src/tests/omp_get_configs_1.c, src/tests/omp_get_configs_3.c,
	src/tests/strip_space_1.c: Switch tests to openvas-libraries string
	functions.

2009-09-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ovas-mngr-comm.c (make_session, end_session)
	(connect_to_server): Remove.  Replaced in openvas_server library.

	* src/openvasmd.c, src/otpd.c, src/ompd.c: Replace calls to make_session,
	end_session	and connect_to_server with calls to the new openvas_server
	equivalents.

2009-09-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (OPENVASD_PORT): Set to 9391.
	(OPENVASMD_PORT): Set to 9390.
	(server_context): Remove.  Rename to ovas_server_context.
	(ovas_server_context): New variable.  Was server_context.
	(accept_and_maybe_fork): Note use of save_tasks.
	(main): Set manager_port instead of manager_address.sin_port when
	generating the port, otherwise the value is overwritten later.  Set
	SO_REUSEADDR on manager socket.

2009-09-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_CONFIGS and
	CLIENT_GET_TARGETS add status attributes to responses.

	* src/tests/omp_get_configs_0.c, src/tests/omp_get_configs_1.c,
	src/tests/omp_get_configs_2.c, src/tests/omp_get_configs_3.c: Add status
	attribute checks.  Update predefined config name and comment.  Remove a
	family count check from omp_get_configs_3.

	* src/tests/omp_get_targets_0.c, src/tests/omp_get_targets_1.c: Add status
	attribute checks.

2009-09-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/CMakeLists.txt (OVAS_LDFLAG): Remove -lopenvas_omp.

2009-09-16  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* src/openvasmd.c (serve_client): Renamed call of
	nessus_get_socket_from_connection to
	openvas_get_socket_from_connection.

	* src/CMakeLists.txt: Renamed nessus_get_socket_from_connection
	to openvas_get_socket_from_connection.

2009-09-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (max_hosts): Handle dotted decimal CIDR addresses.  Only
	subtract broadcast from count.

	* src/tests/omp_get_targets_0.c, src/tests/omp_get_targets_1.c: Adjust
	expected results.

2009-09-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (max_hosts): Subtract network and broadcast from count.

2009-09-15  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch to OMP library in openvas-libraries.

	* src/tests/common.c (BUFFER_SIZE, TRACE, send_to_manager)
	(sendf_to_manager, context_data_t, make_entity, next_entities)
	(first_entities, add_entity, add_attribute, free_entity, entity_text)
	(entity_name, compare_entity_with_name, entity_child, entity_attribute)
	(buffer_start, buffer_point, buffer_end, add_attribute)
	(handle_start_element, handle_end_element, handle_text, handle_error)
	(read_entity_and_text, read_entity, foreach_print_attribute, print_entity)
	(print_entities, compare_find_attribute, compare_entities, DO_CHILDREN)
	(task_status, authenticate, env_authenticate, omp_create_task)
	(create_task, create_task_from_rc_file, start_task, wait_for_task_start)
	(wait_for_task_end, wait_for_task_stop, wait_for_task_delete, delete_task)
	(omp_get_status, omp_get_report, omp_delete_report, omp_delete_task)
	(omp_modify_task, omp_get_preferences, omp_get_certificates, omp_until_up)
	(omp_create_target, omp_delete_target, omp_create_config)
	(omp_create_config_from_rc_file, omp_delete_config): Remove.
	(connect_to_manager_host_port, close_manager_connection): Wrap library
	functions.
	* src/tests/common.h: Remove headers.

	* src/tests/CMakeLists.txt: Link to -lopenvas_omp.

	* src/tests/omp_abort_task_0.c, src/tests/omp_authenticate_0.c,
	src/tests/omp_bogus_0.c, src/tests/omp_bogus_1.c,
	src/tests/omp_commands_0.c, src/tests/omp_create_target_0.c,
	src/tests/omp_create_target_1.c, src/tests/omp_create_task_0.c,
	src/tests/omp_create_task_1.c, src/tests/omp_create_task_2.c,
	src/tests/omp_create_task_3.c, src/tests/omp_create_task_4.c,
	src/tests/omp_delete_config_1.c, src/tests/omp_delete_report_0.c,
	src/tests/omp_delete_report_1.c, src/tests/omp_delete_target_0.c,
	src/tests/omp_delete_target_1.c, src/tests/omp_delete_task_0.c,
	src/tests/omp_delete_task_1.c, src/tests/omp_delete_task_2.c,
	src/tests/omp_get_certificates_0.c, src/tests/omp_get_certificates_1.c,
	src/tests/omp_get_configs_0.c, src/tests/omp_get_configs_1.c,
	src/tests/omp_get_configs_2.c, src/tests/omp_get_configs_3.c,
	src/tests/omp_get_dependencies_0.c, src/tests/omp_get_dependencies_1.c,
	src/tests/omp_get_nvt_all_0.c, src/tests/omp_get_nvt_all_1.c,
	src/tests/omp_get_nvt_details_0.c, src/tests/omp_get_nvt_details_1.c,
	src/tests/omp_get_nvt_details_2.c, src/tests/omp_get_nvt_details_3.c,
	src/tests/omp_get_nvt_details_4.c,
	src/tests/omp_get_nvt_feed_checksum_0.c,
	src/tests/omp_get_nvt_feed_checksum_1.c,
	src/tests/omp_get_nvt_feed_checksum_2.c,
	src/tests/omp_get_nvt_feed_checksum_3.c,
	src/tests/omp_get_nvt_feed_checksum_4.c,
	src/tests/omp_get_nvt_feed_checksum_5.c,
	src/tests/omp_get_preferences_0.c, src/tests/omp_get_preferences_1.c,
	src/tests/omp_get_report_0.c, src/tests/omp_get_report_1.c,
	src/tests/omp_get_report_2.c, src/tests/omp_get_report_3.c,
	src/tests/omp_get_report_4.c, src/tests/omp_get_report_5.c,
	src/tests/omp_get_report_6.c, src/tests/omp_get_report_7.c,
	src/tests/omp_get_report_8.c, src/tests/omp_get_rules_0.c,
	src/tests/omp_get_rules_1.c, src/tests/omp_get_status_0.c,
	src/tests/omp_get_status_1.c, src/tests/omp_get_status_2.c,
	src/tests/omp_get_status_3.c, src/tests/omp_get_status_4.c,
	src/tests/omp_get_status_5.c, src/tests/omp_get_targets_0.c,
	src/tests/omp_get_targets_1.c, src/tests/omp_get_version_0.c,
	src/tests/omp_help_0.c, src/tests/omp_help_1.c,
	src/tests/omp_modify_report_0.c, src/tests/omp_modify_task_0.c,
	src/tests/omp_modify_task_1.c, src/tests/omp_start_task_0.c,
	src/tests/omp_start_task_3.c, src/tests/omp_start_task_4.c,
	src/tests/omp_start_task_5.c, src/tests/timeout_0.c: Use OMP interface
	from libraries.

2009-09-14  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/logf.h (LOG): Set to 0.  That is, turn off compilation of
	communication logging.

2009-09-14  Matthew Mundell <matthew.mundell@greenbone.net>

	Create RC file in DB when creating a task from config and target.
	Update config and target when setting a task RC file.

	* src/tasks_sql.h: Add a static header declaration section.
	(make_task_rcfile, set_target_hosts, find_config): New function.
	(set_task_parameter): Update config and target in RCFILE case.
	(create_config): Add missing doc.
	* src/manage.h (make_task_rcfile): New export.

	* src/omp.c (omp_xml_handle_end_element): In the CLIENT_CREATE_TASK
	config and target case, generate the RC file.

2009-09-14  Matthew Mundell <matthew.mundell@greenbone.net>

	Keep the NVT cache in memory in each process, in an attempt to speed up
	family lookups when creating configs from RC files.

	* src/tasks_sql.h (nvti_cache): New variable.
	(init_manage): Load NVT cache from DB into memory.
	(insert_rc_into_config): Do the family lookup with nvti_cache and use the
	families hash table for counting only.  Also only do the family lookup if
	the plugin is included ("yes"), and	use a single SQL statement to cache
	all the config info.

2009-09-14  Matthew Mundell <matthew.mundell@greenbone.net>

	Add an rcfile attribute to OMP GET_STATUS, for getting task RC files.

	* src/omp.c (omp_xml_handle_start_element): Check for attribute.
	(omp_xml_handle_end_element): In CLIENT_GET_STATUS include rc file
	if attribute was set.

	* src/tests/common.c (omp_get_status): Add rcfile flag param.
	* src/tests/common.h: Update header.

2009-09-14  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.c (BUFFER_SIZE): Increase.
	(connect_to_manager_host_port): Neaten formatting.
	(create_task, omp_modify_task, omp_create_config): Check string lengths
	before passing them to g_base64_encode.

2009-09-14  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (send_nvt): Correct NVT name accessor.

2009-09-14  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): Add missing
	CLIENT_MODIFY_TASK_NAME case.

2009-09-14  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In the CLIENT_GET_RULES case
	response with service down instead of internal error when server.rules
	is NULL.

2009-09-14  Michael Wiegand <michael.wiegand@greenbone.net>

	Post release version bump.

	* VERSION: Set to 0.8.2.SVN.

	* CMakeLists.txt: CPACK_PACKAGE_VERSION_PATCH updated.

	* doc/Doxyfile, doc/Doxyfile_full: Updated PROJECT_NUMBER.

2009-09-14  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 0.8.1 relase.

	* VERSION: Set to 0.8.1.

	* CMakeLists.txt: CPACK_PACKAGE_VERSION_PATCH updated.

	* doc/Doxyfile, doc/Doxyfile_full: Updated PROJECT_NUMBER.

	* CHANGES: Updated.

2009-09-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* README: Fill paragraphs.  Change test command back to the command
	that runs the test.

2009-09-11  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* src/types.h, src/tests/omp_get_report_1.c,
	src/tests/omp_get_report_2.c, src/tests/omp_get_report_3.c:
	Transferred  Copyright from Intevation to Greenbone.

	* README: Reworked.

2009-09-09  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (max_hosts): Invert the sense of the mask.  Use longs.
	(omp_xml_handle_end_element): Improve comments a bit.

	* src/tests/omp_get_targets_0.c: Correct figures.

	* src/tests/omp_get_targets_1.c: New file.

	* src/tests/CMakeLists.txt: Add omp_get_targets_1.

2009-09-04  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (nvt_selector_family_count): Use config name for
	config.

2009-09-04  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* src/openvasmd.c (main): Adjust to new API for SSL initialization.

2009-09-02  Matthew Mundell <matthew.mundell@greenbone.net>

	Add database migration support.

	* src/openvasmd.c (main): Add a migrate option.  Add the supported
	database version to the version string.

	* src/tasks_sql.h (backup_db, restore_db, manage_db_supported_version)
	(manage_db_version, migrate_is_available, manage_migrate): New functions.
	(migrator_t): New type.
	(database_migrators): New variable.
	* src/manage.h: Update headers.

2009-09-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (task_second_last_report_id): Use scan_run_status as
	"finished" criterion, as task_last_report_id does.

2009-09-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/otp.c (parse_server_error): Set the task state to Internal Error
	for E001.
	(process_otp_server_input): In SERVER_TIME_SCAN_END leave the task state
	as Internal Error when it is Internal Error.

2009-09-02  Matthew Mundell <matthew.mundell@greenbone.net>

	Add OTP ERROR handling.

	* src/otp.c (server_state_t): Add new state.
	(sync_buffer): Move up in file.
	(parse_server_error): New function.
	(process_otp_server_input): Handle OTP ERROR.

2009-09-02  Michael Wiegand <michael.wiegand@greenbone.net>

	Post release version bump.

	* VERSION: Set to 0.8.1.SVN.

	* CMakeLists.txt: CPACK_PACKAGE_VERSION_PATCH updated.

2009-09-02  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 0.8.0 relase.

	* VERSION: Set to 0.8.0.

	* CMakeLists.txt: CPACK_PACKAGE_VERSION_PATCH updated.

	* CHANGES: Updated.

2009-09-01  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch START_TASK response to an error if the task is active.

	* src/manage.c (start_task): Return 1 if task is active.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_START_TASK respond
	with error if task is active.

	* src/tests/omp_start_task_5.c: New file.

	* src/tests/CMakeLists.txt: Add omp_start_task_5.

2009-09-01  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (setup_full_config_prefs): Switch to integers for the
	option args, to work around sending string literals to `sql'.  Update
	callers.

2009-09-01  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.c (OPENVASMD_PORT): Change to 9390.

2009-09-01  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/CMakeLists.txt: Remove "-I .." from all COMPILE_FLAGS.  Add
	libopenvas-config generated flags to OVAS_LDFLAGS and OVAS_CFLAGS.

	* src/CMakeLists.txt (openvasmd): Replace -lopenvas with OPENVAS_LDFLAGS
	in LINK_FLAGS.

2009-08-31  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/oxpd.c: Quote in cpp error message with double quotes.

2009-08-31  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c, src/tasks_sql.h, src/otp.c, src/manage.c: Refer to the "NULL"
	task ID with 0 instead of NULL.

2009-08-31  Matthew Mundell <matthew.mundell@greenbone.net>

	* CMakeLists.txt: Set project language.  Add CMP0005 policy check.

2009-08-31  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (setup_full_config_prefs): Add parameters.
	(init_manage): Add more predefined configs.

2009-08-28  Matthew Mundell <matthew.mundell@greenbone.net>

	Add SCAN_RUN_STATUS to REPORTs, as a reliable way of telling if the
	associated task finished.

	* src/tasks_sql.h (init_manage): Make run_status in tasks an integer.
	Add a scan_run_status field to reports.
	(set_task_run_status): Also set the run_status in the current report.
	(task_first_report_id, task_last_report_id)
	(task_finished_report_count): Use scan_run_status to indicate report
	completion.
	(report_scan_run_status): New function.

	* src/omp.c (send_reports): Add SCAN_RUN_STATUS to REPORT for
	GET_STATUS, so clients can tell which reports completed.
	(omp_xml_handle_end_element): As above, for REPORT in XML GET_REPORT
	response.

	* src/manage.c (run_status_name): New function, body from
	task_run_status_name.
	(task_run_status_name): Call run_status_name.

	* src/manage.h (run_status_name, report_scan_run_status): New headers.
	(task_status_t): Add internal error state, so user can get name of
	internal error.

2009-08-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_result_iterator): Correct SQL.

	* src/tracef.h (ALL_LOG_LEVELS): Use G_LOG_LEVEL_MASK.

2009-08-27  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/CMakeLists.txt (openvasmd): Remove -lpcap.

2009-08-27  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_get_targets_0.c: Add MAX_HOSTS checks.

2009-08-27  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_delete_target_0.c: Correct comment.

2009-08-27  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd_report_html.xsl: Note error involving preceding.

2009-08-27  Matthew Mundell <matthew.mundell@greenbone.net>

	Make the GET_STATUS progress be attack-only and relative to the maximum
	number of hosts.

	* src/omp.c (omp_xml_handle_end_element): Base the GET_STATUS progress
	entirely on the attack progress, and make the attack progress relative
	to the maximum number of hosts defined by the task target instead of
	to the total number of hosts acknowledged by the scanner.

	* src/otp.c (server_state_t): Add SERVER_STATUS_PROGRESS.
	(process_otp_server_input): Read over portscan STATUS messages, instead
	of saving them the the database.

2009-08-27  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (max_hosts): New function.
	(omp_xml_handle_end_element): Add a MAX_HOSTS to GET_TARGET which is the
	number of hosts described by the target.

2009-08-27  Matthew Mundell <matthew.mundell@greenbone.net>

	Add a database version check.

	* src/tasks_sql.h (DATABASE_VERSION): New define.  Version 0.
	(init_manage): Check database version.  Ensure version is set.

	* src/omp.c (init_omp): Add version return to doc.

	* src/ompd.c (init_ompd): Add version return to doc.

	* src/openvasmd.c (main): Check init_ompd return for wrong version.

2009-08-27  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (task_first_report_id, task_finished_report_count): New
	functions.
	(task_last_report_id, task_second_last_report_id): Only consider completed
	reports.
	* src/manage.h: Add headers.

	* src/omp.c (omp_xml_handle_end_element): Use 1 indexing "start" in
	RESULTS in the GET_REPORT response.  Add a FIRST_REPORT to the GET_STATUS
	response.  Include a count of finished reports in the GET_STATUS report
	count.

2009-08-27  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): Add a "max" attribute to
	RESULT in the GET_REPORT xml case.

2009-08-27  Matthew Mundell <matthew.mundell@greenbone.net>

	Add IN_USE element to responses from GET_TARGETS and GET_CONFIGS.

	* src/omp.c (omp_xml_handle_end_element): Add in_use to CLIENT_GET_TARGETS
	and CLIENT_GET_CONFIGS.

	* src/tasks_sql.h (target_in_use, config_in_use): New functions.
	(delete_target, delete_config): Use quoted target/config in SQL.
	* src/manage.h: Add headers.

2009-08-27  Matthew Mundell <matthew.mundell@greenbone.net>

	Make the "first_result" attrib of GET_REPORT index from 1.

	* src/omp.c (omp_xml_handle_start_element): Adjust current_int_1 for 0
	indexing of iterator.

	* src/tests/omp_get_report_8.c: Increment "first_result".

2009-08-26  Matthew Mundell <matthew.mundell@greenbone.net>

	Add "first_result" and "max_start" attributes to GET_REPORT.

	* src/tasks_sql.h (init_result_iterator): Add first_result and max_results
	args.  Update callers.
	(report_scan_result_count): New function.
	* src/manage.h: Update headers.

	* src/omp.c (current_int_1, current_int_2): New variables.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Setup
	"first_result" and "max_start" for GET_REPORT init_result_iterator.  Add
	a SCAN_RESULT_COUNT to the GET_REPORT REPORT and enclose the results
	in a RESULTS.

	* src/tests/omp_get_report_8.c: New file.

	* src/tests/CMakeLists.txt: Add omp_get_report_8.

2009-08-26  Matthew Mundell <matthew.mundell@greenbone.net>

	Add a COMMANDS OTP command.

	* src/omp.c (help_text): Add COMMANDS.
	(client_state_t): Add states for COMMANDS.
	(SEND_TO_CLIENT_OR_FAIL, SENDF_TO_CLIENT_OR_FAIL): Move up in file.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Add COMMANDS
	handling.

	* src/tests/omp_help_0.c (help_text): Add COMMANDS.

	* src/tests/omp_commands_0.c: New file.

	* src/tests/CMakeLists.txt: Add omp_commands_0.

2009-08-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_manage): Ensure that the predefined database
	entries always exists.

2009-08-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (scan_start_time, scan_end_time): Return an empty string
	if the field is NULL, so that the resulting XML entity is empty.

2009-08-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c: Always free the returns from scan_start_time and
	scan_end_time.

2009-08-26  Matthew Mundell <matthew.mundell@greenbone.net>

	Prevent deletion of hidden tasks and reports.

	* src/tasks_sql.h (init_manage): Add hidden field to reports.
	(make_report): Init hidden field.
	(delete_report, delete_task, request_delete_task): Add hidden checks.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_DELETE_REPORT and
	CLIENT_DELETE_TASK respond with syntax error if report/task was hidden.

2009-08-25  Matthew Mundell <matthew.mundell@greenbone.net>

	Setup a predefined example task and report.

	* src/tasks_sql.h (init_manage): Add hidden field to task.  Setup example
	task and report.
	(make_task): Init hidden field.
	(delete_task): Return error if task is hidden.

2009-08-25  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): Add back progress calculation
	lost with tracing.

2009-08-25  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): Add progress tracing to
	CLIENT_GET_STATUS.

2009-08-25  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/oxpd.c (read_protocol): Check for EINTR from select.

	* src/openvasmd.c (main): Check for EINTR from select.

2009-08-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (accept_and_maybe_fork): Add FORK define, for compiling
	to run in single process.

2009-08-24  Matthew Mundell <matthew.mundell@greenbone.net>

	Cache growing states of selectors in configs.

	* src/tasks_sql.h (init_manage): Add growing state caches to table
	configs.
	(insert_rc_into_config): Cache growing states afterwards.
	(config_iterator_families_growing, config_iterator_nvts_growing)
	(config_nvts_growing, config_families_growing): New functions.
	(nvt_selector_family_count, nvt_selector_nvt_count): Use cached
	growing states.
	(nvt_selector_nvts_growing, nvt_selector_families_growing): Try speed up.
	* src/manage.h: Add headers.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_CONFIGS get
	cached growing state from config.

2009-08-24  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch response for creating an existing config to a user error.

	* src/tasks_sql.h (create_config): Return -1 if config exists.
	(create_target): Match return to create_config.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_CONFIG handle
	"config exists" return.

2009-08-24  Matthew Mundell <matthew.mundell@greenbone.net>

	Speed up creating a config and getting configs.

	* src/tasks_sql.h (init_manage): Add count caches to configs table.
	(insert_rc_into_config): Pre-allocate the arrays.  Cache the family and
	NVT counts in the database.
	(nvt_cache_present, nvt_family, nvt_selector_families_growing)
	(nvt_selector_nvts_growing): Limit the SQL to one result.
	(nvt_selector_family_count, nvt_selector_nvt_count): Use cached count.
	* src/manage.h: Update headers.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_CONFIGS pass
	config name to NVT count functions.

2009-08-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (nvt_selector_family_count)
	(nvt_selector_nvt_count): Count static nvts and families in SQL instead of
	counting through the result of the SQL.

2009-08-21  Matthew Mundell <matthew.mundell@greenbone.net>

	Prevent deletion of a config/target if a task refers to the config/target.

	* src/tasks_sql.h (delete_config, delete_target): Fail if a task refers
	to the config/target.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_DELETE_CONFIG and
	CLIENT_DELETE_TARGET handle new delete_config/delete_target fail return.

	* src/tests/common.c (omp_create_task): New function.
	* src/tests/common.h: Add header.

	* src/tests/omp_delete_config_1.c, src/tests/omp_delete_target_1.c: New
	files.

	* src/tests/CMakeLists.txt: Add omp_delete_config_1 and
	omp_delete_target_1.

2009-08-21  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (nvt_cache_present): Correct column name in SQL.
	(nvt_selector_family_count): Add real family count for the All selector.

2009-08-21  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_start_task_4.c: New file.  Tests starting a task when
	another task is already running on the same connection.

	* src/tests/CMakeLists.txt: Add omp_start_task_4.

2009-08-21  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (start_task): Fail if a task is already running.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_START_TASK add a
	response for the above failure and extend the start_task return
	checking.

2009-08-21  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (stop_task): Only stop the current task if it's the
	given task.

2009-08-21  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/README: Convert tabs to spaces.

	* src/tests/common.c, src/omp.c, src/manage.c: Add missing docs.

	* src/oxpd.c: Add missing docs.  Add splint guard around #error.

2009-08-21  Michael Wiegand <michael.wiegand@greenbone.net>

	Post release version bump.

	* VERSION: Set to 0.7.1.SVN.

	* CMakeLists.txt: CPACK_PACKAGE_VERSION_PATCH updated.

2009-08-21  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 0.7.0 relase.

	* VERSION: Set to 0.7.0.

	* CMakeLists.txt: CPACK_PACKAGE_VERSION_PATCH updated.

	* CHANGES: Updated.

	* packaging/debian/control: Updated dependencies.

2009-08-21  Matthew Mundell <matthew.mundell@greenbone.net>

	When processing the server input perform any task stop requests received
	in other processes.

	* src/omp.c (process_omp_client_input): Add note about writing whole
	commands to to_server.

	* src/manage.c (manage_check_current_task): New function.
	* src/manage.h (manage_check_current_task): New header.

	* src/otp.c (process_otp_server_input): Call manage_check_current_task
	initially.

2009-08-21  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (set_scan_attack_state): Remove duplicate argument.

	* src/manage.h (host_iterator_attack_state): New header.

	* src/otp.c (process_otp_server_input): In SERVER_STATUS_ATTACK_STATE add
	check that there is a current report.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_STATUS send the
	portscan progress as first 50% and test progress as second 50%.

2009-08-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/logf.h (logf): Turn off comm logging and log error if fflush fails,
	instead of aborting.

2009-08-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (task_run_status_name): Capitalise all words of run
	statuses.

	* src/tests/omp_delete_task_2.c, src/tests/omp_delete_task_0.c: Match
	new run statuses.

2009-08-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (make_result): Quote description for SQL.

2009-08-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (main): Shorten --foreground description.

	* README: Describe the cache updating option.  Update the usage message.

	* INSTALL: Increase library version.

2009-08-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_nvt_iterator): Add NVT arg.
	* src/manage.h (init_nvt_iterator): Add NVT arg.

	* src/manage.c (nvt_selector_plugins): Pass NVT to init_nvt_iterator.

	* src/omp.c (omp_xml_handle_end_element): Pass NVT to init_nvt_iterator.

2009-08-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (convert_to_newlines): New function.
	(omp_xml_handle_end_element): In CLIENT_GET_REPORT convert \n's in the
	XML result decriptions to real newlines.

2009-08-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (report_task): New function.
	* src/manage.h (report_task): New header.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_REPORT add report
	ID and task with ID and name to the XML	report.

2009-08-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/otp.c (process_otp_server_input): In SERVER_TIME_SCAN_START only
	set task properties if the task is in the requested state, as the task
	may also be in "stop requested" or "delete requested" states.

2009-08-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ovas-mngr-comm.c (connect_to_server): Get error message from
	getsockopt return instead of errno.

2009-08-20  Matthew Mundell <matthew.mundell@greenbone.net>

	Add a permanent NVT cache.

	* src/tasks_sql.h (sql_quote): Rename to sql_nquote.  Update callers.
	(sql_nquote, sql_quote, manage_has_nvts, nvts_size, nvts_md5sum)
	(set_nvts_md5sum, find_nvt, make_nvt_from_nvti)
	(init_nvt_iterator, nvt_iterator_oid, nvt_iterator_version)
	(nvt_iterator_name, nvt_iterator_summary, nvt_iterator_description)
	(nvt_iterator_copyright, nvt_iterator_cve, nvt_iterator_bid)
	(nvt_iterator_xref, nvt_iterator_tag, nvt_iterator_sign_key_ids)
	(nvt_iterator_category, nvt_iterator_family): New functions.
	(init_manage_process): Add clearing of NVT cache, controlled by param.
	(init_manage): Add meta and nvts tables.
	(nvt_family, nvt_selector_family_count, nvt_selector_nvt_count): Adjust
	for new NVT cache.

	* src/manage.h: Add new interfaces defined in tasks_sql.h.
	(server_t): Remove plugins.
	(nvt_t): New type.

	* src/manage.c (nvt_selector_plugins): Always return a list of all the
	plugins.
	(start_task): Expect all plugins as a list from nvt_selector_plugins.

	* src/omp.c (send_plugin): Switch to nvt iterator, rename send_nvt.
	(send_nvt): New function.
	(omp_xml_handle_end_element): In CLIENT_GET_NVT_ALL,
	CLIENT_GET_NVT_FEED_CHECKSUM and CLIENT_GET_NVT_DETAILS switch to new
	cache interface.
	(init_omp_process): Pass an update_nvt_cache flag through to
	init_manage_process.

	* src/otp.c (current_plugins): Remove.
	(init_otp_data): Remove server.plugins init.
	(parse_server_plugin_list_tags): Add nvti to database instead of to
	server.plugins.
	(process_otp_server_input): Remove current_plugins and server.plugins
	handling.  On receiving the final plugin from a plugin list, set the
	md5sum and return as though the server sent BYE.

	* src/ompd.c (ompd_nvt_cache_mode): New variable.
	(write_to_server): In "cache mode" request the plugin list, otherwise fall
	through to the "GO ON".
	(serve_omp): If the client_socket is -1 initiate "cache mode" and only do
	the server part of the service.

	* src/openvasmd.c (main): Add an update program option that causes the
	manager to run as a single process that simply calls serve_omp in "cache
	mode" to update the NVT cache.

	* src/logf.h (logf): Only log if log_stream is set.

2009-08-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (setup_full_config_prefs): New function.
	(init_manage): Setup SERVER_PREFS of Full config.

2009-08-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (send_config_preferences): Send newline after preference.
	(start_task): Check nvt_selector_plugins return for NULL.

2009-08-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_get_configs_3.c: Match config name to test.

2009-08-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h, src/omp.c, src/otp.c: Replace strncmp and
	strncasecmp with strcmp and strcasecmp in comparisons involving NULL
	terminated strings.

2009-08-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_start_task_3.c: New file.  Tests START_TASK with a task
	created with a target and a config.

	* src/tests/CMakeLists.txt: Add omp_start_task_3.

2009-08-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_modify_task_0.c, src/tests/omp_modify_task_1.c: Use a
	real RC so that CREATE_TASK succeeds.

2009-08-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_start_task_3.c: Remove, replaced by omp_create_task_0.
	* src/tests/omp_start_task_4.c: Remove, CREATE_TASK now prevents creation
	of such a task.

	* src/tests/CMakeLists.txt: Remove omp_start_task_3 and omp_start_task_4.

2009-08-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.c (wait_for_task_stop): Make the Done return the
	same as Stopped.  Add return -2, in case the task has been deleted.

	* src/tests/omp_abort_task_0.c: Only fail if wait_for_task_stop returns
	-1, as the server may do the pending removal during the wait.

2009-08-18  Matthew Mundell <matthew.mundell@greenbone.net>

	Address errors in last commit.

	* src/tasks_sql.h (set_task_target, set_task_config): New functions.
	(init_preference_iterator): Correct column name in SQL.
	* src/manage.h: Update headers.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_TASK set the
	task target and config when creating from an rcfile.

2009-08-18  Matthew Mundell <matthew.mundell@greenbone.net>

	Add targets and configs to CREATE_TASK.

	* src/ovas-mngr-comm.c (sendn_to_server, send_to_server): Make params
	const.
	* src/ovas-mngr-comm.h: Update headers.

	* src/tasks_sql.h (init_manage): Add config and target to tasks table.
	Setup a "Localhost" target.
	(task_config, task_target, target_hosts, append_to_task_config)
	(append_to_task_target, init_preference_iterator)
	(preference_iterator_name, preference_iterator_value)
	(config_nvt_selector): New functions
	(create_target, create_config): Add tracing to error cases.  Handle NULL
	comment.
	(insert_rc_into_config): Add tracing to error cases.
	(nvt_selector_nvt_count): Only check server.plugins for the growing case.

	* src/manage.c (task_preference): Remove.  Body moved to rc_preference.
	(task_plugins, send_task_preferences, send_task_rules): Remove.
	(rc_preference, nvt_selector_plugins, send_config_preferences)
	(send_config_rules): New functions.
	(start_task): Rework to send target, plugins, preferences and rules from
	the task's config and target.

	* src/manage.h: Update headers.

	* src/omp.c (client_state_t): Add new states.
	(omp_xml_handle_start_element, omp_xml_handle_text)
	(omp_xml_handle_end_element): Handle targets and configs in CREATE_TASK.

	* src/tests/omp_create_task_0.c, src/tests/omp_create_task_1.c: Adjust
	expected value.

	* src/tests/omp_create_task_2.c, src/tests/omp_create_task_3.c,
	src/tests/omp_create_task_4.c: New files.

	* src/tests/CMakeLists.txt: Add omp_create_task_2, omp_create_task_3
	and omp_create_task_4.

	* doc/db_postgres.sql (configs): Remove id field, to match manager.
	(tasks): Add target field.  Refer config to name in configs.

2009-08-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_create_target_0.c, src/tests/omp_create_target_1.c,
	src/tests/omp_get_targets_0.c, src/tests/omp_delete_target_0.c,
	ChangeLog: Switch to full email address.

2009-08-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/otp.c (rmdir_recursively): Close pwd after use.

2009-08-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/otp.c (parse_server_certificate_public_key): Add missing semicolon.

2009-08-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.c (connect_to_manager): Pass environment variables
	OPENVAS_TEST_HOST and OPENVAS_TEST_PORT as host and port if set.

2009-08-17  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/otp.c (parse_server_plugin_list_tags):
	Duplicate string only if needed, closed memleak, free gchar with g_free.
	Memleak found by cppcheck.

2009-08-17  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/otp.c (parse_server_certificate_public_key):
	Duplicate string only if needed, closed memleak, free gchar with g_free.
	Memleak found by cppcheck.

	* ChangeLog:
	Minor reformatting.

2009-08-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_modify_task_0.c, src/tests/omp_get_nvt_feed_checksum_1.c,
	src/tests/omp_get_nvt_details_4.c,
	src/tests/omp_get_nvt_feed_checksum_5.c, src/tests/omp_get_status_0.c,
	src/tests/omp_get_status_2.c, src/tests/omp_get_nvt_all_1.c,
	src/tests/omp_get_rules_1.c,
	src/tests/omp_get_nvt_details_1.c,
	src/tests/omp_get_nvt_feed_checksum_4.c, src/tests/omp_get_status_1.c,
	src/tests/omp_get_dependencies_1.c, src/tests/omp_abort_task_0.c: Either
	enable or remove the arbitrary mid-session re-authentications.

2009-08-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (cleanup): Add "Exiting" message.

2009-08-14  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (authenticate): Quote username for INSERT.

	* src/tests/omp_authenticate_0.c: New file.  Test with quote in name.

	* src/tests/CMakeLists.txt: Add omp_authenticate_0.

2009-08-14  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (authenticate): SELECT then INSERT instead of using
	"INSERT OR REPLACE", so that the ROWID stays the same.

2009-08-14  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_get_certificates_1.c: Expect the status in an attribute.

2009-08-14  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_get_nvt_feed_checksum_5.c: Correct expected status.

2009-08-14  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_get_preferences_1.c: Check response parts instead of
	comparing to an expected entity.

2009-08-14  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/read_protocol_0.c: Correct typo in heading.

2009-08-14  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_get_status_5.c: Add status_text and progress to
	expectations.

	* src/tests/omp_create_target_0.c, src/tests/omp_create_target_1.c,
	src/tests/omp_delete_target_0.c: Add status_text to expectations. Remove
	the target before starting.

	* src/tests/omp_get_dependencies_0.c: Add status_text to expectations.
	Correct return code.

	* src/tests/omp_start_task_0.c: Add status_text to expectations.  Remove
	second authentication.

	* src/tests/omp_abort_task_0.c, src/tests/omp_bogus_0.c,
	src/tests/omp_bogus_1.c, src/tests/omp_create_task_0.c,
	src/tests/omp_create_task_1.c, src/tests/omp_delete_report_0.c,
	src/tests/omp_delete_report_1.c, src/tests/omp_delete_task_0.c,
	src/tests/omp_delete_task_1.c, src/tests/omp_get_certificates_0.c,
	src/tests/omp_get_nvt_all_0.c, src/tests/omp_get_nvt_details_0.c,
	src/tests/omp_get_nvt_details_2.c, src/tests/omp_get_nvt_details_3.c,
	src/tests/omp_get_nvt_feed_checksum_0.c,
	src/tests/omp_get_nvt_feed_checksum_2.c,
	src/tests/omp_get_nvt_feed_checksum_3.c,
	src/tests/omp_get_preferences_0.c, src/tests/omp_get_report_1.c,
	src/tests/omp_get_report_2.c, src/tests/omp_get_report_3.c,
	src/tests/omp_get_rules_0.c, src/tests/omp_get_rules_1.c,
	src/tests/omp_get_version_0.c, src/tests/omp_help_0.c,
	src/tests/omp_help_1.c, src/tests/omp_modify_report_0.c,
	src/tests/omp_modify_task_0.c, src/tests/omp_modify_task_1.c,
	src/tests/omp_start_task_3.c, src/tests/omp_start_task_4.c: Add
	status_text to expectations.

2009-08-14  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (STATUS_INTERNAL_ERROR_TEXT): Make case more consistent.
	(omp_xml_handle_end_element): Remove status_text fullstop in
	CLIENT_GET_NVT_FEED_CHECKSUM.  In CLIENT_CREATE_TARGET improve "name and
	hosts" status_text and convert the create_target response to a syntax
	error.  In CLIENT_START_TASK manually send the response, as
	send_find_error_to_client adds quotation marks.

2009-08-14  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ompd.c (write_to_server): In SERVER_INIT_GOT_PLUGINS also request
	certificates.

2009-08-14  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_NVT_DETAILS
	free current_uuid.

2009-08-14  Matthew Mundell <matthew.mundell@greenbone.net>

	Add more specific status_text attributes for "resource missing"	(404)
	errors.

	* src/manage.c (start_task): Return -3 if create_report fails.

	* src/omp.c (send_find_error_to_client): New function.
	(omp_xml_handle_end_element): Use send_find_error_to_client for resource
	missing errors.  Convert CLIENT_GET_NVT_FEED_CHECKSUM algorithm error
	to syntax error.  Convert report generation and missing XSL file errors
	to internal errors.  Handle new start_task error.

2009-08-14  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_STATUS rename
	the per host PROGRESS element to HOST_PROGRESS.

2009-08-14  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* src/openvasmd_log_conf.cmake,
	src/openvasmd_cong_conf.cmake_in:
	Renamed file to not create confusion, as its not a file generated by
	cmake.

	* CMakeLists.txt:
	Reverted exclude list, as filename of the critical file was changed.

	* src/CMakeLists.txt:
	Updated reference to changed filename.

2009-08-14  Felix Wolfsteller <felix.wolfsteller@greenbone.net>

	* CMakeLists.txt:
	Increased Project version number.
	Changed the CPACK_SOURCE_IGNORE_FILES with the aim to not exclude
	openvasmd_log_conf.cmake (pre-commit *cmake was excluded) when building
	a (release) tar-ball.

2009-08-14  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_manage): Make name in table users UNIQUE.
	(authenticate): Always fail for user "om".  On success ensure that the
	username is in the users table.

2009-08-14  Matthew Mundell <matthew.mundell@greenbone.net>

	Adjust OMP behaviour to always respond to the authentication XML.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_AUTHENTICATE add
	responses to the success cases.

	* src/tests/common.c (authenticate): Read and check response.

2009-08-14  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tracef.h (tracef): Add format string to g_log call.

2009-08-13  Matthew Mundell <matthew.mundell@greenbone.net>

	Add generic description of status code to each response.  For "syntax
	error" (400) add a specific description for each type of error, instead of
	a generic description.

	* src/omp.c (STATUS_ERROR_MUST_AUTH_TEXT, STATUS_ERROR_MISSING_TEXT)
	(STATUS_ERROR_AUTH_FAILED_TEXT, STATUS_OK_TEXT, STATUS_OK_CREATED_TEXT)
	(STATUS_OK_REQUESTED_TEXT, STATUS_INTERNAL_ERROR_TEXT)
	(STATUS_SERVICE_DOWN_TEXT): New defines.
	(send_element_error_to_client): New function.
	(XML_ERROR_SYNTAX): Add text param for status_text.  Pass in all callers.
	(XML_ERROR_MISSING, XML_ERROR_AUTH_FAILED, XML_OK, XML_OK_CREATED)
	(XML_OK_REQUESTED, XML_INTERNAL_ERROR, XML_SERVICE_DOWN): Add static
	status_text attribute.
	(omp_xml_handle_end_element): In CLIENT_MODIFY_TASK almost always
	respond with internal error when set_task_parameter fails.

	* src/tasks_sql.h (set_task_parameter): Cleanup doc.

2009-08-12  Matthew Mundell <matthew.mundell@greenbone.net>

	Add comments to configs.

	* src/tasks_sql.h (init_manage): Add comment column to targets configs.
	Init comment in "Full" config.
	(create_config): Add comment param.
	(config_iterator_comment): New function.
	* src/manage.h: Update headers.

	* src/omp.c (client_state_t): Add comment state.
	(omp_xml_handle_start_element, omp_xml_handle_text)
	(omp_xml_handle_end_element): Handle config comments.

	* src/tests/common.c (omp_create_config, omp_create_config_from_rc_file):
	Add comment param.
	* src/tests/common.h: Update headers.

	* src/tests/omp_create_config_0.c, src/tests/omp_create_config_1.c,
	src/tests/omp_get_configs_0.c, src/tests/omp_get_configs_1.c,
	src/tests/omp_get_configs_2.c, src/tests/omp_get_configs_3.c,
	src/tests/omp_delete_config_0.c: Add comments and comment checks.

2009-08-12  Matthew Mundell <matthew.mundell@greenbone.net>

	Add comments to targets.

	* src/tasks_sql.h (init_manage): Add comment column to targets table.
	(create_target): Add comment param.
	(target_iterator_comment): New function.
	* src/manage.h: Update headers.

	* src/omp.c (client_state_t): Add comment state.
	(omp_xml_handle_start_element, omp_xml_handle_text)
	(omp_xml_handle_end_element): Handle target comments.

	* src/tests/common.c (omp_create_target): Add comment param.
	* src/tests/common.h: Update header.

	* src/tests/omp_get_targets_0.c: Add comment to first target.

2009-08-12  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/new_task_small_rc: Add 1.3.6.1.4.1.25623.1.0.10330 to
	scanner set.  Add a second host.  Set port_range to default.

2009-08-12  Matthew Mundell <matthew.mundell@greenbone.net>

	Add real OMP GET_CONFIGS family counts for static selectors.

	* src/tasks_sql.h (NVT_SELECTOR_TYPE_ALL, NVT_SELECTOR_TYPE_FAMILY)
	(NVT_SELECTOR_TYPE_NVT): New defines.  Use instead of numbers in
	callers.
	(nvt_selector_iterator_nvt, nvt_family): New functions.
	(nvt_selector_family_count): Add counting for static selector.

	* src/tests/omp_get_configs_3.c: Add family count check.

2009-08-12  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (latex_severity_colour): Add "Debug Message" and "Log
	Message".  Return "{openvas_text}" on fail.
	(latex_header): Add colours openvas_text, openvas_debug and
	openvas_log.

2009-08-12  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (insert_rc_into_config): Leave trailing paren off
	section name.

2009-08-12  Matthew Mundell <matthew.mundell@greenbone.net>

	* README: Cleanup and elaborate sample test invocation.

	* INSTALL: Add sqlfairy dependency.  Try improve the configure
	description.

2009-08-12  Laban Mwangi <lmwangi@penguinlabs.co.ke>

	* README: Added a sample invocation for tests
	* INSTALL: Instructions for custom prefix openvas installs

2009-08-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (delete_report): Remove transaction, as
	delete_reports calls delete_report inside an iterator.

2009-08-11  Matthew Mundell <matthew.mundell@greenbone.net>

	Add real OMP GET_CONFIGS count figures for static selectors.

	* src/tasks_sql.h (init_nvt_selector_iterator)
	(nvt_selector_iterator_include): New functions.
	(nvt_selector_nvt_count): Add static selector counting.

	* src/tests/CMakeLists.txt: Add omp_get_configs_3.

	* src/tests/omp_get_configs_3.c: New file.

2009-08-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/tasks_sql.h (delete_report, create_target, delete_config):
	Wrap SQL statements in transactions.

2009-08-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_get_configs_0.c,
	src/tests/omp_get_configs_1.c: Add checks of growing values.

2009-08-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_start_task_3.c: Correct expected status.

2009-08-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (start_task): Add trace to fail case.

2009-08-11  Matthew Mundell <matthew.mundell@greenbone.net>

	Convert GET_CONFIGS RC NVTs to an NVT selector.

	* src/tasks_sql.h (config_preference, clude): New functions.
	(insert_rc_into_config): Buffer NVT ids in array and convert to selector
	before returning.
	(create_config): Drop const restriction on param rc.  Wrap the database
	calls in a transaction.
	* src/manage.h: Update header.

2009-08-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tracef.h (tracef): Convert the message to UTF-8 before logging.

2009-08-10  Matthew Mundell <matthew.mundell@greenbone.net>

	Add real OMP GET_CONFIGS count figures for the all selector case.

	* src/tasks_sql.h (nvt_selector_families_growing)
	(nvt_selector_nvts_growing): Add docs.
	(nvt_selector_family_count, nvt_selector_nvt_count): New functions.

	* src/manage.c (server_t): Move here from otp.c.
	* src/otp.c (server): Move to manage.c.
	* src/otp.h (server_t, server): Move to manage.h.

	* src/manage.h (nvt_selector_family_count, nvt_selector_nvt_count)
	(server_t, server): New headers.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_CONFIGS add
	some real count figures.

	* src/tests/CMakeLists.txt: Add omp_get_configs_2.
	(make_report_uuid_0): Pass OpenVAS headers to compiler.

	* src/tests/omp_get_configs_2.c: New file.

2009-08-10  Matthew Mundell <matthew.mundell@greenbone.net>

	Add real OMP GET_CONFIGS growing figures.

	* src/tasks_sql.h (init_manage): Note selector types.
	(nvt_selector_families_growing, nvt_selector_nvts_growing): New functions.
	* src/manage.h: Add headers.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_CONFIGS add
	real growing figures.

2009-08-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_get_targets_0.c: Compare strcmps to 0.  Correct return.

2009-08-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (task_plugins, send_task_preferences)
	(send_task_rules): Only consider "begin(..." lines that are newline
	terminated.

2009-08-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (insert_rc_into_config): Include the scanners in the
	nvt selector list.  Remove quotes from an SQL integer value.

2009-08-07  Matthew Mundell <matthew.mundell@greenbone.net>

	Add OMP CREATE_CONFIG, DELETE_CONFIG and GET_CONFIGS commands.

	* doc/db_postgres.sql (config_preferences, configs): New tables.
	(tasks): Replace nvt_selector and rcfile field with config field.
	(nvt_selectors): Remove rowid and id.  Rename details family_or_nvt.

	* src/tasks_sql.h (config_t): New type.
	(init_manage): Add nvt_selectors, configs and config_preferences tables.
	Setup predefined selectors and configs.
	(init_table_iterator): Add table arg.
	(init_target_iterator): Pass table name to init_target_iterator.
	(insert_rc_into_config, create_config, delete_config)
	(init_config_iterator, config_iterator_name)
	(config_iterator_nvt_selector): New functions.
	* src/manage.h: Update headers.

	* src/omp.c (help_text): Add config commands.
	(client_state_t): Add config states.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Add config command handling.

	* src/common.c (first_entity): Add NULL guard.
	(create_config, omp_create_config_from_rc_file, omp_delete_config): New
	functions.
	* src/common.h: Update headers.

	* src/tests/omp_create_config_0.c, src/tests/omp_create_config_1.c,
	src/tests/omp_delete_config_0.c, src/tests/omp_get_configs_0.c,
	src/tests/omp_get_configs_1.c: New files.

	* src/tests/CMakeLists.txt: Add omp_create_config_0, omp_create_config_1,
	omp_delete_config_0, omp_get_configs_0 and omp_get_configs_1.

	* src/tests/omp_help_0.c: Add config commands to expected help text.

2009-08-06  Matthew Mundell <matthew.mundell@greenbone.net>

	Add OMP CREATE_TARGET, DELETE_TARGET and GET_TARGETS.

	* doc/db_postgres.sql: Add targets table.

	* src/tasks_sql (init_manage): Add targets table.
	(DEF_ACCESS): Take the full name of the function.  Update callers.
	(create_target, delete_target, init_table_iterator, init_target_iterator)
	(target_iterator_name, target_iterator_hosts): New functions.
	* src/manage.h: Update headers.

	* src/omp.c (help_text): Add target commands.
	(client_state_t): Add target states.
	(XML_OK_CREATED): New macro.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Add target command handling.

	* src/common.c (first_entity): Add NULL guard.
	(omp_create_target, omp_delete_target): New functions.
	* src/common.h: Update headers.

	* src/tests/omp_create_target_0.c, src/tests/omp_create_target_1.c,
	src/tests/omp_delete_target_0.c, src/tests/omp_get_targets_0.c: New files.

	* src/tests/CMakeLists.txt: Add omp_create_target_0, omp_create_target_1,
	omp_delete_target_0 and omp_get_targets_0.

	* src/tests/omp_help_0.c: Add target commands to expected help text.

2009-08-06  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_get_report_5.c: Match task name to test.

2009-08-06  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.c (next_entities): Add NULL guard.

2009-08-05  Matthew Mundell <matthew.mundell@greenbone.net>

	Extend PROGRESS in GET_STATUS to include per-host progress percentages.

	* src/tasks_sql.h (init_manage): Move attack_state, current_port and
	max_port from tasks table to report_hosts table
	(task_running_report, host_iterator_attack_state)
	(host_iterator_current_port, host_iterator_max_port)
	(set_scan_attack_state, set_scan_ports): New functions.
	(task_attack_state, set_task_attack_state, task_current_port)
	(task_max_port, set_task_ports): Remove.
	(reset_task): Remove moved fields from SQL.
	* src/manage.h: Update headers.

	* src/otp.c (process_otp_server_input): In SERVER_STATUS_ATTACK_STATE set
	the attack state of the host scan instead of the task.  In
	SERVER_STATUS_HOST set current_host.  In SERVER_STATUS_PORTS set scan
	ports instead of task ports.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_STATUS add
	per-host progresses to PROGRESS.

2009-07-31  Matthew Mundell <matthew.mundell@greenbone.net>

	Improve the LaTeX PDF report.

	* src/tasks_sql.h (report_holes, report_notes, report_warnings): New
	functions.
	(init_result_iterator): Add a host argument to limit the results to a
	particular host.  Update callers.
	* src/manage.h: Update headers.

	* src/omp.c (latex_escape_text): Replace body with working implementation.
	(latex_severity_heading, latex_severity_colour): New functions.
	(latex_header): Define colours.  Refine settings.  Add title.
	(latex_footer): Center.  Add spacing.
	(print_report_latex): Move summary to abstract.  Use defined colours.
	Add totals.  Fill in the "Most Severe Result(s)" column.  Use sections
	with numbering.  Improve links.  Init result iterator with host.
	Add the "[ return to host ]" link.  Colour issue headings according to
	severity.
	(omp_xml_handle_end_element): In CLIENT_GET_REPORT remove "xml" from latex
	file name and run pdflatex twice to ensure that references are correct.

2009-07-30  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (latex_escape_text, print_report_latex): New functions.
	(latex_header, latex_footer): New variables.
	(omp_xml_handle_end_element): Add a second rough PDF generator to
	CLIENT_GET_REPORT.  This one produces the PDF via LaTeX instead of via
	HTML via XSL via XML.

2009-07-30  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd_report_html.xsl: Lay the report out more like the
	client PDF report.

2009-07-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/common.c (read_entity_and_text): New function.  Body from
	read_entity.
	(read_entity): Replace body with call to read_entity_and_text.
	* src/common.h (read_entity_and_text): New header.

2009-07-28  Matthew Mundell <matthew.mundell@greenbone.net>

	Add rough initial HTML and PDF report generation.

	* src/omp.c (print_report_xml): New function.
	(omp_xml_handle_end_element): Add HTML and PDF format handling to
	GET_REPORT.

	* src/openvasmd_report_html.xsl: New file.  Stylesheet for HTML report.

	* src/CMakeLists.txt: Install openvasmd_report_html.xsl.

	* src/tests/omp_get_report_6.c, src/tests/omp_get_report_7.c: New files.

	* src/tests/CMakeLists.txt: Add omp_get_report_6 and omp_get_report_7.

2009-07-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd_log_conf.cmake: Remove quotes from "prepend" key.

2009-07-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_get_report_0.c, src/tests/omp_get_report_1.c,
	src/tests/omp_delete_report_0.c, src/tests/omp_get_report_4.c,
	src/tests/omp_delete_task_1.c, src/tests/omp_get_report_2.c,
	src/tests/omp_get_report_3.c: Add format to GET_REPORT XML.

2009-07-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (task_run_status_name): Add TASK_STATUS_STOPPED.

	* src/tests/common.c (wait_for_task_stop): New function.
	(wait_for_task_end): Also check for "Stopped".
	* src/tests/common.h (wait_for_task_stop): New header.

	* src/tests/omp_abort_task_0.c: Wait for the task to stop after reading
	the ABORT_TASK response.

2009-07-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.c (omp_get_report): Add format to GET_REPORT XML.

2009-07-24  Matthew Mundell <matthew.mundell@greenbone.net>

	Add handling of the GET_REPORT FORMAT attribute.  Add a simple XML format.

	* src/omp.c (current_format): New variable.
	(omp_xml_handle_start_element): Handle GET_REPORT FORMAT attribute.
	(SENDF_TO_CLIENT_OR_FAIL): Send with g_markup_printf_escaped.
	(omp_xml_handle_end_element): In CLIENT_GET_REPORT check which format was
	requested.  Add a simple initial XML format.

	* src/tests/CMakeLists.txt: Add omp_get_report_5.

	* src/tests/omp_get_report_5.c: New file.  Tests requesting an XML report.

2009-07-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.h (new_report): Rename to current_report.
	(current_report): New variable, was new_report.

	* src/tasks_sql.h, src/otp.c, src/manage.c: Rename new_report to
	current_report.

2009-07-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/otp.c (process_otp_server_input): In SERVER_TIME_SCAN_END always
	clear current_server_task when current_server_task is set.

2009-07-24  Matthew Mundell <matthew.mundell@greenbone.net>

	Add a SECOND_LAST_REPORT element to the GET_STATUS response.

	* src/tasks_sql.h (task_second_last_report_id): New function.

	* src/manage.h (task_second_last_report_id): New header.

	* src/omp.c (omp_xml_handle_end_element): Add SECOND_LAST_REPORT in
	CLIENT_GET_STATUS.

2009-07-23  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/proto_postgres.sql: Use date types for dates.
	(results): Add subnet and nvt fields.
	(reports): Add date field.

2009-07-23  Matthew Mundell <matthew.mundell@greenbone.net>

	Match the db model better to the state of the manager.

	* doc/db_postgres.sql (nvt_selectors, results, report_hosts)
	(report_results): New tables.
	(tasks): Add reference to nvt_selector.
	(reports): Add date, start_time, end_time.

2009-07-23  Matthew Mundell <matthew.mundell@greenbone.net>

	Store the reports in the database instead of on the file system.

	* src/manage.c (create_task_report, delete_task_report)
	(report_path_task_uuid, report_task, current_report, current_report_name)
	(create_report_file): Remove.
	(task_last_report_id, report_counts, report_timestamp, delete_report)
	(set_report_parameter): Remove, to manage.c.
	(delete_reports): Drop file system handling.  Use iterator to delete
	reports.
	(start_task): Call create_report instead of create_report_file.

	* src/manage.h: Update headers.
	(result_t, report_t, iterator_t): New types.

	* src/tasks_sql.h (sql_string): Return NULL on error.
	(init_manage): Create results, report_hosts and report_results tables.
	Remove some caching fields from tasks table.  Add date, start_time and
	end_time to reports table.
	(task_last_report_id, report_counts, report_timestamp, delete_report): New
	functions, from manage.c.  Convert to db equivalents.
	(cleanup_iterator, next, make_result, make_report, create_report)
	(report_uuid, report_add_result, init_report_iterator, next_report)
	(init_result_iterator, result_iterator_subnet, result_iterator_host)
	(result_iterator_port, result_iterator_nvt, result_iterator_type)
	(result_iterator_descr, init_host_iterator, host_iterator_host)
	(host_iterator_start_time, host_iterator_end_time, scan_start_time)
	(set_scan_start_time, scan_end_time, set_scan_end_time)
	(set_scan_host_end_time, set_scan_host_start_time, find_report): New
	functions.
	(create_task_report, delete_task_report, inc_task_debugs_size)
	(inc_task_holes_size, inc_task_infos_size, inc_task_logs_size)
	(inc_task_notes_size, inc_task_report_count)
	(dec_task_report_count): Remove.
	(task_report_count, task_debugs_size, task_holes_size, task_infos_size)
	(task_logs_size, task_notes_size): Use SQL "count" instead of a cache
	field.
	(delete_task): Remove file deleting.  Also delete from results table.
	(reset_task): Remove cache fields.

	* src/omp.c (send_reports): Loop with report iterator.
	(omp_xml_handle_end_element): Adjust CLIENT_DELETE_REPORT for new
	delete_report interface.  Rework CLIENT_GET_REPORT to reduce indentation,
	building the nbe from the results table.  Adjust CLIENT_MODIFY_REPORT for
	new	set_report_parameter interface.  In CLIENT_GET_STATUS pass task to
	task_last_report_id instead of passing uuid, free timestamp and add
	missing	cleanup_task_iterator calls.

	* src/otp.c (write_message): Call make_result instead of writing to
	stream.
	(write_timestamp, save_report, append_timestamp): Remove.
	(append_debug_message, append_hole_message, append_info_message)
	(append_log_message, append_note_message):  Drop current report checks and
	cache incrementing.
	(process_otp_server_input): Replace append_timestamp calls with calls to
	libmanage scan time setters.  In TASK_STATUS_DELETE_REQUESTED and
	SERVER_TIME_SCAN_END remove report file handling and initialise
	new_report.

	* src/tests/CMakeLists.txt: Remove report_path_task_uuid_0,
	report_path_task_uuid_1 and report_path_task_uuid_2.

	* src/tests/report_path_task_uuid_0.c,
	src/tests/report_path_task_uuid_1.c,
	src/tests/report_path_task_uuid_2.c: Remove.

2009-07-23  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/string.c (isbase64): New function.
	* src/string.h (isbase64): New header.

	* src/tests/omp_get_report_0.c: Check that the report is all base64
	characters instead of all alphanumeric characters.

2009-07-22  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_fs.h: Remove.

2009-07-22  Matthew Mundell <matthew.mundell@greenbone.net>

	Retire file system based task storage (-DTASKS_FS).

	* doc/Doxyfile, doc/Doxyfile_full (INPUT): Remove tasks_fs.h

	* doc/CMakeLists.txt (DOC_FILES): Remove tasks_fs.h.

	* src/manage.h: Remove TASKS_FS alternative.

	* src/manage.c: Remove tasks_fs.h include.

	* src/tests/CMakeLists.txt: Add -DTASKS_SQL to definitions.

	* src/openvasmd.c (\mainpage): Remove tasks_fs.h reference.

	* src/CMakeLists.txt: Remove TASKS_FS comments.
	(C_FILES): Remove tasks_fs.h.

2009-07-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/proto_postgres.sql (meta): Type nvts_md5sum.

2009-07-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/proto_postgres.sql: New file.  Broad database prototype.

2009-07-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (main): Set log handlers for comm and otp domains.

2009-07-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd_log_conf.cmake: Add comm section.

2009-07-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (G_LOG_DOMAIN): Correct name.

2009-07-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c, src/otp.c, src/otpd.c, src/oxpd.c: Remove stray full stops
	from log messages.

2009-07-20  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch to GLib facilities for all remaining logging.

	* src/openvasmd_log_conf.cmake: Rename domains.  Add domains for libs.
	Add time formats.

	* src/tracef.h (G_LOG_DOMAIN, ALL_LOG_LEVELS): New defs.
	(tracef): Pass G_LOG_DOMAIN as g_log domain.

	* src/openvasmd.c: Convert perrors and printfs to glib calls.
	(main): Set log handlers.

	* src/ompd.c: Convert perrors and printfs to glib calls.
	(init_ompd): Pass log config through to init_omp.
	* src/ompd.h: Update header.

	* src/otpd.c, src/oxpd.c: Convert perrors and printfs to glib calls.

	* src/omp.c: Convert printfs to glib calls.
	(G_LOG_DOMAIN): New def.
	(init_omp): Pass log config through to init_manage.  Set log handler.
	* src/omp.h: Update header.

	* src/ovas-mngr-comm.c, src/otp.c: Convert perrors and printfs to glib calls.
	(G_LOG_DOMAIN): New def.

	* src/string.c (G_LOG_DOMAIN): New def.

	* src/file.c (G_LOG_DOMAIN): Update.

	* src/manage.c: Convert printfs to glib calls.
	(G_LOG_DOMAIN): New def.
	* src/manage.h: Update header.

	* src/tasks_sql.h: Convert perrors and printfs to glib calls.
	(next_task): Reduce tracing.
	(init_manage): Set log handler.

2009-07-17  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch trace messages to the openvas_libraries logging facility.

	* src/openvasmd.c (cleanup): Free log config.
	(main): Setup logging.

	* src/tracef.h (tracef): Log with g_log.
	(log_config): New def.

	* src/ovas-mngr-comm.c (log_config): New variable.

	* CMakeLists.txt (OPENVAS_SYSCONF_DIR): New variable.

	* src/openvasmd_log_conf.cmake: New file.

	* src/CMakeLists.txt: Setup OPENVAS_SYSCONF_DIR.  Configure and install
	openvasmd_log.conf.

2009-07-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.c (init_manage): Insert the "om" user if the users
	table is empty.

2009-07-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.c (init_manage): Remove sqlite3_finalize that was for
	the table-per-user model.

2009-07-16  Matthew Mundell <matthew.mundell@greenbone.net>

	Add a users table to the database.  Share one tasks table and one
	reports table between all users.

	* src/tasks_sql.c: Adjust all SQL queries to access the shared task or
	report table, instead of a per-user table.
	(init_task_iterator): If the credentials are set then iterate over that
	user's tasks, otherwise iterate over all tasks.
	(init_manage): Move table creation here from authenticate.  Create users
	table.  Adjust the task consistency check for the new single table.
	(authenticate): Move table creation to init_manage.

2009-07-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (serve_client): Leave the lowat value alone.

2009-07-15  Matthew Mundell <matthew.mundell@greenbone.net>

	Add a reports table to the database.

	* src/tasks_sql.h (init_manage): Only run task checks on tasks tables.
	(authenticate): Create reports table.
	(create_task_report, delete_task_report): New functions.

	* src/manage.c (delete_report): Call the database report deleter.
	(create_report_file): Call the database report creator.

2009-07-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/read_protocol_0.c: Increase sleep.  Remove extra read from
	fail case.

2009-07-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (delete_report): Remove the last report link.

2009-07-14  Matthew Mundell <matthew.mundell@greenbone.net>

	Correct the handling of the case where the initial OMP XML elements	are
	shorter	than the OTP init string.

	* src/oxpd.c (read_protocol): Update the comment about how much is read.
	Convert some direct returns to break out of the main loop instead.  Break
	out of the loop at the first '>'.

	* src/ompd.c (serve_omp): Add back handling of initial client input, as
	read_protocol may well read in a full OMP command.

	* src/tests/omp_help_1.c: New file.  Tests HELP before authenticating.

	* src/tests/CMakeLists.txt: Add omp_help_1.

2009-07-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ovas-mngr-comm.c (end_session): Remove full stop from perror string.

2009-07-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ompd.c (recreate_session): Remove close, which is done in
	end_session.

2009-07-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (sql, sql_x, init_task_iterator, init_manage): Handle
	SQLITE_BUSY returns from sqlite3_prepare.

2009-07-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* TODO: Remove the lazy login entry which is done.  Add an entry about
	atomicity of CREATE_TASK.  Correct a typo.

2009-07-10  Matthew Mundell <matthew.mundell@greenbone.net>

	Add a Manager database model.

	* src/doc/CMakeLists.txt (db.png, .built-html_db): New rules.
	(SQLT_EXECUTABLE, SQLT-DIAGRAM_EXECUTABLE): New vars.

	* src/doc/db_postgres.sql: New file.

2009-07-08  Matthew Mundell <matthew.mundell@greenbone.net>

	Store the original port strings in messages, and use these strings in the
	reports.

	* src/manage.c (port_t): Add string.

	* src/otp.c (port_t): Add string.
	(PARSE_PORTS): New conditional define.
	(make_message): Init port string.
	(free_message): Free port string.
	(set_message_port_string): New function.
	(write_message): Write port from original string.
	(process_otp_server_input): Set port string on receiving message.

2009-07-08  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/otp.c (process_otp_server_input): Move settings of SERVER_DONE
	in SERVER_PLUGIN_LIST_OID back to precede switch (moved into switch in
	previous commit today).

2009-07-08  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_get_report_3.c, src/tests/omp_get_report_2.c,
	src/tests/omp_get_report_1.c, src/tests/omp_get_report_0.c: Correct
	header comments.

2009-07-08  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (send_task_preferences): Send less of the whitespace around
	the fields.

2009-07-08  Matthew Mundell <matthew.mundell@greenbone.net>

	Extend the initialisation mechanism, so that client-driven OTP begins
	after the server sends the plugin list.

	* src/otp.h (server_init_state_t): Add new states.

	* src/ompd.c (write_to_server): Handle SERVER_INIT_GOT_MD5SUM and
	SERVER_INIT_GOT_PLUGINS, by replying with the next OTP step.
	(serve_omp): Account for new init states when preparing for select.

	* src/otp.c (process_otp_server_input): Add
	SERVER_INIT_SENT_COMPLETE_LIST and SERVER_INIT_SENT_PASSWORD to the	done
	init state case.  In SERVER_PLUGIN_LIST_OID and SERVER_PLUGINS_MD5 set a
	further init state instead of replying to the server directly.

2009-07-08  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/otpd.c (serve_otp): Add sender to log messages.  Remove logging of
	first input, which is done by read_protocol now.

2009-07-08  Matthew Mundell <matthew.mundell@greenbone.net>

	Add logging of data sent to server.  Include sender in all log messages.

	* src/ovas-mngr-comm.c: Include logf.h.
	(write_string_to_server, write_to_server_buffer): Log writes.

	* src/ompd.c (write_to_client, serve_omp): Add sender to log messages.

	* src/oxpd.c (read_protocol): Add sender to log messages.

	* src/tests/report_path_task_uuid_0.c,
	src/tests/report_path_task_uuid_1.c, src/tests/report_path_task_uuid_2.c,
	src/tests/make_report_id_0.c, src/tests/common.c (log_stream): New
	variable.

2009-07-07  Matthew Mundell <matthew.mundell@greenbone.net>

	Use the actual host name for results in reports.

	* src/manage.h (message_t): Add subnet and host.

	* src/otp.c (message_t): Add subnet and host.
	(make_message): Take host instead of port info.
	(free_message): Free host and subnet.
	(set_message_port_number, set_message_port_protocol): New functions.
	(write_message): Write host and subnet from message structure.
	(process_otp_server_input): Add message host handling.

2009-07-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/otp.c (current_host): New variable.
	(process_otp_server_input): Use the actual host name for host timestamps.

2009-07-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (inc_task_infos_size): Increment infos instead of
	holes.

2009-07-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (set_task_end_time, set_task_start_time): Free time.

2009-07-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (create_report_file): Initialise cache files.

2009-07-07  Matthew Mundell <matthew.mundell@greenbone.net>

	Add actual timestamps to GET_STATUS.

	* src/otp.c (save_report): Save timestamp to a cache file.
	(process_otp_server_input): Set task start and end times after SCAN_START
	and SCAN_END instead of HOST_START and HOST_END.

	* src/manage.c (report_timestamp): New function.
	* src/manage.h (report_timestamp): New header.

	* src/omp.c (send_reports, omp_xml_handle_end_element): Add counts to
	GET_STATUS <timestamp>.

2009-07-07  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/otp.c (save_report): Correct file name.

2009-07-06  Matthew Mundell <matthew.mundell@greenbone.net>

	Add actual message counts to GET_STATUS.

	* src/otp.c (save_report): Save message counts to a cache file.

	* src/manage.c (report_counts): New function.
	* src/manage.h (report_counts): New header.

	* src/omp.c (send_reports, omp_xml_handle_end_element): Add counts to
	GET_STATUS <messages>.

2009-07-06  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (send_reports, omp_xml_handle_end_element): Ensure all
	GET_STATUS cases include <warning> in <messages>.

2009-07-06  Matthew Mundell <matthew.mundell@greenbone.net>

	Reset task running information before starting the task.

	* src/tasks_sql.h (reset_task): New function.
	* src/manage.h (reset_task): New header.

	* src/manage.c (start_task): Call reset_task before starting the task.

2009-07-06  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_get_report_4.c: New file.  Tests GET_REPORT with extra
	elements.

	* src/tests/CMakeLists.txt (omp_get_report_4): New test.

2009-07-06  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_start_element): In CLIENT_GET_REPORT remove
	"_response", which is added by XML_ERROR_SYNTAX.

2009-07-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ompd.c (serve_omp): Only setup the client in the fd sets when the
	client is active.  As a result move the first timeout check to precede
	the setup of the client socket in the fd sets, in case the timeout check
	closes the client socket.  Also, only pass select a timeout when the
	client is active, and only do the second timeout check when the client is
	active.

2009-07-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* CMakeLists.txt (CMAKE_BUILD_TYPE): Set to debug.

2009-07-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/oxpd.h (READ_PROTOCOL_TIMEOUT): Increase.

2009-07-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.c (connect_to_manager_host_port): After connecting,
	if the environment variable OPENVAS_TEST_WAIT is true, then read a char
	before continuing.

2009-07-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (sql_quote): Increment start in quote counting loop.

	* src/tests/new_task_small_rc (SERVER_PREFS): Add some fields with quotes.

2009-07-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_start_task_4.c: New file.  Tests START_TASK with missing
	rcfile.

	* src/tests/CMakeLists.txt: Add omp_start_task_4.

2009-07-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): Check task_description return.

	* src/manage.c (task_preference, task_plugins, send_task_preferences)
	(send_task_rules): Check task_description return.

2009-07-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ompd.c (serve_omp): Only select on client for exceptions when
	client is active.

2009-07-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ompd.c (serve_omp): Improve the "safe to select" comment a bit.

2009-07-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/oxpd.c (read_protocol): Log what is read.

2009-07-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (send_plugin): Send a dummy checksum.

2009-07-02  Matthew Mundell <matthew.mundell@greenbone.net>

	Before starting a task, check that the task has targets.

	* src/manage.c (start_task): Check for targets in the task definition.

	* src/omp.c (omp_xml_handle_end_element): Send ERROR_MISSING if the task
	is missing targets.

	* src/tests/omp_start_task_3.c,
	src/tests/new_task_small__missing_targets_rc: New files.

	* src/tests/CMakeLists.txt: Add omp_start_task_3.

2009-07-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/oxpd.c (read_protocol): Read as much as possible at a time up to
	the length of the OTP protocol string, in case the client presumes that
	what it has written has been entirely read.

2009-07-01  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): Account for 0 current_port in
	GET_STATUS progress calculation.

2009-07-01  Matthew Mundell <matthew.mundell@greenbone.net>

	Add a PROGRESS element to the GET_STATUS response.

	* src/manage.c (task_last_report_id): Remove old comment.
	* src/tasks_sql.h (task_current_port, task_max_port): New functions.
	* src/manage.h: Update headers.

	* src/omp.c (omp_xml_handle_end_element): Add PROGRESS to GET_STATUS.

2009-07-01  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In GET_STATUS only print a
	LAST_REPORT if there is a last report.

2009-06-30  Matthew Mundell <matthew.mundell@greenbone.net>

	Add a LAST_REPORT element to the GET_STATUS response.

	* src/manage.c (task_last_report_id): New function.
	(current_report_name): New variable.
	(create_report_file): Store report name in current_report_name.
	* src/manage.h: Update headers.

	* src/otp.c (save_report): Adjust or create symlink to the current report.
	(process_otp_server_input): Free current_report_name if save_report fails.

	* src/omp.c (omp_xml_handle_end_element): Add LAST_REPORT to GET_STATUS.

2009-06-30  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (send_to_client): Trace when out of space.

2009-06-30  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): Add report_count to
	the plural GET_STATUS response.

2009-06-29  Matthew Mundell <matthew.mundell@greenbone.net>

	(start_task): Use send_to_server instead of sendf_to_server for constant
	string.

2009-06-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (request_plugin_list): Remove.
	(acknowledge_md5sum_sums, acknowledge_md5sum_info)
	(acknowledge_md5sum): New functions.
	* src/manage.h: Update headers.

	* src/otp.c (process_otp_server_input): Request the plugin list on
	getting the feed md5.  Acknowledge the md5sum (GO ON) after receiving the
	plugin list.

2009-06-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): Remove attempts at initiating
	connections in XML_SERVICE_DOWN cases, now that serve_omp connects
	eagerly.

2009-06-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_MODIFY_TASK respond
	with XML_OK instead of XML_OK_REQUESTED.

2009-06-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_start_element): In CLIENT_CREATE_TASK
	initialise the task description.
	(omp_xml_handle_end_element): In CLIENT_CREATE_TASK_RCFILE check the
	return from g_base64_decode.

2009-06-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ompd.c (serve_omp): Eagerly initiate the OTP server connection.

2009-06-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ompd.c (serve_omp): Let the select loop handle the first input, as
	read_protocol now only reads up to the first '>'.

2009-06-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/oxpd.c (read_protocol): Read at most up to the first '>', so that
	the caller can select on the socket after the call and be sure that the
	select will return within the first command.

2009-06-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (serve_client): Remove server socket closing, which
	is now done in end_session.

2009-06-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (set_task_parameter): Convert rcfile before storing it
	in database.

2009-06-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_create_task_1.c: New file.  Tests OMP CREATE_TASK with
	empty RC file.

	* src/tests/CMakeLists.txt: Add omp_create_task_1.

2009-06-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.c (connect_to_manager_host_port, create_task)
	(create_task_from_rc_file, start_task, wait_for_task_end)
	(delete_task): Add const to string parameters.
	(omp_delete_report, omp_delete_task, omp_modify_task, omp_get_preferences)
	(omp_get_certificates, omp_until_up): New functions.
	* src/tests/common.h: Update headers.

2009-06-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ovas-mngr-comm.c (end_session): Break out of the gnutls_bye loop
	if the bye succeeds.  Enable close code.  Move gnutls_deinit and
	gnutls_certificate_free_credentials after shutdown and close.

2009-06-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ovas-mngr-comm.c (sendn_to_server): Trace when out of space.

2009-06-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ovas-mngr-comm.c (TO_SERVER_BUFFER_SIZE): Increase.

2009-06-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_manage_process): Ensure that the
	OPENVAS_STATE_DIR "mgr/" directory exists.

2009-06-24  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (init_manage): Close the database before returning,
	so that forked processes open their own connections.

2009-06-23  Michael Wiegand <michael.wiegand@greenbone.net>

	Post release version bump.

	* VERSION: Set to 0.6.2.SVN.

	* CMakeLists.txt: Updated CPACK_PACKAGE_VERSION_PATCH.

	* doc/Doxyfile, doc/Doxyfile_full: Updated PROJECT_NUMBER.

	* ChangeLog: Corrected path in last entry.

2009-06-23  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 0.6.1 release.

	* VERSION: Set to 0.6.1.

	* CMakeLists.txt: Updated CPACK_PACKAGE_VERSION_PATCH.

	* doc/Doxyfile, doc/Doxyfile_full: Updated PROJECT_NUMBER.

	* packaging/debian/control: Updated version requirements for Debian
	package.

	* CHANGES: Updated, fixed typos in change notes for the last release.

2009-06-22  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.c (omp_get_status): Return statuses of all tasks if
	ID is NULL.

2009-06-22  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.c (foreach_print_attribute): New function.
	(print_entity): Add attribute printing.

	* TODO: Remove associated entry.

2009-06-22  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.c (omp_get_report): New function.
	* src/tests/common.h (omp_get_report): New header.

2009-06-22  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.h: Add multiple-include guard.

2009-06-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (main): Neaten formatting.

2009-06-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.c (wait_for_task_start, wait_for_task_end): Return
	if task state becomes "Internal Error".

2009-06-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/otp.c (parse_server_bad_login): New function.
	(process_otp_server_input): Check for bad login response from server.

	* src/ompd.c (serve_omp): Handle "bad login" return from
	process_otp_server_input.

2009-06-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ompd.c (recreate_session): New function.
	(serve_omp): Move session creation to recreate_session.

2009-06-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ompd.c (write_to_server): Change OTP username and password.

2009-06-18  Michael Wiegand <michael.wiegand@greenbone.net>

	Adding support for creating a process ID file.

	* CMakeLists.txt: Set OPENVAS_PID_DIR to the appropriate directory.

	* src/CMakeLists.txt: Expose OPENVAS_PID_DIR.

	* src/openvasmd.c: Added pidfile handling.
	(main): Write the PID to the pidfile once the server is running.
	(cleanup): Remove the pidfile on exit.

2009-06-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (send_reports, omp_xml_handle_end_element): Use
	OPENVAS_STATE_DIR instead of PREFIX "/var/lib/openvas/".
	(PREFIX): Remove.

	* src/otp.c (PREFIX): Remove.

	* src/manage.c (report_task, delete_report, set_report_parameter)
	(create_report_file, delete_reports): Use OPENVAS_STATE_DIR instead of
	 PREFIX "/var/lib/openvas/".
	(PREFIX): Remove.

	* src/tasks_fs.h (load_tasks, save_tasks, delete_task): Use
	OPENVAS_STATE_DIR instead of PREFIX "/var/lib/openvas/".

2009-06-17  Michael Wiegand <michael.wiegand@greenbone.net>

	* src/tasks_sql.h (init_manage_process, delete_task): Use
	OPENVAS_STATE_DIR instead of PREFIX "/var/lib/openvas/".

	* src/CMakeLists.txt: Expose OPENVAS_STATE_DIR.

2009-06-17  Michael Wiegand <michael.wiegand@greenbone.net>

	Post release version bump.

	* VERSION: Set to 0.6.1.SVN.

	* doc/Doxyfile, doc/Doxyfile_full: Updated PROJECT_NUMBER.

	* CMakeLists.txt: Updated version information.

2009-06-17  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 0.6.0 release.

	* VERSION: Set to 0.6.0.

	* CHANGES: Updated.

	* doc/Doxyfile, doc/Doxyfile_full: Updated PROJECT_NUMBER.

	* CMakeLists.txt: Updated version information.

2009-06-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c, TODO: Move note about communication functions to TODO.

2009-06-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ompd.c (serve_omp): Remove lastfds tracing.

2009-06-16  Matthew Mundell <matthew.mundell@greenbone.net>

	Move read_protocol from the main manager daemon into oxpd.

	* src/openvasmd.c (READ_PROTOCOL_TIMEOUT, protocol_read_t)
	(read_protocol): Move to oxpd.h and oxpd.c.

	* src/oxpd.c (read_protocol): New function, from src/openvasmd.c.

	* src/oxpd.h (READ_PROTOCOL_TIMEOUT): New define from src/openvasmd.c.
	(protocol_read_t): New type, from src/openvasmd.c.
	(read_protocol): New header.

2009-06-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/oxpd.c: Enable FROM_BUFFER_SIZE check.

2009-06-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/CMakeLists.txt (DOC_FILES): Add oxpd.c.

2009-06-16  Matthew Mundell <matthew.mundell@greenbone.net>

	Separate the common ompd and otpd globals into a new file.

	* src/oxpd.c, src/oxpd.h: New files.

	* src/ompd.c: Include oxpd.h.
	(server_address): Move to oxpd.c.
	(from_buffer_size, from_client, from_client_start, from_client_end)
	(from_server, from_server_start, from_server_end): Remove.
	* src/ompd.h (server_address): Remove.

	* src/otpd.c: Include oxpd.h instead of ompd.h.
	(from_buffer_size, from_client, from_client_start, from_client_end)
	(from_server, from_server_start, from_server_end): Remove.

	* src/openvasmd.c: Include oxpd.h.
	(FROM_BUFFER_SIZE, from_buffer_size, from_client, from_client_start)
	(from_client_end, from_server, from_server_start, from_server_end): Move
	to src/oxpd.c.

	* src/CMakeLists.txt (openvasmd, C_FILES): Add oxpd.c.

	* doc/Doxyfile, doc/Doxyfile_full (INPUT): Add src/oxpd.c.

2009-06-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/file.c (rmdir_recursively): Add descriptive comments.

2009-06-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (send_task_preferences): Free orig_desc in error cases.

2009-06-16  Michael Wiegand <michael.wiegand@greenbone.net>

	* CMakeLists.txt: Make source archive filenames consistent with other
	modules and Debians expectations.

2009-06-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* CMakeLists.txt: Turn off optimisation for now, as it results in a
	warning about the uuid_export call in make_report_uuid.

2009-06-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* TODO: Add missing paren.

2009-06-16  Matthew Mundell <matthew.mundell@greenbone.net>

	Acknowledge OTP server BYE messages.

	* src/otp.c (process_otp_server_input): In SERVER_BYE leave setting of the
	init state to the caller and queue the BYE ACK in to_server.

	* src/ompd.c (serve_omp): On receiving server BYE flush the to_server
	buffer and set the server init state.

	* src/ovas-mngr-comm.c (end_session): Turn off blocking before the
	gnutls_bye, and limit the number of gnutls_bye attempts.

	* src/manage.c (acknowledge_bye): New function.
	* src/manage.h (acknowledge_bye): New header.

2009-06-12  Matthew Mundell <matthew.mundell@greenbone.net>

	* TODO: New file.

2009-06-12  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (sql_int, sql_string): Check return from sql_x.

2009-06-12  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_get_preferences_1.c: Enable test for expected value.

2009-06-12  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_get_preferences_0.c: Correct expected status code.

2009-06-12  Matthew Mundell <matthew.mundell@greenbone.net>

	Move OID entity of OMP GET_NVT_DETAILS to an attribute.

	* src/omp.c (client_state_t): Remove CLIENT_GET_NVT_DETAILS_OID.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Move GET_NVT_DETAILS OID to an attribute.

	* src/tests/omp_get_nvt_details_2.c, src/tests/omp_get_nvt_details_3.c,
	src/tests/omp_get_nvt_details_4.c: Pass OID in an attribute.

2009-06-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.c (delete_task): Pass TASK_ID as attribute.

2009-06-11  Matthew Mundell <matthew.mundell@greenbone.net>

	Move REPORT_ID entities of OMP DELETE_REPORT, GET_REPORT and
	MODIFY_REPORT commands to attributes.

	* src/omp.c (client_state_t): Remove CLIENT_GET_REPORT_ID,
	CLIENT_DELETE_REPORT_ID and CLIENT_MODIFY_REPORT_REPORT_ID.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Move REPORT_ID to an attribute.

	* src/tests/omp_delete_report_0.c, src/tests/omp_delete_report_1.c,
	src/tests/omp_delete_task_1.c, src/tests/omp_get_report_0.c,
	src/tests/omp_get_report_1.c, src/tests/omp_get_report_2.c,
	src/tests/omp_get_report_3.c, src/tests/omp_modify_report_0.c: Adjust for
	updated OMP.

2009-06-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_get_report_0.c: Improve check of expected response.

	* src/tests/omp_get_report_1.c, src/tests/omp_get_report_2.c,
	src/tests/omp_get_report_3.c: New files.

	* src/tests/CMakeLists.txt: Add omp_get_report_1, omp_get_report_2 and
	omp_get_report_3.

2009-06-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_delete_report_0.c, src/tests/omp_delete_task_0.c,
	src/tests/omp_delete_task_1.c, src/tests/omp_delete_task_2.c,
	src/tests/omp_get_dependencies_1.c, src/tests/omp_get_nvt_all_1.c,
	src/tests/omp_get_nvt_details_1.c, src/tests/omp_get_nvt_details_4.c,
	src/tests/omp_get_nvt_feed_checksum_1.c,
	src/tests/omp_get_nvt_feed_checksum_4.c,
	src/tests/omp_get_nvt_feed_checksum_5.c, src/tests/omp_get_preferences_1.c,
	src/tests/omp_get_report_0.c, src/tests/omp_get_rules_1.c,
	src/tests/omp_modify_report_0.c, src/tests/omp_modify_task_1.c: Pass
	GET_STATUS TASK_ID as an attribute.

	* src/tests/common.c (wait_for_task_delete, omp_get_status): Pass
	GET_STATUS TASK_ID as an attribute.

2009-06-11  Matthew Mundell <matthew.mundell@greenbone.net>

	Move TASK_ID entity of OMP GET_STATUS to an attribute.

	* src/omp.c (client_state_t): Remove CLIENT_GET_STATUS_TASK_ID.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Move GET_STATUS TASK_ID to an attribute.

	* src/tests/omp_get_status_1.c, src/tests/omp_get_status_2.c,
	src/tests/omp_get_status_4.c, src/tests/omp_get_status_5.c: Pass TASK_ID
	in an attribute.

2009-06-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_get_status_0.c: Correct expectations.

2009-06-11  Matthew Mundell <matthew.mundell@greenbone.net>

	Move TASK_ID entity of OMP ABORT_TASK to an attribute.

	* src/omp.c (client_state_t): Remove CLIENT_ABORT_TASK_TASK_ID.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Move ABORT_TASK TASK_ID to an attribute.

	* src/tests/omp_abort_task_0.c: Pass TASK_ID in an attribute.

	* ChangeLog: Correct function names in last three entries.

2009-06-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_abort_task_0.c: Expect that the operation may also
	succeed completely.

2009-06-11  Matthew Mundell <matthew.mundell@greenbone.net>

	Move TASK_ID entity of OMP START_TASK to an attribute.

	* src/omp.c (client_state_t): Remove CLIENT_START_TASK_TASK_ID.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Move START_TASK TASK_ID to an attribute.

	* src/tests/common.c (start_task): Pass TASK_ID in an attribute.

	* src/tests/omp_start_task_0.c: Pass TASK_ID in an attribute.

	* ChangeLog: Correct descriptions in last two entries.

2009-06-11  Matthew Mundell <matthew.mundell@greenbone.net>

	Move TASK_ID entity of OMP DELETE_TASK to an attribute.

	* src/omp.c (client_state_t): Remove CLIENT_DELETE_TASK_TASK_ID.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Move DELETE_TASK TASK_ID to an attribute.

	* src/tests/omp_delete_task_0.c, src/tests/omp_delete_task_1.c,
	src/tests/omp_delete_task_1.c: Pass TASK_ID in an attribute.

2009-06-11  Matthew Mundell <matthew.mundell@greenbone.net>

	Move TASK_ID entity of OMP MODIFY_TASK to an attribute.

	* src/omp.c (client_state_t): Remove CLIENT_MODIFY_TASK_TASK_ID.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Move MODIFY_TASK TASK_ID to an attribute.

	* src/tests/omp_modify_task_0.c, src/tests/omp_modify_task_1.c: Pass
	TASK_ID in an attribute.

2009-06-11  Matthew Mundell <matthew.mundell@greenbone.net>

	Move OID entity of OMP GET_NVT_ALL and GET_NVT_DETAILS to an attribute.

	* src/omp.c (send_plugin): Move OID to an attribute.

	* src/tests/omp_get_nvt_details_4.c: Expect OID in an attribute.

2009-06-11  Matthew Mundell <matthew.mundell@greenbone.net>

	Get the GET_NVT_DETAILS tests passing.

	* src/tests/omp_get_nvt_details_3.c,
	src/tests/omp_get_nvt_details_2.c: Keep querying the manager until the
	feed details are available.

	* src/tests/omp_get_nvt_details_1.c,
	src/tests/omp_get_nvt_details_4.c: Expect status in an attribute.

2009-06-10  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_delete_report_0.c, src/tests/omp_delete_task_1.c
	src/tests/omp_get_report_0.c, src/tests/omp_modify_report_0.c: Adjust
	for move of GET_STATUS REPORT ID to an attribute.

2009-06-10  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (send_reports): Move ID of GET_STATUS REPORT to an attribute.

2009-06-10  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (task_preference): Free orig_desc after last use,
	instead of before.

2009-06-10  Matthew Mundell <matthew.mundell@greenbone.net>

	Account for the move of GET_STATUS TASK_ID to an attribute in all
	remaining tests.

	* src/tests/common.c (task_status): Match updated GET_STATUS.
	(omp_get_status): Improve status param doc slightly.

	* src/tests/omp_delete_report_0.c, src/tests/omp_delete_task_1.c,
	src/tests/omp_delete_task_2.c, src/tests/omp_get_report_0.c,
	src/tests/omp_modify_report_0.c, src/tests/omp_modify_task_1.c: Match
	updated GET_STATUS.

2009-06-10  Matthew Mundell <matthew.mundell@greenbone.net>

	Move GET_STATUS response TASK_ID to an attribute of the task.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_STATUS add the
	enclosing TASK entity to the ID case and in both cases move the TASK_ID
	to an attribute.

	* src/common.c (wait_for_task_start, wait_for_task_end): Expect task ID
	in attribute.

	* src/tests/omp_get_status_0.c, src/tests/omp_get_status_1.c,
	src/tests/omp_get_status_1.c, src/tests/omp_get_status_3.c,
	src/tests/omp_get_status_4.c, src/tests/omp_get_status_5.c: Improve checks
	and match updated OMP.

2009-06-10  Matthew Mundell <matthew.mundell@greenbone.net>

	Merge the OMP MODIFY_REPORT command's VALUE and PARAMETER entities.

	* src/omp.c (client_state_t): Remove CLIENT_MODIFY_REPORT_VALUE.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Merge MODIFY_REPORT VALUE and PARAMETER.

	* src/tests/omp_modify_report_0.c: Match updated OMP.

2009-06-10  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_start_element): Reorder CLIENT_MODIFY_TASK
	conditions.

2009-06-09  Matthew Mundell <matthew.mundell@greenbone.net>

	Merge the OMP MODIFY_TASK command's VALUE and PARAMETER entities.

	* src/omp.c (client_state_t): Remove CLIENT_MODIFY_TASK_VALUE.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Merge MODIFY_TASK VALUE and PARAMETER.

	* src/tests/omp_modify_task_0.c, src/tests/omp_modify_task_1.c: Match
	updated OMP.

2009-06-09  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_get_status_0.c: Change "identifier" to "name" in
	expected response.

	* src/tests/omp_modify_task_1.c: Expect "name" instead of "identifier".
	Use new response code.

	* src/tests/omp_modify_task_0.c: Use new response code.

2009-06-09  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.c: Rename task name symbols to use "name" instead of
	"identifier".

2009-06-09  Matthew Mundell <matthew.mundell@greenbone.net>

	Add RCFILE, NAME and COMMENT elements to OMP MODIFY_TASK.

	* src/omp.c (modify_task_comment, modify_task_name)
	(modify_task_rcfile): New variables.
	(client_state_t): Add new MODIFY_TASK states.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Handle new MODIFY_TASK elements.

2009-06-09  Matthew Mundell <matthew.mundell@greenbone.net>

	* ChangeLog: Convert space indentation to tabs.

2009-06-09  Matthew Mundell <matthew.mundell@greenbone.net>

	Rename TASK_FILE to RCFILE in the OMP command CREATE_TASK.

	* src/omp.c (client_state_t): Rename CLIENT_CREATE_TASK_TASK_FILE to
	CLIENT_CREATE_TASK_RCFILE.  Ajust all users.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Parse
	RCFILE instead of TASK_FILE.

	* src/tasks_fs.h (set_task_parameter): Parse RCFILE instead of TASK_FILE.
	* src/tasks_sql.h (set_task_parameter): Parse RCFILE instead of TASK_FILE.

	* src/tests/common.c (create_task): Send RCFILE instead of TASK_FILE.

	* src/tests/omp_create_task_0.c: Send RCFILE instead of TASK_FILE.

2009-06-09  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (set_task_parameter): Correct doc parameter description.

2009-06-09  Matthew Mundell <matthew.mundell@greenbone.net>

	Rename task name symbols to use "name" instead of "identifier".

	* src/omp.c (client_state_t): Rename CLIENT_CREATE_TASK_IDENTIFIER to
	CLIENT_CREATE_TASK_NAME.  Adjust all users.

	* src/tasks_sql.h (append_to_task_identifier): Rename append_to_task_name.
	(append_to_task_name): New function, renamed from append_to_task_identifier.
	* src/tasks_fs.h (append_to_task_identifier): Rename append_to_task_name.
	(append_to_task_name): New function, renamed from append_to_task_identifier.
	* src/manage.h: Update header.

2009-06-09  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_get_nvt_feed_checksum_1.c: Include ../string.h.

2009-06-09  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/read_protocol_0.c: Correct task name.

2009-06-09  Matthew Mundell <matthew.mundell@greenbone.net>

	Rename IDENTIFIER to NAME in OMP commands CREATE_TASK and GET_STATUS.

	* src/omp.c (omp_xml_handle_start_element): Rename IDENTIFIER to NAME.

	* src/tests/omp_get_status_5.c: New file, tests GET_STATUS with an ID
	before running the task.

	* src/tests/CMakeLists.txt: Add omp_get_status_5.

	* src/tests/common.c (create_task): Rename IDENTIFIER to NAME.

	* src/tests/omp_create_task_0.c: Rename IDENTIFIER to NAME.

	* src/tests/omp_get_status_2.c: Improve expected response.

2009-06-09  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (serve_client): Improve comment slightly.

2009-06-09  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/otpd.c (serve_otp): Close client socket on return.

2009-06-09  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (read_protocol): Check return from time for error.

	* ChangeLog: Correct entry dates for yesterday.

2009-06-08  Matthew Mundell <matthew.mundell@greenbone.net>

	Close client connections that are idle for longer than a fixed limit.

	* src/openvasmd.c (serve_client): Close client socket on return.
	(accept_and_maybe_fork): Leave it to serve_client to close the client
	socket.

	* src/ompd.c (CLIENT_TIMEOUT): New definition.
	(serve_omp): Close client_socket on return.  Timeout if the client
	connection is idle for CLIENT_TIMEOUT or more seconds.

	* src/tests/timeout_0.c: New file, tests client timeout.

	* src/tests/CMakeLists.txt: Add timeout_0.  Move timeout tests to end.

2009-06-08  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (accept_and_maybe_fork): Close client socket in
	parent process.

2009-06-08  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/otp.c (process_otp_server_input): In the cases where the OTP that
	follows is either a field or "<|> SERVER", check for the '|' in
	addition to checking if the length of "field" is zero, as "field" may
	legitimately be an empty field (" <|> field2 ...").

2009-06-08  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (stringify): Remove.

2009-06-05  Matthew Mundell <matthew.mundell@greenbone.net>

	Bring comment docs up to date.

	* src/string.c (isalnumstr): Doc param.

	* src/omp.c: Add docs to new defines.  Move DEF out of send_plugin.
	(SENDF_TO_CLIENT_OR_FAIL): Doc params properly.

	* src/tests/common.c (next_entities, first_entity): New functions.
	(add_attribute): Correct param name in doc.
	(add_attributes, setup_test): Add doc.
	(compare_find_attribute): Doc attributes2 param.
	(omp_get_status): Doc status param.

2009-06-05  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_sql.h (make_task): Initialise task run state.

2009-06-05  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_create_task_0.c: Add check that task run status is
	initialised correctly.

2009-06-05  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.c (omp_get_status): New function.
	* src/tests/common.h (omp_get_status): New header.

2009-06-04  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/otp.c (parse_server_plugin_list_tags, process_otp_server_input): Use
	new nvtis function names.

	* src/omp.c (omp_xml_handle_end_element): Use new nvtis function names.

2009-06-04  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (find_attribute): New function.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Handle
	GET_NVT_FEED_CHECKSUM "algorithm" attribute.

	* src/tests/omp_get_nvt_feed_checksum_2.c,
	src/tests/omp_get_nvt_feed_checksum_3.c,
	src/tests/omp_get_nvt_feed_checksum_4.c,
	src/tests/omp_get_nvt_feed_checksum_5.c: New files which test
	GET_NVT_FEED_CHECKSUM "algorithm" attribute.

	* src/tests/CMakeLists.txt: Add omp_get_nvt_feed_checksum_2,
	omp_get_nvt_feed_checksum_3, omp_get_nvt_feed_checksum_4 and
	omp_get_nvt_feed_checksum_5.

2009-06-04  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_NVT_ALL change
	algorithm entity to a feed_checksum attribute.

	* src/tests/omp_get_nvt_all_1.c: Match updated GET_NVT_ALL.  Add
	algorithm and checksum checks.

	* ChangeLog: Add entry for last commit.

2009-06-04  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/string.h (isalnumstr): New header.
	* src/string.c (isalnumstr): New function.
	* src/tests/omp_get_nvt_feed_checksum_1.c (isalnumstr): Remove.

2009-06-04  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In
	CLIENT_GET_NVT_FEED_CHECKSUM add checksum entity with algorithm.

	* src/tests/omp_get_nvt_feed_checksum_1.c: Match updated OMP.

2009-06-04  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_VERSION move
	preferred entity to attribute.

	* src/tests/omp_get_version_0.c: Move expected preferred entity to
	attribute.

2009-06-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_delete_task_2.c: Correct expected tag name and string
	comparison.  Compare the response status instead of the task status, to
	the response code.

2009-06-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_delete_task_0.c: Add check of whether delete request
	succeeded immediately.  Correct expected tag name and string comparison.

2009-06-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_delete_task_1.c: Wait for the task to stop before
	requesting the report.  Use one entity at a time and free the entities
	after use.  Pass sendf_to_manager the ID text instead of the ID entity.

2009-06-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.c (wait_for_task_delete): New function.
	* src/tests/common.h (wait_for_task_delete): New header.

2009-06-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.c (task_status): Revert to correct implementation.

2009-06-03  Matthew Mundell <matthew.mundell@greenbone.net>

	When stopping tasks, account for the case where the task is stopped
	already.

	* src/manage.c (stop_task): Return 1 instead of 0 if stop is requested.

	* src/tasks_sql.h (sql_int64, sql_x): Add return values to indicate when
	there are fewer rows than requested.
	(request_delete_task): Return 1 instead of 0 if delete requested.  If
	task is already stopped, then do the delete.
	(find_task): Return FALSE only on error and return with task 0 to indicate
	failure to find the task.  Update caller.

	* src/omp.c (omp_xml_handle_end_element): When stopping and deleting a
	task respond with OK if the operation is already done, instead of always
	with OK_REQUESTED.  Add INTERNAL_ERROR cases to the return checks
	of all find_task calls.

2009-06-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_STATUS correct
	opening tag and add closing tag.

2009-06-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_bogus_0.c, src/tests/omp_bogus_1.c: New files, which
	test the manager with a bogus command.

	* src/tests/CMakeLists.txt: Add omp_bogus_0 and omp_bogus_1.

2009-06-02  Matthew Mundell <matthew.mundell@greenbone.net>

	Move response statuses into attributes, in tests.

	* src/tests/omp_abort_task_0.c, src/tests/omp_create_task_0.c,
	src/tests/omp_delete_report_0.c, src/tests/omp_delete_report_1.c,
	src/tests/omp_delete_task_0.c, src/tests/omp_delete_task_1.c,
	src/tests/omp_get_certificates_0.c, src/tests/omp_get_dependencies_0.c,
	src/tests/omp_get_nvt_all_0.c, src/tests/omp_get_nvt_details_0.c,
	src/tests/omp_get_nvt_details_2.c, src/tests/omp_get_nvt_details_3.c,
	src/tests/omp_get_nvt_feed_checksum_0.c, src/tests/omp_get_preferences_0.c,
	src/tests/omp_get_preferences_1.c, src/tests/omp_get_report_0.c,
	src/tests/omp_get_rules_0.c, src/tests/omp_get_rules_1.c,
	src/tests/omp_get_status_0.c, src/tests/omp_get_status_1.c,
	src/tests/omp_get_status_2.c, src/tests/omp_get_status_3.c,
	src/tests/omp_get_status_4.c, src/tests/omp_get_version_0.c,
	src/tests/omp_help_0.c, src/tests/omp_modify_report_0.c,
	src/tests/omp_modify_task_0.c, src/tests/omp_modify_task_1.c,
	src/tests/omp_start_task_0.c: Adjust for attribute statuses.

	* src/tests/common.h (entity_t): Add attributes.
	(add_attribute, entity_child, entity_attribute): New headers.

	* src/tests/common.c (make_entity): Init attributes.
	(add_attribute, entity_attribute, add_attributes)
	(compare_find_attribute): New functions.
	(free_entity): Free attributes.
	(entity_child): Make name param const.
	(handle_start_element): Add attributes.
	(compare_entities): Compare attributes.  Correct NULL check.
	(task_status, authenticate, start_task, wait_for_task_start)
	(wait_for_task_end, delete_task): Adjust for attribute statuses.

2009-06-02  Matthew Mundell <matthew.mundell@greenbone.net>

	Move response statuses into attributes.

	* src/ompd.c (serve_omp): On process_omp_client_input error, write out
	the rest of the to_client buffer before exiting.  Handle the response
	from the very first process_omp_client_input.

	* src/omp.c (XML_ERROR_SYNTAX, XML_ERROR_MISSING, XML_ERROR_AUTH_FAILED)
	(XML_OK, XML_OK_REQUESTED, XML_INTERNAL_ERROR, XML_SERVICE_DOWN): New
	macros.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Convert all
	status tags to attributes.
	(process_omp_client_input): Return -4 on XML syntax error.

2009-05-29  Matthew Mundell <matthew.mundell@greenbone.net>

	Make the tests compile and run again.

	* src/tests/report_path_task_uuid_1.c,
	src/tests/report_path_task_uuid_0.c,
	src/tests/report_path_task_uuid_2.c: Comment out setup_test and common.h
	include.

	* src/tests/strip_space_0.c, src/tests/strip_space_2.c,
	src/tests/strip_space_3.c, src/tests/strip_space_1.c,
	src/tests/rmdir_recursively_0.c, src/tests/rmdir_recursively_1.c: Include
	common.h.

	* src/tests/omp_start_task_2.c, src/tests/omp_abort_task_0.c,
	src/tests/omp_delete_task_0.c, src/tests/omp_start_task_1.c,
	src/tests/omp_delete_task_1.c, src/tests/omp_start_task_0.c: Turn on
	TRACE.

	* src/tests/CMakeLists.txt (rmdir_recursively_0, rmdir_recursively_1)
	strip_space_0, strip_space_1, strip_space_2, strip_space_3): Link to
	common and requirement of common.

2009-05-29  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_abort_task_0.c, src/tests/omp_create_task_0.c,
	src/tests/omp_delete_report_0.c, src/tests/omp_delete_report_1.c,
	src/tests/omp_delete_task_0.c, src/tests/omp_delete_task_1.c,
	src/tests/omp_delete_task_2.c, src/tests/omp_get_dependencies_0.c,
	src/tests/omp_get_dependencies_1.c, src/tests/omp_get_nvt_all_0.c,
	src/tests/omp_get_nvt_all_1.c, src/tests/omp_get_nvt_details_0.c,
	src/tests/omp_get_nvt_details_2.c, src/tests/omp_get_nvt_details_3.c,
	src/tests/omp_get_nvt_details_4.c, src/tests/omp_get_nvt_feed_checksum_0.c,
	src/tests/omp_get_nvt_feed_checksum_1.c, src/tests/omp_get_preferences_0.c,
	src/tests/omp_get_preferences_1.c, src/tests/omp_get_report_0.c,
	src/tests/omp_get_rules_0.c, src/tests/omp_get_rules_1.c,
	src/tests/omp_get_status_0.c, src/tests/omp_get_status_1.c,
	src/tests/omp_get_status_2.c, src/tests/omp_get_status_3.c,
	src/tests/omp_get_status_4.c, src/tests/omp_get_version_0.c,
	src/tests/omp_help_0.c, src/tests/omp_modify_report_0.c,
	src/tests/omp_modify_task_0.c, src/tests/omp_modify_task_1.c,
	src/tests/omp_start_task_0.c, src/tests/omp_start_task_1.c,
	src/tests/omp_start_task_2.c, src/tests/report_path_task_uuid_0.c,
	src/tests/report_path_task_uuid_1.c, src/tests/report_path_task_uuid_2.c,
	src/tests/rmdir_recursively_0.c, src/tests/rmdir_recursively_1.c,
	src/tests/strip_space_0.c, src/tests/strip_space_1.c,
	src/tests/strip_space_2.c, src/tests/strip_space_3.c: Call setup_test
	before testing.

2009-05-29  Matthew Mundell <matthew.mundell@greenbone.net>

	Add OTP CERTIFICATES handling and OMP GET_CERTIFICATES.

	* src/manage.c (request_certificates): New function.
	* src/manage.h: Update headers.

	* src/omp.c (help_text, client_state_t): Add GET_CERTIFICATES entries.
	(send_certificate): New function.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Add
	GET_CERTIFICATES handling.

	* src/otp.h (server_t): Add certificates.

	* src/otp.c (init_otp_data): Init server certificates.
	(server_state_t): Add CERTIFICATES states.
	(current_certificates, current_certificate): New variables.
	(parse_server_certificate_public_key): New function.
	(parse_server_server, process_otp_server_input): Add CERTIFICATES
	handling.

	* src/tests/omp_help_0.c (help_text): Add GET_CERTIFICATES entry.

	* src/tests/omp_get_certificates_0.c,
	src/tests/omp_get_certificates_1.c: New files.

	* src/tests/CMakeLists.txt: Add omp_get_certificates_0 and
	omp_get_certificates_1.

2009-05-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/CMakeLists.txt: Sort rules.

2009-05-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (help_text, client_state_t): Sort entries.

	* src/tests/omp_help_0.c (help_text): Sort entries.

2009-05-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.c (create_task): Rename NEW_TASK call to CREATE_TASK.
	(wait_for_task_start, wait_for_task_end): Rename STATUS call to
	GET_STATUS.

2009-05-28  Matthew Mundell <matthew.mundell@greenbone.net>

	Rename OMP STATUS to GET_STATUS.

	* src/omp.c (help_text, client_state_t, omp_xml_handle_start_element)
	(omp_xml_handle_end_element, omp_xml_handle_text): Rename STATUS to
	GET_STATUS.

	* src/tests/CMakeLists.txt: Rename tests to match new command name.

	* src/tests/omp_status_0.c: Remove.  Rename to omp_get_status_0.c.
	* src/tests/omp_get_status_0.c: New file.  Was omp_status_0.c.  Adjust for
	new name.

	* src/tests/omp_status_1.c: Remove.  Rename to omp_get_status_0.c.
	* src/tests/omp_get_status_1.c: New file.  Was omp_status_0.c.  Adjust for
	new name.

	* src/tests/omp_status_2.c: Remove.  Rename to omp_get_status_2.c.
	* src/tests/omp_get_status_2.c: New file.  Was omp_status_2.c.  Adjust for
	new name.

	* src/tests/omp_status_3.c: Remove.  Rename to omp_get_status_3.c.
	* src/tests/omp_get_status_3.c: New file.  Was omp_status_3.c.  Adjust for
	new name.

	* src/tests/omp_status_4.c: Remove.  Rename to omp_get_status_4.c.
	* src/tests/omp_get_status_4.c: New file.  Was omp_status_4.c.  Adjust for
	new name.

	* src/tests/omp_get_report_0.c, src/tests/omp_delete_report_0.c,
	src/tests/omp_get_preferences_1.c, src/tests/omp_modify_task_1.c,
	src/tests/omp_delete_task_0.c, src/tests/omp_get_nvt_details_4.c,
	src/tests/omp_get_rules_1.c, src/tests/omp_delete_task_1.c,
	src/tests/omp_delete_task_2.c, src/tests/omp_get_dependencies_1.c,
	src/tests/omp_get_nvt_feed_checksum_1.c,
	src/tests/omp_get_nvt_details_1.c, src/tests/omp_get_nvt_all_1.c,
	src/tests/omp_modify_report_0.c: Rename all STATUS calls to GET_STATUS.

2009-05-28  Matthew Mundell <matthew.mundell@greenbone.net>

	Rename OMP GET_NVT_FEED_DETAILS to GET_NVT_DETAILS.

	* src/omp.c (help_text, client_state_t, omp_xml_handle_start_element)
	(omp_xml_handle_end_element, omp_xml_handle_text): Rename
	GET_NVT_FEED_DETAILS to GET_NVT_DETAILS.

	* src/tests/CMakeLists.txt: Rename tests to match new command name.

	* src/tests/omp_get_nvt_feed_details_0.c: Remove.  Rename to
	omp_get_nvt_details_0.c.
	* src/tests/omp_get_nvt_details_0.c: New file.  Was
	omp_get_nvt_feed_details_0.c.  Adjust for new name.

	* src/tests/omp_get_nvt_feed_details_1.c: Remove.  Rename to
	omp_get_nvt_details_0.c.
	* src/tests/omp_get_nvt_details_1.c: New file.  Was
	omp_get_nvt_feed_details_0.c.  Adjust for new name.

	* src/tests/omp_get_nvt_feed_details_2.c: Remove.  Rename to
	omp_get_nvt_details_2.c.
	* src/tests/omp_get_nvt_details_2.c: New file.  Was
	omp_get_nvt_feed_details_2.c.  Adjust for new name.

	* src/tests/omp_get_nvt_feed_details_3.c: Remove.  Rename to
	omp_get_nvt_details_3.c.
	* src/tests/omp_get_nvt_details_3.c: New file.  Was
	omp_get_nvt_feed_details_3.c.  Adjust for new name.

	* src/tests/omp_get_nvt_feed_details_4.c: Remove.  Rename to
	omp_get_nvt_details_4.c.
	* src/tests/omp_get_nvt_details_4.c: New file.  Was
	omp_get_nvt_feed_details_4.c.  Adjust for new name.

2009-05-28  Matthew Mundell <matthew.mundell@greenbone.net>

	Rename OMP GET_NVT_FEED_ALL to GET_NVT_ALL.

	* src/omp.c (help_text, client_state_t, omp_xml_handle_start_element)
	(omp_xml_handle_end_element): Rename GET_NVT_FEED_ALL to GET_NVT_ALL.

	* src/tests/CMakeLists.txt: Rename omp_get_nvt_feed_all_0 to
	omp_get_nvt_all_0 and omp_get_nvt_feed_all_1 to omp_get_nvt_all_1.

	* src/tests/omp_get_nvt_feed_all_0.c: Remove.  Rename to
	omp_get_nvt_all_0.c.
	* src/tests/omp_get_nvt_all_0.c: New file.  Was omp_get_nvt_feed_all_0.c.
	Adjust for new name.

	* src/tests/omp_get_nvt_feed_all_1.c: Remove.  Rename to
	omp_get_nvt_all_1.c.
	* src/tests/omp_get_nvt_all_1.c: New file.  Was omp_get_nvt_feed_all_1.c.
	Adjust for new name.

2009-05-28  Matthew Mundell <matthew.mundell@greenbone.net>

	Rename OMP NEW_TASK to CREATE_TASK.

	* src/omp.c (help_text, client_state_t, omp_xml_handle_start_element)
	(omp_xml_handle_end_element, omp_xml_handle_text): Rename NEW_TASK to
	CREATE_TASK.

	* src/tests/CMakeLists.txt: Rename omp_new_task_0 to omp_create_task_0.

	* src/tests/omp_new_task_0.c: Remove.  Rename to omp_create_task_0.c.
	* src/tests/omp_create_task_0.c: New file.  Was omp_new_task_0.c.  Adjust
	for new name.

2009-05-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (help_text): Remove dummy implementation key.

2009-05-28  Matthew Mundell <matthew.mundell@greenbone.net>

	Rename OMP OMP_VERSION to GET_VERSION.

	* src/omp.c (help_text, omp_xml_handle_start_element)
	(omp_xml_handle_end_element): Rename OMP_VERSION to GET_VERSION.

	* src/tests/CMakeLists.txt: Rename omp_version_0 to omp_get_version_0.

	* src/tests/omp_version_0.c: Remove.  Rename to omp_get_version_0.c.
	* src/tests/omp_get_version_0.c: New file.  Was omp_version_0.c.  Adjust
	for	new name.

2009-05-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.h (TO_CLIENT_BUFFER_SIZE): Increase, for now.

2009-05-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_get_nvt_feed_details_4.c: Get ID via get_nvt_feed_all
	instead of get_nvt_feed_details.  Remove printing.

2009-05-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (read_protocol): Use the right socket.

2009-05-28  Matthew Mundell <matthew.mundell@greenbone.net>

	Timeout if reading the protocol takes too long.

	* src/openvasmd.c (READ_PROTOCOL_TIMEOUT): New define.
	(protocol_read_t): Add PROTOCOL_TIMEOUT.
	(read_protocol): Timeout if reading takes PROTOCOL_TIMEOUT or longer.
	(serve_client): Handle read_protocol timeout.

	* src/tests/common.c (setup_test): New function.
	* src/tests/common.h (setup_test): New header.

	* src/tests/CMakeLists.txt: Add read_protocol_0.c.

	* src/tests/read_protocol_0.c: New file.

2009-05-27  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (send_plugin): Correct g_convert charset names.

2009-05-27  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch to libopenvas nvtis for plugin information.

	* src/manage.c (find_plugin, free_plugin_for_hash_table)
	(make_plugin, free_plugin, make_plugins, free_plugin, make_plugins)
	(free_plugins, plugin_tags, plugins_size, add_plugin)
	(plugin_oid, plugin_name, plugin_category, plugin_copyright)
	(plugin_description, plugin_summary, plugin_family, plugin_version)
	(plugin_cve_id, plugin_bugtraq_id, plugin_xrefs, plugin_fingerprints)
	(set_plugin_oid, set_plugin_name, set_plugin_category)
	(set_plugin_copyright, set_plugin_description, set_plugin_summary)
	(set_plugin_family, set_plugin_version, set_plugin_cve_id)
	(set_plugin_bugtraq_id, set_plugin_xrefs, set_plugin_fingerprints)
	(set_plugin_tags): Remove.
	* src/manage.h: Update headers.

	* src/omp.c: Convert plugin-related calls into nvti equivalents.

	* src/otp.h (server_t): Make plugins an nvtis_t.

	* src/otp.c: Convert plugin-related calls into nvti equivalents.
	(current_plugins, current_plugin): Convert types to nvti equivalents.

	* src/CMakeLists.txt (omp, otp): Add openvas headers dir to compile flags.

2009-05-27  Matthew Mundell <matthew.mundell@greenbone.net>

	Implement OMP GET_NVT_FEED_DETAILS when called to return a specific NVT.

	* src/manage.c (find_plugin): New function.
	* src/manage.h (find_plugin): New header.

	* src/omp.c (client_state_t): Add CLIENT_GET_NVT_FEED_DETAILS_OID.
	(omp_xml_handle_start_element, omp_xml_handle_end_element)
	(omp_xml_handle_text): Add GET_NVT_FEED_DETAILS ID handling.
	(send_plugin): Convert strings to UTF-8 for g_markup_escape_text.  Free
	the correct strings.  Correct XML tag.

	* src/omp.h (TO_CLIENT_BUFFER_SIZE): Increase.

	* src/tests/omp_get_nvt_feed_details_2.c,
	src/tests/omp_get_nvt_feed_details_3.c,
	src/tests/omp_get_nvt_feed_details_4.c: New files.

	* src/tests/CMakeLists.txt: Add new tests.

2009-05-26  Matthew Mundell <matthew.mundell@greenbone.net>

	Implement OMP GET_NVT_FEED_DETAILS when called to return all NVTs.

	* src/omp.c (send_plugin): Add a details option.
	(omp_xml_handle_end_element): Add real CLIENT_GET_NVT_FEED_DETAILS
	handling.

	* src/tests/omp_get_nvt_feed_details_0.c: Improve comments.  Use new status
	code.

	* src/tests/omp_get_nvt_feed_details_1.c: Get feed initially.  Check
	response.

	* src/tests/omp_get_nvt_feed_all_1.c: Also check for response status 503.

2009-05-26  Matthew Mundell <matthew.mundell@greenbone.net>

	Implement OMP GET_NVT_FEED_ALL.

	* src/manage.c (plugin_t, plugins_t): New types.
	(plugins_find): New definition.
	(make_plugin, free_plugin, make_plugins, free_plugin, make_plugins)
	(free_plugins, request_plugin_list, plugins_size, add_plugin): New
	functions.
	(plugin_oid, plugin_name, plugin_category, plugin_copyright)
	(plugin_description, plugin_summary, plugin_family, plugin_version)
	(plugin_cve_id, plugin_bugtraq_id, plugin_xrefs, plugin_fingerprints)
	(plugin_tags): New access functions.
	(set_plugin_oid, set_plugin_name, set_plugin_category)
	(set_plugin_copyright, set_plugin_description, set_plugin_summary)
	(set_plugin_family, set_plugin_version, set_plugin_cve_id)
	(set_plugin_bugtraq_id, set_plugin_xrefs, set_plugin_fingerprints)
	(set_plugin_tags): New set functions.
	* src/manage.h: Update headers.

	* src/omp.c (send_plugin): New function
	(SENDF_TO_CLIENT_OR_FAIL): New macro.
	(omp_xml_handle_end_element): Add real CLIENT_GET_NVT_FEED_ALL handling.

	* src/otp.h (server_t): Add plugins.

	* src/otp.c (current_plugin, current_plugins): New variables.
	(init_otp_data): Init plugins.
	(server_state_t): Add PLUGIN_LIST states.
	(parse_server_plugin_list_tags): New function.
	(process_otp_server_input): Add PLUGIN_LIST handling.

	* src/tests/src/tests/omp_get_preferences_0.c,
	src/tests/omp_get_nvt_feed_checksum_0.c,
	src/tests/omp_get_dependencies_0.c:  Correct test numbers in headings.

	* src/tests/omp_get_nvt_feed_all_0.c: Match new response code.

	* src/tests/omp_get_nvt_feed_all_1.c: Get feed initially.  Check response.

2009-05-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): Enable real
	CLIENT_GET_NVT_FEED_CHECKSUM implementation.

	* src/tests/omp_get_nvt_feed_checksum_0.c: Use new status code.

	* src/tests/omp_get_nvt_feed_checksum_1.c: Add comparison to expected
	response.

2009-05-25  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_start_element): Add enclosing tags that were
	missing from certain responses.  Initialise current_uuid in STATUS.

	* src/tasks_sql.h (make_task): Quote uuid in SQL.
	(find_task): Quote uuid in SQL.  Invert return.

	* src/tests/common.c (next_entities, first_entity): New functions.
	(create_task, create_task_from_rc_file, wait_for_task_start)
	(wait_for_task_end, delete_task): Change task ID param to a string.
	(id_string): Remove.
	* src/tests/common.h: Update headers.

	* src/tests/omp_get_report_0.c, src/tests/omp_delete_report_0.c,
	src/tests/omp_start_task_2.c, src/tests/omp_get_preferences_1.c,
	src/tests/omp_modify_task_1.c, src/tests/omp_abort_task_0.c,
	src/tests/omp_delete_task_0.c, src/tests/omp_get_rules_1.c,
	src/tests/omp_start_task_1.c, src/tests/omp_delete_task_1.c,
	src/tests/omp_get_nvt_feed_details_1.c, src/tests/omp_status_2.c,
	src/tests/omp_delete_task_2.c, src/tests/omp_get_dependencies_1.c,
	src/tests/omp_get_nvt_feed_checksum_1.c, src/tests/omp_status_4.c,
	src/tests/omp_start_task_0.c, src/tests/omp_modify_task_0.c,
	src/tests/omp_status_1.c, src/tests/omp_status_0.c,
	src/tests/omp_status_3.c, src/tests/omp_delete_report_1.c,
	src/tests/omp_modify_report_0.c,
	src/tests/omp_get_nvt_feed_all_1.c: Switch to string task IDs.  Match
	response statuses to manager.

2009-05-25  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (main): Fork into background on start, or stay in
	foreground if -f switch given.

2009-05-23  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (STATUS_SERVICE_DOWN): New status code.
	(omp_xml_handle_start_element): Initialise current_uuid in operations that
	use it.
	(omp_xml_handle_end_element): Use STATUS_SERVICE_DOWN instead of
	STATUS_INTERNAL_ERROR in CLIENT_GET_PREFERENCES, CLIENT_GET_DEPENDENCIES
	and CLIENT_GET_NVT_FEED_CHECKSUM.  In CLIENT_STATUS adjust the
	current_uuid check to account for the new initial value of current_uuid.

2009-05-22  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/make_report_id_0.c: Rename make_report_uuid_0.c.
	* src/tests/report_path_task_name_0.c: Rename report_path_task_uuid_0.c.
	* src/tests/report_path_task_name_1.c: Rename report_path_task_uuid_1.c.
	* src/tests/report_path_task_name_2.c: Rename report_path_task_uuid_2.c.

	* src/tests/make_report_uuid_0.c, src/tests/report_path_task_uuid_0.c,
	src/tests/report_path_task_uuid_1.c,
	src/tests/report_path_task_uuid_2.c: Update function names in header
	comments.

	* src/tests/CMakeLists.txt: Update file names.  Remove duplicate entries.

2009-05-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (report_task): Correct variable name.  Move free to after
	last use.

2009-05-20  Matthew Mundell <matthew.mundell@greenbone.net>

	Better match HTTP response codes in response statuses.

	* src/omp.c (STATUS_ERROR_SYNTAX, STATUS_ERROR_MUST_AUTH)
	(STATUS_ERROR_MISSING, STATUS_ERROR_AUTH_FAILED, STATUS_OK)
	(STATUS_OK_CREATED, STATUS_OK_REQUESTED, STATUS_INTERNAL_ERROR): New
	defines.  Use instead of codes in all XML status entities.

2009-05-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (current_task_task_id): Rename current_uuid.  Update callers.

2009-05-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/CMakeLists.txt (OVAS_LDFLAG): Add libopenvas.

2009-05-20  Matthew Mundell <matthew.mundell@greenbone.net>

	Rename make_report_id to make_report_uuid, and report_path_task_name to
	report_path_task_uuid.

	* src/manage.c (make_report_id): Rename to make_report_uuid.  Update
	callers.
	(report_path_task_name): Free task_dir in alternate version.  Rename to
	report_path_task_uuid.  Update callers.
	(make_report_uuid, report_path_task_uuid): New functions.
	* src/manage.h: Update headers.

	* src/tests/report_path_task_name_0.c,
	src/tests/report_path_task_name_1.c, src/tests/report_path_task_name_2.c:
	Update to report_path_task_uuid.

	* src/tests/make_report_id_0.c: Update to make_report_uuid.

2009-05-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/CMakeLists.txt: Remove OPENVAS_USERS_DIR definition added too
	eagerly.

2009-05-20  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (\mainpage): Add License Information section.

2009-05-20  Matthew Mundell <matthew.mundell@greenbone.net>

	Add task UUIDs.

	* src/tasks_fs.h (task_uuid): New function.
	(task_id_string): Remove.
	(save_tasks, delete_task): Use task_uuid instead of task_id_string.

	* src/tasks_sql.h (task_uuid): New function.
	(task_id_string): Switch to UUID alternative.  Rename task_uuid.
	(make_task): Also insert UUID.
	(save_tasks, delete_task): Use task_uuid instead of task_id_string.
	(find_task): Switch to UUID alternative.

	* src/manage.c (make_task_uuid): New function.
	(create_report_file, delete_reports): Use task_uuid instead of
	task_id_string.

	* src/manage.h: Update headers.

	* src/omp.c: Use task_uuid instead of task_id_string.

2009-05-19  Matthew Mundell <matthew.mundell@greenbone.net>

	Add real authentication.

	* src/manage.c: Include openvas/openvas_auth.h.

	* src/tasks_sql.h (authenticate): Call openvas_authenticate to check
	credentials.

	* src/tasks_fs.h (authenticate): Call openvas_authenticate to check
	credentials.

	* src/manage.h (authenticate): Ajust parameter type.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_AUTHENTICATE respond
	with error code on error.

	* src/CMakeLists.txt (TEMP): Split into LIB_TEMP and HEADER_TEMP.
	(manage): Pass openvas headers.

2009-05-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_delete_task_2.c: Add check of whether removal has been
	requested.

2009-05-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (create_report_file): Use stored start time.

2009-05-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/otp.c (process_otp_server_input): In SERVER_TIME_SCAN_END close
	current report after removing report and check if the current report
	still exists before writing to it.

2009-05-18  Matthew Mundell <matthew.mundell@greenbone.net>

	Bring FS based tasks up to date.

	* src/tasks_sql.h (init_manage_process): New function, was init_manage.
	(init_manage): Move body to init_manage_process.  Replace with placeholder
	function.
	(cleanup_manage_process): New function, was cleanup_manage.  Turn off task
	printing.
	(cleanup_manage): Rename cleanup_manage_process.
	(request_delete_task): New function.
	(delete_task): Move some of body to request_delete_task.

2009-05-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_modify_task_1.c: Declare name.  Correct init of name.

2009-05-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (init_omp): Doc return.

	* src/tasks_sql.h (init_manage): Return -1 on error instead of
	aborting.

	* ChangeLog: Add heading to last log.

2009-05-18  Matthew Mundell <matthew.mundell@greenbone.net>

	Ensure that task statuses are consistent on startup.

	* src/openvasmd.c (main): Call init_ompd.

	* src/tasks_sql.h (init_manage_process): New function, was init_manage.
	(init_manage): Move body to init_manage_process.  Replace with function
	that makes database consistent.  Adjust callers.
	(cleanup_manage_process): New function, was cleanup_manage.
	(cleanup_manage): Rename cleanup_manage_process.  Adjust callers.
	* src/manage.h: Update headers.

	* src/omp.c (init_omp, init_omp_process): New functions.
	(init_omp_data): Rename init_omp_process.  Adjust callers.
	* src/omp.h: Update headers.

	* src/ompd.c (init_ompd): New function.
	* src/ompd.h: Update headers.

2009-05-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.h (DO_CHILDREN, id_string): Move back to common.c.

	* src/tests/common.c (DO_CHILDREN, id_string): Move back from common.h.

	* src/tests/omp_modify_task_1.c: Use new ID STATUS return instead of
	searching in STATUS return.

	* ChangeLog: Log last commit.

2009-05-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/Doxyfile (EXTRACT_ALL): Turn off, to enable warnings about
	missing function docs.

2009-05-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/logf.h (LOG_FILE): Change extension to comm, as this file is only
	a log of communication.

	* src/openvasmd.c (main): Create log directory if required.

	* src/CMakeLists.txt: Remove making of log directory from install.

2009-05-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tasks_fs.h, src/tasks_sql.h: Update doc params.

	* src/manage.c (task_run_status_name): Add missing doc.

2009-05-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.c (task_status): New function.

	* src/tests/common.h (task_status): New header.

	* src/tests/omp_delete_task_0.c: Add check of whether removal has been
	requested.

2009-05-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): Extend the ID version of OMP
	STATUS to return more task information.

2009-05-15  Matthew Mundell <matthew.mundell@greenbone.net>

	Add an intermediate "delete requested" task state, and delete the task
	only after receiving the SCAN_END message from the server.

	* src/manage.h (task_status_t): Add TASK_STATUS_DELETE_REQUESTED.
	(request_delete_task): New header.
	(delete_task): Update header.

	* src/manage.c (task_run_status_name): Add TASK_STATUS_DELETE_REQUESTED.

	* src/tasks_sql.c (request_delete_task): New function.
	(delete_task): Move request parts to request_delete_task.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_DELETE_TASK call
	request_delete_task instead of delete_task.

	* src/otp.c (process_otp_server_input): In SERVER_TIME_SCAN_END call
	delete_task if a delete was requested.

2009-05-15  Matthew Mundell <matthew.mundell@greenbone.net>

	Add an intermediate "stop requested" task state, and set the task
	to "done" or "stopped" only when receiving the SCAN_END message
	from the server.

	* src/manage.h (task_status_t): Add TASK_STATUS_STOP_REQUESTED and
	TASK_STATUS_STOPPED.
	(task_run_status_name): New header.

	* src/manage.c (stop_task): Replace TASK_STATUS_DONE with
	TASK_STATUS_STOP_REQUESTED.
	(task_run_status_name): New function.

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_STATUS use
	task_run_status_name.

	* src/otp.c (process_otp_server_input): In SERVER_TIME_SCAN_END set
	task status to TASK_STATUS_STOPPED if a stop was requested.

2009-05-15  Michael Wiegand <michael.wiegand@greenbone.net>

	Initial set of changes to make Debian packaging work.

	* packaging/debian/compat: New. Sets debhelper compatibility level to
	5.

	* packaging/debian/control: Set dependencies for package.

	* packaging/debian/openvas-manager.dirs: New. Request creation of
	var/lib/openvas/mgr.

	* packaging/debian/openvas-manager.install: New. Request installation of
	the created binary.

	* packaging/debian/rules: Adjusted calls to cmake and make to make the
	package build as expected.

	* src/logf.h: Changed to honour OPENVAS_LOG_DIR because PREFIX might be
	in a different hierarchy than the appropriate place for the log file.

	* src/CMakeLists.txt: Define OPENVAS_LOG_DIR when compiling. Temporarily
	disabled directory creation since it broke Debian packaging; the mkdir
	should use DESTDIR, not CMAKE_INSTALL_PREFIX directly. Changed install
	to honour LIBDIR and BINDIR.

	* CMakeLists.txt: Make it possible to set different prefixes for
	individual directories; this is expected by Debian.

	* src/openvasmd.c: (cleanup) Better NULL guard for fclose since it
	seemed to somehow trigger a segfault in the packaged Debian binary when
	compiled on Lenny.

2009-05-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/new_task_empty_rc, src/tests/new_task_medium_rc: Remove old
	XML wrapper tags.

2009-05-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/new_task_small_rc (CLIENTSIDE_USERRULES): Add two rules.

	* src/manage.c (send_task_rules): New function.
	(start_task): Move required preferences to follow task preferences.
	Enable sending of task rules.

2009-05-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_delete_task_2.c: New file.  Tests removing a running
	task.

	* src/tests/CMakeLists.txt: Add omp_delete_task_2.

2009-05-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/otp.c (process_otp_server_input): Clear server_active in
	SERVER_BYE.  (Missing file from 2009-05-13 client exit commit.)

2009-05-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ovas-mngr-comm.c (sendn_to_server): New function.
	(send_to_server): Use sendn_to_server.

	* src/ovas-mngr-comm.h (sendn_to_server): New header.

	* src/manage.c (send_task_preferences): New function.
	(start_task): Send 0 if plugin set is empty.  Send server and plugin
	preferences.

2009-05-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_status_4.c: Correct test number in comment.

2009-05-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_start_task_2.c: New file.

	* src/tests/CMakeLists.txt: Add omp_start_task_2.

2009-05-13  Matthew Mundell <matthew.mundell@greenbone.net>

	Ensure that the manager process continues handling server messages if
	the client exits before the server has finished a running task.

	* src/manage.h (server_active): New header.

	* src/manage.c (server_active): New variable.
	(start_task): Mark server as active after starting task.

	* src/omp.h (server_is_active): New header.

	* src/omp.c (server_is_active): New function.

	* src/ompd.c (serve_omp): If the server is active when the client
	connection closes then only exit after the server is done.

2009-05-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_modify_task_1.c: Turn off verbosity.

2009-05-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_modify_task_1.c: New file.

	* src/tests/CMakeLists.txt: Add omp_modify_task_1.

	* src/tests/common.h (id_string): New header.

2009-05-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.c (DO_CHILDREN): Move to header.

	* src/tests/common.h (DO_CHILDREN): New macro, from common.c.

2009-05-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_status_3.c: Remove tracing.

2009-05-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_modify_task_0.c: Improve task name.

	* ChangeLog: Correct last log.

2009-05-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_status_4.c: Remove tracing.

2009-05-13  Michael Wiegand <michael.wiegand@greenbone.net>

	More post release version bumps for documentation and packaging.

	* doc/Doxyfile, doc/Doxyfile_full, CMakeLists.txt: Set to 0.5.1.SVN.

2009-05-12  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (cleanup): Check log_stream before closing.

2009-05-12  Michael Wiegand <michael.wiegand@greenbone.net>

	Post release version bump.

	* VERSION: Set to 0.5.1.SVN.

2009-05-12  Michael Wiegand <michael.wiegand@greenbone.net>

	* CMakeLists.txt: Added doc/generated to CPACK_SOURCE_IGNORE_FILES.

2009-05-12  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.c (DO_CHILDREN): Add back (accidentally removed
	yesterday).

2009-05-12  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/Doxyfile, doc/Doxyfile_full (INPUT): Revert to explicit file list.

	* doc/CMakeLists.txt (DOC_FILES): New variable.
	(.built-html, .built-html_full): Add back dependencies.

	* src/openvasmd.c (manpage): Adjust include for updated Doxyfile
	EXAMPLE_PATH.

2009-05-12  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/Doxyfile_full: Flush trailing whitespace.

2009-05-12  Michael Wiegand <michael.wiegand@greenbone.net>

	Made generated source code documentation more consistent with the
	documentation generated for other modules.

	* doc/Doxyfile: Adjusted a few settings to be consistent.

	* doc/Doxyfile_full: New. Provides a more complete documentation with
	call graphs and the like.

	* doc/CMakeLists.txt: Adjusted to provide the make doc and doc-full
	targets consistent with the other modules.

2009-05-11  Matthew Mundell <matthew.mundell@greenbone.net>

	Add an OMP HELP command.

	* src/omp.c (help_text): New variable.
	(client_state_t): Add CLIENT_HELP.
	(omp_xml_handle_start_element, omp_xml_handle_end_element): Add HELP
	handling.

	* src/tests/omp_help_0.c: New file.

	* src/tests/CMakeLists.txt: Add omp_help_0.

2009-05-11  Matthew Mundell <matthew.mundell@greenbone.net>

	Add a verbose flag.

	* src/ovas-mngr-comm.c (verbose): New variable.

	* src/tests/common.c (verbose): New variable.
	(TRACE): Enable.

	* src/openvasmd.c (main): Add verbose flag.

	* src/tracef.h (verbose): New header.
	(tracef): Honour verbose variable.

	* README: Update usage message.

2009-05-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/Doxyfile (INPUT): Add src/tasks_sql.h and src/tasks_fs.h.

	* src/openvasmd.c (\mainpage): Note src/tasks_sql.h and src/tasks_fs.h.

2009-05-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* README: Revert sentence about connecting as though to server.

2009-05-11  Matthew Mundell <matthew.mundell@greenbone.net>

	Address remaining warnings.

	* src/tasks_sql.h (sql_string): Return signed char.  Cast away signs.
	(append_to_task_string): Make "current" signed.
	(free_task): Remove.

	* src/manage.c (print_tasks): Direct out.

2009-05-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/otpd.c (serve_otp): Connect to server initially.

2009-05-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (task_plugins): Separate plugins with semicolons.

2009-05-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/Doxyfile (EXTRACT_STATIC): Enable.

	* src/ompd.c (serve_omp): Doc missing params.

	* src/file.c (G_LOG_DOMAIN): Add doc.

	* src/ompd.c (error_send_to_client): Add doc.

	* src/otp.c, src/manage.c: Add missing docs.

2009-05-08  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/CMakeLists.txt (install): Create PREFIX/var/lib/openvas/mgr/.

2009-05-08  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_start_element): Correct lengths in
	CLIENT_TOP comparisons.

2009-05-08  Matthew Mundell <matthew.mundell@greenbone.net>

	* README, INSTALL: Update requirements and descriptions.

2009-05-08  Michael Wiegand <michael.wiegand@greenbone.net>

	Preparing the openvas-manager 0.5.0 release.

	* CHANGES: New.

	* VERSION: Set to 0.5.0.

	* CMakeLists.txt: Adjusted version.

2009-05-08  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/CMakeLists.txt: Add SQLite linkage.  Move tests of support
	libraries before rest.  Order tests alphabetically.

2009-05-08  Matthew Mundell <matthew.mundell@greenbone.net>

	* CMakeLists.txt: Add check for SQLite3 library.

2009-05-08  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (start_task): Free task_plugins string after use.

2009-05-08  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (task_plugins): New function.
	(start_task): Request plugins listed in RC file instead of always
	requesting all plugins.
	(task_preference): Correct parsing.

2009-05-08  Matthew Mundell <matthew.mundell@greenbone.net>

	Ensure that the memory allocated in sql_string is always freed.

	* src/manage.h (task_name, task_comment, task_description)
	(task_start_time, task_end_time, task_attack_state): Drop const from
	return type.

	* src/manage.c (task_name, task_comment, task_description)
	(task_start_time, task_end_time, task_attack_state): Drop const from
	return type.
	(print_tasks, create_report_file, task_preference): Free task string
	elements after use.

	* src/tasks_fs.h (task_comment): New function.
	(task_name, task_description, task_start_time, task_end_time)
	(task_attack_state): Return duplicate of task element.

	* src/tasks_sql.h (append_to_task_string): Free return from sql_string
	after use.
	(task_name, task_comment, task_description, task_start_time)
	(task_end_time, task_attack_state): Drop const from return type.

	* src/omp.c (omp_xml_handle_end_element): Free task string elements after
	use.

	* src/otp.c (save_report): Free task_start_time return after use.

2009-05-08  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ovas-mngr-comm.c (sendf_to_server): New function.

	* src/ovas-mngr-comm.h (sendf_to_server): New header.

	* src/manage.c (task_preference): New function.
	(start_task): Use RC file targets instead of hardcoded target.
	(stop_task): Send STOP_WHOLE_TEST instead of STOP_ATTACK.

2009-05-07  Michael Wiegand <michael.wiegand@greenbone.net>

	* CMakeLists.txt: Added initial support for creating source and binary
	packages with CPack.

2009-05-06  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch to an embedded database for task storage, keeping file
	system based storage as an alternative.

	* src/tasks_fs.h: New file.

	* src/manage.c: Include tasks file according to TASKS_FS.  Move all
	code specific to the task representation to tasks_fs.h
	(report_task): Move the return to a parameter and return an error status.
	Adjust all callers.
	(print_tasks): Make comment and description const.
	(create_report_file, start_task, stop_task): Use task functions for
	accessing and incrementing values, instead of working with the task
	member.

	* src/tasks_sql.h: New file which implements database equivalents of
	the code moved to tasks_fs.h.

	* src/manage.h (init_manage, cleanup_manage, task_comment): New headers.
	(task_t, task_iterator_t): Add defininitions for database tasks.
	(report_task): Update header.
	(task_name, task_description, task_start_time, task_end_time)
	(task_attack_state): Make returns const.

	* src/omp.c: Always cast the NULL task.
	(init_omp_data): Call init_manage.

	* src/otp.c: Always cast the NULL task.

	* src/openvasmd.c (cleanup): Call cleanup_manage.

	* src/CMakeLists.txt (TASKS_CFLAG, TASKS_LDFLAG): New variables for
	controlling task backend.  Add to targets.
	(C_FILES): Add task include files.

2009-04-16  Matthew Mundell <matthew.mundell@greenbone.net>

	Improve the task abstraction by moving parsing of the task ID into
	find_task.  Separate out task code specific to the task representation.

	* src/manage.c: Reorder code to separate out representation-specific
	parts.
	(task_comment): New function.
	(free_task): Free attack_state.
	(make_task): Init start_time and end_time.
	(find_task): Update to take the ID as a string.
	(set_task_parameter): Replace IDENTIFIER parameter with NAME.

	* src/manage.h: Reorder headers.
	(find_task): Adjust header.

	* src/omp.c: Update find_task callers.

2009-04-14  Matthew Mundell <matthew.mundell@greenbone.net>

	Improve the task abstraction by accessing all task fields via functions
	and storing the current report in a global variable instead of in the
	task.

	* src/manage.c (current_report): New variable.
	(task_id, task_name, task_description, set_task_description)
	(task_run_status, set_task_run_status, task_start_time)
	(set_task_start_time, task_end_time, set_task_end_time)
	(task_report_count, task_attack_state, set_task_attack_state)
	(task_debugs_size, inc_task_debugs_size, task_holes_size)
	(inc_task_holes_size, task_infos_size, inc_task_infos_size)
	(task_logs_size, inc_task_logs_size, task_notes_size)
	(inc_task_notes_size): New functions.
	(free_task, make_task, create_report_file): Use new current_report
	variable.

	* src/manage.h: Add new headers.
	(fs_task_t): Remove current_report.

	* src/otp.c, src/omp.c: Use new task access functions and new global
	current_report.

2009-04-14  Matthew Mundell <matthew.mundell@greenbone.net>

	Improve task abstraction by changing task_t to a pointer and adding a
	task iterator.

	* src/manage.h (fs_task_t): New name for task_t.
	(task_t): Change to pointer to fs_task_t.  Update all users.
	(task_iterator_t): New struct.
	(task_count, init_task_iterator, next_task): New headers.
	(tasks_size, tasks, num_tasks): Remove.

	* src/manage.c (task_count, init_task_iterator, next_task): New functions.
	Update all task_t users.

	* src/otp.c: Update all task_t users.

	* src/omp.c: Update all task_t users.
	(omp_xml_handle_end_element): Add tracing and comment to
	CLIENT_DELETE_TASK case.  In CLIENT_STATUS iterate with task iterator.

2009-04-09  Matthew Mundell <matthew.mundell@greenbone.net>

	Write OTP report messages directly to the report on disk, instead of
	buffering the messages in memory.

	* src/manage.h (task_t): Correct run_status type.  Add current_report.
	Remove message arrays.
	(make_task): Adjust annotation.
	(make_report_id): Include in exportlocal annotation.

	* src/manage.c (free_message): Remove.
	(free_task, make_task): Handle current report.  Remove message array
	handling.
	(create_report_file): New function.  Body from src/otp.c save_report.
	(start_task): Create report stream before starting

	* src/otp.c (free_message): Enable.  Take only one arg.
	(write_message): Take stream and type args directly.
	(write_timestamp): Take host arg.
	(save_report): Just close the report stream.
	(append_timestamp): New function.
	(append_debug_message, append_hole_message, append_info_message)
	(append_log_message, append_note_message): Write the message to the report
	stream.
	(process_otp_server_input): Free current_message after appending it.
	Append timestamps in time cases.  In SERVER_DEBUG_OID and SERVER_HOLE_OID
	also check that the current_server_task exists.  Move report saving from
	HOST_END to SCAN_END.

2009-04-09  Michael Wiegand <michael.wiegand@greenbone.net>

	* src/tests/common.c: Added connect_to_manager_host_port, a modification
	of connect_to_manager which allows connections to arbitrary hosts and
	ports. Made connect_to_manager a wrapper around
	connect_to_manager_host_port using OPENVASMD_ADDRESS and OPENVASMD_PORT.

2009-04-08  Matthew Mundell <matthew.mundell@greenbone.net>

	Cleanup and annotate more, from Splint.

	* src/types.h: New file.

	* src/splint.h (g_malloc, g_malloc0, g_ptr_array_add, g_slist_append,
	g_hash_table_destroy): New headers.
	(dirent_pointer_pointer): Remove "out" annotation.

	* src/ompd.h: Turn off exportlocal around server_address.
	(to_client_start, to_client_end): Change to buffer_size_t.

	* src/ompd.c (from_buffer_size, from_client_start, from_client_end,
	from_server_start, from_server_end): Change to buffer_size_t.
	(read_from_server): Remove tracing.  Cast count for += and gnutls_perror.
	Add count assertion.
	(serve_omp): Use buffer_size_t format in tracefs.  Change lastfds and fds
	to uint8_t.  Make fds checks explicitly boolean.  Change initial_start
	to buffer_size_t.

	* src/otp.h: Turn off exportlocal around server.

	* src/otp.c (from_buffer_size): Change to buffer_size_t.
	(tcp_string, udp_string, other_string, empty_string): New variables.
	(port_protocol_name): Return refs to variables instead of strings.  Add
	shared annotation.
	(print_port): Update format specifier for type change.
	(current_message): Add only annotation.
	(make_message): Annotate.  Cast g_malloc return.
	(message_data_t): Annotate members temp.
	(append_debug_message, append_hole_message, append_info_message,
	append_log_message, append_note_message): Annotate message arg keep.
	(current_server_preference,	current_server_plugin_dependency_name,
	current_server_plugin_dependency_dependencies): Annotate only.
	(add_server_preference,
	append_to_current_server_plugin_dependency): Annotate args keep.
	(add_server_plugins_dependency): Annotate args keep.  Make assert
	explicitly boolean.
	(finish_current_server_plugin_dependency): Make assert explicitly
	boolean.
	(free_rule): Annotate rule arg.  Check rule before freeing.
	(add_server_rule): Change arg annotation to keep.
	(from_server_start, from_server_end): Change to buffer_size_t.
	(parse_server_preference_value, parse_server_preference_value): Make
	assert explicitly boolean. Cast char for memchr.
	(parse_server_plugin_dependency_dependency, parse_server_server): Make
	from_start and from_end	buffer_size_t.  Annotate dependent variables.
	Correct <|> checks.
	(sync_buffer): Use buffer_size_t format in tracef.
	(process_otp_server_input): Make from_start and from_end size_t.
	Annotate dependent variables.  Cast char for memchr.  Ensure pointer
	comparisons are explicitly boolean.  Use g_malloc0 instead of g_newa.

	* src/manage.h: Turn off exportlocal around report_path_task_name and
	report_task.
	(set_task_parameter): Add null annotation to arg.
	(port_t): Add unsigned to type of number.

	* src/manage.c (set_task_parameter): Fail if value is NULL.
	(start_task): Send ntp_opt_show_end "no".
	(grow_description): Remove tracing.
	(append_task_open_port): Check task->open_ports before use.  Cast away
	g_array_append_val return.

	* src/ovas-mngr-comm.c (end_session): Pass fcntl a long zero.  Handle
	gnutls_bye return.
	(to_server_buffer_space): Check end and start before use.  Cast return.
	(connect_to_server): Cast socklen_t for fprintf and size_t for
	gnutls_perror.  Use z modifier for size_t tracef.

	* src/omp.h (to_client_start, to_client_end): Change type to buffer_size_t.

	* src/omp.c (to_client_start, to_client_end): Change type to buffer_size_t.
	(current_client_task): Add dependent annotation.
	(xml_context): Initialise.
	(SEND_TO_CLIENT): Remove.
	(send_to_client, error_send_to_client): New functions.
	(SEND_TO_CLIENT_OR_FAIL): New macro.
	(omp_xml_handle_start_element, send_requirement, send_dependency,
	send_preference, send_rule, send_reports): Replace old SEND_TO_CLIENT macro
	with new functions.
	(omp_xml_handle_end_element): Use SEND_TO_CLIENT_OR_FAIL and new send
	functions instead of SEND_TO_CLIENT.  Always check current_task_task_id
	before use.  Change pointer comparisons to be explicitly boolean.
	(from_client_start, from_client_end): Change to buffer_size_t.
	(init_omp_data): Free xml_context before setting it.
	(process_omp_client_input): Check xml_context before use.

	* src/otpd.c (from_buffer_size, from_client_start, from_client_end,
	from_server_start, from_server_end): Change to buffer_size_t.
	(serve_otp): Use buffer_size_t format for tracef.  Make fds checks
	explicitly boolean.  Change initial_start to buffer_size_t.  Cast count
	for	gnutls_perror.

	* src/openvasmd.c (from_buffer_size, from_client_start, from_client_end,
	from_server_start, from_server_end): Change to buffer_size_t.
	(read_protocol): Pass fcntl a long zero.

2009-04-07  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* CMakeLists.txt, doc/CMakeLists.txt, doc/openvasmd.8.xml,
	src/CMakeLists.txt, src/file.c, src/file.h, src/logf.h,
	src/manage.c, src/manage.h, src/omp.c, src/omp.h, src/ompd.c,
	src/ompd.h, src/openvasmd.c, src/otp.c, src/otp.h, src/otpd.c,
	src/otpd.h, src/ovas-mngr-comm.c, src/ovas-mngr-comm.h, src/splint.h,
	src/string.c, src/string.h, src/task.h, src/tracef.h,
	src/tests/CMakeLists.txt, src/tests/common.c, src/tests/common.h,
	src/tests/make_report_id_0.c, src/tests/omp_abort_task_0.c,
	src/tests/omp_delete_report_0.c, src/tests/omp_delete_report_1.c,
	src/tests/omp_delete_task_0.c, src/tests/omp_delete_task_1.c,
	src/tests/omp_get_dependencies_0.c, src/tests/omp_get_dependencies_1.c,
	src/tests/omp_get_nvt_feed_all_0.c, src/tests/omp_get_nvt_feed_all_1.c,
	src/tests/omp_get_nvt_feed_checksum_0.c, src/tests/omp_get_nvt_feed_checksum_1.c,
	src/tests/omp_get_nvt_feed_details_0.c, src/tests/omp_get_nvt_feed_details_1.c,
	src/tests/omp_get_preferences_0.c, src/tests/omp_get_preferences_1.c,
	src/tests/omp_get_report_0.c, src/tests/omp_get_rules_0.c,
	src/tests/omp_get_rules_1.c, src/tests/omp_modify_report_0.c,
	src/tests/omp_modify_task_0.c, src/tests/omp_new_task_0.c,
	src/tests/omp_start_task_0.c, src/tests/omp_start_task_1.c,
	src/tests/omp_status_0.c, src/tests/omp_status_1.c,
	src/tests/omp_status_2.c, src/tests/omp_status_3.c,
	src/tests/omp_status_4.c, src/tests/omp_version_0.c,
	src/tests/report_path_task_name_0.c, src/tests/report_path_task_name_1.c,
	src/tests/report_path_task_name_2.c, src/tests/rmdir_recursively_0.c,
	src/tests/rmdir_recursively_1.c, src/tests/strip_space_0.c,
	src/tests/strip_space_1.c, src/tests/strip_space_2.c,
	src/tests/strip_space_3.c, packaging/debian/copyright:
	Transferred Copyright from Intevation to Greenbone Networks.

2009-04-01  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* packaging/debian/control: Lower dependecy for debhelper from 6 to 5.

	* packaging/debian/changelog: New. A initial stub.

	* packaging/debian/copyright: New.

	* packaging/debian/rules: New. Initial version, not fully functional yet.

2009-04-01  Michael Wiegand <michael.wiegand@greenbone.net>

	* src/tests/CMakeLists.txt: Added missing GLIB_CFLAGS to target properties.

2009-03-31  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.c (env_authenticate): Remove RATS annotation.

2009-03-31  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_delete_task_0.c: Test by checking status instead of
	counting tasks.

2009-03-31  Matthew Mundell <matthew.mundell@greenbone.net>

	Cleanup and annotate, from Splint.  Comment RATS annotations.

	* src/CMakeLists.txt (splint): Switch to +unixlib.

	* src/splint.h: Add page headings.
	(gerrorpointer): New type.
	(g_error_free, g_ptr_array_free, g_file_set_contents,
	g_build_filename): New headers.
	(g_base64_decode): Correct return type.
	(strncasecmp, symlink): Remove.
	(scandir): Annotate filter arg.  "allocate" instead of "define" *namelist.

	* src/ompd.c (serve_omp): Set fds to a char.

	* src/manage.h (task_t): Annotate open_ports.
	(delete_task): Change arg type to **.

	* src/omp.c (omp_xml_handle_end_element): Use new delete_task arg type
	in CLIENT_DELETE_TASK.

	* src/ovas-mngr-comm.c: Remove socklen_t typedef.
	(write_to_server_buffer): Cast size for gnutls_record_send.

	* src/openvasmd.c (main): Comment RATS annotations.

	* src/manage.c (make_report_id): Check id before freeing.
	(grow_tasks): Comment RATS annotation.
	(free_task): Complete "releases" annotation.  Check task->description
	before freeing.  Turn off "branchstate" around free_task.
	(only_dirent_pointer): New type.
	(load_tasks_free, save_task_error): New functions.
	(load_tasks): Check names after scandir.  Call a shared cleanup function
	instead	of jumping.  Free file_name at the end of each task iteration.
	(save_task): Call a shared cleanup function	instead	of jumping.  Check
	task->description before using it.
	(set_task_parameter): Annotate value arg.  Check parameter for tracef.
	Fail if parameter is NULL.  Check values before freeing them.  Always free
	value.
	(delete_reports): Initialise names.
	(delete_task): Take a pointer to the task pointer.  Set the task pointer
	NULL before successfully returning.
	(append_to_task_comment, append_to_task_identifier): Free task member
	before assigning.  strdup to a temp for Splint.
	(grow_description): Comment RATS annotation.  Change tracef specifier.
	(add_task_description_line): Compare return to integer.

2009-03-30  Matthew Mundell <matthew.mundell@greenbone.net>

	Cleanup and annotate, from Splint.

	* src/otp.c: Include unistd.h and splint.h.
	(set_message_description, set_message_oid,
	append_to_current_server_plugin_dependency): Annotate.  Describe freeing of args.
	(write_messages): Add whitespace.
	(save_report): Check make_report_id return.  Cast away rmdir and unlink
	returns in error cases.
	(maybe_free_server_preferences,
	maybe_free_server_plugins_dependencies,
	maybe_free_current_server_plugin_dependency): Remove.
	(make_server_preferences): Free preferences first.
	(add_server_preference, make_current_server_plugin_dependency): Annotate
	args.
	(make_server_plugin_dependencies): Free dependencies first.
	(free_rule): Annotate args.  Cast away g_ptr_array_free rule.
	(add_server_rule): Annotate args.
	(init_otp_data): Clear plugins_md5.
	(parse_server_plugin_dependency_dependency): Return gboolean instead of
	int.  Annotate args.  Cast char for memchr.
	(parse_server_server): Annotate args and vars.  Cast char for memchr.
	Remove call to make_server_plugins_dependencies.
	(process_otp_server_input): Annotate vars.  Initialise match.  Free
	server.plugins_md5 before setting.  Remove call to
	maybe_free_server_preferences.

	* src/otpd.c (from_buffer_size): Change int to size_t.
	(serve_otp): Change fds to a short.

	* src/openvasmd.c (from_buffer_size, from_client_start, from_server_start,
	from_server_end): Change types to size_t.

2009-03-30  Matthew Mundell <matthew.mundell@greenbone.net>

	Cleanup and annotate, from Splint.

	* src/omp.h: Include sys/types.h.
	(to_client_start, to_client_end): Change type to size_t.

	* src/omp.c: Include splint.h.
	(to_client_start, to_client_end): Change type to size_t.
	(current_task_task_id, modify_task_parameter, modify_task_value,
	xml_context, send_requirement, send_preference,
	omp_xml_handle_error): Annotate.
	(send_dependency): Annotate.  Free msg.
	(SEND_TO_CLIENT): Cast TO_CLIENT_BUFFER_SIZE to size_t.
	(omp_xml_handle_start_element): Annotate arguments.  Check save_task
	return.
	(send_reports): Change return to int.
	(omp_xml_handle_end_element): Annotate.  In CLIENT_GET_REPORT case
	check for credentials username and check g_file_get_contents return
	directly.  In CLIENT_STATUS cast send_reports return and free reponse.
	(omp_xml_handle_text): Annotate args.  Use append_text instead of
	append_string.
	(process_omp_client_input): Check g_markup_parse_context_parse return
	directly.  Check error before using.

	* src/ovas-mngr-comm.c: Change Splint socklen_t to typedef.  Include
	splint.h.
	(end_session): Return success if shutdown error is ENOTCONN.
	(write_string_to_server): Cast gnutls_record_send arg.

2009-03-30  Matthew Mundell <matthew.mundell@greenbone.net>

	Cleanup and annotate, from Splint.

	* src/ompd.h: (to_client_start, to_client_end): Change to size_t.

	* src/ompd.c: Define socket for Splint.
	(read_from_client, read_from_server): Mark alert_name dependent.
	(write_to_client): Cast count for tracef.
	(serve_omp): Note old functions.  Use a single ret variable.  Check the
	return from end_session.

	* src/string.h (string): New type.
	(append_text): New function.
	(append_string): Use string.
	(strip_space): Annotate.

	* src/string.c (append_text): New function.
	(append_string): Change chars to gchars.
	(free_string_var): Chage var type to string.

	* src/file.c (G_LOG_DOMAIN): New define.
	(g_propagate_error, g_set_error, g_dir_close): New annotated headers for
	Splint.
	(rmdir_recursively): Annotate g_return_val_if_fail call.  Check return
	from g_dir_open directly, and on failure check that temp_error is set.
	Remove duplicate cleanup calls.

2009-03-30  Matthew Mundell <matthew.mundell@greenbone.net>

	Cleanup and annotate, from Splint.

	* src/splint.h: New file.

	* src/manage.h (credentials_t): Null annotate username and password.
	(task_t): Change types to gsize.  Annotate description.
	(tasks, task_id_string, make_task, find_task, set_task_parameter,
	make_report_id, report_task): Annotate.
	(add_task_description_line): Change int to size_t.

	* src/manage.c: Include splint.h.
	(append_to_credentials_username, append_to_credentials_password): Use
	append_text.
	(make_report_id): Doc fail return.  Init uuid.  Check returns.
	(report_task): Check that username is set.  Free link_name afterwards.
	(delete_report): Check that username is set.  Check error before use.
	Free link_name is fail case.
	(set_report_parameter): Check that username is set.  Check return of
	g_file_set_contents directly.  Check error before use.
	(tasks): Annotate.
	(task_id_string): Use snprintf instead of sprintf.
	(print_tasks): Check index before use.
	(grow_tasks): Change return to boolean.  Turn off checks around realloc
	and return.  Change memset arg to int.  Correct tracef directive.
	(free_message): Annotate args.
	(free_task): Annotate args.  Cast for tracef.  Cast away g_ptr_array_free
	returns.
	(free_tasks): Check tasks first.
	(make_tasks): Free name and comment on failure.  Add safety check on
	tasks.  Cast for id.  Turn off checks around assignments.  Correct tracef
	directive.
	(load_tasks): Init names and comment.  Free names[index] for hidden files.
	Check g_file_get_contents return directly.  Check error before use.
	Remove freeing of name and comment on failure, as now done in make_task.
	(save_task): Check g_file_get_contents return directly.  Check error before
	use.  Use snprintf instead of sprintf.
	(save_tasks): Free dir_name.
	(find_task): Check tasks before using.  Compare to NULL explicitly.
	(set_task_parameter): Check parameter before use.
	(start_task): Cast away g_array_free return.  Cast size for g_array_new.
	(delete_reports): Anotate var.  Free names[index] for hidden files.
	(delete_task): Check return from rmdir_recursively directly.  Check error
	before use.
	(append_to_task_comment): Annotate arg.  Return integer explicitly.
	(append_to_task_identifier): Annotate arg.  Free task->name.  Return
	integer explicitly.  Correct return value.
	(grow_description): Change new_size to size_t.  Cast char for memset.
	(add_task_description_line): Use return from g_array_append_val.

2009-03-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.c (env_authenticate): Add "RATS: ignore" for getenv.

2009-03-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/CMakeLists.txt: Add omp_delete_report_1.

2009-03-28  Matthew Mundell <matthew.mundell@greenbone.net>

	Start implementing splint and RATS cleanups.

	* src/ovas-mngr-comm.h (end_session): Correct return type.
	(connect_to_server): Change argument "interrupted" to a gboolean.

	* src/ovas-mngr-comm.c: Define socklen_t for splint.  Include glib.
	Declare global vars static.  Move all local vars to beginnings of blocks.
	(make_session): Cast some returns to please splint.
	(send_to_server): Use memmove instead of memcpy, just to be sure.
	(connect_to_server): Change argument "interrupted" to a gboolean.  Cast
	the sizeof return to match the ret_len type.

	* src/otp.c: Define PREFIX.  Declare functions and vars static.  Move
	all local vars to beginnings of blocks.  Annotate most global vars as
	null.
	(process_otp_server_input): Add fallthrough to SERVER_INIT_SENT_VERSION
	case.

	* src/otpd.c: Move all local vars to beginnings of blocks.
	(serve_otp): Annotate reach.

2009-03-28  Matthew Mundell <matthew.mundell@greenbone.net>

	Start implementing splint and RATS cleanups.

	* src/manage.h (append_to_credentials_username): Change third arg to
	gsize.
	(current_server_task): Annotate as null.

	* src/manage.c: Define g_free with annotation for splint.  Include
	string and strings.  Define PREFIX.  Declare functions and vars static.
	Move all local vars to beginnings of blocks.  Annotate global vars as null.
	(append_to_credentials_username, append_to_credentials_password): Append
	with append_string.
	(report_path_task_name): Change type of path2_length to size_t.
	(print_tasks): Use standard ternary format.
	(grow_tasks): Add "RATS: ignore" to realloc.
	(grow_description): Add "RATS: ignore" to realloc.  Clear new memory.

	* src/file.c: Declare fchdir for splint.  Move all local variable
	declarations to beginnings of blocks.
	(rmdir_recursively): Cast variables to quiet splint.

	* src/string.h (append_string, free_string_var): Drop arg names.
	(strip_space): Annotate return as shared.

2009-03-28  Matthew Mundell <matthew.mundell@greenbone.net>

	Start implementing splint and RATS cleanups.

	* src/openvasmd.c: Conditionalise some includes for splint.  Correct
	the openvas includes.
	(cleanup): Move the OMP freeing note to src/ompd.c.
	(handle_signal): Remove.
	(handle_sigint, handle_sighup, handle_sigterm): New functions.
	(main): Separate signal handlers.

	* src/omp.c: Define PREFIX.  Declare functions and vars static.
	Annotate global null vars.  Move all local vars to beginnings of
	blocks.
	(send_reports): Correct freeing of msg and names.
	(omp_xml_handle_end_element): Add block for CLIENT_NEW_TASK case.  Free
	response in CLIENT_STATUS case.

	* src/ompd.c: Declare functions and vars static.  Move all local
	variable declarations to beginnings of blocks.  Add missing includes.
	(read_from_client, read_from_server, write_to_client): Cast variables
	to quiet splint.  Annotate dummy arguments.
	(write_to_server): Annotate fallthrough cases.
	(serve_omp): Add OMP freeing note from src/openvasmd.c.  Cast
	variables.

2009-03-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/logf.h: Include stdlib.
	(logf): Cast getpid return.  Check fflush return.

	* src/tracef.h: Include stdlib.
	(tracef): Cast getpid return.  Check fflush return.

2009-03-28  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/CMakeLists.txt (splint, rats, flawfinder, check, etags, ctags,
	tags): New targets.
	(ovas-mngr-comm): Add Glib C flags.

2009-03-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_delete_task_1.c: Read report ID from response.

2009-03-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): Always respond to the client,
	in CLIENT_DELETE_REPORT.

	* src/tests/omp_delete_report_1.c: New test.  Tests DELETE_REPORT with
	empty ID.

2009-03-24  Matthew Mundell <matthew.mundell@greenbone.net>

	Add more tests.

	* src/tests/make_report_id_0.c, src/tests/omp_delete_task_1.c,
	src/tests/omp_get_dependencies_0.c, src/tests/omp_get_dependencies_1.c,
	src/tests/omp_get_nvt_feed_all_0.c, src/tests/omp_get_nvt_feed_all_1.c,
	src/tests/omp_get_nvt_feed_checksum_0.c,
	src/tests/omp_get_nvt_feed_checksum_1.c,
	src/tests/omp_get_nvt_feed_details_0.c,
	src/tests/omp_get_nvt_feed_details_1.c,
	src/tests/omp_get_preferences_0.c, src/tests/omp_get_preferences_1.c,
	src/tests/omp_delete_report_0.c, src/tests/omp_get_report_0.c,
	src/tests/omp_get_rules_0.c, src/tests/omp_get_rules_1.c,
	src/tests/omp_modify_report_0.c, src/tests/omp_start_task_1.c,
	src/tests/omp_status_1.c, src/tests/omp_status_2.c,
	src/tests/omp_status_3.c, src/tests/omp_status_4.c,
	src/tests/report_path_task_name_0.c, src/tests/report_path_task_name_1.c,
	src/tests/report_path_task_name_2.c: New tests.

	* src/tests/CMakeLists.txt: Add rules for new tests.

2009-03-21  Matthew Mundell <matthew.mundell@greenbone.net>

	Switch to universal report identifiers.

	* src/manage.h (make_report_id, report_path_task_name, report_task): New
	headers.

	* src/manage.c (make_report_id, report_path_task_name, report_task): New
	functions.
	(delete_report, set_report_parameter): Switch to UUIDs.

	* src/omp.c (send_reports): Switch to UUIDs.  Free all names on	send fail.
	(omp_xml_handle_end_element): Switch to UUIDs for reports.  Correct
	response tag in CLIENT_GET_REPORT.

	* src/otp.c (save_report): Switch to UUIDs.

	* src/CMakeLists.txt: Add -lossp-uuid to openvasmd.

2009-03-20  Matthew Mundell <matthew.mundell@greenbone.net>

	Add a task status enumeration.  Rename task_t running slot to run_status.

	* src/manage.h (task_status_t): New type.
	(task_t): Rename running to run_state.

	* src/manage.c (make_task, start_task, stop_task): Use new task status
	enum.

	* src/omp.c (omp_xml_handle_end_element): Use new task status enum.

	* src/otp.c (process_otp_server_input): Use new task status enum.

2009-03-20  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* packaging/: New.

	* packaging/debian: New.

	* packaging/debian/control: New. First approaches for
	Debian packaging.

2009-03-19  Matthew Mundell <matthew.mundell@greenbone.net>

	Add per-report directories.  Add initial OMP MODIFY_REPORT.

	* src/omp.c (client_state_t): Add MODIFY_REPORT states.
	(omp_xml_handle_start_element, omp_xml_handle_text): Add MODIFY_REPORT
	 handling.
	(omp_xml_handle_end_element): In CLIENT_GET_REPORT get the report from the
	report's directory.  Add MODIFY_REPORT handling.

	* src/otp.c (save_report): Save report to a dedicated directory.

	* src/manage.h (set_report_parameter): New header.

	* src/manage.c (set_report_parameter): New function.
	(delete_report): Account for per-report directory.

2009-03-19  Matthew Mundell <matthew.mundell@greenbone.net>

	Update OTP BYE handling for reconnecting to the server during an OMP
	session.

	* src/openvasmd.c (serve_client): Move session creation and freeing to
	src/ovas-mngr-comm.c.
	(serve_client): Pass server_socket pointer to serve_omp.

	* src/ovas-mngr-comm.c (make_session, end_session): New functions, from
	src/openvasmd.c.
	(connect_to_server): Improve message slightly.

	* src/ovas-mngr-comm.h (make_session, end_session): New headers.

	* src/ompd.c (serve_omp): Take a pointer to the server socket instead
	of the server socket.  On receiving server BYE recreate the server
	socket and session.

	* src/ompd.h (serve_omp): Add arguments.

	* src/otp.c (process_otp_server_input): Read over whitespace at start of
	SERVER_INIT_SENT_VERSION.  In SERVER_BYE add success case and correct the
	"need more input" return value.

2009-03-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ompd.c (serve_omp): Revert bogus typo correction.

2009-03-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (omp_xml_handle_end_element): Free name in CLIENT_GET_REPORT
	case.

2009-03-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (send_reports): Use scandir's report_name directly, instead
	of wrapping it in a g_path_get_basename.

2009-03-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (delete_report): Add @return doc.

	* ChangeLog: Fixup pathnames for today's entries.

2009-03-13  Matthew Mundell <matthew.mundell@greenbone.net>

	Reactivate BYE-initiated server socket shutdown.

	* src/otp.c (process_otp_server_input): Return a unique value on receiving
	BYE.

	* src/ompd.c (serve_omp): Shutdown server socket according to
	process_otp_server_input return.

2009-03-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ompd.c (serve_omp): Correct typo and formatting.

2009-03-13  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (stop_task, start_task): Correct conditions of running checks.

2009-03-13  Matthew Mundell <matthew.mundell@greenbone.net>

	Ensure that delete_task also removes the symlinks to the directory of
	all the user's reports.

	* src/manage.h (delete_report): Add const to arg.

	* src/manage.c (delete_report): Add const to arg.
	(delete_reports): New function.
	(delete_task): Call delete_reports to delete reports.

2009-03-13  Matthew Mundell <matthew.mundell@greenbone.net>

	Move report deleting into manage library.

	* src/manage.c (delete_report): New function.

	* src/manage.h (delete_report): New header.

	* src/omp.c (omp_xml_handle_end_element): Use new function delete_report.

2009-03-12  Matthew Mundell <matthew.mundell@greenbone.net>

	Add OMP DELETE_REPORT.

	* src/otm.c (client_state_t): Add DELETE_REPORT states.
	(omp_xml_handle_start_element, omp_xml_handle_end_element,
	omp_xml_handle_text): Add DELETE_REPORT handling.

2009-03-12  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/otp.c (save_report): Move the actual report into the task directory.

2009-03-11  Matthew Mundell <matthew.mundell@greenbone.net>

	Add per-user reports directories.

	* src/otp.c (save_report): Save the report to the report directory of the
	user and link the report to the task directory, instead of saving to the
	task directory.

	* src/omp.c (omp_xml_handle_end_element): Get the report from the user
	report directory instead of the task directory.  Ensure the report name
	has the right format.  Free content_error.  Free current_task_task_id in
	the fail case.

2009-03-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (output_reports_xml): Rename to send_reports.
	(send_reports): Rename from output_reports_xml.  Add doc.

2009-03-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (client_state_t): Add GET_REPORT states.
	(omp_xml_handle_start_element, omp_xml_handle_end_element,
	omp_xml_handle_text): Add GET_REPORT handling.

2009-03-10  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.c (wait_for_task_end): New function.

	* src/tests/common.h (wait_for_task_end): New header.

2009-03-10  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/omp.c (output_reports_xml): New function.
	(omp_xml_handle_end_element): Add reports to STATUS response
	in case where STATUS is given a task ID.

2009-03-10  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/otp.c (process_otp_server_input): Add "done" task state.

	* src/omp.c (omp_xml_handle_end_element): Add "done" task state.

2009-03-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/manage.c (delete_task): Correct error check.

2009-03-02  Matthew Mundell <matthew.mundell@greenbone.net>

	Add "Requested" task running state.  Correct STATUS_RESPONSE tags and
	CLIENT_MODIFY_TASK variable usage.

	* src/otp.c (process_otp_server_input): Update task running state
	on receiving SCAN_START.

	* src/omp.c (omp_xml_handle_end_element): Add printing of new running
	state.  Rename TASK_STATUS entity in TASK in STATUS_RESPONSE to STATUS.
	Correct STATUS_RESPONSE closing tags.  In CLIENT_MODIFY_TASK case
	use local var instead of setting current_client_task.

	* src/manage.h (task_t): Note new running state.

2009-03-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.c: Turn off some tracing.
	(DO_CHILDREN, id_string, wait_for_task_start, delete_task): New functions.

	* src/tests/common.h (delete_task, wait_for_task_start): New headers.

	* src/tests/omp_abort_task_0.c, src/tests/omp_start_task_0.c,
	src/tests/omp_modify_task_0.c, src/tests/omp_modify_task_0.c: Wait for
	server with	wait_for_task_start.  Delete task on exit.

2009-03-01  Matthew Mundell <matthew.mundell@greenbone.net>

	Reduce number of gotos.

	* src/ompd.c (read_from_server): Retry with while instead of goto.

	* src/omp.c (send_dependency): Move SEND_TO_CLIENT destination to end
	of function.
	(omp_xml_handle_end_element): Neaten indentation.

	* src/openvasmd.c (read_protocol): Retry with while instead of goto.

	* src/otp.c (parse_server_done, parse_server_preference_value,
	parse_server_rule, parse_server_plugin_dependency_dependency,
	parse_server_server, sync_buffer): New functions.
	(process_otp_server_input): Call new parsing and sync functions instead
	of jumping.  Return immediately instead of jumping to fail code.  Use
	g_strdup instead of strdup.  Drop make_message return checks.

	* src/manage.c (load_tasks, save_task): Move fail destinations to ends
	of functions.

2009-02-28  Matthew Mundell <matthew.mundell@greenbone.net>

	Add env_authenticate and use it in tests.

	* src/tests/common.c: Reorder functions.
	(env_authenticate): New function.

	* src/tests/common.h: Reorder headers.
	(env_authenticate): New header.

	* src/tests/omp_new_task_0.c, src/tests/omp_version_0.c,
	src/tests/omp_delete_task_0.c, src/tests/omp_abort_task_0.c,
	src/tests/omp_start_task_0.c, src/tests/omp_modify_task_0.c,
	src/tests/omp_status_0.c: Use env_authenticate instead of authenticate.

2009-02-28  Matthew Mundell <matthew.mundell@greenbone.net>

	Start separating the implementation into components.

	* src/openvasmd.c: Move most functions and variables out to new files.
	Improve	implementation notes in @file.
	(free_g_ptr_array): Remove old function.
	(OMP): Remove old directive.
	(BUFFER_SIZE): Rename FROM_BUFFER_SIZE.
	(from_buffer_size): New variable.

	* src/logf.h, src/manage.c, src/manage.h, src/otp.c, src/otp.h, src/omp.c,
	src/omp.h, src/ompd.c, src/ompd.h, src/otpd.c, src/otpd.h: New files.

	* src/tracef.h (TRACE, TRACE_TEXT): New directive, previously in
	openvasmd.c.

	* src/file.c: Include unistd.h.

	* src/string.c (free_string_var, append_string): New functions, previously
	in openvasmd.c.

	* src/string.h (free_string_var, append_string): New headers.

	* src/ovas-mngr-comm.c (write_string_to_server, write_to_server_buffer):
	New functions, previously in openvasmd.c.
	(to_server_buffer_space): New function.
	(BUFFER_SIZE): Rename TO_SERVER_BUFFER_SIZE.

	* src/ovas-mngr-comm.h (write_string_to_server, write_to_server_buffer,
	to_server_buffer_space): New headers.

	* src/CMakeLists.txt: Build new libraries.

	* src/tests/CMakeLists.txt: Add GLIB path to strip_space LDFLAGS.

	* doc/CMakeLists.txt (.build-html): Add new files.

	* doc/Doxyfile (INPUT): Add new files.

2009-02-23  Matthew Mundell <matthew.mundell@greenbone.net>

	Update commands to clear current_task_task_id after use.

	* src/openvasmd.c (free_string_var, append_string): New functions.
	(omp_xml_handle_start_element): Leave clearing of current_task_task_id
	to omp_xml_handle_end_element.
	(omp_xml_handle_end_element): Free current_task_task_id after use.
	(omp_xml_handle_text): Append to string variables with append_string.
	(serve_omp): Note exit behaviour.

2009-02-23  Matthew Mundell <matthew.mundell@greenbone.net>

	Use shared functions for starting tasks.  Authenticate only once per
	session, for now.

	* src/tests/common.c (sendf_to_manager, start_task): New functions.

	* src/tests/common.h (sendf_to_manager, start_task): New headers.

	* src/tests/omp_abort_task_0.c: Use start_task.  Send actual task ID.
	Authenticate once per session.

	* src/tests/omp_delete_task_0.c: Improve task name.

	* src/tests/omp_start_task_0.c: Authenticate once.

	* src/tests/omp_modify_task_0.c: Improve task name.  Authenticate once.
	Send actual task ID.

	* src/tests/omp_status_0.c: Use start_task.  Authenticate once.

2009-02-22  Matthew Mundell <matthew.mundell@greenbone.net>

	Cleanup docs.  Neaten XML strings.  Rename XML_RESPOND to
	SEND_TO_CLIENT.  Update load_tasks to loop through dirs forwards
	instead of sorting dirs backwards.

	* src/openvasmd.c: Cleanup docs.  Neaten XML strings.
	(ahplasort): Remove.
	(load_tasks): Loop through dirs forwards instead of sorting backwards.
	(set_task_parameter): Add const to parameter argument.
	(XML_RESPOND): Remove, rename SEND_TO_CLIENT.
	(SEND_TO_CLIENT): New macro, previously XML_RESPOND.
	(omp_xml_handle_end_element): Move OMP_VERSION_RESPONSE attribute to
	entity.

	* src/ovas-mngr-comm.c: Correct doc typos.

	* src/tests/common.c: Cleanup docs.  Add @file doc.

	* src/tests/omp_version_0.c: Move expected attribute to entity.

	* doc/CMakeLists.txt: Run Doxygen in top-level dir to get relative paths.

	* doc/Doxyfile: Adjust paths for running in top-level dir.

2009-02-21  Matthew Mundell <matthew.mundell@greenbone.net>

	Add Base64 task file handling.  Add new library with function
	rmdir_recursively.  Add tests of rmdir_recursively.  Update DELETE_TASK
	to remove the task directory on	disk.  Update tests to use shared
	functions for creating tasks.

	* src/file.h, src/file.c, src/tests/new_task_empty_rc,
	src/tests/new_task_medium_rc, src/tests/new_task_small_rc,
	src/tests/rmdir_recursively_0.c, src/tests/rmdir_recursively_1.c: New
	files.

	* src/openvasmd.c: Include new file library.
	(free_task): Reduce tracing.
	(save_tasks): Add a comment.
	(modify_task): Remove, was for old OMP spec.
	(set_task_parameter): Clarify doc.  Add base64 task file handling.
	(delete_task): Update to remove task directory.
	(omp_xml_handle_end_element): Add base64 task file handling.
	(serve_client): Enable cipher and mac.

	* src/CMakeLists.txt: Add file library.

	* src/tests/CMakeLists.txt: Add tests rmdir_recursively_0 and
	rmdir_recursively_1.

	* src/tests/common.c (create_task_from_rc_file, create_task): New
	functions.
	(add_entity): Clarify doc.
	(compare_entities): Add NULL checks.  Correct typo.

	* src/tests/common.h (create_task_from_rc_file, create_task): New headers.

	* src/tests/omp_start_task_0.c, src/tests/omp_status_0.c: Use
	create_task_from_rc_file.  Read task description from file instead of var.

	* src/tests/omp_modify_task_0.c: Use create_task.

	* src/tests/omp_new_task_0.c: Neaten XML string.  Get and use actual task
	ID.

	* src/tests/omp_delete_task_0.c: Use create_task_from_rc_file.

2009-02-20  Matthew Mundell <matthew.mundell@greenbone.net>

	Add OMP AUTHENTICATE.  Remove handling of first OMP specification.

	* src/openvasmd.c (credentials, login, process_omp_old_client_input,
	RESPOND): Remove.
	(client_state_t): Add authentication states.
	(credentials_t): New type.
	(current_credentials): New variable.
	(append_to_credentials_password, append_to_credentials_username,
	authenticate, free_credentials): New functions.
	(tasks): Clarify doc.
	(load_tasks): Return if tasks already loaded.  Use username from
	current_credentials.  Free tasks on error.
	(save_tasks): Check if tasks are loaded.  Use username from
	current_credentials.
	(save_report): Use username from current_credentials.
	(omp_xml_handle_end_element, omp_xml_handle_start_element,
	omp_xml_handle_text): Add AUTHENTICATE handling.  Set error parameter on
	error.
	(omp_xml_handle_error): Remove abort call.
	(process_omp_client_input): Add some error trace messages.
	(serve_omp): Note behaviour on process_omp_client_input error.
	(serve_client): Neaten some formatting.
	(accept_and_maybe_fork): Remove task loading now done after	authentication.
	(cleanup): Adjust credential freeing.

	* src/tests/common.c (authenticate): New function.
	(compare_entity_with_name, entity_child, entity_name, entity_text): Add doc.
	(read_entity): Check context_data.first has been set before accessing
	member.

	* src/tests/common.h (authenticate): New function.

	* src/tests/omp_new_task_0.c, src/tests/omp_version_0.c,
	src/tests/omp_abort_task_0.c, src/tests/omp_delete_task_0.c,
	src/tests/omp_start_task_0.c, src/tests/omp_modify_task_0.c,
	src/tests/omp_status_0.c: Add authentication.

2009-02-19  Matthew Mundell <matthew.mundell@greenbone.net>

	Add saving of reports and tasks on disk.  Rename "reports" to
	"messages".  Move port code up to a dedicated page.  Check for alerts
	on TLS error.  Explicitly set all TLS priorities.

	* src/openvasmd.c (ahplasort, free_message, load_tasks, print_port,
	port_protocol_name, save_report, save_task, save_tasks, set_message_oid,
	task_id_string, write_message, write_messages, write_timestamp): New
	functions.
	(report_t): Rename message_t.
	(message_t): New type previously named report_t.
	(current_report): Rename current_message.
	(current_message): New var previously named current_report.
	(make_report, set_report_description, append_debug_report,
	append_hole_report, append_info_report, append_log_report,
	append_note_report): Rename with "message" instead of "report".
	(make_message, set_message_description, append_debug_message,
	append_hole_message, append_info_message, append_log_message,
	append_note_message): New functions previously named with "report".
	(message_data_t): New type.
	(task_t): Add report_count.
	(free_task): Free messages with free_message instead of free_rule.
	(make_task): Clarify return doc.  Init report count.
	(find_task): Correct while style.
	(set_task_parameter): Also set description_size when setting description.
	(append_to_task_comment, append_to_task_identifier, delete_task,
	grow_description, start_task, stop_task): Add direction to @params.
	(serve_otp, read_from_client, read_from_server, read_protocol): Check for
	alerts on TLS error.
	(omp_xml_handle_end_element): Output actual report count for STATUS.
	(process_omp_server_input): Set message OIDs with set_message_oid instead
	of set_message_description.  Save report to disk on receiving HOST_END.
	(serve_client): Explicitly set all TLS priorities instead of using
	gnutls_set_default_priority, in order to match the server's priorities.
	(accept_and_maybe_fork): Load tasks at start of child and save tasks at
	end of child.

	* Changelog: Replace some space offsets with tabs.

2009-02-09  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (client_state_t, omp_xml_handle_start_element,
	omp_xml_handle_end_element): Add dummy GET_NVT_FEED_ALL,
	GET_NVT_FEED_CHECKSUM and GET_NVT_FEED_DETAILS handling.

2009-02-06  Matthew Mundell <matthew.mundell@greenbone.net>

	Add OMP GET_DEPENDENCIES and GET_RULES.  Correct OTP rule parsing.

	* src/openvasmd.c (free_g_slist, send_dependency, send_preference,
	send_requirement, send_rule): New functions.
	(client_state_t, omp_xml_handle_start_element,
	omp_xml_handle_end_element): Add GET_DEPENDENCIES and GET_RULES handling.
	(current_server_plugin_dependency_dependencies,
	make_server_plugins_dependencies, add_server_plugins_dependency,
	make_current_server_plugin_dependency,
	maybe_free_current_server_plugin_dependency,
	finish_current_server_plugin_dependency): Use a list for the requirements
	instead of an array.
	(server_t, maybe_free_server_rules, make_server_rules,
	add_server_rule): Track rules size.
	(print_preference): Rename to send_preference.
	(process_omp_server_input): In OTP rule parsing, check for end marker
	before searching for semicolon.

2009-02-06  Michael Wuegand <michael.wiegand@greenbone.net>

	* doc/CMakeLists.txt: Fixed syntax error which caused the build process
	to fail.

2009-02-05  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/CMakeLists.txt: Only install manpage if xmltoman is installed.

2009-02-05  Matthew Mundell <matthew.mundell@greenbone.net>

	Add OMP GET_PREFERENCES.  Retry reading from server on error.

	* src/openvasmd.c (BUFFER_SIZE): Increase.
	(grow_description): Fix trace message.
	(client_state_t, omp_xml_handle_start_element,
	omp_xml_handle_end_element): Add GET_PREFERENCES handling.
	(print_preference): New function.
	(read_from_server): Retry the recv on error, up to 5 times.

2009-02-04  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_delete_task_0.c: New file.
	* src/tests/omp_delete_task_0: Remove.

2009-02-04  Matthew Mundell <matthew.mundell@greenbone.net>

	Add test of DELETE_TASK.

	* src/tests/CMakeLists.txt: Add omp_delete_task_0.

	* src/tests/omp_delete_task_0.c: New file.

2009-02-04  Matthew Mundell <matthew.mundell@greenbone.net>

	Add a few entity access functions.

	* src/tests/common.c (entity_text, entity_name, compare_entity_with_name,
	entity_child): New functions.

	* src/tests/common.h: Declare new functions.

2009-02-04  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (free_task, delete_task): New functions.
	(free_tasks): Move single task freeing to free_task.
	(make_task): Add a comment.
	(omp_xml_handle_start_element, omp_xml_handle_end_element,
	omp_xml_handle_text): Add DELETE_TASK handling.

	* ChangeLog: Correct function name on 2009-02-03 entry.

2009-02-03  Matthew Mundell <matthew.mundell@greenbone.net>

	Add test of ABORT_TASK.

	* src/tests/CMakeLists.txt: Add omp_abort_task_0.

	* src/tests/omp_abort_task_0.c: New file.

2009-02-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/omp_start_task_0.c: Correct comment.

2009-02-03  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (stop_task): New function.
	(omp_xml_handle_start_element, omp_xml_handle_end_element,
	omp_xml_handle_text): Add ABORT_TASK handling.

2009-02-02  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.h (close_manager_connection): New function.

	* src/tests/common.c (close_manager_connection): New function.
	(send_to_manager): Add a trace message.
	(print_entity): Flush stream afterwards.

	* src/tests/omp_modify_task_0.c, src/tests/omp_new_task_0.c,
	src/tests/omp_start_task_0.c, src/tests/omp_version_0.c:
	Use close_manager_connection.

	* src/tests/omp_status_0.c: Add expected problem counts.
	Use close_manager_connection.

2009-02-02  Matthew Mundell <matthew.mundell@greenbone.net>

	Add OTP problem report handling (DEBUG, HOLE, INFO, NOTE).  Fix
	errors in append_task_open_port and omp_xml_handle_end_element.
	Update the OMP read loop to only try fill the read buffers once per
	select.

	* src/openvasmd.c (server_state_t): Add problem report states.
	(task_t): Add problem report members.
	(free_tasks): Free problem report arrays.
	(make_task): Initialise problem report arrays.
	(start_task): Add required client preferences.
	(add_task_description_line): Correct comment.
	(append_task_open_port): Increment open_ports_size instead of open_ports.
	(report_t): New type.
	(current_report): New variable.
	(make_report, set_report_description, append_debug_report,
	append_hole_report, append_info_report, append_log_report,
	append_note_report): New functions.
	(omp_xml_handle_end_element): Free modify_task_value instead of
	freeing modify_task_parameter twice.  Add problem report counts to status
	response.
	(process_omp_server_input): Add problem report handling.
	(serve_omp): Only try fill the read buffers once per select instead of
	reading and handling as much as possible before selecting again (as
	introduced on 2008-12-10).  This is to ensure that the client or server
	is read when the other party is writing alot.

2009-01-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c: (omp_xml_handle_end_element): Flush whitespace from
	task response XML.

2009-01-26  Matthew Mundell <matthew.mundell@greenbone.net>

	Improve entity reading and comparison.

	* src/tests/common.h: (add_entity, free_entity, print_entity,
	print_entities, compare_entities): New functions.
	(entities_t, entity_t): New types.

	* src/tests/common.c: (add_entity, compare_entities, foreach_print_entity,
	free_entity, make_entity, print_entity, print_entities): New functions.
	(context_data_t): New type.
	(handle_start_element, handle_end_element handle_text, read_entity): Read
	the entire element.

	* src/tests/omp_modify_task_0.c, src/tests/omp_new_task_0.c,
	src/tests/omp_start_task_0.c, src/tests/omp_status_0.c,
	src/tests/omp_version_0.c: Use new entity reading and comparison.

2009-01-26  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/common.c: Match comments to style guide.

2009-01-20  Matthew Mundell <matthew.mundell@greenbone.net>

	Do server connection and initialisation lazily, when the first command
	is written to the server.  Start OMP STATUS TASK_ID handling.  Add OTP
	BYE handling.  Ensure that grow_description allocates enough memory.

	* src/ovas-mngr-comm.c: (connect_to_server): New function.

	* src/ovas-mngr-comm.h: Match style guide.
	(connect_to_server): New function.

	* src/openvasmd.c: (server_initialising): Remove.
	(client_state_t): Add CLIENT_STATUS_TASK_ID.
	(server_state_t): Add SERVER_BYE.
	(server_init_state_t): New type.
	(server_init_state, server_init_offset): New variables.
	(set_server_init_state, write_string_to_server): New functions.
	(start_task): Neaten formatting.
	(append_to_task_identifier): Correct doc return.
	(grow_description): Add minimum increment argument.
	(add_task_description_line): Pass grow_description minimum increment.
	(omp_xml_handle_start_element, omp_xml_handle_end_element,
	omp_xml_handle_text): Use NULL instead of 0.  Start XML STATUS TASK_ID
	handling.
	(omp_xml_handle_error): Describe error in message.
	(process_omp_server_input): Moving writing of server initialisation
	messages to write_to_server.  Add OTP BYE handling.
	(write_to_server): Add server connecting and sending of initialisation
	messages (moved here from process_omp_server_input and serve_client).
	(process_omp): Account for new initialisation mechanism.
	(serve_client): Move server connecting to write_to_server (via new
	function connect_to_server).

2009-01-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/Doxyfile (INPUT): Add string.c and tracef.h.

	* doc/CMakeLists.txt: Add string.c and tracef.h to .built-html rule dependencies.
	Drop dependencies from doc rule that are covered by .built-html.

2009-01-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ovas-mngr-comm.c: Add TRACE define.  Move @file comment to beginning.

2009-01-18  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/string.h: Add header comment.

	* src/string.c: Add header and @file comments.  Match comment docs to style guide.

	* src/tracef.h: Add header and @file comments.  Match comment docs to style guide.

2009-01-18  Matthew Mundell <matthew.mundell@greenbone.net>

	Add simple test of XML OMP STATUS.

	* src/tests/omp_status_0.c: New file.

	* src/tests/CMakeLists.txt: Add new test.

	* ChangeLog: Correct file name on previous entry.

2009-01-18  Matthew Mundell <matthew.mundell@greenbone.net>

	Add initial XML OMP STATUS and improve server initialisation.

	* src/openvasmd.c: (client_state_t): Add CLIENT_STATUS.
	(start_task): Add space before parenthesis.
	(process_omp_old_client_input): Fixup formatting.
	(omp_xml_handle_start_element, omp_xml_handle_end_element,
	omp_xml_handle_text): Add STATUS handling.  Let default case handle all
	0 assertions.
	(process_omp_server_input): In server init case check for enough input
	and process all available input.
	(read_from_client, read_from_server): Improve formatting and trace message.
	(serve_omp): Only read from client after server has initialised.

	* ChangeLog: Correct file name on previous entry.

2009-01-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/Doxyfile: Turn off JAVADOC_AUTOBRIEF.

2009-01-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c: Match comments to coding style.

	* src/ovas-mngr-comm.c: Match comments to coding style.

2009-01-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (server_context, xml_context, port_protocol_t,
	port_t): Add comments docs.
	(append_to_task_comment, append_to_task_identifier): Correct doc for
	length param.

2009-01-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/Doxyfile (INPUT): Add ovas-mngr-comm.c.

	* doc/CMakeLists.txt: Add ovas-mngr-comm.c to doc depends.

2009-01-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ovas-mngr-comm.c: Fix a few file doc typos.

2009-01-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/ovas-mngr-comm.c (send_to_server): Add space after function name.

2009-01-16  Matthew Mundell <matthew.mundell@greenbone.net>

	Add simple test of XML OMP START_TASK.

	* src/tests/omp_start_task_0.c: New file.

	* src/tests/CMakeLists.txt: Add new test.

2009-01-16  Matthew Mundell <matthew.mundell@greenbone.net>

	Add initial XML OMP START_TASK.

	* src/openvasmd.c: (client_state_t): Add START_TASK states.
	(modify_task_task_id): Rename current_task_task_id.
	(omp_xml_handle_start_element, omp_xml_handle_end_element,
	omp_xml_handle_text): Add START_TASK handling.

2009-01-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c: Convert tabs to spaces.

	* ChangeLog: Correct previous entry.

2009-01-16  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	Started to move communication with server to a module
	of its own.

	* src/ovas-mngr-comm.c: New. Contains functionality
	for communication with openvas-server factored out
	from openvasmd.c.

	* src/ovas-mngr-comm.h: New. Protos for respective API.

	* src/openvasmd.c (send_to_server, to_server, to_server_end):
	Removed. This is now
	part of the new module ovas-mngr-comm.

	* src/CMakeLists.txt: Added handling for module ovas-mngr-comm.

2009-01-15  Matthew Mundell <matthew.mundell@greenbone.net>

	Add simple tests of XML OMP OMP_VERSION, NEW_TASK and MODIFY_TASK.

	* src/tests/common.c, src/tests/common.h, src/tests/omp_modify_task_0.c,
	src/tests/omp_new_task_0.c,	src/tests/omp_version_0.c: New files.

	* src/tests/CMakeLists.txt: Add config library and new tests.

2009-01-15  Matthew Mundell <matthew.mundell@greenbone.net>

	Add initial XML OMP NEW_TASK and MODIFY_TASK.  Document functions.

	* src/openvasmd.c (client_state_t): New type.
	(client_state, modify_task_parameter, modify_task_task_id,
	modify_task_variable): New variables.
	(append_to_task_comment, append_to_task_identifier, set_client_state,
	set_task_parameter): New functions.
	(add_task_description_line): Add const qualifer to parameter.
	(omp_xml_handle_start_element, omp_xml_handle_end_element,
	omp_xml_handle_text): Add comment docs.  Add NEW_TASK and
	MODIFY_TASK.
	(omp_xml_handle_error): Add comment doc.

2009-01-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/tests/strip_space_0.c, src/tests/strip_space_1.c,
	src/tests/strip_space_2.c, src/tests/strip_space_2.c: Add file header
	comments.

2009-01-15  Matthew Mundell <matthew.mundell@greenbone.net>

	* INSTALL: Correct Cmake command.

2009-01-15  Matthew Mundell <matthew.mundell@greenbone.net>

	Start XML OMP handling.

	* src/openvasmd.c (xml_context): New variable.
	(process_omp_old_client_input): New function with old
	process_omp_client_input code.
	(process_omp_client_input): Start XML parsing.
	(XML_RESPOND, omp_xml_handle_start_element,
	omp_xml_handle_end_element, omp_xml_handle_text,
	omp_xml_handle_error): New functions.
	(serve_omp): Add XML parser and context initialisation.

2009-01-09  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	Turned TO_SERVER into a method and changed all calls.

	* src/openvasmd.c (TO_SERVER): Transformed this macro into
	method send_to_server.
	(send_to_server): New. Functionlity of TO_SERVER, but returns 1
	for error instead of goto statement.
	(start_task, process_omp_server_input): Changed calls from
	TO_SERVER macro to send_to_server method and did according cleanups.

2008-12-23  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* src/Makefile: Removed. It is overwritten by cmake anyway.

2008-12-23  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	* INSTALL: Added information about the prefix setting for cmake.

2008-12-22  Matthew Mundell <matthew.mundell@greenbone.net>

	* CMakeLists.txt: Enable testing.

	* src/CMakeLists.txt: Add string library and a tests subdirectory.

	* src/string.h, src/string.c, src/tracef.h, tests/, tests/CMakeLists.txt,
	tests/strip_space_0.c, tests/strip_space_1.c, tests/strip_space_2.c,
	tests/strip_space_3.c: New.

	* src/openvasmd.c (tracef): Move to tracef.h.
	(strip_space): Rework.  Move to string.c.
	(process_omp_server_input): Correct from_start and input updating in
	<|> field loop.  Correct and update call to strip_space.

2008-12-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (process_omp_server_input): Improve open port number
	parsing.

2008-12-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (serve_otp): Use a flag instead of a goto when
	writing to the fd.

2008-12-19  Matthew Mundell <matthew.mundell@greenbone.net>

	Add server PORT command handling.

	* src/openvasmd.c (append_task_open_port): New function.
	(free_tasks): Free open_ports.
	(make_task, start_task): Init open_ports.
	(port_protocol_t, port_t): New types.
	(process_omp_server_input): Add PORT handling.

2008-12-19  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c: Convert tabs to spaces.

2008-12-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (write_to_client, write_to_server): New functions.
	(serve_omp): Describe and simplify the select loop.  Move writing code
	out to new functions write_to_client and write_to_server.

2008-12-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c: Drop the OVAS_SSL directive in favour of always
	compiling secure transmission.

2008-12-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c: (strip_space): Correct terminating check.
	(make_task, serve_client): Replace goto loops with structured loops.
	(process_omp_client_input, process_omp_server_input): Format signatures
	like rest of file.
	(process_omp_server_input): Finish TIME HOST_END handling.  Move the
	out of memory destination to be a fail case.

2008-12-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c: (set_server_state): New function.
	(process_omp_server_input): Always set the server state via
	set_server_state, to reduce the amount of tracing code.

2008-12-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c: Replace \return with @return in comment docs.

2008-12-16  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (current_server_task): New variable.
	(set_task_ports): New function.
	(process_omp_client_input): Turn off messages tracing.  Separate some
	of the response codes.  Use a local variable for the task in the
	START_TASK case.
	(process_omp_server_input): Turn off messages tracing.  Add TIME and
	STATUS message handling.

2008-12-12  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (read_from_client, read_from_server
	read_protocol): Improve function docs.

2008-12-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c: Bring code documentation up to date.

2008-12-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c (process_omp_client_input): Replace use of asprintf
	with g_strdup_printf.

2008-12-11  Matthew Mundell <matthew.mundell@greenbone.net>

	* CMakeLists.txt: Prefix paths in variables with CMAKE_INSTALL_PREFIX.

	* src/CMakeLists.txt: Drop hard coded include paths.

2008-12-10  Matthew Mundell <matthew.mundell@greenbone.net>

	* openvasmd.c: Convert tabs to spaces.

2008-12-10  Matthew Mundell <matthew.mundell@greenbone.net>

	* openvasmd.c (OPENVASMD_ADDRESS): Remove.
	(main): Bind to INADDR_ANY by default.

2008-12-10  Matthew Mundell <matthew.mundell@greenbone.net>

	* openvasmd.c (serve_otp, read_protocol, serve_client):
	Drop EAGAIN and EINTR checks from OVAL_SSL cases.

2008-12-10  Matthew Mundell <matthew.mundell@greenbone.net>

	After selecting, ensure that all input is read before the fd is
	selected again.  Start handling server input: preferences, plugins
	dependencies and rules.  Improve server input field parsing.

	* openvasmd.c: Prefix tracing messages with 3 spaces.  Improve a few
	comments.
	(strip_space): Only strip spaces.
	(TO_SERVER, start_task): Update fail destination.
	(serve_otp, read_protocol): Compare GNUTLS_E_REHANDSHAKE to count
	instead of errno.
	(RESPOND): Update to revert parsing on fail.  Update fail destination.
	(process_omp_client_input): Update to revert parsing on start_task and
	RESPOND failure.  Update RESPOND fail destination.
	(process_omp_server_input): Only update from_server_start after
	TO_SERVER, in case TO_SERVER fails.  On successful exit, reset the
	from_server buffer.  In the SERVER_DONE handling only strip spaces,
	exit if there are too few characters in the message and move messages
	along on success.  Add preference, rule and plugins dependencies
	handling.  Improve the check for <|>.
	(serve_omp): Compare count to GNUTLS_E_REHANDSHAKE instead of errno.
	Move reading out to new functions read_from_client and
	read_from_server.  After selecting, ensure that all input is read
	before the fd is selected again, including the cases where processing
	of the input must wait for space in one of the output buffers
	to_server and to_client.  Drop the EAGAIN and EINTR check from
	the OVAL_SSL cases.
	(current_server_preference, current_server_plugin_dependency_name,
	current_server_plugin_dependency_dependencies): New variables.
	(free_g_ptr_array, maybe_free_server_preferences,
	make_server_preferences, add_server_preference,
	maybe_free_server_plugins_dependencies,
	make_server_plugins_dependencies, add_server_plugins_dependency,
	make_current_server_plugin_dependency,
	append_to_current_server_plugin_dependency,
	maybe_free_current_server_plugin_dependency,
	finish_current_server_plugin_dependency, free_rule,
	maybe_free_server_rules, make_server_rules, add_server_rule,
	read_from_client, read_from_server): New functions.

2008-12-03  Matthew Mundell <matthew.mundell@greenbone.net>

	Add more OMP commands, start adding server communication.

	* openvasmd.c: Add server records.  Add some task allocation tracing.
	(free_tasks, make_task): Correct looping.
	(current_task): Rename current_client_task;
	(tracef, logf): Flush trailing semicolons.
	(CLIENT_READ, CLIENT_WRITE): Rename FD_CLIENT_*.
	(SERVER_READ, SERVER_WRITE): Rename FD_SERVER_*.
	(find_task, modify_task, start_task, strip_space): New functions.
	(process_omp_input): Rename to process_omp_client_input.
	(process_omp_client_input): Rename from process_omp_input. Add
	beginnings of MODIFY_TASK, START_TASK and STATUS.
	(process_omp_server_input): New function.
	(TO_SERVER): New macro.
	(serve_omp): Add server init and process_omp_server_input call.
	Improve formatting.
	(accept_and_maybe_fork): Add client socket shutdowns.  Move client socket
	close out of OVAS_SSL case.

2008-11-27  Matthew Mundell <matthew.mundell@greenbone.net>

	Add OMP commands OTP_VERSION, LOGIN and NEW_TASK.

	* openvasmd.c (task_t, grow_tasks, free_tasks, make_task): New.
	(grow_description, add_task_description_line): New.
	(RESPOND, process_omp_input): New.
	(serve_omp): Handle OTP_VERSION, LOGIN and NEW_TASK.
	Convert tabs to spaces.

2008-11-26  Matthew Mundell <matthew.mundell@greenbone.net>

	Add choosing of protocol based on first message.

	* openvasmd.c (OMP, serve_otp, serve_client): New.
	(read_protocol, serve_client): New.
	(accept_and_maybe_fork): Call serve_client instead
	of serve_omp.
	(serve_omp): Move OTP code to serve_otp.

2008-11-21  Matthew Mundell <matthew.mundell@greenbone.net>

	* README: Update for new build system.

2008-11-21  Matthew Mundell <matthew.mundell@greenbone.net>

	* doc/CMakeLists.txt: Ensure html/ exists.

	* doc/Doxyfile: Correct paths.

	* doc/openvasmd.8.xml: Add header comment.

2008-11-21  Matthew Mundell <matthew.mundell@greenbone.net>

	Add cmake build support and a manpage.

	* Makefile: Removed.

	* footer.html, Doxyfile: Removed (moved to doc/).

	* CMakeLists.txt, doc/, doc/CMakeLists.txt, INSTALL,
	src/CMakeLists.txt,	doc/openvasmd.8.xml: New.

	* doc/footer.html, doc/Doxyfile: New (moved from ..).

2008-11-21  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c: Flesh out \mainpage.  Add parameters to function
	docs.  Clean up docs a little.
	(OVM_OS_NAME): rename OPENVAS_OS_NAME.

2008-11-20  Michael Wiegand <michael.wiegand@greenbone.net>

	* README: Fixed typo.

2008-11-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmc.c: Add Doxygen documentation.

	* Doxyfile, footer.html: New.

2008-11-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c: Drop the *_PORT_OVERRIDE directives.  Turn off
	tracing.
	(main): Add option processing.
	(handle_signal): Add SIGINT handling.

	* src/Makefile: Add flags for glib.

2008-11-17  Matthew Mundell <matthew.mundell@greenbone.net>

	* src/openvasmd.c: Rename directives for consistency.

2008-11-11  Jan-Oliver Wagner <jan-oliver.wagner@greenbone.net>

	Starting module "openvas-manager".

	* COPYING, ChangeLog, README, src/Makefile, src/openvasmd.c: New.
