[SCM] Samba Shared Repository - branch master updated

Nadezhda Ivanova nivanova at samba.org
Wed Dec 8 07:02:02 MST 2010


The branch, master has been updated
       via  bf7b026 s4-acl: Replaced talloc_reference with talloc_steal, as aclread is the only one using this result message.
      from  1bd3bd6 Add ncacn_http (RTS) IDL implementation in dcerpc.idl

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


- Log -----------------------------------------------------------------
commit bf7b026a9a1a425afa64fb9aa8bdcb1c10d161d7
Author: Nadezhda Ivanova <nivanova at samba.org>
Date:   Wed Dec 8 14:30:23 2010 +0200

    s4-acl: Replaced talloc_reference with talloc_steal, as aclread is the only one using this result message.
    
    No need to reference as no one further up the stack uses the result, it is the result of a secondary request sent by aclread.
    
    As a result from code review by Kamen Mazdrashki and Anatoliy Atanasov
    
    Autobuild-User: Nadezhda Ivanova <nivanova at samba.org>
    Autobuild-Date: Wed Dec  8 15:01:51 CET 2010 on sn-devel-104

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

Summary of changes:
 source4/dsdb/samdb/ldb_modules/acl_read.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/acl_read.c b/source4/dsdb/samdb/ldb_modules/acl_read.c
index c7aaf11..27cc1e7 100644
--- a/source4/dsdb/samdb/ldb_modules/acl_read.c
+++ b/source4/dsdb/samdb/ldb_modules/acl_read.c
@@ -177,8 +177,9 @@ static int aclread_callback(struct ldb_request *req, struct ldb_reply *ares)
 			 }
 		 }
 		 /*create a new message to return*/
-		 ret_msg = ldb_msg_new(req);
+		 ret_msg = ldb_msg_new(ac->req);
 		 ret_msg->dn = msg->dn;
+		 talloc_steal(ret_msg, msg->dn);
 		 ret_msg->num_elements = num_of_attrs;
 		 if (num_of_attrs > 0) {
 			 ret_msg->elements = talloc_array(ret_msg,
@@ -191,11 +192,7 @@ static int aclread_callback(struct ldb_request *req, struct ldb_reply *ares)
 				 bool to_remove = aclread_is_inaccessible(&msg->elements[i]);
 				 if (!to_remove) {
 					 ret_msg->elements[k] = msg->elements[i];
-					 if (!talloc_reference(ret_msg->elements,
-							       msg->elements[i].values)) {
-						 talloc_free(tmp_ctx);
-						 return ldb_operr(ldb);
-					 }
+					 talloc_steal(ret_msg->elements, msg->elements[i].values);
 					 k++;
 				 }
 			 }


-- 
Samba Shared Repository


More information about the samba-cvs mailing list