[SCM] Samba Shared Repository - branch master updated - 88f1d885eabc9a723351f38e9f2dc83933cfdea1

Simo Sorce idra at samba.org
Mon Oct 13 14:49:56 GMT 2008


The branch, master has been updated
       via  88f1d885eabc9a723351f38e9f2dc83933cfdea1 (commit)
       via  092bb542da8ff9eef9a8a981e698a1bff60058af (commit)
      from  65d5b1e7b494f94cf1ffef04ab74a68967789d89 (commit)

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


- Log -----------------------------------------------------------------
commit 88f1d885eabc9a723351f38e9f2dc83933cfdea1
Author: Matthias Dieter Wallnöfer <mwallnoefer at yahoo.de>
Date:   Thu Sep 25 12:21:28 2008 +0200

    DSDB cosmetic patches: Some enhancements
    
    Also, use the constants more in the "ldif_handlers" module.

commit 092bb542da8ff9eef9a8a981e698a1bff60058af
Author: Simo Sorce <idra at samba.org>
Date:   Mon Oct 13 10:45:48 2008 -0400

    Revert chunk applied by mistake as part of the cosmetic fixes fromi Mathias

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

Summary of changes:
 source4/dsdb/samdb/ldb_modules/proxy.c          |    2 +-
 source4/dsdb/samdb/ldb_modules/repl_meta_data.c |   10 +++++-----
 source4/lib/ldb-samba/ldif_handlers.c           |    2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/samdb/ldb_modules/proxy.c b/source4/dsdb/samdb/ldb_modules/proxy.c
index 932fd3b..2ff4229 100644
--- a/source4/dsdb/samdb/ldb_modules/proxy.c
+++ b/source4/dsdb/samdb/ldb_modules/proxy.c
@@ -317,7 +317,7 @@ static int proxy_search_bytree(struct ldb_module *module, struct ldb_request *re
 		goto passthru;
 	}
 
-	if (load_proxy_info(module) != 0) {
+	if (load_proxy_info(module) != LDB_SUCCESS) {
 		return LDB_ERR_OPERATIONS_ERROR;
 	}
 
diff --git a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
index d10c95e..f30748c 100644
--- a/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
+++ b/source4/dsdb/samdb/ldb_modules/repl_meta_data.c
@@ -98,7 +98,7 @@ static int add_time_element(struct ldb_message *msg, const char *attr, time_t t)
 		return LDB_ERR_OPERATIONS_ERROR;
 	}
 
-	if (ldb_msg_add_string(msg, attr, s) != 0) {
+	if (ldb_msg_add_string(msg, attr, s) != LDB_SUCCESS) {
 		return LDB_ERR_OPERATIONS_ERROR;
 	}
 
@@ -121,7 +121,7 @@ static int add_uint64_element(struct ldb_message *msg, const char *attr, uint64_
 		return LDB_SUCCESS;
 	}
 
-	if (ldb_msg_add_fmt(msg, attr, "%llu", (unsigned long long)v) != 0) {
+	if (ldb_msg_add_fmt(msg, attr, "%llu", (unsigned long long)v) != LDB_SUCCESS) {
 		return LDB_ERR_OPERATIONS_ERROR;
 	}
 
@@ -270,7 +270,7 @@ static int replmd_add(struct ldb_module *module, struct ldb_request *req)
 
 	ac->schema = schema;
 
-	if (ldb_msg_find_element(req->op.add.message, "objectGUID")) {
+	if (ldb_msg_find_element(req->op.add.message, "objectGUID") != NULL) {
 		ldb_debug_set(module->ldb, LDB_DEBUG_ERROR,
 			      "replmd_add: it's not allowed to add an object with objectGUID\n");
 		return LDB_ERR_UNWILLING_TO_PERFORM;
@@ -495,7 +495,7 @@ static int replmd_modify(struct ldb_module *module, struct ldb_request *req)
 	 * - calculate the new replPropertyMetaData attribute
 	 */
 
-	if (add_time_element(msg, "whenChanged", t) != 0) {
+	if (add_time_element(msg, "whenChanged", t) != LDB_SUCCESS) {
 		talloc_free(ac);
 		return LDB_ERR_OPERATIONS_ERROR;
 	}
@@ -503,7 +503,7 @@ static int replmd_modify(struct ldb_module *module, struct ldb_request *req)
 	/* Get a sequence number from the backend */
 	ret = ldb_sequence_number(module->ldb, LDB_SEQ_NEXT, &seq_num);
 	if (ret == LDB_SUCCESS) {
-		if (add_uint64_element(msg, "uSNChanged", seq_num) != 0) {
+		if (add_uint64_element(msg, "uSNChanged", seq_num) != LDB_SUCCESS) {
 			talloc_free(ac);
 			return LDB_ERR_OPERATIONS_ERROR;
 		}
diff --git a/source4/lib/ldb-samba/ldif_handlers.c b/source4/lib/ldb-samba/ldif_handlers.c
index 46ea095..a16582d 100644
--- a/source4/lib/ldb-samba/ldif_handlers.c
+++ b/source4/lib/ldb-samba/ldif_handlers.c
@@ -134,7 +134,7 @@ static int ldb_canonicalise_objectSid(struct ldb_context *ldb, void *mem_ctx,
 			/* Perhaps not a string after all */
 			return ldb_handler_copy(ldb, mem_ctx, in, out);
 		}
-		return LDB_SUCCESS;
+		return 0;
 	}
 	return ldb_handler_copy(ldb, mem_ctx, in, out);
 }


-- 
Samba Shared Repository


More information about the samba-cvs mailing list