[2937] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

krb5-clients/605: klist checks for wrong return code

daemon@ATHENA.MIT.EDU (ghudson@MIT.EDU)
Tue Jun 2 17:29:21 1998

Resent-From: gnats@rt-11.MIT.EDU (GNATS Management)
Resent-To: krb5-unassigned@RT-11.MIT.EDU
Resent-Reply-To: krb5-bugs@MIT.EDU, ghudson@MIT.EDU
Date: Tue, 2 Jun 1998 17:21:48 -0400
From: ghudson@MIT.EDU
Reply-To: ghudson@MIT.EDU
To: krb5-bugs@MIT.EDU


>Number:         605
>Category:       krb5-clients
>Synopsis:       klist checks for ENOENT, which is wrong
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    krb5-unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   unknown
>Arrival-Date:   Tue Jun 02 17:22:00 EDT 1998
>Last-Modified:
>Originator:     Greg Hudson
>Organization:
MIT
>Release:        1.0pl1
>Environment:
	
System: SunOS small-gods 5.5.1 Generic_103640-12 sun4u sparc SUNW,Ultra-1
Architecture: sun4

>Description:
	klist's do_ccache() function has a check for a return code of
	ENOENT, which isn't what you get when a credentials cache doesn't
	exist.
>How-To-Repeat:
	Run klist with no credentials cache.  Note the confusing part of the
	error message about "while setting cache flags".
>Fix:

Index: klist.c
===================================================================
RCS file: /afs/dev.mit.edu/source/repository/third/krb5/src/clients/klist/klist.c,v
retrieving revision 1.2
diff -c -r1.2 klist.c
*** klist.c	1997/10/14 05:58:17	1.2
--- klist.c	1998/06/02 21:16:41
***************
*** 280,286 ****
   
      flags = 0;				/* turns off OPENCLOSE mode */
      if ((code = krb5_cc_set_flags(kcontext, cache, flags))) {
! 	if (code == ENOENT) {
  	    if (!status_only)
  		com_err(progname, code, "(ticket cache %s)",
  			krb5_cc_get_name(kcontext, cache));
--- 280,286 ----
   
      flags = 0;				/* turns off OPENCLOSE mode */
      if ((code = krb5_cc_set_flags(kcontext, cache, flags))) {
! 	if (code == KRB5_FCC_NOFILE) {
  	    if (!status_only)
  		com_err(progname, code, "(ticket cache %s)",
  			krb5_cc_get_name(kcontext, cache));
>Audit-Trail:
>Unformatted:

home help back first fref pref prev next nref lref last post