aboutsummaryrefslogtreecommitdiff
path: root/src/mysql.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mysql.h')
-rw-r--r--src/mysql.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mysql.h b/src/mysql.h
index 46e607e..8c6040f 100644
--- a/src/mysql.h
+++ b/src/mysql.h
@@ -10,9 +10,13 @@ struct db_host_info {
char db_init(void);
void db_clean(void);
-char * db_get_username_from_pubkey(ssh_key pubkey);
-struct db_host_info * db_get_host_info(const char * hostname);
-void db_free_host_info(struct db_host_info * info);
+char * // returns NULL if no user found, this char * is to be freed from the calling code
+db_get_username_from_pubkey(ssh_key pubkey);
+struct db_host_info * // returns NULL if no key found, this char * is to be freed from the calling code
+db_get_host_info(const char * hostname);
void db_set_host_publickey_hash(const char * hostname, const char * hash);
+unsigned long long // returns 0 on error, or the session_id
+db_init_session_and_get_id(const char * hostname, const char * username);
+void db_free_host_info(struct db_host_info * info);
#endif