[SCM] Samba Shared Repository - branch master updated

Matthias Dieter Wallnöfer mdw at samba.org
Sun Oct 24 14:04:01 MDT 2010


The branch, master has been updated
       via  7b3dbbd s4:dsdb - remove some calls of "samdb_msg_add_string" when we have talloc'ed strings
      from  177aad5 talloc: pytalloc should not depend on samba specific code

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 7b3dbbde04d52f9faeeba507b82bc4242b1efddd
Author: Matthias Dieter Wallnöfer <mdw at samba.org>
Date:   Thu Oct 14 22:26:44 2010 +0200

    s4:dsdb - remove some calls of "samdb_msg_add_string" when we have talloc'ed strings
    
    They can be substituted by "ldb_msg_add_string" if the string was already
    talloc'ed.
    
    Autobuild-User: Matthias Dieter Wallnöfer <mdw at samba.org>
    Autobuild-Date: Sun Oct 24 20:03:27 UTC 2010 on sn-devel-104

-----------------------------------------------------------------------

Summary of changes:
 source4/dsdb/samdb/ldb_modules/samldb.c       |    5 ++---
 source4/rpc_server/netlogon/dcerpc_netlogon.c |   16 ++++++----------
 2 files changed, 8 insertions(+), 13 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c
index 21b6506..2357ffd 100644
--- a/source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/source4/dsdb/samdb/ldb_modules/samldb.c
@@ -604,9 +604,8 @@ static int samldb_fill_object(struct samldb_ctx *ac)
 			 * caller. Use the entry DN for it. */
 			ac->dn = ac->msg->dn;
 
-			ret = samdb_msg_add_string(ldb, ac->msg, ac->msg,
-						   "defaultObjectCategory",
-						   ldb_dn_get_linearized(ac->dn));
+			ret = ldb_msg_add_string(ac->msg, "defaultObjectCategory",
+						 ldb_dn_alloc_linearized(ac, ac->dn));
 			if (ret != LDB_SUCCESS) {
 				ldb_oom(ldb);
 				return ret;
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index 680b766..2f80c1b 100644
--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c
+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c
@@ -1431,16 +1431,12 @@ static NTSTATUS dcesrv_netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_cal
 				"dNSHostname",
 			r->in.query->workstation_info->dns_hostname);
 
-			samdb_msg_add_string(sam_ctx, mem_ctx, new_msg,
-				"servicePrincipalName",
-				talloc_asprintf(mem_ctx, "HOST/%s",
-				r->in.computer_name)
-			);
-			samdb_msg_add_string(sam_ctx, mem_ctx, new_msg,
-				"servicePrincipalName",
-				talloc_asprintf(mem_ctx, "HOST/%s",
-				r->in.query->workstation_info->dns_hostname)
-			);
+			ldb_msg_add_string(new_msg, "servicePrincipalName",
+					   talloc_asprintf(new_msg, "HOST/%s",
+					   r->in.computer_name));
+			ldb_msg_add_string(new_msg, "servicePrincipalName",
+					   talloc_asprintf(new_msg, "HOST/%s",
+					   r->in.query->workstation_info->dns_hostname));
 		}
 
 		if (dsdb_replace(sam_ctx, new_msg, 0) != LDB_SUCCESS) {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list