Author: abartlet
Date: 2007-09-03 07:58:18 +0000 (Mon, 03 Sep 2007)
New Revision: 24919

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

Log:
Merge build fix and improved error strings to release branch.

Andrew Bartlett

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


Changeset:
Modified: branches/SAMBA_4_0_RELEASE/source/dsdb/samdb/samdb.c
===================================================================
--- branches/SAMBA_4_0_RELEASE/source/dsdb/samdb/samdb.c        2007-09-03 
07:56:29 UTC (rev 24918)
+++ branches/SAMBA_4_0_RELEASE/source/dsdb/samdb/samdb.c        2007-09-03 
07:58:18 UTC (rev 24919)
@@ -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_RELEASE/source/rpc_server/lsa/dcesrv_lsa.c
===================================================================
--- branches/SAMBA_4_0_RELEASE/source/rpc_server/lsa/dcesrv_lsa.c       
2007-09-03 07:56:29 UTC (rev 24918)
+++ branches/SAMBA_4_0_RELEASE/source/rpc_server/lsa/dcesrv_lsa.c       
2007-09-03 07:58:18 UTC (rev 24919)
@@ -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));

Reply via email to