[SCM] Samba Shared Repository - branch master updated

Matthias Dieter Wallnöfer mdw at samba.org
Tue Mar 16 02:51:27 MDT 2010


The branch, master has been updated
       via  d7de3fa... s4:dsdb - fix up warnings
      from  abe75a5... s4:registry - use a macro for reverse byte order

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


- Log -----------------------------------------------------------------
commit d7de3fa799fa64a3463765b3f6159fccda581b0c
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Tue Mar 16 09:48:58 2010 +0100

    s4:dsdb - fix up warnings

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

Summary of changes:
 source4/dsdb/samdb/ldb_modules/linked_attributes.c |    2 +-
 source4/dsdb/samdb/ldb_modules/resolve_oids.c      |   10 +++++++---
 2 files changed, 8 insertions(+), 4 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/linked_attributes.c b/source4/dsdb/samdb/ldb_modules/linked_attributes.c
index 1e0a2b0..56ed447 100644
--- a/source4/dsdb/samdb/ldb_modules/linked_attributes.c
+++ b/source4/dsdb/samdb/ldb_modules/linked_attributes.c
@@ -163,7 +163,7 @@ static int linked_attributes_rename(struct ldb_module *module, struct ldb_reques
 
 	schema = dsdb_get_schema(ldb, res);
 	if (!schema) {
-		ldb_oom(schema);
+		ldb_oom(ldb);
 		return LDB_ERR_OPERATIONS_ERROR;
 	}
 
diff --git a/source4/dsdb/samdb/ldb_modules/resolve_oids.c b/source4/dsdb/samdb/ldb_modules/resolve_oids.c
index aab997d..9928945 100644
--- a/source4/dsdb/samdb/ldb_modules/resolve_oids.c
+++ b/source4/dsdb/samdb/ldb_modules/resolve_oids.c
@@ -521,7 +521,10 @@ static int resolve_oids_search(struct ldb_module *module, struct ldb_request *re
 		return LDB_ERR_OPERATIONS_ERROR;
 	}
 
-	talloc_reference(tree, schema);
+	if (talloc_reference(tree, schema) == NULL) {
+		ldb_oom(ldb);
+		return LDB_ERR_OPERATIONS_ERROR;
+	}
 
 	ret = resolve_oids_parse_tree_replace(ldb, schema,
 					      tree);
@@ -529,7 +532,8 @@ static int resolve_oids_search(struct ldb_module *module, struct ldb_request *re
 		return ret;
 	}
 
-	attrs2 = str_list_copy_const(ac, req->op.search.attrs);
+	attrs2 = str_list_copy_const(ac,
+				     discard_const_p(const char *, req->op.search.attrs));
 	if (req->op.search.attrs && !attrs2) {
 		ldb_oom(ldb);
 		return LDB_ERR_OPERATIONS_ERROR;
@@ -537,7 +541,7 @@ static int resolve_oids_search(struct ldb_module *module, struct ldb_request *re
 
 	for (i=0; attrs2 && attrs2[i]; i++) {
 		const char *p;
-		struct dsdb_attribute *a;
+		const struct dsdb_attribute *a;
 
 		p = strchr(attrs2[i], '.');
 		if (p == NULL) {


-- 
Samba Shared Repository


More information about the samba-cvs mailing list