]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
auth/credentials_krb5: let cli_credentials_set_ccache() use smb_force_krb5_cc_default()
authorStefan Metzmacher <metze@samba.org>
Sat, 11 May 2024 00:38:21 +0000 (02:38 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 14 May 2024 10:18:32 +0000 (10:18 +0000)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
auth/credentials/credentials_krb5.c

index 49077db23b3f2d6051b5778882488fccd1d15f08..ce76b10361df9888c9f6e38fa60f49b1c5293f16 100644 (file)
@@ -323,7 +323,11 @@ _PUBLIC_ int cli_credentials_set_ccache(struct cli_credentials *cred,
                        return ret;
                }
        } else {
-               ret = krb5_cc_default(ccc->smb_krb5_context->krb5_context, &ccc->ccache);
+               /*
+                * This is where the caller really wants to use
+                * the default krb5 ccache.
+                */
+               ret = smb_force_krb5_cc_default(ccc->smb_krb5_context->krb5_context, &ccc->ccache);
                if (ret) {
                        (*error_string) = talloc_asprintf(cred, "failed to read default krb5 ccache: %s\n",
                                                          smb_get_krb5_error_message(ccc->smb_krb5_context->krb5_context,