Greenbone Security Assistant
|
GSAD user session handling. More...
Macros | |
#define | G_LOG_DOMAIN "gsad session" |
GLib log domain. More... | |
Functions | |
user_t * | session_get_user_by_id_internal (const gchar *id) |
void | session_remove_user_internal (const gchar *id) |
void | session_add_user_internal (user_t *user) |
void | session_init () |
user_t * | session_get_user_by_id (const gchar *id) |
user_t * | session_get_user_by_username (const gchar *username) |
void | session_add_user (const gchar *id, user_t *user) |
Add user to the session "database". More... | |
void | session_remove_user (const gchar *id) |
Remove a user from the session "database". More... | |
void | session_remove_other_sessions (const gchar *id, user_t *user) |
Removes all session of the user, except the one with the passed id. More... | |
Variables | |
GPtrArray * | users = NULL |
User session data. More... | |
static GMutex * | mutex = NULL |
Mutex to prevent concurrent access to the session. More... | |
GSAD user session handling.
#define G_LOG_DOMAIN "gsad session" |
GLib log domain.
void session_add_user | ( | const gchar * | id, |
user_t * | user | ||
) |
Add user to the session "database".
[in] | id | Unique identifier. |
[in] | user | User. |
void session_add_user_internal | ( | user_t * | user | ) |
user_t* session_get_user_by_id | ( | const gchar * | id | ) |
Find a user by a session identifier
user_t* session_get_user_by_id_internal | ( | const gchar * | id | ) |
user_t* session_get_user_by_username | ( | const gchar * | username | ) |
Find the first user with the username
void session_init | ( | ) |
void session_remove_other_sessions | ( | const gchar * | id, |
user_t * | user | ||
) |
Removes all session of the user, except the one with the passed id.
[in] | id | ID of the session to keep |
[in] | user | The user to logout. |
void session_remove_user | ( | const gchar * | id | ) |
Remove a user from the session "database".
[in] | id | Unique identifier. |
void session_remove_user_internal | ( | const gchar * | id | ) |
|
static |
Mutex to prevent concurrent access to the session.
GPtrArray* users = NULL |
User session data.