Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/lib/libtelnet Pull up rev. 1.5:



details:   https://anonhg.NetBSD.org/src/rev/a635e642854c
branches:  netbsd-1-5
changeset: 488680:a635e642854c
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Jul 23 22:14:19 2000 +0000

description:
Pull up rev. 1.5:
Handle krb5_init_context() failure, rather than dumping core.

diffstat:

 lib/libtelnet/kerberos5.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r 2dfcdcc8b1bf -r a635e642854c lib/libtelnet/kerberos5.c
--- a/lib/libtelnet/kerberos5.c Sun Jul 23 20:23:56 2000 +0000
+++ b/lib/libtelnet/kerberos5.c Sun Jul 23 22:14:19 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kerberos5.c,v 1.4.2.2 2000/06/22 07:09:03 thorpej Exp $        */
+/*     $NetBSD: kerberos5.c,v 1.4.2.3 2000/07/23 22:14:19 thorpej Exp $        */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -130,12 +130,15 @@
 int
 kerberos5_init(Authenticator *ap, int server)
 {
+       krb5_error_code ret;
 
-       if (telnet_context == 0)
-               krb5_init_context(&telnet_context);
+       if (telnet_context == 0) {
+               ret = krb5_init_context(&telnet_context);
+               if (ret)
+                       return 0;
+       }
 
        if (server) {
-               krb5_error_code ret;
                krb5_keytab kt;
                krb5_kt_cursor cursor;
 



Home | Main Index | Thread Index | Old Index