auth/credentials: Add missing error code check for MIT Kerberos
authorAndreas Schneider <asn@samba.org>
Thu, 22 Dec 2016 16:01:35 +0000 (17:01 +0100)
committerStefan Metzmacher <metze@samba.org>
Sat, 24 Dec 2016 16:16:06 +0000 (17:16 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
auth/credentials/credentials_krb5.c

index ca62e30ef73779163ef02d5b4b279ebcfa17f3e4..e974df9a0ba3c0ef9a04e3233addd7998259dc6a 100644 (file)
@@ -581,7 +581,11 @@ _PUBLIC_ int cli_credentials_get_client_gss_creds(struct cli_credentials *cred,
 
        maj_stat = gss_krb5_import_cred(&min_stat, ccache->ccache, NULL, NULL, 
                                        &gcc->creds);
-       if ((maj_stat == GSS_S_FAILURE) && (min_stat == (OM_uint32)KRB5_CC_END || min_stat == (OM_uint32) KRB5_CC_NOTFOUND)) {
+       if ((maj_stat == GSS_S_FAILURE) &&
+           (min_stat == (OM_uint32)KRB5_CC_END ||
+            min_stat == (OM_uint32)KRB5_CC_NOTFOUND ||
+            min_stat == (OM_uint32)KRB5_FCC_NOFILE))
+       {
                /* This CCACHE is no good.  Ensure we don't use it again */
                cli_credentials_unconditionally_invalidate_ccache(cred);