[SCM] Samba Shared Repository - branch v3-2-test updated -
release-3-2-0pre2-3358-ge443cfa
Jeremy Allison
jra at samba.org
Wed Jan 14 19:13:59 GMT 2009
The branch, v3-2-test has been updated
via e443cfaa25c26a7761113bdde9b7453a97f8e5d5 (commit)
from 3ac7289b4d7fef830b05a8cb351476480681b28a (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit e443cfaa25c26a7761113bdde9b7453a97f8e5d5
Author: Bo Yang <boyang at novell.com>
Date: Wed Jan 14 11:13:27 2009 -0800
Don't send message to any other child in child process.
-----------------------------------------------------------------------
Summary of changes:
source/winbindd/winbindd_dual.c | 34 +++++++++++++++++++++++++++++++++-
1 files changed, 33 insertions(+), 1 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/winbindd/winbindd_dual.c b/source/winbindd/winbindd_dual.c
index 9e2e18f..49978c2 100644
--- a/source/winbindd/winbindd_dual.c
+++ b/source/winbindd/winbindd_dual.c
@@ -1101,7 +1101,31 @@ bool winbindd_reinit_after_fork(const char *logfilename)
TALLOC_FREE(request->reply_timeout_event);
}
TALLOC_FREE(cl->lockout_policy_event);
- }
+
+ /* Children should never be able to send
+ * each other messages, all messages must
+ * go through the parent.
+ */
+ cl->pid = (pid_t)0;
+ }
+ /*
+ * This is a little tricky, children must not
+ * send an MSG_WINBIND_ONLINE message to idmap_child().
+ * If we are in a child of our primary domain or
+ * in the process created by fork_child_dc_connect(),
+ * and the primary domain cannot go online,
+ * fork_child_dc_connection() sends MSG_WINBIND_ONLINE
+ * periodically to idmap_child().
+ *
+ * The sequence is, fork_child_dc_connect() ---> getdcs() --->
+ * get_dc_name_via_netlogon() ---> cm_connect_netlogon()
+ * ---> init_dc_connection() ---> cm_open_connection --->
+ * set_domain_online(), sends MSG_WINBIND_ONLINE to
+ * idmap_child(). Disallow children sending messages
+ * to each other, all messages must go through the parent.
+ */
+ cl = idmap_child();
+ cl->pid = (pid_t)0;
return true;
}
@@ -1194,6 +1218,14 @@ static bool fork_domain_child(struct winbindd_child *child)
}
}
}
+
+ /*
+ * We are in idmap child, make sure that we set the
+ * check_online_event to bring primary domain online.
+ */
+ if (child == idmap_child()) {
+ set_domain_online_request(primary_domain);
+ }
/* We might be in the idmap child...*/
if (child->domain && !(child->domain->internal) &&
--
Samba Shared Repository
More information about the samba-cvs
mailing list