[SCM] Samba Shared Repository - branch master updated - 1d92b2211cc507dd62526f564ec7f75a07110e00

Stefan Metzmacher metze at samba.org
Mon Sep 22 16:18:35 GMT 2008


The branch, master has been updated
       via  1d92b2211cc507dd62526f564ec7f75a07110e00 (commit)
      from  31dc3629475a07dcc9900929ce943c274db36250 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 1d92b2211cc507dd62526f564ec7f75a07110e00
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Sep 22 18:15:24 2008 +0200

    s4: allways initialize the process model before it's used
    
    metze

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

Summary of changes:
 source4/kdc/kdc.c                          |    2 +-
 source4/ldap_server/ldap_server.c          |    2 +-
 source4/ntp_signd/ntp_signd.c              |    2 +-
 source4/smbd/process_model.c               |    4 +++-
 source4/smbd/process_model.h               |    1 -
 source4/web_server/web_server.c            |    2 +-
 source4/winbind/wb_server.c                |    2 +-
 source4/wrepl_server/wrepl_in_connection.c |    4 ++--
 8 files changed, 10 insertions(+), 9 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/kdc/kdc.c b/source4/kdc/kdc.c
index b7009b0..307c39a 100644
--- a/source4/kdc/kdc.c
+++ b/source4/kdc/kdc.c
@@ -484,7 +484,7 @@ static NTSTATUS kdc_add_socket(struct kdc_server *kdc, const char *address,
 	/* within the kdc task we want to be a single process, so
 	   ask for the single process model ops and pass these to the
 	   stream_setup_socket() call. */
-	model_ops = process_model_byname("single");
+	model_ops = process_model_startup(kdc->task->event_ctx, "single");
 	if (!model_ops) {
 		DEBUG(0,("Can't find 'single' process model_ops\n"));
 		talloc_free(kdc_socket);
diff --git a/source4/ldap_server/ldap_server.c b/source4/ldap_server/ldap_server.c
index 39a55f4..57a63a8 100644
--- a/source4/ldap_server/ldap_server.c
+++ b/source4/ldap_server/ldap_server.c
@@ -529,7 +529,7 @@ static void ldapsrv_task_init(struct task_server *task)
 	task_server_set_title(task, "task[ldapsrv]");
 
 	/* run the ldap server as a single process */
-	model_ops = process_model_byname("single");
+	model_ops = process_model_startup(task->event_ctx, "single");
 	if (!model_ops) goto failed;
 
 	ldap_service = talloc_zero(task, struct ldapsrv_service);
diff --git a/source4/ntp_signd/ntp_signd.c b/source4/ntp_signd/ntp_signd.c
index 546743e..8bcf258 100644
--- a/source4/ntp_signd/ntp_signd.c
+++ b/source4/ntp_signd/ntp_signd.c
@@ -349,7 +349,7 @@ static void ntp_signd_task_init(struct task_server *task)
 	/* within the ntp_signd task we want to be a single process, so
 	   ask for the single process model ops and pass these to the
 	   stream_setup_socket() call. */
-	model_ops = process_model_byname("single");
+	model_ops = process_model_startup(task->event_ctx, "single");
 	if (!model_ops) {
 		DEBUG(0,("Can't find 'single' process model_ops\n"));
 		return;
diff --git a/source4/smbd/process_model.c b/source4/smbd/process_model.c
index 704e6cc..d99d517 100644
--- a/source4/smbd/process_model.c
+++ b/source4/smbd/process_model.c
@@ -22,6 +22,8 @@
 #include "smbd/process_model.h"
 #include "param/param.h"
 
+static const struct model_ops *process_model_byname(const char *name);
+
 /*
   setup the events for the chosen process model
 */
@@ -99,7 +101,7 @@ _PUBLIC_ NTSTATUS process_model_init(struct loadparm_context *lp_ctx)
 /*
   return the operations structure for a named backend of the specified type
 */
-_PUBLIC_ const struct model_ops *process_model_byname(const char *name)
+static const struct model_ops *process_model_byname(const char *name)
 {
 	int i;
 
diff --git a/source4/smbd/process_model.h b/source4/smbd/process_model.h
index b545212..a9b33a4 100644
--- a/source4/smbd/process_model.h
+++ b/source4/smbd/process_model.h
@@ -78,7 +78,6 @@ struct process_model_critical_sizes {
 extern const struct model_ops single_ops;
 
 const struct model_ops *process_model_startup(struct event_context *ev, const char *model);
-const struct model_ops *process_model_byname(const char *name);
 NTSTATUS register_process_model(const void *_ops);
 NTSTATUS process_model_init(struct loadparm_context *lp_ctx);
 
diff --git a/source4/web_server/web_server.c b/source4/web_server/web_server.c
index 1ed37f6..d741992 100644
--- a/source4/web_server/web_server.c
+++ b/source4/web_server/web_server.c
@@ -307,7 +307,7 @@ static void websrv_task_init(struct task_server *task)
 	task_server_set_title(task, "task[websrv]");
 
 	/* run the web server as a single process */
-	model_ops = process_model_byname("single");
+	model_ops = process_model_startup(task->event_ctx, "single");
 	if (!model_ops) goto failed;
 
 	if (lp_interfaces(task->lp_ctx) && lp_bind_interfaces_only(task->lp_ctx)) {
diff --git a/source4/winbind/wb_server.c b/source4/winbind/wb_server.c
index d56a82e..638fac0 100644
--- a/source4/winbind/wb_server.c
+++ b/source4/winbind/wb_server.c
@@ -122,7 +122,7 @@ static void winbind_task_init(struct task_server *task)
 	/* within the winbind task we want to be a single process, so
 	   ask for the single process model ops and pass these to the
 	   stream_setup_socket() call. */
-	model_ops = process_model_byname("single");
+	model_ops = process_model_startup(task->event_ctx, "single");
 	if (!model_ops) {
 		task_server_terminate(task,
 				      "Can't find 'single' process model_ops");
diff --git a/source4/wrepl_server/wrepl_in_connection.c b/source4/wrepl_server/wrepl_in_connection.c
index 2522748..ecc265e 100644
--- a/source4/wrepl_server/wrepl_in_connection.c
+++ b/source4/wrepl_server/wrepl_in_connection.c
@@ -218,7 +218,7 @@ NTSTATUS wreplsrv_in_connection_merge(struct wreplsrv_partner *partner,
 	/* within the wrepl task we want to be a single process, so
 	   ask for the single process model ops and pass these to the
 	   stream_setup_socket() call. */
-	model_ops = process_model_byname("single");
+	model_ops = process_model_startup(service->task->event_ctx, "single");
 	if (!model_ops) {
 		DEBUG(0,("Can't find 'single' process model_ops"));
 		return NT_STATUS_INTERNAL_ERROR;
@@ -273,7 +273,7 @@ NTSTATUS wreplsrv_setup_sockets(struct wreplsrv_service *service, struct loadpar
 	/* within the wrepl task we want to be a single process, so
 	   ask for the single process model ops and pass these to the
 	   stream_setup_socket() call. */
-	model_ops = process_model_byname("single");
+	model_ops = process_model_startup(task->event_ctx, "single");
 	if (!model_ops) {
 		DEBUG(0,("Can't find 'single' process model_ops"));
 		return NT_STATUS_INTERNAL_ERROR;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list