diff options
author | Gerald Carter <jerry@samba.org> | 2007-03-01 03:16:38 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:18:18 -0500 |
commit | b1f4259cd5ecebfe7e4c4eb73aa32e1ed9b366b8 (patch) | |
tree | 8c49ed786823f88b9a0bce54eb848d316159f34f /source3/nsswitch/winbindd_dual.c | |
parent | 6fb6adba274f6473e4247a5e30d1e496873077a9 (diff) | |
download | samba-b1f4259cd5ecebfe7e4c4eb73aa32e1ed9b366b8.tar.gz samba-b1f4259cd5ecebfe7e4c4eb73aa32e1ed9b366b8.tar.bz2 samba-b1f4259cd5ecebfe7e4c4eb73aa32e1ed9b366b8.zip |
r21616: Delay initialization of idmap and nss_info backends until necessary
so they can honor the offline logon state.
(This used to be commit 15b13dfe81e861b94077c94b80117a85a5ffb999)
Diffstat (limited to 'source3/nsswitch/winbindd_dual.c')
-rw-r--r-- | source3/nsswitch/winbindd_dual.c | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/source3/nsswitch/winbindd_dual.c b/source3/nsswitch/winbindd_dual.c index edb4fa504b..6324de9a2d 100644 --- a/source3/nsswitch/winbindd_dual.c +++ b/source3/nsswitch/winbindd_dual.c @@ -502,10 +502,26 @@ void winbind_msg_offline(int msg_type, struct process_id src, } DEBUG(5,("winbind_msg_offline: marking %s offline.\n", domain->name)); set_domain_offline(domain); + + /* Send an offline message to the idmap child when our + primary domain goes offline */ + + if ( domain->primary ) { + struct winbindd_child *idmap = idmap_child(); + + if ( idmap->pid != 0 ) { + message_send_pid(pid_to_procid(idmap->pid), + MSG_WINBIND_OFFLINE, + domain->name, + strlen(domain->name)+1, + False); + } + } } for (child = children; child != NULL; child = child->next) { - /* Don't send message to idmap child. */ + /* Don't send message to idmap child. We've already + done so above. */ if (!child->domain || (child == idmap_child())) { continue; } @@ -556,6 +572,22 @@ void winbind_msg_online(int msg_type, struct process_id src, winbindd_flush_negative_conn_cache(domain); set_domain_online_request(domain); + + /* Send an offline message to the idmap child when our + primary domain goes offline */ + + if ( domain->primary ) { + struct winbindd_child *idmap = idmap_child(); + + if ( idmap->pid != 0 ) { + message_send_pid(pid_to_procid(idmap->pid), + MSG_WINBIND_ONLINE, + domain->name, + strlen(domain->name)+1, + False); + } + + } } for (child = children; child != NULL; child = child->next) { |