2009-12-21  Michael Wiegand <michael.wiegand@intevation.de>

	Preparing the openvas-manager 0.9.8 release.

	* CHANGES: Updated.

2009-12-18  Matthew Mundell <matthew.mundell@intevation.de>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_CREATE_AGENT require
	an installer.

2009-12-21  Felix Wolfsteller <felix.wolfsteller@intevation.de>

	* CMakeLists.txt: Don't ignore necessary files when creating the source
	tarball.

2009-12-17  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	* src/otp.c (process_otp_scanner_input): In SCANNER_SERVER correct
	scanner state for "DEBUG".

2009-12-16  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* CMakeLists.txt: Add fullstop to Description.

2009-12-15  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* src/tests/omp_help_0.c (help_text): Add new commands.

2009-11-27  Felix Wolfsteller <felix.wolfsteller@intevation.de>

	* CMakeLists.txt: Switched method of svn revision extraction to
	"offline" check.

2009-11-27  Felix Wolfsteller <felix.wolfsteller@intevation.de>

	* CMakeLists.txt: Made wording more consistent.

2009-11-27  Felix Wolfsteller <felix.wolfsteller@intevation.de>

	* src/tasks_sql.h: Minor doc improvement.

2009-11-27  Felix Wolfsteller <felix.wolfsteller@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	* CMakeLists.txt: Corrected version string change that was left over
	from debugging.

2009-11-26  Felix Wolfsteller <felix.wolfsteller@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* src/manage.c (start_task): Only do the credential iteration if the
	target has a credential.

2009-11-25  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	* src/omp.c (latex_header): Added fix to allow special characters like
	umlauts in latex/pdf reports.

2009-11-20  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* src/tasks_sql.h (copy_config): Correct format type in SQL string.

2009-11-20  Felix Wolfsteller <felix.wolfsteller@intevation.de>

	* src/manage.c (latex_print_verbatim_text): Escape ampersands, as we
	are in a tabular environment.

2009-11-20  Felix Wolfsteller <felix.wolfsteller@intevation.de>

	* src/manage.c (start_task): Corrected preference string to send for
	(SMB) local security checks .

2009-11-20  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* src/manage.c (start_task): Corrected preference strings for
	"credential" preferences to send.

2009-11-19  Felix Wolfsteller <felix.wolfsteller@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	* src/tasks_sql.h (init_manage): Set requested and running reports to
	stopped.

2009-11-18  Matthew Mundell <matthew.mundell@intevation.de>

	* src/tasks_sql.h (init_nvt_preference_iterator): Order by name ascending.

2009-11-17  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* src/tasks_sql.h: Format migration procedure like other comments.  Add a
	description of NVT selectors.

2009-11-17  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* src/tasks_sql.h (insert_rc_into_config): Also cache the config counts in
	the growing case.

2009-11-16  Matthew Mundell <matthew.mundell@intevation.de>

	* src/tasks_sql.h (switch_representation): Free selector after last use.
	Free quoted_selector.

2009-11-15  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* src/tasks_sql.h (manage_db_version): Check version instead of number.

2009-11-10  Felix Wolfsteller <felix.wolfsteller@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* src/tasks_sql.h (init_nvt_preference_iterator): Filter out
	client-specific and server_info preferences.

2009-11-03  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* src/tasks_sql.h: Correct revision number in comment.

2009-10-31  Matthew Mundell <matthew.mundell@intevation.de>

	* src/tasks_sql.h: Update migrator comments about appending columns.

2009-10-31  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* src/lsc_user.c (ssh_privkey_create): Quote passwords for openssl.

2009-10-24  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	* src/lsc_user.c: Add fullstops to a few comments.  Convert printfs to
	g_debugs.

2009-10-24  Matthew Mundell <matthew.mundell@intevation.de>

	* src/lsc_user.c: Make docs and comments consistent.

2009-10-24  Matthew Mundell <matthew.mundell@intevation.de>

	* src/lsc_user.c: Tidy.  Match formatting to standard.

2009-10-24  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* src/lsc_user.c: Remove alternate sections.  Add missing __FUNCTION__
	args to g_debug's.

2009-10-23  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* src/tests/omp_get_preferences_2.c: Correct test number.

2009-10-23  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* src/tasks_sql.h (init_manage): Init current_credentials.

2009-10-20  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* src/tests/omp_start_task_0.c: Also expect REPORT_ID in response.

2009-10-19  Matthew Mundell <matthew.mundell@intevation.de>

	* src/tests/omp_get_status_5.c: Add FINISHED to REPORT_COUNT in
	expected response.

2009-10-19  Matthew Mundell <matthew.mundell@intevation.de>

	* src/openvasmd.c (cleanup): Add comment to #endif.

2009-10-19  Matthew Mundell <matthew.mundell@intevation.de>

	* src/tasks_sql.h (manage_nvt_preference_add): Make args const.
	* src/manage.h: Update header.

2009-10-19  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* src/omp.c (convert_to_newlines): Handle backslashes not followed by
	'n' or 'r' correctly.

2009-10-19  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* src/manage.c (rc_preference): Check whether there is a value to
	duplicate after an equal sign.

2009-10-16  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* src/tasks_sql.h (set_task_parameter): Remove all task files when
	setting RC file.

2009-10-15  Matthew Mundell <matthew.mundell@intevation.de>

	* src/manage.c (get_files_to_send): Cleanup a little formatting.
	(start_task): Update LSC comment.

2009-10-15  Felix Wolfsteller <felix.wolfsteller@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* src/omp.c (omp_xml_handle_end_element): Free modify_task_file.

2009-10-12  Matthew Mundell <matthew.mundell@intevation.de>

	* src/tasks_sql.h (delete_task): Delete task files too.

2009-10-12  Matthew Mundell <matthew.mundell@intevation.de>

	* src/tasks_sql.h (manage_task_update_file): Add missing arg to sql call.

2009-10-12  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* src/tasks_sql.h (report_notes, report_warnings): Add missing args to
	calls.

2009-10-09  Matthew Mundell <matthew.mundell@intevation.de>

	* src/tasks_sql.h (report_holes): Add missing arg to call.

2009-10-09  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* src/tasks_sql.h (init_manage): Log database versions on version failure.

2009-10-06  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	* src/tasks_sql.h (DATABASE_VERSION): Increase to 1, for column added
	2009-08-28.

2009-09-28  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* INSTALL: Note need for om user.

2009-09-28  Matthew Mundell <matthew.mundell@intevation.de>

	* CMakeLists.txt: Set minimum cmake version to 2.6.

2009-09-28  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* src/ompd.c, src/otpd.c: Add missing arg docs.

2009-09-25  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* src/openvasmd_log_conf.cmake_in (*): Send logs to openvasmd.log
	instead of openvas.log.

2009-09-25  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* src/tests/common.h: Adjusted include.

2009-09-25  Felix Wolfsteller <felix.wolfsteller@intevation.de>

	* 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@intevation.de>

	* src/tests/rmdir_recursively_0.c,
	src/tests/rmdir_recursively_1.c: Remove.

2009-09-24  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	Remove the file library, which is out of use.

	* src/file.c, src/file.h: Remove.

2009-09-22  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* src/tests/omp_create_task_2.c: Update predefined config name.

2009-09-18  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* src/omp.c (max_hosts): Subtract network and broadcast from count.

2009-09-15  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* src/logf.h (LOG): Set to 0.  That is, turn off compilation of
	communication logging.

2009-09-14  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* src/omp.c (send_nvt): Correct NVT name accessor.

2009-09-14  Matthew Mundell <matthew.mundell@intevation.de>

	* src/omp.c (omp_xml_handle_end_element): Add missing
	CLIENT_MODIFY_TASK_NAME case.

2009-09-14  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* src/tests/common.c (OPENVASMD_PORT): Change to 9390.

2009-09-01  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* src/oxpd.c: Quote in cpp error message with double quotes.

2009-08-31  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* CMakeLists.txt: Set project language.  Add CMP0005 policy check.

2009-08-31  Matthew Mundell <matthew.mundell@intevation.de>

	* src/tasks_sql.h (setup_full_config_prefs): Add parameters.
	(init_manage): Add more predefined configs.

2009-08-28  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* src/CMakeLists.txt (openvasmd): Remove -lpcap.

2009-08-27  Matthew Mundell <matthew.mundell@intevation.de>

	* src/tests/omp_get_targets_0.c: Add MAX_HOSTS checks.

2009-08-27  Matthew Mundell <matthew.mundell@intevation.de>

	* src/tests/omp_delete_target_0.c: Correct comment.

2009-08-27  Matthew Mundell <matthew.mundell@intevation.de>

	* src/openvasmd_report_html.xsl: Note error involving preceding.

2009-08-27  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* src/tasks_sql.h (init_manage): Ensure that the predefined database
	entries always exists.

2009-08-26  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* src/omp.c: Always free the returns from scan_start_time and
	scan_end_time.

2009-08-26  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* src/omp.c (omp_xml_handle_end_element): Add back progress calculation
	lost with tracing.

2009-08-25  Matthew Mundell <matthew.mundell@intevation.de>

	* src/omp.c (omp_xml_handle_end_element): Add progress tracing to
	CLIENT_GET_STATUS.

2009-08-25  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* src/openvasmd.d (accept_and_maybe_fork): Add FORK define, for compiling
	to run in single process.

2009-08-24  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* src/manage.c (stop_task): Only stop the current task if it's the
	given task.

2009-08-21  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* src/logf.h (logf): Turn off comm logging and log error if fflush fails,
	instead of aborting.

2009-08-20  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* src/tasks_sql.h (make_result): Quote description for SQL.

2009-08-20  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* src/ovas-mngr-comm.c (connect_to_server): Get error message from
	getsockopt return instead of errno.

2009-08-20  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* src/tests/omp_get_configs_3.c: Match config name to test.

2009-08-18  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* src/otp.c (rmdir_recursively): Close pwd after use.

2009-08-17  Matthew Mundell <matthew.mundell@intevation.de>

	* src/otp.c (parse_server_certificate_public_key): Add missing semicolon.

2009-08-17  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* src/openvasmd.c (cleanup): Add "Exiting" message.

2009-08-14  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* src/tests/omp_get_certificates_1.c: Expect the status in an attribute.

2009-08-14  Matthew Mundell <matthew.mundell@intevation.de>

	* src/tests/omp_get_nvt_feed_checksum_5.c: Correct expected status.

2009-08-14  Matthew Mundell <matthew.mundell@intevation.de>

	* src/tests/omp_get_preferences_1.c: Check response parts instead of
	comparing to an expected entity.

2009-08-14  Matthew Mundell <matthew.mundell@intevation.de>

	* src/tests/read_protocol_0.c: Correct typo in heading.

2009-08-14  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* src/ompd.c (write_to_server): In SERVER_INIT_GOT_PLUGINS also request
	certificates.

2009-08-14  Matthew Mundell <matthew.mundell@intevation.de>

	* src/omp.c (omp_xml_handle_end_element): In CLIENT_GET_NVT_DETAILS
	free current_uuid.

2009-08-14  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	* src/tracef.h (tracef): Add format string to g_log call.

2009-08-13  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* src/tasks_sql.h (insert_rc_into_config): Leave trailing paren off
	section name.

2009-08-12  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* src/tasks_sql.h (delete_report): Remove transaction, as
	delete_reports calls delete_report inside an iterator.

2009-08-11  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* src/tests/tasks_sql.h (delete_report, create_target, delete_config):
	Wrap SQL statements in transactions.

2009-08-11  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* src/tests/omp_start_task_3.c: Correct expected status.

2009-08-11  Matthew Mundell <matthew.mundell@intevation.de>

	* src/manage.c (start_task): Add trace to fail case.

2009-08-11  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* src/tracef.h (tracef): Convert the message to UTF-8 before logging.

2009-08-10  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* src/tests/omp_get_targets_0.c: Compare strcmps to 0.  Correct return.

2009-08-07  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* src/tests/omp_get_report_5.c: Match task name to test.

2009-08-06  Matthew Mundell <matthew.mundell@intevation.de>

	* src/tests/common.c (next_entities): Add NULL guard.

2009-08-05  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* src/openvasmd_report_html.xsl: Lay the report out more like the
	client PDF report.

2009-07-29  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	* src/openvasmd_log_conf.cmake: Remove quotes from "prepend" key.

2009-07-28  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* src/tests/common.c (omp_get_report): Add format to GET_REPORT XML.

2009-07-24  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* src/tasks_fs.h: Remove.

2009-07-22  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* doc/proto_postgres.sql (meta): Type nvts_md5sum.

2009-07-20  Matthew Mundell <matthew.mundell@intevation.de>

	* doc/proto_postgres.sql: New file.  Broad database prototype.

2009-07-20  Matthew Mundell <matthew.mundell@intevation.de>

	* src/openvasmd.c (main): Set log handlers for comm and otp domains.

2009-07-20  Matthew Mundell <matthew.mundell@intevation.de>

	* src/openvasmd_log_conf.cmake: Add comm section.

2009-07-20  Matthew Mundell <matthew.mundell@intevation.de>

	* src/omp.c (G_LOG_DOMAIN): Correct name.

2009-07-20  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* src/tasks_sql.c (init_manage): Insert the "om" user if the users
	table is empty.

2009-07-17  Matthew Mundell <matthew.mundell@intevation.de>

	* src/tasks_sql.c (init_manage): Remove sqlite3_finalize that was for
	the table-per-user model.

2009-07-16  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* src/openvasmd.c (serve_client): Leave the lowat value alone.

2009-07-15  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* src/tests/read_protocol_0.c: Increase sleep.  Remove extra read from
	fail case.

2009-07-15  Matthew Mundell <matthew.mundell@intevation.de>

	* src/manage.c (delete_report): Remove the last report link.

2009-07-14  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* src/ovas-mngr-comm.c (end_session): Remove full stop from perror string.

2009-07-13  Matthew Mundell <matthew.mundell@intevation.de>

	* src/ompd.c (recreate_session): Remove close, which is done in
	end_session.

2009-07-13  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* src/manage.c (send_task_preferences): Send less of the whitespace around
	the fields.

2009-07-08  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* src/tasks_sql.h (inc_task_infos_size): Increment infos instead of
	holes.

2009-07-07  Matthew Mundell <matthew.mundell@intevation.de>

	* src/tasks_sql.h (set_task_end_time, set_task_start_time): Free time.

2009-07-07  Matthew Mundell <matthew.mundell@intevation.de>

	* src/manage.c (create_report_file): Initialise cache files.

2009-07-07  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* src/otp.c (save_report): Correct file name.

2009-07-06  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* CMakeLists.txt (CMAKE_BUILD_TYPE): Set to debug.

2009-07-03  Matthew Mundell <matthew.mundell@intevation.de>

	* src/oxpd.h (READ_PROTOCOL_TIMEOUT): Increase.

2009-07-03  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* src/ompd.c (serve_omp): Only select on client for exceptions when
	client is active.

2009-07-02  Matthew Mundell <matthew.mundell@intevation.de>

	* src/ompd.c (serve_omp): Improve the "safe to select" comment a bit.

2009-07-02  Matthew Mundell <matthew.mundell@intevation.de>

	* src/oxpd.c (read_protocol): Log what is read.

2009-07-02  Matthew Mundell <matthew.mundell@intevation.de>

	* src/omp.c (send_plugin): Send a dummy checksum.

2009-07-02  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	* src/omp.c (send_to_client): Trace when out of space.

2009-06-30  Matthew Mundell <matthew.mundell@intevation.de>

	* src/omp.c (omp_xml_handle_end_element): Add report_count to
	the plural GET_STATUS response.

2009-06-29  Matthew Mundell <matthew.mundell@intevation.de>

	(start_task): Use send_to_server instead of sendf_to_server for constant
	string.

2009-06-29  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* src/ompd.c (serve_omp): Eagerly initiate the OTP server connection.

2009-06-29  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* src/openvasmd.c (serve_client): Remove server socket closing, which
	is now done in end_session.

2009-06-29  Matthew Mundell <matthew.mundell@intevation.de>

	* src/tasks_sql.h (set_task_parameter): Convert rcfile before storing it
	in database.

2009-06-29  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* src/ovas-mngr-comm.c (sendn_to_server): Trace when out of space.

2009-06-29  Matthew Mundell <matthew.mundell@intevation.de>

	* src/ovas-mngr-comm.c (TO_SERVER_BUFFER_SIZE): Increase.

2009-06-24  Matthew Mundell <matthew.mundell@intevation.de>

	* src/tasks_sql.h (init_manage_process): Ensure that the
	OPENVAS_STATE_DIR "mgr/" directory exists.

2009-06-24  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* src/tests/common.c (omp_get_status): Return statuses of all tasks if
	ID is NULL.

2009-06-22  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* src/tests/common.h: Add multiple-include guard.

2009-06-18  Matthew Mundell <matthew.mundell@intevation.de>

	* src/openvasmd.c (main): Neaten formatting.

2009-06-18  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* src/ompd.c (recreate_session): New function.
	(serve_omp): Move session creation to recreate_session.

2009-06-18  Matthew Mundell <matthew.mundell@intevation.de>

	* src/ompd.c (write_to_server): Change OTP username and password.

2009-06-18  Michael Wiegand <michael.wiegand@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* src/manage.c, TODO: Move note about communication functions to TODO.

2009-06-16  Matthew Mundell <matthew.mundell@intevation.de>

	* src/ompd.c (serve_omp): Remove lastfds tracing.

2009-06-16  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* src/oxpd.c: Enable FROM_BUFFER_SIZE check.

2009-06-16  Matthew Mundell <matthew.mundell@intevation.de>

	* doc/CMakeLists.txt (DOC_FILES): Add oxpd.c.

2009-06-16  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* src/file.c (rmdir_recursively): Add descriptive comments.

2009-06-16  Matthew Mundell <matthew.mundell@intevation.de>

	* src/manage.c (send_task_preferences): Free orig_desc in error cases.

2009-06-16  Michael Wiegand <michael.wiegand@intevation.de>

	* CMakeLists.txt: Make source archive filenames consistent with other
	modules and Debians expectations.

2009-06-16  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* TODO: Add missing paren.

2009-06-16  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* TODO: New file.

2009-06-12  Matthew Mundell <matthew.mundell@intevation.de>

	* src/tasks_sql.h (sql_int, sql_string): Check return from sql_x.

2009-06-12  Matthew Mundell <matthew.mundell@intevation.de>

	* src/tests/omp_get_preferences_1.c: Enable test for expected value.

2009-06-12  Matthew Mundell <matthew.mundell@intevation.de>

	* src/tests/omp_get_preferences_0.c: Correct expected status code.

2009-06-12  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* src/tests/common.c (delete_task): Pass TASK_ID as attribute.

2009-06-11  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	* src/tests/omp_get_status_0.c: Correct expectations.

2009-06-11  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* src/tests/omp_abort_task_0.c: Expect that the operation may also
	succeed completely.

2009-06-11  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* src/omp.c (send_reports): Move ID of GET_STATUS REPORT to an attribute.

2009-06-10  Matthew Mundell <matthew.mundell@intevation.de>

	* src/manage.c (task_preference): Free orig_desc after last use,
	instead of before.

2009-06-10  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* src/omp.c (omp_xml_handle_start_element): Reorder CLIENT_MODIFY_TASK
	conditions.

2009-06-09  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* src/tests/common.c: Rename task name symbols to use "name" instead of
	"identifier".

2009-06-09  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* ChangeLog: Convert space indentation to tabs.

2009-06-09  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* src/tasks_sql.h (set_task_parameter): Correct doc parameter description.

2009-06-09  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* src/tests/omp_get_nvt_feed_checksum_1.c: Include ../string.h.

2009-06-09  Matthew Mundell <matthew.mundell@intevation.de>

	* src/tests/read_protocol_0.c: Correct task name.

2009-06-09  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* src/openvasmd.c (serve_client): Improve comment slightly.

2009-06-09  Matthew Mundell <matthew.mundell@intevation.de>

	* src/otpd.c (serve_otp): Close client socket on return.

2009-06-09  Matthew Mundell <matthew.mundell@intevation.de>

	* src/openvasmd.c (read_protocol): Check return from time for error.

	* ChangeLog: Correct entry dates for yesterday.

2009-06-08  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* src/openvasmd.c (accept_and_maybe_fork): Close client socket in
	parent process.

2009-06-08  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* src/omp.c (stringify): Remove.

2009-06-05  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* src/tasks_sql.h (make_task): Initialise task run state.

2009-06-05  Matthew Mundell <matthew.mundell@intevation.de>

	* src/tests/omp_create_task_0.c: Add check that task run status is
	initialised correctly.

2009-06-05  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* src/tests/common.c (task_status): Revert to correct implementation.

2009-06-03  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	* src/tests/CMakeLists.txt: Sort rules.

2009-05-28  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* src/omp.c (help_text): Remove dummy implementation key.

2009-05-28  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* src/omp.h (TO_CLIENT_BUFFER_SIZE): Increase, for now.

2009-05-28  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* src/openvasmd.c (read_protocol): Use the right socket.

2009-05-28  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* src/omp.c (send_plugin): Correct g_convert charset names.

2009-05-27  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* src/openvasmd.c (main): Fork into background on start, or stay in
	foreground if -f switch given.

2009-05-23  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* src/manage.c (report_task): Correct variable name.  Move free to after
	last use.

2009-05-20  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* src/omp.c (current_task_task_id): Rename current_uuid.  Update callers.

2009-05-20  Matthew Mundell <matthew.mundell@intevation.de>

	* src/tests/CMakeLists.txt (OVAS_LDFLAG): Add libopenvas.

2009-05-20  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* src/CMakeLists.txt: Remove OPENVAS_USERS_DIR definition added too
	eagerly.

2009-05-20  Matthew Mundell <matthew.mundell@intevation.de>

	* src/openvasmd.c (\mainpage): Add License Information section.

2009-05-20  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* src/tests/omp_delete_task_2.c: Add check of whether removal has been
	requested.

2009-05-18  Matthew Mundell <matthew.mundell@intevation.de>

	* src/manage.c (create_report_file): Use stored start time.

2009-05-18  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	* src/tests/omp_modify_task_1.c: Declare name.  Correct init of name.

2009-05-18  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* doc/Doxyfile (EXTRACT_ALL): Turn off, to enable warnings about
	missing function docs.

2009-05-15  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* src/tests/new_task_empty_rc, src/tests/new_task_medium_rc: Remove old
	XML wrapper tags.

2009-05-15  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* src/tests/omp_status_4.c: Correct test number in comment.

2009-05-13  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	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@intevation.de>

	* src/tests/omp_modify_task_1.c: Turn off verbosity.

2009-05-13  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* src/tests/omp_status_3.c: Remove tracing.

2009-05-13  Matthew Mundell <matthew.mundell@intevation.de>

	* src/tests/omp_modify_task_0.c: Improve task name.

	* ChangeLog: Correct last log.

2009-05-13  Matthew Mundell <matthew.mundell@intevation.de>

	* src/tests/omp_status_4.c: Remove tracing.

2009-05-13  Michael Wiegand <michael.wiegand@intevation.de>

	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@intevation.de>

	* src/openvasmd.c (cleanup): Check log_stream before closing.

2009-05-12  Michael Wiegand <michael.wiegand@intevation.de>

	Post release version bump.

	* VERSION: Set to 0.5.1.SVN.

2009-05-12  Michael Wiegand <michael.wiegand@intevation.de>

	* CMakeLists.txt: Added doc/generated to CPACK_SOURCE_IGNORE_FILES.

2009-05-12  Matthew Mundell <matthew.mundell@intevation.de>

	* src/tests/common.c (DO_CHILDREN): Add back (accidentally removed
	yesterday).

2009-05-12  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* doc/Doxyfile_full: Flush trailing whitespace.

2009-05-12  Michael Wiegand <michael.wiegand@intevation.de>

	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@intevation.de>

	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@intevation.de>

	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@intevation.de>

	* 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@intevation.de>

	* README: Revert sentence about connecting as though to server.

2009-05-11  Matthew Mundell <matthew.mundell@intevation.de>

	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@intevation.de>

	* src/otpd.c (serve_otp): Connect to server initially.

2009-05-11  Matthew Mundell <matthew.mundell@intevation.de>

	* src/manage.c (task_plugins): Separate plugins with semicolons.

2009-05-11  Matthew Mundell <matthew.mundell@intevation.de>

	* 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@intevation.de>

	* src/CMakeLists.txt (install): Create PREFIX/var/lib/openvas/mgr/.

2009-05-08  Matthew Mundell <matthew.mundell@intevation.de>

	* src/omp.c (omp_xml_handle_start_element): Correct lengths in
	CLIENT_TOP comparisons.

2009-05-08  Matthew Mundell <matt@mundell.ukfsn.org>

	* README, INSTALL: Update requirements and descriptions.

2009-05-08  Michael Wiegand <michael.wiegand@intevation.de>

	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 <matt@mundell.ukfsn.org>

	* src/tests/CMakeLists.txt: Add SQLite linkage.  Move tests of support
	libraries before rest.  Order tests alphabetically.

2009-05-08  Matthew Mundell <matt@mundell.ukfsn.org>

	* CMakeLists.txt: Add check for SQLite3 library.

2009-05-08  Matthew Mundell <matt@mundell.ukfsn.org>

	* src/manage.c (start_task): Free task_plugins string after use.

2009-05-08  Matthew Mundell <matt@mundell.ukfsn.org>

	* 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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	* 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@intevation.de>

	* CMakeLists.txt: Added initial support for creating source and binary
	packages with CPack.

2009-05-06  Matthew Mundell <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	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@intevation.de>

	* 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 <matt@mundell.ukfsn.org>

	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@intevation.de>

	* 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@intevation.de>

	* 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@intevation.de>

	* src/tests/CMakeLists.txt: Added missing GLIB_CFLAGS to target properties.

2009-03-31  Matthew Mundell <matt@mundell.ukfsn.org>

	* src/tests/common.c (env_authenticate): Remove RATS annotation.

2009-03-31  Matthew Mundell <matt@mundell.ukfsn.org>

	* src/tests/omp_delete_task_0.c: Test by checking status instead of
	counting tasks.

2009-03-31  Matthew Mundell <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	* src/tests/common.c (env_authenticate): Add "RATS: ignore" for getenv.

2009-03-28  Matthew Mundell <matt@mundell.ukfsn.org>

	* src/tests/CMakeLists.txt: Add omp_delete_report_1.

2009-03-28  Matthew Mundell <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	* 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 <matt@mundell.ukfsn.org>

	* src/CMakeLists.txt (splint, rats, flawfinder, check, etags, ctags,
	tags): New targets.
	(ovas-mngr-comm): Add Glib C flags.

2009-03-26  Matthew Mundell <matt@mundell.ukfsn.org>

	* src/tests/omp_delete_task_1.c: Read report ID from response.

2009-03-26  Matthew Mundell <matt@mundell.ukfsn.org>

	* 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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	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@intevation.de>

	* packaging/: New.

	* packaging/debian: New.

	* packaging/debian/control: New. First approaches for
	Debian packaging.

2009-03-19  Matthew Mundell <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	* src/ompd.c (serve_omp): Revert bogus typo correction.

2009-03-13  Matthew Mundell <matt@mundell.ukfsn.org>

	* src/omp.c (omp_xml_handle_end_element): Free name in CLIENT_GET_REPORT
	case.

2009-03-13  Matthew Mundell <matt@mundell.ukfsn.org>

	* 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 <matt@mundell.ukfsn.org>

	* src/manage.c (delete_report): Add @return doc.

	* ChangeLog: Fixup pathnames for today's entries.

2009-03-13  Matthew Mundell <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	* src/ompd.c (serve_omp): Correct typo and formatting.

2009-03-13  Matthew Mundell <matt@mundell.ukfsn.org>

	* src/manage.c (stop_task, start_task): Correct conditions of running checks.

2009-03-13  Matthew Mundell <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	* src/otp.c (save_report): Move the actual report into the task directory.

2009-03-11  Matthew Mundell <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	* src/omp.c (output_reports_xml): Rename to send_reports.
	(send_reports): Rename from output_reports_xml.  Add doc.

2009-03-11  Matthew Mundell <matt@mundell.ukfsn.org>

	* 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 <matt@mundell.ukfsn.org>

	* 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 <matt@mundell.ukfsn.org>

	* 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 <matt@mundell.ukfsn.org>

	* 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 <matt@mundell.ukfsn.org>

	* src/manage.c (delete_task): Correct error check.

2009-03-02  Matthew Mundell <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	* 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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	* 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 <matt@mundell.ukfsn.org>

	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@intevation.de>

	* doc/CMakeLists.txt: Fixed syntax error which caused the build process
	to fail.

2009-02-05  Matthew Mundell <matt@mundell.ukfsn.org>

	* doc/CMakeLists.txt: Only install manpage if xmltoman is installed.

2009-02-05  Matthew Mundell <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	* src/tests/omp_delete_task_0.c: New file.
	* src/tests/omp_delete_task_0: Remove.

2009-02-04  Matthew Mundell <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	* 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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	* src/tests/omp_start_task_0.c: Correct comment.

2009-02-03  Matthew Mundell <matt@mundell.ukfsn.org>

	* 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 <matt@mundell.ukfsn.org>

	* 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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	* src/openvasmd.c: (omp_xml_handle_end_element): Flush whitespace from
	task response XML.

2009-01-26  Matthew Mundell <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	* src/tests/common.c: Match comments to style guide.

2009-01-20  Matthew Mundell <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	* 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 <matt@mundell.ukfsn.org>

	* src/ovas-mngr-comm.c: Add TRACE define.  Move @file comment to beginning.

2009-01-18  Matthew Mundell <matt@mundell.ukfsn.org>

	* 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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	* doc/Doxyfile: Turn off JAVADOC_AUTOBRIEF.

2009-01-17  Matthew Mundell <matt@mundell.ukfsn.org>

	* src/openvasmd.c: Match comments to coding style.

	* src/ovas-mngr-comm.c: Match comments to coding style.

2009-01-16  Matthew Mundell <matt@mundell.ukfsn.org>

	* 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 <matt@mundell.ukfsn.org>

	* doc/Doxyfile (INPUT): Add ovas-mngr-comm.c.

	* doc/CMakeLists.txt: Add ovas-mngr-comm.c to doc depends.

2009-01-16  Matthew Mundell <matt@mundell.ukfsn.org>

	* src/ovas-mngr-comm.c: Fix a few file doc typos.

2009-01-16  Matthew Mundell <matt@mundell.ukfsn.org>

	* src/ovas-mngr-comm.c (send_to_server): Add space after function name.

2009-01-16  Matthew Mundell <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	* src/openvasmd.c: Convert tabs to spaces.

	* ChangeLog: Correct previous entry.

2009-01-16  Jan-Oliver Wagner <jan-oliver.wagner@intevation.de>

	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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	* 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 <matt@mundell.ukfsn.org>

	* INSTALL: Correct Cmake command.

2009-01-15  Matthew Mundell <matt@mundell.ukfsn.org>

	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@intevation.de>

	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@intevation.de>

	* src/Makefile: Removed. It is overwritten by cmake anyway.

2008-12-23  Jan-Oliver Wagner <jan-oliver.wagner@intevation.de>

	* INSTALL: Added information about the prefix setting for cmake.

2008-12-22  Matthew Mundell <matt@mundell.ukfsn.org>

	* 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 <matt@mundell.ukfsn.org>

	* src/openvasmd.c (process_omp_server_input): Improve open port number
	parsing.

2008-12-19  Matthew Mundell <matt@mundell.ukfsn.org>

	* src/openvasmd.c (serve_otp): Use a flag instead of a goto when
	writing to the fd.

2008-12-19  Matthew Mundell <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	* src/openvasmd.c: Convert tabs to spaces.

2008-12-17  Matthew Mundell <matt@mundell.ukfsn.org>

	* 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 <matt@mundell.ukfsn.org>

	* src/openvasmd.c: Drop the OVAS_SSL directive in favour of always
	compiling secure transmission.

2008-12-16  Matthew Mundell <matt@mundell.ukfsn.org>

	* 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 <matt@mundell.ukfsn.org>

	* 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 <matt@mundell.ukfsn.org>

	* src/openvasmd.c: Replace \return with @return in comment docs.

2008-12-16  Matthew Mundell <matt@mundell.ukfsn.org>

	* 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 <matt@mundell.ukfsn.org>

	* src/openvasmd.c (read_from_client, read_from_server
	read_protocol): Improve function docs.

2008-12-11  Matthew Mundell <matt@mundell.ukfsn.org>

	* src/openvasmd.c: Bring code documentation up to date.

2008-12-11  Matthew Mundell <matt@mundell.ukfsn.org>

	* src/openvasmd.c (process_omp_client_input): Replace use of asprintf
	with g_strdup_printf.

2008-12-11  Matthew Mundell <matt@mundell.ukfsn.org>

	* CMakeLists.txt: Prefix paths in variables with CMAKE_INSTALL_PREFIX.

	* src/CMakeLists.txt: Drop hard coded include paths.

2008-12-10  Matthew Mundell <matt@mundell.ukfsn.org>

	* openvasmd.c: Convert tabs to spaces.

2008-12-10  Matthew Mundell <matt@mundell.ukfsn.org>

	* openvasmd.c (OPENVASMD_ADDRESS): Remove.
	(main): Bind to INADDR_ANY by default.

2008-12-10  Matthew Mundell <matt@mundell.ukfsn.org>

	* openvasmd.c (serve_otp, read_protocol, serve_client):
	Drop EAGAIN and EINTR checks from OVAL_SSL cases.

2008-12-10  Matthew Mundell <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	* README: Update for new build system.

2008-11-21  Matthew Mundell <matt@mundell.ukfsn.org>

	* doc/CMakeLists.txt: Ensure html/ exists.

	* doc/Doxyfile: Correct paths.

	* doc/openvasmd.8.xml: Add header comment.

2008-11-21  Matthew Mundell <matt@mundell.ukfsn.org>

	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 <matt@mundell.ukfsn.org>

	* 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@intevation.de>

	* README: Fixed typo.

2008-11-17  Matthew Mundell <matt@mundell.ukfsn.org>

	* src/openvasmc.c: Add Doxygen documentation.

	* Doxyfile, footer.html: New.

2008-11-17  Matthew Mundell <matt@mundell.ukfsn.org>

	* 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 <matt@mundell.ukfsn.org>

	* src/openvasmd.c: Rename directives for consistency.

2008-11-11  Jan-Oliver Wagner <jan-oliver.wagner@intevation.de>

	Starting module "openvas-manager".

	* COPYING, ChangeLog, README, src/Makefile, src/openvasmd.c: New.
