Greenbone Vulnerability Management Libraries 22.32.0
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.
void append_to_credentials_username (credentials_t *credentials, const char *text, gsize length)
 Append text to the username of a credential pair.
void append_to_credentials_password (credentials_t *credentials, const char *text, gsize length)
 Append text to the password of a credential pair.

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 64 of file credentials.c.

66{
67 gvm_append_text (&credentials->password, text, length);
68}
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:66
gchar * password
Password of user.
Definition credentials.h:23

References gvm_append_text(), and credentials_t::password.

Referenced by Ensure().

Here is the call graph for this function:
Here is the caller 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 50 of file credentials.c.

52{
53 gvm_append_text (&credentials->username, text, length);
54}
gchar * username
Login name of user.
Definition credentials.h:21

References gvm_append_text(), and credentials_t::username.

Referenced by Ensure().

Here is the call graph for this function:
Here is the caller 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 31 of file credentials.c.

32{
33 g_free (credentials->username);
34 g_free (credentials->password);
35 g_free (credentials->uuid);
36 g_free (credentials->timezone);
37 g_free (credentials->role);
38 g_free (credentials->severity_class);
39 memset (credentials, '\0', sizeof (*credentials));
40}
gchar * role
Role of user.
Definition credentials.h:35
gchar * timezone
Timezone of user.
Definition credentials.h:27
gchar * uuid
UUID of user.
Definition credentials.h:25
gchar * severity_class
Severity Class setting of user.
Definition credentials.h:31

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

Referenced by Ensure().

Here is the caller graph for this function: