svn rev #24488: trunk/src/lib/krb5/krb/

ghudson@MIT.EDU ghudson at MIT.EDU
Wed Oct 27 13:05:05 EDT 2010


http://src.mit.edu/fisheye/changelog/krb5/?cs=24488
Commit By: ghudson
Log Message:
ticket: 6812

Don't fail out from krb5_get_credentials() if we can't store a ticket
into the ccache.



Changed Files:
U   trunk/src/lib/krb5/krb/get_creds.c
Modified: trunk/src/lib/krb5/krb/get_creds.c
===================================================================
--- trunk/src/lib/krb5/krb/get_creds.c	2010-10-26 19:36:58 UTC (rev 24487)
+++ trunk/src/lib/krb5/krb/get_creds.c	2010-10-27 17:05:05 UTC (rev 24488)
@@ -432,11 +432,9 @@
     ctx->reply_creds->authdata = ctx->authdata;
     ctx->authdata = NULL;
 
-    /* Cache the credential if desired. */
     if (!(ctx->req_options & KRB5_GC_NO_STORE)) {
-        code = krb5_cc_store_cred(context, ctx->ccache, ctx->reply_creds);
-        if (code != 0)
-            return code;
+        /* Try to cache the credential. */
+        (void) krb5_cc_store_cred(context, ctx->ccache, ctx->reply_creds);
     }
 
     /* If we were doing constrained delegation, make sure we got a forwardable
@@ -572,9 +570,7 @@
                                   &ctx->reply_creds->authdata);
         if (code != 0)
             return code;
-        code = krb5_cc_store_cred(context, ctx->ccache, ctx->reply_creds);
-        if (code != 0)
-            return code;
+        (void) krb5_cc_store_cred(context, ctx->ccache, ctx->reply_creds);
 
         /* The authdata in this TGT will be copied into subsequent TGTs or the
          * final credentials, so we don't need to request it again. */
@@ -909,9 +905,7 @@
         path_realm = find_realm_in_path(context, ctx, tgt_realm);
         if (path_realm != NULL) {
             /* We got a realm on the expected path, so we can cache it. */
-            code = krb5_cc_store_cred(context, ctx->ccache, ctx->cur_tgt);
-            if (code != 0)
-                return code;
+            (void) krb5_cc_store_cred(context, ctx->ccache, ctx->cur_tgt);
             if (path_realm == ctx->last_realm) {
                 /* We received a TGT for the target realm. */
                 TRACE_TKT_CREDS_TARGET_TGT(context, ctx->cur_tgt->server);




More information about the cvs-krb5 mailing list