svn commit: samba r18473 - in branches/SAMBA_3_0/source: lib
nsswitch
jra at samba.org
jra at samba.org
Wed Sep 13 13:55:19 GMT 2006
Author: jra
Date: 2006-09-13 13:55:19 +0000 (Wed, 13 Sep 2006)
New Revision: 18473
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18473
Log:
Once we go online, trigger a "get krb5 ticket event"
immediately if we were waiting on one.
Jeremy.
Modified:
branches/SAMBA_3_0/source/lib/events.c
branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c
Changeset:
Modified: branches/SAMBA_3_0/source/lib/events.c
===================================================================
--- branches/SAMBA_3_0/source/lib/events.c 2006-09-13 13:50:51 UTC (rev 18472)
+++ branches/SAMBA_3_0/source/lib/events.c 2006-09-13 13:55:19 UTC (rev 18473)
@@ -58,7 +58,8 @@
te->handler = handler;
te->private_data = private_data;
- /* keep the list ordered */
+ /* keep the list ordered - this is NOT guarenteed as event times
+ may be changed after insertion */
last_te = NULL;
for (cur_te = timed_events; cur_te; cur_te = cur_te->next) {
/* if the new event comes before the current one break */
@@ -115,3 +116,17 @@
return to_ret;
}
+
+int set_event_dispatch_time(const char *event_name, struct timeval when)
+{
+ int num_events = 0;
+ struct timed_event *te;
+
+ for (te = timed_events; te; te = te->next) {
+ if (strcmp(event_name, te->event_name) == 0) {
+ te->when = when;
+ num_events++;
+ }
+ }
+ return num_events;
+}
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c 2006-09-13 13:50:51 UTC (rev 18472)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c 2006-09-13 13:55:19 UTC (rev 18473)
@@ -146,6 +146,8 @@
void set_domain_online(struct winbindd_domain *domain)
{
+ struct timeval now;
+
DEBUG(10,("set_domain_online: called for domain %s\n",
domain->name ));
@@ -155,6 +157,10 @@
return;
}
+ /* If we are waiting to get a krb5 ticket, trigger immediately. */
+ GetTimeOfDay(&now);
+ set_event_dispatch_time("krb5_ticket_gain_handler", now);
+
domain->online = True;
}
More information about the samba-cvs
mailing list