summaryrefslogtreecommitdiff
path: root/gss-serv-krb5.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2004-02-17 20:33:52 +1100
committerDamien Miller <djm@mindrot.org>2004-02-17 20:33:52 +1100
commit34255b9f4c0546a455a71277ad05734ba6878198 (patch)
treee1d949068d2c387b7034fadeb1c2bfc2ae37071a /gss-serv-krb5.c
parent4e60ed74a670146364719bcd0f1fb6515a26edd4 (diff)
- (djm) Bug #698: Specify FILE: for KRB5CCNAME; patch from
stadal@suse.cz and simon@sxw.org.uk
Diffstat (limited to 'gss-serv-krb5.c')
-rw-r--r--gss-serv-krb5.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gss-serv-krb5.c b/gss-serv-krb5.c
index e358bcbdc..7373beb6d 100644
--- a/gss-serv-krb5.c
+++ b/gss-serv-krb5.c
@@ -108,6 +108,7 @@ ssh_gssapi_krb5_storecreds(ssh_gssapi_client *client)
108 krb5_error_code problem; 108 krb5_error_code problem;
109 krb5_principal princ; 109 krb5_principal princ;
110 OM_uint32 maj_status, min_status; 110 OM_uint32 maj_status, min_status;
111 int len;
111 112
112 if (client->creds == NULL) { 113 if (client->creds == NULL) {
113 debug("No credentials stored"); 114 debug("No credentials stored");
@@ -178,11 +179,13 @@ ssh_gssapi_krb5_storecreds(ssh_gssapi_client *client)
178 179
179 client->store.filename = xstrdup(krb5_cc_get_name(krb_context, ccache)); 180 client->store.filename = xstrdup(krb5_cc_get_name(krb_context, ccache));
180 client->store.envvar = "KRB5CCNAME"; 181 client->store.envvar = "KRB5CCNAME";
181 client->store.envval = xstrdup(client->store.filename); 182 len = strlen(client->store.filename) + 6;
183 client->store.envval = xmalloc(len);
184 snprintf(client->store.envval, len, "FILE:%s", client->store.filename);
182 185
183#ifdef USE_PAM 186#ifdef USE_PAM
184 if (options.use_pam) 187 if (options.use_pam)
185 do_pam_putenv(client->store.envvar,client->store.envval); 188 do_pam_putenv(client->store.envvar, client->store.envval);
186#endif 189#endif
187 190
188 krb5_cc_close(krb_context, ccache); 191 krb5_cc_close(krb_context, ccache);