From 6803344de054af3f366f19fd65a6552d9c9b8034 Mon Sep 17 00:00:00 2001 From: Matt Mundell Date: Wed, 29 May 2024 20:44:43 +0200 Subject: [PATCH 1/7] Add missing doxygen elements --- src/manage_sql.c | 11 ++++++++--- src/manage_sql_report_formats.c | 2 +- src/manage_sql_secinfo.c | 8 ++------ 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/manage_sql.c b/src/manage_sql.c index 263c59385..6feb65b74 100644 --- a/src/manage_sql.c +++ b/src/manage_sql.c @@ -22340,6 +22340,9 @@ where_qod (int min_qod) { NULL, NULL, KEYWORD_TYPE_UNKNOWN } \ } +/** + * @brief SQL for result iterator column. + */ #define RESULT_HOSTNAME_SQL(hostname_col, host_col, report_col) \ "(CASE WHEN (" hostname_col " IS NULL) " \ " OR (" hostname_col " = '')" \ @@ -55551,7 +55554,6 @@ user_resources_in_use (user_t user, * @param[in] task_id UUID of the task to limit vulns to. * @param[in] report_id UUID of the report to limit vulns to. * @param[in] host IP address of the task to limit vulns to. - * @param[in] min_qod Minimum QoD. * * @return Newly allocated string with the extra_with clause. */ @@ -55948,6 +55950,8 @@ vuln_count (const get_data_t *get) /** * @brief Extra WHERE clause for vulns. * + * @param[in] min_qod Min QOD. + * * @return WHERE clause. */ static gchar* @@ -57956,7 +57960,8 @@ type_extra_where (const char *type, int trash, const char *filter, /** * @brief Get the extra WITH clauses for a resource type. * - * @param[in] type The resource type. + * @param[in] type The resource type. + * @param[in] filter Filter term. * * @return The extra WITH clauses. */ @@ -57965,7 +57970,7 @@ type_extra_with (const char *type, const char *filter) { if (strcasecmp (type, "VULN") == 0) { - return vuln_iterator_extra_with_from_filter(filter); + return vuln_iterator_extra_with_from_filter (filter); } return NULL; } diff --git a/src/manage_sql_report_formats.c b/src/manage_sql_report_formats.c index c2005ba43..788428bed 100644 --- a/src/manage_sql_report_formats.c +++ b/src/manage_sql_report_formats.c @@ -3087,7 +3087,7 @@ report_format_alert_iterator_readable (iterator_t* iterator) * Iterates over all report configs that use the Report Format. * * @param[in] iterator Iterator. - * @param[in] report_format Report Format. + * @param[in] report_format_id Report Format. */ void init_report_format_report_config_iterator (iterator_t* iterator, diff --git a/src/manage_sql_secinfo.c b/src/manage_sql_secinfo.c index 342c836f1..455fc3dbc 100644 --- a/src/manage_sql_secinfo.c +++ b/src/manage_sql_secinfo.c @@ -196,6 +196,8 @@ increment_transaction_size (int* current_size) /** * @brief Get the SQL buffer size threshold converted from MiB to bytes. + * + * @return Number of bytes. */ int setting_secinfo_sql_buffer_threshold_bytes () @@ -471,7 +473,6 @@ init_cpe_info_iterator (iterator_t* iterator, get_data_t *get, const char *name) * * @param[in] iterator Iterator. * @param[in] get GET data. - * @param[in] name Name of the info * * @return 0 success, 1 failed to find target, 2 failed to find filter, * -1 error. @@ -716,7 +717,6 @@ init_cve_info_iterator (iterator_t* iterator, get_data_t *get, const char *name) * * @param[in] iterator Iterator. * @param[in] get GET data. - * @param[in] name Name of the info * * @return 0 success, 1 failed to find target, 2 failed to find filter, * -1 error. @@ -3209,8 +3209,6 @@ check_cert_db_version () /** * @brief Update timestamp in CERT db from feed timestamp. - * - * @return 0 success, -1 error. */ static void update_cert_timestamp () @@ -3482,8 +3480,6 @@ check_scap_db_version () /** * @brief Update timestamp in SCAP db from feed timestamp. - * - * @return 0 success, -1 error. */ static void update_scap_timestamp () From 6e6836015bf7692a5ece515d314e04af6a3f3480 Mon Sep 17 00:00:00 2001 From: Matt Mundell Date: Wed, 29 May 2024 20:47:07 +0200 Subject: [PATCH 2/7] Match static declarations to definitions This was causing Doxygen warnings. --- src/manage_sql.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/manage_sql.c b/src/manage_sql.c index 6feb65b74..e5b1b67d3 100644 --- a/src/manage_sql.c +++ b/src/manage_sql.c @@ -262,10 +262,10 @@ static gchar* vulns_extra_where (int); static gchar* -vuln_iterator_opts_from_filter (const char*); +vuln_iterator_opts_from_filter (const gchar *); static gchar* -vuln_iterator_extra_with_from_filter (); +vuln_iterator_extra_with_from_filter (const gchar *); static int task_last_report_any_status (task_t, report_t *); From 3c9e08fa5b07e6f0f9ae49ee07ab51ffd08e55a6 Mon Sep 17 00:00:00 2001 From: Matt Mundell Date: Wed, 29 May 2024 20:50:52 +0200 Subject: [PATCH 3/7] Remove stray header This was causing Doxygen warnings. Header was added in b15711961ff69152fe4960b4de51b5631dae142f, likely due to copying from report formats. --- src/manage_sql_report_configs.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/manage_sql_report_configs.h b/src/manage_sql_report_configs.h index 065d4a8c1..d5fe578a7 100644 --- a/src/manage_sql_report_configs.h +++ b/src/manage_sql_report_configs.h @@ -44,9 +44,4 @@ restore_report_config (const char *); void delete_report_configs_user (user_t); -gboolean -inherit_report_configs (user_t, user_t); - - - #endif /* not _GVMD_MANAGE_SQL_REPORT_CONFIGS_H */ From 79781d108ed94c937de3d9a00c95bc1319f6f825 Mon Sep 17 00:00:00 2001 From: Matt Mundell Date: Wed, 29 May 2024 20:56:18 +0200 Subject: [PATCH 4/7] Add missing full doxygen elements --- src/gmp_get.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gmp_get.h b/src/gmp_get.h index e1c724e04..428a8b344 100644 --- a/src/gmp_get.h +++ b/src/gmp_get.h @@ -66,7 +66,6 @@ send_get_start (const char *, int (*) (const char *, void *), void *); * @brief Send start of GET response to client, returning on fail. * * @param[in] type Type of resource. - * @param[in] get GET data. */ #define SEND_GET_START(type) \ do \ From cb588fedd2d8be62756defc0153aff7364e48a66 Mon Sep 17 00:00:00 2001 From: Matt Mundell Date: Wed, 29 May 2024 22:26:34 +0200 Subject: [PATCH 5/7] Remove old query Definitions are documented in the full doxygen (make doc-full). --- src/manage.h | 1 - 1 file changed, 1 deletion(-) diff --git a/src/manage.h b/src/manage.h index 1dde1cfd0..e2c615250 100644 --- a/src/manage.h +++ b/src/manage.h @@ -1171,7 +1171,6 @@ result_detection_reference (result_t, report_t, const char *, const char *, /* Reports. */ -/** @todo How is this documented? */ #define OVAS_MANAGE_REPORT_ID_LENGTH UUID_LEN_STR /** From c05827cfec496ebb8abc60795b36de769e33282c Mon Sep 17 00:00:00 2001 From: Matt Mundell Date: Wed, 29 May 2024 22:29:44 +0200 Subject: [PATCH 6/7] Remove old definition Caller was removed in 209b2fc83340c06cd81eff43622d4fdba9d15794 in 2009. --- src/manage.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/manage.h b/src/manage.h index e2c615250..018fbfed3 100644 --- a/src/manage.h +++ b/src/manage.h @@ -1171,8 +1171,6 @@ result_detection_reference (result_t, report_t, const char *, const char *, /* Reports. */ -#define OVAS_MANAGE_REPORT_ID_LENGTH UUID_LEN_STR - /** * @brief Default apply_overrides setting */ From 9308240d888ba1074c7ea0d05855396b4b5e0c20 Mon Sep 17 00:00:00 2001 From: Matt Mundell Date: Wed, 29 May 2024 20:15:57 +0200 Subject: [PATCH 7/7] Add: GMP doc: missing SOURCES for CREATE_USER --- src/schema_formats/XML/GMP.xml.in | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/schema_formats/XML/GMP.xml.in b/src/schema_formats/XML/GMP.xml.in index 5dd097f66..ba7bba56f 100644 --- a/src/schema_formats/XML/GMP.xml.in +++ b/src/schema_formats/XML/GMP.xml.in @@ -6107,6 +6107,7 @@ END:VCALENDAR hosts password role + sources name @@ -6153,6 +6154,29 @@ END:VCALENDAR + + sources + List of authentication sources for this user (if omitted then 'file') + +

+ 'file' means to store the user in the database. +

+
+ + source + + + source + Authentication source + + + file + ldap_connect + radius_connect + + + +
@@ -27870,6 +27894,11 @@ END:VCALENDAR sources List of authentication sources for this user (if omitted, no changes) + +

+ 'file' means to store the user in the database. +

+
source