From: Sam Hartman Date: Mon, 27 Jul 1998 05:36:33 +0000 (+0000) Subject: Fix login so that it will properly handle forwarded creds; X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e39cdf292b0df2733e080024b1340779adb4b864;p=thirdparty%2Fkrb5.git Fix login so that it will properly handle forwarded creds; it didn't destroy the ccache, so that copying into the new ccache failed. Also, it didn't try to convert forwarded creds. Remove marc's debugging printf in krlogin.c git-svn-id: svn://anonsvn.mit.edu/krb5/branches/marc-3des@10751 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/appl/bsd/ChangeLog b/src/appl/bsd/ChangeLog index 1ccedefd45..e25c6652a6 100644 --- a/src/appl/bsd/ChangeLog +++ b/src/appl/bsd/ChangeLog @@ -1,3 +1,8 @@ +Sun Jul 26 23:46:36 1998 Sam Hartman + + * login.c (main): Allow krb524 conversion for forwarded tickets + (try_convert524): Don't check to see if we have tickets here; caller does that and actually gets it right. + 1998-05-26 Theodore Ts'o * login.c (dolastlog): BSD 4.4 systems don't have lastlog.h, but diff --git a/src/appl/bsd/krlogin.c b/src/appl/bsd/krlogin.c index 7c78032f22..ae875f15cd 100644 --- a/src/appl/bsd/krlogin.c +++ b/src/appl/bsd/krlogin.c @@ -1207,7 +1207,6 @@ void oob() recv(rem, &mark, 1, MSG_OOB); - printf("oob mark = %ux\n", mark); if (mark & TIOCPKT_WINDOW) { /* @@ -1361,8 +1360,8 @@ fd_set readset, excset, writeset; { int x; - if (!ioctl(rem, FIONREAD, &x)) - printf("ioctl(rem, FIONREAD) == %d\n", x); + if (!ioctl(rem, FIONREAD, &x)); + } rcvcnt = rcmd_stream_read(rem, rcvbuf, sizeof (rcvbuf)); diff --git a/src/appl/bsd/login.c b/src/appl/bsd/login.c index d8b80bce58..c8017cc77b 100644 --- a/src/appl/bsd/login.c +++ b/src/appl/bsd/login.c @@ -630,8 +630,6 @@ try_convert524 (kcontext, me) krb5_creds increds, *v5creds; CREDENTIALS v4creds; - if (!got_v5_tickets) - return 0; /* or do this directly with krb524_convert_creds_kdc */ krb524_init_ets(kcontext); @@ -849,7 +847,7 @@ void destroy_tickets() if (login_krb5_get_tickets) { if(!krb5_cc_default(kcontext, &cache)) - krb5_cc_destroy (kcontext, cache); + krb5_cc_destroy (kcontext, cache); } #endif #ifdef KRB4_GET_TICKETS @@ -1450,7 +1448,7 @@ int main(argc, argv) #if defined(KRB5_GET_TICKETS) && defined(KRB4_CONVERT) if (login_krb4_convert && !got_v4_tickets) { - if (got_v5_tickets) + if (got_v5_tickets||forwarded_v5_tickets) try_convert524 (kcontext, me); } #endif @@ -1588,7 +1586,7 @@ int main(argc, argv) #endif /* KRB4_GET_TICKETS */ #ifdef KRB5_GET_TICKETS - if (got_v5_tickets) + if (forwarded_v5_tickets) destroy_tickets(); else #endif