aboutsummaryrefslogtreecommitdiff
path: root/src/mysql.h
diff options
context:
space:
mode:
authorJulien Dessaux2018-08-26 18:54:19 +0200
committerJulien Dessaux2018-11-02 18:32:59 +0100
commitfecf526ed334c8b987b37a3702e85a08bb7a9e68 (patch)
treeb70f7ba78eb409f12a63c5ac69ef0ba97cf7b269 /src/mysql.h
parentAdded session recording with https://github.com/kilobyte/termrec (diff)
downloadbastion-fecf526ed334c8b987b37a3702e85a08bb7a9e68.tar.gz
bastion-fecf526ed334c8b987b37a3702e85a08bb7a9e68.tar.bz2
bastion-fecf526ed334c8b987b37a3702e85a08bb7a9e68.zip
Began implementing configuration fetching from an sshportal mysql database
Diffstat (limited to '')
-rw-r--r--src/mysql.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mysql.h b/src/mysql.h
new file mode 100644
index 0000000..46e607e
--- /dev/null
+++ b/src/mysql.h
@@ -0,0 +1,18 @@
+#ifndef MYSQL_H_
+#define MYSQL_H_
+
+struct db_host_info {
+ char * privkeytxt;
+ char * address;
+ char * username;
+ char * hostkeyhash;
+};
+
+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);
+void db_set_host_publickey_hash(const char * hostname, const char * hash);
+
+#endif