svn commit: samba r23564 - in branches: SAMBA_3_0/source/nsswitch
SAMBA_3_0_26/source/nsswitch
gd at samba.org
gd at samba.org
Thu Jun 21 13:05:57 GMT 2007
Author: gd
Date: 2007-06-21 13:05:56 +0000 (Thu, 21 Jun 2007)
New Revision: 23564
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23564
Log:
Handle MSG_DUMP_EVENT_LIST only in winbindd for now.
Guenther
Modified:
branches/SAMBA_3_0/source/nsswitch/winbindd.c
branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c
branches/SAMBA_3_0_26/source/nsswitch/winbindd.c
branches/SAMBA_3_0_26/source/nsswitch/winbindd_dual.c
Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd.c 2007-06-21 13:04:28 UTC (rev 23563)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd.c 2007-06-21 13:05:56 UTC (rev 23564)
@@ -1159,6 +1159,9 @@
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 */
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c 2007-06-21 13:04:28 UTC (rev 23563)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_dual.c 2007-06-21 13:05:56 UTC (rev 23564)
@@ -698,7 +698,30 @@
}
}
+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,
const struct timeval *now,
@@ -885,6 +908,18 @@
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 @@
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 @@
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;
Modified: branches/SAMBA_3_0_26/source/nsswitch/winbindd.c
===================================================================
--- branches/SAMBA_3_0_26/source/nsswitch/winbindd.c 2007-06-21 13:04:28 UTC (rev 23563)
+++ branches/SAMBA_3_0_26/source/nsswitch/winbindd.c 2007-06-21 13:05:56 UTC (rev 23564)
@@ -1120,6 +1120,9 @@
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 */
Modified: branches/SAMBA_3_0_26/source/nsswitch/winbindd_dual.c
===================================================================
--- branches/SAMBA_3_0_26/source/nsswitch/winbindd_dual.c 2007-06-21 13:04:28 UTC (rev 23563)
+++ branches/SAMBA_3_0_26/source/nsswitch/winbindd_dual.c 2007-06-21 13:05:56 UTC (rev 23564)
@@ -698,7 +698,30 @@
}
}
+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,
const struct timeval *now,
@@ -885,6 +908,18 @@
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 @@
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 @@
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;
More information about the samba-cvs
mailing list