Mon Aug 10 17:51:59 1998 Matthew D Hancher <mdh@mit.edu>
authorMatthew Hancher <mdh@mit.edu>
Mon, 10 Aug 1998 21:53:22 +0000 (21:53 +0000)
committerMatthew Hancher <mdh@mit.edu>
Mon, 10 Aug 1998 21:53:22 +0000 (21:53 +0000)
* rd_svc_key.c (read_service_key): Don't call krb5_kt_close() if
krb5_kt_resolve() fails, so we don't segfault if the keytab name
is invalid.

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

src/lib/krb4/ChangeLog
src/lib/krb4/rd_svc_key.c

index 0134656df0280f7fde798888a231183d1bfb2fb2..54e185d2ec82f7a5ab159f641ba781fbfe451409 100644 (file)
@@ -1,3 +1,9 @@
+Mon Aug 10 17:51:59 1998  Matthew D Hancher  <mdh@mit.edu>
+
+       * rd_svc_key.c (read_service_key): Don't call krb5_kt_close() if 
+       krb5_kt_resolve() fails, so we don't segfault if the keytab name 
+       is invalid.
+
 Fri Aug  7 11:04:03 1998  Tom Yu  <tlyu@mit.edu>
 
        * rd_safe.c (krb_rd_safe): Fix up call to quad_cksum().
index 5ef12d8ebba7d9a2f9e0e4009a6f55e7ed6f5872..34924baf505b209df6395cdf0bec4e696ff3c0f1 100644 (file)
@@ -166,10 +166,11 @@ read_service_key(service,instance,realm,kvno,file,key)
                                      sizeof(keytabname)-1);
     if (!retval) {
        retval = krb5_kt_resolve(context, (char *)keytabname, &kt_id);
-       if (!retval)
+       if (!retval) {
            retval = krb5_kt_get_entry(context, kt_id, princ, kvno,
                                       ENCTYPE_DES_CBC_CRC, &kt_entry);
-       krb5_kt_close(context, kt_id);
+           krb5_kt_close(context, kt_id);
+       }
        krb5_free_principal(context, princ);
     }
     if (!retval) {