summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2007-06-21 13:05:56 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:23:29 -0500
commitfd881f40670792452247de5f6711b5a943612f03 (patch)
tree125100021d8073e8eae8a565a541a38f66a19a9d /source3
parent36fc39d845f5cf8d3a87a58e8ec7e14e7542e60f (diff)
downloadsamba-fd881f40670792452247de5f6711b5a943612f03.tar.gz
samba-fd881f40670792452247de5f6711b5a943612f03.tar.bz2
samba-fd881f40670792452247de5f6711b5a943612f03.zip
r23564: Handle MSG_DUMP_EVENT_LIST only in winbindd for now.
Guenther (This used to be commit 2592e68a43a73474e1bb53f83642c864fd159b45)
Diffstat (limited to 'source3')
-rw-r--r--source3/nsswitch/winbindd.c3
-rw-r--r--source3/nsswitch/winbindd_dual.c39
2 files changed, 42 insertions, 0 deletions
diff --git a/source3/nsswitch/winbindd.c b/source3/nsswitch/winbindd.c
index c20f589434..2eedbcbd0f 100644
--- a/source3/nsswitch/winbindd.c
+++ b/source3/nsswitch/winbindd.c
@@ -1159,6 +1159,9 @@ int main(int argc, char **argv, char **envp)
messaging_register(winbind_messaging_context(), NULL,
MSG_WINBIND_ONLINESTATUS, winbind_msg_onlinestatus);
+ messaging_register(winbind_messaging_context(), NULL,
+ MSG_DUMP_EVENT_LIST, winbind_msg_dump_event_list);
+
poptFreeContext(pc);
netsamlogon_cache_init(); /* Non-critical */
diff --git a/source3/nsswitch/winbindd_dual.c b/source3/nsswitch/winbindd_dual.c
index 2c2ef92046..cc15398d42 100644
--- a/source3/nsswitch/winbindd_dual.c
+++ b/source3/nsswitch/winbindd_dual.c
@@ -698,6 +698,29 @@ void winbind_msg_onlinestatus(struct messaging_context *msg_ctx,
}
}
+void winbind_msg_dump_event_list(struct messaging_context *msg_ctx,
+ void *private_data,
+ uint32_t msg_type,
+ struct server_id server_id,
+ DATA_BLOB *data)
+{
+ struct winbindd_child *child;
+
+ DEBUG(10,("winbind_msg_dump_event_list received\n"));
+
+ dump_event_list(winbind_event_context());
+
+ for (child = children; child != NULL; child = child->next) {
+
+ DEBUG(10,("winbind_msg_dump_event_list: sending message to pid %u\n",
+ (unsigned int)child->pid));
+
+ messaging_send_buf(msg_ctx, pid_to_procid(child->pid),
+ MSG_DUMP_EVENT_LIST,
+ NULL, 0);
+ }
+
+}
static void account_lockout_policy_handler(struct event_context *ctx,
struct timed_event *te,
@@ -885,6 +908,18 @@ static void child_msg_onlinestatus(struct messaging_context *msg_ctx,
talloc_destroy(mem_ctx);
}
+static void child_msg_dump_event_list(struct messaging_context *msg,
+ void *private_data,
+ uint32_t msg_type,
+ struct server_id server_id,
+ DATA_BLOB *data)
+{
+ DEBUG(5,("child_msg_dump_event_list received\n"));
+
+ dump_event_list(winbind_event_context());
+}
+
+
static BOOL fork_domain_child(struct winbindd_child *child)
{
int fdpair[2];
@@ -958,6 +993,8 @@ static BOOL fork_domain_child(struct winbindd_child *child)
MSG_WINBIND_ONLINE, NULL);
messaging_deregister(winbind_messaging_context(),
MSG_WINBIND_ONLINESTATUS, NULL);
+ messaging_deregister(winbind_messaging_context(),
+ MSG_DUMP_EVENT_LIST, NULL);
/* Handle online/offline messages. */
messaging_register(winbind_messaging_context(), NULL,
@@ -966,6 +1003,8 @@ static BOOL fork_domain_child(struct winbindd_child *child)
MSG_WINBIND_ONLINE, child_msg_online);
messaging_register(winbind_messaging_context(), NULL,
MSG_WINBIND_ONLINESTATUS, child_msg_onlinestatus);
+ messaging_register(winbind_messaging_context(), NULL,
+ MSG_DUMP_EVENT_LIST, child_msg_dump_event_list);
if ( child->domain ) {
child->domain->startup = True;