Skip to content

Commit

Permalink
Merge branch 'main' into get-notes-with-get-next
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmundell authored May 30, 2024
2 parents e3d76b5 + 9308240 commit d9f90ee
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 21 deletions.
1 change: 0 additions & 1 deletion src/gmp_get.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
3 changes: 0 additions & 3 deletions src/manage.h
Original file line number Diff line number Diff line change
Expand Up @@ -1171,9 +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

/**
* @brief Default apply_overrides setting
*/
Expand Down
15 changes: 10 additions & 5 deletions src/manage_sql.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 *);
Expand Down Expand Up @@ -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 " = '')" \
Expand Down Expand Up @@ -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.
*/
Expand Down Expand Up @@ -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*
Expand Down Expand Up @@ -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.
*/
Expand All @@ -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;
}
Expand Down
5 changes: 0 additions & 5 deletions src/manage_sql_report_configs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
2 changes: 1 addition & 1 deletion src/manage_sql_report_formats.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 2 additions & 6 deletions src/manage_sql_secinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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 ()
Expand Down Expand Up @@ -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 ()
Expand Down
29 changes: 29 additions & 0 deletions src/schema_formats/XML/GMP.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -6107,6 +6107,7 @@ END:VCALENDAR
<o><e>hosts</e></o>
<o><e>password</e></o>
<any><e>role</e></any>
<o><e>sources</e></o>
</pattern>
<ele>
<name>name</name>
Expand Down Expand Up @@ -6153,6 +6154,29 @@ END:VCALENDAR
</attrib>
</pattern>
</ele>
<ele>
<name>sources</name>
<summary>List of authentication sources for this user (if omitted then 'file')</summary>
<description>
<p>
'file' means to store the user in the database.
</p>
</description>
<pattern>
<any><e>source</e></any>
</pattern>
<ele>
<name>source</name>
<summary>Authentication source</summary>
<pattern>
<alts>
<alt>file</alt>
<alt>ldap_connect</alt>
<alt>radius_connect</alt>
</alts>
</pattern>
</ele>
</ele>
<response>
<pattern>
<attrib>
Expand Down Expand Up @@ -27870,6 +27894,11 @@ END:VCALENDAR
<ele>
<name>sources</name>
<summary>List of authentication sources for this user (if omitted, no changes)</summary>
<description>
<p>
'file' means to store the user in the database.
</p>
</description>
<pattern>
<any><e>source</e></any>
</pattern>
Expand Down

0 comments on commit d9f90ee

Please sign in to comment.