r21056: Moving the set_domain_online_request to fork_domain_child() (formerly
authorGünther Deschner <gd@samba.org>
Tue, 30 Jan 2007 16:51:42 +0000 (16:51 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:17:30 +0000 (12:17 -0500)
lived in trustdom_recv().

Jeremy, this is the better place I think but please check.

Guenther

source/nsswitch/winbindd_dual.c

index 62193c0b69dc95af19534c78b78a0bf36dfaf5a7..22786df601e0f2c58cbf68799b05cb069b92f4fb 100644 (file)
@@ -842,15 +842,6 @@ static BOOL fork_domain_child(struct winbindd_child *child)
        /* The child is ok with online/offline messages now. */
        message_unblock();
 
-       if (child->domain != NULL && lp_winbind_offline_logon()) {
-               /* We might be in the idmap child...*/
-               child->lockout_policy_event = event_add_timed(
-                       winbind_event_context(), NULL, timeval_zero(),
-                       "account_lockout_policy_handler",
-                       account_lockout_policy_handler,
-                       child);
-       }
-
        /* Handle online/offline messages. */
        message_register(MSG_WINBIND_OFFLINE,child_msg_offline);
        message_register(MSG_WINBIND_ONLINE,child_msg_online);
@@ -878,6 +869,18 @@ static BOOL fork_domain_child(struct winbindd_child *child)
        cancel_named_event(winbind_event_context(),
                           "krb5_ticket_refresh_handler");
 
+       /* We might be in the idmap child...*/
+       if (child->domain && lp_winbind_offline_logon()) {
+
+               set_domain_online_request(child->domain);
+
+               child->lockout_policy_event = event_add_timed(
+                       winbind_event_context(), NULL, timeval_zero(),
+                       "account_lockout_policy_handler",
+                       account_lockout_policy_handler,
+                       child);
+       }
+
        while (1) {
 
                int ret;