[SCM] Samba Shared Repository - branch v4-0-test updated

Karolin Seeger kseeger at samba.org
Mon Oct 14 04:11:04 MDT 2013


The branch, v4-0-test has been updated
       via  a1d0339 s3-winbind: Send online/offline message of the domain to the parent.
       via  ddd3302 s3-winbind: Register handlers for domain online/offline messages.
       via  16dcb6c s3-winbind: Add functions for domain online/offline handling.
       via  e052e65 idl: Add a new message for winbind domain states.
       via  5a65f86 Fix bug #10187 - Missing talloc_free can leak stackframe in error path.
       via  c388828 s4:smb_server: call irpc_add_name() at startup (bug #9905)
       via  2c6ef14 s4:rpc_server: call irpc_add_name() at startup (bug #9905)
       via  95d66d0 s4:ldap_server: call irpc_add_name() at startup (bug #9905)
      from  acf4fe4 doc: Update documentation of pam_winbind krb5 support.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test


- Log -----------------------------------------------------------------
commit a1d0339908ec80d39ba5c6d5a82bc2f39f2ebf39
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-0-test): Karolin Seeger <kseeger at samba.org>
    Autobuild-Date(v4-0-test): Mon Oct 14 12:10:14 CEST 2013 on sn-devel-104

commit ddd330241cbea366f1fb8a10fa936091aff185a6
Author: Andreas Schneider <asn at cryptomilk.org>
Date:   Thu Oct 10 10:02:27 2013 +0200

    s3-winbind: Register handlers for domain online/offline messages.
    
    BUG: 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>
    
    (cherry picked from commit fc5941622010843d823b5c245eccc68d1d3bce19)

commit 16dcb6cf028e20281db16aab5861cc3f16e74d99
Author: Andreas Schneider <asn at cryptomilk.org>
Date:   Thu Oct 10 10:01:40 2013 +0200

    s3-winbind: Add functions for domain online/offline handling.
    
    BUG: 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>
    (cherry picked from commit 447ec17a6bec814a2ac5cadb74dbef5789f07c52)

commit e052e6587f3270bb186dda4b34cfd8f153cfb055
Author: Andreas Schneider <asn at cryptomilk.org>
Date:   Thu Oct 10 09:15:57 2013 +0200

    idl: Add a new message for winbind domain states.
    
    BUG: 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>
    (cherry picked from commit 1a884636542ba0e54c6d209662a5d1613d727a85)

commit 5a65f86bf2d43ccb5719a5734ee278e7c5d83921
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Oct 8 15:01:38 2013 -0700

    Fix bug #10187 - Missing talloc_free can leak stackframe in error path.
    
    Fix error path.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>
    
    Autobuild-User(master): David Disseldorp <ddiss at samba.org>
    Autobuild-Date(master): Wed Oct  9 03:50:56 CEST 2013 on sn-devel-104

commit c388828165ce0ab5ae91a656b09c3db99cab5e55
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon May 27 12:10:57 2013 +0200

    s4:smb_server: call irpc_add_name() at startup (bug #9905)
    
    We should call irpc_add_name() when we start the smb_server task.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit afb2bcc08489dbece732fc8f842cbd83862320be)

commit 2c6ef147c69bb4cb70c237870d650edaebeb0b52
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon May 27 12:10:57 2013 +0200

    s4:rpc_server: call irpc_add_name() at startup (bug #9905)
    
    We should call irpc_add_name() when we start the rpc_server task.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit 12d9728131afab7fa093a9cd7ccaff076a74f271)

commit 95d66d039afae4eef284e3d2d4b20c66ac88f35a
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon May 27 12:10:57 2013 +0200

    s4:ldap_server: call irpc_add_name() at startup (bug #9905)
    
    We should call irpc_add_name() when we start the ldap_server task.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>
    Reviewed-by: Andrew Bartlett <abartlet at samba.org>
    (cherry picked from commit a1aeeee4302a4eaf7e210e8084416cd2a0d14384)

-----------------------------------------------------------------------

Summary of changes:
 source3/librpc/idl/messaging.idl  |    2 +
 source3/winbindd/winbindd.c       |    6 +++
 source3/winbindd/winbindd_cm.c    |   62 +++++++++++++++++++++++++++++++++++++
 source3/winbindd/winbindd_dual.c  |    5 +++
 source3/winbindd/winbindd_msrpc.c |    5 ++-
 source3/winbindd/winbindd_proto.h |   10 ++++++
 source4/ldap_server/ldap_server.c |    3 ++
 source4/rpc_server/service_rpc.c  |    1 +
 source4/smb_server/service_smb.c  |    1 +
 9 files changed, 93 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/librpc/idl/messaging.idl b/source3/librpc/idl/messaging.idl
index c262889..a6258a8 100644
--- a/source3/librpc/idl/messaging.idl
+++ b/source3/librpc/idl/messaging.idl
@@ -100,6 +100,8 @@ interface messaging
 		MSG_WINBIND_VALIDATE_CACHE	= 0x0408,
 		MSG_WINBIND_DUMP_DOMAIN_LIST	= 0x0409,
 		MSG_WINBIND_IP_DROPPED		= 0x040A,
+		MSG_WINBIND_DOMAIN_ONLINE	= 0x040B,
+		MSG_WINBIND_DOMAIN_OFFLINE	= 0x040C,
 
 		/* event messages */
 		MSG_DUMP_EVENT_LIST		= 0x0500,
diff --git a/source3/winbindd/winbindd.c b/source3/winbindd/winbindd.c
index 21cc5f2..839655e 100644
--- a/source3/winbindd/winbindd.c
+++ b/source3/winbindd/winbindd.c
@@ -1137,6 +1137,12 @@ void winbindd_register_handlers(bool foreground)
 	messaging_register(winbind_messaging_context(), NULL,
 			   MSG_WINBIND_ONLINESTATUS, winbind_msg_onlinestatus);
 
+	/* Handle domain online/offline messages for domains */
+	messaging_register(winbind_messaging_context(), NULL,
+			   MSG_WINBIND_DOMAIN_OFFLINE, winbind_msg_domain_offline);
+	messaging_register(winbind_messaging_context(), NULL,
+			   MSG_WINBIND_DOMAIN_ONLINE, winbind_msg_domain_online);
+
 	messaging_register(winbind_messaging_context(), NULL,
 			   MSG_DUMP_EVENT_LIST, winbind_msg_dump_event_list);
 
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index e7b0d93..1883ddc 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -340,6 +340,46 @@ static void calc_new_online_timeout_check(struct winbindd_domain *domain)
 	}
 }
 
+void winbind_msg_domain_offline(struct messaging_context *msg_ctx,
+				void *private_data,
+				uint32_t msg_type,
+				struct server_id server_id,
+				DATA_BLOB *data)
+{
+	const char *domain_name = (const char *)data->data;
+	struct winbindd_domain *domain;
+
+	domain = find_domain_from_name_noinit(domain_name);
+	if (domain == NULL) {
+		return;
+	}
+
+	domain->online = false;
+
+	DEBUG(10, ("Domain %s is marked as offline now.\n",
+		   domain_name));
+}
+
+void winbind_msg_domain_online(struct messaging_context *msg_ctx,
+				void *private_data,
+				uint32_t msg_type,
+				struct server_id server_id,
+				DATA_BLOB *data)
+{
+	const char *domain_name = (const char *)data->data;
+	struct winbindd_domain *domain;
+
+	domain = find_domain_from_name_noinit(domain_name);
+	if (domain == NULL) {
+		return;
+	}
+
+	domain->online = true;
+
+	DEBUG(10, ("Domain %s is marked as online now.\n",
+		   domain_name));
+}
+
 /****************************************************************
  Set domain offline and also add handler to put us back online
  if we detect a DC.
@@ -347,6 +387,8 @@ static void calc_new_online_timeout_check(struct winbindd_domain *domain)
 
 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 ));
 
@@ -394,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 */
 
@@ -418,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 ));
 
@@ -469,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 */
 
diff --git a/source3/winbindd/winbindd_dual.c b/source3/winbindd/winbindd_dual.c
index 60b15e3..3c0e757 100644
--- a/source3/winbindd/winbindd_dual.c
+++ b/source3/winbindd/winbindd_dual.c
@@ -1223,6 +1223,11 @@ NTSTATUS winbindd_reinit_after_fork(const struct winbindd_child *myself,
 	messaging_deregister(winbind_messaging_context(),
 			     MSG_DEBUG, NULL);
 
+	messaging_deregister(winbind_messaging_context(),
+			     MSG_WINBIND_DOMAIN_OFFLINE, NULL);
+	messaging_deregister(winbind_messaging_context(),
+			     MSG_WINBIND_DOMAIN_ONLINE, NULL);
+
 	/* We have destroyed all events in the winbindd_event_context
 	 * in reinit_after_fork(), so clean out all possible pending
 	 * event pointers. */
diff --git a/source3/winbindd/winbindd_msrpc.c b/source3/winbindd/winbindd_msrpc.c
index e86838c..61447d3 100644
--- a/source3/winbindd/winbindd_msrpc.c
+++ b/source3/winbindd/winbindd_msrpc.c
@@ -944,8 +944,9 @@ static NTSTATUS msrpc_trusted_domains(struct winbindd_domain *domain,
 	}
 
 	status = cm_connect_lsa(domain, tmp_ctx, &lsa_pipe, &lsa_policy);
-	if (!NT_STATUS_IS_OK(status))
-		return status;
+	if (!NT_STATUS_IS_OK(status)) {
+		goto done;
+	}
 
 	status = rpc_trusted_domains(tmp_ctx,
 				     lsa_pipe,
diff --git a/source3/winbindd/winbindd_proto.h b/source3/winbindd/winbindd_proto.h
index 41aa9ac..59dfee0 100644
--- a/source3/winbindd/winbindd_proto.h
+++ b/source3/winbindd/winbindd_proto.h
@@ -151,6 +151,16 @@ enum winbindd_result winbindd_dual_ccache_ntlm_auth(struct winbindd_domain *doma
 void winbindd_ccache_save(struct winbindd_cli_state *state);
 
 /* The following definitions come from winbindd/winbindd_cm.c  */
+void winbind_msg_domain_offline(struct messaging_context *msg_ctx,
+				void *private_data,
+				uint32_t msg_type,
+				struct server_id server_id,
+				DATA_BLOB *data);
+void winbind_msg_domain_online(struct messaging_context *msg_ctx,
+				void *private_data,
+				uint32_t msg_type,
+				struct server_id server_id,
+				DATA_BLOB *data);
 
 void set_domain_offline(struct winbindd_domain *domain);
 void set_domain_online_request(struct winbindd_domain *domain);
diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c
index a06feb0..0c0beca 100644
--- a/source4/ldap_server/ldap_server.c
+++ b/source4/ldap_server/ldap_server.c
@@ -1024,6 +1024,9 @@ static void ldapsrv_task_init(struct task_server *task)
 	}
 
 #endif
+
+	/* register the server */
+	irpc_add_name(task->msg_ctx, "ldap_server");
 	return;
 
 failed:
diff --git a/source4/rpc_server/service_rpc.c b/source4/rpc_server/service_rpc.c
index 299ee48..9ecfd6f 100644
--- a/source4/rpc_server/service_rpc.c
+++ b/source4/rpc_server/service_rpc.c
@@ -76,6 +76,7 @@ static void dcesrv_task_init(struct task_server *task)
 		if (!NT_STATUS_IS_OK(status)) goto failed;
 	}
 
+	irpc_add_name(task->msg_ctx, "rpc_server");
 	return;
 failed:
 	task_server_terminate(task, "Failed to startup dcerpc server task", true);	
diff --git a/source4/smb_server/service_smb.c b/source4/smb_server/service_smb.c
index c910b0f..958792e 100644
--- a/source4/smb_server/service_smb.c
+++ b/source4/smb_server/service_smb.c
@@ -77,6 +77,7 @@ static void smbsrv_task_init(struct task_server *task)
 		talloc_free(wcard);
 	}
 
+	irpc_add_name(task->msg_ctx, "smb_server");
 	return;
 failed:
 	task_server_terminate(task, "Failed to startup smb server task", true);	


-- 
Samba Shared Repository


More information about the samba-cvs mailing list