summaryrefslogtreecommitdiffstats
path: root/src/appl/bsd/forward.c
diff options
context:
space:
mode:
authorTheodore Tso <tytso@mit.edu>1994-08-18 23:03:05 +0000
committerTheodore Tso <tytso@mit.edu>1994-08-18 23:03:05 +0000
commit0bd95a2b721033bd543e1b5c040a9cfca45aa4c2 (patch)
tree3c03e94bf81db49f07df9d366551e3cd43e80eec /src/appl/bsd/forward.c
parentef9c510ceab1afc54bbe15a2a27a3dcb71b7513a (diff)
downloadkrb5-0bd95a2b721033bd543e1b5c040a9cfca45aa4c2.tar.gz
krb5-0bd95a2b721033bd543e1b5c040a9cfca45aa4c2.tar.xz
krb5-0bd95a2b721033bd543e1b5c040a9cfca45aa4c2.zip
Fix KRB4 handling (was broken, just like kdc directory)
Fix bug to allow cross-realm forwarded credentials to work. Store the forwarded credentials in a pid-dependent file, so that different rlogin sessions get different credentials caches. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4197 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/appl/bsd/forward.c')
-rw-r--r--src/appl/bsd/forward.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/appl/bsd/forward.c b/src/appl/bsd/forward.c
index 877cd66b0..47dd2adaa 100644
--- a/src/appl/bsd/forward.c
+++ b/src/appl/bsd/forward.c
@@ -163,7 +163,7 @@ get_for_creds(etype, sumtype, rhost, client, enc_key, forwardable, outbuf)
kdcoptions &= ~(KDC_OPT_FORWARDABLE);
if (retval = krb5_send_tgs(kdcoptions, &creds.times, etype, sumtype,
- creds.server,
+ tgt.server,
addrs,
creds.authdata,
0, /* no padata */
@@ -393,8 +393,14 @@ rd_and_store_for_creds(inbuf, ticket, lusername)
return -1;
}
- sprintf(ccname, "FILE:/tmp/krb5cc_%d", pwd->pw_uid);
-
+ /* Set the KRB5CCNAME ENV variable to keep sessions
+ * seperate. Use the process id of this process which is
+ * the rlogind or rshd. Set the environment variable as well.
+ */
+
+ sprintf(ccname, "FILE:/tmp/krb5cc_p%d", getpid());
+ setenv("KRB5CCNAME", ccname, 0);
+
if (retval = krb5_cc_resolve(ccname, &ccache)) {
return(retval);
}