OpenVAS Manager
7.0.3~git
|
#include "iterator.h"
#include <stdio.h>
#include <glib.h>
#include <gnutls/gnutls.h>
#include <openvas/misc/openvas_auth.h>
#include <openvas/base/array.h>
#include <openvas/base/credentials.h>
#include <openvas/base/nvti.h>
#include <openvas/base/openvas_networking.h>
#include <openvas/osp/osp.h>
#include <openvas/misc/openvas_server.h>
Go to the source code of this file.
Data Structures | |
struct | name_value_t |
Name value pair. More... | |
struct | command_t |
A command. More... | |
struct | port_t |
A port. More... | |
struct | message_t |
The record of a message. More... | |
struct | get_data_t |
Command data for a get command. More... | |
struct | severity_data_t |
struct | create_report_result_t |
A CREATE_REPORT result. More... | |
struct | host_detail_t |
A host detail for create_report. More... | |
struct | preference_t |
An NVT preference. More... | |
struct | nvt_selector_t |
An NVT selector. More... | |
struct | report_type_iterator_t |
A system report type iterator. More... | |
struct | create_report_format_param_t |
Struct for defining a report format param. More... | |
struct | file_iterator_t |
A report format file iterator. More... | |
struct | keyword |
Keyword. More... | |
struct | sort_data_t |
Macros | |
#define | ALL_LOG_LEVELS |
Flag with all Glib log levels. More... | |
#define | g_info(...) |
Defines g_info for glib versions older than 2.40. More... | |
#define | AUTO_DELETE_KEEP_MIN 2 |
#define | AUTO_DELETE_KEEP_MAX 1200 |
#define | ALERT_MESSAGE_INCLUDE |
Default format string for alert email, when including report. More... | |
#define | SECINFO_ALERT_MESSAGE_INCLUDE |
Default format string for SecInfo alert email, when including report. More... | |
#define | ALERT_MESSAGE_ATTACH |
Default format string for alert email, when attaching report. More... | |
#define | SECINFO_ALERT_MESSAGE_ATTACH |
Default format string for SecInfo alert email, when attaching report. More... | |
#define | LSC_FAMILY_LIST |
SQL list of LSC families. More... | |
#define | OVAS_MANAGE_REPORT_ID_LENGTH UUID_LEN_STR |
#define | APPLY_OVERRIDES_DEFAULT 0 |
Default apply_overrides setting. More... | |
#define | QOD_DEFAULT 75 |
Default quality of detection percentage. More... | |
#define | MIN_QOD_DEFAULT 70 |
Default min quality of detection percentage for filters. More... | |
#define | MANAGE_ABSOLUTE_MAX_IPS_PER_TARGET 70000 |
Absolute maximum number of IPs per target. More... | |
#define | MANAGE_MAX_HOSTS 4095 |
Default maximum number of hosts a target may specify. More... | |
#define | MANAGE_USER_MAX_HOSTS 16777216 |
Default maximum number of hosts a user host access may specify. More... | |
#define | NVT_SELECTOR_TYPE_ALL 0 |
NVT selector type for "all" rule. More... | |
#define | NVT_SELECTOR_TYPE_FAMILY 1 |
NVT selector type for "family" rule. More... | |
#define | NVT_SELECTOR_TYPE_NVT 2 |
NVT selector type for "NVT" rule. More... | |
#define | NVT_SELECTOR_TYPE_ANY 999 |
Special NVT selector type for selecting all types in interfaces. More... | |
#define | SCHEDULE_PERIOD 10 |
Seconds between calls to manage_schedule. More... | |
#define | SCHEDULE_TIMEOUT_MIN_SECS 20 |
Minimum schedule timeout seconds. This value must be greater than SCHEDULE_PERIOD. More... | |
#define | SCHEDULE_TIMEOUT_DEFAULT 60 |
Default for schedule_timeout in minutes. More... | |
#define | NVT_FEED 1 |
#define | SCAP_FEED 2 |
#define | CERT_FEED 3 |
Typedefs | |
typedef enum scanner_type | scanner_type_t |
Scanner types. More... | |
typedef long long int | agent_t |
typedef long long int | config_t |
typedef long long int | credential_t |
typedef long long int | alert_t |
typedef long long int | filter_t |
typedef long long int | group_t |
typedef long long int | host_t |
typedef long long int | tag_t |
typedef long long int | target_t |
typedef long long int | task_t |
typedef long long int | result_t |
typedef long long int | report_t |
typedef long long int | report_host_t |
typedef long long int | report_format_t |
typedef long long int | report_format_param_t |
typedef long long int | role_t |
typedef long long int | note_t |
typedef long long int | nvt_t |
typedef long long int | override_t |
typedef long long int | permission_t |
typedef long long int | port_list_t |
typedef long long int | port_range_t |
typedef long long int | schedule_t |
typedef long long int | scanner_t |
typedef long long int | setting_t |
typedef long long int | user_t |
typedef struct keyword | keyword_t |
Keyword type. More... | |
Functions | |
int | init_manage (GSList *, int, const gchar *, int, int, int, int, void(*)(), int(*)(openvas_connection_t *, gchar *), int) |
Initialize the manage library. More... | |
int | init_manage_helper (GSList *, const gchar *, int, void(*)()) |
Initialize the manage library for a helper program. More... | |
void | init_manage_process (int, const gchar *) |
Initialize the manage library for a process. More... | |
void | cleanup_manage_process (gboolean) |
Cleanup the manage library. More... | |
void | manage_cleanup_process_error (int) |
Cleanup as immediately as possible. More... | |
void | manage_reset_currents () |
Cleanup as immediately as possible. More... | |
gchar * | truncate_certificate (const gchar *) |
Truncate a certificate, removing extra data. More... | |
gchar * | truncate_private_key (const gchar *) |
Truncate a private key, removing extra data. More... | |
int | get_certificate_info (const gchar *, time_t *, time_t *, gchar **, gchar **) |
Gathers info from a certificate. More... | |
gchar * | certificate_iso_time (time_t) |
Converts a certificate time to an ISO time string. More... | |
const gchar * | certificate_time_status (time_t, time_t) |
Tests the activation and expiration time of a certificate. More... | |
int | authenticate (credentials_t *) |
Authenticate credentials. More... | |
int | manage_backup_db (const gchar *) |
Backup the database to a file. More... | |
int | manage_db_supported_version () |
Return the database version supported by this manager. More... | |
int | manage_db_version () |
Return the database version of the actual database. More... | |
int | manage_scap_db_supported_version () |
Return the database version supported by this manager. More... | |
int | manage_scap_db_version () |
Return the database version of the actual database. More... | |
int | manage_cert_db_supported_version () |
Return the database version supported by this manager. More... | |
int | manage_cert_db_version () |
Return the database version of the actual database. More... | |
char * | port_name_formatted (const char *) |
Returns formatted port number, protocol and iana name from. More... | |
void | set_db_version (int version) |
Set the database version of the actual database. More... | |
char * | manage_port_name (int, const char *) |
Returns associated name for a tcp/ip port. More... | |
int | manage_migrate (GSList *, const gchar *) |
Migrate database to version supported by this manager. More... | |
int | manage_encrypt_all_credentials (GSList *, const gchar *) |
Encrypt or re-encrypt all credentials. More... | |
int | manage_decrypt_all_credentials (GSList *, const gchar *) |
Decrypt all credentials. More... | |
void | manage_session_set_timezone (const char *) |
Setup session timezone. More... | |
void | manage_transaction_start () |
void | manage_transaction_stop (gboolean) |
void | get_data_reset (get_data_t *) |
Reset command data. More... | |
resource_t | get_iterator_resource (iterator_t *) |
const char * | get_iterator_uuid (iterator_t *) |
const char * | get_iterator_name (iterator_t *) |
const char * | get_iterator_comment (iterator_t *) |
const char * | get_iterator_creation_time (iterator_t *) |
const char * | get_iterator_modification_time (iterator_t *) |
const char * | get_iterator_owner_name (iterator_t *) |
user_t | get_iterator_owner (iterator_t *) |
int | manage_resource_name (const char *, const char *, char **) |
Get the name of a resource. More... | |
int | manage_trash_resource_name (const char *, const char *, char **) |
Get the name of a trashcan resource. More... | |
int | resource_count (const char *, const get_data_t *) |
Return number of resources of a certain type for current user. More... | |
int | resource_id_exists (const char *, const char *) |
Test whether a resource of the given type and unique ID exists. More... | |
int | trash_id_exists (const char *, const char *) |
Test Whether a resource of the given type and ID exists in the trash. More... | |
gboolean | find_resource (const char *, const char *, resource_t *) |
Find a resource given a UUID. More... | |
const char * | type_name_plural (const char *) |
Return the plural name of a resource type. More... | |
const char * | type_name (const char *) |
Return the name of a resource type. More... | |
int | type_is_scap (const char *) |
Check if a type is a SCAP type. More... | |
int | manage_check_alerts (GSList *, const gchar *) |
Check if any SecInfo alerts are due. More... | |
int | create_alert (const char *, const char *, const char *, event_t, GPtrArray *, alert_condition_t, GPtrArray *, alert_method_t, GPtrArray *, alert_t *) |
Create an alert. More... | |
int | copy_alert (const char *, const char *, const char *, alert_t *) |
Create an alert from an existing alert. More... | |
int | modify_alert (const char *, const char *, const char *, const char *, event_t, GPtrArray *, alert_condition_t, GPtrArray *, alert_method_t, GPtrArray *) |
Modify an alert. More... | |
int | delete_alert (const char *, int) |
Delete an alert. More... | |
char * | alert_uuid (alert_t) |
Return the UUID of an alert. More... | |
gboolean | find_alert_with_permission (const char *, alert_t *, const char *) |
Find a alert for a specific permission, given a UUID. More... | |
int | manage_alert (const char *, const char *, event_t, const void *, gchar **) |
Escalate an alert with task and event data. More... | |
int | manage_test_alert (const char *, gchar **) |
Test an alert. More... | |
int | alert_in_use (alert_t) |
Return whether a alert is in use by a task. More... | |
int | trash_alert_in_use (alert_t) |
Return whether a trashcan alert is in use by a task. More... | |
int | alert_writable (alert_t) |
Return whether a alert is writable. More... | |
int | trash_alert_writable (alert_t) |
Return whether a trashcan alert is writable. More... | |
int | alert_count (const get_data_t *) |
Count the number of alerts. More... | |
int | init_alert_iterator (iterator_t *, const get_data_t *) |
Initialise an alert iterator, including observed alerts. More... | |
int | alert_iterator_event (iterator_t *) |
Return the event from an alert iterator. More... | |
int | alert_iterator_condition (iterator_t *) |
Return the condition from an alert iterator. More... | |
int | alert_iterator_method (iterator_t *) |
Return the method from an alert iterator. More... | |
char * | alert_iterator_filter_uuid (iterator_t *) |
Return the filter UUID from an alert iterator. More... | |
char * | alert_iterator_filter_name (iterator_t *) |
Return the filter name from an alert iterator. More... | |
int | alert_iterator_filter_trash (iterator_t *) |
Return the location of an alert iterator filter. More... | |
int | alert_iterator_filter_readable (iterator_t *) |
Return the filter readable state from an alert iterator. More... | |
const char * | alert_condition_name (alert_condition_t) |
Get the name of an alert condition. More... | |
gchar * | alert_condition_description (alert_condition_t, alert_t) |
Get a description of an alert condition. More... | |
const char * | event_name (event_t) |
Get the name of an alert event. More... | |
gchar * | event_description (event_t, const void *, const char *) |
Get a description of an alert event. More... | |
const char * | alert_method_name (alert_method_t) |
Get the name of an alert method. More... | |
alert_condition_t | alert_condition_from_name (const char *) |
Get an alert condition from a name. More... | |
event_t | event_from_name (const char *) |
Get an event from a name. More... | |
alert_method_t | alert_method_from_name (const char *) |
Get an alert method from a name. More... | |
void | init_alert_data_iterator (iterator_t *, alert_t, int, const char *) |
Initialise an alert data iterator. More... | |
const char * | alert_data_iterator_name (iterator_t *) |
Return the name from an alert data iterator. More... | |
const char * | alert_data_iterator_data (iterator_t *) |
Return the data from an alert data iterator. More... | |
void | init_alert_task_iterator (iterator_t *, alert_t, int) |
Initialise an alert task iterator. More... | |
const char * | alert_task_iterator_name (iterator_t *) |
Return the name from an alert task iterator. More... | |
const char * | alert_task_iterator_uuid (iterator_t *) |
Return the uuid from an alert task iterator. More... | |
int | alert_task_iterator_readable (iterator_t *) |
Get the read permission status from a GET iterator. More... | |
void | init_task_alert_iterator (iterator_t *, task_t, event_t event) |
Initialise a task alert iterator. More... | |
alert_t | task_alert_iterator_alert (iterator_t *) |
Get the alert from a task alert iterator. More... | |
const char * | task_alert_iterator_uuid (iterator_t *) |
const char * | task_alert_iterator_name (iterator_t *) |
unsigned int | task_count (const get_data_t *) |
Return the number of tasks associated with the current user. More... | |
int | init_task_iterator (iterator_t *, const get_data_t *) |
Initialise a task iterator. More... | |
task_status_t | task_iterator_run_status (iterator_t *) |
Get the run status from a task iterator. More... | |
const char * | task_iterator_run_status_name (iterator_t *) |
Get the run status name from a task iterator. More... | |
int | task_iterator_total_reports (iterator_t *) |
Get the number of reports of a task iterator. More... | |
int | task_iterator_finished_reports (iterator_t *) |
Get the number of reports of a task iterator. More... | |
const char * | task_iterator_first_report (iterator_t *) |
Get the first report UUID from a task iterator. More... | |
const char * | task_iterator_last_report (iterator_t *) |
Get the last report UUID from a task iterator. More... | |
report_t | task_iterator_current_report (iterator_t *) |
Return the current report of a task. More... | |
const char * | task_iterator_hosts_ordering (iterator_t *) |
Get the hosts ordering value from a task iterator. More... | |
scanner_t | task_iterator_scanner (iterator_t *) |
Get the UUID of task scanner from a task iterator. More... | |
unsigned int | task_id (task_t) |
Return the identifier of a task. More... | |
int | task_uuid (task_t, char **) |
Return the UUID of a task. More... | |
int | task_in_trash (task_t) |
Return whether a task is in the trashcan. More... | |
int | task_in_use (task_t) |
Return whether a task is in use by a task. More... | |
int | trash_task_in_use (task_t) |
Return whether a trashcan task is referenced by a task. More... | |
int | task_writable (task_t) |
Return whether a task is writable. More... | |
int | task_alterable (task_t) |
Return whether a task is an Alterable Task. More... | |
int | trash_task_writable (task_t) |
Return whether a trashcan task is writable. More... | |
int | task_average_scan_duration (task_t) |
Get the average duration of all finished reports of a task. More... | |
char * | task_owner_name (task_t) |
Return the name of the owner of a task. More... | |
char * | task_name (task_t) |
Return the name of a task. More... | |
char * | task_comment (task_t) |
Return the comment of a task. More... | |
char * | task_hosts_ordering (task_t) |
Return the hosts ordering of a task. More... | |
scanner_t | task_scanner (task_t) |
Return the scanner of a task. More... | |
int | task_scanner_in_trash (task_t) |
Return whether the scanner of a task is in the trashcan. More... | |
config_t | task_config (task_t) |
Return the config of a task. More... | |
char * | task_config_uuid (task_t) |
Return the UUID of the config of a task. More... | |
char * | task_config_name (task_t) |
Return the name of the config of a task. More... | |
int | task_config_in_trash (task_t) |
Return whether the config of a task is in the trashcan. More... | |
void | set_task_config (task_t, config_t) |
Set the config of a task. More... | |
target_t | task_target (task_t) |
Return the target of a task. More... | |
int | task_target_in_trash (task_t) |
Return whether the target of a task is in the trashcan. More... | |
void | set_task_target (task_t, target_t) |
Set the target of a task. More... | |
void | set_task_hosts_ordering (task_t, const char *) |
Set the hosts ordering of a task. More... | |
void | set_task_scanner (task_t, scanner_t) |
Set the scanner of a task. More... | |
char * | task_description (task_t) |
void | set_task_description (task_t, char *, gsize) |
task_status_t | task_run_status (task_t) |
Return the run state of a task. More... | |
void | set_task_run_status (task_t, task_status_t) |
Set the run state of a task. More... | |
int | task_result_count (task_t, int) |
Return number of results in a task. More... | |
report_t | task_running_report (task_t) |
Return the running report of a task. More... | |
int | task_upload_progress (task_t) |
Return the upload progress of a task. More... | |
void | set_task_start_time (task_t, char *) |
Set the start time of a task. More... | |
void | set_task_start_time_epoch (task_t, int) |
Set the start time of a task. More... | |
void | set_task_start_time_otp (task_t, char *) |
Set the start time of a task. More... | |
void | set_task_end_time (task_t task, char *time) |
void | set_task_end_time_epoch (task_t, time_t) |
void | add_task_alert (task_t, alert_t) |
Add an alert to a task. More... | |
int | set_task_alerts (task_t, array_t *, gchar **) |
Set the alerts on a task, removing any previous alerts. More... | |
void | set_task_alterable (task_t, int) |
Set the alterable state of a task. More... | |
int | set_task_groups (task_t, array_t *, gchar **) |
Set observer groups on a task, removing any previous groups. More... | |
int | set_task_schedule (task_t, schedule_t, int) |
Set the schedule of a task. More... | |
int | set_task_schedule_periods (const gchar *, int) |
Set the schedule periods of a task, given a UUID. More... | |
int | set_task_schedule_periods_id (task_t, int) |
Set the schedule periods of a task, given an ID. More... | |
unsigned int | task_report_count (task_t) |
int | task_last_report (task_t, report_t *) |
Get the report from the most recently completed invocation of task. More... | |
const char * | task_iterator_trend_counts (iterator_t *, int, int, int, double, int, int, int, double) |
const char * | task_trend (task_t, int, int) |
int | task_schedule_periods (task_t) |
Get the number of times the period schedule should run on the task. More... | |
int | task_schedule_periods_uuid (const gchar *) |
Set the next time a scheduled task will be due. More... | |
schedule_t | task_schedule (task_t) |
Return the schedule of a task. More... | |
schedule_t | task_schedule_uuid (const gchar *) |
Return the schedule of a task. More... | |
int | task_schedule_in_trash (task_t) |
Get whether the task schedule is in the trash. More... | |
time_t | task_schedule_next_time_uuid (const gchar *) |
Set the next time a scheduled task will be due. More... | |
int | task_schedule_next_time (task_t) |
Get next time a scheduled task will run, following schedule timezone. More... | |
char * | task_severity (task_t, int, int, int) |
Return the severity score of a task, taking overrides into account. More... | |
double | task_severity_double (task_t, int, int, int) |
Return the severity score of a task, taking overrides into account. More... | |
int | task_debugs_size (task_t) |
int | task_holes_size (task_t) |
int | task_infos_size (task_t) |
int | task_logs_size (task_t) |
int | task_warnings_size (task_t) |
int | task_false_positive_size (task_t) |
void | free_tasks () |
task_t | make_task (char *, char *, int, int) |
void | make_task_complete (const char *) |
int | copy_task (const char *, const char *, const char *, int, task_t *) |
int | load_tasks () |
int | save_tasks () |
gboolean | find_task (const char *id, task_t *) |
gboolean | find_task_with_permission (const char *, task_t *, const char *) |
gboolean | find_trash_task_with_permission (const char *, task_t *, const char *) |
void | reset_task (task_t) |
int | set_task_parameter (task_t, const char *, char *) |
char * | task_observers (task_t) |
Return the observers of a task. More... | |
int | set_task_observers (task_t, const gchar *) |
Set the observers of a task. More... | |
int | request_delete_task_uuid (const char *, int) |
int | request_delete_task (task_t *) |
int | delete_task (task_t, int) |
int | cleanup_schedule_times () |
int | delete_task_lock (task_t, int) |
void | append_to_task_comment (task_t, const char *, int) |
void | append_to_task_name (task_t, const char *, int) |
void | add_task_description_line (task_t, const char *, size_t) |
void | set_scan_ports (report_t, const char *, unsigned int, unsigned int) |
void | append_task_open_port (task_t task, const char *, const char *) |
void | manage_task_update_file (task_t, const char *, const void *) |
int | manage_task_remove_file (task_t, const char *) |
void | init_config_file_iterator (iterator_t *, const char *, const char *) |
const char * | config_file_iterator_content (iterator_t *) |
int | config_file_iterator_length (iterator_t *) |
void | init_config_task_iterator (iterator_t *, config_t, int) |
const char * | config_task_iterator_name (iterator_t *) |
const char * | config_task_iterator_uuid (iterator_t *) |
int | config_task_iterator_readable (iterator_t *) |
int | severity_in_level (double, const char *) |
Check whether a severity falls within a threat level. More... | |
int | severity_matches_ov (double, double) |
Check whether a severity matches an override's severity. More... | |
const char * | severity_to_level (double, int) |
Get the threat level matching a severity score. More... | |
const char * | severity_to_type (double) |
Get the message type matching a severity score. More... | |
int | severity_data_index (double) |
Convert a severity value into an index in the counts array. More... | |
double | severity_data_value (int) |
Convert an index in the counts array to a severity value. More... | |
void | init_severity_data (severity_data_t *) |
Initialize a severity data structure. More... | |
void | cleanup_severity_data (severity_data_t *) |
Clean up a severity data structure. More... | |
void | severity_data_add (severity_data_t *, double) |
Add a severity occurrence to the counts of a severity_data_t. More... | |
void | severity_data_add_count (severity_data_t *, double, int) |
Add a multiple severity occurrences to the counts of a severity_data_t. More... | |
int | severity_data_range_count (const severity_data_t *, double, double) |
Calculate the total of severity counts in a range. More... | |
void | severity_data_level_counts (const severity_data_t *, const gchar *, int *, int *, int *, int *, int *, int *, int *) |
Count the occurrences of severities in the levels. More... | |
const char * | run_status_name (task_status_t) |
Get the name of a run status. More... | |
int | start_task (const char *, char **) |
Start a task. More... | |
int | stop_task (const char *) |
Initiate stopping a task. More... | |
int | resume_task (const char *, char **) |
Resume a task. More... | |
int | move_task (const char *, const char *) |
Reassign a task to another slave. More... | |
void | cleanup_iterator (iterator_t *) |
Cleanup an iterator. More... | |
gboolean | next (iterator_t *) |
Increment an iterator. More... | |
int | user_may (const char *) |
int | user_can_everything (const char *) |
int | user_can_super_everyone (const char *) |
int | user_has_super (const char *, user_t) |
gboolean | find_result_with_permission (const char *, result_t *, const char *) |
int | result_uuid (result_t, char **) |
int | result_detection_reference (result_t, char **, char **, char **, char **, char **) |
void | reports_clear_count_cache (int) |
void | reports_clear_count_cache_for_override (override_t, int) |
void | reports_build_count_cache (int, int *) |
void | init_report_counts_build_iterator (iterator_t *, report_t, int, int, const char *) |
int | report_counts_build_iterator_min_qod (iterator_t *) |
int | report_counts_build_iterator_override (iterator_t *) |
user_t | report_counts_build_iterator_user (iterator_t *) |
void | report_cache_counts (report_t, int, int, const char *) |
void | report_clear_count_cache (report_t, int, int, const char *) |
double | report_severity (report_t, int, int) |
int | report_host_count (report_t) |
int | report_result_host_count (report_t, int) |
gboolean | find_report_with_permission (const char *, report_t *, const char *) |
report_t | make_report (task_t, const char *, task_status_t) |
int | qod_from_type (const char *) |
char * | nvt_severity (const char *, const char *) |
result_t | make_result (task_t, const char *, const char *, const char *, const char *, const char *) |
result_t | make_osp_result (task_t, const char *, const char *, const char *, const char *, const char *, const char *, int) |
result_t | make_cve_result (task_t, const char *, const char *, double, const char *) |
void | host_detail_free (host_detail_t *) |
void | insert_report_host_detail (report_t, const char *, const char *, const char *, const char *, const char *, const char *) |
int | manage_report_host_detail (report_t, const char *, const char *) |
void | hosts_set_identifiers () |
void | hosts_set_max_severity (report_t, int *, int *) |
void | hosts_set_details (report_t report) |
void | clear_duration_schedules (task_t) |
void | update_duration_schedule_periods (task_t) |
int | create_report (array_t *, const char *, const char *, const char *, const char *, const char *, const char *, array_t *, array_t *, array_t *, char **) |
void | report_add_result (report_t, result_t) |
char * | report_uuid (report_t) |
void | report_set_slave_uuid (report_t, const gchar *) |
void | report_set_slave_name (report_t, const gchar *) |
void | report_set_slave_host (report_t, const gchar *) |
void | report_set_slave_port (report_t, int) |
void | report_set_slave_username (report_t, const gchar *) |
void | report_set_slave_password (report_t, const gchar *) |
void | report_set_source_iface (report_t, const gchar *) |
int | task_last_stopped_report (task_t, report_t *) |
Get the report from the most recently stopped invocation of task. More... | |
gchar * | task_second_last_report_id (task_t) |
Get report ID from second most recently completed invocation of task. More... | |
gchar * | report_path_task_uuid (gchar *) |
gboolean | report_task (report_t, task_t *) |
int | report_scan_run_status (report_t, int *) |
int | report_slave_progress (report_t) |
char * | report_slave_task_uuid (report_t) |
int | report_scan_result_count (report_t, const char *, const char *, int, const char *, const char *, int, int, int *) |
int | report_counts (const char *, int *, int *, int *, int *, int *, int *, double *, int, int, int) |
int | report_counts_id (report_t, int *, int *, int *, int *, int *, int *, double *, const get_data_t *, const char *) |
int | report_counts_id_no_filt (report_t, int *, int *, int *, int *, int *, int *, double *, const get_data_t *, const char *) |
gchar * | report_results_filter_term (int, int, int, int, int) |
Create a basic filter term to get report results. More... | |
get_data_t * | report_results_get_data (int, int, int, int, int) |
Create a new basic get_data_t struct to get report results. More... | |
char * | scan_start_time (report_t) |
int | scan_start_time_epoch (report_t) |
char * | scan_start_time_uuid (const char *) |
char * | scan_end_time_uuid (const char *) |
void | set_scan_start_time (report_t, const char *) |
void | set_scan_start_time_otp (report_t, const char *) |
void | set_scan_start_time_epoch (report_t, time_t) |
char * | scan_end_time (report_t) |
void | set_scan_end_time (report_t, const char *) |
void | set_scan_end_time_otp (report_t, const char *) |
void | set_scan_end_time_epoch (report_t, time_t) |
void | set_scan_host_start_time (report_t, const char *, const char *) |
void | set_scan_host_start_time_otp (report_t, const char *, const char *) |
int | scan_host_end_time (report_t, const char *) |
void | set_scan_host_end_time (report_t, const char *, const char *) |
void | set_scan_host_end_time_otp (report_t, const char *, const char *) |
int | report_timestamp (const char *, gchar **) |
int | modify_report (const char *, const char *) |
int | delete_report (const char *, int) |
int | report_count (const get_data_t *) |
int | init_report_iterator (iterator_t *, const get_data_t *) |
void | init_report_iterator_task (iterator_t *, task_t) |
void | init_report_errors_iterator (iterator_t *, report_t) |
const char * | report_iterator_uuid (iterator_t *) |
int | result_count (const get_data_t *, report_t, const char *) |
int | init_result_get_iterator (iterator_t *, const get_data_t *, report_t, const char *, const gchar *) |
gboolean | next_report (iterator_t *, report_t *) |
result_t | result_iterator_result (iterator_t *) |
const char * | result_iterator_host (iterator_t *) |
const char * | result_iterator_port (iterator_t *) |
const char * | result_iterator_nvt_oid (iterator_t *) |
const char * | result_iterator_nvt_name (iterator_t *) |
const char * | result_iterator_nvt_family (iterator_t *) |
const char * | result_iterator_nvt_cvss_base (iterator_t *) |
const char * | result_iterator_nvt_cve (iterator_t *) |
const char * | result_iterator_nvt_bid (iterator_t *) |
const char * | result_iterator_nvt_xref (iterator_t *) |
const char * | result_iterator_nvt_tag (iterator_t *) |
const char * | result_iterator_type (iterator_t *) |
const char * | result_iterator_original_type (iterator_t *) |
const char * | result_iterator_descr (iterator_t *) |
task_t | result_iterator_task (iterator_t *) |
report_t | result_iterator_report (iterator_t *) |
const char * | result_iterator_scan_nvt_version (iterator_t *) |
const char * | result_iterator_original_severity (iterator_t *) |
const char * | result_iterator_severity (iterator_t *) |
double | result_iterator_severity_double (iterator_t *) |
const char * | result_iterator_original_level (iterator_t *) |
const char * | result_iterator_level (iterator_t *) |
const char * | result_iterator_qod (iterator_t *) |
const char * | result_iterator_qod_type (iterator_t *) |
const char * | result_iterator_date (iterator_t *) |
void | init_report_host_iterator (iterator_t *, report_t, const char *, report_host_t) |
const char * | host_iterator_host (iterator_t *) |
const char * | host_iterator_start_time (iterator_t *) |
const char * | host_iterator_end_time (iterator_t *) |
int | host_iterator_current_port (iterator_t *) |
int | host_iterator_max_port (iterator_t *) |
int | collate_message_type (void *data, int, const void *, int, const void *) |
Collate two message type strings. More... | |
void | trim_partial_report (report_t) |
int | report_progress (report_t, task_t, gchar **) |
gchar * | manage_report (report_t, const get_data_t *, report_format_t, int, int, const char *, gsize *, gchar **, gchar **, gchar **, gchar **, gchar **) |
int | manage_send_report (report_t, report_t, report_format_t, const get_data_t *, int, int, int, int, gboolean(*)(const char *, int(*)(const char *, void *), void *), int(*)(const char *, void *), void *, const char *, const char *, const char *, int, const char *, const char *, int, int, const gchar *) |
gchar * | app_location (report_host_t, const gchar *) |
void | init_host_prognosis_iterator (iterator_t *, report_host_t, int, int, const char *, const char *, int, const char *) |
double | prognosis_iterator_cvss_double (iterator_t *) |
const char * | prognosis_iterator_cpe (iterator_t *) |
const char * | prognosis_iterator_cve (iterator_t *) |
const char * | prognosis_iterator_description (iterator_t *) |
int | manage_max_hosts () |
void | manage_filter_controls (const gchar *, int *, int *, gchar **, int *) |
Get info from a filter. More... | |
void | manage_report_filter_controls (const gchar *, int *, int *, gchar **, int *, int *, gchar **, gchar **, gchar **, gchar **, int *, int *, int *, int *, int *, gchar **) |
Get info from a filter for report. More... | |
gchar * | manage_clean_filter (const gchar *) |
Clean a filter. More... | |
gchar * | manage_clean_filter_remove (const gchar *, const gchar *) |
Clean a filter, removing a keyword in the process. More... | |
int | manage_count_hosts (const char *, const char *) |
gboolean | find_target_with_permission (const char *, target_t *, const char *) |
int | create_target (const char *, const char *, const char *, const char *, const char *, const char *, const char *, credential_t, const char *, credential_t, credential_t, credential_t, const char *, const char *, const char *, int, target_t *) |
int | copy_target (const char *, const char *, const char *, target_t *) |
int | modify_target (const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *) |
int | delete_target (const char *, int) |
int | target_count (const get_data_t *) |
void | init_user_target_iterator (iterator_t *, target_t) |
void | init_target_iterator_one (iterator_t *, target_t) |
int | init_target_iterator (iterator_t *, const get_data_t *) |
const char * | target_iterator_hosts (iterator_t *) |
const char * | target_iterator_exclude_hosts (iterator_t *) |
const char * | target_iterator_reverse_lookup_only (iterator_t *) |
const char * | target_iterator_reverse_lookup_unify (iterator_t *) |
const char * | target_iterator_comment (iterator_t *) |
int | target_iterator_ssh_credential (iterator_t *) |
const char * | target_iterator_ssh_port (iterator_t *) |
int | target_iterator_smb_credential (iterator_t *) |
int | target_iterator_esxi_credential (iterator_t *) |
int | target_iterator_snmp_credential (iterator_t *) |
int | target_iterator_ssh_trash (iterator_t *) |
int | target_iterator_smb_trash (iterator_t *) |
int | target_iterator_esxi_trash (iterator_t *) |
int | target_iterator_snmp_trash (iterator_t *) |
const char * | target_iterator_port_list_uuid (iterator_t *) |
const char * | target_iterator_port_list_name (iterator_t *) |
int | target_iterator_port_list_trash (iterator_t *) |
const char * | target_iterator_alive_tests (iterator_t *) |
char * | target_uuid (target_t) |
char * | trash_target_uuid (target_t) |
char * | target_name (target_t) |
char * | trash_target_name (target_t) |
int | trash_target_readable (target_t) |
char * | target_hosts (target_t) |
char * | target_exclude_hosts (target_t) |
char * | target_reverse_lookup_only (target_t) |
char * | target_reverse_lookup_unify (target_t) |
char * | target_port_range (target_t) |
char * | target_ssh_port (target_t) |
char * | trash_target_hosts (target_t) |
char * | trash_target_exclude_hosts (target_t) |
int | target_in_use (target_t) |
int | trash_target_in_use (target_t) |
int | target_writable (target_t) |
int | trash_target_writable (target_t) |
char * | target_ssh_credential_name (const char *) |
void | init_target_task_iterator (iterator_t *, target_t) |
const char * | target_task_iterator_name (iterator_t *) |
const char * | target_task_iterator_uuid (iterator_t *) |
int | target_task_iterator_readable (iterator_t *) |
credential_t | target_credential (target_t, const char *) |
credential_t | trash_target_credential (target_t, const char *) |
int | trash_target_credential_location (target_t, const char *) |
int | target_login_port (target_t, const char *) |
int | trash_target_login_port (target_t, const char *) |
int | create_config (const char *, const char *, const array_t *, const array_t *, const char *, config_t *, char **) |
int | create_config_from_scanner (const char *, const char *, const char *, char **) |
int | copy_config (const char *, const char *, const char *, config_t *) |
int | delete_config (const char *, int) |
int | sync_config (const char *) |
gboolean | find_config_with_permission (const char *, config_t *, const char *) |
gboolean | find_config (const char *, config_t *) |
char * | config_uuid (config_t) |
int | config_type (config_t) |
scanner_t | config_scanner (config_t) |
char * | config_nvt_timeout (config_t, const char *) |
void | init_user_config_iterator (iterator_t *, config_t, int, int, const char *) |
int | init_config_iterator (iterator_t *, const get_data_t *) |
const char * | config_iterator_nvt_selector (iterator_t *) |
int | config_iterator_nvt_count (iterator_t *) |
int | config_iterator_family_count (iterator_t *) |
int | config_iterator_nvts_growing (iterator_t *) |
int | config_iterator_type (iterator_t *) |
int | config_iterator_families_growing (iterator_t *) |
char * | config_nvt_selector (config_t) |
int | config_in_use (config_t) |
int | config_writable (config_t) |
int | config_count (const get_data_t *) |
int | trash_config_in_use (config_t) |
int | trash_config_writable (config_t) |
int | trash_config_readable_uuid (const gchar *) |
int | config_families_growing (config_t) |
int | config_nvts_growing (config_t) |
int | create_task_check_config_scanner (config_t, scanner_t) |
int | modify_task_check_config_scanner (task_t, const char *, const char *) |
int | manage_set_config_preference (config_t, const char *, const char *, const char *) |
void | init_preference_iterator (iterator_t *, config_t) |
const char * | preference_iterator_name (iterator_t *) |
const char * | preference_iterator_value (iterator_t *) |
const char * | preference_iterator_type (iterator_t *) |
const char * | preference_iterator_default (iterator_t *) |
const char * | preference_iterator_hr_name (iterator_t *) |
int | manage_set_config (config_t, const char *, const char *, const char *) |
int | manage_set_config_nvts (config_t, const char *, GPtrArray *) |
int | manage_set_config_families (config_t, GPtrArray *, GPtrArray *, GPtrArray *, int) |
void | init_config_timeout_iterator (iterator_t *, config_t) |
const char * | config_timeout_iterator_oid (iterator_t *) |
const char * | config_timeout_iterator_nvt_name (iterator_t *) |
const char * | config_timeout_iterator_value (iterator_t *) |
char * | manage_nvt_name (nvt_t) |
char * | nvt_oid (const char *) |
char * | nvts_feed_version () |
void | set_nvts_feed_version (const char *) |
nvt_t | make_nvt_from_nvti (const nvti_t *, int) |
gboolean | find_nvt (const char *, nvt_t *) |
int | init_nvt_info_iterator (iterator_t *, get_data_t *, const char *) |
int | nvt_info_count (const get_data_t *) |
void | init_nvt_iterator (iterator_t *, nvt_t, config_t, const char *, const char *, int, const char *) |
void | init_cve_nvt_iterator (iterator_t *, const char *, int, const char *) |
const char * | nvt_iterator_oid (iterator_t *) |
const char * | nvt_iterator_version (iterator_t *) |
const char * | nvt_iterator_name (iterator_t *) |
const char * | nvt_iterator_description (iterator_t *) |
const char * | nvt_iterator_copyright (iterator_t *) |
const char * | nvt_iterator_cve (iterator_t *) |
const char * | nvt_iterator_bid (iterator_t *) |
const char * | nvt_iterator_xref (iterator_t *) |
const char * | nvt_iterator_tag (iterator_t *) |
int | nvt_iterator_category (iterator_t *) |
const char * | nvt_iterator_family (iterator_t *) |
const char * | nvt_iterator_cvss_base (iterator_t *) |
const char * | nvt_iterator_qod (iterator_t *) |
const char * | nvt_iterator_qod_type (iterator_t *iterator) |
const char * | nvt_iterator_solution_type (iterator_t *) |
int | family_nvt_count (const char *) |
void | manage_complete_nvt_cache_update (GList *, GList *, int) |
void | init_family_iterator (iterator_t *, int, const char *, int) |
const char * | family_iterator_name (iterator_t *) |
int | nvt_selector_family_growing (const char *, const char *, int) |
int | nvt_selector_family_count (const char *, int) |
int | nvt_selector_nvt_count (const char *, const char *, int) |
void | init_nvt_selector_iterator (iterator_t *, const char *, config_t, int) |
const char * | nvt_selector_iterator_nvt (iterator_t *) |
const char * | nvt_selector_iterator_name (iterator_t *) |
int | nvt_selector_iterator_include (iterator_t *) |
int | nvt_selector_iterator_type (iterator_t *) |
void | manage_nvt_preference_add (const char *, const char *, int) |
void | manage_nvt_preferences_enable () |
void | init_nvt_preference_iterator (iterator_t *, const char *) |
const char * | nvt_preference_iterator_name (iterator_t *) |
const char * | nvt_preference_iterator_value (iterator_t *) |
char * | nvt_preference_iterator_config_value (iterator_t *, config_t) |
char * | nvt_preference_iterator_real_name (iterator_t *) |
char * | nvt_preference_iterator_type (iterator_t *) |
char * | nvt_preference_iterator_nvt (iterator_t *) |
int | nvt_preference_count (const char *) |
gchar * | get_nvti_xml (iterator_t *, int, int, int, const char *, config_t, int) |
Create and return XML description for an NVT. More... | |
char * | task_preference_value (task_t, const char *) |
int | set_task_preferences (task_t, array_t *) |
void | init_task_group_iterator (iterator_t *, task_t) |
Initialise a task group iterator. More... | |
const char * | task_group_iterator_name (iterator_t *) |
const char * | task_group_iterator_uuid (iterator_t *) |
void | init_task_role_iterator (iterator_t *, task_t) |
Initialise a task role iterator. More... | |
const char * | task_role_iterator_name (iterator_t *) |
const char * | task_role_iterator_uuid (iterator_t *) |
gboolean | find_credential_with_permission (const char *, credential_t *, const char *) |
int | create_credential (const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, credential_t *) |
int | copy_credential (const char *, const char *, const char *, credential_t *) |
int | modify_credential (const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *) |
int | delete_credential (const char *, int) |
int | credential_count (const get_data_t *) |
void | set_credential_name (credential_t, const char *) |
void | set_credential_comment (credential_t, const char *) |
int | set_credential_data (credential_t, const char *, const char *) |
void | set_credential_login (credential_t, const char *) |
void | set_credential_certificate (credential_t, const char *) |
void | set_credential_auth_algorithm (credential_t, const char *) |
void | set_credential_privacy_algorithm (credential_t, const char *) |
void | set_credential_password (credential_t, const char *) |
void | set_credential_private_key (credential_t, const char *, const char *) |
void | set_credential_snmp_secret (credential_t, const char *, const char *, const char *) |
void | init_credential_iterator_one (iterator_t *, credential_t) |
int | init_credential_iterator (iterator_t *, const get_data_t *) |
const char * | credential_iterator_login (iterator_t *) |
const char * | credential_iterator_auth_algorithm (iterator_t *) |
const char * | credential_iterator_privacy_algorithm (iterator_t *) |
const char * | credential_iterator_password (iterator_t *) |
const char * | credential_iterator_community (iterator_t *) |
const char * | credential_iterator_privacy_password (iterator_t *) |
const char * | credential_iterator_private_key (iterator_t *) |
const char * | credential_iterator_type (iterator_t *) |
int | credential_iterator_allow_insecure (iterator_t *) |
const char * | credential_full_type (const char *) |
Get the written-out name of an LSC Credential type. More... | |
char * | credential_iterator_rpm (iterator_t *) |
char * | credential_iterator_deb (iterator_t *) |
char * | credential_iterator_exe (iterator_t *) |
const char * | credential_iterator_certificate (iterator_t *) |
char * | credential_uuid (credential_t) |
char * | trash_credential_uuid (credential_t) |
char * | credential_name (credential_t) |
char * | trash_credential_name (credential_t) |
char * | credential_type (credential_t) |
void | init_credential_target_iterator (iterator_t *, credential_t, int) |
const char * | credential_target_iterator_uuid (iterator_t *) |
const char * | credential_target_iterator_name (iterator_t *) |
int | credential_target_iterator_readable (iterator_t *) |
void | init_credential_scanner_iterator (iterator_t *, credential_t, int) |
const char * | credential_scanner_iterator_uuid (iterator_t *) |
const char * | credential_scanner_iterator_name (iterator_t *) |
int | credential_scanner_iterator_readable (iterator_t *) |
int | trash_credential_in_use (credential_t) |
int | credential_in_use (credential_t) |
int | trash_credential_writable (credential_t) |
int | credential_writable (credential_t) |
int | trash_credential_readable (credential_t) |
gchar * | credential_value (credential_t, const char *) |
gchar * | credential_encrypted_value (credential_t, const char *) |
int | create_agent (const char *, const char *, const char *, const char *, const char *, const char *, const char *, agent_t *) |
int | copy_agent (const char *, const char *, const char *, agent_t *) |
int | modify_agent (const char *, const char *, const char *) |
int | delete_agent (const char *, int) |
int | agent_in_use (agent_t) |
int | trash_agent_in_use (agent_t) |
int | trash_agent_writable (agent_t) |
int | agent_writable (agent_t) |
int | verify_agent (const char *) |
char * | agent_uuid (agent_t) |
int | agent_count (const get_data_t *) |
int | init_agent_iterator (iterator_t *, const get_data_t *) |
const char * | agent_iterator_installer (iterator_t *) |
gsize | agent_iterator_installer_size (iterator_t *) |
const char * | agent_iterator_installer_64 (iterator_t *) |
const char * | agent_iterator_installer_filename (iterator_t *) |
const char * | agent_iterator_installer_signature_64 (iterator_t *) |
const char * | agent_iterator_trust (iterator_t *) |
time_t | agent_iterator_trust_time (iterator_t *) |
const char * | agent_iterator_howto_install (iterator_t *) |
const char * | agent_iterator_howto_use (iterator_t *) |
char * | result_host_asset_id (const char *, result_t) |
char * | host_uuid (resource_t) |
host_t | host_notice (const char *, const char *, const char *, const char *, const char *, int, int) |
void | init_host_identifier_iterator (iterator_t *, host_t, int, const char *) |
const char * | host_identifier_iterator_value (iterator_t *) |
const char * | host_identifier_iterator_source_type (iterator_t *) |
const char * | host_identifier_iterator_source_id (iterator_t *) |
const char * | host_identifier_iterator_source_data (iterator_t *) |
int | host_identifier_iterator_source_orphan (iterator_t *) |
const char * | host_identifier_iterator_os_id (iterator_t *) |
const char * | host_identifier_iterator_os_title (iterator_t *) |
int | init_asset_host_iterator (iterator_t *, const get_data_t *) |
int | asset_iterator_writable (iterator_t *) |
int | asset_iterator_in_use (iterator_t *) |
const char * | asset_host_iterator_severity (iterator_t *) |
int | asset_host_count (const get_data_t *) |
int | init_asset_os_iterator (iterator_t *, const get_data_t *) |
const char * | asset_os_iterator_title (iterator_t *) |
int | asset_os_iterator_installs (iterator_t *) |
const char * | asset_os_iterator_latest_severity (iterator_t *) |
const char * | asset_os_iterator_highest_severity (iterator_t *) |
const char * | asset_os_iterator_average_severity (iterator_t *) |
int | asset_os_count (const get_data_t *) |
int | total_asset_count (const get_data_t *) |
void | init_os_host_iterator (iterator_t *, resource_t) |
const char * | os_host_iterator_severity (iterator_t *) |
void | init_host_detail_iterator (iterator_t *, resource_t) |
const char * | host_detail_iterator_name (iterator_t *) |
const char * | host_detail_iterator_value (iterator_t *) |
const char * | host_detail_iterator_source_type (iterator_t *) |
const char * | host_detail_iterator_source_id (iterator_t *) |
int | modify_asset (const char *, const char *) |
int | delete_asset (const char *, const char *, int) |
int | create_asset_report (const char *, const char *) |
int | create_asset_host (const char *, const char *, resource_t *) |
gboolean | find_note_with_permission (const char *, note_t *, const char *) |
int | create_note (const char *, const char *, const char *, const char *, const char *, const char *, const char *, task_t, result_t, note_t *) |
int | copy_note (const char *, note_t *) |
int | delete_note (const char *, int) |
int | note_uuid (note_t, char **) |
int | modify_note (note_t, const char *, const char *, const char *, const char *, const char *, const char *, task_t, result_t) |
int | note_count (const get_data_t *, nvt_t, result_t, task_t) |
int | init_note_iterator (iterator_t *, const get_data_t *, nvt_t, result_t, task_t) |
const char * | note_iterator_nvt_oid (iterator_t *) |
time_t | note_iterator_creation_time (iterator_t *) |
time_t | note_iterator_modification_time (iterator_t *) |
const char * | note_iterator_text (iterator_t *) |
const char * | note_iterator_hosts (iterator_t *) |
const char * | note_iterator_port (iterator_t *) |
const char * | note_iterator_threat (iterator_t *) |
task_t | note_iterator_task (iterator_t *) |
result_t | note_iterator_result (iterator_t *) |
time_t | note_iterator_end_time (iterator_t *) |
int | note_iterator_active (iterator_t *) |
const char * | note_iterator_nvt_name (iterator_t *) |
const char * | note_iterator_nvt_type (iterator_t *) |
const char * | note_iterator_severity (iterator_t *) |
gboolean | find_override_with_permission (const char *, override_t *, const char *) |
int | create_override (const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, task_t, result_t, override_t *) |
int | override_uuid (override_t, char **) |
int | copy_override (const char *, override_t *) |
int | delete_override (const char *, int) |
int | modify_override (override_t, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, task_t, result_t) |
int | override_count (const get_data_t *, nvt_t, result_t, task_t) |
int | init_override_iterator (iterator_t *, const get_data_t *, nvt_t, result_t, task_t) |
const char * | override_iterator_nvt_oid (iterator_t *) |
time_t | override_iterator_creation_time (iterator_t *) |
time_t | override_iterator_modification_time (iterator_t *) |
const char * | override_iterator_text (iterator_t *) |
const char * | override_iterator_hosts (iterator_t *) |
const char * | override_iterator_port (iterator_t *) |
const char * | override_iterator_threat (iterator_t *) |
const char * | override_iterator_new_threat (iterator_t *) |
task_t | override_iterator_task (iterator_t *) |
result_t | override_iterator_result (iterator_t *) |
time_t | override_iterator_end_time (iterator_t *) |
int | override_iterator_active (iterator_t *) |
const char * | override_iterator_nvt_name (iterator_t *) |
const char * | override_iterator_nvt_type (iterator_t *) |
const char * | override_iterator_severity (iterator_t *) |
const char * | override_iterator_new_severity (iterator_t *) |
int | acknowledge_bye () |
Acknowledge a scanner BYE. More... | |
int | acknowledge_feed_version_info () |
Acknowledge scanner PLUGINS_FEED_VERSION message,. More... | |
int | manage_check_current_task () |
Handle state changes to current task made by other processes. More... | |
int | init_system_report_type_iterator (report_type_iterator_t *, const char *, const char *) |
Initialise a system report type iterator. More... | |
void | cleanup_report_type_iterator (report_type_iterator_t *) |
Cleanup a report type iterator. More... | |
gboolean | next_report_type (report_type_iterator_t *) |
Increment a report type iterator. More... | |
const char * | report_type_iterator_name (report_type_iterator_t *) |
Return the name from a report type iterator. More... | |
const char * | report_type_iterator_title (report_type_iterator_t *) |
Return the title from a report type iterator. More... | |
int | manage_system_report (const char *, const char *, const char *, const char *, const char *, char **) |
Get a system report. More... | |
int | manage_create_scanner (GSList *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *) |
int | manage_modify_scanner (GSList *, const gchar *, const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *) |
int | manage_delete_scanner (GSList *, const gchar *, const gchar *) |
int | manage_verify_scanner (GSList *, const gchar *, const gchar *) |
int | manage_get_scanners (GSList *, const gchar *) |
gboolean | find_scanner (const char *, scanner_t *) |
int | create_scanner (const char *, const char *, const char *, const char *, const char *, scanner_t *, const char *, const char *) |
int | copy_scanner (const char *, const char *, const char *, scanner_t *) |
int | modify_scanner (const char *, const char *, const char *, const char *, const char *, const char *, const char *, const char *) |
int | delete_scanner (const char *, int) |
gboolean | find_scanner_with_permission (const char *, scanner_t *, const char *) |
int | scanner_in_use (scanner_t) |
int | trash_scanner_readable (scanner_t) |
int | trash_scanner_in_use (scanner_t) |
int | trash_scanner_writable (scanner_t) |
int | scanner_writable (scanner_t) |
char * | scanner_uuid (scanner_t) |
const char * | scanner_uuid_default () |
char * | scanner_host (scanner_t) |
int | scanner_port (scanner_t) |
int | scanner_type (scanner_t) |
char * | scanner_ca_pub (scanner_t) |
char * | scanner_key_pub (scanner_t) |
char * | scanner_key_priv (scanner_t) |
char * | scanner_login (scanner_t) |
char * | scanner_password (scanner_t) |
int | scanner_count (const get_data_t *) |
int | init_scanner_iterator (iterator_t *, const get_data_t *) |
const char * | scanner_iterator_host (iterator_t *) |
int | scanner_iterator_port (iterator_t *) |
int | scanner_iterator_type (iterator_t *) |
const char * | scanner_iterator_credential_name (iterator_t *) |
credential_t | scanner_iterator_credential (iterator_t *) |
int | scanner_iterator_credential_trash (iterator_t *) |
const char * | scanner_iterator_ca_pub (iterator_t *) |
const char * | scanner_iterator_key_pub (iterator_t *) |
const char * | scanner_iterator_key_priv (iterator_t *) |
void | init_scanner_task_iterator (iterator_t *, scanner_t) |
const char * | scanner_task_iterator_uuid (iterator_t *) |
const char * | scanner_task_iterator_name (iterator_t *) |
int | scanner_task_iterator_readable (iterator_t *) |
char * | scanner_name (scanner_t) |
int | osp_get_version_from_iterator (iterator_t *, char **, char **, char **, char **, char **, char **) |
int | osp_get_details_from_iterator (iterator_t *, char **, GSList **) |
osp_connection_t * | osp_scanner_connect (scanner_t) |
int | verify_scanner (const char *, char **) |
gboolean | find_schedule_with_permission (const char *, schedule_t *, const char *) |
int | create_schedule (const char *, const char *, time_t, time_t, time_t, time_t, const char *, schedule_t *) |
int | copy_schedule (const char *, const char *, const char *, schedule_t *) |
int | delete_schedule (const char *, int) |
void | manage_auth_allow_all (int) |
Ensure that any subsequent authentications succeed. More... | |
gchar * | get_scheduled_user_uuid () |
Access UUID of user that scheduled the current task. More... | |
void | set_scheduled_user_uuid (gchar *uuid) |
Set UUID of user that scheduled the current task. More... | |
int | manage_schedule (int(*)(openvas_connection_t *, gchar *), gboolean, sigset_t *) |
Schedule any actions that are due. More... | |
char * | schedule_uuid (schedule_t) |
char * | schedule_name (schedule_t) |
int | schedule_duration (schedule_t) |
int | schedule_period (schedule_t) |
int | schedule_info (schedule_t, time_t *, time_t *, int *, int *, int *) |
int | init_schedule_iterator (iterator_t *, const get_data_t *) |
time_t | schedule_iterator_first_time (iterator_t *) |
time_t | schedule_iterator_next_time (iterator_t *) |
time_t | schedule_iterator_period (iterator_t *) |
time_t | schedule_iterator_period_months (iterator_t *) |
time_t | schedule_iterator_duration (iterator_t *) |
const char * | schedule_iterator_timezone (iterator_t *) |
time_t | schedule_iterator_initial_offset (iterator_t *) |
int | trash_schedule_in_use (schedule_t) |
int | schedule_in_use (schedule_t) |
int | trash_schedule_writable (schedule_t) |
int | trash_schedule_readable (schedule_t) |
int | schedule_writable (schedule_t) |
int | schedule_count (const get_data_t *) |
void | init_schedule_task_iterator (iterator_t *, schedule_t) |
const char * | schedule_task_iterator_uuid (iterator_t *) |
const char * | schedule_task_iterator_name (iterator_t *) |
int | schedule_task_iterator_readable (iterator_t *) |
int | modify_schedule (const char *, const char *, const char *, time_t, time_t, time_t, time_t, const char *) |
int | get_schedule_timeout () |
Get the current schedule timeout. More... | |
void | set_schedule_timeout (int) |
Set the schedule timeout. More... | |
gboolean | find_report_format_with_permission (const char *, report_format_t *, const char *) |
gboolean | lookup_report_format (const char *, report_format_t *) |
int | create_report_format (const char *, const char *, const char *, const char *, const char *, const char *, int, array_t *, array_t *, array_t *, const char *, report_format_t *) |
int | copy_report_format (const char *, const char *, report_format_t *) |
int | modify_report_format (const char *, const char *, const char *, const char *, const char *, const char *, const char *) |
int | delete_report_format (const char *, int) |
int | verify_report_format (const char *) |
char * | report_format_uuid (report_format_t) |
char * | report_format_owner_uuid (report_format_t) |
void | set_report_format_active (report_format_t, int) |
char * | report_format_name (report_format_t) |
char * | report_format_content_type (report_format_t) |
char * | report_format_extension (report_format_t) |
void | set_report_format_name (report_format_t, const char *) |
void | set_report_format_summary (report_format_t, const char *) |
int | set_report_format_param (report_format_t, const char *, const char *) |
int | report_format_global (report_format_t) |
int | trash_report_format_global (report_format_t) |
int | report_format_predefined (report_format_t) |
int | report_format_active (report_format_t) |
int | report_format_trust (report_format_t) |
int | report_format_in_use (report_format_t) |
int | trash_report_format_in_use (report_format_t) |
int | trash_report_format_writable (report_format_t) |
int | report_format_writable (report_format_t) |
int | report_format_count (const get_data_t *) |
int | init_report_format_iterator (iterator_t *, const get_data_t *) |
const char * | report_format_iterator_extension (iterator_t *) |
const char * | report_format_iterator_content_type (iterator_t *) |
const char * | report_format_iterator_description (iterator_t *) |
int | report_format_iterator_active (iterator_t *) |
const char * | report_format_iterator_signature (iterator_t *) |
const char * | report_format_iterator_trust (iterator_t *) |
const char * | report_format_iterator_summary (iterator_t *) |
time_t | report_format_iterator_trust_time (iterator_t *) |
void | init_report_format_alert_iterator (iterator_t *, report_format_t) |
const char * | report_format_alert_iterator_name (iterator_t *) |
const char * | report_format_alert_iterator_uuid (iterator_t *) |
int | report_format_alert_iterator_readable (iterator_t *) |
int | init_report_format_file_iterator (file_iterator_t *, report_format_t) |
Initialise a report format file iterator. More... | |
void | cleanup_file_iterator (file_iterator_t *) |
Cleanup a report type iterator. More... | |
gboolean | next_file (file_iterator_t *) |
Increment a report type iterator. More... | |
const char * | file_iterator_name (file_iterator_t *) |
Return the name from a file iterator. More... | |
gchar * | file_iterator_content_64 (file_iterator_t *) |
Return the file contents from a file iterator. More... | |
const char * | report_format_param_type_name (report_format_param_type_t) |
Get the name of a report format param type. More... | |
report_format_param_type_t | report_format_param_type_from_name (const char *) |
Get a report format param type from a name. More... | |
void | init_report_format_param_iterator (iterator_t *, report_format_t, int, int, const char *) |
report_format_param_t | report_format_param_iterator_param (iterator_t *) |
const char * | report_format_param_iterator_name (iterator_t *) |
const char * | report_format_param_iterator_value (iterator_t *) |
const char * | report_format_param_iterator_type_name (iterator_t *) |
report_format_param_type_t | report_format_param_iterator_type (iterator_t *) |
long long int | report_format_param_iterator_type_min (iterator_t *) |
long long int | report_format_param_iterator_type_max (iterator_t *) |
const char * | report_format_param_iterator_fallback (iterator_t *) |
const char * | report_format_param_iterator_type_regex (iterator_t *) |
void | init_param_option_iterator (iterator_t *, report_format_param_t, int, const char *) |
const char * | param_option_iterator_value (iterator_t *) |
int | init_group_iterator (iterator_t *, const get_data_t *) |
int | copy_group (const char *, const char *, const char *, group_t *) |
int | create_group (const char *, const char *, const char *, int, group_t *) |
int | delete_group (const char *, int) |
char * | group_uuid (group_t) |
gchar * | group_users (group_t) |
int | trash_group_in_use (group_t) |
int | group_in_use (group_t) |
int | trash_group_writable (group_t) |
int | group_writable (group_t) |
int | group_count (const get_data_t *) |
int | modify_group (const char *, const char *, const char *, const char *) |
int | create_permission (const char *, const char *, const char *, const char *, const char *, const char *, permission_t *) |
int | copy_permission (const char *, const char *, permission_t *) |
char * | permission_uuid (permission_t) |
char * | permission_name (permission_t) |
int | permission_is_admin (const char *) |
int | permission_in_use (permission_t) |
int | trash_permission_in_use (permission_t) |
int | permission_writable (permission_t) |
int | trash_permission_writable (permission_t) |
int | permission_count (const get_data_t *) |
int | init_permission_iterator (iterator_t *, const get_data_t *) |
const char * | permission_iterator_resource_type (iterator_t *) |
const char * | permission_iterator_resource_uuid (iterator_t *) |
const char * | permission_iterator_resource_name (iterator_t *) |
int | permission_iterator_resource_in_trash (iterator_t *) |
int | permission_iterator_resource_orphan (iterator_t *) |
int | permission_iterator_resource_readable (iterator_t *) |
const char * | permission_iterator_subject_type (iterator_t *) |
const char * | permission_iterator_subject_uuid (iterator_t *) |
const char * | permission_iterator_subject_name (iterator_t *) |
int | permission_iterator_subject_in_trash (iterator_t *) |
int | permission_iterator_subject_readable (iterator_t *) |
int | delete_permission (const char *, int) |
int | modify_permission (const char *, const char *, const char *, const char *, const char *, const char *, const char *) |
gboolean | find_port_list (const char *, port_list_t *) |
gboolean | find_port_list_with_permission (const char *, port_list_t *, const char *) |
gboolean | find_port_range (const char *, port_list_t *) |
int | create_port_list (const char *, const char *, const char *, const char *, array_t *, port_list_t *) |
int | copy_port_list (const char *, const char *, const char *, port_list_t *) |
int | modify_port_list (const char *, const char *, const char *) |
int | create_port_range (const char *, const char *, const char *, const char *, const char *, port_range_t *) |
int | delete_port_list (const char *, int) |
int | delete_port_range (const char *, int) |
int | port_list_count (const get_data_t *) |
int | init_port_list_iterator (iterator_t *, const get_data_t *) |
int | port_list_iterator_count_all (iterator_t *) |
int | port_list_iterator_count_tcp (iterator_t *) |
int | port_list_iterator_count_udp (iterator_t *) |
char * | port_list_uuid (port_list_t) |
char * | port_range_uuid (port_range_t) |
int | port_list_is_predefined (port_list_t) |
int | port_list_in_use (port_list_t) |
int | trash_port_list_in_use (port_list_t) |
int | trash_port_list_writable (port_list_t) |
int | port_list_writable (port_list_t) |
int | trash_port_list_readable_uuid (const gchar *) |
void | init_port_range_iterator (iterator_t *, port_range_t, int, int, const char *) |
const char * | port_range_iterator_uuid (iterator_t *) |
const char * | port_range_iterator_comment (iterator_t *) |
const char * | port_range_iterator_start (iterator_t *) |
const char * | port_range_iterator_end (iterator_t *) |
const char * | port_range_iterator_type (iterator_t *) |
port_protocol_t | port_range_iterator_type_int (iterator_t *iterator) |
void | init_port_list_target_iterator (iterator_t *, port_list_t, int) |
const char * | port_list_target_iterator_uuid (iterator_t *) |
const char * | port_list_target_iterator_name (iterator_t *) |
int | port_list_target_iterator_readable (iterator_t *) |
int | init_role_iterator (iterator_t *, const get_data_t *) |
int | copy_role (const char *, const char *, const char *, role_t *) |
int | create_role (const char *, const char *, const char *, role_t *) |
int | delete_role (const char *, int) |
char * | role_uuid (role_t) |
gchar * | role_users (role_t) |
int | trash_role_in_use (role_t) |
int | role_in_use (role_t) |
int | trash_role_writable (role_t) |
int | role_writable (role_t) |
int | role_count (const get_data_t *) |
int | modify_role (const char *, const char *, const char *, const char *) |
const char * | keyword_relation_symbol (keyword_relation_t) |
Get the symbol of a keyword relation. More... | |
void | filter_free (array_t *) |
Free a split filter. More... | |
array_t * | split_filter (const gchar *) |
Split the filter term into parts. More... | |
int | buffer_get_filter_xml (GString *, const char *, const get_data_t *, const char *, const char *) |
gboolean | find_filter (const char *, filter_t *) |
gboolean | find_filter_with_permission (const char *, filter_t *, const char *) |
char * | filter_uuid (filter_t) |
char * | trash_filter_uuid (filter_t) |
char * | filter_name (filter_t) |
char * | trash_filter_name (filter_t) |
gchar * | filter_term (const char *) |
gchar * | filter_term_value (const char *, const char *) |
int | create_filter (const char *, const char *, const char *, const char *, int, filter_t *) |
int | copy_filter (const char *, const char *, const char *, filter_t *) |
int | delete_filter (const char *, int) |
int | trash_filter_in_use (filter_t) |
int | filter_in_use (filter_t) |
int | trash_filter_writable (filter_t) |
int | filter_writable (filter_t) |
int | filter_count (const get_data_t *) |
int | init_filter_iterator (iterator_t *, const get_data_t *) |
const char * | filter_iterator_type (iterator_t *) |
const char * | filter_iterator_term (iterator_t *) |
void | init_filter_alert_iterator (iterator_t *, filter_t) |
const char * | filter_alert_iterator_name (iterator_t *) |
const char * | filter_alert_iterator_uuid (iterator_t *) |
int | filter_alert_iterator_readable (iterator_t *) |
int | modify_filter (const char *, const char *, const char *, const char *, const char *) |
int | manage_schema (gchar *, gchar **, gsize *, gchar **, gchar **) |
int | manage_restore (const char *) |
int | manage_empty_trashcan () |
void | parse_tags (const char *, gchar **, gchar **) |
Split up the tags received from the scanner. More... | |
int | manage_read_info (gchar *, gchar *, gchar *, gchar **) |
Read raw information. More... | |
int | info_name_count (const gchar *, const gchar *) |
int | manage_scap_loaded () |
Check whether SCAP is available. More... | |
const char * | manage_scap_update_time () |
GET SCAP update time, as a string. More... | |
void | init_cpe_cve_iterator (iterator_t *, const char *, int, const char *) |
int | init_cpe_info_iterator (iterator_t *, get_data_t *, const char *) |
int | cpe_info_count (const get_data_t *get) |
const char * | cpe_info_iterator_title (iterator_t *) |
const char * | cpe_info_iterator_status (iterator_t *) |
const char * | cpe_info_iterator_max_cvss (iterator_t *) |
const char * | cpe_info_iterator_deprecated_by_id (iterator_t *) |
const char * | cpe_info_iterator_cve_refs (iterator_t *) |
const char * | cpe_info_iterator_nvd_id (iterator_t *) |
const char * | cve_iterator_name (iterator_t *) |
const char * | cve_iterator_cvss (iterator_t *) |
const char * | cve_info_iterator_cvss (iterator_t *) |
const char * | cve_info_iterator_vector (iterator_t *) |
const char * | cve_info_iterator_complexity (iterator_t *) |
const char * | cve_info_iterator_authentication (iterator_t *) |
const char * | cve_info_iterator_confidentiality_impact (iterator_t *) |
const char * | cve_info_iterator_integrity_impact (iterator_t *) |
const char * | cve_info_iterator_availability_impact (iterator_t *) |
const char * | cve_info_iterator_description (iterator_t *) |
const char * | cve_info_iterator_products (iterator_t *) |
int | init_cve_info_iterator (iterator_t *, get_data_t *, const char *) |
int | cve_info_count (const get_data_t *get) |
gchar * | cve_cvss_base (const gchar *) |
int | init_ovaldef_info_iterator (iterator_t *, get_data_t *, const char *) |
int | ovaldef_info_count (const get_data_t *get) |
const char * | ovaldef_info_iterator_version (iterator_t *) |
const char * | ovaldef_info_iterator_deprecated (iterator_t *) |
const char * | ovaldef_info_iterator_class (iterator_t *) |
const char * | ovaldef_info_iterator_title (iterator_t *) |
const char * | ovaldef_info_iterator_description (iterator_t *) |
const char * | ovaldef_info_iterator_file (iterator_t *) |
const char * | ovaldef_info_iterator_status (iterator_t *) |
const char * | ovaldef_info_iterator_max_cvss (iterator_t *) |
const char * | ovaldef_info_iterator_cve_refs (iterator_t *) |
char * | ovaldef_severity (const char *) |
char * | ovaldef_version (const char *) |
char * | ovaldef_uuid (const char *, const char *) |
char * | ovaldef_cves (const char *) |
int | manage_cert_loaded () |
Check whether CERT is available. More... | |
int | init_cert_bund_adv_info_iterator (iterator_t *, get_data_t *, const char *) |
int | cert_bund_adv_info_count (const get_data_t *get) |
const char * | cert_bund_adv_info_iterator_title (iterator_t *) |
const char * | cert_bund_adv_info_iterator_summary (iterator_t *) |
const char * | cert_bund_adv_info_iterator_cve_refs (iterator_t *) |
const char * | cert_bund_adv_info_iterator_max_cvss (iterator_t *) |
void | init_cve_cert_bund_adv_iterator (iterator_t *, const char *, int, const char *) |
void | init_nvt_cert_bund_adv_iterator (iterator_t *, const char *, int, const char *) |
int | init_dfn_cert_adv_info_iterator (iterator_t *, get_data_t *, const char *) |
int | dfn_cert_adv_info_count (const get_data_t *get) |
const char * | dfn_cert_adv_info_iterator_title (iterator_t *) |
const char * | dfn_cert_adv_info_iterator_summary (iterator_t *) |
const char * | dfn_cert_adv_info_iterator_cve_refs (iterator_t *) |
const char * | dfn_cert_adv_info_iterator_max_cvss (iterator_t *) |
void | init_cve_dfn_cert_adv_iterator (iterator_t *, const char *, int, const char *) |
void | init_nvt_dfn_cert_adv_iterator (iterator_t *, const char *, int, const char *) |
int | all_info_count (const get_data_t *) |
int | total_info_count (const get_data_t *, int) |
int | init_all_info_iterator (iterator_t *, get_data_t *, const char *) |
const char * | all_info_iterator_type (iterator_t *) |
const char * | all_info_iterator_extra (iterator_t *) |
const char * | all_info_iterator_severity (iterator_t *) |
void | init_ovaldi_file_iterator (iterator_t *) |
const char * | ovaldi_file_iterator_name (iterator_t *) |
int | manage_max_rows (int) |
int | setting_count (const char *) |
int | setting_is_default_ca_cert (const gchar *) |
char * | setting_filter (const char *) |
const char * | setting_severity () |
double | setting_default_severity_dbl () |
int | setting_dynamic_severity_int () |
char * | setting_timezone () |
int | setting_auto_cache_rebuild_int () |
void | init_setting_iterator (iterator_t *, const char *, const char *, int, int, int, const char *) |
const char * | setting_iterator_uuid (iterator_t *) |
const char * | setting_iterator_name (iterator_t *) |
const char * | setting_iterator_comment (iterator_t *) |
const char * | setting_iterator_value (iterator_t *) |
int | setting_value_int (const char *, int *) |
int | modify_setting (const gchar *, const gchar *, const gchar *, gchar **) |
int | manage_modify_setting (GSList *, const gchar *, const gchar *, const gchar *, const char *) |
char * | manage_default_ca_cert () |
gboolean | find_user_by_name_with_permission (const char *, user_t *, const char *) |
int | manage_create_user (GSList *, const gchar *, const gchar *, const gchar *, const gchar *) |
int | manage_delete_user (GSList *, const gchar *, const gchar *, const gchar *) |
int | manage_get_users (GSList *, const gchar *, const gchar *) |
report_host_t | manage_report_host_add (report_t, const char *, time_t, time_t) |
int | report_host_dead (report_host_t) |
int | report_host_result_count (report_host_t) |
int | report_host_noticeable (report_t, const gchar *) |
void | report_host_set_end_time (report_host_t, time_t) |
gchar * | host_routes_xml (host_t) |
int | manage_set_password (GSList *, const gchar *, const gchar *, const gchar *) |
gchar * | manage_user_hash (const gchar *) |
Get user hash. More... | |
gchar * | manage_user_uuid (const gchar *, auth_method_t) |
int | manage_user_exists (const gchar *, auth_method_t) |
int | manage_scanner_set (const char *) |
Set the address of scanner to connect to. More... | |
int | manage_scanner_set_default () |
Set the default scanner as the scanner to connect to. More... | |
int | copy_user (const char *, const char *, const char *, user_t *) |
gchar * | keyfile_to_auth_conf_settings_xml (const gchar *) |
int | init_user_iterator (iterator_t *, const get_data_t *) |
const char * | user_iterator_role (iterator_t *) |
const char * | user_iterator_method (iterator_t *) |
const char * | user_iterator_hosts (iterator_t *) |
int | user_iterator_hosts_allow (iterator_t *) |
const char * | user_iterator_ifaces (iterator_t *) |
int | user_iterator_ifaces_allow (iterator_t *) |
void | init_user_group_iterator (iterator_t *, user_t) |
const char * | user_group_iterator_uuid (iterator_t *) |
const char * | user_group_iterator_name (iterator_t *) |
int | user_group_iterator_readable (iterator_t *) |
void | init_user_role_iterator (iterator_t *, user_t) |
const char * | user_role_iterator_uuid (iterator_t *) |
const char * | user_role_iterator_name (iterator_t *) |
int | user_role_iterator_readable (iterator_t *) |
int | create_user (const gchar *, const gchar *, const gchar *, int, const gchar *, int, const array_t *, array_t *, gchar **, array_t *, gchar **, gchar **, user_t *, int) |
int | delete_user (const char *, const char *, int, int, const char *, const char *) |
int | modify_user (const gchar *, gchar **, const gchar *, const gchar *, const gchar *, int, const gchar *, int, const array_t *, array_t *, gchar **, array_t *, gchar **, gchar **) |
int | user_is_admin (const char *) |
int | user_is_super_admin (const char *) |
Check whether a user is a Super Admin. More... | |
int | user_is_observer (const char *) |
int | user_is_user (const char *) |
int | user_in_use (user_t) |
int | trash_user_in_use (user_t) |
int | user_writable (user_t) |
int | trash_user_writable (user_t) |
int | user_count (const get_data_t *) |
gchar * | user_name (const char *) |
char * | user_uuid (user_t) |
gchar * | user_ifaces (const char *) |
int | user_ifaces_allow (const char *) |
gchar * | user_hosts (const char *) |
int | user_hosts_allow (const char *) |
void | manage_get_ldap_info (int *, gchar **, gchar **, int *, gchar **) |
void | manage_set_ldap_info (int, gchar *, gchar *, int, gchar *) |
void | manage_get_radius_info (int *, char **, char **) |
void | manage_set_radius_info (int, gchar *, gchar *) |
char * | tag_uuid (target_t) |
int | copy_tag (const char *, const char *, const char *, tag_t *) |
int | create_tag (const char *, const char *, const char *, const char *, const char *, const char *, tag_t *) |
int | delete_tag (const char *, int) |
int | modify_tag (const char *, const char *, const char *, const char *, const char *, const char *, const char *) |
int | init_tag_iterator (iterator_t *, const get_data_t *) |
int | tag_count (const get_data_t *get) |
const char * | tag_iterator_resource_type (iterator_t *) |
const char * | tag_iterator_resource_uuid (iterator_t *) |
int | tag_iterator_resource_location (iterator_t *) |
int | tag_iterator_active (iterator_t *) |
const char * | tag_iterator_value (iterator_t *) |
const char * | tag_iterator_resource_name (iterator_t *) |
int | tag_iterator_resource_readable (iterator_t *) |
int | tag_iterator_orphan (iterator_t *) |
int | init_tag_name_iterator (iterator_t *, const get_data_t *) |
const char * | tag_name_iterator_name (iterator_t *) |
int | user_resources_in_use (user_t, const char *, int(*)(resource_t), const char *, int(*)(resource_t)) |
int | init_resource_tag_iterator (iterator_t *, const char *, resource_t, int, const char *, int) |
const char * | resource_tag_iterator_uuid (iterator_t *) |
const char * | resource_tag_iterator_name (iterator_t *) |
const char * | resource_tag_iterator_value (iterator_t *) |
const char * | resource_tag_iterator_comment (iterator_t *) |
int | resource_tag_count (const char *, resource_t, int) |
int | tag_in_use (tag_t) |
int | trash_tag_in_use (tag_t) |
int | tag_writable (tag_t) |
int | trash_tag_writable (tag_t) |
void | sort_data_free (sort_data_t *) |
int | init_aggregate_iterator (iterator_t *, const char *, const get_data_t *, int, GArray *, const char *, const char *, GArray *, GArray *, int, int, const char *, const char *) |
Initialise a GET_AGGREGATES iterator, including observed resources. More... | |
int | aggregate_iterator_count (iterator_t *) |
Get the count from an aggregate iterator. More... | |
double | aggregate_iterator_min (iterator_t *, int) |
Get the minimum from an aggregate iterator. More... | |
double | aggregate_iterator_max (iterator_t *, int) |
Get the maximum from an aggregate iterator. More... | |
double | aggregate_iterator_mean (iterator_t *, int) |
Get the mean from an aggregate iterator. More... | |
double | aggregate_iterator_sum (iterator_t *, int) |
Get the sum from a statistics iterator. More... | |
const char * | aggregate_iterator_text (iterator_t *, int, int) |
Get the value of a text column from an aggregate iterator. More... | |
const char * | aggregate_iterator_value (iterator_t *) |
Get the value of the group column from a statistics iterator. More... | |
const char * | aggregate_iterator_subgroup_value (iterator_t *) |
Get the value of the subgroup column from an aggregate iterator. More... | |
int | openvas_sync_feed (const gchar *, const gchar *, int) |
int | openvas_migrate_secinfo (const gchar *, int) |
int | openvas_current_sync (const gchar *, gchar **, gchar **) |
gboolean | openvas_sync_script_perform_selftest (const gchar *, gchar **) |
gboolean | openvas_get_sync_script_identification (const gchar *, gchar **, int) |
gboolean | openvas_get_sync_script_description (const gchar *, gchar **) |
gboolean | openvas_get_sync_script_feed_version (const gchar *, gchar **) |
int | manage_run_wizard (const gchar *, int(*)(void *, gchar *, gchar **), void *, array_t *, int, const char *, gchar **, gchar **, gchar **) |
char * | iso_time (time_t *) |
Create an ISO time from seconds since epoch. More... | |
char * | iso_time_tz (time_t *, const char *, const char **) |
Create an ISO time from seconds since epoch, given a timezone. More... | |
gchar * | xsl_transform (gchar *, gchar *, gchar **, gchar **) |
Run xsltproc in an external process. More... | |
int | valid_db_resource_type (const char *) |
Check whether a resource type table name is valid. More... | |
int | column_is_timestamp (const char *) |
char * | type_columns (const char *, int) |
const char ** | type_filter_columns (const char *, int) |
char * | type_trash_columns (const char *, int) |
gchar * | type_opts_table (const char *, int, int, int) |
gchar * | type_table (const char *, int) |
gboolean | manage_migrate_needs_timezone (GSList *, const gchar *) |
Check whether the migration needs the real timezone. More... | |
int | manage_optimize (GSList *, const gchar *, const gchar *) |
int | get_termination_signal () |
int | sql_cancel () |
Variables | |
command_t | omp_commands [] |
The OMP command list. More... | |
credentials_t | current_credentials |
Current credentials during any OMP command. More... | |
short | scanner_active |
task_t | current_scanner_task |
The task currently running on the scanner. More... | |
report_t | current_report |
The report of the current task. More... | |
#define ALERT_MESSAGE_ATTACH |
Default format string for alert email, when attaching report.
#define ALERT_MESSAGE_INCLUDE |
Default format string for alert email, when including report.
#define ALL_LOG_LEVELS |
#define APPLY_OVERRIDES_DEFAULT 0 |
#define g_info | ( | ... | ) |
Defines g_info for glib versions older than 2.40.
Definition at line 55 of file manage.h.
Referenced by migrate_171_to_172().
#define LSC_FAMILY_LIST |
SQL list of LSC families.
Definition at line 1065 of file manage.h.
Referenced by create_tables().
#define MANAGE_ABSOLUTE_MAX_IPS_PER_TARGET 70000 |
#define MANAGE_MAX_HOSTS 4095 |
#define MANAGE_USER_MAX_HOSTS 16777216 |
#define MIN_QOD_DEFAULT 70 |
Default min quality of detection percentage for filters.
Definition at line 1110 of file manage.h.
Referenced by init_aggregate_iterator(), init_task_iterator(), migrate_146_to_147(), sql_report_result_host_count(), sql_report_severity(), sql_task_severity(), sql_task_threat_level(), sql_task_trend(), and task_count().
#define NVT_SELECTOR_TYPE_ALL 0 |
#define NVT_SELECTOR_TYPE_ANY 999 |
#define NVT_SELECTOR_TYPE_FAMILY 1 |
NVT selector type for "family" rule.
Definition at line 1996 of file manage.h.
Referenced by make_config_discovery().
#define NVT_SELECTOR_TYPE_NVT 2 |
NVT selector type for "NVT" rule.
Definition at line 2001 of file manage.h.
Referenced by check_config_host_discovery(), check_config_system_discovery(), make_config_host_discovery(), make_config_system_discovery(), migrate_115_to_116(), and migrate_17_to_18().
#define OVAS_MANAGE_REPORT_ID_LENGTH UUID_LEN_STR |
#define QOD_DEFAULT 75 |
Default quality of detection percentage.
Definition at line 1105 of file manage.h.
Referenced by migrate_142_to_143(), and migrate_143_to_144().
#define SCHEDULE_PERIOD 10 |
#define SCHEDULE_TIMEOUT_DEFAULT 60 |
#define SCHEDULE_TIMEOUT_MIN_SECS 20 |
#define SECINFO_ALERT_MESSAGE_ATTACH |
Default format string for SecInfo alert email, when attaching report.
#define SECINFO_ALERT_MESSAGE_INCLUDE |
Default format string for SecInfo alert email, when including report.
typedef long long int credential_t |
typedef long long int override_t |
typedef long long int permission_t |
typedef long long int port_list_t |
typedef long long int port_range_t |
typedef long long int report_format_param_t |
typedef long long int report_format_t |
typedef long long int report_host_t |
typedef enum scanner_type scanner_type_t |
Scanner types.
These numbers are used in the database, so if the number associated with any symbol changes then a migrator must be added to update existing data.
typedef long long int schedule_t |
enum alert_condition_t |
Types of alert conditions.
Enumerator | |
---|---|
ALERT_CONDITION_ERROR | |
ALERT_CONDITION_ALWAYS | |
ALERT_CONDITION_SEVERITY_AT_LEAST | |
ALERT_CONDITION_SEVERITY_CHANGED | |
ALERT_CONDITION_FILTER_COUNT_AT_LEAST | |
ALERT_CONDITION_FILTER_COUNT_CHANGED |
Definition at line 501 of file manage.h.
enum alert_method_t |
Types of alerts.
Definition at line 482 of file manage.h.
enum alive_test_t |
Alive tests.
These numbers are used in the database, so if the number associated with any symbol changes then a migrator must be added to update existing data.
Enumerator | |
---|---|
ALIVE_TEST_TCP_ACK_SERVICE | |
ALIVE_TEST_ICMP | |
ALIVE_TEST_ARP | |
ALIVE_TEST_CONSIDER_ALIVE | |
ALIVE_TEST_TCP_SYN_SERVICE |
Definition at line 252 of file manage.h.
enum event_t |
Types of task events.
Enumerator | |
---|---|
EVENT_ERROR | |
EVENT_TASK_RUN_STATUS_CHANGED | |
EVENT_NEW_SECINFO | |
EVENT_UPDATED_SECINFO |
enum keyword_relation_t |
Comparison returns.
Enumerator | |
---|---|
KEYWORD_RELATION_APPROX | |
KEYWORD_RELATION_COLUMN_ABOVE | |
KEYWORD_RELATION_COLUMN_APPROX | |
KEYWORD_RELATION_COLUMN_EQUAL | |
KEYWORD_RELATION_COLUMN_BELOW | |
KEYWORD_RELATION_COLUMN_REGEXP |
Definition at line 3415 of file manage.h.
enum keyword_type_t |
Keyword type.
Enumerator | |
---|---|
KEYWORD_TYPE_UNKNOWN | |
KEYWORD_TYPE_INTEGER | |
KEYWORD_TYPE_DOUBLE | |
KEYWORD_TYPE_STRING |
Definition at line 3404 of file manage.h.
Report format param types.
These numbers are used in the database, so if the number associated with any symbol changes then a migrator must be added to update existing data.
Definition at line 3079 of file manage.h.
enum scanner_type |
Scanner types.
These numbers are used in the database, so if the number associated with any symbol changes then a migrator must be added to update existing data.
Enumerator | |
---|---|
SCANNER_TYPE_NONE | |
SCANNER_TYPE_OSP | |
SCANNER_TYPE_OPENVAS | |
SCANNER_TYPE_CVE | |
SCANNER_TYPE_OMP | |
SCANNER_TYPE_MAX |
Definition at line 267 of file manage.h.
enum task_status_t |
Task statuses, also used as scan/report statuses.
These numbers are used in the database, so if the number associated with any symbol changes then a migrator must be added to update existing data.
Definition at line 218 of file manage.h.
int acknowledge_bye | ( | ) |
Acknowledge a scanner BYE.
Definition at line 5705 of file manage.c.
References send_to_server().
int acknowledge_feed_version_info | ( | ) |
Acknowledge scanner PLUGINS_FEED_VERSION message,.
requesting all plugin info.
Definition at line 5719 of file manage.c.
References send_to_server().
Add an alert to a task.
[in] | task | Task. |
[in] | alert | Alert. |
Definition at line 18656 of file manage_sql.c.
References LOCATION_TABLE, and sql().
void add_task_description_line | ( | task_t | , |
const char * | , | ||
size_t | |||
) |
int agent_count | ( | const get_data_t * | ) |
int agent_in_use | ( | agent_t | ) |
const char* agent_iterator_howto_install | ( | iterator_t * | ) |
const char* agent_iterator_howto_use | ( | iterator_t * | ) |
const char* agent_iterator_installer | ( | iterator_t * | ) |
const char* agent_iterator_installer_64 | ( | iterator_t * | ) |
const char* agent_iterator_installer_filename | ( | iterator_t * | ) |
const char* agent_iterator_installer_signature_64 | ( | iterator_t * | ) |
gsize agent_iterator_installer_size | ( | iterator_t * | ) |
const char* agent_iterator_trust | ( | iterator_t * | ) |
time_t agent_iterator_trust_time | ( | iterator_t * | ) |
char* agent_uuid | ( | agent_t | ) |
int agent_writable | ( | agent_t | ) |
int aggregate_iterator_count | ( | iterator_t * | iterator | ) |
Get the count from an aggregate iterator.
[in] | iterator | Iterator. |
Definition at line 5923 of file manage_sql.c.
References sql_column_int(), and iterator::stmt.
Referenced by buffer_aggregate_xml().
double aggregate_iterator_max | ( | iterator_t * | iterator, |
int | data_column_index | ||
) |
Get the maximum from an aggregate iterator.
[in] | iterator | Iterator. |
[in] | data_column_index | Index of the data column to get max of. |
Definition at line 5953 of file manage_sql.c.
References AGGREGATE_ITERATOR_N_STATS, AGGREGATE_ITERATOR_OFFSET, sql_column_double(), and iterator::stmt.
Referenced by buffer_aggregate_xml().
double aggregate_iterator_mean | ( | iterator_t * | iterator, |
int | data_column_index | ||
) |
Get the mean from an aggregate iterator.
[in] | iterator | Iterator. |
[in] | data_column_index | Index of the data column to get mean of. |
Definition at line 5969 of file manage_sql.c.
References AGGREGATE_ITERATOR_N_STATS, AGGREGATE_ITERATOR_OFFSET, sql_column_double(), and iterator::stmt.
Referenced by buffer_aggregate_xml().
double aggregate_iterator_min | ( | iterator_t * | iterator, |
int | data_column_index | ||
) |
Get the minimum from an aggregate iterator.
[in] | iterator | Iterator. |
[in] | data_column_index | Index of the data column to get min of. |
Definition at line 5937 of file manage_sql.c.
References AGGREGATE_ITERATOR_N_STATS, AGGREGATE_ITERATOR_OFFSET, sql_column_double(), and iterator::stmt.
Referenced by buffer_aggregate_xml().
const char* aggregate_iterator_subgroup_value | ( | iterator_t * | iterator | ) |
Get the value of the subgroup column from an aggregate iterator.
[in] | iterator | Iterator. |
Definition at line 6042 of file manage_sql.c.
References iterator::done, sql_column_text(), and iterator::stmt.
Referenced by buffer_aggregate_xml().
double aggregate_iterator_sum | ( | iterator_t * | iterator, |
int | data_column_index | ||
) |
Get the sum from a statistics iterator.
[in] | iterator | Iterator. |
[in] | data_column_index | Index of the data column to get sum of. |
Definition at line 5985 of file manage_sql.c.
References AGGREGATE_ITERATOR_N_STATS, AGGREGATE_ITERATOR_OFFSET, sql_column_double(), and iterator::stmt.
Referenced by buffer_aggregate_xml().
const char* aggregate_iterator_text | ( | iterator_t * | iterator, |
int | text_column_index, | ||
int | data_columns | ||
) |
Get the value of a text column from an aggregate iterator.
[in] | iterator | Iterator. |
[in] | text_column_index | Index of the text column to get. |
[in] | data_columns | Number of data columns. |
Definition at line 6003 of file manage_sql.c.
References AGGREGATE_ITERATOR_N_STATS, AGGREGATE_ITERATOR_OFFSET, iterator::done, sql_column_text(), and iterator::stmt.
Referenced by buffer_aggregate_xml().
const char* aggregate_iterator_value | ( | iterator_t * | iterator | ) |
Get the value of the group column from a statistics iterator.
[in] | iterator | Iterator. |
Definition at line 6025 of file manage_sql.c.
References iterator::done, sql_column_text(), and iterator::stmt.
Referenced by buffer_aggregate_xml().
gchar* alert_condition_description | ( | alert_condition_t | condition, |
alert_t | alert | ||
) |
Get a description of an alert condition.
[in] | condition | Condition. |
[in] | alert | Alert. |
Definition at line 1063 of file manage.c.
References ALERT_CONDITION_ALWAYS, ALERT_CONDITION_FILTER_COUNT_AT_LEAST, ALERT_CONDITION_FILTER_COUNT_CHANGED, ALERT_CONDITION_SEVERITY_AT_LEAST, ALERT_CONDITION_SEVERITY_CHANGED, and alert_data().
alert_condition_t alert_condition_from_name | ( | const char * | name | ) |
Get an alert condition from a name.
[in] | name | Condition name. |
Definition at line 1173 of file manage.c.
References ALERT_CONDITION_ALWAYS, ALERT_CONDITION_ERROR, ALERT_CONDITION_FILTER_COUNT_AT_LEAST, ALERT_CONDITION_FILTER_COUNT_CHANGED, ALERT_CONDITION_SEVERITY_AT_LEAST, and ALERT_CONDITION_SEVERITY_CHANGED.
const char* alert_condition_name | ( | alert_condition_t | condition | ) |
Get the name of an alert condition.
[in] | condition | Condition. |
Definition at line 1016 of file manage.c.
References ALERT_CONDITION_ALWAYS, ALERT_CONDITION_FILTER_COUNT_AT_LEAST, ALERT_CONDITION_FILTER_COUNT_CHANGED, ALERT_CONDITION_SEVERITY_AT_LEAST, and ALERT_CONDITION_SEVERITY_CHANGED.
int alert_count | ( | const get_data_t * | get | ) |
Count the number of alerts.
[in] | get | GET params. |
Definition at line 8489 of file manage_sql.c.
References ALERT_ITERATOR_COLUMNS, ALERT_ITERATOR_FILTER_COLUMNS, and ALERT_ITERATOR_TRASH_COLUMNS.
const char* alert_data_iterator_data | ( | iterator_t * | iterator | ) |
Return the data from an alert data iterator.
[in] | iterator | Iterator. |
Definition at line 8792 of file manage_sql.c.
References iterator::done, and iterator_string().
const char* alert_data_iterator_name | ( | iterator_t * | iterator | ) |
Return the name from an alert data iterator.
[in] | iterator | Iterator. |
Definition at line 8775 of file manage_sql.c.
References iterator::done, and iterator_string().
int alert_in_use | ( | alert_t | alert | ) |
Return whether a alert is in use by a task.
[in] | alert | Alert. |
Definition at line 8506 of file manage_sql.c.
References sql_int().
int alert_iterator_condition | ( | iterator_t * | iterator | ) |
Return the condition from an alert iterator.
[in] | iterator | Iterator. |
Definition at line 8606 of file manage_sql.c.
References iterator::done, GET_ITERATOR_COLUMN_COUNT, and iterator_int().
int alert_iterator_event | ( | iterator_t * | iterator | ) |
Return the event from an alert iterator.
[in] | iterator | Iterator. |
Definition at line 8590 of file manage_sql.c.
References iterator::done, GET_ITERATOR_COLUMN_COUNT, and iterator_int().
char* alert_iterator_filter_name | ( | iterator_t * | iterator | ) |
Return the filter name from an alert iterator.
[in] | iterator | Iterator. |
Definition at line 8677 of file manage_sql.c.
References alert_iterator_filter(), iterator::done, filter_name(), GET_ITERATOR_COLUMN_COUNT, iterator_int(), LOCATION_TABLE, and trash_filter_name().
int alert_iterator_filter_readable | ( | iterator_t * | iterator | ) |
Return the filter readable state from an alert iterator.
[in] | iterator | Iterator. |
Definition at line 8720 of file manage_sql.c.
References acl_user_has_access_uuid(), alert_iterator_filter(), alert_iterator_filter_uuid(), iterator::done, GET_ITERATOR_COLUMN_COUNT, iterator_int(), and LOCATION_TRASH.
int alert_iterator_filter_trash | ( | iterator_t * | iterator | ) |
Return the location of an alert iterator filter.
[in] | iterator | Iterator. |
Definition at line 8702 of file manage_sql.c.
References alert_iterator_filter(), iterator::done, GET_ITERATOR_COLUMN_COUNT, iterator_int(), and LOCATION_TRASH.
char* alert_iterator_filter_uuid | ( | iterator_t * | iterator | ) |
Return the filter UUID from an alert iterator.
[in] | iterator | Iterator. |
Definition at line 8652 of file manage_sql.c.
References alert_iterator_filter(), iterator::done, filter_uuid(), GET_ITERATOR_COLUMN_COUNT, iterator_int(), LOCATION_TABLE, and trash_filter_uuid().
Referenced by alert_iterator_filter_readable().
int alert_iterator_method | ( | iterator_t * | iterator | ) |
Return the method from an alert iterator.
[in] | iterator | Iterator. |
Definition at line 8622 of file manage_sql.c.
References iterator::done, GET_ITERATOR_COLUMN_COUNT, and iterator_int().
alert_method_t alert_method_from_name | ( | const char * | name | ) |
Get an alert method from a name.
[in] | name | Method name. |
Definition at line 1215 of file manage.c.
References ALERT_METHOD_EMAIL, ALERT_METHOD_ERROR, ALERT_METHOD_HTTP_GET, ALERT_METHOD_SCP, ALERT_METHOD_SEND, ALERT_METHOD_SMB, ALERT_METHOD_SNMP, ALERT_METHOD_SOURCEFIRE, ALERT_METHOD_START_TASK, ALERT_METHOD_SYSLOG, ALERT_METHOD_TIPPINGPOINT, and ALERT_METHOD_VERINICE.
const char* alert_method_name | ( | alert_method_t | method | ) |
Get the name of an alert method.
[in] | method | Method. |
Definition at line 1146 of file manage.c.
References ALERT_METHOD_EMAIL, ALERT_METHOD_HTTP_GET, ALERT_METHOD_SCP, ALERT_METHOD_SEND, ALERT_METHOD_SMB, ALERT_METHOD_SNMP, ALERT_METHOD_SOURCEFIRE, ALERT_METHOD_START_TASK, ALERT_METHOD_SYSLOG, ALERT_METHOD_TIPPINGPOINT, and ALERT_METHOD_VERINICE.
const char* alert_task_iterator_name | ( | iterator_t * | iterator | ) |
Return the name from an alert task iterator.
[in] | iterator | Iterator. |
Definition at line 13627 of file manage_sql.c.
References iterator::done, and iterator_string().
int alert_task_iterator_readable | ( | iterator_t * | iterator | ) |
Get the read permission status from a GET iterator.
[in] | iterator | Iterator. |
Definition at line 13659 of file manage_sql.c.
References iterator::done, and iterator_int().
const char* alert_task_iterator_uuid | ( | iterator_t * | iterator | ) |
Return the uuid from an alert task iterator.
[in] | iterator | Iterator. |
Definition at line 13643 of file manage_sql.c.
References iterator::done, and iterator_string().
char* alert_uuid | ( | alert_t | alert | ) |
Return the UUID of an alert.
[in] | alert | Alert. |
Definition at line 8348 of file manage_sql.c.
References sql_string().
int alert_writable | ( | alert_t | alert | ) |
Return whether a alert is writable.
[in] | alert | Alert. |
Definition at line 8536 of file manage_sql.c.
int all_info_count | ( | const get_data_t * | ) |
const char* all_info_iterator_extra | ( | iterator_t * | ) |
const char* all_info_iterator_severity | ( | iterator_t * | ) |
const char* all_info_iterator_type | ( | iterator_t * | ) |
gchar* app_location | ( | report_host_t | , |
const gchar * | |||
) |
void append_task_open_port | ( | task_t | task, |
const char * | , | ||
const char * | |||
) |
void append_to_task_comment | ( | task_t | , |
const char * | , | ||
int | |||
) |
void append_to_task_name | ( | task_t | , |
const char * | , | ||
int | |||
) |
int asset_host_count | ( | const get_data_t * | ) |
const char* asset_host_iterator_severity | ( | iterator_t * | ) |
int asset_iterator_in_use | ( | iterator_t * | ) |
int asset_iterator_writable | ( | iterator_t * | ) |
int asset_os_count | ( | const get_data_t * | ) |
const char* asset_os_iterator_average_severity | ( | iterator_t * | ) |
const char* asset_os_iterator_highest_severity | ( | iterator_t * | ) |
int asset_os_iterator_installs | ( | iterator_t * | ) |
const char* asset_os_iterator_latest_severity | ( | iterator_t * | ) |
const char * asset_os_iterator_title | ( | iterator_t * | ) |
int authenticate | ( | credentials_t * | credentials | ) |
Authenticate credentials.
[in] | credentials | Credentials. |
Definition at line 17631 of file manage_sql.c.
References authenticate_allow_all, and get_scheduled_user_uuid().
int buffer_get_filter_xml | ( | GString * | , |
const char * | , | ||
const get_data_t * | , | ||
const char * | , | ||
const char * | |||
) |
int cert_bund_adv_info_count | ( | const get_data_t * | get | ) |
const char* cert_bund_adv_info_iterator_cve_refs | ( | iterator_t * | ) |
const char* cert_bund_adv_info_iterator_max_cvss | ( | iterator_t * | ) |
const char* cert_bund_adv_info_iterator_summary | ( | iterator_t * | ) |
const char* cert_bund_adv_info_iterator_title | ( | iterator_t * | ) |
gchar* certificate_iso_time | ( | time_t | time | ) |
Converts a certificate time to an ISO time string.
[in] | time | The time as a time_t. |
Definition at line 352 of file manage.c.
References iso_time().
const gchar* certificate_time_status | ( | time_t | activates, |
time_t | expires | ||
) |
Tests the activation and expiration time of a certificate.
[in] | activates | Activation time. |
[in] | expires | Expiration time. |
void cleanup_file_iterator | ( | file_iterator_t * | iterator | ) |
void cleanup_iterator | ( | iterator_t * | iterator | ) |
Cleanup an iterator.
[in] | iterator | Iterator. |
Definition at line 664 of file sql.c.
References iterator::crypt_ctx, lsc_crypt_release(), iterator::prepared, sql_finalize(), and iterator::stmt.
void cleanup_manage_process | ( | gboolean | cleanup | ) |
Cleanup the manage library.
Optionally put any running task in the stopped state and close the database.
[in] | cleanup | If TRUE perform all cleanup operations, else only those required at the start of a forked process. |
Definition at line 17128 of file manage_sql.c.
Referenced by manage_option_cleanup(), and reinit_manage_process().
void cleanup_report_type_iterator | ( | report_type_iterator_t * | iterator | ) |
int cleanup_schedule_times | ( | ) |
void cleanup_severity_data | ( | severity_data_t * | data | ) |
Clean up a severity data structure.
[in] | data | The data structure to initialize. |
Definition at line 848 of file manage.c.
References severity_data_t::counts.
void clear_duration_schedules | ( | task_t | ) |
int collate_message_type | ( | void * | data, |
int | one_len, | ||
const void * | arg_one, | ||
int | two_len, | ||
const void * | arg_two | ||
) |
Collate two message type strings.
A lower threat is considered less than a higher threat, so Medium is less than High.
[in] | data | Dummy for callback. |
[in] | one_len | Length of first string. |
[in] | arg_one | First string. |
[in] | two_len | Length of second string. |
[in] | arg_two | Second string. |
Definition at line 6638 of file manage_sql.c.
int column_is_timestamp | ( | const char * | ) |
int config_count | ( | const get_data_t * | ) |
int config_families_growing | ( | config_t | ) |
const char* config_file_iterator_content | ( | iterator_t * | ) |
int config_file_iterator_length | ( | iterator_t * | ) |
int config_in_use | ( | config_t | ) |
int config_iterator_families_growing | ( | iterator_t * | ) |
int config_iterator_family_count | ( | iterator_t * | ) |
int config_iterator_nvt_count | ( | iterator_t * | ) |
const char* config_iterator_nvt_selector | ( | iterator_t * | ) |
int config_iterator_nvts_growing | ( | iterator_t * | ) |
int config_iterator_type | ( | iterator_t * | ) |
char* config_nvt_selector | ( | config_t | ) |
char* config_nvt_timeout | ( | config_t | , |
const char * | |||
) |
int config_nvts_growing | ( | config_t | ) |
const char* config_task_iterator_name | ( | iterator_t * | ) |
int config_task_iterator_readable | ( | iterator_t * | ) |
const char* config_task_iterator_uuid | ( | iterator_t * | ) |
const char* config_timeout_iterator_nvt_name | ( | iterator_t * | ) |
const char* config_timeout_iterator_oid | ( | iterator_t * | ) |
const char* config_timeout_iterator_value | ( | iterator_t * | ) |
int config_type | ( | config_t | ) |
char* config_uuid | ( | config_t | ) |
int config_writable | ( | config_t | ) |
int copy_agent | ( | const char * | , |
const char * | , | ||
const char * | , | ||
agent_t * | |||
) |
int copy_alert | ( | const char * | name, |
const char * | comment, | ||
const char * | alert_id, | ||
alert_t * | new_alert | ||
) |
Create an alert from an existing alert.
[in] | name | Name of new alert. NULL to copy from existing. |
[in] | comment | Comment on new alert. NULL to copy from existing. |
[in] | alert_id | UUID of existing alert. |
[out] | new_alert | New alert. |
Definition at line 7814 of file manage_sql.c.
References current_credentials, and sql_begin_immediate().
int copy_config | ( | const char * | , |
const char * | , | ||
const char * | , | ||
config_t * | |||
) |
int copy_credential | ( | const char * | , |
const char * | , | ||
const char * | , | ||
credential_t * | |||
) |
int copy_filter | ( | const char * | , |
const char * | , | ||
const char * | , | ||
filter_t * | |||
) |
int copy_group | ( | const char * | , |
const char * | , | ||
const char * | , | ||
group_t * | |||
) |
int copy_note | ( | const char * | , |
note_t * | |||
) |
int copy_override | ( | const char * | , |
override_t * | |||
) |
int copy_permission | ( | const char * | , |
const char * | , | ||
permission_t * | |||
) |
int copy_port_list | ( | const char * | , |
const char * | , | ||
const char * | , | ||
port_list_t * | |||
) |
int copy_report_format | ( | const char * | , |
const char * | , | ||
report_format_t * | |||
) |
int copy_role | ( | const char * | , |
const char * | , | ||
const char * | , | ||
role_t * | |||
) |
int copy_scanner | ( | const char * | , |
const char * | , | ||
const char * | , | ||
scanner_t * | |||
) |
int copy_schedule | ( | const char * | , |
const char * | , | ||
const char * | , | ||
schedule_t * | |||
) |
int copy_tag | ( | const char * | , |
const char * | , | ||
const char * | , | ||
tag_t * | |||
) |
int copy_target | ( | const char * | , |
const char * | , | ||
const char * | , | ||
target_t * | |||
) |
int copy_task | ( | const char * | , |
const char * | , | ||
const char * | , | ||
int | , | ||
task_t * | |||
) |
int copy_user | ( | const char * | , |
const char * | , | ||
const char * | , | ||
user_t * | |||
) |
int cpe_info_count | ( | const get_data_t * | get | ) |
const char* cpe_info_iterator_cve_refs | ( | iterator_t * | ) |
const char* cpe_info_iterator_deprecated_by_id | ( | iterator_t * | ) |
const char* cpe_info_iterator_max_cvss | ( | iterator_t * | ) |
const char* cpe_info_iterator_nvd_id | ( | iterator_t * | ) |
const char* cpe_info_iterator_status | ( | iterator_t * | ) |
const char* cpe_info_iterator_title | ( | iterator_t * | ) |
int create_agent | ( | const char * | , |
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
agent_t * | |||
) |
int create_alert | ( | const char * | name, |
const char * | comment, | ||
const char * | filter_id, | ||
event_t | event, | ||
GPtrArray * | event_data, | ||
alert_condition_t | condition, | ||
GPtrArray * | condition_data, | ||
alert_method_t | method, | ||
GPtrArray * | method_data, | ||
alert_t * | alert | ||
) |
Create an alert.
[in] | name | Name of alert. |
[in] | comment | Comment on alert. |
[in] | filter_id | Filter. |
[in] | event | Type of event. |
[in] | event_data | Type-specific event data. |
[in] | condition | Event condition. |
[in] | condition_data | Condition-specific data. |
[in] | method | Escalation method. |
[in] | method_data | Data for escalation method. |
[out] | alert | Created alert on success. |
Definition at line 7545 of file manage_sql.c.
int create_asset_host | ( | const char * | , |
const char * | , | ||
resource_t * | |||
) |
int create_asset_report | ( | const char * | , |
const char * | |||
) |
int create_config | ( | const char * | , |
const char * | , | ||
const array_t * | , | ||
const array_t * | , | ||
const char * | , | ||
config_t * | , | ||
char ** | |||
) |
int create_config_from_scanner | ( | const char * | , |
const char * | , | ||
const char * | , | ||
char ** | |||
) |
int create_credential | ( | const char * | , |
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
credential_t * | |||
) |
int create_filter | ( | const char * | , |
const char * | , | ||
const char * | , | ||
const char * | , | ||
int | , | ||
filter_t * | |||
) |
int create_group | ( | const char * | , |
const char * | , | ||
const char * | , | ||
int | , | ||
group_t * | |||
) |
int create_note | ( | const char * | , |
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
task_t | , | ||
result_t | , | ||
note_t * | |||
) |
int create_override | ( | const char * | , |
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
task_t | , | ||
result_t | , | ||
override_t * | |||
) |
int create_permission | ( | const char * | , |
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
permission_t * | |||
) |
int create_port_list | ( | const char * | , |
const char * | , | ||
const char * | , | ||
const char * | , | ||
array_t * | , | ||
port_list_t * | |||
) |
int create_port_range | ( | const char * | , |
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
port_range_t * | |||
) |
int create_report | ( | array_t * | , |
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
array_t * | , | ||
array_t * | , | ||
array_t * | , | ||
char ** | |||
) |
int create_report_format | ( | const char * | , |
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
int | , | ||
array_t * | , | ||
array_t * | , | ||
array_t * | , | ||
const char * | , | ||
report_format_t * | |||
) |
int create_role | ( | const char * | , |
const char * | , | ||
const char * | , | ||
role_t * | |||
) |
int create_scanner | ( | const char * | , |
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
scanner_t * | , | ||
const char * | , | ||
const char * | |||
) |
int create_schedule | ( | const char * | , |
const char * | , | ||
time_t | , | ||
time_t | , | ||
time_t | , | ||
time_t | , | ||
const char * | , | ||
schedule_t * | |||
) |
int create_tag | ( | const char * | , |
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
tag_t * | |||
) |
int create_target | ( | const char * | , |
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
credential_t | , | ||
const char * | , | ||
credential_t | , | ||
credential_t | , | ||
credential_t | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
int | , | ||
target_t * | |||
) |
int create_user | ( | const gchar * | , |
const gchar * | , | ||
const gchar * | , | ||
int | , | ||
const gchar * | , | ||
int | , | ||
const array_t * | , | ||
array_t * | , | ||
gchar ** | , | ||
array_t * | , | ||
gchar ** | , | ||
gchar ** | , | ||
user_t * | , | ||
int | |||
) |
int credential_count | ( | const get_data_t * | ) |
gchar* credential_encrypted_value | ( | credential_t | , |
const char * | |||
) |
const char* credential_full_type | ( | const char * | abbreviation | ) |
int credential_in_use | ( | credential_t | ) |
int credential_iterator_allow_insecure | ( | iterator_t * | ) |
const char* credential_iterator_auth_algorithm | ( | iterator_t * | ) |
const char* credential_iterator_certificate | ( | iterator_t * | ) |
const char* credential_iterator_community | ( | iterator_t * | ) |
char* credential_iterator_deb | ( | iterator_t * | ) |
char* credential_iterator_exe | ( | iterator_t * | ) |
const char* credential_iterator_login | ( | iterator_t * | ) |
const char* credential_iterator_password | ( | iterator_t * | ) |
const char* credential_iterator_privacy_algorithm | ( | iterator_t * | ) |
const char* credential_iterator_privacy_password | ( | iterator_t * | ) |
const char* credential_iterator_private_key | ( | iterator_t * | ) |
char* credential_iterator_rpm | ( | iterator_t * | ) |
const char* credential_iterator_type | ( | iterator_t * | ) |
char* credential_name | ( | credential_t | ) |
const char* credential_scanner_iterator_name | ( | iterator_t * | ) |
int credential_scanner_iterator_readable | ( | iterator_t * | ) |
const char* credential_scanner_iterator_uuid | ( | iterator_t * | ) |
const char* credential_target_iterator_name | ( | iterator_t * | ) |
int credential_target_iterator_readable | ( | iterator_t * | ) |
const char* credential_target_iterator_uuid | ( | iterator_t * | ) |
char* credential_type | ( | credential_t | ) |
char* credential_uuid | ( | credential_t | ) |
gchar* credential_value | ( | credential_t | , |
const char * | |||
) |
Referenced by validate_scp_data(), and validate_smb_data().
int credential_writable | ( | credential_t | ) |
gchar* cve_cvss_base | ( | const gchar * | ) |
int cve_info_count | ( | const get_data_t * | get | ) |
const char* cve_info_iterator_authentication | ( | iterator_t * | ) |
const char* cve_info_iterator_availability_impact | ( | iterator_t * | ) |
const char* cve_info_iterator_complexity | ( | iterator_t * | ) |
const char* cve_info_iterator_confidentiality_impact | ( | iterator_t * | ) |
const char* cve_info_iterator_cvss | ( | iterator_t * | ) |
const char* cve_info_iterator_description | ( | iterator_t * | ) |
const char* cve_info_iterator_integrity_impact | ( | iterator_t * | ) |
const char* cve_info_iterator_products | ( | iterator_t * | ) |
const char* cve_info_iterator_vector | ( | iterator_t * | ) |
const char* cve_iterator_cvss | ( | iterator_t * | ) |
const char* cve_iterator_name | ( | iterator_t * | ) |
int delete_agent | ( | const char * | , |
int | |||
) |
int delete_alert | ( | const char * | alert_id, |
int | ultimate | ||
) |
Delete an alert.
[in] | alert_id | UUID of alert. |
[in] | ultimate | Whether to remove entirely, or to trashcan. |
Definition at line 8195 of file manage_sql.c.
References acl_user_may(), find_alert_with_permission(), sql_begin_immediate(), and sql_rollback().
int delete_asset | ( | const char * | , |
const char * | , | ||
int | |||
) |
Referenced by migrate_150_to_151(), and migrate_152_to_153().
int delete_config | ( | const char * | , |
int | |||
) |
int delete_credential | ( | const char * | , |
int | |||
) |
int delete_filter | ( | const char * | , |
int | |||
) |
int delete_group | ( | const char * | , |
int | |||
) |
int delete_note | ( | const char * | , |
int | |||
) |
int delete_override | ( | const char * | , |
int | |||
) |
int delete_permission | ( | const char * | , |
int | |||
) |
int delete_port_list | ( | const char * | , |
int | |||
) |
int delete_port_range | ( | const char * | , |
int | |||
) |
int delete_report | ( | const char * | , |
int | |||
) |
int delete_report_format | ( | const char * | , |
int | |||
) |
int delete_role | ( | const char * | , |
int | |||
) |
int delete_scanner | ( | const char * | , |
int | |||
) |
int delete_schedule | ( | const char * | , |
int | |||
) |
int delete_tag | ( | const char * | , |
int | |||
) |
int delete_target | ( | const char * | , |
int | |||
) |
int delete_task | ( | task_t | , |
int | |||
) |
int delete_task_lock | ( | task_t | , |
int | |||
) |
int delete_user | ( | const char * | , |
const char * | , | ||
int | , | ||
int | , | ||
const char * | , | ||
const char * | |||
) |
int dfn_cert_adv_info_count | ( | const get_data_t * | get | ) |
const char* dfn_cert_adv_info_iterator_cve_refs | ( | iterator_t * | ) |
const char* dfn_cert_adv_info_iterator_max_cvss | ( | iterator_t * | ) |
const char* dfn_cert_adv_info_iterator_summary | ( | iterator_t * | ) |
const char* dfn_cert_adv_info_iterator_title | ( | iterator_t * | ) |
gchar* event_description | ( | event_t | event, |
const void * | event_data, | ||
const char * | task_name | ||
) |
Get a description of an alert event.
[in] | event | Event. |
[in] | event_data | Event data. |
[in] | task_name | Name of task if required in description, else NULL. |
Definition at line 1114 of file manage.c.
event_t event_from_name | ( | const char * | name | ) |
Get an event from a name.
[in] | name | Event name. |
Definition at line 1196 of file manage.c.
References EVENT_ERROR, EVENT_NEW_SECINFO, EVENT_TASK_RUN_STATUS_CHANGED, and EVENT_UPDATED_SECINFO.
const char* event_name | ( | event_t | event | ) |
Get the name of an alert event.
[in] | event | Event. |
const char* family_iterator_name | ( | iterator_t * | ) |
int family_nvt_count | ( | const char * | ) |
gchar* file_iterator_content_64 | ( | file_iterator_t * | iterator | ) |
const char* file_iterator_name | ( | file_iterator_t * | iterator | ) |
const char* filter_alert_iterator_name | ( | iterator_t * | ) |
int filter_alert_iterator_readable | ( | iterator_t * | ) |
const char* filter_alert_iterator_uuid | ( | iterator_t * | ) |
int filter_count | ( | const get_data_t * | ) |
void filter_free | ( | array_t * | split | ) |
Free a split filter.
[in] | split | Split filter. |
Definition at line 2018 of file manage_sql.c.
Referenced by manage_filter_controls(), and manage_report_filter_controls().
int filter_in_use | ( | filter_t | ) |
const char* filter_iterator_term | ( | iterator_t * | ) |
const char* filter_iterator_type | ( | iterator_t * | ) |
char* filter_name | ( | filter_t | ) |
gchar* filter_term | ( | const char * | ) |
Referenced by init_aggregate_iterator(), init_get(), init_task_iterator(), and task_count().
gchar* filter_term_value | ( | const char * | , |
const char * | |||
) |
Referenced by init_aggregate_iterator(), init_get(), init_task_iterator(), and task_count().
char* filter_uuid | ( | filter_t | ) |
int filter_writable | ( | filter_t | ) |
gboolean find_alert_with_permission | ( | const char * | uuid, |
alert_t * | alert, | ||
const char * | permission | ||
) |
Find a alert for a specific permission, given a UUID.
[in] | uuid | UUID of alert. |
[out] | alert | Alert return, 0 if succesfully failed to find alert. |
[in] | permission | Permission. |
Definition at line 6983 of file manage_sql.c.
References find_resource_with_permission().
Referenced by delete_alert(), manage_test_alert(), and set_task_alerts().
gboolean find_config | ( | const char * | , |
config_t * | |||
) |
gboolean find_config_with_permission | ( | const char * | , |
config_t * | , | ||
const char * | |||
) |
gboolean find_credential_with_permission | ( | const char * | , |
credential_t * | , | ||
const char * | |||
) |
Referenced by validate_scp_data(), validate_smb_data(), and validate_tippingpoint_data().
gboolean find_filter | ( | const char * | , |
filter_t * | |||
) |
gboolean find_filter_with_permission | ( | const char * | , |
filter_t * | , | ||
const char * | |||
) |
gboolean find_note_with_permission | ( | const char * | , |
note_t * | , | ||
const char * | |||
) |
gboolean find_nvt | ( | const char * | , |
nvt_t * | |||
) |
gboolean find_override_with_permission | ( | const char * | , |
override_t * | , | ||
const char * | |||
) |
gboolean find_port_list | ( | const char * | , |
port_list_t * | |||
) |
gboolean find_port_list_with_permission | ( | const char * | , |
port_list_t * | , | ||
const char * | |||
) |
gboolean find_port_range | ( | const char * | , |
port_list_t * | |||
) |
gboolean find_report_format_with_permission | ( | const char * | , |
report_format_t * | , | ||
const char * | |||
) |
Referenced by validate_scp_data(), and validate_send_data().
gboolean find_report_with_permission | ( | const char * | , |
report_t * | , | ||
const char * | |||
) |
gboolean find_resource | ( | const char * | type, |
const char * | uuid, | ||
resource_t * | resource | ||
) |
Find a resource given a UUID.
[in] | type | Type of resource. |
[in] | uuid | UUID of resource. |
[out] | resource | Resource return, 0 if succesfully failed to find resource. |
Definition at line 4411 of file manage_sql.c.
References acl_user_owns_uuid(), sql_int64(), and sql_quote().
gboolean find_result_with_permission | ( | const char * | , |
result_t * | , | ||
const char * | |||
) |
gboolean find_scanner | ( | const char * | , |
scanner_t * | |||
) |
gboolean find_scanner_with_permission | ( | const char * | , |
scanner_t * | , | ||
const char * | |||
) |
gboolean find_schedule_with_permission | ( | const char * | , |
schedule_t * | , | ||
const char * | |||
) |
gboolean find_target_with_permission | ( | const char * | , |
target_t * | , | ||
const char * | |||
) |
gboolean find_task | ( | const char * | id, |
task_t * | |||
) |
gboolean find_task_with_permission | ( | const char * | , |
task_t * | , | ||
const char * | |||
) |
Referenced by move_task(), resume_task(), and stop_task().
gboolean find_trash_task_with_permission | ( | const char * | , |
task_t * | , | ||
const char * | |||
) |
gboolean find_user_by_name_with_permission | ( | const char * | , |
user_t * | , | ||
const char * | |||
) |
void free_tasks | ( | ) |
int get_certificate_info | ( | const gchar * | certificate, |
time_t * | activation_time, | ||
time_t * | expiration_time, | ||
gchar ** | fingerprint, | ||
gchar ** | issuer | ||
) |
Gathers info from a certificate.
[in] | certificate | The certificate to get data from. |
[out] | activation_time | Pointer to write activation time to. |
[out] | expiration_time | Pointer to write expiration time to. |
[out] | fingerprint | Pointer for newly allocated fingerprint. |
[out] | issuer | Pointer for newly allocated issuer DN. |
Definition at line 252 of file manage.c.
References truncate_certificate().
void get_data_reset | ( | get_data_t * | data | ) |
Reset command data.
[in] | data | Command data. |
Definition at line 2322 of file omp.c.
References get_data_t::filt_id, get_data_t::filter, get_data_t::filter_replace, get_data_t::filter_replacement, get_data_t::id, get_data_t::subtype, and get_data_t::type.
const char* get_iterator_comment | ( | iterator_t * | ) |
const char* get_iterator_creation_time | ( | iterator_t * | ) |
const char* get_iterator_modification_time | ( | iterator_t * | ) |
const char* get_iterator_name | ( | iterator_t * | ) |
user_t get_iterator_owner | ( | iterator_t * | ) |
const char* get_iterator_owner_name | ( | iterator_t * | ) |
resource_t get_iterator_resource | ( | iterator_t * | ) |
Referenced by get_nvti_xml(), stop_active_tasks(), and task_iterator_current_report().
const char* get_iterator_uuid | ( | iterator_t * | ) |
gchar* get_nvti_xml | ( | iterator_t * | nvts, |
int | details, | ||
int | pref_count, | ||
int | preferences, | ||
const char * | timeout, | ||
config_t | config, | ||
int | close_tag | ||
) |
Create and return XML description for an NVT.
[in] | nvts | The NVT. |
[in] | details | If true, detailed XML, else simple XML. |
[in] | pref_count | Preference count. Used if details is true. |
[in] | preferences | If true, included preferences. |
[in] | timeout | Timeout. Used if details is true. |
[in] | config | Config, used if preferences is true. |
[in] | close_tag | Whether to close the NVT tag or not. |
Definition at line 7658 of file manage.c.
References cleanup_iterator(), DEF, get_iterator_creation_time(), get_iterator_modification_time(), get_iterator_name(), get_iterator_resource(), init_nvt_cert_bund_adv_iterator(), init_nvt_dfn_cert_adv_iterator(), init_resource_tag_iterator(), manage_cert_loaded(), next(), nvt_iterator_name(), nvt_iterator_oid(), resource_tag_count(), resource_tag_iterator_comment(), resource_tag_iterator_name(), resource_tag_iterator_uuid(), and resource_tag_iterator_value().
int get_schedule_timeout | ( | ) |
gchar* get_scheduled_user_uuid | ( | ) |
Access UUID of user that scheduled the current task.
Definition at line 6451 of file manage.c.
References schedule_user_uuid.
Referenced by authenticate().
int get_termination_signal | ( | ) |
int group_count | ( | const get_data_t * | ) |
int group_in_use | ( | group_t | ) |
gchar* group_users | ( | group_t | ) |
char* group_uuid | ( | group_t | ) |
int group_writable | ( | group_t | ) |
void host_detail_free | ( | host_detail_t * | ) |
const char* host_detail_iterator_name | ( | iterator_t * | ) |
const char* host_detail_iterator_source_id | ( | iterator_t * | ) |
const char* host_detail_iterator_source_type | ( | iterator_t * | ) |
const char* host_detail_iterator_value | ( | iterator_t * | ) |
const char* host_identifier_iterator_os_id | ( | iterator_t * | ) |
const char* host_identifier_iterator_os_title | ( | iterator_t * | ) |
const char* host_identifier_iterator_source_data | ( | iterator_t * | ) |
const char* host_identifier_iterator_source_id | ( | iterator_t * | ) |
int host_identifier_iterator_source_orphan | ( | iterator_t * | ) |
const char* host_identifier_iterator_source_type | ( | iterator_t * | ) |
const char* host_identifier_iterator_value | ( | iterator_t * | ) |
int host_iterator_current_port | ( | iterator_t * | ) |
const char* host_iterator_end_time | ( | iterator_t * | ) |
const char* host_iterator_host | ( | iterator_t * | ) |
int host_iterator_max_port | ( | iterator_t * | ) |
const char* host_iterator_start_time | ( | iterator_t * | ) |
host_t host_notice | ( | const char * | , |
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
int | , | ||
int | |||
) |
gchar* host_routes_xml | ( | host_t | ) |
char* host_uuid | ( | resource_t | ) |
void hosts_set_details | ( | report_t | report | ) |
void hosts_set_identifiers | ( | ) |
void hosts_set_max_severity | ( | report_t | , |
int * | , | ||
int * | |||
) |
int info_name_count | ( | const gchar * | , |
const gchar * | |||
) |
int init_agent_iterator | ( | iterator_t * | , |
const get_data_t * | |||
) |
int init_aggregate_iterator | ( | iterator_t * | iterator, |
const char * | type, | ||
const get_data_t * | get, | ||
int | distinct, | ||
GArray * | data_columns, | ||
const char * | group_column, | ||
const char * | subgroup_column, | ||
GArray * | text_columns, | ||
GArray * | sort_data, | ||
int | first_group, | ||
int | max_groups, | ||
const char * | extra_tables, | ||
const char * | extra_where | ||
) |
Initialise a GET_AGGREGATES iterator, including observed resources.
[in] | iterator | Iterator. |
[in] | type | Type of resource. |
[in] | get | GET data. |
[in] | distinct | Whether the query should be distinct. Skipped for trash and single resource. |
[in] | data_columns | Columns to calculate statistics for. |
[in] | group_column | Column to group data by. |
[in] | subgroup_column | Column to further group data by. |
[in] | text_columns | Columns to get text from. |
[in] | sort_data | GArray of sorting data. |
[in] | first_group | Row number to start iterating from. |
[in] | max_groups | Maximum number of rows. |
[in] | extra_tables | Join tables. Skipped for trash and single resource. |
[in] | extra_where | Extra WHERE clauses. Skipped for single resource. |
Definition at line 5402 of file manage_sql.c.
References filter_term(), filter_term_value(), init_iterator(), manage_cert_loaded(), manage_scap_loaded(), MIN_QOD_DEFAULT, sql_select_limit(), type_columns(), type_filter_columns(), type_opts_table(), type_owned(), type_select_columns(), type_trash_columns(), and type_where_columns().
void init_alert_data_iterator | ( | iterator_t * | iterator, |
alert_t | alert, | ||
int | trash, | ||
const char * | table | ||
) |
Initialise an alert data iterator.
[in] | iterator | Iterator. |
[in] | alert | Alert. |
[in] | trash | Whether to iterate over trashcan alert data. |
[in] | table | Type of data: "condition", "event" or "method", corresponds to substring of the table to select from. |
Definition at line 8756 of file manage_sql.c.
References init_iterator().
int init_alert_iterator | ( | iterator_t * | iterator, |
const get_data_t * | get | ||
) |
Initialise an alert iterator, including observed alerts.
[in] | iterator | Iterator. |
[in] | get | GET data. |
Definition at line 8564 of file manage_sql.c.
References ALERT_ITERATOR_COLUMNS, ALERT_ITERATOR_FILTER_COLUMNS, and ALERT_ITERATOR_TRASH_COLUMNS.
void init_alert_task_iterator | ( | iterator_t * | iterator, |
alert_t | alert, | ||
int | ascending | ||
) |
Initialise an alert task iterator.
Iterate over all tasks that use the alert.
[in] | iterator | Iterator. |
[in] | alert | Alert. |
[in] | ascending | Whether to sort ascending or descending. |
Definition at line 13591 of file manage_sql.c.
References acl_where_owned(), and init_iterator().
int init_all_info_iterator | ( | iterator_t * | , |
get_data_t * | , | ||
const char * | |||
) |
int init_asset_host_iterator | ( | iterator_t * | , |
const get_data_t * | |||
) |
int init_asset_os_iterator | ( | iterator_t * | , |
const get_data_t * | |||
) |
int init_cert_bund_adv_info_iterator | ( | iterator_t * | , |
get_data_t * | , | ||
const char * | |||
) |
void init_config_file_iterator | ( | iterator_t * | , |
const char * | , | ||
const char * | |||
) |
int init_config_iterator | ( | iterator_t * | , |
const get_data_t * | |||
) |
void init_config_task_iterator | ( | iterator_t * | , |
config_t | , | ||
int | |||
) |
void init_config_timeout_iterator | ( | iterator_t * | , |
config_t | |||
) |
void init_cpe_cve_iterator | ( | iterator_t * | , |
const char * | , | ||
int | , | ||
const char * | |||
) |
int init_cpe_info_iterator | ( | iterator_t * | , |
get_data_t * | , | ||
const char * | |||
) |
int init_credential_iterator | ( | iterator_t * | , |
const get_data_t * | |||
) |
void init_credential_iterator_one | ( | iterator_t * | , |
credential_t | |||
) |
void init_credential_scanner_iterator | ( | iterator_t * | , |
credential_t | , | ||
int | |||
) |
void init_credential_target_iterator | ( | iterator_t * | , |
credential_t | , | ||
int | |||
) |
void init_cve_cert_bund_adv_iterator | ( | iterator_t * | , |
const char * | , | ||
int | , | ||
const char * | |||
) |
void init_cve_dfn_cert_adv_iterator | ( | iterator_t * | , |
const char * | , | ||
int | , | ||
const char * | |||
) |
int init_cve_info_iterator | ( | iterator_t * | , |
get_data_t * | , | ||
const char * | |||
) |
void init_cve_nvt_iterator | ( | iterator_t * | , |
const char * | , | ||
int | , | ||
const char * | |||
) |
int init_dfn_cert_adv_info_iterator | ( | iterator_t * | , |
get_data_t * | , | ||
const char * | |||
) |
void init_family_iterator | ( | iterator_t * | , |
int | , | ||
const char * | , | ||
int | |||
) |
void init_filter_alert_iterator | ( | iterator_t * | , |
filter_t | |||
) |
int init_filter_iterator | ( | iterator_t * | , |
const get_data_t * | |||
) |
int init_group_iterator | ( | iterator_t * | , |
const get_data_t * | |||
) |
void init_host_detail_iterator | ( | iterator_t * | , |
resource_t | |||
) |
void init_host_identifier_iterator | ( | iterator_t * | , |
host_t | , | ||
int | , | ||
const char * | |||
) |
void init_host_prognosis_iterator | ( | iterator_t * | , |
report_host_t | , | ||
int | , | ||
int | , | ||
const char * | , | ||
const char * | , | ||
int | , | ||
const char * | |||
) |
int init_manage | ( | GSList * | log_config, |
int | nvt_cache_mode, | ||
const gchar * | database, | ||
int | max_ips_per_target, | ||
int | max_email_attachment_size, | ||
int | max_email_include_size, | ||
int | max_email_message_size, | ||
void(*)() | update_progress, | ||
int(*)(openvas_connection_t *, gchar *) | fork_connection, | ||
int | skip_db_check | ||
) |
Initialize the manage library.
Check DB version, do startup database checks, load the NVT cache.
Ensure all tasks are in a clean initial state.
Beware that calling this function while tasks are running may lead to problems.
[in] | log_config | Log configuration. |
[in] | nvt_cache_mode | True when running in NVT caching mode. |
[in] | database | Location of database. |
[in] | max_ips_per_target | Max number of IPs per target. |
[in] | max_email_attachment_size | Max size of email attachments. |
[in] | max_email_include_size | Max size of email inclusions. |
[in] | max_email_message_size | Max size of email user message text. |
[in] | update_progress | Function to update progress, or NULL. * |
[in] | fork_connection | Function to fork a connection that will accept OMP requests. Used to start tasks with OMP when an alert occurs. |
[in] | skip_db_check | Skip DB check. |
Definition at line 17065 of file manage_sql.c.
int init_manage_helper | ( | GSList * | log_config, |
const gchar * | database, | ||
int | max_ips_per_target, | ||
void(*)() | update_progress | ||
) |
Initialize the manage library for a helper program.
This should be called at the beginning of any program that accesses the database. Forked processes should call init_manage_process. The daemon itself calls init_manage, including in NVT cache mode (–rebuild/update).
[in] | log_config | Log configuration. |
[in] | database | Location of database. |
[in] | max_ips_per_target | Max number of IPs per target. |
[in] | update_progress | Function to update progress, or NULL. * |
Definition at line 17102 of file manage_sql.c.
void init_manage_process | ( | int | update_nvt_cache, |
const gchar * | database | ||
) |
Initialize the manage library for a process.
Open the SQL database, attach secondary databases, and define functions.
[in] | update_nvt_cache | 0 operate normally, -1 just update NVT cache, -2 just rebuild NVT cache. |
[in] | database | Location of manage database. |
Definition at line 14303 of file manage_sql.c.
Referenced by reinit_manage_process().
int init_note_iterator | ( | iterator_t * | , |
const get_data_t * | , | ||
nvt_t | , | ||
result_t | , | ||
task_t | |||
) |
void init_nvt_cert_bund_adv_iterator | ( | iterator_t * | , |
const char * | , | ||
int | , | ||
const char * | |||
) |
void init_nvt_dfn_cert_adv_iterator | ( | iterator_t * | , |
const char * | , | ||
int | , | ||
const char * | |||
) |
int init_nvt_info_iterator | ( | iterator_t * | , |
get_data_t * | , | ||
const char * | |||
) |
void init_nvt_iterator | ( | iterator_t * | , |
nvt_t | , | ||
config_t | , | ||
const char * | , | ||
const char * | , | ||
int | , | ||
const char * | |||
) |
void init_nvt_preference_iterator | ( | iterator_t * | , |
const char * | |||
) |
void init_nvt_selector_iterator | ( | iterator_t * | , |
const char * | , | ||
config_t | , | ||
int | |||
) |
void init_os_host_iterator | ( | iterator_t * | , |
resource_t | |||
) |
int init_ovaldef_info_iterator | ( | iterator_t * | , |
get_data_t * | , | ||
const char * | |||
) |
void init_ovaldi_file_iterator | ( | iterator_t * | ) |
int init_override_iterator | ( | iterator_t * | , |
const get_data_t * | , | ||
nvt_t | , | ||
result_t | , | ||
task_t | |||
) |
void init_param_option_iterator | ( | iterator_t * | , |
report_format_param_t | , | ||
int | , | ||
const char * | |||
) |
int init_permission_iterator | ( | iterator_t * | , |
const get_data_t * | |||
) |
int init_port_list_iterator | ( | iterator_t * | , |
const get_data_t * | |||
) |
void init_port_list_target_iterator | ( | iterator_t * | , |
port_list_t | , | ||
int | |||
) |
void init_port_range_iterator | ( | iterator_t * | , |
port_range_t | , | ||
int | , | ||
int | , | ||
const char * | |||
) |
void init_preference_iterator | ( | iterator_t * | , |
config_t | |||
) |
void init_report_counts_build_iterator | ( | iterator_t * | , |
report_t | , | ||
int | , | ||
int | , | ||
const char * | |||
) |
void init_report_errors_iterator | ( | iterator_t * | , |
report_t | |||
) |
void init_report_format_alert_iterator | ( | iterator_t * | , |
report_format_t | |||
) |
int init_report_format_file_iterator | ( | file_iterator_t * | iterator, |
report_format_t | report_format | ||
) |
Initialise a report format file iterator.
[in] | iterator | Iterator. |
[in] | report_format | Single report format to iterate over, NULL for all. |
Definition at line 7096 of file manage.c.
References predefined_report_format_dir(), report_format_owner_uuid(), report_format_predefined(), and report_format_uuid().
int init_report_format_iterator | ( | iterator_t * | , |
const get_data_t * | |||
) |
void init_report_format_param_iterator | ( | iterator_t * | , |
report_format_t | , | ||
int | , | ||
int | , | ||
const char * | |||
) |
void init_report_host_iterator | ( | iterator_t * | , |
report_t | , | ||
const char * | , | ||
report_host_t | |||
) |
int init_report_iterator | ( | iterator_t * | , |
const get_data_t * | |||
) |
void init_report_iterator_task | ( | iterator_t * | , |
task_t | |||
) |
int init_resource_tag_iterator | ( | iterator_t * | , |
const char * | , | ||
resource_t | , | ||
int | , | ||
const char * | , | ||
int | |||
) |
int init_result_get_iterator | ( | iterator_t * | , |
const get_data_t * | , | ||
report_t | , | ||
const char * | , | ||
const gchar * | |||
) |
int init_role_iterator | ( | iterator_t * | , |
const get_data_t * | |||
) |
int init_scanner_iterator | ( | iterator_t * | , |
const get_data_t * | |||
) |
void init_scanner_task_iterator | ( | iterator_t * | , |
scanner_t | |||
) |
int init_schedule_iterator | ( | iterator_t * | , |
const get_data_t * | |||
) |
void init_schedule_task_iterator | ( | iterator_t * | , |
schedule_t | |||
) |
void init_setting_iterator | ( | iterator_t * | , |
const char * | , | ||
const char * | , | ||
int | , | ||
int | , | ||
int | , | ||
const char * | |||
) |
void init_severity_data | ( | severity_data_t * | data | ) |
Initialize a severity data structure.
[in] | data | The data structure to initialize. |
Definition at line 831 of file manage.c.
References severity_data_t::counts, severity_data_t::max, SEVERITY_MAX, SEVERITY_MISSING, SEVERITY_SUBDIVISIONS, severity_data_t::total, and ZERO_SEVERITY_INDEX.
int init_system_report_type_iterator | ( | report_type_iterator_t * | iterator, |
const char * | type, | ||
const char * | slave_id | ||
) |
Initialise a system report type iterator.
[in] | iterator | Iterator. |
[in] | type | Single report type to iterate over, NULL for all. |
[in] | slave_id | ID of slave to get reports from. 0 for local. |
Definition at line 6041 of file manage.c.
References acl_user_may().
int init_tag_iterator | ( | iterator_t * | , |
const get_data_t * | |||
) |
int init_tag_name_iterator | ( | iterator_t * | , |
const get_data_t * | |||
) |
int init_target_iterator | ( | iterator_t * | , |
const get_data_t * | |||
) |
void init_target_iterator_one | ( | iterator_t * | , |
target_t | |||
) |
void init_target_task_iterator | ( | iterator_t * | , |
target_t | |||
) |
void init_task_alert_iterator | ( | iterator_t * | iterator, |
task_t | task, | ||
event_t | event | ||
) |
Initialise a task alert iterator.
[in] | iterator | Iterator. |
[in] | task | Task. |
[in] | event | Event. |
Definition at line 8837 of file manage_sql.c.
void init_task_group_iterator | ( | iterator_t * | iterator, |
task_t | task | ||
) |
Initialise a task group iterator.
[in] | iterator | Iterator. |
[in] | task | Task. |
Definition at line 6822 of file manage_sql.c.
References init_iterator(), and LOCATION_TABLE.
int init_task_iterator | ( | iterator_t * | iterator, |
const get_data_t * | get | ||
) |
Initialise a task iterator.
[in] | iterator | Task iterator. |
[in] | get | GET data. |
Definition at line 14024 of file manage_sql.c.
References filter_term(), filter_term_value(), MIN_QOD_DEFAULT, TASK_ITERATOR_COLUMNS, TASK_ITERATOR_COLUMNS_MIN, TASK_ITERATOR_FILTER_COLUMNS, TASK_ITERATOR_WHERE_COLUMNS, and TASK_ITERATOR_WHERE_COLUMNS_MIN.
Referenced by stop_active_tasks().
void init_task_role_iterator | ( | iterator_t * | iterator, |
task_t | task | ||
) |
Initialise a task role iterator.
[in] | iterator | Iterator. |
[in] | task | Task. |
Definition at line 6851 of file manage_sql.c.
References init_iterator(), and LOCATION_TABLE.
void init_user_config_iterator | ( | iterator_t * | , |
config_t | , | ||
int | , | ||
int | , | ||
const char * | |||
) |
void init_user_group_iterator | ( | iterator_t * | , |
user_t | |||
) |
int init_user_iterator | ( | iterator_t * | , |
const get_data_t * | |||
) |
void init_user_role_iterator | ( | iterator_t * | , |
user_t | |||
) |
void init_user_target_iterator | ( | iterator_t * | , |
target_t | |||
) |
void insert_report_host_detail | ( | report_t | , |
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | |||
) |
char* iso_time | ( | time_t * | epoch_time | ) |
Create an ISO time from seconds since epoch.
[in] | epoch_time | Time in seconds from epoch. |
Definition at line 1138 of file manage_sql.c.
Referenced by buffer_aggregate_xml(), and certificate_iso_time().
char* iso_time_tz | ( | time_t * | epoch_time, |
const char * | timezone, | ||
const char ** | abbrev | ||
) |
Create an ISO time from seconds since epoch, given a timezone.
[in] | epoch_time | Time in seconds from epoch. |
[in] | timezone | Timezone. |
[out] | abbrev | Timezone abbreviation. |
Definition at line 1153 of file manage_sql.c.
References iso_time().
gchar* keyfile_to_auth_conf_settings_xml | ( | const gchar * | ) |
const char* keyword_relation_symbol | ( | keyword_relation_t | relation | ) |
Get the symbol of a keyword relation.
[in] | relation | Relation. |
Definition at line 1627 of file manage_sql.c.
References KEYWORD_RELATION_APPROX, KEYWORD_RELATION_COLUMN_ABOVE, KEYWORD_RELATION_COLUMN_APPROX, KEYWORD_RELATION_COLUMN_BELOW, KEYWORD_RELATION_COLUMN_EQUAL, and KEYWORD_RELATION_COLUMN_REGEXP.
int load_tasks | ( | ) |
gboolean lookup_report_format | ( | const char * | , |
report_format_t * | |||
) |
nvt_t make_nvt_from_nvti | ( | const nvti_t * | , |
int | |||
) |
result_t make_osp_result | ( | task_t | , |
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
int | |||
) |
report_t make_report | ( | task_t | , |
const char * | , | ||
task_status_t | |||
) |
result_t make_result | ( | task_t | , |
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | |||
) |
task_t make_task | ( | char * | , |
char * | , | ||
int | , | ||
int | |||
) |
void make_task_complete | ( | const char * | ) |
int manage_alert | ( | const char * | alert_id, |
const char * | task_id, | ||
event_t | event, | ||
const void * | event_data, | ||
gchar ** | script_message | ||
) |
Escalate an alert with task and event data.
[in] | alert_id | Alert UUID. |
[in] | task_id | Task UUID. |
[in] | event | Event. |
[in] | event_data | Event data. |
[out] | script_message | Custom error message from alert script. |
Definition at line 12984 of file manage_sql.c.
void manage_auth_allow_all | ( | int | scheduled | ) |
Ensure that any subsequent authentications succeed.
[in] | scheduled | Whether this is happening from the scheduler. |
Definition at line 6440 of file manage.c.
References authenticate_allow_all.
int manage_backup_db | ( | const gchar * | database | ) |
Backup the database to a file.
[in] | database | Name of manage database. |
[in] | database | Location of manage database. |
Definition at line 2680 of file manage_pg.c.
int manage_cert_db_supported_version | ( | ) |
Return the database version supported by this manager.
Definition at line 6322 of file manage_sql.c.
int manage_cert_db_version | ( | ) |
Return the database version of the actual database.
Definition at line 6333 of file manage_sql.c.
References manage_cert_loaded(), and sql_string().
int manage_cert_loaded | ( | ) |
Check whether CERT is available.
Definition at line 2643 of file manage_pg.c.
Referenced by get_nvti_xml(), and migrate_116_to_117().
int manage_check_alerts | ( | GSList * | log_config, |
const gchar * | database | ||
) |
Check if any SecInfo alerts are due.
[in] | log_config | Log configuration. |
[in] | database | Location of manage database. |
Definition at line 6886 of file manage_sql.c.
int manage_check_current_task | ( | ) |
Handle state changes to current task made by other processes.
Definition at line 5733 of file manage.c.
References current_scanner_task, manage_transaction_stop(), send_to_server(), set_task_run_status(), task_run_status(), TASK_STATUS_DELETE_REQUESTED, TASK_STATUS_DELETE_ULTIMATE_REQUESTED, TASK_STATUS_DELETE_ULTIMATE_WAITING, TASK_STATUS_DELETE_WAITING, TASK_STATUS_DONE, TASK_STATUS_INTERNAL_ERROR, TASK_STATUS_NEW, TASK_STATUS_REQUESTED, TASK_STATUS_RUNNING, TASK_STATUS_STOP_REQUESTED, TASK_STATUS_STOP_REQUESTED_GIVEUP, TASK_STATUS_STOP_WAITING, and TASK_STATUS_STOPPED.
Referenced by process_omp_change(), and process_otp_scanner_input().
gchar* manage_clean_filter | ( | const gchar * | filter | ) |
Clean a filter.
[in] | filter | Filter. |
Definition at line 2818 of file manage_sql.c.
References manage_clean_filter_remove().
gchar* manage_clean_filter_remove | ( | const gchar * | filter, |
const gchar * | column | ||
) |
Clean a filter, removing a keyword in the process.
[in] | filter | Filter. |
[in] | column | Keyword to remove, or NULL. |
Definition at line 2743 of file manage_sql.c.
References keyword::column, KEYWORD_RELATION_COLUMN_EQUAL, keyword::relation, and split_filter().
Referenced by init_get(), and manage_clean_filter().
void manage_cleanup_process_error | ( | int | signal | ) |
Cleanup as immediately as possible.
Put any running task in the error state and close the database.
Intended for handlers for signals like SIGSEGV and SIGABRT.
[in] | signal | Dummy argument for use as signal handler. |
Definition at line 17154 of file manage_sql.c.
References current_scanner_task, set_task_run_status(), sql_close(), sql_is_open(), and TASK_STATUS_INTERNAL_ERROR.
Referenced by handle_sigabrt(), and handle_sigsegv().
void manage_complete_nvt_cache_update | ( | GList * | , |
GList * | , | ||
int | |||
) |
int manage_count_hosts | ( | const char * | , |
const char * | |||
) |
int manage_create_scanner | ( | GSList * | , |
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | |||
) |
int manage_create_user | ( | GSList * | , |
const gchar * | , | ||
const gchar * | , | ||
const gchar * | , | ||
const gchar * | |||
) |
int manage_db_supported_version | ( | ) |
Return the database version supported by this manager.
Definition at line 6250 of file manage_sql.c.
int manage_db_version | ( | ) |
Return the database version of the actual database.
Definition at line 6262 of file manage_sql.c.
References manage_db_empty(), sql_schema(), and sql_string().
Referenced by manage_create_sql_functions(), migrate_0_to_1(), migrate_100_to_101(), migrate_101_to_102(), migrate_102_to_103(), migrate_103_to_104(), migrate_104_to_105(), migrate_105_to_106(), migrate_106_to_107(), migrate_107_to_108(), migrate_108_to_109(), migrate_109_to_110(), migrate_10_to_11(), migrate_110_to_111(), migrate_111_to_112(), migrate_112_to_113(), migrate_113_to_114(), migrate_114_to_115(), migrate_115_to_116(), migrate_116_to_117(), migrate_117_to_118(), migrate_118_to_119(), migrate_119_to_120(), migrate_11_to_12(), migrate_120_to_121(), migrate_121_to_122(), migrate_122_to_123(), migrate_123_to_124(), migrate_124_to_125(), migrate_125_to_126(), migrate_126_to_127(), migrate_127_to_128(), migrate_128_to_129(), migrate_129_to_130(), migrate_12_to_13(), migrate_130_to_131(), migrate_131_to_132(), migrate_132_to_133(), migrate_133_to_134(), migrate_134_to_135(), migrate_135_to_136(), migrate_136_to_137(), migrate_137_to_138(), migrate_138_to_139(), migrate_139_to_140(), migrate_13_to_14(), migrate_140_to_141(), migrate_141_to_142(), migrate_142_to_143(), migrate_143_to_144(), migrate_144_to_145(), migrate_145_to_146(), migrate_146_to_147(), migrate_147_to_148(), migrate_148_to_149(), migrate_149_to_150(), migrate_14_to_15(), migrate_150_to_151(), migrate_151_to_152(), migrate_152_to_153(), migrate_153_to_154(), migrate_154_to_155(), migrate_155_to_156(), migrate_156_to_157(), migrate_157_to_158(), migrate_158_to_159(), migrate_159_to_160(), migrate_15_to_16(), migrate_160_to_161(), migrate_161_to_162(), migrate_162_to_163(), migrate_163_to_164(), migrate_164_to_165(), migrate_165_to_166(), migrate_166_to_167(), migrate_167_to_168(), migrate_168_to_169(), migrate_169_to_170(), migrate_16_to_17(), migrate_170_to_171(), migrate_171_to_172(), migrate_172_to_173(), migrate_173_to_174(), migrate_174_to_175(), migrate_175_to_176(), migrate_176_to_177(), migrate_177_to_178(), migrate_178_to_179(), migrate_179_to_180(), migrate_17_to_18(), migrate_180_to_181(), migrate_181_to_182(), migrate_182_to_183(), migrate_183_to_184(), migrate_18_to_19(), migrate_19_to_20(), migrate_1_to_2(), migrate_20_to_21(), migrate_21_to_22(), migrate_22_to_23(), migrate_23_to_24(), migrate_24_to_25(), migrate_25_to_26(), migrate_26_to_27(), migrate_27_to_28(), migrate_28_to_29(), migrate_29_to_30(), migrate_2_to_3(), migrate_30_to_31(), migrate_31_to_32(), migrate_32_to_33(), migrate_33_to_34(), migrate_34_to_35(), migrate_35_to_36(), migrate_36_to_37(), migrate_37_to_38(), migrate_38_to_39(), migrate_39_to_40(), migrate_3_to_4(), migrate_40_to_41(), migrate_41_to_42(), migrate_42_to_43(), migrate_43_to_44(), migrate_44_to_45(), migrate_45_to_46(), migrate_46_to_47(), migrate_47_to_48(), migrate_48_to_49(), migrate_49_to_50(), migrate_4_to_5(), migrate_50_to_51(), migrate_51_to_52(), migrate_52_to_53(), migrate_53_to_54(), migrate_54_to_55(), migrate_55_to_56(), migrate_56_to_57(), migrate_57_to_58(), migrate_58_to_59(), migrate_59_to_60(), migrate_5_to_6(), migrate_60_to_61(), migrate_61_to_62(), migrate_62_to_63(), migrate_63_to_64(), migrate_64_to_65(), migrate_65_to_66(), migrate_66_to_67(), migrate_67_to_68(), migrate_68_to_69(), migrate_69_to_70(), migrate_6_to_7(), migrate_70_to_71(), migrate_71_to_72(), migrate_72_to_73(), migrate_73_to_74(), migrate_74_to_75(), migrate_75_to_76(), migrate_76_to_77(), migrate_77_to_78(), migrate_78_to_79(), migrate_7_to_8(), migrate_80_to_81(), migrate_81_to_82(), migrate_82_to_83(), migrate_83_to_84(), migrate_84_to_85(), migrate_85_to_86(), migrate_86_to_87(), migrate_87_to_88(), migrate_88_to_89(), migrate_89_to_90(), migrate_8_to_9(), migrate_90_to_91(), migrate_91_to_92(), migrate_92_to_93(), migrate_93_to_94(), migrate_94_to_95(), migrate_95_to_96(), migrate_96_to_97(), migrate_97_to_98(), migrate_98_to_99(), migrate_99_to_100(), and migrate_9_to_10().
int manage_decrypt_all_credentials | ( | GSList * | log_config, |
const gchar * | database | ||
) |
Decrypt all credentials.
[in] | log_config | Log configuration. |
[in] | database | Location of manage database. |
Definition at line 6599 of file manage_sql.c.
char* manage_default_ca_cert | ( | ) |
int manage_delete_scanner | ( | GSList * | , |
const gchar * | , | ||
const gchar * | |||
) |
int manage_delete_user | ( | GSList * | , |
const gchar * | , | ||
const gchar * | , | ||
const gchar * | |||
) |
int manage_empty_trashcan | ( | ) |
int manage_encrypt_all_credentials | ( | GSList * | log_config, |
const gchar * | database | ||
) |
Encrypt or re-encrypt all credentials.
All plaintext credentials in the credentials table are encrypted, all already encrypted credentials are encrypted again using the latest key.
[in] | log_config | Log configuration. |
[in] | database | Location of manage database. |
Definition at line 6567 of file manage_sql.c.
void manage_filter_controls | ( | const gchar * | filter, |
int * | first, | ||
int * | max, | ||
gchar ** | sort_field, | ||
int * | sort_order | ||
) |
Get info from a filter.
It's up to the caller to ensure that max is adjusted for Max Rows Per Page (by calling manage_max_rows).
[in] | filter | Filter. |
[out] | first | Number of first item. |
[out] | max | Max number of rows. |
[out] | sort_field | Sort field. |
[out] | sort_order | Sort order. |
Definition at line 2289 of file manage_sql.c.
References keyword::column, filter_free(), SETTING_UUID_ROWS_PER_PAGE, setting_value_int(), split_filter(), and keyword::string.
Referenced by init_get().
void manage_get_ldap_info | ( | int * | , |
gchar ** | , | ||
gchar ** | , | ||
int * | , | ||
gchar ** | |||
) |
void manage_get_radius_info | ( | int * | , |
char ** | , | ||
char ** | |||
) |
int manage_get_scanners | ( | GSList * | , |
const gchar * | |||
) |
int manage_get_users | ( | GSList * | , |
const gchar * | , | ||
const gchar * | |||
) |
int manage_max_hosts | ( | ) |
int manage_max_rows | ( | int | ) |
int manage_migrate | ( | GSList * | log_config, |
const gchar * | database | ||
) |
Migrate database to version supported by this manager.
[in] | log_config | Log configuration. |
[in] | database | Location of manage database. |
Definition at line 14255 of file manage_migrators.c.
gboolean manage_migrate_needs_timezone | ( | GSList * | log_config, |
const gchar * | database | ||
) |
Check whether the migration needs the real timezone.
[in] | log_config | Log configuration. |
[in] | database | Location of manage database. |
Definition at line 14206 of file manage_migrators.c.
int manage_modify_scanner | ( | GSList * | , |
const gchar * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | |||
) |
int manage_modify_setting | ( | GSList * | , |
const gchar * | , | ||
const gchar * | , | ||
const gchar * | , | ||
const char * | |||
) |
char* manage_nvt_name | ( | nvt_t | ) |
void manage_nvt_preference_add | ( | const char * | , |
const char * | , | ||
int | |||
) |
void manage_nvt_preferences_enable | ( | ) |
int manage_optimize | ( | GSList * | , |
const gchar * | , | ||
const gchar * | |||
) |
char* manage_port_name | ( | int | number, |
const char * | protocol | ||
) |
Returns associated name for a tcp/ip port.
number | Port number to get name for. |
protocol | Protocol type of port. |
Definition at line 6359 of file manage_sql.c.
References sql_string().
Referenced by port_name_formatted().
int manage_read_info | ( | gchar * | type, |
gchar * | uid, | ||
gchar * | name, | ||
gchar ** | result | ||
) |
Read raw information.
[in] | type | Type of the requested information. |
[in] | uid | Unique identifier of the requested information |
[in] | name | Name or identifier of the requested information. |
[out] | result | Pointer to the read information location. Will point to NULL on error. |
Definition at line 7889 of file manage.c.
gchar* manage_report | ( | report_t | , |
const get_data_t * | , | ||
report_format_t | , | ||
int | , | ||
int | , | ||
const char * | , | ||
gsize * | , | ||
gchar ** | , | ||
gchar ** | , | ||
gchar ** | , | ||
gchar ** | , | ||
gchar ** | |||
) |
void manage_report_filter_controls | ( | const gchar * | filter, |
int * | first, | ||
int * | max, | ||
gchar ** | sort_field, | ||
int * | sort_order, | ||
int * | result_hosts_only, | ||
gchar ** | min_qod, | ||
gchar ** | levels, | ||
gchar ** | delta_states, | ||
gchar ** | search_phrase, | ||
int * | search_phrase_exact, | ||
int * | autofp, | ||
int * | notes, | ||
int * | overrides, | ||
int * | apply_overrides, | ||
gchar ** | zone | ||
) |
Get info from a filter for report.
It's up to the caller to ensure that max is adjusted for Max Rows Per Page (by calling manage_max_rows).
[in] | filter | Filter. |
[out] | first | Number of first item. |
[out] | max | Max number of rows. |
[out] | sort_field | Sort field. |
[out] | sort_order | Sort order. |
[out] | result_hosts_only | Whether to show only hosts with results. |
[out] | min_qod | Minimum QoD base of included results. All results if NULL. |
[out] | levels | String describing threat levels (message types) to include in count (for example, "hmlgd" for High, Medium, Low, loG and Debug). All levels if NULL. |
[out] | delta_states | String describing delta states to include in count (for example, "sngc" Same, New, Gone and Changed). All levels if NULL. |
[out] | search_phrase | Phrase that results must include. All results if NULL or "". |
[out] | search_phrase_exact | Whether search phrase is exact. |
[out] | autofp | Whether to apply auto FP filter. |
[out] | notes | Whether to include notes. |
[out] | overrides | Whether to include overrides. |
[out] | apply_overrides | Whether to apply overrides. |
[out] | zone | Timezone. |
Definition at line 2474 of file manage_sql.c.
References keyword::column, keyword::equal, filter_control_int(), filter_control_str(), filter_free(), SETTING_UUID_ROWS_PER_PAGE, setting_value_int(), split_filter(), and keyword::string.
report_host_t manage_report_host_add | ( | report_t | , |
const char * | , | ||
time_t | , | ||
time_t | |||
) |
int manage_report_host_detail | ( | report_t | , |
const char * | , | ||
const char * | |||
) |
void manage_reset_currents | ( | ) |
Cleanup as immediately as possible.
Definition at line 17173 of file manage_sql.c.
References current_report, and current_scanner_task.
int manage_resource_name | ( | const char * | type, |
const char * | uuid, | ||
char ** | name | ||
) |
Get the name of a resource.
[in] | type | Type. |
[in] | uuid | UUID. |
[out] | name | Return for freshly allocated name. |
Definition at line 4942 of file manage_sql.c.
References LOCATION_TABLE, and resource_name().
int manage_restore | ( | const char * | ) |
int manage_run_wizard | ( | const gchar * | , |
int(*)(void *, gchar *, gchar **) | , | ||
void * | , | ||
array_t * | , | ||
int | , | ||
const char * | , | ||
gchar ** | , | ||
gchar ** | , | ||
gchar ** | |||
) |
int manage_scanner_set | ( | const char * | uuid | ) |
Set the address of scanner to connect to.
[in] | uuid | Scanner UUID. |
Definition at line 17377 of file manage_sql.c.
References current_credentials, find_scanner(), openvas_scanner_set_address(), openvas_scanner_set_unix(), scanner_ca_pub(), scanner_host(), scanner_key_priv(), scanner_key_pub(), scanner_port(), SCANNER_TYPE_OPENVAS, and set_certs().
Referenced by manage_scanner_set_default().
int manage_scanner_set_default | ( | ) |
Set the default scanner as the scanner to connect to.
Definition at line 17440 of file manage_sql.c.
References manage_scanner_set(), and SCANNER_UUID_DEFAULT.
int manage_scap_db_supported_version | ( | ) |
Return the database version supported by this manager.
Definition at line 6288 of file manage_sql.c.
int manage_scap_db_version | ( | ) |
Return the database version of the actual database.
Definition at line 6299 of file manage_sql.c.
References manage_scap_loaded(), and sql_string().
int manage_scap_loaded | ( | ) |
Check whether SCAP is available.
Definition at line 2659 of file manage_pg.c.
Referenced by migrate_116_to_117().
const char* manage_scap_update_time | ( | ) |
GET SCAP update time, as a string.
Definition at line 7842 of file manage.c.
References SCAP_TIMESTAMP_FILENAME.
int manage_schedule | ( | int(*)(openvas_connection_t *, gchar *) | fork_connection, |
gboolean | run_tasks, | ||
sigset_t * | sigmask_current | ||
) |
Schedule any actions that are due.
In openvasmd, periodically called from the main daemon loop.
[in] | fork_connection | Function that forks a child which is connected to the Manager. Must return PID in parent, 0 in child, or -1 on error. |
[in] | run_tasks | Whether to run scheduled tasks. |
[in] | sigmask_current | Sigmask to restore in child. |
Definition at line 6481 of file manage.c.
References auto_delete_reports(), cleanup_task_schedule_iterator(), clear_duration_schedules(), current_credentials, init_task_schedule_iterator(), manage_session_init(), manage_update_nvti_cache(), next(), next_time(), reinit_manage_process(), reschedule_task(), schedule_duration(), schedule_period(), set_task_schedule_next_time(), set_task_schedule_next_time_uuid(), set_task_schedule_periods(), set_task_schedule_uuid(), task_schedule_iterator_first_time(), task_schedule_iterator_owner_name(), task_schedule_iterator_owner_uuid(), task_schedule_iterator_period(), task_schedule_iterator_period_months(), task_schedule_iterator_start_due(), task_schedule_iterator_stop_due(), task_schedule_iterator_task(), task_schedule_iterator_task_uuid(), task_schedule_iterator_timed_out(), task_schedule_iterator_timezone(), task_schedule_next_time_uuid(), task_schedule_periods_uuid(), task_schedule_uuid(), task_uuid(), and update_duration_schedule_periods().
int manage_schema | ( | gchar * | , |
gchar ** | , | ||
gsize * | , | ||
gchar ** | , | ||
gchar ** | |||
) |
int manage_send_report | ( | report_t | , |
report_t | , | ||
report_format_t | , | ||
const get_data_t * | , | ||
int | , | ||
int | , | ||
int | , | ||
int | , | ||
gboolean(*)(const char *, int(*)(const char *, void *), void *) | , | ||
int(*)(const char *, void *) | , | ||
void * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
int | , | ||
const char * | , | ||
const char * | , | ||
int | , | ||
int | , | ||
const gchar * | |||
) |
void manage_session_set_timezone | ( | const char * | timezone | ) |
Setup session timezone.
[in] | timezone | Timezone. |
Definition at line 63 of file manage_pg.c.
References sql().
int manage_set_config | ( | config_t | , |
const char * | , | ||
const char * | , | ||
const char * | |||
) |
int manage_set_config_families | ( | config_t | , |
GPtrArray * | , | ||
GPtrArray * | , | ||
GPtrArray * | , | ||
int | |||
) |
int manage_set_config_nvts | ( | config_t | , |
const char * | , | ||
GPtrArray * | |||
) |
int manage_set_config_preference | ( | config_t | , |
const char * | , | ||
const char * | , | ||
const char * | |||
) |
void manage_set_ldap_info | ( | int | , |
gchar * | , | ||
gchar * | , | ||
int | , | ||
gchar * | |||
) |
int manage_set_password | ( | GSList * | , |
const gchar * | , | ||
const gchar * | , | ||
const gchar * | |||
) |
void manage_set_radius_info | ( | int | , |
gchar * | , | ||
gchar * | |||
) |
int manage_system_report | ( | const char * | name, |
const char * | duration, | ||
const char * | start_time, | ||
const char * | end_time, | ||
const char * | slave_id, | ||
char ** | report | ||
) |
Get a system report.
[in] | name | Name of report. |
[in] | duration | Time range of report, in seconds. |
[in] | start_time | Time of first data point in report. |
[in] | end_time | Time of last data point in report. |
[in] | slave_id | ID of slave to get report from. 0 for local. |
[out] | report | On success, report in base64 if such a report exists else NULL. Arbitrary on error. |
Definition at line 6240 of file manage.c.
References manage_system_report(), and parse_iso_time().
Referenced by manage_system_report().
int manage_task_remove_file | ( | task_t | , |
const char * | |||
) |
void manage_task_update_file | ( | task_t | , |
const char * | , | ||
const void * | |||
) |
int manage_test_alert | ( | const char * | alert_id, |
gchar ** | script_message | ||
) |
Test an alert.
[in] | alert_id | Alert UUID. |
[out] | script_message | Custom message from the alert script. |
Definition at line 13084 of file manage_sql.c.
References acl_user_may(), find_alert_with_permission(), and task_id().
void manage_transaction_start | ( | ) |
void manage_transaction_stop | ( | gboolean | ) |
Referenced by manage_check_current_task(), and process_omp_client_input().
int manage_trash_resource_name | ( | const char * | type, |
const char * | uuid, | ||
char ** | name | ||
) |
Get the name of a trashcan resource.
[in] | type | Type. |
[in] | uuid | UUID. |
[out] | name | Return for freshly allocated name. |
Definition at line 4957 of file manage_sql.c.
References LOCATION_TRASH, and resource_name().
int manage_user_exists | ( | const gchar * | , |
auth_method_t | |||
) |
gchar* manage_user_hash | ( | const gchar * | username | ) |
Get user hash.
This is for "file" users, now entirely stored in db.
[in] | username | User name. |
Definition at line 17189 of file manage_sql.c.
References sql_quote(), and sql_string().
gchar* manage_user_uuid | ( | const gchar * | , |
auth_method_t | |||
) |
int manage_verify_scanner | ( | GSList * | , |
const gchar * | , | ||
const gchar * | |||
) |
int modify_agent | ( | const char * | , |
const char * | , | ||
const char * | |||
) |
int modify_alert | ( | const char * | alert_id, |
const char * | name, | ||
const char * | comment, | ||
const char * | filter_id, | ||
event_t | event, | ||
GPtrArray * | event_data, | ||
alert_condition_t | condition, | ||
GPtrArray * | condition_data, | ||
alert_method_t | method, | ||
GPtrArray * | method_data | ||
) |
Modify an alert.
[in] | alert_id | UUID of alert. |
[in] | name | Name of alert. |
[in] | comment | Comment on alert. |
[in] | filter_id | Filter. |
[in] | event | Type of event. |
[in] | event_data | Type-specific event data. |
[in] | condition | Event condition. |
[in] | condition_data | Condition-specific data. |
[in] | method | Escalation method. |
[in] | method_data | Data for escalation method. |
Definition at line 7894 of file manage_sql.c.
int modify_asset | ( | const char * | , |
const char * | |||
) |
int modify_credential | ( | const char * | , |
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | |||
) |
int modify_filter | ( | const char * | , |
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | |||
) |
int modify_group | ( | const char * | , |
const char * | , | ||
const char * | , | ||
const char * | |||
) |
int modify_note | ( | note_t | , |
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
task_t | , | ||
result_t | |||
) |
int modify_override | ( | override_t | , |
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
task_t | , | ||
result_t | |||
) |
int modify_permission | ( | const char * | , |
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | |||
) |
int modify_port_list | ( | const char * | , |
const char * | , | ||
const char * | |||
) |
int modify_report | ( | const char * | , |
const char * | |||
) |
int modify_report_format | ( | const char * | , |
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | |||
) |
int modify_role | ( | const char * | , |
const char * | , | ||
const char * | , | ||
const char * | |||
) |
int modify_scanner | ( | const char * | , |
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | |||
) |
int modify_schedule | ( | const char * | , |
const char * | , | ||
const char * | , | ||
time_t | , | ||
time_t | , | ||
time_t | , | ||
time_t | , | ||
const char * | |||
) |
int modify_setting | ( | const gchar * | , |
const gchar * | , | ||
const gchar * | , | ||
gchar ** | |||
) |
int modify_tag | ( | const char * | , |
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | |||
) |
int modify_target | ( | const char * | , |
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | , | ||
const char * | |||
) |
int modify_task_check_config_scanner | ( | task_t | , |
const char * | , | ||
const char * | |||
) |
int modify_user | ( | const gchar * | , |
gchar ** | , | ||
const gchar * | , | ||
const gchar * | , | ||
const gchar * | , | ||
int | , | ||
const gchar * | , | ||
int | , | ||
const array_t * | , | ||
array_t * | , | ||
gchar ** | , | ||
array_t * | , | ||
gchar ** | , | ||
gchar ** | |||
) |
int move_task | ( | const char * | task_id, |
const char * | slave_id | ||
) |
Reassign a task to another slave.
[in] | task_id | UUID of task. |
[in] | slave_id | UUID of slave. |
Definition at line 5576 of file manage.c.
References acl_user_has_access_uuid(), acl_user_may(), find_scanner_with_permission(), find_task_with_permission(), resume_task(), SCANNER_TYPE_CVE, SCANNER_TYPE_OMP, SCANNER_TYPE_OPENVAS, SCANNER_UUID_DEFAULT, set_task_scanner(), stop_task_internal(), task_id(), task_run_status(), task_scanner(), TASK_STATUS_DELETE_REQUESTED, TASK_STATUS_DELETE_ULTIMATE_REQUESTED, TASK_STATUS_DELETE_ULTIMATE_WAITING, TASK_STATUS_DELETE_WAITING, TASK_STATUS_REQUESTED, TASK_STATUS_RUNNING, TASK_STATUS_STOP_REQUESTED, TASK_STATUS_STOP_REQUESTED_GIVEUP, and TASK_STATUS_STOP_WAITING.
gboolean next | ( | iterator_t * | iterator | ) |
Increment an iterator.
[in] | iterator | Iterator. |
Definition at line 689 of file sql.c.
References iterator::crypt_ctx, iterator::done, log_errors, lsc_crypt_flush(), sql_exec_internal(), and iterator::stmt.
gboolean next_file | ( | file_iterator_t * | iterator | ) |
gboolean next_report | ( | iterator_t * | , |
report_t * | |||
) |
gboolean next_report_type | ( | report_type_iterator_t * | iterator | ) |
int note_count | ( | const get_data_t * | , |
nvt_t | , | ||
result_t | , | ||
task_t | |||
) |
int note_iterator_active | ( | iterator_t * | ) |
time_t note_iterator_creation_time | ( | iterator_t * | ) |
time_t note_iterator_end_time | ( | iterator_t * | ) |
const char* note_iterator_hosts | ( | iterator_t * | ) |
time_t note_iterator_modification_time | ( | iterator_t * | ) |
const char* note_iterator_nvt_name | ( | iterator_t * | ) |
const char* note_iterator_nvt_oid | ( | iterator_t * | ) |
const char* note_iterator_nvt_type | ( | iterator_t * | ) |
const char* note_iterator_port | ( | iterator_t * | ) |
result_t note_iterator_result | ( | iterator_t * | ) |
const char* note_iterator_severity | ( | iterator_t * | ) |
task_t note_iterator_task | ( | iterator_t * | ) |
const char* note_iterator_text | ( | iterator_t * | ) |
const char* note_iterator_threat | ( | iterator_t * | ) |
int note_uuid | ( | note_t | , |
char ** | |||
) |
int nvt_info_count | ( | const get_data_t * | ) |
const char* nvt_iterator_bid | ( | iterator_t * | ) |
int nvt_iterator_category | ( | iterator_t * | ) |
const char* nvt_iterator_copyright | ( | iterator_t * | ) |
const char* nvt_iterator_cve | ( | iterator_t * | ) |
const char* nvt_iterator_cvss_base | ( | iterator_t * | ) |
const char* nvt_iterator_description | ( | iterator_t * | ) |
const char* nvt_iterator_family | ( | iterator_t * | ) |
const char* nvt_iterator_name | ( | iterator_t * | ) |
const char* nvt_iterator_oid | ( | iterator_t * | ) |
const char* nvt_iterator_qod | ( | iterator_t * | ) |
const char* nvt_iterator_qod_type | ( | iterator_t * | iterator | ) |
const char* nvt_iterator_solution_type | ( | iterator_t * | ) |
const char* nvt_iterator_tag | ( | iterator_t * | ) |
const char* nvt_iterator_version | ( | iterator_t * | ) |
const char* nvt_iterator_xref | ( | iterator_t * | ) |
char* nvt_oid | ( | const char * | ) |
int nvt_preference_count | ( | const char * | ) |
char* nvt_preference_iterator_config_value | ( | iterator_t * | , |
config_t | |||
) |
const char* nvt_preference_iterator_name | ( | iterator_t * | ) |
char* nvt_preference_iterator_nvt | ( | iterator_t * | ) |
char* nvt_preference_iterator_real_name | ( | iterator_t * | ) |
char* nvt_preference_iterator_type | ( | iterator_t * | ) |
const char* nvt_preference_iterator_value | ( | iterator_t * | ) |
int nvt_selector_family_count | ( | const char * | , |
int | |||
) |
Referenced by make_config_discovery(), make_config_host_discovery(), and make_config_system_discovery().
int nvt_selector_family_growing | ( | const char * | , |
const char * | , | ||
int | |||
) |
int nvt_selector_iterator_include | ( | iterator_t * | ) |
const char* nvt_selector_iterator_name | ( | iterator_t * | ) |
const char* nvt_selector_iterator_nvt | ( | iterator_t * | ) |
int nvt_selector_iterator_type | ( | iterator_t * | ) |
int nvt_selector_nvt_count | ( | const char * | , |
const char * | , | ||
int | |||
) |
Referenced by make_config_discovery(), make_config_host_discovery(), and make_config_system_discovery().
char* nvt_severity | ( | const char * | , |
const char * | |||
) |
char* nvts_feed_version | ( | ) |
int openvas_current_sync | ( | const gchar * | , |
gchar ** | , | ||
gchar ** | |||
) |
gboolean openvas_get_sync_script_description | ( | const gchar * | , |
gchar ** | |||
) |
gboolean openvas_get_sync_script_feed_version | ( | const gchar * | , |
gchar ** | |||
) |
gboolean openvas_get_sync_script_identification | ( | const gchar * | , |
gchar ** | , | ||
int | |||
) |
int openvas_migrate_secinfo | ( | const gchar * | , |
int | |||
) |
int openvas_sync_feed | ( | const gchar * | , |
const gchar * | , | ||
int | |||
) |
gboolean openvas_sync_script_perform_selftest | ( | const gchar * | , |
gchar ** | |||
) |
const char* os_host_iterator_severity | ( | iterator_t * | ) |
int osp_get_details_from_iterator | ( | iterator_t * | , |
char ** | , | ||
GSList ** | |||
) |
int osp_get_version_from_iterator | ( | iterator_t * | , |
char ** | , | ||
char ** | , | ||
char ** | , | ||
char ** | , | ||
char ** | , | ||
char ** | |||
) |
osp_connection_t* osp_scanner_connect | ( | scanner_t | ) |
char* ovaldef_cves | ( | const char * | ) |
int ovaldef_info_count | ( | const get_data_t * | get | ) |
const char* ovaldef_info_iterator_class | ( | iterator_t * | ) |
const char* ovaldef_info_iterator_cve_refs | ( | iterator_t * | ) |
const char* ovaldef_info_iterator_deprecated | ( | iterator_t * | ) |
const char* ovaldef_info_iterator_description | ( | iterator_t * | ) |
const char* ovaldef_info_iterator_file | ( | iterator_t * | ) |
const char* ovaldef_info_iterator_max_cvss | ( | iterator_t * | ) |
const char* ovaldef_info_iterator_status | ( | iterator_t * | ) |
const char* ovaldef_info_iterator_title | ( | iterator_t * | ) |
const char* ovaldef_info_iterator_version | ( | iterator_t * | ) |
char* ovaldef_severity | ( | const char * | ) |
char* ovaldef_uuid | ( | const char * | , |
const char * | |||
) |
char* ovaldef_version | ( | const char * | ) |
const char* ovaldi_file_iterator_name | ( | iterator_t * | ) |
int override_count | ( | const get_data_t * | , |
nvt_t | , | ||
result_t | , | ||
task_t | |||
) |
int override_iterator_active | ( | iterator_t * | ) |
time_t override_iterator_creation_time | ( | iterator_t * | ) |
time_t override_iterator_end_time | ( | iterator_t * | ) |
const char* override_iterator_hosts | ( | iterator_t * | ) |
time_t override_iterator_modification_time | ( | iterator_t * | ) |
const char* override_iterator_new_severity | ( | iterator_t * | ) |
const char* override_iterator_new_threat | ( | iterator_t * | ) |
const char* override_iterator_nvt_name | ( | iterator_t * | ) |
const char* override_iterator_nvt_oid | ( | iterator_t * | ) |
const char* override_iterator_nvt_type | ( | iterator_t * | ) |
const char* override_iterator_port | ( | iterator_t * | ) |
result_t override_iterator_result | ( | iterator_t * | ) |
const char* override_iterator_severity | ( | iterator_t * | ) |
task_t override_iterator_task | ( | iterator_t * | ) |
const char* override_iterator_text | ( | iterator_t * | ) |
const char* override_iterator_threat | ( | iterator_t * | ) |
int override_uuid | ( | override_t | , |
char ** | |||
) |
const char* param_option_iterator_value | ( | iterator_t * | ) |
void parse_tags | ( | const char * | scanner_tags, |
gchar ** | tags, | ||
gchar ** | cvss_base | ||
) |
Split up the tags received from the scanner.
[in] | scanner_tags | The tags sent by the scanner. |
[out] | tags | Tags. |
[out] | cvss_base | CVSS base. |
Definition at line 7241 of file manage.c.
Referenced by migrate_16_to_17().
int permission_count | ( | const get_data_t * | ) |
int permission_in_use | ( | permission_t | ) |
int permission_is_admin | ( | const char * | ) |
int permission_iterator_resource_in_trash | ( | iterator_t * | ) |
const char* permission_iterator_resource_name | ( | iterator_t * | ) |
int permission_iterator_resource_orphan | ( | iterator_t * | ) |
int permission_iterator_resource_readable | ( | iterator_t * | ) |
const char* permission_iterator_resource_type | ( | iterator_t * | ) |
const char* permission_iterator_resource_uuid | ( | iterator_t * | ) |
int permission_iterator_subject_in_trash | ( | iterator_t * | ) |
const char* permission_iterator_subject_name | ( | iterator_t * | ) |
int permission_iterator_subject_readable | ( | iterator_t * | ) |
const char* permission_iterator_subject_type | ( | iterator_t * | ) |
const char* permission_iterator_subject_uuid | ( | iterator_t * | ) |
char* permission_name | ( | permission_t | ) |
char* permission_uuid | ( | permission_t | ) |
int permission_writable | ( | permission_t | ) |
int port_list_count | ( | const get_data_t * | ) |
int port_list_in_use | ( | port_list_t | ) |
int port_list_is_predefined | ( | port_list_t | ) |
int port_list_iterator_count_all | ( | iterator_t * | ) |
int port_list_iterator_count_tcp | ( | iterator_t * | ) |
int port_list_iterator_count_udp | ( | iterator_t * | ) |
const char* port_list_target_iterator_name | ( | iterator_t * | ) |
int port_list_target_iterator_readable | ( | iterator_t * | ) |
const char* port_list_target_iterator_uuid | ( | iterator_t * | ) |
char* port_list_uuid | ( | port_list_t | ) |
int port_list_writable | ( | port_list_t | ) |
char* port_name_formatted | ( | const char * | field | ) |
Returns formatted port number, protocol and iana name from.
field in "number/proto" form.
field | Number/Protocol string. |
Definition at line 6378 of file manage_sql.c.
References manage_port_name().
const char* port_range_iterator_comment | ( | iterator_t * | ) |
const char* port_range_iterator_end | ( | iterator_t * | ) |
const char* port_range_iterator_start | ( | iterator_t * | ) |
const char* port_range_iterator_type | ( | iterator_t * | ) |
port_protocol_t port_range_iterator_type_int | ( | iterator_t * | iterator | ) |
const char* port_range_iterator_uuid | ( | iterator_t * | ) |
char* port_range_uuid | ( | port_range_t | ) |
const char* preference_iterator_default | ( | iterator_t * | ) |
const char* preference_iterator_hr_name | ( | iterator_t * | ) |
const char* preference_iterator_name | ( | iterator_t * | ) |
const char* preference_iterator_type | ( | iterator_t * | ) |
const char* preference_iterator_value | ( | iterator_t * | ) |
const char* prognosis_iterator_cpe | ( | iterator_t * | ) |
const char* prognosis_iterator_cve | ( | iterator_t * | ) |
double prognosis_iterator_cvss_double | ( | iterator_t * | ) |
const char* prognosis_iterator_description | ( | iterator_t * | ) |
int qod_from_type | ( | const char * | ) |
void report_cache_counts | ( | report_t | , |
int | , | ||
int | , | ||
const char * | |||
) |
void report_clear_count_cache | ( | report_t | , |
int | , | ||
int | , | ||
const char * | |||
) |
int report_count | ( | const get_data_t * | ) |
int report_counts | ( | const char * | , |
int * | , | ||
int * | , | ||
int * | , | ||
int * | , | ||
int * | , | ||
int * | , | ||
double * | , | ||
int | , | ||
int | , | ||
int | |||
) |
int report_counts_build_iterator_min_qod | ( | iterator_t * | ) |
int report_counts_build_iterator_override | ( | iterator_t * | ) |
user_t report_counts_build_iterator_user | ( | iterator_t * | ) |
int report_counts_id | ( | report_t | , |
int * | , | ||
int * | , | ||
int * | , | ||
int * | , | ||
int * | , | ||
int * | , | ||
double * | , | ||
const get_data_t * | , | ||
const char * | |||
) |
int report_counts_id_no_filt | ( | report_t | , |
int * | , | ||
int * | , | ||
int * | , | ||
int * | , | ||
int * | , | ||
int * | , | ||
double * | , | ||
const get_data_t * | , | ||
const char * | |||
) |
int report_format_active | ( | report_format_t | ) |
const char* report_format_alert_iterator_name | ( | iterator_t * | ) |
int report_format_alert_iterator_readable | ( | iterator_t * | ) |
const char* report_format_alert_iterator_uuid | ( | iterator_t * | ) |
char* report_format_content_type | ( | report_format_t | ) |
int report_format_count | ( | const get_data_t * | ) |
char* report_format_extension | ( | report_format_t | ) |
int report_format_global | ( | report_format_t | ) |
int report_format_in_use | ( | report_format_t | ) |
int report_format_iterator_active | ( | iterator_t * | ) |
const char* report_format_iterator_content_type | ( | iterator_t * | ) |
const char* report_format_iterator_description | ( | iterator_t * | ) |
const char* report_format_iterator_extension | ( | iterator_t * | ) |
const char* report_format_iterator_signature | ( | iterator_t * | ) |
const char* report_format_iterator_summary | ( | iterator_t * | ) |
const char* report_format_iterator_trust | ( | iterator_t * | ) |
time_t report_format_iterator_trust_time | ( | iterator_t * | ) |
char* report_format_name | ( | report_format_t | ) |
char* report_format_owner_uuid | ( | report_format_t | ) |
const char* report_format_param_iterator_fallback | ( | iterator_t * | ) |
const char* report_format_param_iterator_name | ( | iterator_t * | ) |
report_format_param_t report_format_param_iterator_param | ( | iterator_t * | ) |
report_format_param_type_t report_format_param_iterator_type | ( | iterator_t * | ) |
long long int report_format_param_iterator_type_max | ( | iterator_t * | ) |
long long int report_format_param_iterator_type_min | ( | iterator_t * | ) |
const char* report_format_param_iterator_type_name | ( | iterator_t * | ) |
const char* report_format_param_iterator_type_regex | ( | iterator_t * | ) |
const char* report_format_param_iterator_value | ( | iterator_t * | ) |
report_format_param_type_t report_format_param_type_from_name | ( | const char * | name | ) |
Get a report format param type from a name.
[in] | name | Param type name. |
Definition at line 6978 of file manage.c.
References REPORT_FORMAT_PARAM_TYPE_BOOLEAN, REPORT_FORMAT_PARAM_TYPE_ERROR, REPORT_FORMAT_PARAM_TYPE_INTEGER, REPORT_FORMAT_PARAM_TYPE_REPORT_FORMAT_LIST, REPORT_FORMAT_PARAM_TYPE_SELECTION, REPORT_FORMAT_PARAM_TYPE_STRING, and REPORT_FORMAT_PARAM_TYPE_TEXT.
const char* report_format_param_type_name | ( | report_format_param_type_t | type | ) |
Get the name of a report format param type.
[in] | type | Param type. |
Definition at line 6947 of file manage.c.
References REPORT_FORMAT_PARAM_TYPE_BOOLEAN, REPORT_FORMAT_PARAM_TYPE_ERROR, REPORT_FORMAT_PARAM_TYPE_INTEGER, REPORT_FORMAT_PARAM_TYPE_REPORT_FORMAT_LIST, REPORT_FORMAT_PARAM_TYPE_SELECTION, REPORT_FORMAT_PARAM_TYPE_STRING, and REPORT_FORMAT_PARAM_TYPE_TEXT.
int report_format_predefined | ( | report_format_t | ) |
int report_format_trust | ( | report_format_t | ) |
char* report_format_uuid | ( | report_format_t | ) |
Referenced by check_generate_scripts(), and init_report_format_file_iterator().
int report_format_writable | ( | report_format_t | ) |
int report_host_count | ( | report_t | ) |
int report_host_dead | ( | report_host_t | ) |
int report_host_noticeable | ( | report_t | , |
const gchar * | |||
) |
int report_host_result_count | ( | report_host_t | ) |
void report_host_set_end_time | ( | report_host_t | , |
time_t | |||
) |
const char* report_iterator_uuid | ( | iterator_t * | ) |
gchar* report_path_task_uuid | ( | gchar * | ) |
int report_result_host_count | ( | report_t | , |
int | |||
) |
gchar* report_results_filter_term | ( | int | , |
int | , | ||
int | , | ||
int | , | ||
int | |||
) |
Create a basic filter term to get report results.
Definition at line 752 of file manage.c.
Referenced by report_results_get_data().
get_data_t* report_results_get_data | ( | int | , |
int | , | ||
int | , | ||
int | , | ||
int | |||
) |
Create a new basic get_data_t struct to get report results.
Definition at line 766 of file manage.c.
References report_results_filter_term().
int report_scan_result_count | ( | report_t | , |
const char * | , | ||
const char * | , | ||
int | , | ||
const char * | , | ||
const char * | , | ||
int | , | ||
int | , | ||
int * | |||
) |
int report_scan_run_status | ( | report_t | , |
int * | |||
) |
void report_set_slave_host | ( | report_t | , |
const gchar * | |||
) |
void report_set_slave_name | ( | report_t | , |
const gchar * | |||
) |
void report_set_slave_password | ( | report_t | , |
const gchar * | |||
) |
void report_set_slave_port | ( | report_t | , |
int | |||
) |
void report_set_slave_username | ( | report_t | , |
const gchar * | |||
) |
void report_set_slave_uuid | ( | report_t | , |
const gchar * | |||
) |
void report_set_source_iface | ( | report_t | , |
const gchar * | |||
) |
double report_severity | ( | report_t | , |
int | , | ||
int | |||
) |
Referenced by sql_report_severity(), and task_severity_double().
int report_slave_progress | ( | report_t | ) |
char* report_slave_task_uuid | ( | report_t | ) |
Referenced by acl_user_has_access_uuid(), and sql_report_progress().
int report_timestamp | ( | const char * | , |
gchar ** | |||
) |
const char* report_type_iterator_name | ( | report_type_iterator_t * | iterator | ) |
const char* report_type_iterator_title | ( | report_type_iterator_t * | iterator | ) |
char* report_uuid | ( | report_t | ) |
void reports_build_count_cache | ( | int | , |
int * | |||
) |
void reports_clear_count_cache | ( | int | ) |
void reports_clear_count_cache_for_override | ( | override_t | , |
int | |||
) |
int request_delete_task | ( | task_t * | ) |
int request_delete_task_uuid | ( | const char * | , |
int | |||
) |
void reset_task | ( | task_t | ) |
int resource_count | ( | const char * | type, |
const get_data_t * | get | ||
) |
Return number of resources of a certain type for current user.
[in] | type | Type. |
[in] | get | GET params. |
Definition at line 17704 of file manage_sql.c.
References get_data_t::filter, SEVERITY_ERROR, get_data_t::trash, and type_owned().
int resource_id_exists | ( | const char * | type, |
const char * | id | ||
) |
Test whether a resource of the given type and unique ID exists.
[in] | type | Type. |
[in] | id | Unique ID. |
Definition at line 17760 of file manage_sql.c.
References sql_int().
int resource_tag_count | ( | const char * | , |
resource_t | , | ||
int | |||
) |
const char* resource_tag_iterator_comment | ( | iterator_t * | ) |
const char* resource_tag_iterator_name | ( | iterator_t * | ) |
const char* resource_tag_iterator_uuid | ( | iterator_t * | ) |
const char* resource_tag_iterator_value | ( | iterator_t * | ) |
int result_count | ( | const get_data_t * | , |
report_t | , | ||
const char * | |||
) |
int result_detection_reference | ( | result_t | , |
char ** | , | ||
char ** | , | ||
char ** | , | ||
char ** | , | ||
char ** | |||
) |
char* result_host_asset_id | ( | const char * | , |
result_t | |||
) |
const char* result_iterator_date | ( | iterator_t * | ) |
const char* result_iterator_descr | ( | iterator_t * | ) |
const char* result_iterator_host | ( | iterator_t * | ) |
const char* result_iterator_level | ( | iterator_t * | ) |
const char* result_iterator_nvt_bid | ( | iterator_t * | ) |
const char* result_iterator_nvt_cve | ( | iterator_t * | ) |
const char* result_iterator_nvt_cvss_base | ( | iterator_t * | ) |
const char* result_iterator_nvt_family | ( | iterator_t * | ) |
const char* result_iterator_nvt_name | ( | iterator_t * | ) |
const char* result_iterator_nvt_oid | ( | iterator_t * | ) |
const char* result_iterator_nvt_tag | ( | iterator_t * | ) |
const char* result_iterator_nvt_xref | ( | iterator_t * | ) |
const char* result_iterator_original_level | ( | iterator_t * | ) |
const char* result_iterator_original_severity | ( | iterator_t * | ) |
const char* result_iterator_original_type | ( | iterator_t * | ) |
const char* result_iterator_port | ( | iterator_t * | ) |
const char* result_iterator_qod | ( | iterator_t * | ) |
const char* result_iterator_qod_type | ( | iterator_t * | ) |
report_t result_iterator_report | ( | iterator_t * | ) |
result_t result_iterator_result | ( | iterator_t * | ) |
const char* result_iterator_scan_nvt_version | ( | iterator_t * | ) |
const char* result_iterator_severity | ( | iterator_t * | ) |
double result_iterator_severity_double | ( | iterator_t * | ) |
task_t result_iterator_task | ( | iterator_t * | ) |
const char* result_iterator_type | ( | iterator_t * | ) |
int result_uuid | ( | result_t | , |
char ** | |||
) |
int resume_task | ( | const char * | task_id, |
char ** | report_id | ||
) |
Resume a task.
[in] | task_id | Task UUID. |
[out] | report_id | If successful, ID of the resultant report. |
Definition at line 5543 of file manage.c.
References acl_user_may(), find_task_with_permission(), task_id(), task_run_status(), and TASK_STATUS_STOPPED.
Referenced by move_task().
int role_count | ( | const get_data_t * | ) |
int role_in_use | ( | role_t | ) |
gchar* role_users | ( | role_t | ) |
char* role_uuid | ( | role_t | ) |
int role_writable | ( | role_t | ) |
const char* run_status_name | ( | task_status_t | status | ) |
Get the name of a run status.
[in] | status | Run status. |
Definition at line 1253 of file manage.c.
References TASK_STATUS_DELETE_REQUESTED, TASK_STATUS_DELETE_ULTIMATE_REQUESTED, TASK_STATUS_DELETE_ULTIMATE_WAITING, TASK_STATUS_DELETE_WAITING, TASK_STATUS_DONE, TASK_STATUS_NEW, TASK_STATUS_REQUESTED, TASK_STATUS_RUNNING, TASK_STATUS_STOP_REQUESTED, TASK_STATUS_STOP_REQUESTED_GIVEUP, TASK_STATUS_STOP_WAITING, and TASK_STATUS_STOPPED.
Referenced by sql_run_status_name().
int save_tasks | ( | ) |
char* scan_end_time | ( | report_t | ) |
char* scan_end_time_uuid | ( | const char * | ) |
int scan_host_end_time | ( | report_t | , |
const char * | |||
) |
char* scan_start_time | ( | report_t | ) |
int scan_start_time_epoch | ( | report_t | ) |
char* scan_start_time_uuid | ( | const char * | ) |
char* scanner_ca_pub | ( | scanner_t | ) |
int scanner_count | ( | const get_data_t * | ) |
char* scanner_host | ( | scanner_t | ) |
int scanner_in_use | ( | scanner_t | ) |
const char* scanner_iterator_ca_pub | ( | iterator_t * | ) |
credential_t scanner_iterator_credential | ( | iterator_t * | ) |
const char* scanner_iterator_credential_name | ( | iterator_t * | ) |
int scanner_iterator_credential_trash | ( | iterator_t * | ) |
const char* scanner_iterator_host | ( | iterator_t * | ) |
const char* scanner_iterator_key_priv | ( | iterator_t * | ) |
const char* scanner_iterator_key_pub | ( | iterator_t * | ) |
int scanner_iterator_port | ( | iterator_t * | ) |
int scanner_iterator_type | ( | iterator_t * | ) |
char* scanner_key_priv | ( | scanner_t | ) |
char* scanner_key_pub | ( | scanner_t | ) |
char* scanner_login | ( | scanner_t | ) |
char* scanner_name | ( | scanner_t | ) |
char* scanner_password | ( | scanner_t | ) |
int scanner_port | ( | scanner_t | ) |
const char* scanner_task_iterator_name | ( | iterator_t * | ) |
int scanner_task_iterator_readable | ( | iterator_t * | ) |
const char* scanner_task_iterator_uuid | ( | iterator_t * | ) |
int scanner_type | ( | scanner_t | ) |
char * scanner_uuid | ( | scanner_t | ) |
const char* scanner_uuid_default | ( | ) |
int scanner_writable | ( | scanner_t | ) |
int schedule_count | ( | const get_data_t * | ) |
int schedule_duration | ( | schedule_t | ) |
int schedule_in_use | ( | schedule_t | ) |
int schedule_info | ( | schedule_t | , |
time_t * | , | ||
time_t * | , | ||
int * | , | ||
int * | , | ||
int * | |||
) |
time_t schedule_iterator_duration | ( | iterator_t * | ) |
time_t schedule_iterator_first_time | ( | iterator_t * | ) |
time_t schedule_iterator_initial_offset | ( | iterator_t * | ) |
time_t schedule_iterator_next_time | ( | iterator_t * | ) |
time_t schedule_iterator_period | ( | iterator_t * | ) |
time_t schedule_iterator_period_months | ( | iterator_t * | ) |
const char* schedule_iterator_timezone | ( | iterator_t * | ) |
char* schedule_name | ( | schedule_t | ) |
int schedule_period | ( | schedule_t | ) |
const char* schedule_task_iterator_name | ( | iterator_t * | ) |
int schedule_task_iterator_readable | ( | iterator_t * | ) |
const char* schedule_task_iterator_uuid | ( | iterator_t * | ) |
char* schedule_uuid | ( | schedule_t | ) |
int schedule_writable | ( | schedule_t | ) |
void set_credential_auth_algorithm | ( | credential_t | , |
const char * | |||
) |
void set_credential_certificate | ( | credential_t | , |
const char * | |||
) |
void set_credential_comment | ( | credential_t | , |
const char * | |||
) |
int set_credential_data | ( | credential_t | , |
const char * | , | ||
const char * | |||
) |
void set_credential_login | ( | credential_t | , |
const char * | |||
) |
void set_credential_name | ( | credential_t | , |
const char * | |||
) |
void set_credential_password | ( | credential_t | , |
const char * | |||
) |
void set_credential_privacy_algorithm | ( | credential_t | , |
const char * | |||
) |
void set_credential_private_key | ( | credential_t | , |
const char * | , | ||
const char * | |||
) |
void set_credential_snmp_secret | ( | credential_t | , |
const char * | , | ||
const char * | , | ||
const char * | |||
) |
void set_db_version | ( | int | version | ) |
Set the database version of the actual database.
Caller must organise transaction.
version | New version number. |
Definition at line 6416 of file manage_sql.c.
References sql(), and sql_schema().
Referenced by migrate_0_to_1(), migrate_100_to_101(), migrate_101_to_102(), migrate_102_to_103(), migrate_103_to_104(), migrate_104_to_105(), migrate_105_to_106(), migrate_106_to_107(), migrate_107_to_108(), migrate_108_to_109(), migrate_109_to_110(), migrate_10_to_11(), migrate_110_to_111(), migrate_111_to_112(), migrate_112_to_113(), migrate_113_to_114(), migrate_114_to_115(), migrate_115_to_116(), migrate_116_to_117(), migrate_117_to_118(), migrate_118_to_119(), migrate_119_to_120(), migrate_11_to_12(), migrate_120_to_121(), migrate_121_to_122(), migrate_122_to_123(), migrate_123_to_124(), migrate_124_to_125(), migrate_125_to_126(), migrate_126_to_127(), migrate_127_to_128(), migrate_128_to_129(), migrate_129_to_130(), migrate_12_to_13(), migrate_130_to_131(), migrate_131_to_132(), migrate_132_to_133(), migrate_133_to_134(), migrate_134_to_135(), migrate_135_to_136(), migrate_136_to_137(), migrate_137_to_138(), migrate_138_to_139(), migrate_139_to_140(), migrate_13_to_14(), migrate_140_to_141(), migrate_141_to_142(), migrate_142_to_143(), migrate_143_to_144(), migrate_144_to_145(), migrate_145_to_146(), migrate_146_to_147(), migrate_147_to_148(), migrate_148_to_149(), migrate_149_to_150(), migrate_14_to_15(), migrate_150_to_151(), migrate_151_to_152(), migrate_152_to_153(), migrate_153_to_154(), migrate_154_to_155(), migrate_155_to_156(), migrate_156_to_157(), migrate_157_to_158(), migrate_158_to_159(), migrate_159_to_160(), migrate_15_to_16(), migrate_160_to_161(), migrate_161_to_162(), migrate_162_to_163(), migrate_163_to_164(), migrate_164_to_165(), migrate_165_to_166(), migrate_167_to_168(), migrate_16_to_17(), migrate_170_to_171(), migrate_171_to_172(), migrate_172_to_173(), migrate_173_to_174(), migrate_174_to_175(), migrate_175_to_176(), migrate_176_to_177(), migrate_177_to_178(), migrate_178_to_179(), migrate_179_to_180(), migrate_17_to_18(), migrate_180_to_181(), migrate_181_to_182(), migrate_182_to_183(), migrate_183_to_184(), migrate_18_to_19(), migrate_19_to_20(), migrate_1_to_2(), migrate_20_to_21(), migrate_21_to_22(), migrate_22_to_23(), migrate_23_to_24(), migrate_25_to_26(), migrate_26_to_27(), migrate_27_to_28(), migrate_28_to_29(), migrate_29_to_30(), migrate_2_to_3(), migrate_30_to_31(), migrate_31_to_32(), migrate_32_to_33(), migrate_33_to_34(), migrate_34_to_35(), migrate_35_to_36(), migrate_36_to_37(), migrate_37_to_38(), migrate_38_to_39(), migrate_39_to_40(), migrate_3_to_4(), migrate_40_to_41(), migrate_41_to_42(), migrate_42_to_43(), migrate_43_to_44(), migrate_44_to_45(), migrate_45_to_46(), migrate_46_to_47(), migrate_47_to_48(), migrate_48_to_49(), migrate_49_to_50(), migrate_50_to_51(), migrate_51_to_52(), migrate_52_to_53(), migrate_53_to_54(), migrate_54_to_55(), migrate_55_to_56(), migrate_56_to_57(), migrate_57_to_58(), migrate_58_to_59(), migrate_59_to_60(), migrate_60_to_61(), migrate_61_to_62(), migrate_62_to_63(), migrate_63_to_64(), migrate_64_to_65(), migrate_65_to_66(), migrate_66_to_67(), migrate_67_to_68(), migrate_68_to_69(), migrate_69_to_70(), migrate_6_to_7(), migrate_70_to_71(), migrate_71_to_72(), migrate_72_to_73(), migrate_73_to_74(), migrate_74_to_75(), migrate_75_to_76(), migrate_76_to_77(), migrate_77_to_78(), migrate_78_to_79(), migrate_7_to_8(), migrate_80_to_81(), migrate_81_to_82(), migrate_82_to_83(), migrate_83_to_84(), migrate_84_to_85(), migrate_85_to_86(), migrate_86_to_87(), migrate_87_to_88(), migrate_88_to_89(), migrate_89_to_90(), migrate_8_to_9(), migrate_90_to_91(), migrate_91_to_92(), migrate_92_to_93(), migrate_93_to_94(), migrate_94_to_95(), migrate_95_to_96(), migrate_96_to_97(), migrate_97_to_98(), migrate_98_to_99(), migrate_99_to_100(), and migrate_9_to_10().
void set_nvts_feed_version | ( | const char * | ) |
void set_report_format_active | ( | report_format_t | , |
int | |||
) |
void set_report_format_name | ( | report_format_t | , |
const char * | |||
) |
int set_report_format_param | ( | report_format_t | , |
const char * | , | ||
const char * | |||
) |
void set_report_format_summary | ( | report_format_t | , |
const char * | |||
) |
void set_scan_end_time | ( | report_t | , |
const char * | |||
) |
void set_scan_end_time_epoch | ( | report_t | , |
time_t | |||
) |
void set_scan_end_time_otp | ( | report_t | , |
const char * | |||
) |
void set_scan_host_end_time | ( | report_t | , |
const char * | , | ||
const char * | |||
) |
void set_scan_host_end_time_otp | ( | report_t | , |
const char * | , | ||
const char * | |||
) |
void set_scan_host_start_time | ( | report_t | , |
const char * | , | ||
const char * | |||
) |
void set_scan_host_start_time_otp | ( | report_t | , |
const char * | , | ||
const char * | |||
) |
void set_scan_ports | ( | report_t | , |
const char * | , | ||
unsigned | int, | ||
unsigned | int | ||
) |
void set_scan_start_time | ( | report_t | , |
const char * | |||
) |
void set_scan_start_time_epoch | ( | report_t | , |
time_t | |||
) |
void set_scan_start_time_otp | ( | report_t | , |
const char * | |||
) |
void set_schedule_timeout | ( | int | new_timeout | ) |
void set_scheduled_user_uuid | ( | gchar * | user_uuid | ) |
Set UUID of user that scheduled the current task.
user_uuid | UUID of user that scheduled the current task. |
Definition at line 6462 of file manage.c.
References schedule_user_uuid, and user_uuid().
int set_task_alerts | ( | task_t | task, |
array_t * | alerts, | ||
gchar ** | alert_id_return | ||
) |
Set the alerts on a task, removing any previous alerts.
[in] | task | Task. |
[in] | alerts | Alerts. |
[out] | alert_id_return | ID of alert on "failed to find" error. |
Definition at line 18674 of file manage_sql.c.
References find_alert_with_permission(), LOCATION_TABLE, sql(), sql_begin_immediate(), sql_commit(), and sql_rollback().
void set_task_alterable | ( | task_t | task, |
int | alterable | ||
) |
Set the alterable state of a task.
[in] | task | Task. |
[in] | alterable | Whether task is alterable. |
Definition at line 18722 of file manage_sql.c.
References sql().
Set the config of a task.
[in] | task | Task. |
[in] | config | Config. |
Definition at line 18095 of file manage_sql.c.
References sql().
void set_task_description | ( | task_t | , |
char * | , | ||
gsize | |||
) |
void set_task_end_time | ( | task_t | task, |
char * | time | ||
) |
void set_task_end_time_epoch | ( | task_t | , |
time_t | |||
) |
int set_task_groups | ( | task_t | task, |
array_t * | groups, | ||
gchar ** | group_id_return | ||
) |
Set observer groups on a task, removing any previous groups.
[in] | task | Task. |
[in] | groups | Groups. |
[out] | group_id_return | ID of group on "failed to find" error. |
Definition at line 18739 of file manage_sql.c.
References current_credentials, find_group(), LOCATION_TABLE, sql(), sql_begin_immediate(), sql_commit(), and sql_rollback().
void set_task_hosts_ordering | ( | task_t | task, |
const char * | ordering | ||
) |
Set the hosts ordering of a task.
[in] | task | Task. |
[in] | ordering | Hosts ordering. |
Definition at line 18152 of file manage_sql.c.
References sql(), and sql_quote().
int set_task_observers | ( | task_t | task, |
const gchar * | observers | ||
) |
Set the observers of a task.
[in] | task | Task. |
[in] | observers | Observers. |
Definition at line 19148 of file manage_sql.c.
References current_credentials, sql(), sql_begin_immediate(), sql_rollback(), and user_exists().
int set_task_parameter | ( | task_t | , |
const char * | , | ||
char * | |||
) |
int set_task_preferences | ( | task_t | , |
array_t * | |||
) |
void set_task_run_status | ( | task_t | task, |
task_status_t | status | ||
) |
Set the run state of a task.
Logs and generates event.
[in] | task | Task. |
[in] | status | New run status. |
Definition at line 18307 of file manage_sql.c.
Referenced by manage_check_current_task(), manage_cleanup_process_error(), and set_task_requested().
Set the scanner of a task.
[in] | task | Task. |
[in] | scanner | Scanner. |
Definition at line 18208 of file manage_sql.c.
References SCANNER_TYPE_CVE, and sql().
Referenced by move_task().
int set_task_schedule | ( | task_t | task, |
schedule_t | schedule, | ||
int | periods | ||
) |
Set the schedule of a task.
[in] | task | Task. |
[in] | schedule | Schedule. |
[in] | periods | Number of schedule periods. |
Definition at line 18808 of file manage_sql.c.
References sql().
int set_task_schedule_periods | ( | const gchar * | task_id, |
int | periods | ||
) |
Set the schedule periods of a task, given a UUID.
The task modification time stays the same.
[in] | task_id | Task UUID. |
[in] | periods | Schedule periods. |
Definition at line 18869 of file manage_sql.c.
References sql(), sql_quote(), and task_id().
Referenced by manage_schedule().
int set_task_schedule_periods_id | ( | task_t | task, |
int | periods | ||
) |
Set the schedule periods of a task, given an ID.
The task modification time stays the same.
[in] | task | Task UUID. |
[in] | periods | Schedule periods. |
Definition at line 18894 of file manage_sql.c.
References sql().
void set_task_start_time | ( | task_t | task, |
char * | time | ||
) |
Set the start time of a task.
[in] | task | Task. |
[in] | time | New time. ISO format. Freed before return. |
Definition at line 18493 of file manage_sql.c.
References parse_iso_time(), and sql().
void set_task_start_time_epoch | ( | task_t | task, |
int | time | ||
) |
Set the start time of a task.
[in] | task | Task. |
[in] | time | New time. Seconds since epoch. |
Definition at line 18509 of file manage_sql.c.
References sql().
void set_task_start_time_otp | ( | task_t | task, |
char * | time | ||
) |
Set the start time of a task.
[in] | task | Task. |
[in] | time | New time. OTP format (ctime). Freed before return. |
Definition at line 18524 of file manage_sql.c.
References sql().
Set the target of a task.
[in] | task | Task. |
[in] | target | Target. |
Definition at line 18137 of file manage_sql.c.
References sql().
int setting_auto_cache_rebuild_int | ( | ) |
int setting_count | ( | const char * | ) |
double setting_default_severity_dbl | ( | ) |
int setting_dynamic_severity_int | ( | ) |
char* setting_filter | ( | const char * | ) |
int setting_is_default_ca_cert | ( | const gchar * | ) |
const char* setting_iterator_comment | ( | iterator_t * | ) |
const char* setting_iterator_name | ( | iterator_t * | ) |
const char* setting_iterator_uuid | ( | iterator_t * | ) |
const char* setting_iterator_value | ( | iterator_t * | ) |
const char* setting_severity | ( | ) |
char* setting_timezone | ( | ) |
int setting_value_int | ( | const char * | , |
int * | |||
) |
Referenced by manage_filter_controls(), and manage_report_filter_controls().
void severity_data_add | ( | severity_data_t * | severity_data, |
double | severity | ||
) |
Add a severity occurrence to the counts of a severity_data_t.
[in] | severity_data | The severity count struct to add to. |
[in] | severity | The severity to add. |
Definition at line 860 of file manage.c.
References severity_data_t::counts, severity_data_t::max, severity_data_index(), and severity_data_t::total.
void severity_data_add_count | ( | severity_data_t * | severity_data, |
double | severity, | ||
int | count | ||
) |
Add a multiple severity occurrences to the counts of a severity_data_t.
[in] | severity_data | The severity count struct to add to. |
[in] | severity | The severity to add. |
[in] | count | The number of occurrences to add. |
Definition at line 878 of file manage.c.
int severity_data_index | ( | double | severity | ) |
Convert a severity value into an index in the counts array.
[in] | severity | Severity value. |
Definition at line 789 of file manage.c.
References SEVERITY_DEBUG, SEVERITY_ERROR, SEVERITY_FP, SEVERITY_SUBDIVISIONS, and ZERO_SEVERITY_INDEX.
Referenced by severity_data_add().
void severity_data_level_counts | ( | const severity_data_t * | severity_data, |
const gchar * | severity_class, | ||
int * | errors, | ||
int * | debugs, | ||
int * | false_positives, | ||
int * | logs, | ||
int * | lows, | ||
int * | mediums, | ||
int * | highs | ||
) |
Count the occurrences of severities in the levels.
[in] | severity_data | The severity counts data to evaluate. |
[in] | severity_class | The severity class setting to use. |
[out] | errors | The number of error messages. |
[out] | debugs | The number of debug messages. |
[out] | false_positives | The number of False Positives. |
[out] | logs | The number of Log messages. |
[out] | lows | The number of Low severity results. |
[out] | mediums | The number of Medium severity results. |
[out] | highs | The number of High severity results. |
Definition at line 930 of file manage.c.
References level_max_severity(), level_min_severity(), and severity_data_range_count().
int severity_data_range_count | ( | const severity_data_t * | severity_data, |
double | min_severity, | ||
double | max_severity | ||
) |
Calculate the total of severity counts in a range.
[in] | severity_data | The severity data struct to get counts from. |
[in] | min_severity | The minimum severity included in the range. |
[in] | max_severity | The maximum severity included in the range. |
Definition at line 899 of file manage.c.
Referenced by severity_data_level_counts().
double severity_data_value | ( | int | index | ) |
Convert an index in the counts array to a severity value.
[in] | index | Index in the counts array. |
Definition at line 811 of file manage.c.
References SEVERITY_MAX, SEVERITY_MISSING, SEVERITY_SUBDIVISIONS, and ZERO_SEVERITY_INDEX.
int severity_in_level | ( | double | severity, |
const char * | level | ||
) |
Check whether a severity falls within a threat level.
[in] | severity | Severity. |
[in] | level | Threat level. |
Definition at line 583 of file manage.c.
References setting_severity().
Referenced by severity_to_level(), and sql_severity_in_level().
int severity_matches_ov | ( | double | severity, |
double | ov_severity | ||
) |
Check whether a severity matches an override's severity.
[in] | severity | severity score |
[in] | ov_severity | override severity score to match |
Definition at line 635 of file manage.c.
Referenced by sql_severity_matches_ov().
const char* severity_to_level | ( | double | severity, |
int | mode | ||
) |
Get the threat level matching a severity score.
[in] | severity | severity score |
[in] | mode | 0 for normal levels, 1 to use "Alarm" for severity > 0.0 |
Definition at line 652 of file manage.c.
References SEVERITY_DEBUG, SEVERITY_ERROR, SEVERITY_FP, severity_in_level(), and SEVERITY_LOG.
Referenced by sql_severity_to_level().
const char* severity_to_type | ( | double | severity | ) |
Get the message type matching a severity score.
[in] | severity | severity score |
Definition at line 691 of file manage.c.
References SEVERITY_DEBUG, SEVERITY_ERROR, SEVERITY_FP, and SEVERITY_LOG.
Referenced by sql_severity_to_type().
void sort_data_free | ( | sort_data_t * | ) |
array_t* split_filter | ( | const gchar * | given_filter | ) |
Split the filter term into parts.
[in] | given_filter | Filter term. |
Definition at line 2043 of file manage_sql.c.
References keyword::column, keyword::equal, KEYWORD_RELATION_COLUMN_ABOVE, KEYWORD_RELATION_COLUMN_APPROX, KEYWORD_RELATION_COLUMN_BELOW, KEYWORD_RELATION_COLUMN_EQUAL, KEYWORD_RELATION_COLUMN_REGEXP, keyword::relation, and keyword::string.
Referenced by manage_clean_filter_remove(), manage_filter_controls(), and manage_report_filter_controls().
int sql_cancel | ( | ) |
int start_task | ( | const char * | task_id, |
char ** | report_id | ||
) |
Start a task.
Use send_to_server to queue the task start sequence in the scanner output buffer.
Only one task can run at a time in a process.
[in] | task_id | The task ID. |
[out] | report_id | The report ID. |
Definition at line 5399 of file manage.c.
References acl_user_may().
int stop_task | ( | const char * | task_id | ) |
Initiate stopping a task.
Use send_to_server to queue the task stop sequence in the scanner output buffer.
[in] | task_id | Task UUID. |
Definition at line 5514 of file manage.c.
References acl_user_may(), config_type(), find_task_with_permission(), task_config(), and task_id().
int sync_config | ( | const char * | ) |
int tag_count | ( | const get_data_t * | get | ) |
int tag_in_use | ( | tag_t | ) |
int tag_iterator_active | ( | iterator_t * | ) |
int tag_iterator_orphan | ( | iterator_t * | ) |
int tag_iterator_resource_location | ( | iterator_t * | ) |
const char* tag_iterator_resource_name | ( | iterator_t * | ) |
int tag_iterator_resource_readable | ( | iterator_t * | ) |
const char* tag_iterator_resource_type | ( | iterator_t * | ) |
const char* tag_iterator_resource_uuid | ( | iterator_t * | ) |
const char* tag_iterator_value | ( | iterator_t * | ) |
const char* tag_name_iterator_name | ( | iterator_t * | ) |
char* tag_uuid | ( | target_t | ) |
int tag_writable | ( | tag_t | ) |
int target_count | ( | const get_data_t * | ) |
credential_t target_credential | ( | target_t | , |
const char * | |||
) |
char* target_exclude_hosts | ( | target_t | ) |
char* target_hosts | ( | target_t | ) |
int target_in_use | ( | target_t | ) |
const char* target_iterator_alive_tests | ( | iterator_t * | ) |
const char* target_iterator_comment | ( | iterator_t * | ) |
int target_iterator_esxi_credential | ( | iterator_t * | ) |
int target_iterator_esxi_trash | ( | iterator_t * | ) |
const char* target_iterator_exclude_hosts | ( | iterator_t * | ) |
const char* target_iterator_hosts | ( | iterator_t * | ) |
const char* target_iterator_port_list_name | ( | iterator_t * | ) |
int target_iterator_port_list_trash | ( | iterator_t * | ) |
const char* target_iterator_port_list_uuid | ( | iterator_t * | ) |
const char* target_iterator_reverse_lookup_only | ( | iterator_t * | ) |
const char* target_iterator_reverse_lookup_unify | ( | iterator_t * | ) |
int target_iterator_smb_credential | ( | iterator_t * | ) |
int target_iterator_smb_trash | ( | iterator_t * | ) |
int target_iterator_snmp_credential | ( | iterator_t * | ) |
int target_iterator_snmp_trash | ( | iterator_t * | ) |
int target_iterator_ssh_credential | ( | iterator_t * | ) |
const char* target_iterator_ssh_port | ( | iterator_t * | ) |
int target_iterator_ssh_trash | ( | iterator_t * | ) |
int target_login_port | ( | target_t | , |
const char * | |||
) |
char* target_name | ( | target_t | ) |
char* target_port_range | ( | target_t | ) |
char* target_reverse_lookup_only | ( | target_t | ) |
char* target_reverse_lookup_unify | ( | target_t | ) |
char* target_ssh_credential_name | ( | const char * | ) |
char* target_ssh_port | ( | target_t | ) |
const char* target_task_iterator_name | ( | iterator_t * | ) |
int target_task_iterator_readable | ( | iterator_t * | ) |
const char* target_task_iterator_uuid | ( | iterator_t * | ) |
char* target_uuid | ( | target_t | ) |
int target_writable | ( | target_t | ) |
alert_t task_alert_iterator_alert | ( | iterator_t * | iterator | ) |
Get the alert from a task alert iterator.
[in] | iterator | Iterator. |
Definition at line 8894 of file manage_sql.c.
References iterator::done, and iterator_int64().
const char* task_alert_iterator_name | ( | iterator_t * | ) |
const char* task_alert_iterator_uuid | ( | iterator_t * | ) |
int task_alterable | ( | task_t | task | ) |
Return whether a task is an Alterable Task.
[in] | task | Task. |
Definition at line 14238 of file manage_sql.c.
References sql_int().
int task_average_scan_duration | ( | task_t | task | ) |
Get the average duration of all finished reports of a task.
[in] | task | Task. |
Definition at line 14283 of file manage_sql.c.
References sql_int(), and TASK_STATUS_DONE.
char* task_comment | ( | task_t | task | ) |
Return the comment of a task.
[in] | task | Task. |
Definition at line 17959 of file manage_sql.c.
References sql_string().
Return the config of a task.
[in] | task | Task. |
Definition at line 18016 of file manage_sql.c.
References sql_int64().
Referenced by stop_task().
int task_config_in_trash | ( | task_t | task | ) |
Return whether the config of a task is in the trashcan.
[in] | task | Task. |
Definition at line 18081 of file manage_sql.c.
References LOCATION_TRASH, and sql_int().
Referenced by task_config_name(), and task_config_uuid().
char* task_config_name | ( | task_t | task | ) |
Return the name of the config of a task.
[in] | task | Task. |
Definition at line 18062 of file manage_sql.c.
References sql_string(), and task_config_in_trash().
char* task_config_uuid | ( | task_t | task | ) |
Return the UUID of the config of a task.
[in] | task | Task. |
Definition at line 18043 of file manage_sql.c.
References sql_string(), and task_config_in_trash().
unsigned int task_count | ( | const get_data_t * | get | ) |
Return the number of tasks associated with the current user.
[in] | get | GET params. |
Definition at line 17814 of file manage_sql.c.
References filter_term(), filter_term_value(), MIN_QOD_DEFAULT, TASK_ITERATOR_COLUMNS, TASK_ITERATOR_FILTER_COLUMNS, and TASK_ITERATOR_WHERE_COLUMNS.
int task_debugs_size | ( | task_t | ) |
char* task_description | ( | task_t | ) |
int task_false_positive_size | ( | task_t | ) |
const char* task_group_iterator_name | ( | iterator_t * | ) |
const char* task_group_iterator_uuid | ( | iterator_t * | ) |
int task_holes_size | ( | task_t | ) |
char* task_hosts_ordering | ( | task_t | task | ) |
Return the hosts ordering of a task.
[in] | task | Task. |
Definition at line 17973 of file manage_sql.c.
References sql_string().
unsigned int task_id | ( | task_t | task | ) |
Return the identifier of a task.
[in] | task | Task. |
Definition at line 17869 of file manage_sql.c.
Referenced by manage_test_alert(), move_task(), resume_task(), set_task_schedule_next_time_uuid(), set_task_schedule_periods(), set_task_schedule_uuid(), stop_task(), task_schedule_next_time_uuid(), task_schedule_periods_uuid(), and task_schedule_uuid().
int task_in_trash | ( | task_t | task | ) |
Return whether a task is in the trashcan.
[in] | task | Task. |
Definition at line 17900 of file manage_sql.c.
References sql_int().
int task_in_use | ( | task_t | task | ) |
Return whether a task is in use by a task.
[in] | task | Task. |
Definition at line 14202 of file manage_sql.c.
References task_run_status(), TASK_STATUS_DELETE_REQUESTED, TASK_STATUS_DELETE_ULTIMATE_REQUESTED, TASK_STATUS_DELETE_ULTIMATE_WAITING, TASK_STATUS_DELETE_WAITING, TASK_STATUS_REQUESTED, TASK_STATUS_RUNNING, TASK_STATUS_STOP_REQUESTED, TASK_STATUS_STOP_REQUESTED_GIVEUP, and TASK_STATUS_STOP_WAITING.
Referenced by trash_task_in_use().
int task_infos_size | ( | task_t | ) |
report_t task_iterator_current_report | ( | iterator_t * | iterator | ) |
Return the current report of a task.
[in] | iterator | Iterator. |
Definition at line 18416 of file manage_sql.c.
References get_iterator_resource(), sql_int(), task_iterator_run_status(), TASK_STATUS_DELETE_REQUESTED, TASK_STATUS_DELETE_ULTIMATE_REQUESTED, TASK_STATUS_INTERNAL_ERROR, TASK_STATUS_REQUESTED, TASK_STATUS_RUNNING, TASK_STATUS_STOP_REQUESTED, TASK_STATUS_STOP_REQUESTED_GIVEUP, and TASK_STATUS_STOPPED.
int task_iterator_finished_reports | ( | iterator_t * | iterator | ) |
Get the number of reports of a task iterator.
[in] | iterator | Iterator. |
Definition at line 14160 of file manage_sql.c.
References iterator::done, GET_ITERATOR_COLUMN_COUNT, and iterator_int().
const char* task_iterator_first_report | ( | iterator_t * | iterator | ) |
Get the first report UUID from a task iterator.
[in] | iterator | Iterator. |
Definition at line 14118 of file manage_sql.c.
References iterator::done, GET_ITERATOR_COLUMN_COUNT, and iterator_string().
const char* task_iterator_hosts_ordering | ( | iterator_t * | iterator | ) |
Get the hosts ordering value from a task iterator.
[in] | iterator | Iterator. |
Definition at line 14174 of file manage_sql.c.
References iterator::done, GET_ITERATOR_COLUMN_COUNT, and iterator_string().
const char* task_iterator_last_report | ( | iterator_t * | iterator | ) |
Get the last report UUID from a task iterator.
[in] | iterator | Iterator. |
Definition at line 14146 of file manage_sql.c.
References iterator::done, GET_ITERATOR_COLUMN_COUNT, and iterator_string().
task_status_t task_iterator_run_status | ( | iterator_t * | iterator | ) |
Get the run status from a task iterator.
[in] | iterator | Iterator. |
Definition at line 14088 of file manage_sql.c.
References iterator::done, GET_ITERATOR_COLUMN_COUNT, iterator_int(), and TASK_STATUS_INTERNAL_ERROR.
Referenced by stop_active_tasks(), and task_iterator_current_report().
const char* task_iterator_run_status_name | ( | iterator_t * | iterator | ) |
Get the run status name from a task iterator.
[in] | iterator | Iterator. |
Definition at line 14132 of file manage_sql.c.
References iterator::done, GET_ITERATOR_COLUMN_COUNT, and iterator_string().
scanner_t task_iterator_scanner | ( | iterator_t * | iterator | ) |
Get the UUID of task scanner from a task iterator.
[in] | iterator | Iterator. |
Definition at line 14188 of file manage_sql.c.
References iterator::done, GET_ITERATOR_COLUMN_COUNT, and iterator_int64().
int task_iterator_total_reports | ( | iterator_t * | iterator | ) |
Get the number of reports of a task iterator.
[in] | iterator | Iterator. |
Definition at line 14104 of file manage_sql.c.
References iterator::done, GET_ITERATOR_COLUMN_COUNT, and iterator_int().
const char* task_iterator_trend_counts | ( | iterator_t * | , |
int | , | ||
int | , | ||
int | , | ||
double | , | ||
int | , | ||
int | , | ||
int | , | ||
double | |||
) |
Get the report from the most recently completed invocation of task.
[in] | task | The task. |
[out] | report | Report return, 0 if succesfully failed to select report. |
Definition at line 18542 of file manage_sql.c.
References sql_int64(), and TASK_STATUS_DONE.
Referenced by sql_task_last_report().
Get the report from the most recently stopped invocation of task.
[in] | task | The task. |
[out] | report | Report return, 0 if succesfully failed to select report. |
Definition at line 18608 of file manage_sql.c.
References sql_int64(), and TASK_STATUS_STOPPED.
int task_logs_size | ( | task_t | ) |
char* task_name | ( | task_t | task | ) |
Return the name of a task.
[in] | task | Task. |
Definition at line 17945 of file manage_sql.c.
References sql_string().
char* task_observers | ( | task_t | task | ) |
Return the observers of a task.
[in] | task | Task. |
Definition at line 17987 of file manage_sql.c.
References cleanup_iterator(), init_task_user_iterator(), and next().
char* task_owner_name | ( | task_t | task | ) |
Return the name of the owner of a task.
[in] | task | Task. |
Definition at line 17915 of file manage_sql.c.
References sql_string().
char* task_preference_value | ( | task_t | , |
const char * | |||
) |
unsigned int task_report_count | ( | task_t | ) |
int task_result_count | ( | task_t | task, |
int | min_qod | ||
) |
Return number of results in a task.
[in] | task | Task. |
[in] | min_qod | Minimum QOD. |
Definition at line 18375 of file manage_sql.c.
References SEVERITY_ERROR, and sql_int().
const char* task_role_iterator_name | ( | iterator_t * | ) |
const char* task_role_iterator_uuid | ( | iterator_t * | ) |
task_status_t task_run_status | ( | task_t | task | ) |
Return the run state of a task.
[in] | task | Task. |
Definition at line 18238 of file manage_sql.c.
References sql_int().
Referenced by manage_check_current_task(), move_task(), resume_task(), set_task_requested(), stop_task_internal(), task_in_use(), and task_running_report().
Return the running report of a task.
[in] | task | Task. |
Definition at line 18393 of file manage_sql.c.
References sql_int(), task_run_status(), TASK_STATUS_REQUESTED, and TASK_STATUS_RUNNING.
Referenced by task_upload_progress().
Return the scanner of a task.
[in] | task | Task. |
Definition at line 18183 of file manage_sql.c.
References sql_int64().
Referenced by move_task(), and stop_task_internal().
int task_scanner_in_trash | ( | task_t | task | ) |
Return whether the scanner of a task is in the trashcan.
[in] | task | Task. |
Definition at line 18224 of file manage_sql.c.
References LOCATION_TRASH, and sql_int().
schedule_t task_schedule | ( | task_t | task | ) |
Return the schedule of a task.
[in] | task | Task. |
Definition at line 18911 of file manage_sql.c.
References sql_int64().
int task_schedule_in_trash | ( | task_t | task | ) |
Get whether the task schedule is in the trash.
[in] | task | Task. |
Definition at line 18971 of file manage_sql.c.
References LOCATION_TRASH, and sql_int().
int task_schedule_next_time | ( | task_t | task | ) |
Get next time a scheduled task will run, following schedule timezone.
[in] | task | Task. |
Definition at line 19021 of file manage_sql.c.
References next_time(), and sql_int().
time_t task_schedule_next_time_uuid | ( | const gchar * | task_id | ) |
Set the next time a scheduled task will be due.
[in] | task_id | Task UUID. |
Definition at line 19038 of file manage_sql.c.
References sql_int(), sql_quote(), and task_id().
Referenced by manage_schedule().
int task_schedule_periods | ( | task_t | task | ) |
Get the number of times the period schedule should run on the task.
[in] | task | Task. |
Definition at line 18987 of file manage_sql.c.
References sql_int().
int task_schedule_periods_uuid | ( | const gchar * | task_id | ) |
Set the next time a scheduled task will be due.
[in] | task_id | Task UUID. |
Definition at line 19000 of file manage_sql.c.
References sql_int(), sql_quote(), and task_id().
Referenced by manage_schedule().
schedule_t task_schedule_uuid | ( | const gchar * | task_id | ) |
Return the schedule of a task.
[in] | task_id | ID of task. |
Definition at line 18938 of file manage_sql.c.
References sql_int64(), sql_quote(), and task_id().
Referenced by manage_schedule().
gchar* task_second_last_report_id | ( | task_t | task | ) |
Get report ID from second most recently completed invocation of task.
[in] | task | The task. |
Definition at line 18640 of file manage_sql.c.
References sql_string(), and TASK_STATUS_DONE.
char* task_severity | ( | task_t | task, |
int | overrides, | ||
int | min_qod, | ||
int | offset | ||
) |
Return the severity score of a task, taking overrides into account.
[in] | task | Task. |
[in] | overrides | Whether to apply overrides. |
[in] | min_qod | Minimum QoD of results to count. |
[in] | offset | Offset of report to get severity from: 0 = use last report, 1 = use next to last report |
Definition at line 19094 of file manage_sql.c.
References SEVERITY_MISSING, and task_severity_double().
double task_severity_double | ( | task_t | task, |
int | overrides, | ||
int | min_qod, | ||
int | offset | ||
) |
Return the severity score of a task, taking overrides into account.
[in] | task | Task. |
[in] | overrides | Whether to apply overrides. |
[in] | min_qod | Minimum QoD of results to count. |
[in] | offset | Offset of report to get severity from: 0 = use last report, 1 = use next to last report |
Definition at line 19119 of file manage_sql.c.
References current_credentials, report_severity(), SEVERITY_MISSING, sql_int64(), TASK_STATUS_DONE, and task_target().
Referenced by task_severity().
Return the target of a task.
[in] | task | Task. |
Definition at line 18111 of file manage_sql.c.
References sql_int64().
Referenced by run_osp_task(), and task_severity_double().
int task_target_in_trash | ( | task_t | task | ) |
Return whether the target of a task is in the trashcan.
[in] | task | Task. |
Definition at line 18168 of file manage_sql.c.
References LOCATION_TRASH, and sql_int().
const char* task_trend | ( | task_t | , |
int | , | ||
int | |||
) |
int task_upload_progress | ( | task_t | task | ) |
Return the upload progress of a task.
[in] | task | Task. |
Definition at line 18460 of file manage_sql.c.
References task_running_report().
int task_uuid | ( | task_t | task, |
char ** | id | ||
) |
Return the UUID of a task.
[in] | task | Task. |
[out] | id | Pointer to a newly allocated string. |
Definition at line 17885 of file manage_sql.c.
References sql_string().
Referenced by acl_user_has_access_uuid(), and manage_schedule().
int task_warnings_size | ( | task_t | ) |
int task_writable | ( | task_t | task | ) |
Return whether a task is writable.
[in] | task | Task. |
Definition at line 14253 of file manage_sql.c.
References sql_int().
int total_asset_count | ( | const get_data_t * | ) |
int total_info_count | ( | const get_data_t * | , |
int | |||
) |
int trash_agent_in_use | ( | agent_t | ) |
int trash_agent_writable | ( | agent_t | ) |
int trash_alert_in_use | ( | alert_t | alert | ) |
Return whether a trashcan alert is in use by a task.
[in] | alert | Alert. |
Definition at line 8520 of file manage_sql.c.
References LOCATION_TRASH, and sql_int().
int trash_alert_writable | ( | alert_t | alert | ) |
Return whether a trashcan alert is writable.
[in] | alert | Alert. |
Definition at line 8549 of file manage_sql.c.
int trash_config_in_use | ( | config_t | ) |
int trash_config_readable_uuid | ( | const gchar * | ) |
int trash_config_writable | ( | config_t | ) |
int trash_credential_in_use | ( | credential_t | ) |
char* trash_credential_name | ( | credential_t | ) |
int trash_credential_readable | ( | credential_t | ) |
char* trash_credential_uuid | ( | credential_t | ) |
int trash_credential_writable | ( | credential_t | ) |
int trash_filter_in_use | ( | filter_t | ) |
char* trash_filter_name | ( | filter_t | ) |
char* trash_filter_uuid | ( | filter_t | ) |
int trash_filter_writable | ( | filter_t | ) |
int trash_group_in_use | ( | group_t | ) |
int trash_group_writable | ( | group_t | ) |
int trash_id_exists | ( | const char * | type, |
const char * | id | ||
) |
Test Whether a resource of the given type and ID exists in the trash.
[in] | type | Type. |
[in] | id | Unique ID. |
Definition at line 17780 of file manage_sql.c.
References sql_int().
int trash_permission_in_use | ( | permission_t | ) |
int trash_permission_writable | ( | permission_t | ) |
int trash_port_list_in_use | ( | port_list_t | ) |
int trash_port_list_readable_uuid | ( | const gchar * | ) |
int trash_port_list_writable | ( | port_list_t | ) |
int trash_report_format_global | ( | report_format_t | ) |
int trash_report_format_in_use | ( | report_format_t | ) |
int trash_report_format_writable | ( | report_format_t | ) |
int trash_role_in_use | ( | role_t | ) |
int trash_role_writable | ( | role_t | ) |
int trash_scanner_in_use | ( | scanner_t | ) |
int trash_scanner_readable | ( | scanner_t | ) |
int trash_scanner_writable | ( | scanner_t | ) |
int trash_schedule_in_use | ( | schedule_t | ) |
int trash_schedule_readable | ( | schedule_t | ) |
int trash_schedule_writable | ( | schedule_t | ) |
int trash_tag_in_use | ( | tag_t | ) |
int trash_tag_writable | ( | tag_t | ) |
credential_t trash_target_credential | ( | target_t | , |
const char * | |||
) |
int trash_target_credential_location | ( | target_t | , |
const char * | |||
) |
char* trash_target_exclude_hosts | ( | target_t | ) |
char* trash_target_hosts | ( | target_t | ) |
int trash_target_in_use | ( | target_t | ) |
int trash_target_login_port | ( | target_t | , |
const char * | |||
) |
char* trash_target_name | ( | target_t | ) |
int trash_target_readable | ( | target_t | ) |
char* trash_target_uuid | ( | target_t | ) |
int trash_target_writable | ( | target_t | ) |
int trash_task_in_use | ( | task_t | task | ) |
Return whether a trashcan task is referenced by a task.
[in] | task | Task. |
Definition at line 14225 of file manage_sql.c.
References task_in_use().
int trash_task_writable | ( | task_t | task | ) |
Return whether a trashcan task is writable.
[in] | task | Task. |
Definition at line 14268 of file manage_sql.c.
References sql_int().
int trash_user_in_use | ( | user_t | ) |
int trash_user_writable | ( | user_t | ) |
void trim_partial_report | ( | report_t | ) |
gchar* truncate_certificate | ( | const gchar * | certificate | ) |
Truncate a certificate, removing extra data.
[in] | certificate | The certificate. |
Definition at line 174 of file manage.c.
Referenced by get_certificate_info().
gchar* truncate_private_key | ( | const gchar * | private_key | ) |
char* type_columns | ( | const char * | , |
int | |||
) |
const char** type_filter_columns | ( | const char * | , |
int | |||
) |
int type_is_scap | ( | const char * | type | ) |
const char* type_name | ( | const char * | type | ) |
const char* type_name_plural | ( | const char * | type | ) |
gchar* type_opts_table | ( | const char * | , |
int | , | ||
int | , | ||
int | |||
) |
gchar* type_table | ( | const char * | , |
int | |||
) |
char* type_trash_columns | ( | const char * | , |
int | |||
) |
void update_duration_schedule_periods | ( | task_t | ) |
int user_can_everything | ( | const char * | ) |
int user_can_super_everyone | ( | const char * | ) |
int user_count | ( | const get_data_t * | ) |
const char* user_group_iterator_name | ( | iterator_t * | ) |
int user_group_iterator_readable | ( | iterator_t * | ) |
const char* user_group_iterator_uuid | ( | iterator_t * | ) |
int user_has_super | ( | const char * | , |
user_t | |||
) |
gchar* user_hosts | ( | const char * | ) |
int user_hosts_allow | ( | const char * | ) |
gchar* user_ifaces | ( | const char * | ) |
int user_ifaces_allow | ( | const char * | ) |
int user_in_use | ( | user_t | ) |
int user_is_admin | ( | const char * | ) |
int user_is_observer | ( | const char * | ) |
int user_is_super_admin | ( | const char * | uuid | ) |
Check whether a user is a Super Admin.
[in] | uuid | Uuid of user. |
Definition at line 342 of file manage_acl.c.
References ROLE_UUID_SUPER_ADMIN, sql_int(), and sql_quote().
int user_is_user | ( | const char * | ) |
const char* user_iterator_hosts | ( | iterator_t * | ) |
int user_iterator_hosts_allow | ( | iterator_t * | ) |
const char* user_iterator_ifaces | ( | iterator_t * | ) |
int user_iterator_ifaces_allow | ( | iterator_t * | ) |
const char* user_iterator_method | ( | iterator_t * | ) |
const char* user_iterator_role | ( | iterator_t * | ) |
int user_may | ( | const char * | ) |
gchar* user_name | ( | const char * | ) |
int user_resources_in_use | ( | user_t | , |
const char * | , | ||
int(*)(resource_t) | , | ||
const char * | , | ||
int(*)(resource_t) | |||
) |
const char* user_role_iterator_name | ( | iterator_t * | ) |
int user_role_iterator_readable | ( | iterator_t * | ) |
const char* user_role_iterator_uuid | ( | iterator_t * | ) |
char* user_uuid | ( | user_t | ) |
Referenced by check_generate_scripts(), and set_scheduled_user_uuid().
int user_writable | ( | user_t | ) |
int valid_db_resource_type | ( | const char * | type | ) |
Check whether a resource type table name is valid.
[in] | type | Type of resource. |
Definition at line 504 of file manage_utils.c.
Referenced by resource_exists(), resource_name(), resource_uuid(), and sql_resource_exists().
int verify_agent | ( | const char * | ) |
int verify_report_format | ( | const char * | ) |
int verify_scanner | ( | const char * | , |
char ** | |||
) |
gchar* xsl_transform | ( | gchar * | stylesheet, |
gchar * | xmlfile, | ||
gchar ** | param_names, | ||
gchar ** | param_values | ||
) |
Run xsltproc in an external process.
[in] | stylesheet | XSL stylesheet to use. |
[in] | xmlfile | XML file to process. |
[in] | param_names | NULL terminated array of stringparam names (can be NULL). |
[in] | param_values | NULL terminated array of stringparam values (can be NULL). |
Definition at line 7535 of file manage.c.
credentials_t current_credentials |
Current credentials during any OMP command.
Definition at line 717 of file manage.c.
Referenced by acl_user_has_access_uuid(), acl_user_has_super_on(), acl_user_has_super_on_resource(), acl_user_is_owner(), acl_user_may(), acl_user_owns(), acl_user_owns_name(), acl_user_owns_trash_uuid(), acl_user_owns_uuid(), acl_users_with_access_sql(), acl_where_owned(), acl_where_owned_for_get(), copy_alert(), copy_resource(), manage_scanner_set(), manage_schedule(), migrate_168_to_169(), set_task_groups(), set_task_observers(), stop_active_tasks(), task_severity_double(), and user_ensure_in_db().
report_t current_report |
The report of the current task.
Definition at line 1003 of file manage.c.
Referenced by manage_reset_currents(), update_end_times(), and update_slave_progress().
task_t current_scanner_task |
The task currently running on the scanner.
Definition at line 998 of file manage.c.
Referenced by manage_check_current_task(), manage_cleanup_process_error(), manage_reset_currents(), stop_task_internal(), and update_end_times().
command_t omp_commands[] |
The OMP command list.
Definition at line 422 of file manage_sql.c.
Referenced by valid_omp_command().
short scanner_active |