diff options
author | Mark Eichin <eichin@mit.edu> | 1995-11-13 01:26:12 +0000 |
---|---|---|
committer | Mark Eichin <eichin@mit.edu> | 1995-11-13 01:26:12 +0000 |
commit | ebe421dfcd96d130bcc1ea8cbdff17bf27c7d1cf (patch) | |
tree | 64bb05d9acaeaea6ddff1f2556a1529cc509823f /src/appl/telnet/libtelnet | |
parent | ade6a0e649fdfb15bae1ec0d86dfe5c6d691e8ee (diff) | |
download | krb5-ebe421dfcd96d130bcc1ea8cbdff17bf27c7d1cf.zip krb5-ebe421dfcd96d130bcc1ea8cbdff17bf27c7d1cf.tar.gz krb5-ebe421dfcd96d130bcc1ea8cbdff17bf27c7d1cf.tar.bz2 |
* forward.c: set KRB5_DEFAULT_LIFE to 10 hours, not 8.
* forward.c (rd_and_store_for_creds): construct correct cache name
for forwarded tickets (based on tty name if available) and drop it
into the environment so login notices it.
also, fix typo in comment in kerberos5.c
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7090 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/appl/telnet/libtelnet')
-rw-r--r-- | src/appl/telnet/libtelnet/ChangeLog | 7 | ||||
-rw-r--r-- | src/appl/telnet/libtelnet/forward.c | 13 | ||||
-rw-r--r-- | src/appl/telnet/libtelnet/kerberos5.c | 2 |
3 files changed, 19 insertions, 3 deletions
diff --git a/src/appl/telnet/libtelnet/ChangeLog b/src/appl/telnet/libtelnet/ChangeLog index 041bed8..43ee616 100644 --- a/src/appl/telnet/libtelnet/ChangeLog +++ b/src/appl/telnet/libtelnet/ChangeLog @@ -1,3 +1,10 @@ +Sun Nov 12 04:48:41 1995 Mark W. Eichin <eichin@cygnus.com> + + * forward.c: set KRB5_DEFAULT_LIFE to 10 hours, not 8. + * forward.c (rd_and_store_for_creds): construct correct cache name + for forwarded tickets (based on tty name if available) and drop it + into the environment so login notices it. + Mon Oct 9 23:03:48 1995 Sam Hartman <hartmans@tertius.mit.edu> * kerberos5.c: make session_key a pointer, and use diff --git a/src/appl/telnet/libtelnet/forward.c b/src/appl/telnet/libtelnet/forward.c index 7e1d78e..c86a28a 100644 --- a/src/appl/telnet/libtelnet/forward.c +++ b/src/appl/telnet/libtelnet/forward.c @@ -30,6 +30,8 @@ #include "k5-int.h" +extern char *line; /* see sys_term.c */ + /* Decode, decrypt and store the forwarded creds in the local ccache. */ krb5_error_code rd_and_store_for_creds(context, auth_context, inbuf, ticket, lusername) @@ -51,7 +53,14 @@ rd_and_store_for_creds(context, auth_context, inbuf, ticket, lusername) if (retval = krb5_rd_cred(context, auth_context, inbuf, &creds, NULL)) return(retval); - sprintf(ccname, "FILE:/tmp/krb5cc_%d", pwd->pw_uid); + if (*line) { + /* code from appl/bsd/login.c since it will do the same */ + sprintf(ccname, "FILE:/tmp/krb5cc_%s", strrchr(line, '/')+1); + } else { + /* since default will be based on uid and we haven't changed yet */ + sprintf(ccname, "FILE:/tmp/krb5cc_%d", pwd->pw_uid); + } + setenv(KRB5_ENV_CCNAME, ccname, 1); if (retval = krb5_cc_resolve(context, ccname, &ccache)) goto cleanup; @@ -71,7 +80,7 @@ cleanup: } -#define KRB5_DEFAULT_LIFE 60*60*8 /* 8 hours */ +#define KRB5_DEFAULT_LIFE 60*60*10 /* 10 hours */ /* helper function: convert flags to necessary KDC options */ #define flags2options(flags) (flags & KDC_TKT_COMMON_MASK) diff --git a/src/appl/telnet/libtelnet/kerberos5.c b/src/appl/telnet/libtelnet/kerberos5.c index db9912b..6c8969f 100644 --- a/src/appl/telnet/libtelnet/kerberos5.c +++ b/src/appl/telnet/libtelnet/kerberos5.c @@ -31,7 +31,7 @@ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN I<F ADVISED OF THE POSSIBILITY OF + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ |