[SCM] Samba Shared Repository - branch v3-0-test updated -
release-3-0-32-102-gab29d6c
Jeremy Allison
jra at samba.org
Sun Jan 11 04:05:22 GMT 2009
The branch, v3-0-test has been updated
via ab29d6c6d349352db017d3046aeaee59e33745f4 (commit)
from 194425f8074e2cfd5893499099614666f8d8ecd9 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-0-test
- Log -----------------------------------------------------------------
commit ab29d6c6d349352db017d3046aeaee59e33745f4
Author: Jeremy Allison <jra at samba.org>
Date: Sat Jan 10 20:04:27 2009 -0800
Fix logic bug introduce in backport of ccache_regain_all_now, sync with
3.3 implementation.
Jeremy.
-----------------------------------------------------------------------
Summary of changes:
source/nsswitch/winbindd_cred_cache.c | 39 +++++++++++++++++++-------------
1 files changed, 23 insertions(+), 16 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/nsswitch/winbindd_cred_cache.c b/source/nsswitch/winbindd_cred_cache.c
index a0f7237..7b215a5 100644
--- a/source/nsswitch/winbindd_cred_cache.c
+++ b/source/nsswitch/winbindd_cred_cache.c
@@ -100,25 +100,32 @@ void ccache_regain_all_now(void)
struct WINBINDD_CCACHE_ENTRY *cur;
struct timeval t = timeval_current();
- cur = ccache_list;
- while (cur) {
- TALLOC_FREE(cur->event);
- if (cur->refresh_time) {
- cur->event = event_add_timed(winbind_event_context(),
- cur, t,
- "krb5_ticket_refresh_handler",
- krb5_ticket_refresh_handler,
- cur);
+ for (cur = ccache_list; cur; cur = cur->next) {
+ struct timed_event *new_event;
+
+ /*
+ * if refresh_time is 0, we know that the
+ * the event has the krb5_ticket_gain_handler
+ */
+ if (cur->refresh_time == 0) {
+ new_event = event_add_timed(winbind_event_context(),
+ cur, t,
+ "krb5_ticket_gain_handler",
+ krb5_ticket_gain_handler,
+ cur);
} else {
- cur->event = event_add_timed(winbind_event_context(),
- cur, t,
- "krb5_ticket_gain_handler",
- krb5_ticket_gain_handler,
- cur);
+ new_event = event_add_timed(winbind_event_context(),
+ cur, t,
+ "krb5_ticket_refresh_handler",
+ krb5_ticket_refresh_handler,
+ cur);
}
- if (!cur->event) {
- DEBUG(0, ("ccache_regain_all_now: out of memory!!\n"));
+ if (!new_event) {
+ continue;
}
+
+ TALLOC_FREE(cur->event);
+ cur->event = new_event;
}
return;
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list