svn commit: samba r24918 - in branches/SAMBA_4_0/source: dsdb/samdb rpc_server/lsa

abartlet at samba.org abartlet at samba.org
Mon Sep 3 07:56:30 GMT 2007


Author: abartlet
Date: 2007-09-03 07:56:29 +0000 (Mon, 03 Sep 2007)
New Revision: 24918

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

Log:
Fix the build (forgot to include dcesrv_lsa.c in the previous commit)
and improve error strings returned from samdb.c

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/dsdb/samdb/samdb.c
   branches/SAMBA_4_0/source/rpc_server/lsa/dcesrv_lsa.c


Changeset:
Modified: branches/SAMBA_4_0/source/dsdb/samdb/samdb.c
===================================================================
--- branches/SAMBA_4_0/source/dsdb/samdb/samdb.c	2007-09-03 05:36:19 UTC (rev 24917)
+++ branches/SAMBA_4_0/source/dsdb/samdb/samdb.c	2007-09-03 07:56:29 UTC (rev 24918)
@@ -691,6 +691,8 @@
 	*errstring = NULL;	
 
 	if (!ldb_dn_add_child_fmt(basedn, "CN=Template%s", name)) {
+		*errstring = talloc_asprintf(msg, "samdb_copy_template: ERROR: Failed to contruct DN for template '%s'", 
+					     name);
 		return LDB_ERR_OPERATIONS_ERROR;
 	}
 	
@@ -702,7 +704,7 @@
 		return ret;
 	}
 	if (res->count != 1) {
-		*errstring = talloc_asprintf(msg, "samdb_copy_template: ERROR: template '%s' matched %d records, expected 1\n", 
+		*errstring = talloc_asprintf(msg, "samdb_copy_template: ERROR: template '%s' matched %d records, expected 1", 
 					     name, 
 					     res->count);
 		talloc_free(res);
@@ -726,7 +728,7 @@
 			ret = samdb_find_or_add_attribute(ldb, msg, el->name, 
 							  (char *)el->values[j].data);
 			if (ret) {
-				*errstring = talloc_asprintf(msg, "Adding attribute %s failed.\n", el->name);
+				*errstring = talloc_asprintf(msg, "Adding attribute %s failed.", el->name);
 				talloc_free(res);
 				return ret;
 			}

Modified: branches/SAMBA_4_0/source/rpc_server/lsa/dcesrv_lsa.c
===================================================================
--- branches/SAMBA_4_0/source/rpc_server/lsa/dcesrv_lsa.c	2007-09-03 05:36:19 UTC (rev 24917)
+++ branches/SAMBA_4_0/source/rpc_server/lsa/dcesrv_lsa.c	2007-09-03 07:56:29 UTC (rev 24918)
@@ -2284,7 +2284,7 @@
 
 	/* pull in all the template attributes.  Note this is always from the global samdb */
 	ret = samdb_copy_template(secret_state->policy->sam_ldb, msg, 
-				  "(&(cn=TemplateSecret)(objectclass=secretTemplate))", &errstr);
+				  "secret", &errstr);
 	if (ret != 0) {
 		DEBUG(0,("Failed to load TemplateSecret from samdb: %s\n",
 			 errstr));



More information about the samba-cvs mailing list