krb5 commit: krb5_stdccv3_get_principal error handling fixup

Sam Hartman hartmans at MIT.EDU
Mon Jul 16 09:33:16 EDT 2012


https://github.com/krb5/krb5/commit/fbe77b2c7d4340097690cbed7b48fd9888feacd4
commit fbe77b2c7d4340097690cbed7b48fd9888feacd4
Author: Kevin Wasserman <kevin.wasserman at painless-security.com>
Date:   Sun May 6 17:50:20 2012 -0400

    krb5_stdccv3_get_principal error handling fixup
    
    Don't treat an error returned by krb5_parse_name as a cc-internal error.
    
    Signed-off-by: Kevin Wasserman <kevin.wasserman at painless-security.com>
    
    ticket: 7214 (new)
    tags: pullup

 src/lib/krb5/ccache/ccapi/stdcc.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/lib/krb5/ccache/ccapi/stdcc.c b/src/lib/krb5/ccache/ccapi/stdcc.c
index d361bde..fa6a1d4 100644
--- a/src/lib/krb5/ccache/ccapi/stdcc.c
+++ b/src/lib/krb5/ccache/ccapi/stdcc.c
@@ -764,11 +764,13 @@ krb5_stdccv3_get_principal (krb5_context context,
 
     if (!err) {
         err = krb5_parse_name (context, name->data, princ);
+    } else {
+        err = cc_err_xlate (err);
     }
 
     if (name) { cc_string_release (name); }
 
-    return cc_err_xlate (err);
+    return err;
 }
 
 /*


More information about the cvs-krb5 mailing list