Initialize magic variable and encryption type
authorTheodore Tso <tytso@mit.edu>
Sat, 19 Nov 1994 04:58:09 +0000 (04:58 +0000)
committerTheodore Tso <tytso@mit.edu>
Sat, 19 Nov 1994 04:58:09 +0000 (04:58 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4700 dc483132-0cff-0310-8789-dd5450dbe970

src/appl/telnet/libtelnet/ChangeLog
src/appl/telnet/libtelnet/kerberos5.c

index 9b331f00fadbc5f81a1de46d845f4d57d240e8fb..9c19cb5fb036a183e9e2385af838a2d38cf2c1e8 100644 (file)
@@ -1,3 +1,8 @@
+Fri Nov 18 15:19:26 1994  Theodore Y. Ts'o  (tytso@dcl)
+
+       * kerberos5.c (kerberos5_init): Initialize magic variable and
+               encryption type.  
+
 Fri Nov 18 00:37:13 1994  Mark Eichin  <eichin@cygnus.com>
 
        * configure.in: use WITH_KRB4. (from epeisach)
index 3ba19b7f3411eb8d486d3770175dc6f2ff8c69dc..be8f93709755ab0c059f05fb4fc35b2f750733b0 100644 (file)
@@ -165,6 +165,8 @@ kerberos5_init(ap, server)
        else
                str_data[3] = TELQUAL_IS;
        memset(&session_key, 0, sizeof(session_key));
+       session_key.magic = KV5M_MAGIC;
+       session_key.etype = ETYPE_UNKNOWN;
         krb5_init_ets();
        return(1);
 }
@@ -246,9 +248,9 @@ kerberos5_send(ap)
        authenticator.subkey = 0;
 
 #ifdef ENCRYPTION
-       if (session_key.contents)
-           free(session_key.contents);
        if (newkey) {
+           if (session_key.contents)
+               free(session_key.contents);
            /* keep the key in our private storage, but don't use it
               yet---see kerberos5_reply() below */
            if (newkey->keytype != KEYTYPE_DES) {