s3-winbind: Register handlers for domain online/offline messages.
authorAndreas Schneider <asn@cryptomilk.org>
Thu, 10 Oct 2013 08:02:27 +0000 (10:02 +0200)
committerKarolin Seeger <kseeger@samba.org>
Mon, 14 Oct 2013 08:14:21 +0000 (10:14 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=10194

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
(cherry picked from commit fc5941622010843d823b5c245eccc68d1d3bce19)

source3/winbindd/winbindd.c
source3/winbindd/winbindd_dual.c

index 21cc5f277d0ba548f18707f277e0d8266446ae12..839655ee3a6f48117c63e5a932062b72c71b41d3 100644 (file)
@@ -1137,6 +1137,12 @@ void winbindd_register_handlers(bool foreground)
        messaging_register(winbind_messaging_context(), NULL,
                           MSG_WINBIND_ONLINESTATUS, winbind_msg_onlinestatus);
 
+       /* Handle domain online/offline messages for domains */
+       messaging_register(winbind_messaging_context(), NULL,
+                          MSG_WINBIND_DOMAIN_OFFLINE, winbind_msg_domain_offline);
+       messaging_register(winbind_messaging_context(), NULL,
+                          MSG_WINBIND_DOMAIN_ONLINE, winbind_msg_domain_online);
+
        messaging_register(winbind_messaging_context(), NULL,
                           MSG_DUMP_EVENT_LIST, winbind_msg_dump_event_list);
 
index 60b15e3fe45b55d649148a02618a39f6e168725d..3c0e75713a95378dc6880ac419604a2ba529ef8c 100644 (file)
@@ -1223,6 +1223,11 @@ NTSTATUS winbindd_reinit_after_fork(const struct winbindd_child *myself,
        messaging_deregister(winbind_messaging_context(),
                             MSG_DEBUG, NULL);
 
+       messaging_deregister(winbind_messaging_context(),
+                            MSG_WINBIND_DOMAIN_OFFLINE, NULL);
+       messaging_deregister(winbind_messaging_context(),
+                            MSG_WINBIND_DOMAIN_ONLINE, NULL);
+
        /* We have destroyed all events in the winbindd_event_context
         * in reinit_after_fork(), so clean out all possible pending
         * event pointers. */