svn commit: samba r26237 - in branches/SAMBA_4_0: . source/cldap_server source/dsdb/repl source/kdc source/ldap_server source/nbt_server source/rpc_server source/smb_server source/smbd source/web_server source/winbind source/wrepl_server

jelmer at samba.org jelmer at samba.org
Mon Dec 3 00:28:10 GMT 2007


Author: jelmer
Date: 2007-12-03 00:28:07 +0000 (Mon, 03 Dec 2007)
New Revision: 26237

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=26237

Log:
Add loadparm context to the server service interface.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/cldap_server/cldap_server.c
   branches/SAMBA_4_0/source/dsdb/repl/drepl_service.c
   branches/SAMBA_4_0/source/kdc/kdc.c
   branches/SAMBA_4_0/source/ldap_server/ldap_server.c
   branches/SAMBA_4_0/source/nbt_server/nbt_server.c
   branches/SAMBA_4_0/source/rpc_server/service_rpc.c
   branches/SAMBA_4_0/source/smb_server/smb_server.c
   branches/SAMBA_4_0/source/smbd/server.c
   branches/SAMBA_4_0/source/smbd/service.c
   branches/SAMBA_4_0/source/web_server/web_server.c
   branches/SAMBA_4_0/source/winbind/wb_server.c
   branches/SAMBA_4_0/source/wrepl_server/wrepl_server.c


Changeset:

Property changes on: branches/SAMBA_4_0
___________________________________________________________________
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/cldap_server/cldap_server.c
===================================================================
--- branches/SAMBA_4_0/source/cldap_server/cldap_server.c	2007-12-02 22:32:11 UTC (rev 26236)
+++ branches/SAMBA_4_0/source/cldap_server/cldap_server.c	2007-12-03 00:28:07 UTC (rev 26237)
@@ -201,7 +201,7 @@
 /*
   initialise the cldapd server
  */
-static NTSTATUS cldapd_init(struct event_context *event_ctx, const struct model_ops *model_ops)
+static NTSTATUS cldapd_init(struct event_context *event_ctx, struct loadparm_context *lp_ctx, const struct model_ops *model_ops)
 {
 	return task_server_startup(event_ctx, model_ops, cldapd_task_init);
 }

Modified: branches/SAMBA_4_0/source/dsdb/repl/drepl_service.c
===================================================================
--- branches/SAMBA_4_0/source/dsdb/repl/drepl_service.c	2007-12-02 22:32:11 UTC (rev 26236)
+++ branches/SAMBA_4_0/source/dsdb/repl/drepl_service.c	2007-12-03 00:28:07 UTC (rev 26237)
@@ -182,7 +182,7 @@
 /*
   initialise the dsdb replicator service
  */
-static NTSTATUS dreplsrv_init(struct event_context *event_ctx, const struct model_ops *model_ops)
+static NTSTATUS dreplsrv_init(struct event_context *event_ctx, struct loadparm_context *lp_ctx, const struct model_ops *model_ops)
 {
 	return task_server_startup(event_ctx, model_ops, dreplsrv_task_init);
 }

Modified: branches/SAMBA_4_0/source/kdc/kdc.c
===================================================================
--- branches/SAMBA_4_0/source/kdc/kdc.c	2007-12-02 22:32:11 UTC (rev 26236)
+++ branches/SAMBA_4_0/source/kdc/kdc.c	2007-12-03 00:28:07 UTC (rev 26237)
@@ -650,6 +650,7 @@
   called on startup of the KDC service 
 */
 static NTSTATUS kdc_init(struct event_context *event_ctx, 
+			 struct loadparm_context *lp_ctx,
 			 const struct model_ops *model_ops)
 {	
 	return task_server_startup(event_ctx, model_ops, kdc_task_init);

Modified: branches/SAMBA_4_0/source/ldap_server/ldap_server.c
===================================================================
--- branches/SAMBA_4_0/source/ldap_server/ldap_server.c	2007-12-02 22:32:11 UTC (rev 26236)
+++ branches/SAMBA_4_0/source/ldap_server/ldap_server.c	2007-12-03 00:28:07 UTC (rev 26237)
@@ -581,6 +581,7 @@
   listening on all configured sockets
 */
 static NTSTATUS ldapsrv_init(struct event_context *event_context, 
+			     struct loadparm_context *lp_ctx,
 			     const struct model_ops *model_ops)
 {	
 	return task_server_startup(event_context, model_ops, ldapsrv_task_init);

Modified: branches/SAMBA_4_0/source/nbt_server/nbt_server.c
===================================================================
--- branches/SAMBA_4_0/source/nbt_server/nbt_server.c	2007-12-02 22:32:11 UTC (rev 26236)
+++ branches/SAMBA_4_0/source/nbt_server/nbt_server.c	2007-12-03 00:28:07 UTC (rev 26237)
@@ -89,7 +89,7 @@
 /*
   initialise the nbt server
  */
-static NTSTATUS nbtd_init(struct event_context *event_ctx, const struct model_ops *model_ops)
+static NTSTATUS nbtd_init(struct event_context *event_ctx, struct loadparm_context *lp_ctx, const struct model_ops *model_ops)
 {
 	return task_server_startup(event_ctx, model_ops, nbtd_task_init);
 }

Modified: branches/SAMBA_4_0/source/rpc_server/service_rpc.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/service_rpc.c	2007-12-02 22:32:11 UTC (rev 26236)
+++ branches/SAMBA_4_0/source/rpc_server/service_rpc.c	2007-12-03 00:28:07 UTC (rev 26237)
@@ -438,6 +438,7 @@
   listening on all configured sockets
 */
 static NTSTATUS dcesrv_init(struct event_context *event_context, 
+			    struct loadparm_context *lp_ctx,
 			    const struct model_ops *model_ops)
 {	
 	return task_server_startup(event_context, model_ops, dcesrv_task_init);

Modified: branches/SAMBA_4_0/source/smb_server/smb_server.c
===================================================================
--- branches/SAMBA_4_0/source/smb_server/smb_server.c	2007-12-02 22:32:11 UTC (rev 26236)
+++ branches/SAMBA_4_0/source/smb_server/smb_server.c	2007-12-03 00:28:07 UTC (rev 26237)
@@ -247,6 +247,7 @@
   listening on all configured sockets
 */
 static NTSTATUS smbsrv_init(struct event_context *event_context, 
+			    struct loadparm_context *lp_ctx,
 			    const struct model_ops *model_ops)
 {	
 	return task_server_startup(event_context, model_ops, smbsrv_task_init);

Modified: branches/SAMBA_4_0/source/smbd/server.c
===================================================================
--- branches/SAMBA_4_0/source/smbd/server.c	2007-12-02 22:32:11 UTC (rev 26236)
+++ branches/SAMBA_4_0/source/smbd/server.c	2007-12-03 00:28:07 UTC (rev 26237)
@@ -334,7 +334,7 @@
 	}
 
 	DEBUG(0,("%s: using '%s' process model\n", binary_name, model));
-	status = server_service_startup(event_ctx, model, lp_server_services(global_loadparm));
+	status = server_service_startup(event_ctx, global_loadparm, model, lp_server_services(global_loadparm));
 	if (!NT_STATUS_IS_OK(status)) {
 		DEBUG(0,("Starting Services failed - %s\n", nt_errstr(status)));
 		return 1;

Modified: branches/SAMBA_4_0/source/smbd/service.c
===================================================================
--- branches/SAMBA_4_0/source/smbd/service.c	2007-12-02 22:32:11 UTC (rev 26236)
+++ branches/SAMBA_4_0/source/smbd/service.c	2007-12-03 00:28:07 UTC (rev 26237)
@@ -30,14 +30,14 @@
 static struct registered_server {
 	struct registered_server *next, *prev;
 	const char *service_name;
-	NTSTATUS (*service_init)(struct event_context *, const struct model_ops *);
+	NTSTATUS (*service_init)(struct event_context *, struct loadparm_context *lp_ctx, const struct model_ops *);
 } *registered_servers;
 
 /*
   register a server service. 
 */
 NTSTATUS register_server_service(const char *name,
-				 NTSTATUS (*service_init)(struct event_context *, const struct model_ops *))
+				 NTSTATUS (*service_init)(struct event_context *, struct loadparm_context *lp_ctx, const struct model_ops *))
 {
 	struct registered_server *srv;
 	srv = talloc(talloc_autofree_context(), struct registered_server);
@@ -54,12 +54,13 @@
 */
 static NTSTATUS server_service_init(const char *name,
 				    struct event_context *event_ctx,
+				    struct loadparm_context *lp_ctx,
 				    const struct model_ops *model_ops)
 {
 	struct registered_server *srv;
 	for (srv=registered_servers; srv; srv=srv->next) {
 		if (strcasecmp(name, srv->service_name) == 0) {
-			return srv->service_init(event_ctx, model_ops);
+			return srv->service_init(event_ctx, lp_ctx, model_ops);
 		}
 	}
 	return NT_STATUS_INVALID_SYSTEM_SERVICE;
@@ -70,6 +71,7 @@
   startup all of our server services
 */
 NTSTATUS server_service_startup(struct event_context *event_ctx, 
+				struct loadparm_context *lp_ctx,
 				const char *model, const char **server_services)
 {
 	int i;
@@ -89,7 +91,7 @@
 	for (i=0;server_services[i];i++) {
 		NTSTATUS status;
 
-		status = server_service_init(server_services[i], event_ctx, model_ops);
+		status = server_service_init(server_services[i], event_ctx, lp_ctx, model_ops);
 		if (!NT_STATUS_IS_OK(status)) {
 			DEBUG(0,("Failed to start service '%s' - %s\n", 
 				 server_services[i], nt_errstr(status)));

Modified: branches/SAMBA_4_0/source/web_server/web_server.c
===================================================================
--- branches/SAMBA_4_0/source/web_server/web_server.c	2007-12-02 22:32:11 UTC (rev 26236)
+++ branches/SAMBA_4_0/source/web_server/web_server.c	2007-12-03 00:28:07 UTC (rev 26237)
@@ -286,6 +286,7 @@
   listening on all configured sockets
 */
 static NTSTATUS websrv_init(struct event_context *event_context, 
+			    struct loadparm_context *lp_ctx,
 			    const struct model_ops *model_ops)
 {	
 	return task_server_startup(event_context, model_ops, websrv_task_init);

Modified: branches/SAMBA_4_0/source/winbind/wb_server.c
===================================================================
--- branches/SAMBA_4_0/source/winbind/wb_server.c	2007-12-02 22:32:11 UTC (rev 26236)
+++ branches/SAMBA_4_0/source/winbind/wb_server.c	2007-12-03 00:28:07 UTC (rev 26237)
@@ -201,6 +201,7 @@
   initialise the winbind server
  */
 static NTSTATUS winbind_init(struct event_context *event_ctx,
+			     struct loadparm_context *lp_ctx,
 			     const struct model_ops *model_ops)
 {
 	return task_server_startup(event_ctx, model_ops, winbind_task_init);

Modified: branches/SAMBA_4_0/source/wrepl_server/wrepl_server.c
===================================================================
--- branches/SAMBA_4_0/source/wrepl_server/wrepl_server.c	2007-12-02 22:32:11 UTC (rev 26236)
+++ branches/SAMBA_4_0/source/wrepl_server/wrepl_server.c	2007-12-03 00:28:07 UTC (rev 26237)
@@ -495,9 +495,9 @@
 /*
   initialise the WREPL server
  */
-static NTSTATUS wreplsrv_init(struct event_context *event_ctx, const struct model_ops *model_ops)
+static NTSTATUS wreplsrv_init(struct event_context *event_ctx, struct loadparm_context *lp_ctx, const struct model_ops *model_ops)
 {
-	if (!lp_wins_support(global_loadparm)) {
+	if (!lp_wins_support(lp_ctx)) {
 		return NT_STATUS_OK;
 	}
 



More information about the samba-cvs mailing list