From 1dad3f55fdd54a0a0ca3ec47c8ab1c70f821a739 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 23 Jul 2017 16:35:17 +0200 Subject: [PATCH] Fixed a couple of silly bugs --- etc/subauthd | 2 +- server/subauthd.c | 2 +- server/temp.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/subauthd b/etc/subauthd index 86676fa..6f92259 100644 --- a/etc/subauthd +++ b/etc/subauthd @@ -2,7 +2,7 @@ SubauthD { SocketPath @INSTALL_RUN_DIR@/subauthd.socket MaxConnections 1000 Database @INSTALL_STATE_DIR@/subauthd.db - TempKeyFile @INSTALL_STATE_DIR@/subauthd-seed + TempKeyFile @INSTALL_STATE_DIR@/subauthd-temp-key Zone { Name mail diff --git a/server/subauthd.c b/server/subauthd.c index b0026ec..f04541d 100644 --- a/server/subauthd.c +++ b/server/subauthd.c @@ -269,7 +269,7 @@ static void init_socket(void) if (listen(sk, 64) < 0) die("listen(): %m"); - int one; + int one = 1; if (setsockopt(sk, SOL_SOCKET, SO_PASSCRED, &one, sizeof(one)) < 0) die("setsockopt(SO_PASSCRED): %m"); diff --git a/server/temp.c b/server/temp.c index 4742ee5..e1c5f18 100644 --- a/server/temp.c +++ b/server/temp.c @@ -120,7 +120,7 @@ void temp_init(void) } } - gcry_randomize(temp_key_file, TEMP_KEY_SIZE, GCRY_STRONG_RANDOM); + gcry_randomize(temp_key, TEMP_KEY_SIZE, GCRY_STRONG_RANDOM); msg(L_INFO, "Generated new temporary token key"); if (temp_key_file) -- 2.39.2