[Pkg-samba-maint] [samba] 06/29: s3-winbind: Send online/offline message of the domain to the parent.

Jelmer Vernooij jelmer at moszumanska.debian.org
Fri Dec 6 23:16:44 UTC 2013


This is an automated email from the git hooks/post-receive script.

jelmer pushed a commit to branch samba_4.1
in repository samba.

commit 06c6866f2d3ffb781a270438db85bd6d61dce39c
Author: Andreas Schneider <asn at cryptomilk.org>
Date:   Thu Oct 10 10:03:32 2013 +0200

    s3-winbind: Send online/offline message of the domain to the parent.
    
    https://bugzilla.samba.org/show_bug.cgi?id=10194
    
    Signed-off-by: Andreas Schneider <asn at cryptomilk.org>
    Reviewed-by: Volker Lendecke <vl at samba.org>
    
    Autobuild-User(master): Volker Lendecke <vl at samba.org>
    Autobuild-Date(master): Fri Oct 11 13:37:56 CEST 2013 on sn-devel-104
    
    (cherry picked from commit 275f6586c4d4547978c6ff2f04670b0d8f89fd4b)
    
    Autobuild-User(v4-1-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-1-test): Mon Oct 14 12:06:45 CEST 2013 on sn-devel-104
---
 source3/winbindd/winbindd_cm.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index 488876f..61917db 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -387,6 +387,8 @@ void winbind_msg_domain_online(struct messaging_context *msg_ctx,
 
 void set_domain_offline(struct winbindd_domain *domain)
 {
+	pid_t parent_pid = getppid();
+
 	DEBUG(10,("set_domain_offline: called for domain %s\n",
 		domain->name ));
 
@@ -434,6 +436,15 @@ void set_domain_offline(struct winbindd_domain *domain)
 	DEBUG(10,("set_domain_offline: added event handler for domain %s\n",
 		domain->name ));
 
+	/* Send a message to the parent that the domain is offline. */
+	if (parent_pid > 1 && !domain->internal) {
+		messaging_send_buf(winbind_messaging_context(),
+				   pid_to_procid(parent_pid),
+				   MSG_WINBIND_DOMAIN_OFFLINE,
+				   (uint8 *)domain->name,
+				   strlen(domain->name) + 1);
+	}
+
 	/* Send an offline message to the idmap child when our
 	   primary domain goes offline */
 
@@ -458,6 +469,8 @@ void set_domain_offline(struct winbindd_domain *domain)
 
 static void set_domain_online(struct winbindd_domain *domain)
 {
+	pid_t parent_pid = getppid();
+
 	DEBUG(10,("set_domain_online: called for domain %s\n",
 		domain->name ));
 
@@ -509,6 +522,15 @@ static void set_domain_online(struct winbindd_domain *domain)
 
 	domain->online = True;
 
+	/* Send a message to the parent that the domain is online. */
+	if (parent_pid > 1 && !domain->internal) {
+		messaging_send_buf(winbind_messaging_context(),
+				   pid_to_procid(parent_pid),
+				   MSG_WINBIND_DOMAIN_ONLINE,
+				   (uint8 *)domain->name,
+				   strlen(domain->name) + 1);
+	}
+
 	/* Send an online message to the idmap child when our
 	   primary domain comes online */
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-samba/samba.git




More information about the Pkg-samba-maint mailing list