Only call krb5_init_context if the telnet context hasn't been
authorTheodore Tso <tytso@mit.edu>
Sat, 22 Apr 1995 04:54:47 +0000 (04:54 +0000)
committerTheodore Tso <tytso@mit.edu>
Sat, 22 Apr 1995 04:54:47 +0000 (04:54 +0000)
initialized yet.

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

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

index abe3422fad1e00fe6e626a966232038cb735728c..a9a555b616c7c2a2e3d133e70e784b3f340fbf94 100644 (file)
@@ -1,3 +1,8 @@
+Sat Apr 22 00:50:14 1995  Theodore Y. Ts'o  (tytso@dcl)
+
+       * kerberos5.c (kerberos5_init): Only call krb5_init_context if 
+               the telnet context hasn't been initialized yet.
+
 Thu Apr 20 20:12:32 1995  Mark Eichin  <eichin@cygnus.com>
 
        Changes for testsuite from Ian Taylor <ian@cygnus.com>
index 268bdb345e8d047a8f4e2a1b25189ffbfd3fbb65..5f1685e650a52165e6dbabf3bbde8aef5cdce0b5 100644 (file)
@@ -154,7 +154,7 @@ Data(ap, type, d, c)
         return(net_write(str_data, p - str_data));
 }
 
-krb5_context telnet_context;
+krb5_context telnet_context = 0;
 int
 kerberos5_init(ap, server)
        Authenticator *ap;
@@ -167,7 +167,8 @@ kerberos5_init(ap, server)
        memset(&session_key, 0, sizeof(session_key));
        session_key.magic = KV5M_KEYBLOCK;
        session_key.etype = ETYPE_UNKNOWN;
-        krb5_init_context(&telnet_context);
+       if (telnet_context == 0)
+           krb5_init_context(&telnet_context);
         krb5_init_ets(telnet_context);
        return(1);
 }