]> mj.ucw.cz Git - subauth.git/commitdiff
Fixed a couple of silly bugs
authorMartin Mares <mj@ucw.cz>
Sun, 23 Jul 2017 14:35:17 +0000 (16:35 +0200)
committerMartin Mares <mj@ucw.cz>
Sun, 23 Jul 2017 14:35:17 +0000 (16:35 +0200)
etc/subauthd
server/subauthd.c
server/temp.c

index 86676fa649aaa88b40c1fc8e6bc5b1c71c8e2bde..6f92259e3b0f08955cf65c9d73d5b22160712be2 100644 (file)
@@ -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
index b0026ecabf0022fd8a2fe47878bcc9be384cb3f5..f04541d22a4e08b5a2f2ff4c3eb34a5397c70f06 100644 (file)
@@ -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");
 
index 4742ee55f4ac9093461c14ae2b9f8cc37c7f5075..e1c5f182f87ca511d199a9b5401e3780b2694ba3 100644 (file)
@@ -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)