]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
In the krb5 GSSAPI mech, adjust the error code expected from
authorGreg Hudson <ghudson@mit.edu>
Tue, 20 Apr 2010 08:02:40 +0000 (08:02 +0000)
committerGreg Hudson <ghudson@mit.edu>
Tue, 20 Apr 2010 08:02:40 +0000 (08:02 +0000)
krb5_get_credentials() when there is no TGT in the ccache, in light of
r23909.

git-svn-id: svn://anonsvn.mit.edu/krb5/branches/iakerb@23911 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/gssapi/krb5/init_sec_context.c

index 5c989bd3ae17df88e4f8db347e6d37bad45166cd..ea0dc9db91798db48f31116c997d66377768d22a 100644 (file)
@@ -201,11 +201,13 @@ static krb5_error_code get_credentials(context, cred, server, now,
 
     code = krb5_get_credentials(context, flags, cred->ccache,
                                 &in_creds, out_creds);
-    if (code == KRB5_NO_TKT_IN_RLM && cred->password.data != NULL) {
+    if (code == KRB5_CC_NOTFOUND && cred->password.data != NULL &&
+        !cred->iakerb_mech) {
         krb5_creds tgt_creds;
 
         memset(&tgt_creds, 0, sizeof(tgt_creds));
 
+        /* No TGT in the ccache, but we can get one with the password. */
         code = krb5_get_init_creds_password(context, &tgt_creds,
                                             in_creds.client,
                                             cred->password.data,