summaryrefslogtreecommitdiffstats
path: root/gss-serv-krb5.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2014-01-20 03:18:09 +0100
committerDarren Tucker <dtucker@zip.com.au>2014-01-20 03:18:09 +0100
commitc74e70eb52ccc0082bd5a70b5798bb01c114d138 (patch)
treec26e2f657a59989e3457ab2006e5bba81f5b612a /gss-serv-krb5.c
parent - djm@cvs.openbsd.org 2014/01/20 00:08:48 (diff)
downloadopenssh-c74e70eb52ccc0082bd5a70b5798bb01c114d138.tar.xz
openssh-c74e70eb52ccc0082bd5a70b5798bb01c114d138.zip
- (dtucker) [gss-serv-krb5.c] Fall back to krb5_cc_gen_new if the Kerberos
implementation does not have krb5_cc_new_unique, similar to what we do in auth-krb5.c.
Diffstat (limited to '')
-rw-r--r--gss-serv-krb5.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gss-serv-krb5.c b/gss-serv-krb5.c
index 87f26831a..759fa104f 100644
--- a/gss-serv-krb5.c
+++ b/gss-serv-krb5.c
@@ -132,10 +132,16 @@ ssh_gssapi_krb5_storecreds(ssh_gssapi_client *client)
return;
#ifdef HEIMDAL
+# ifdef HAVE_KRB5_CC_NEW_UNIQUE
if ((problem = krb5_cc_new_unique(krb_context, krb5_fcc_ops.prefix,
NULL, &ccache)) != 0) {
errmsg = krb5_get_error_message(krb_context, problem);
logit("krb5_cc_new_unique(): %.100s", errmsg);
+# else
+ if ((problem = krb5_cc_gen_new(krb_context, &krb5_fcc_ops, &ccache))) {
+ logit("krb5_cc_gen_new(): %.100s",
+ krb5_get_err_text(krb_context, problem));
+# endif
krb5_free_error_message(krb_context, errmsg);
return;
}