diff --git a/ChangeLog b/ChangeLog index c1018b10e..1497e6532 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,8 @@ [sftp-client.c sftp-client.h sftp-glob.c sftp-glob.h sftp-int.c] [sftp-int.h sftp.c] switch to license.template for code written by me (belated, I know...) + - (djm) Bug #698: Specify FILE: for KRB5CCNAME; patch from + stadal@suse.cz and simon@sxw.org.uk 20040212 - (tim) [Makefile.in regress/sftp-badcmds.sh regress/test-exec.sh] @@ -1860,4 +1862,4 @@ - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. Report from murple@murple.net, diagnosis from dtucker@zip.com.au -$Id: ChangeLog,v 1.3230 2004/02/17 06:07:59 djm Exp $ +$Id: ChangeLog,v 1.3231 2004/02/17 09:33:52 djm Exp $ 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) krb5_error_code problem; krb5_principal princ; OM_uint32 maj_status, min_status; + int len; if (client->creds == NULL) { debug("No credentials stored"); @@ -178,11 +179,13 @@ ssh_gssapi_krb5_storecreds(ssh_gssapi_client *client) client->store.filename = xstrdup(krb5_cc_get_name(krb_context, ccache)); client->store.envvar = "KRB5CCNAME"; - client->store.envval = xstrdup(client->store.filename); + len = strlen(client->store.filename) + 6; + client->store.envval = xmalloc(len); + snprintf(client->store.envval, len, "FILE:%s", client->store.filename); #ifdef USE_PAM if (options.use_pam) - do_pam_putenv(client->store.envvar,client->store.envval); + do_pam_putenv(client->store.envvar, client->store.envval); #endif krb5_cc_close(krb_context, ccache);