From: Martin Mares Date: Sun, 23 Jul 2017 14:35:17 +0000 (+0200) Subject: Fixed a couple of silly bugs X-Git-Tag: v0.9~35 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=1dad3f55fdd54a0a0ca3ec47c8ab1c70f821a739;p=subauth.git Fixed a couple of silly bugs --- 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)