Rearranged use of krb5_cc_dfl_ops to deal with it now being a
authorKen Raeburn <raeburn@mit.edu>
Wed, 28 Nov 1990 10:16:09 +0000 (10:16 +0000)
committerKen Raeburn <raeburn@mit.edu>
Wed, 28 Nov 1990 10:16:09 +0000 (10:16 +0000)
pointer....

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

src/lib/krb5/ccache/ccbase.c

index 8fd1e606e6a9d2ea29a7348b72a72e1549fa4478..32577dbbc1897ee6346245c364fbb4657d29d23b 100644 (file)
@@ -19,13 +19,13 @@ static char rcsid_ccbase_c[] =
 #include <krb5/krb5.h>
 #include <krb5/ext-proto.h>
 
+extern krb5_cc_ops *krb5_cc_dfl_ops;
 struct krb5_cc_typelist
  {
   krb5_cc_ops *ops;
   struct krb5_cc_typelist *next;
  };
-static struct krb5_cc_typelist krb5_cc_typelist_dfl = { &krb5_cc_dfl_ops, 0 };
-static struct krb5_cc_typelist *cc_typehead = &krb5_cc_typelist_dfl;
+static struct krb5_cc_typelist *cc_typehead = 0;
 
 /*
  * Register a new credentials cache type
@@ -96,6 +96,10 @@ krb5_error_code krb5_cc_resolve (name, cache)
            return (*tlist->ops->resolve)(cache, resid);
        }
     }
+    if (krb5_cc_dfl_ops && !strcmp (pfx, krb5_cc_dfl_ops->prefix)) {
+       free (pfx);
+       return (*krb5_cc_dfl_ops->resolve)(cache, resid);
+    }
     free(pfx);
     return KRB5_CC_UNKNOWN_TYPE;
 }