diff options
author | Darren Tucker <dtucker@zip.com.au> | 2014-01-20 13:18:09 +1100 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2014-01-20 13:18:09 +1100 |
commit | c74e70eb52ccc0082bd5a70b5798bb01c114d138 (patch) | |
tree | c26e2f657a59989e3457ab2006e5bba81f5b612a /gss-serv-krb5.c | |
parent | 3510979e83b6a18ec8773c64c3fa04aa08b2e783 (diff) |
- (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 'gss-serv-krb5.c')
-rw-r--r-- | gss-serv-krb5.c | 6 |
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) | |||
132 | return; | 132 | return; |
133 | 133 | ||
134 | #ifdef HEIMDAL | 134 | #ifdef HEIMDAL |
135 | # ifdef HAVE_KRB5_CC_NEW_UNIQUE | ||
135 | if ((problem = krb5_cc_new_unique(krb_context, krb5_fcc_ops.prefix, | 136 | if ((problem = krb5_cc_new_unique(krb_context, krb5_fcc_ops.prefix, |
136 | NULL, &ccache)) != 0) { | 137 | NULL, &ccache)) != 0) { |
137 | errmsg = krb5_get_error_message(krb_context, problem); | 138 | errmsg = krb5_get_error_message(krb_context, problem); |
138 | logit("krb5_cc_new_unique(): %.100s", errmsg); | 139 | logit("krb5_cc_new_unique(): %.100s", errmsg); |
140 | # else | ||
141 | if ((problem = krb5_cc_gen_new(krb_context, &krb5_fcc_ops, &ccache))) { | ||
142 | logit("krb5_cc_gen_new(): %.100s", | ||
143 | krb5_get_err_text(krb_context, problem)); | ||
144 | # endif | ||
139 | krb5_free_error_message(krb_context, errmsg); | 145 | krb5_free_error_message(krb_context, errmsg); |
140 | return; | 146 | return; |
141 | } | 147 | } |