[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]
krb5_error_code problem;
krb5_principal princ;
OM_uint32 maj_status, min_status;
+ int len;
if (client->creds == NULL) {
debug("No credentials stored");
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);