Bug 18933

Summary: /usr/kerberos/bin/sclient crashes in initialization
Product: [Retired] Red Hat Linux Reporter: Tim Mann <redhat-bugzilla>
Component: krb5Assignee: Nalin Dahyabhai <nalin>
Status: CLOSED CURRENTRELEASE QA Contact: Wil Harris <wil>
Severity: medium Docs Contact:
Priority: low    
Version: 7.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-10-12 05:38:02 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tim Mann 2000-10-12 05:31:51 UTC
The sample client sclient crashes during initialization. It also crashes
before trying to print an error message if authentication fails. It appears
to need the following patch.

I reported the first part of this bug and fix directly to MIT but forgot
the second part. Oops.

---
/vesta/src.dec.com/test2/kerbtest/checkout/1/17/src/sclient/sclient.c     
Wed Oct 11 19:57:23 2000
+++ sclient.c   Wed Oct 11 21:36:08 2000
@@ -77,6 +77,7 @@
        exit(1);
     }
 
+    memset(&context, 0, sizeof(context));
     retval = krb5_init_context(&context);
     if (retval) {
            com_err(argv[0], retval, "while initializing krb5");
@@ -176,7 +177,7 @@
     krb5_free_principal(context, server);      /* finished using it */
     krb5_free_principal(context, client);      
     krb5_cc_close(context, ccdef);
-    krb5_auth_con_free(context, auth_context);
+    if (auth_context) krb5_auth_con_free(context, auth_context);
 
     if (retval && retval != KRB5_SENDAUTH_REJECTED) {
        com_err(argv[0], retval, "while using sendauth");

Comment 1 Tim Mann 2000-10-12 05:37:56 UTC
p.s. I've now reported both parts of the bug to MIT.


Comment 2 Nalin Dahyabhai 2001-06-27 05:10:00 UTC
It appears this patch was folded into krb5 1.2.2.  Thanks!