summaryrefslogtreecommitdiffstats
path: root/source/winbindd/winbindd_dual.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-06-02 15:26:37 -0700
committerJeremy Allison <jra@samba.org>2008-06-02 15:26:37 -0700
commit0621c7c8161b7b94cc9249ab3e71855d3030b6fb (patch)
treea2f8763190231722f4c613d3ccfd7056e4f9b6d3 /source/winbindd/winbindd_dual.c
parent359b8d53d839bbf503915004c52bce9f09e6d785 (diff)
downloadsamba-0621c7c8161b7b94cc9249ab3e71855d3030b6fb.tar.gz
samba-0621c7c8161b7b94cc9249ab3e71855d3030b6fb.tar.xz
samba-0621c7c8161b7b94cc9249ab3e71855d3030b6fb.zip
Fix by Bo Yang <boyang@novell.com> for bug with winbindd trusted domain child
not keeping primary domain online status up to date. Jeremy.
Diffstat (limited to 'source/winbindd/winbindd_dual.c')
-rw-r--r--source/winbindd/winbindd_dual.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/source/winbindd/winbindd_dual.c b/source/winbindd/winbindd_dual.c
index b8c0ab9113f..29849e9e78d 100644
--- a/source/winbindd/winbindd_dual.c
+++ b/source/winbindd/winbindd_dual.c
@@ -965,6 +965,7 @@ static bool fork_domain_child(struct winbindd_child *child)
int fdpair[2];
struct winbindd_cli_state state;
struct winbindd_domain *domain;
+ struct winbindd_domain *primary_domain = NULL;
if (child->domain) {
DEBUG(10, ("fork_domain_child called for domain '%s'\n",
@@ -1060,10 +1061,13 @@ static bool fork_domain_child(struct winbindd_child *child)
}
/* Ensure we have no pending check_online events other
- than one for this domain. */
+ than one for this domain or the primary domain. */
for (domain = domain_list(); domain; domain = domain->next) {
- if (domain != child->domain) {
+ if (domain->primary) {
+ primary_domain = domain;
+ }
+ if ((domain != child->domain) && !domain->primary) {
TALLOC_FREE(domain->check_online_event);
}
}
@@ -1080,6 +1084,18 @@ static bool fork_domain_child(struct winbindd_child *child)
set_domain_online_request(child->domain);
+ if (primary_domain != child->domain) {
+ /* We need to talk to the primary
+ * domain as well as the trusted
+ * domain inside a trusted domain
+ * child.
+ * See the code in :
+ * set_dc_type_and_flags_trustinfo()
+ * for details.
+ */
+ set_domain_online_request(primary_domain);
+ }
+
child->lockout_policy_event = event_add_timed(
winbind_event_context(), NULL, timeval_zero(),
"account_lockout_policy_handler",