summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2007-03-01 03:15:22 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:18:17 -0500
commit6fb6adba274f6473e4247a5e30d1e496873077a9 (patch)
tree784a3fb83e01e0bcf51b8e3e91dc56d933480c33 /source3/nsswitch
parent5e88cb83b1871749ed786fc10600e093ba88d154 (diff)
downloadsamba-6fb6adba274f6473e4247a5e30d1e496873077a9.tar.gz
samba-6fb6adba274f6473e4247a5e30d1e496873077a9.tar.bz2
samba-6fb6adba274f6473e4247a5e30d1e496873077a9.zip
r21615: don't wait until the last second to try to renew a Krb5 ticket as it is took late
(This used to be commit 5575845952171aaeae81cf65fe32be33cc1b45ba)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/winbindd_cred_cache.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/nsswitch/winbindd_cred_cache.c b/source3/nsswitch/winbindd_cred_cache.c
index 0951a41f33..600409420a 100644
--- a/source3/nsswitch/winbindd_cred_cache.c
+++ b/source3/nsswitch/winbindd_cred_cache.c
@@ -215,7 +215,8 @@ static void krb5_ticket_gain_handler(struct event_context *event_ctx,
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 @@ NTSTATUS add_ccache_to_list(const char *princ_name,
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);