aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-04-16 11:14:43 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2018-04-16 11:14:45 +0200
commitc28749e176a2c8336d6eddfad7ca7f5a3908297d (patch)
tree2b451cf75548f3cbaf568f99d843e30d292b23a0 /src
parente1224284695a61b01963da5b911ed324d9194e6d (diff)
downloadremote-logon-service-c28749e176a2c8336d6eddfad7ca7f5a3908297d.tar.gz
remote-logon-service-c28749e176a2c8336d6eddfad7ca7f5a3908297d.tar.bz2
remote-logon-service-c28749e176a2c8336d6eddfad7ca7f5a3908297d.zip
Properly initialize Libgcrypt.
Fixes ArcticaProject/remote-logon-service#1
Diffstat (limited to 'src')
-rw-r--r--src/main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 1d53edc..5fa4187 100644
--- a/src/main.c
+++ b/src/main.c
@@ -25,6 +25,8 @@
#include <glib.h>
#include <glib/gi18n.h>
+#include <gcrypt.h>
+
/* NOTE: Required to build without optimizations */
#include <locale.h>
@@ -452,6 +454,12 @@ main (int argc, char * argv[])
/* Parse config file */
find_config_file(config, cmnd_line_config, skel);
+ if(!gcry_check_version(NULL)) {
+ return -1;
+ }
+ gcry_control(GCRYCTL_DISABLE_SECMEM, 0);
+ gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0);
+
/* Loop forever */
g_main_loop_run(mainloop);