OpenVAS Manager
7.0.3~git
|
Go to the source code of this file.
Macros | |
#define | CONFIG_UUID_FULL_AND_FAST "daba56c8-73ec-11df-a475-002264764cea" |
UUID of 'Full and fast' config. More... | |
#define | CONFIG_UUID_FULL_AND_FAST_ULTIMATE "698f691e-7489-11df-9d8c-002264764cea" |
UUID of 'Full and fast ultimate' config. More... | |
#define | CONFIG_UUID_FULL_AND_VERY_DEEP "708f25c4-7489-11df-8094-002264764cea" |
UUID of 'Full and very deep' config. More... | |
#define | CONFIG_UUID_FULL_AND_VERY_DEEP_ULTIMATE "74db13d6-7489-11df-91b9-002264764cea" |
UUID of 'Full and very deep ultimate' config. More... | |
#define | CONFIG_UUID_EMPTY "085569ce-73ed-11df-83c3-002264764cea" |
UUID of 'Empty' config. More... | |
#define | CONFIG_UUID_DISCOVERY "8715c877-47a0-438d-98a3-27c7a6ab2196" |
UUID of 'Discovery' config. More... | |
#define | CONFIG_UUID_HOST_DISCOVERY "2d3f051c-55ba-11e3-bf43-406186ea4fc5" |
UUID of 'Host Discovery' config. More... | |
#define | CONFIG_UUID_SYSTEM_DISCOVERY "bbca7412-a950-11e3-9109-406186ea4fc5" |
UUID of 'System Discovery' config. More... | |
#define | LOCATION_TABLE 0 |
Location of a constituent of a trashcan resource. More... | |
#define | LOCATION_TRASH 1 |
Location of a constituent of a trashcan resource. More... | |
#define | MANAGE_NVT_SELECTOR_UUID_ALL "54b45713-d4f4-4435-b20d-304c175ed8c5" |
UUID of 'All' NVT selector. More... | |
#define | MANAGE_NVT_SELECTOR_UUID_DISCOVERY "0d9a2738-8fe2-4e22-8f26-bb886179e759" |
UUID of 'Discovery' NVT selector. More... | |
#define | MANAGE_NVT_SELECTOR_UUID_HOST_DISCOVERY "f5f80744-55c7-11e3-8dc6-406186ea4fc5" |
UUID of 'Host Discovery' NVT selector. More... | |
#define | MANAGE_NVT_SELECTOR_UUID_SYSTEM_DISCOVERY "07045d1c-a951-11e3-8da7-406186ea4fc5" |
UUID of 'System Discovery' NVT selector. More... | |
#define | PERMISSION_UUID_ADMIN_EVERYTHING "b3b56a8c-c2fd-11e2-a135-406186ea4fc5" |
Predefined role UUID. More... | |
#define | PERMISSION_UUID_SUPER_ADMIN_EVERYTHING "a9801074-6fe2-11e4-9d81-406186ea4fc5" |
Predefined role UUID. More... | |
#define | PORT_LIST_UUID_DEFAULT "c7e03b6c-3bbe-11e1-a057-406186ea4fc5" |
UUID of 'OpenVAS Default' port list. More... | |
#define | PORT_LIST_UUID_ALL_TCP "fd591a34-56fd-11e1-9f27-406186ea4fc5" |
UUID of 'All TCP' port list. More... | |
#define | PORT_LIST_UUID_ALL_TCP_NMAP_5_51_TOP_100 "730ef368-57e2-11e1-a90f-406186ea4fc5" |
UUID of 'All TCP and Nmap 5.51 Top 100 UDP' port list. More... | |
#define | PORT_LIST_UUID_ALL_TCP_NMAP_5_51_TOP_1000 "9ddce1ae-57e7-11e1-b13c-406186ea4fc5" |
UUID of 'All TCP and Nmap 5.51 Top 1000 UDP' port list. More... | |
#define | PORT_LIST_UUID_ALL_PRIV_TCP "492b72f4-56fe-11e1-98a7-406186ea4fc5" |
UUID of 'All privileged TCP' port list. More... | |
#define | PORT_LIST_UUID_ALL_PRIV_TCP_UDP "5f2029f6-56fe-11e1-bb94-406186ea4fc5" |
UUID of 'All privileged TCP and UDP' port list. More... | |
#define | PORT_LIST_UUID_ALL_IANA_TCP_2012 "33d0cd82-57c6-11e1-8ed1-406186ea4fc5" |
UUID of 'All privileged TCP and UDP' port list. More... | |
#define | PORT_LIST_UUID_ALL_IANA_TCP_UDP_2012 "4a4717fe-57d2-11e1-9a26-406186ea4fc5" |
UUID of 'All privileged TCP and UDP' port list. More... | |
#define | PORT_LIST_UUID_NMAP_5_51_TOP_2000_TOP_100 "ab33f6b0-57f8-11e1-96f5-406186ea4fc5" |
UUID of 'Nmap 5.51 top 2000 TCP top 100 UDP' port list. More... | |
#define | ROLE_UUID_ADMIN "7a8cb5b4-b74d-11e2-8187-406186ea4fc5" |
Predefined role UUID. More... | |
#define | ROLE_UUID_GUEST "cc9cac5e-39a3-11e4-abae-406186ea4fc5" |
Predefined role UUID. More... | |
#define | ROLE_UUID_INFO "5f8fd16c-c550-11e3-b6ab-406186ea4fc5" |
Predefined role UUID. More... | |
#define | ROLE_UUID_MONITOR "12cdb536-480b-11e4-8552-406186ea4fc5" |
Predefined role UUID. More... | |
#define | ROLE_UUID_USER "8d453140-b74d-11e2-b0be-406186ea4fc5" |
Predefined role UUID. More... | |
#define | ROLE_UUID_SUPER_ADMIN "9c5a6ec6-6fe2-11e4-8cb6-406186ea4fc5" |
Predefined role UUID. More... | |
#define | ROLE_UUID_OBSERVER "87a7ebce-b74d-11e2-a81f-406186ea4fc5" |
Predefined role UUID. More... | |
#define | SCANNER_UUID_DEFAULT "08b69003-5fc2-4037-a479-93b440211c73" |
UUID of 'OpenVAS Default' scanner. More... | |
#define | SCANNER_UUID_CVE "6acd0832-df90-11e4-b9d5-28d24461215b" |
UUID of 'CVE' scanner. More... | |
#define | SETTING_UUID_ROWS_PER_PAGE "5f5a8712-8017-11e1-8556-406186ea4fc5" |
UUID of 'Rows Per Page' setting. More... | |
#define | SETTING_UUID_MAX_ROWS_PER_PAGE "76374a7a-0569-11e6-b6da-28d24461215b" |
UUID of 'Max Rows Per Page' setting. More... | |
#define | SETTING_UUID_DEFAULT_CA_CERT "9ac801ea-39f8-11e6-bbaa-28d24461215b" |
UUID of 'Default CA Cert' setting. More... | |
#define | TRUST_ERROR 0 |
Trust constant for error. More... | |
#define | TRUST_YES 1 |
Trust constant for yes. More... | |
#define | TRUST_NO 2 |
Trust constant for no. More... | |
#define | TRUST_UNKNOWN 3 |
Trust constant for unknown. More... | |
#define | TIMEVAL_SUBTRACT_MS(a, b) |
Number of milliseconds between timevals a and b (performs a-b). More... | |
Typedefs | |
typedef long long int | rowid_t |
Functions | |
void | array_add_new_string (array_t *, const gchar *) |
Ensure a string is in an array. More... | |
int | manage_db_empty () |
Check whether database is empty. More... | |
gboolean | host_nthlast_report_host (const char *, report_host_t *, int) |
Get N'th last report_host given a host. More... | |
char * | report_host_ip (const char *) |
Get the IP of a host, using the 'hostname' report host details. More... | |
gchar * | tag_value (const gchar *, const gchar *) |
Extract a tag from an OTP tag list. More... | |
void | trim_report (report_t) |
Prepare a partial report for restarting the scan from the beginning. More... | |
int | delete_report_internal (report_t) |
Delete a report. More... | |
int | set_report_scan_run_status (report_t, task_status_t) |
Return the run status of the scan associated with a report. More... | |
int | set_report_slave_progress (report_t, int) |
Set slave progress of a report. More... | |
int | update_from_slave (task_t, entity_t, entity_t *, int *) |
Update the local task from the slave task. More... | |
void | set_report_slave_task_uuid (report_t, const char *) |
Set the UUID of the slave task, on the local task. More... | |
int | set_task_requested (task_t, task_status_t *) |
Atomically set the run state of a task to requested. More... | |
void | init_task_file_iterator (iterator_t *, task_t, const char *) |
Initialise a task file iterator. More... | |
const char * | task_file_iterator_name (iterator_t *) |
const char * | task_file_iterator_content (iterator_t *) |
void | set_task_schedule_next_time (task_t, time_t) |
Set the next time a scheduled task will be due. More... | |
void | set_task_schedule_next_time_uuid (const gchar *, time_t) |
Set the next time a scheduled task will be due. More... | |
void | init_otp_pref_iterator (iterator_t *, config_t, const char *) |
Initialise an "OTP" preference iterator. More... | |
const char * | otp_pref_iterator_name (iterator_t *) |
const char * | otp_pref_iterator_value (iterator_t *) |
port_list_t | target_port_list (target_t) |
Return the port list associated with a target, if any. More... | |
char * | target_port_range (target_t) |
Return the port range of a target, in OTP format. More... | |
credential_t | target_ssh_credential (target_t) |
Return the SSH credential associated with a target, if any. More... | |
credential_t | target_smb_credential (target_t) |
Return the SMB credential associated with a target, if any. More... | |
credential_t | target_esxi_credential (target_t) |
Return the ESXi credential associated with a target, if any. More... | |
int | create_current_report (task_t, char **, task_status_t) |
Create the current report for a task. More... | |
char * | alert_data (alert_t, const char *, const char *) |
Return data associated with an alert. More... | |
int | init_task_schedule_iterator (iterator_t *) |
Initialise a task schedule iterator. More... | |
void | cleanup_task_schedule_iterator (iterator_t *) |
Cleanup a task schedule iterator. More... | |
task_t | task_schedule_iterator_task (iterator_t *) |
Get the task from a task schedule iterator. More... | |
const char * | task_schedule_iterator_task_uuid (iterator_t *) |
schedule_t | task_schedule_iterator_schedule (iterator_t *) |
Get the schedule from a task schedule iterator. More... | |
time_t | task_schedule_iterator_next_time (iterator_t *) |
Get the next time from a task schedule iterator. More... | |
time_t | task_schedule_iterator_period (iterator_t *) |
Get the period from a task schedule iterator. More... | |
time_t | task_schedule_iterator_period_months (iterator_t *) |
Get the period months from a task schedule iterator. More... | |
time_t | task_schedule_iterator_duration (iterator_t *) |
Get the duration from a task schedule iterator. More... | |
gboolean | task_schedule_iterator_timed_out (iterator_t *) |
Get if schedule of task in iterator is timed out. More... | |
gboolean | task_schedule_iterator_start_due (iterator_t *) |
Get the start due state from a task schedule iterator. More... | |
gboolean | task_schedule_iterator_stop_due (iterator_t *) |
Get the stop due state from a task schedule iterator. More... | |
time_t | task_schedule_iterator_first_time (iterator_t *) |
Get the first time from a task schedule iterator. More... | |
const char * | task_schedule_iterator_owner_uuid (iterator_t *) |
const char * | task_schedule_iterator_owner_name (iterator_t *) |
const char * | task_schedule_iterator_timezone (iterator_t *) |
time_t | task_schedule_iterator_initial_offset (iterator_t *) |
Get the initial offset from a task schedule iterator. More... | |
int | set_task_schedule_uuid (const gchar *, schedule_t, int) |
Set the schedule of a task. More... | |
void | reinit_manage_process () |
Reinitialize the manage library for a process. More... | |
int | manage_update_nvti_cache () |
Update the memory cache of NVTs, if this has been requested. More... | |
int | manage_report_host_details (report_t, const char *, entity_t) |
Add host details to a report host. More... | |
const char * | run_status_name_internal (task_status_t) |
Get the unique name of a run status. More... | |
gchar * | get_ovaldef_short_filename (char *) |
Get the short file name for an OVALDEF. More... | |
void | update_config_cache_init (const char *) |
Update count and growing info in config, without checking user. More... | |
alive_test_t | target_alive_tests (target_t) |
Return a target's alive tests. More... | |
void | manage_session_init (const char *) |
Setup session. More... | |
int | valid_omp_command (const char *) |
Check whether a command name is valid. More... | |
void | check_generate_scripts () |
Ensure the generate scripts are all executable. More... | |
void | auto_delete_reports () |
Auto delete reports. More... | |
int | parse_iso_time (const char *) |
Convert an ISO time into seconds since epoch. More... | |
int | days_from_now (time_t *epoch_time) |
Calculate difference between now and epoch_time in days. More... | |
void | set_report_scheduled (report_t) |
Set a report's scheduled flag. More... | |
gchar * | resource_uuid (const gchar *, resource_t) |
Get the UUID of a resource. More... | |
gboolean | find_resource_with_permission (const char *, const char *, resource_t *, const char *, int) |
Find a resource given a UUID and a permission. More... | |
char * | task_definitions_file (task_t) |
Get definitions file from a task's config. More... | |
void | parse_osp_report (task_t, report_t, const char *) |
Parse an OSP report. More... | |
void | reschedule_task (const gchar *) |
Set a task's schedule so that it runs again next scheduling round. More... | |
void | insert_port_range (port_list_t, port_protocol_t, int, int) |
Create a port range. More... | |
Variables | |
gchar * | task_db_name |
Name of the database file. More... | |
#define CONFIG_UUID_DISCOVERY "8715c877-47a0-438d-98a3-27c7a6ab2196" |
UUID of 'Discovery' config.
Definition at line 66 of file manage_sql.h.
Referenced by config_in_use(), delete_config(), and migrate_78_to_79().
#define CONFIG_UUID_EMPTY "085569ce-73ed-11df-83c3-002264764cea" |
UUID of 'Empty' config.
Definition at line 61 of file manage_sql.h.
Referenced by config_in_use(), delete_config(), and migrate_18_to_19().
#define CONFIG_UUID_FULL_AND_FAST "daba56c8-73ec-11df-a475-002264764cea" |
UUID of 'Full and fast' config.
Definition at line 39 of file manage_sql.h.
Referenced by config_in_use(), delete_config(), and migrate_18_to_19().
#define CONFIG_UUID_FULL_AND_FAST_ULTIMATE "698f691e-7489-11df-9d8c-002264764cea" |
UUID of 'Full and fast ultimate' config.
Definition at line 44 of file manage_sql.h.
Referenced by config_in_use(), delete_config(), and migrate_18_to_19().
#define CONFIG_UUID_FULL_AND_VERY_DEEP "708f25c4-7489-11df-8094-002264764cea" |
UUID of 'Full and very deep' config.
Definition at line 50 of file manage_sql.h.
Referenced by config_in_use(), delete_config(), and migrate_18_to_19().
#define CONFIG_UUID_FULL_AND_VERY_DEEP_ULTIMATE "74db13d6-7489-11df-91b9-002264764cea" |
UUID of 'Full and very deep ultimate' config.
Definition at line 55 of file manage_sql.h.
Referenced by config_in_use(), delete_config(), and migrate_18_to_19().
#define CONFIG_UUID_HOST_DISCOVERY "2d3f051c-55ba-11e3-bf43-406186ea4fc5" |
UUID of 'Host Discovery' config.
Definition at line 71 of file manage_sql.h.
Referenced by config_in_use(), delete_config(), and migrate_111_to_112().
#define CONFIG_UUID_SYSTEM_DISCOVERY "bbca7412-a950-11e3-9109-406186ea4fc5" |
UUID of 'System Discovery' config.
Definition at line 76 of file manage_sql.h.
Referenced by config_in_use(), and delete_config().
#define LOCATION_TABLE 0 |
Location of a constituent of a trashcan resource.
Definition at line 81 of file manage_sql.h.
Referenced by acl_role_can_super_everyone(), acl_user_can_everything(), acl_user_can_super_everyone(), acl_user_has_access_uuid(), acl_user_has_super(), acl_where_owned_user(), add_role_permission(), add_task_alert(), alert_iterator_filter_name(), alert_iterator_filter_uuid(), cleanup_tables(), config_in_use(), create_tag(), delete_report_internal(), delete_task(), init_task_group_iterator(), init_task_role_iterator(), init_task_user_iterator(), manage_create_sql_functions(), manage_resource_name(), migrate_116_to_117(), migrate_117_to_118(), migrate_137_to_138(), migrate_148_to_149(), migrate_156_to_157(), migrate_158_to_159(), migrate_160_to_161(), migrate_165_to_166(), migrate_177_to_178(), migrate_179_to_180(), migrate_179_to_180_update_ref(), migrate_41_to_42(), migrate_55_to_56(), migrate_74_to_75(), modify_tag(), permissions_set_locations(), permissions_set_subjects(), resource_exists(), resource_name(), set_task_alerts(), set_task_groups(), tags_set_locations(), tags_set_orphans(), and target_in_use().
#define LOCATION_TRASH 1 |
Location of a constituent of a trashcan resource.
Definition at line 86 of file manage_sql.h.
Referenced by acl_where_owned_user(), alert_iterator_filter_readable(), alert_iterator_filter_trash(), cleanup_tables(), create_tag(), delete_task(), manage_create_sql_functions(), manage_empty_trashcan(), manage_trash_resource_name(), migrate_116_to_117(), migrate_117_to_118(), migrate_119_to_120(), migrate_156_to_157(), migrate_158_to_159(), migrate_160_to_161(), migrate_165_to_166(), migrate_179_to_180(), migrate_179_to_180_update_ref(), migrate_55_to_56(), modify_tag(), permissions_set_locations(), permissions_set_subjects(), request_delete_task_uuid(), tag_iterator_resource_readable(), tags_set_locations(), task_config_in_trash(), task_scanner_in_trash(), task_schedule_in_trash(), task_target_in_trash(), trash_alert_in_use(), trash_config_in_use(), trash_credential_in_use(), trash_filter_in_use(), trash_port_list_in_use(), trash_scanner_in_use(), trash_schedule_in_use(), and trash_target_in_use().
#define MANAGE_NVT_SELECTOR_UUID_ALL "54b45713-d4f4-4435-b20d-304c175ed8c5" |
UUID of 'All' NVT selector.
Definition at line 91 of file manage_sql.h.
Referenced by migrate_12_to_13(), and migrate_17_to_18().
#define MANAGE_NVT_SELECTOR_UUID_DISCOVERY "0d9a2738-8fe2-4e22-8f26-bb886179e759" |
UUID of 'Discovery' NVT selector.
Definition at line 96 of file manage_sql.h.
Referenced by migrate_115_to_116(), and migrate_78_to_79().
#define MANAGE_NVT_SELECTOR_UUID_HOST_DISCOVERY "f5f80744-55c7-11e3-8dc6-406186ea4fc5" |
UUID of 'Host Discovery' NVT selector.
Definition at line 101 of file manage_sql.h.
#define MANAGE_NVT_SELECTOR_UUID_SYSTEM_DISCOVERY "07045d1c-a951-11e3-8da7-406186ea4fc5" |
UUID of 'System Discovery' NVT selector.
Definition at line 107 of file manage_sql.h.
#define PERMISSION_UUID_ADMIN_EVERYTHING "b3b56a8c-c2fd-11e2-a135-406186ea4fc5" |
Predefined role UUID.
Definition at line 113 of file manage_sql.h.
Referenced by delete_permission(), permission_is_admin(), and permission_is_predefined().
#define PERMISSION_UUID_SUPER_ADMIN_EVERYTHING "a9801074-6fe2-11e4-9d81-406186ea4fc5" |
Predefined role UUID.
Definition at line 118 of file manage_sql.h.
#define PORT_LIST_UUID_ALL_IANA_TCP_2012 "33d0cd82-57c6-11e1-8ed1-406186ea4fc5" |
UUID of 'All privileged TCP and UDP' port list.
Definition at line 153 of file manage_sql.h.
Referenced by delete_port_range(), and port_list_is_predefined().
#define PORT_LIST_UUID_ALL_IANA_TCP_UDP_2012 "4a4717fe-57d2-11e1-9a26-406186ea4fc5" |
UUID of 'All privileged TCP and UDP' port list.
Definition at line 158 of file manage_sql.h.
Referenced by delete_port_range(), and port_list_is_predefined().
#define PORT_LIST_UUID_ALL_PRIV_TCP "492b72f4-56fe-11e1-98a7-406186ea4fc5" |
UUID of 'All privileged TCP' port list.
Definition at line 143 of file manage_sql.h.
Referenced by delete_port_range(), and port_list_is_predefined().
#define PORT_LIST_UUID_ALL_PRIV_TCP_UDP "5f2029f6-56fe-11e1-bb94-406186ea4fc5" |
UUID of 'All privileged TCP and UDP' port list.
Definition at line 148 of file manage_sql.h.
Referenced by delete_port_range(), and port_list_is_predefined().
#define PORT_LIST_UUID_ALL_TCP "fd591a34-56fd-11e1-9f27-406186ea4fc5" |
UUID of 'All TCP' port list.
Definition at line 128 of file manage_sql.h.
Referenced by port_list_is_predefined().
#define PORT_LIST_UUID_ALL_TCP_NMAP_5_51_TOP_100 "730ef368-57e2-11e1-a90f-406186ea4fc5" |
UUID of 'All TCP and Nmap 5.51 Top 100 UDP' port list.
Definition at line 133 of file manage_sql.h.
Referenced by delete_port_range(), and port_list_is_predefined().
#define PORT_LIST_UUID_ALL_TCP_NMAP_5_51_TOP_1000 "9ddce1ae-57e7-11e1-b13c-406186ea4fc5" |
UUID of 'All TCP and Nmap 5.51 Top 1000 UDP' port list.
Definition at line 138 of file manage_sql.h.
Referenced by delete_port_range(), and port_list_is_predefined().
#define PORT_LIST_UUID_DEFAULT "c7e03b6c-3bbe-11e1-a057-406186ea4fc5" |
UUID of 'OpenVAS Default' port list.
Definition at line 123 of file manage_sql.h.
Referenced by create_port_list_unique(), delete_port_range(), migrate_55_to_56(), migrate_55_to_56_ensure_predefined_port_lists_exist(), and port_list_is_predefined().
#define PORT_LIST_UUID_NMAP_5_51_TOP_2000_TOP_100 "ab33f6b0-57f8-11e1-96f5-406186ea4fc5" |
UUID of 'Nmap 5.51 top 2000 TCP top 100 UDP' port list.
Definition at line 163 of file manage_sql.h.
Referenced by delete_port_range(), and port_list_is_predefined().
#define ROLE_UUID_ADMIN "7a8cb5b4-b74d-11e2-8187-406186ea4fc5" |
Predefined role UUID.
Definition at line 168 of file manage_sql.h.
Referenced by acl_user_is_admin(), migrate_150_to_151(), migrate_151_to_152(), migrate_152_to_153(), migrate_80_to_81(), permission_is_predefined(), role_is_predefined(), and role_is_predefined_id().
#define ROLE_UUID_GUEST "cc9cac5e-39a3-11e4-abae-406186ea4fc5" |
Predefined role UUID.
Definition at line 173 of file manage_sql.h.
Referenced by migrate_137_to_138(), permission_is_predefined(), role_is_predefined(), and role_is_predefined_id().
#define ROLE_UUID_INFO "5f8fd16c-c550-11e3-b6ab-406186ea4fc5" |
Predefined role UUID.
Definition at line 178 of file manage_sql.h.
Referenced by migrate_121_to_122(), migrate_137_to_138(), permission_is_predefined(), role_is_predefined(), and role_is_predefined_id().
#define ROLE_UUID_MONITOR "12cdb536-480b-11e4-8552-406186ea4fc5" |
Predefined role UUID.
Definition at line 183 of file manage_sql.h.
Referenced by permission_is_predefined(), role_is_predefined(), and role_is_predefined_id().
#define ROLE_UUID_OBSERVER "87a7ebce-b74d-11e2-a81f-406186ea4fc5" |
Predefined role UUID.
Definition at line 198 of file manage_sql.h.
Referenced by acl_user_is_observer(), migrate_120_to_121(), migrate_136_to_137(), migrate_137_to_138(), migrate_150_to_151(), migrate_80_to_81(), permission_is_predefined(), role_is_predefined(), and role_is_predefined_id().
#define ROLE_UUID_SUPER_ADMIN "9c5a6ec6-6fe2-11e4-8cb6-406186ea4fc5" |
Predefined role UUID.
Definition at line 193 of file manage_sql.h.
Referenced by delete_user(), migrate_150_to_151(), migrate_151_to_152(), migrate_152_to_153(), permission_is_predefined(), role_is_predefined(), role_is_predefined_id(), and user_is_super_admin().
#define ROLE_UUID_USER "8d453140-b74d-11e2-b0be-406186ea4fc5" |
Predefined role UUID.
Definition at line 188 of file manage_sql.h.
Referenced by acl_user_is_user(), migrate_121_to_122(), migrate_136_to_137(), migrate_137_to_138(), migrate_150_to_151(), migrate_151_to_152(), migrate_152_to_153(), migrate_80_to_81(), permission_is_predefined(), role_is_predefined(), and role_is_predefined_id().
#define SCANNER_UUID_CVE "6acd0832-df90-11e4-b9d5-28d24461215b" |
UUID of 'CVE' scanner.
Definition at line 208 of file manage_sql.h.
Referenced by copy_scanner(), delete_scanner(), and manage_delete_scanner().
#define SCANNER_UUID_DEFAULT "08b69003-5fc2-4037-a479-93b440211c73" |
UUID of 'OpenVAS Default' scanner.
Definition at line 203 of file manage_sql.h.
Referenced by delete_scanner(), manage_delete_scanner(), manage_scanner_set_default(), migrate_128_to_129(), migrate_175_to_176(), migrate_177_to_178(), move_task(), and scanner_uuid_default().
#define SETTING_UUID_DEFAULT_CA_CERT "9ac801ea-39f8-11e6-bbaa-28d24461215b" |
UUID of 'Default CA Cert' setting.
Definition at line 223 of file manage_sql.h.
Referenced by manage_default_ca_cert(), manage_modify_setting(), and setting_is_default_ca_cert().
#define SETTING_UUID_MAX_ROWS_PER_PAGE "76374a7a-0569-11e6-b6da-28d24461215b" |
UUID of 'Max Rows Per Page' setting.
Definition at line 218 of file manage_sql.h.
Referenced by manage_max_rows(), and manage_modify_setting().
#define SETTING_UUID_ROWS_PER_PAGE "5f5a8712-8017-11e1-8556-406186ea4fc5" |
UUID of 'Rows Per Page' setting.
Definition at line 213 of file manage_sql.h.
Referenced by manage_filter_controls(), and manage_report_filter_controls().
#define TIMEVAL_SUBTRACT_MS | ( | a, | |
b | |||
) |
Number of milliseconds between timevals a and b (performs a-b).
Definition at line 248 of file manage_sql.h.
#define TRUST_ERROR 0 |
Trust constant for error.
Definition at line 228 of file manage_sql.h.
#define TRUST_NO 2 |
Trust constant for no.
Definition at line 238 of file manage_sql.h.
#define TRUST_UNKNOWN 3 |
Trust constant for unknown.
Definition at line 243 of file manage_sql.h.
Referenced by create_agent(), create_report_format(), migrate_19_to_20(), migrate_22_to_23(), and verify_agent().
#define TRUST_YES 1 |
typedef long long int rowid_t |
Definition at line 259 of file manage_sql.h.
char* alert_data | ( | alert_t | alert, |
const char * | type, | ||
const char * | name | ||
) |
Return data associated with an alert.
[in] | alert | Alert. |
[in] | type | Type of data: "condition", "event" or "method". |
[in] | name | Name of the data. |
Definition at line 8810 of file manage_sql.c.
References sql_quote(), and sql_string().
Referenced by alert_condition_description(), and migrate_165_to_166().
void array_add_new_string | ( | array_t * | array, |
const gchar * | string | ||
) |
Ensure a string is in an array.
[in] | array | Array. |
[in] | string | String. Copied into array. |
Definition at line 710 of file manage_sql.c.
Referenced by manage_report_host_details().
void auto_delete_reports | ( | ) |
Auto delete reports.
Definition at line 19380 of file manage_sql.c.
References AUTO_DELETE_KEEP_MAX, cleanup_iterator(), delete_report_internal(), init_iterator(), iterator_int64(), iterator_string(), next(), sql_begin_exclusive_giveup(), sql_commit(), sql_rollback(), and sql_select_limit().
Referenced by manage_schedule().
void check_generate_scripts | ( | ) |
Ensure the generate scripts are all executable.
Used by a migrator.
Definition at line 16716 of file manage_sql.c.
References cleanup_iterator(), init_iterator(), iterator_int64(), iterator_string(), next(), report_format_uuid(), and user_uuid().
Referenced by migrate_147_to_148().
void cleanup_task_schedule_iterator | ( | iterator_t * | iterator | ) |
Cleanup a task schedule iterator.
[in] | iterator | Iterator. |
Definition at line 49341 of file manage_sql.c.
References cleanup_iterator(), and sql_commit().
Referenced by manage_schedule().
int create_current_report | ( | task_t | task, |
char ** | report_id, | ||
task_status_t | status | ||
) |
Create the current report for a task.
[in] | task | The task. |
[out] | report_id | Report ID. |
[in] | status | Run status of scan associated with report. |
Definition at line 21002 of file manage_sql.c.
References current_report, make_report(), and set_report_scheduled().
int days_from_now | ( | time_t * | epoch_time | ) |
Calculate difference between now and epoch_time in days.
[in] | epoch_time | Time in seconds from epoch. |
Definition at line 1072 of file manage_sql.c.
int delete_report_internal | ( | report_t | report | ) |
Delete a report.
It's up to the caller to provide the transaction.
[in] | report | Report. |
Definition at line 25198 of file manage_sql.c.
References delete_slave_task(), LOCATION_TABLE, permissions_set_orphans(), report_scan_run_status(), report_slave_host(), report_slave_port_int(), report_slave_task_uuid(), report_task(), scanner_login(), scanner_password(), slave_task_uuid, sql(), sql_int(), sql_int64(), tags_set_orphans(), task_scanner(), TASK_STATUS_DELETE_REQUESTED, TASK_STATUS_DELETE_ULTIMATE_REQUESTED, TASK_STATUS_NEW, TASK_STATUS_REQUESTED, TASK_STATUS_RUNNING, TASK_STATUS_STOP_REQUESTED, TASK_STATUS_STOP_REQUESTED_GIVEUP, and TASK_STATUS_STOP_WAITING.
Referenced by auto_delete_reports(), delete_report(), and delete_reports().
gboolean find_resource_with_permission | ( | const char * | type, |
const char * | uuid, | ||
resource_t * | resource, | ||
const char * | permission, | ||
int | trash | ||
) |
Find a resource given a UUID and a permission.
[in] | type | Type of resource. |
[in] | uuid | UUID of resource. |
[out] | resource | Resource return, 0 if succesfully failed to find resource. |
[in] | permission | Permission. |
[in] | trash | Whether resource is in trashcan. |
Definition at line 4459 of file manage_sql.c.
References acl_user_has_access_uuid(), sql_int64(), sql_quote(), and valid_type().
Referenced by create_tag(), find_agent_with_permission(), find_alert_with_permission(), find_config_with_permission(), find_credential_with_permission(), find_filter_with_permission(), find_group_with_permission(), find_host_with_permission(), find_note_with_permission(), find_override_with_permission(), find_port_list_with_permission(), find_report_format_with_permission(), find_report_with_permission(), find_role_with_permission(), find_scanner_with_permission(), find_schedule_with_permission(), find_tag_with_permission(), find_target_with_permission(), find_task_with_permission(), find_trash_task_with_permission(), find_user_with_permission(), modify_tag(), permission_iterator_resource_readable(), permission_iterator_subject_readable(), and tag_iterator_resource_readable().
gchar* get_ovaldef_short_filename | ( | char * | item_id | ) |
Get the short file name for an OVALDEF.
[in] | item_id | Full OVAL identifier with file suffix. |
Definition at line 64305 of file manage_sql.c.
References sql_string().
gboolean host_nthlast_report_host | ( | const char * | host, |
report_host_t * | report_host, | ||
int | position | ||
) |
Get N'th last report_host given a host.
The last report_host is at position 1, the second last at position 2, and so on.
[in] | host | Host. |
[in] | report_host | Report host. |
[in] | position | Position from end. |
Definition at line 26519 of file manage_sql.c.
References current_credentials, sql_int64(), and sql_quote().
void init_otp_pref_iterator | ( | iterator_t * | iterator, |
config_t | config, | ||
const char * | section | ||
) |
Initialise an "OTP" preference iterator.
Assume the caller has permission to access the config.
This version substitutes the scanner preference when the NVT preference is missing.
[in] | iterator | Iterator. |
[in] | config | Config containing preferences. |
[in] | section | Preference section, NULL for general preferences. |
Definition at line 36649 of file manage_sql.c.
References init_iterator(), and sql_quote().
void init_task_file_iterator | ( | iterator_t * | iterator, |
task_t | task, | ||
const char * | file | ||
) |
Initialise a task file iterator.
[in] | iterator | Iterator. |
[in] | task | Task. |
[in] | file | File name, NULL for all files. |
Definition at line 32760 of file manage_sql.c.
References init_iterator(), sql(), and sql_nquote().
int init_task_schedule_iterator | ( | iterator_t * | iterator | ) |
Initialise a task schedule iterator.
Lock the database before initialising.
[in] | iterator | Iterator. |
Definition at line 49284 of file manage_sql.c.
References acl_where_owned_user(), init_iterator(), and sql_begin_exclusive_giveup().
Referenced by manage_schedule().
void insert_port_range | ( | port_list_t | port_list, |
port_protocol_t | type, | ||
int | start, | ||
int | end | ||
) |
Create a port range.
[in] | port_list | Port list to insert into. |
[in] | type | Protocol: PORT_PROTOCOL_UDP or PORT_PROTOCOL_TCP. |
[in] | start | Start of range. |
[in] | end | End of range. |
Definition at line 56393 of file manage_sql.c.
References sql().
int manage_db_empty | ( | ) |
Check whether database is empty.
Definition at line 78 of file manage_pg.c.
References sql_database(), and sql_int().
Referenced by manage_db_version().
int manage_report_host_details | ( | report_t | report, |
const char * | ip, | ||
entity_t | entity | ||
) |
Add host details to a report host.
[in] | report | UUID of resource. |
[in] | ip | Host. |
[in] | entity | XML entity containing details. |
Definition at line 60642 of file manage_sql.c.
References array_add_new_string(), insert_report_host_detail(), identifier_t::ip, identifier_t::name, report_uuid(), identifier_t::source_data, identifier_t::source_id, identifier_t::source_type, sql_int(), and identifier_t::value.
Referenced by manage_report_host_detail(), and update_end_times().
void manage_session_init | ( | const char * | uuid | ) |
Setup session.
[in] | uuid | User UUID. |
Definition at line 46 of file manage_pg.c.
References sql().
Referenced by acl_users_with_access_sql(), manage_schedule(), and report_cache_counts().
int manage_update_nvti_cache | ( | ) |
Update the memory cache of NVTs, if this has been requested.
Definition at line 14475 of file manage_sql.c.
References sql_begin_immediate_giveup(), sql_int(), and sql_schema().
Referenced by manage_schedule().
const char* otp_pref_iterator_name | ( | iterator_t * | ) |
const char* otp_pref_iterator_value | ( | iterator_t * | ) |
int parse_iso_time | ( | const char * | text_time | ) |
Convert an ISO time into seconds since epoch.
For backward compatibility, if the conversion fails try parse in ctime format.
[in] | text_time | Time as text in ISO format: 2011-11-03T09:23:28+02:00. |
Definition at line 875 of file manage_sql.c.
Referenced by manage_system_report(), set_scan_end_time(), set_scan_host_end_time(), set_scan_host_start_time(), set_scan_start_time(), set_task_end_time(), and set_task_start_time().
Parse an OSP report.
[in] | task | Task. |
[in] | report | Report. |
[in] | report_xml | Report XML. |
Definition at line 31533 of file manage_sql.c.
References result_buffer::host, insert_report_host_detail(), make_osp_result(), manage_report_host_add(), nvt_severity(), ovaldef_severity(), ovaldef_uuid(), result_buffer::port, QOD_DEFAULT, report_add_result(), set_scan_end_time_epoch(), set_scan_start_time_epoch(), result_buffer::severity, sql_begin_immediate(), sql_commit(), and task_definitions_file().
void reinit_manage_process | ( | ) |
Reinitialize the manage library for a process.
This is mandatory after a fork, to not carry open databases around (refer to database documentation).
Definition at line 14347 of file manage_sql.c.
References cleanup_manage_process(), init_manage_process(), and task_db_name.
Referenced by manage_schedule().
char* report_host_ip | ( | const char * | host | ) |
Get the IP of a host, using the 'hostname' report host details.
The most recent host detail takes preference.
[in] | host | Host name or IP. |
Definition at line 31487 of file manage_sql.c.
References sql_quote(), and sql_string().
void reschedule_task | ( | const gchar * | task_id | ) |
Set a task's schedule so that it runs again next scheduling round.
task_id | UUID of task. |
Definition at line 19482 of file manage_sql.c.
References set_task_schedule_next_time(), and sql_int64().
Referenced by manage_schedule().
gchar* resource_uuid | ( | const gchar * | type, |
resource_t | resource | ||
) |
Get the UUID of a resource.
[in] | type | Type. |
[in] | resource | Resource. |
Definition at line 4971 of file manage_sql.c.
References sql_string(), and valid_db_resource_type().
const char* run_status_name_internal | ( | task_status_t | status | ) |
Get the unique name of a run status.
[in] | status | Run status. |
Definition at line 1288 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.
int set_report_scan_run_status | ( | report_t | report, |
task_status_t | status | ||
) |
Return the run status of the scan associated with a report.
[in] | report | Report. |
[out] | status | Scan run status. |
Definition at line 24512 of file manage_sql.c.
References report_cache_counts(), setting_auto_cache_rebuild_int(), and sql().
void set_report_scheduled | ( | report_t | report | ) |
Set a report's scheduled flag.
Set flag if task was scheduled, else clear flag.
[in] | report | Report. |
Definition at line 18252 of file manage_sql.c.
References authenticate_allow_all, and sql().
Referenced by create_current_report().
int set_report_slave_progress | ( | report_t | report, |
int | progress | ||
) |
Set slave progress of a report.
[in] | report | The report. |
[in] | progress | The new progress value. |
Definition at line 25451 of file manage_sql.c.
References sql().
Referenced by update_slave_progress().
void set_report_slave_task_uuid | ( | report_t | report, |
const char * | uuid | ||
) |
Set the UUID of the slave task, on the local task.
[in] | report | The report. |
[in] | uuid | UUID. |
Definition at line 25486 of file manage_sql.c.
References sql(), and sql_quote().
int set_task_requested | ( | task_t | task, |
task_status_t * | status | ||
) |
Atomically set the run state of a task to requested.
[in] | task | Task. |
[out] | status | Old run status of task. |
Definition at line 18336 of file manage_sql.c.
References set_task_run_status(), sql_begin_exclusive(), sql_commit(), 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.
void set_task_schedule_next_time | ( | task_t | task, |
time_t | time | ||
) |
Set the next time a scheduled task will be due.
[in] | task | Task. |
[in] | time | New next time. |
Definition at line 19058 of file manage_sql.c.
References sql().
Referenced by manage_schedule(), and reschedule_task().
void set_task_schedule_next_time_uuid | ( | const gchar * | task_id, |
time_t | time | ||
) |
Set the next time a scheduled task will be due.
[in] | task_id | Task UUID. |
[in] | time | New next time. |
Definition at line 19071 of file manage_sql.c.
References sql(), and sql_quote().
Referenced by manage_schedule().
int set_task_schedule_uuid | ( | const gchar * | task_id, |
schedule_t | schedule, | ||
int | periods | ||
) |
Set the schedule of a task.
[in] | task_id | Task UUID. |
[in] | schedule | Schedule. |
[in] | periods | Number of schedule periods. |
Definition at line 18836 of file manage_sql.c.
References sql(), and sql_quote().
Referenced by manage_schedule().
gchar* tag_value | ( | const gchar * | tags, |
const gchar * | tag | ||
) |
Extract a tag from an OTP tag list.
[in] | tags | Tag list. |
[out] | tag | Tag name. |
Definition at line 1269 of file manage_sql.c.
alive_test_t target_alive_tests | ( | target_t | target | ) |
Return a target's alive tests.
[in] | target | Target. |
Definition at line 35087 of file manage_sql.c.
References sql_int().
credential_t target_esxi_credential | ( | target_t | target | ) |
Return the ESXi credential associated with a target, if any.
[in] | target | Target. |
Definition at line 34983 of file manage_sql.c.
References target_credential().
port_list_t target_port_list | ( | target_t | target | ) |
Return the port list associated with a target, if any.
[in] | target | Target. |
Definition at line 34996 of file manage_sql.c.
References sql_int64().
Referenced by target_port_range().
char* target_port_range | ( | target_t | target | ) |
Return the port range of a target, in OTP format.
For "OpenVAS Default", return the explicit port ranges instead of "default".
[in] | target | Target. |
Definition at line 35030 of file manage_sql.c.
References cleanup_iterator(), init_port_range_iterator(), next(), port_range_iterator_end(), port_range_iterator_start(), port_range_iterator_type_int(), and target_port_list().
credential_t target_smb_credential | ( | target_t | target | ) |
Return the SMB credential associated with a target, if any.
[in] | target | Target. |
Definition at line 34970 of file manage_sql.c.
References target_credential().
credential_t target_ssh_credential | ( | target_t | target | ) |
Return the SSH credential associated with a target, if any.
[in] | target | Target. |
Definition at line 34957 of file manage_sql.c.
References target_credential().
char* task_definitions_file | ( | task_t | task | ) |
Get definitions file from a task's config.
[in] | task | Task. |
Definition at line 19468 of file manage_sql.c.
References sql_string(), and task_config().
Referenced by parse_osp_report().
const char* task_file_iterator_content | ( | iterator_t * | ) |
const char* task_file_iterator_name | ( | iterator_t * | ) |
time_t task_schedule_iterator_duration | ( | iterator_t * | iterator | ) |
Get the duration from a task schedule iterator.
[in] | iterator | Iterator. |
Definition at line 49449 of file manage_sql.c.
References iterator::done, and iterator_int64().
Referenced by task_schedule_iterator_stop_due(), and task_schedule_iterator_timed_out().
time_t task_schedule_iterator_first_time | ( | iterator_t * | iterator | ) |
Get the first time from a task schedule iterator.
[in] | iterator | Iterator. |
Definition at line 49435 of file manage_sql.c.
References iterator::done, and iterator_int64().
Referenced by manage_schedule(), and task_schedule_iterator_stop_due().
time_t task_schedule_iterator_initial_offset | ( | iterator_t * | iterator | ) |
Get the initial offset from a task schedule iterator.
[in] | iterator | Iterator. |
Definition at line 49493 of file manage_sql.c.
References iterator::done, and iterator_int64().
time_t task_schedule_iterator_next_time | ( | iterator_t * | iterator | ) |
Get the next time from a task schedule iterator.
[in] | iterator | Iterator. |
Definition at line 49393 of file manage_sql.c.
References iterator::done, and iterator_int64().
Referenced by task_schedule_iterator_start_due(), and task_schedule_iterator_timed_out().
const char* task_schedule_iterator_owner_name | ( | iterator_t * | ) |
const char* task_schedule_iterator_owner_uuid | ( | iterator_t * | ) |
time_t task_schedule_iterator_period | ( | iterator_t * | iterator | ) |
Get the period from a task schedule iterator.
[in] | iterator | Iterator. |
Definition at line 49407 of file manage_sql.c.
References iterator::done, and iterator_int64().
Referenced by manage_schedule(), and task_schedule_iterator_stop_due().
time_t task_schedule_iterator_period_months | ( | iterator_t * | iterator | ) |
Get the period months from a task schedule iterator.
[in] | iterator | Iterator. |
Definition at line 49421 of file manage_sql.c.
References iterator::done, and iterator_int64().
Referenced by manage_schedule(), and task_schedule_iterator_stop_due().
schedule_t task_schedule_iterator_schedule | ( | iterator_t * | iterator | ) |
Get the schedule from a task schedule iterator.
[in] | iterator | Iterator. |
Definition at line 49379 of file manage_sql.c.
References iterator::done, and iterator_int64().
gboolean task_schedule_iterator_start_due | ( | iterator_t * | iterator | ) |
Get the start due state from a task schedule iterator.
[in] | iterator | Iterator. |
Definition at line 49507 of file manage_sql.c.
References iterator::done, task_run_status(), task_schedule_iterator_next_time(), task_schedule_iterator_task(), TASK_STATUS_DONE, TASK_STATUS_INTERNAL_ERROR, TASK_STATUS_NEW, and TASK_STATUS_STOPPED.
Referenced by manage_schedule().
gboolean task_schedule_iterator_stop_due | ( | iterator_t * | iterator | ) |
Get the stop due state from a task schedule iterator.
[in] | iterator | Iterator. |
Definition at line 49539 of file manage_sql.c.
References iterator::done, task_running_report(), task_schedule_iterator_duration(), task_schedule_iterator_first_time(), task_schedule_iterator_period(), task_schedule_iterator_period_months(), task_schedule_iterator_task(), and task_schedule_iterator_timezone().
Referenced by manage_schedule().
task_t task_schedule_iterator_task | ( | iterator_t * | iterator | ) |
Get the task from a task schedule iterator.
[in] | iterator | Iterator. |
Definition at line 49355 of file manage_sql.c.
References iterator::done, and iterator_int64().
Referenced by manage_schedule(), task_schedule_iterator_start_due(), task_schedule_iterator_stop_due(), and task_schedule_iterator_timed_out().
const char* task_schedule_iterator_task_uuid | ( | iterator_t * | ) |
gboolean task_schedule_iterator_timed_out | ( | iterator_t * | iterator | ) |
Get if schedule of task in iterator is timed out.
[in] | iterator | Iterator. |
Definition at line 49587 of file manage_sql.c.
References iterator::done, get_schedule_timeout(), SCHEDULE_TIMEOUT_MIN_SECS, task_run_status(), task_schedule_iterator_duration(), task_schedule_iterator_next_time(), task_schedule_iterator_task(), TASK_STATUS_DONE, TASK_STATUS_INTERNAL_ERROR, TASK_STATUS_NEW, and TASK_STATUS_STOPPED.
Referenced by manage_schedule().
const char* task_schedule_iterator_timezone | ( | iterator_t * | ) |
Referenced by manage_schedule(), and task_schedule_iterator_stop_due().
void trim_report | ( | report_t | report | ) |
Prepare a partial report for restarting the scan from the beginning.
[in] | report | The report. |
Definition at line 25501 of file manage_sql.c.
References report_cache_counts(), report_clear_count_cache(), setting_auto_cache_rebuild_int(), and sql().
void update_config_cache_init | ( | const char * | uuid | ) |
Update count and growing info in config, without checking user.
For use during initialisation.
[in] | uuid | Config UUID. |
It's up to the caller to organise a transaction.
Definition at line 38210 of file manage_sql.c.
References CONFIG_ITERATOR_COLUMNS.
Referenced by check_config_host_discovery(), and check_config_system_discovery().
int update_from_slave | ( | task_t | task, |
entity_t | get_report, | ||
entity_t * | report, | ||
int * | next_result | ||
) |
Update the local task from the slave task.
[in] | task | The local task. |
[in] | get_report | Slave GET_REPORT response. |
[out] | report | Report from get_report. |
[out] | next_result | Next result counter. |
Definition at line 53064 of file manage_sql.c.
References current_report, current_scanner_task, result_buffer::host, host_notice(), make_result(), result_buffer::port, report_add_result(), report_uuid(), set_scan_host_start_time(), set_scan_start_time(), set_task_start_time(), sql_begin_immediate(), sql_commit(), sql_rollback(), and threat_message_type().
int valid_omp_command | ( | const char * | name | ) |
Check whether a command name is valid.
[in] | name | Command name. |
Definition at line 545 of file manage_sql.c.
References omp_commands.
Referenced by acl_user_has_access_uuid().
gchar* task_db_name |
Name of the database file.
Definition at line 403 of file manage_sql.c.
Referenced by migrate_43_to_44(), and reinit_manage_process().