summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/lib/events.c15
-rw-r--r--source3/nsswitch/winbindd_dual.c10
2 files changed, 23 insertions, 2 deletions
diff --git a/source3/lib/events.c b/source3/lib/events.c
index d6f3c32828..66aefa3b52 100644
--- a/source3/lib/events.c
+++ b/source3/lib/events.c
@@ -130,3 +130,18 @@ int set_event_dispatch_time(const char *event_name, struct timeval when)
}
return num_events;
}
+
+/* Returns 1 if event was found and cancelled, 0 otherwise. */
+
+int cancel_named_event(const char *event_name)
+{
+ struct timed_event *te;
+
+ for (te = timed_events; te; te = te->next) {
+ if (strcmp(event_name, te->event_name) == 0) {
+ TALLOC_FREE(te);
+ return 1;
+ }
+ }
+ return 0;
+}
diff --git a/source3/nsswitch/winbindd_dual.c b/source3/nsswitch/winbindd_dual.c
index 7a699edb25..1a1afcb404 100644
--- a/source3/nsswitch/winbindd_dual.c
+++ b/source3/nsswitch/winbindd_dual.c
@@ -845,16 +845,22 @@ static BOOL fork_domain_child(struct winbindd_child *child)
child->domain->startup_time = time(NULL);
}
+ /* Ensure we have no pending check_online events other
+ than one for this domain. */
+
for (domain = domain_list(); domain; domain = domain->next) {
if (domain != child->domain) {
- /* Ensure we have no "check_online" events pending
- that are not on this domain. */
if (domain->check_online_event) {
TALLOC_FREE(domain->check_online_event);
}
}
}
+ /* Ensure we're not handling an event inherited from
+ our parent. */
+
+ cancel_named_event("krb5_ticket_refresh_handler");
+
while (1) {
int ret;