diff options
author | Gerald Carter <jerry@samba.org> | 2007-03-01 04:35:31 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2007-03-01 04:35:31 +0000 |
commit | 03984b463596cd654bef952d024b96252909c7c7 (patch) | |
tree | 0a278d3c6c5f7cc395772bebc39c8930c134805c /source/nsswitch/winbindd_dual.c | |
parent | fec07a7bb897b3c3723d5cb047daa86b45e5e9fd (diff) | |
download | samba-03984b463596cd654bef952d024b96252909c7c7.tar.gz samba-03984b463596cd654bef952d024b96252909c7c7.tar.xz samba-03984b463596cd654bef952d024b96252909c7c7.zip |
r21619: * Pickup latest changes from SAMBA_3_0_25 (this will be it
for 3.0.25pre1 unless something blows up)
* Update release notes some more
Diffstat (limited to 'source/nsswitch/winbindd_dual.c')
-rw-r--r-- | source/nsswitch/winbindd_dual.c | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/source/nsswitch/winbindd_dual.c b/source/nsswitch/winbindd_dual.c index edb4fa504b1..6324de9a2d9 100644 --- a/source/nsswitch/winbindd_dual.c +++ b/source/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) { |