gvm-libs  11.0.1
About: GVM Libraries for the Greenbone Vulnerability Management (GVM-10) framework (derived from the former openvas-libraries).
  Fossies Dox: gvm-libs-11.0.1.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

credentials.h File Reference

Credential pairs and triples. More...

#include <glib.h>
Include dependency graph for credentials.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  credentials_t
 A username password pair. More...
 

Functions

void free_credentials (credentials_t *credentials)
 Free credentials. More...
 
void append_to_credentials_username (credentials_t *credentials, const char *text, gsize length)
 Append text to the username of a credential pair. More...
 
void append_to_credentials_password (credentials_t *credentials, const char *text, gsize length)
 Append text to the password of a credential pair. More...
 

Detailed Description

Credential pairs and triples.

Definition in file credentials.h.

Function Documentation

◆ append_to_credentials_password()

void append_to_credentials_password ( credentials_t credentials,
const char *  text,
gsize  length 
)

Append text to the password of a credential pair.

Parameters
[in]credentialsCredentials.
[in]textThe text to append.
[in]lengthLength of the text.

Definition at line 72 of file credentials.c.

74 {
75  gvm_append_text (&credentials->password, text, length);
76 }

References gvm_append_text(), and credentials_t::password.

Here is the call graph for this function:

◆ append_to_credentials_username()

void append_to_credentials_username ( credentials_t credentials,
const char *  text,
gsize  length 
)

Append text to the username of a credential pair.

Parameters
[in]credentialsCredentials.
[in]textThe text to append.
[in]lengthLength of the text.

Definition at line 58 of file credentials.c.

60 {
61  gvm_append_text (&credentials->username, text, length);
62 }

References gvm_append_text(), and credentials_t::username.

Here is the call graph for this function:

◆ free_credentials()

void free_credentials ( credentials_t credentials)

Free credentials.

Free the members of a credentials pair.

Parameters
[in]credentialsPointer to the credentials.

Definition at line 39 of file credentials.c.

40 {
41  g_free (credentials->username);
42  g_free (credentials->password);
43  g_free (credentials->uuid);
44  g_free (credentials->timezone);
45  g_free (credentials->role);
46  g_free (credentials->severity_class);
47  memset (credentials, '\0', sizeof (*credentials));
48 }

References credentials_t::password, credentials_t::role, credentials_t::severity_class, credentials_t::timezone, credentials_t::username, and credentials_t::uuid.

credentials_t::timezone
gchar * timezone
Timezone of user.
Definition: credentials.h:41
credentials_t::username
gchar * username
Login name of user.
Definition: credentials.h:35
credentials_t::severity_class
gchar * severity_class
Severity Class setting of user.
Definition: credentials.h:45
gvm_append_text
void gvm_append_text(gchar **var, const gchar *string, gsize length)
Append a string of a known length to a string variable.
Definition: strings.c:74
credentials_t::password
gchar * password
Password of user.
Definition: credentials.h:37
credentials_t::uuid
gchar * uuid
UUID of user.
Definition: credentials.h:39
credentials_t::role
gchar * role
Role of user.
Definition: credentials.h:49