kerberos_v4.c (kerberos_v4): Use strong random number generator
authorTheodore Tso <tytso@mit.edu>
Wed, 21 Feb 1996 20:21:50 +0000 (20:21 +0000)
committerTheodore Tso <tytso@mit.edu>
Wed, 21 Feb 1996 20:21:50 +0000 (20:21 +0000)
main.c (main): Initialize Kerberos V4's random number generator.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7491 dc483132-0cff-0310-8789-dd5450dbe970

src/kdc/ChangeLog
src/kdc/kerberos_v4.c
src/kdc/main.c

index 9395047b3be0b098e252b0a78602aacca29de5b5..cbb072621f099c40c670455811ade99de88c21b4 100644 (file)
@@ -1,3 +1,9 @@
+Tue Feb 20 16:50:59 1996  Theodore Y. Ts'o  <tytso@dcl>
+
+       * kerberos_v4.c (kerberos_v4): Use strong random number generator
+
+       * main.c (main): Initialize Kerberos V4's random number generator.
+
 Sat Jan 27 00:53:41 1996  Mark Eichin  <eichin@cygnus.com>
 
        * network.c (setup_network): strtol is good enough for port
index 7d0508f2124b51c41b428c0293fc97a649768aa1..de588716ea37ba096fcde722aa3ebcb50f73b5b0 100644 (file)
@@ -569,7 +569,7 @@ kerberos_v4(client, pkt)
            memset(session_key, 0, sizeof(C_Block));
 #else
            /* random session key */
-           random_key(session_key);
+           des_new_random_key(session_key);
 #endif
 
            /* unseal server's key from master key */
@@ -709,7 +709,7 @@ kerberos_v4(client, pkt)
            memset(session_key, 0, sizeof(C_Block));
 #else
            /* random session key */
-           random_key(session_key);
+           des_new_random_key(session_key);
 #endif
 
            krb_create_ticket(tk, k_flags, ad->pname, ad->pinst,
index c2671388a88027418621ce628e5f8940036d7ad0..442e217939ebac499c95fe2ff40bce373cb6abe1 100644 (file)
@@ -887,6 +887,9 @@ char *argv[];
        finish_realms(argv[0]);
        return 1;
     }
+#ifdef KRB5_KRB4_COMPAT
+    des_init_random_number_generator(master_keyblock.contents);
+#endif
     if (!nofork && daemon(0, 0)) {
        com_err(argv[0], errno, "while detaching from tty");
        finish_realms(argv[0]);