svn commit: samba r26272 - in branches/SAMBA_4_0: . source/auth/credentials source/client source/lib/charset source/param source/rpc_server/samr source/smbd source/torture source/torture/libnet source/torture/rpc source/web_server source/winbind

jelmer at samba.org jelmer at samba.org
Mon Dec 3 23:33:24 GMT 2007


Author: jelmer
Date: 2007-12-03 23:33:22 +0000 (Mon, 03 Dec 2007)
New Revision: 26272

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

Log:
Remove global_loadparm in some more places.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/auth/credentials/credentials_files.c
   branches/SAMBA_4_0/source/client/cifsdd.c
   branches/SAMBA_4_0/source/lib/charset/charcnv.c
   branches/SAMBA_4_0/source/param/share_classic.c
   branches/SAMBA_4_0/source/rpc_server/samr/samr_password.c
   branches/SAMBA_4_0/source/smbd/server.c
   branches/SAMBA_4_0/source/torture/libnet/libnet_BecomeDC.c
   branches/SAMBA_4_0/source/torture/locktest.c
   branches/SAMBA_4_0/source/torture/rpc/drsuapi.c
   branches/SAMBA_4_0/source/torture/rpc/drsuapi_cracknames.c
   branches/SAMBA_4_0/source/web_server/http.c
   branches/SAMBA_4_0/source/winbind/wb_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/auth/credentials/credentials_files.c
===================================================================
--- branches/SAMBA_4_0/source/auth/credentials/credentials_files.c	2007-12-03 23:33:16 UTC (rev 26271)
+++ branches/SAMBA_4_0/source/auth/credentials/credentials_files.c	2007-12-03 23:33:22 UTC (rev 26272)
@@ -346,7 +346,8 @@
  * @param cred Credentials structure to fill in
  * @retval NTSTATUS error detailing any failure
  */
-NTSTATUS cli_credentials_set_krbtgt(struct cli_credentials *cred)
+NTSTATUS cli_credentials_set_krbtgt(struct cli_credentials *cred,
+				    struct loadparm_context *lp_ctx)
 {
 	char *filter;
 	/* Bleh, nasty recursion issues: We are setting a machine
@@ -356,7 +357,7 @@
 	filter = talloc_asprintf(cred, SECRETS_KRBTGT_SEARCH,
 				       cli_credentials_get_realm(cred),
 				       cli_credentials_get_domain(cred));
-	return cli_credentials_set_secrets(cred, global_loadparm, NULL, 
+	return cli_credentials_set_secrets(cred, lp_ctx, NULL, 
 					   SECRETS_PRINCIPALS_DN,
 					   filter);
 }

Modified: branches/SAMBA_4_0/source/client/cifsdd.c
===================================================================
--- branches/SAMBA_4_0/source/client/cifsdd.c	2007-12-03 23:33:16 UTC (rev 26271)
+++ branches/SAMBA_4_0/source/client/cifsdd.c	2007-12-03 23:33:22 UTC (rev 26272)
@@ -426,10 +426,10 @@
 		return(EOM_EXIT_CODE);
 	}
 
-	set_max_xmit(global_loadparm, MAX(ibs, obs));
+	set_max_xmit(lp_ctx, MAX(ibs, obs));
 
 	DEBUG(4, ("IO buffer size is %llu, max xmit is %d\n",
-			(unsigned long long)iomax, lp_max_xmit(global_loadparm)));
+			(unsigned long long)iomax, lp_max_xmit(lp_ctx)));
 
 	if (!(ifile = open_file("if"))) {
 		return(FILESYS_EXIT_CODE);
@@ -443,7 +443,7 @@
 	ifile->io_seek(ifile, check_arg_numeric("skip") * ibs);
 	ofile->io_seek(ofile, check_arg_numeric("seek") * obs);
 
-	DEBUG(4, ("max xmit was negotiated to be %d\n", lp_max_xmit(global_loadparm)));
+	DEBUG(4, ("max xmit was negotiated to be %d\n", lp_max_xmit(lp_ctx)));
 
 	for (data_size = 0;;) {
 

Modified: branches/SAMBA_4_0/source/lib/charset/charcnv.c
===================================================================
--- branches/SAMBA_4_0/source/lib/charset/charcnv.c	2007-12-03 23:33:16 UTC (rev 26271)
+++ branches/SAMBA_4_0/source/lib/charset/charcnv.c	2007-12-03 23:33:22 UTC (rev 26272)
@@ -274,7 +274,8 @@
 	if (descriptor == (smb_iconv_t)-1 || descriptor == (smb_iconv_t)0) {
 		/* conversion not supported, return -1*/
 		DEBUG(3, ("convert_string_talloc: conversion from %s to %s not supported!\n",
-			  charset_name(global_loadparm, from), charset_name(global_loadparm, to)));
+			  charset_name(global_loadparm, from), 
+			  charset_name(global_loadparm, to)));
 		return -1;
 	}
 

Modified: branches/SAMBA_4_0/source/param/share_classic.c
===================================================================
--- branches/SAMBA_4_0/source/param/share_classic.c	2007-12-03 23:33:16 UTC (rev 26271)
+++ branches/SAMBA_4_0/source/param/share_classic.c	2007-12-03 23:33:22 UTC (rev 26272)
@@ -23,7 +23,9 @@
 #include "param/share.h"
 #include "param/param.h"
 
-static NTSTATUS sclassic_init(TALLOC_CTX *mem_ctx, const struct share_ops *ops, struct share_context **ctx)
+static NTSTATUS sclassic_init(TALLOC_CTX *mem_ctx, 
+			      const struct share_ops *ops, 
+			      struct share_context **ctx)
 {
 	*ctx = talloc(mem_ctx, struct share_context);
 	if (!*ctx) {
@@ -37,7 +39,9 @@
 	return NT_STATUS_OK;
 }
 
-static const char *sclassic_string_option(struct share_config *scfg, const char *opt_name, const char *defval)
+static const char *sclassic_string_option(struct share_config *scfg, 
+					  const char *opt_name, 
+					  const char *defval)
 {
 	struct loadparm_service *s = talloc_get_type(scfg->opaque, 
 						     struct loadparm_service);

Modified: branches/SAMBA_4_0/source/rpc_server/samr/samr_password.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/samr/samr_password.c	2007-12-03 23:33:16 UTC (rev 26271)
+++ branches/SAMBA_4_0/source/rpc_server/samr/samr_password.c	2007-12-03 23:33:22 UTC (rev 26272)
@@ -38,8 +38,9 @@
 /* 
   samr_ChangePasswordUser 
 */
-NTSTATUS dcesrv_samr_ChangePasswordUser(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
-				 struct samr_ChangePasswordUser *r)
+NTSTATUS dcesrv_samr_ChangePasswordUser(struct dcesrv_call_state *dce_call, 
+					TALLOC_CTX *mem_ctx,
+					struct samr_ChangePasswordUser *r)
 {
 	struct dcesrv_handle *h;
 	struct samr_account_state *a_state;

Modified: branches/SAMBA_4_0/source/smbd/server.c
===================================================================
--- branches/SAMBA_4_0/source/smbd/server.c	2007-12-03 23:33:16 UTC (rev 26271)
+++ branches/SAMBA_4_0/source/smbd/server.c	2007-12-03 23:33:22 UTC (rev 26272)
@@ -334,7 +334,8 @@
 	}
 
 	DEBUG(0,("%s: using '%s' process model\n", binary_name, model));
-	status = server_service_startup(event_ctx, global_loadparm, 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/torture/libnet/libnet_BecomeDC.c
===================================================================
--- branches/SAMBA_4_0/source/torture/libnet/libnet_BecomeDC.c	2007-12-03 23:33:16 UTC (rev 26271)
+++ branches/SAMBA_4_0/source/torture/libnet/libnet_BecomeDC.c	2007-12-03 23:33:22 UTC (rev 26272)
@@ -254,7 +254,8 @@
 
 	talloc_free(s->ldb);
 
-	DEBUG(0,("Open the SAM LDB with system credentials: %s\n", s->path.samdb_ldb));
+	DEBUG(0,("Open the SAM LDB with system credentials: %s\n", 
+		 s->path.samdb_ldb));
 
 	s->ldb = ldb_wrap_connect(s, global_loadparm, s->path.samdb_ldb,
 				  system_session(s, global_loadparm),

Modified: branches/SAMBA_4_0/source/torture/locktest.c
===================================================================
--- branches/SAMBA_4_0/source/torture/locktest.c	2007-12-03 23:33:16 UTC (rev 26271)
+++ branches/SAMBA_4_0/source/torture/locktest.c	2007-12-03 23:33:22 UTC (rev 26272)
@@ -105,7 +105,8 @@
 /***************************************************** 
 return a connection to a server
 *******************************************************/
-static struct smbcli_state *connect_one(char *share, int snum, int conn)
+static struct smbcli_state *connect_one(struct loadparm_context *lp_ctx,
+					char *share, int snum, int conn)
 {
 	struct smbcli_state *c;
 	fstring server, myname;
@@ -124,7 +125,7 @@
 		char **unc_list = NULL;
 		int num_unc_names;
 		const char *p;
-		p = lp_parm_string(global_loadparm, NULL, "torture", "unclist");
+		p = lp_parm_string(lp_ctx, NULL, "torture", "unclist");
 		if (p) {
 			char *h, *s;
 			unc_list = file_lines_load(p, &num_unc_names, NULL);
@@ -183,7 +184,8 @@
 			}
 			talloc_free(cli[server][conn]);
 		}
-		cli[server][conn] = connect_one(share[server], server, conn);
+		cli[server][conn] = connect_one(global_loadparm, share[server], 
+						server, conn);
 		if (!cli[server][conn]) {
 			DEBUG(0,("Failed to connect to %s\n", share[server]));
 			exit(1);

Modified: branches/SAMBA_4_0/source/torture/rpc/drsuapi.c
===================================================================
--- branches/SAMBA_4_0/source/torture/rpc/drsuapi.c	2007-12-03 23:33:16 UTC (rev 26271)
+++ branches/SAMBA_4_0/source/torture/rpc/drsuapi.c	2007-12-03 23:33:22 UTC (rev 26272)
@@ -719,7 +719,7 @@
 #endif
 	ret &= test_DsGetDomainControllerInfo(p, torture, &priv);
 
-	ret &= test_DsCrackNames(p, torture, &priv);
+	ret &= test_DsCrackNames(torture, p, torture, &priv);
 
 	ret &= test_DsWriteAccountSpn(p, torture, &priv);
 
@@ -771,7 +771,7 @@
 		/* We don't care if this fails, we just need some info from it */
 		test_DsGetDomainControllerInfo(p, torture, &priv);
 		
-		ret &= test_DsCrackNames(p, torture, &priv);
+		ret &= test_DsCrackNames(torture, p, torture, &priv);
 		
 		ret &= test_DsUnbind(p, torture, &priv);
 	}

Modified: branches/SAMBA_4_0/source/torture/rpc/drsuapi_cracknames.c
===================================================================
--- branches/SAMBA_4_0/source/torture/rpc/drsuapi_cracknames.c	2007-12-03 23:33:16 UTC (rev 26271)
+++ branches/SAMBA_4_0/source/torture/rpc/drsuapi_cracknames.c	2007-12-03 23:33:22 UTC (rev 26272)
@@ -204,8 +204,9 @@
 	return ret;
 }
 
-bool test_DsCrackNames(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
-			      struct DsPrivate *priv)
+bool test_DsCrackNames(struct torture_context *tctx,
+		       struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx, 
+		       struct DsPrivate *priv)
 {
 	NTSTATUS status;
 	struct drsuapi_DsCrackNames r;
@@ -589,7 +590,7 @@
 				.comment = "display name for Microsoft Support Account",
 				.status = DRSUAPI_DS_NAME_STATUS_OK,
 				.alternate_status = DRSUAPI_DS_NAME_STATUS_NOT_UNIQUE,
-				.skip = lp_parm_bool(global_loadparm, NULL, "torture", "samba4", false)
+				.skip = torture_setting_bool(tctx, "samba4", false)
 			},
 			{
 				.format_offered	= DRSUAPI_DS_NAME_FORMAT_GUID,

Modified: branches/SAMBA_4_0/source/web_server/http.c
===================================================================
--- branches/SAMBA_4_0/source/web_server/http.c	2007-12-03 23:33:16 UTC (rev 26271)
+++ branches/SAMBA_4_0/source/web_server/http.c	2007-12-03 23:33:22 UTC (rev 26272)
@@ -139,7 +139,8 @@
                          const char *path,
                          const char *base_dir)
 {
-	struct websrv_context *web = talloc_get_type(handle, struct websrv_context);
+	struct websrv_context *web = talloc_get_type(handle, 
+						     struct websrv_context);
 	int fd = -1;
 	struct stat st;
 	*buf = NULL;
@@ -169,12 +170,11 @@
 	return -1;
 }
 
-static int http_readFileFromSwatDir(EspHandle handle,
-                                       char **buf,
-                                       int *len,
+static int http_readFileFromSwatDir(EspHandle handle, char **buf, int *len,
                                        const char *path)
 {
-    return http_readFile(handle, buf, len, path, lp_swat_directory(global_loadparm));
+    return http_readFile(handle, buf, len, path, 
+			 lp_swat_directory(global_loadparm));
 }
 
 

Modified: branches/SAMBA_4_0/source/winbind/wb_server.c
===================================================================
--- branches/SAMBA_4_0/source/winbind/wb_server.c	2007-12-03 23:33:16 UTC (rev 26271)
+++ branches/SAMBA_4_0/source/winbind/wb_server.c	2007-12-03 23:33:22 UTC (rev 26272)
@@ -60,7 +60,7 @@
 	}
 	wbconn->conn	      = conn;
 	wbconn->listen_socket = listen_socket;
-	wbconn->lp_ctx        = global_loadparm;
+	wbconn->lp_ctx        = listen_socket->service->task->lp_ctx;
 	conn->private         = wbconn;
 
 	wbconn->packet = packet_init(wbconn);



More information about the samba-cvs mailing list