diff options
-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 041bed8a2..43ee6162e 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 7e1d78e8d..c86a28a65 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 db9912b6f..6c8969f1f 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. */ |