OpenVAS Libraries  8.0.3
Todo List
globalScope> Global _GNU_SOURCE
Ensure that every global init gets a free.
globalScope> Global ACT_LAST
Consider creation of an enumeration.
globalScope> Global build_encode_URL (struct arglist *, char *, char *, char *, char *)
Evaluate if GLib functions for building paths are applicable here
globalScope> Global build_encode_URL (struct arglist *, char *, char *, char *, char *)
Evaluate if GLib functions for building paths are applicable here
globalScope> Global check_response (gnutls_session_t *)
Use this in the other functions.
globalScope> Global check_response (gnutls_session_t *)
Use this in the other functions.
globalScope> Global DO_CHILDREN (entity, child, temp, body)
Use next_entities and first_entity instead of this.
globalScope> Global exec_nasl_script (struct arglist *, const char *, const char *, int)
Initialization of the library seems intuitively be necessary only once (involves "linking" the nasl functions to c code). Consider a "prototype" context that has to be created only once and of which copies are made when needed.
globalScope> Global exec_nasl_script (struct arglist *, const char *, const char *, int)
Initialization of the library seems intuitively be necessary only once (involves "linking" the nasl functions to c code). Consider a "prototype" context that has to be created only once and of which copies are made when needed.
globalScope> Global FIX (n)

: It still needs to be taken care BSD_BYTE_ORDERING gets here if defined (e.g. by config.h)

: It still needs to be taken care BSD_BYTE_ORDERING gets here if defined (e.g. by config.h)

: It still needs to be taken care BSD_BYTE_ORDERING gets here if defined (e.g. by config.h)

globalScope> Global free_credentials (credentials_t *credentials)
Check whether uuid has to be freed, too.
globalScope> Global G_LOG_DOMAIN
This module nearly fulfils the requirements to be placed in the base library (the gnutls dependency makes it a candidate for the net library).
globalScope> Global hash_str2 (const char *, int)
Consider using GLibs string hash function.
globalScope> Global hash_str2 (const char *, int)
Consider using GLibs string hash function.
globalScope> Global IMPORT (var)

Check for memleak and document reference counting in tree cells. In some cases, after a tree_cell (typically retc) has been allocated with alloc_tree_cell, it is not later freed or deref_tree_cell'ed. It has to evaluated if that is okay or leads to memory leaks.

Check for memleak and document reference counting in tree cells. In some cases, after a tree_cell (typically retc) has been allocated with alloc_tree_cell, it is not later freed or deref_tree_cell'ed. It has to evaluated if that is okay or leads to memory leaks.

globalScope> Global internal_send (int, char *, int)
internal_send and internal_recv. could make an own module (ipc), in which the type constants could be moved, too.
globalScope> Global internal_send (int, char *, int)
internal_send and internal_recv. could make an own module (ipc), in which the type constants could be moved, too.
globalScope> Global nasl_chomp (lex_ctxt *)
evaluate early break
globalScope> Global nasl_chomp (lex_ctxt *)
evaluate early break
globalScope> Global nasl_exec (lex_ctxt *, tree_cell *)
There is a lot of duplicated code in following cases, could be refactored.
globalScope> Global nasl_exec (lex_ctxt *, tree_cell *)
There is a lot of duplicated code in following cases, could be refactored.
globalScope> Global nasl_perror (lex_ctxt *, char *,...)
Enable this when the NVTs are ready. Sends ERRMSG to client.
globalScope> Global nasl_perror (lex_ctxt *, char *,...)
Enable this when the NVTs are ready. Sends ERRMSG to client.
globalScope> Global nasl_pread (lex_ctxt *)
Supspects to glib replacements, all path related stuff.
globalScope> Global nasl_pread (lex_ctxt *)
Supspects to glib replacements, all path related stuff.
globalScope> Global NUM_CLIENTS
There once was a BPF sharing feature with the same API as the methods below, but trying to share BPF among the daemon processes. What remains is a thin abstraction of the pcap API. Eventually it needs to be analysed whether this makes sense or can further be simplified.
globalScope> Global nvti_to_keyfile (const nvti_t *n, const char *src, const gchar *fn)
Anything else indicates an error.
File omp.c
Name functions consistently (perhaps omp_*).
globalScope> Global openvas_auth_tear_down (void)
Close memleak, destroy list and content.
globalScope> Global openvas_auth_write_config (GKeyFile *keyfile)
Preserve comments in file.
globalScope> Global openvas_auth_write_config (GKeyFile *keyfile)
Preserve comments in file.
globalScope> Global openvas_file_remove_recurse (const gchar *pathname)
Set errno when we return -1 to maintain remove() compatibility.
globalScope> Global openvas_log_func (const char *, GLogLevelFlags, const char *, gpointer)

Move log_separator to the conf file too.

Check what error this is.

globalScope> Global openvas_log_func (const char *, GLogLevelFlags, const char *, gpointer)

Move log_separator to the conf file too.

Check what error this is.

File openvas_logging.c
This module fulfils the reqirements to be placed in the base library.
globalScope> Global openvas_register_connection (int s, void *ssl, gnutls_certificate_credentials_t certcred, openvas_encaps_t encaps)

TLS FIXME: migrate this to TLS

Fix the voidness of the ssl parameter (problematic in 64bit env.) here or on caller-side

globalScope> Global openvas_register_connection (int s, void *ssl, gnutls_certificate_credentials_t certcred, openvas_encaps_t encaps)

TLS FIXME: migrate this to TLS

Fix the voidness of the ssl parameter (problematic in 64bit env.) here or on caller-side

globalScope> Global openvas_server_open_with_cert (gnutls_session_t *, const char *, int, const char *, const char *, const char *)

Ensure that host and port have sane values.

Improve logging.

On success we are leaking the credentials. We can't free them because the session only makes a shallow copy. A solution would be to lookup already created credentials and reuse them.

Use openvas_server_connect.

globalScope> Global openvas_server_open_with_cert (gnutls_session_t *, const char *, int, const char *, const char *, const char *)

Ensure that host and port have sane values.

Improve logging.

On success we are leaking the credentials. We can't free them because the session only makes a shallow copy. A solution would be to lookup already created credentials and reuse them.

Use openvas_server_connect.

globalScope> Global plug_set_port_transport (struct arglist *, int, int)
Those brain damaged functions should probably be in another file They are use to remember who speaks SSL or not
globalScope> Global plug_set_port_transport (struct arglist *, int, int)
Those brain damaged functions should probably be in another file They are use to remember who speaks SSL or not
globalScope> Global plug_set_ssl_CA_file (struct arglist *, char *)
Also, all plug_set_ssl*-functions set values that are only accessed in network.c:open_stream_connection under specific conditions. Check whether these conditions can actually occur. Document the functions on the way.
globalScope> Global plug_set_ssl_CA_file (struct arglist *, char *)
Also, all plug_set_ssl*-functions set values that are only accessed in network.c:open_stream_connection under specific conditions. Check whether these conditions can actually occur. Document the functions on the way.
globalScope> Global scan (struct arglist *env, char *hostname, char *portrange, struct in6_addr *dst6, unsigned long rtt)
How to do this for ipv6? This causes much scan delay for IPv6.
globalScope> Global str_match (const char *, const char *, int)

These functions are not necessarily nasl-specific and thus subject to be moved (e.g. to misc).

In parts replacable by g_pattern_match function (when not icase)

globalScope> Global str_match (const char *, const char *, int)

These functions are not necessarily nasl-specific and thus subject to be moved (e.g. to misc).

In parts replacable by g_pattern_match function (when not icase)