svn commit: samba r26348 - in branches/SAMBA_4_0: . source/auth source/param

jelmer at samba.org jelmer at samba.org
Sat Dec 8 23:32:20 GMT 2007


Author: jelmer
Date: 2007-12-08 23:32:18 +0000 (Sat, 08 Dec 2007)
New Revision: 26348

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

Log:
Avoid use of autofree context.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/auth/auth.c
   branches/SAMBA_4_0/source/param/loadparm.c
   branches/SAMBA_4_0/source/param/share_classic.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/auth.c
===================================================================
--- branches/SAMBA_4_0/source/auth/auth.c	2007-12-08 23:32:13 UTC (rev 26347)
+++ branches/SAMBA_4_0/source/auth/auth.c	2007-12-08 23:32:18 UTC (rev 26348)
@@ -422,13 +422,13 @@
 	const char **auth_methods = NULL;
 	switch (lp_server_role(lp_ctx)) {
 	case ROLE_STANDALONE:
-		auth_methods = lp_parm_string_list(lp_ctx, NULL, "auth methods", "standalone", NULL);
+		auth_methods = lp_parm_string_list(mem_ctx, lp_ctx, NULL, "auth methods", "standalone", NULL);
 		break;
 	case ROLE_DOMAIN_MEMBER:
-		auth_methods = lp_parm_string_list(lp_ctx, NULL, "auth methods", "member server", NULL);
+		auth_methods = lp_parm_string_list(mem_ctx, lp_ctx, NULL, "auth methods", "member server", NULL);
 		break;
 	case ROLE_DOMAIN_CONTROLLER:
-		auth_methods = lp_parm_string_list(lp_ctx, NULL, "auth methods", "domain controller", NULL);
+		auth_methods = lp_parm_string_list(mem_ctx, lp_ctx, NULL, "auth methods", "domain controller", NULL);
 		break;
 	}
 	return auth_context_create_methods(mem_ctx, auth_methods, ev, msg, lp_ctx, auth_ctx);

Modified: branches/SAMBA_4_0/source/param/loadparm.c
===================================================================
--- branches/SAMBA_4_0/source/param/loadparm.c	2007-12-08 23:32:13 UTC (rev 26347)
+++ branches/SAMBA_4_0/source/param/loadparm.c	2007-12-08 23:32:18 UTC (rev 26348)
@@ -888,16 +888,16 @@
 /* Parametric option has following syntax: 'Type: option = value' */
 /* Returned value is allocated in 'lp_talloc' context */
 
-const char **lp_parm_string_list(struct loadparm_context *lp_ctx, 
+const char **lp_parm_string_list(TALLOC_CTX *mem_ctx,
+				 struct loadparm_context *lp_ctx, 
 				 struct loadparm_service *service, 
 				 const char *type, 
 				 const char *option, const char *separator)
 {
 	const char *value = lp_get_parametric(lp_ctx, service, type, option);
 	
-	if (value)
-		return str_list_make(talloc_autofree_context(), value, 
-				     separator);
+	if (value != NULL)
+		return str_list_make(mem_ctx, value, separator);
 
 	return NULL;
 }

Modified: branches/SAMBA_4_0/source/param/share_classic.c
===================================================================
--- branches/SAMBA_4_0/source/param/share_classic.c	2007-12-08 23:32:13 UTC (rev 26347)
+++ branches/SAMBA_4_0/source/param/share_classic.c	2007-12-08 23:32:18 UTC (rev 26348)
@@ -240,7 +240,7 @@
 		*val = '\0';
 		val++;
 
-		ret = lp_parm_string_list(global_loadparm, s, parm, val, ",;");
+		ret = lp_parm_string_list(mem_ctx, global_loadparm, s, parm, val, ",;");
 		talloc_free(parm);
 		return ret;
 	}



More information about the samba-cvs mailing list