Author: jerry Date: 2007-03-01 03:15:22 +0000 (Thu, 01 Mar 2007) New Revision: 21615
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=21615 Log: don't wait until the last second to try to renew a Krb5 ticket as it is took late Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c Changeset: Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c =================================================================== --- branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c 2007-03-01 03:14:20 UTC (rev 21614) +++ branches/SAMBA_3_0/source/nsswitch/winbindd_cred_cache.c 2007-03-01 03:15:22 UTC (rev 21615) @@ -215,7 +215,8 @@ DEBUG(10,("krb5_ticket_gain_handler: successful kinit for: %s in ccache: %s\n", entry->principal_name, entry->ccname)); - new_start = entry->refresh_time; + /* Renew at 1/2 the expiration time */ + new_start = entry->refresh_time / 2; goto got_ticket; } @@ -369,8 +370,9 @@ krb5_ticket_gain_handler, entry); } else { + /* Renew at 1/2 the ticket expiration time */ entry->event = event_add_timed(winbind_event_context(), entry, - timeval_set((ticket_end - 1), 0), + timeval_set((ticket_end - 1)/2, 0), "krb5_ticket_refresh_handler", krb5_ticket_refresh_handler, entry);
