diff --git a/source/dsdb/samdb/ldb_modules/kludge_acl.c b/source/dsdb/samdb/ldb_modules/kludge_acl.c index bc998a8..d0772d0 100644 --- a/source/dsdb/samdb/ldb_modules/kludge_acl.c +++ b/source/dsdb/samdb/ldb_modules/kludge_acl.c @@ -142,7 +142,7 @@ static int kludge_acl_allowedAttributes(struct ldb_context *ldb, struct ldb_mess ldb_msg_add_string(msg, attrName, attr_list[i]); } talloc_free(mem_ctx); - return 0; + return LDB_SUCCESS; } /* read all objectClasses */ @@ -201,7 +201,7 @@ static int kludge_acl_childClasses(struct ldb_context *ldb, struct ldb_message * } } - return 0; + return LDB_SUCCESS; } diff --git a/source/dsdb/samdb/ldb_modules/proxy.c b/source/dsdb/samdb/ldb_modules/proxy.c index 0d06542..277305e 100644 --- a/source/dsdb/samdb/ldb_modules/proxy.c +++ b/source/dsdb/samdb/ldb_modules/proxy.c @@ -66,7 +66,7 @@ static int load_proxy_info(struct ldb_module *module) /* see if we have already loaded it */ if (proxy->upstream != NULL) { - return 0; + return LDB_SUCCESS; } dn = ldb_dn_new(proxy, module->ldb, "@PROXYINFO"); @@ -145,7 +145,7 @@ static int load_proxy_info(struct ldb_module *module) talloc_free(res); - return 0; + return LDB_SUCCESS; failed: talloc_free(res); @@ -153,7 +153,7 @@ failed: talloc_free(proxy->newdn); talloc_free(proxy->upstream); proxy->upstream = NULL; - return -1; + return LDB_ERR_OPERATIONS_ERROR; } @@ -259,7 +259,7 @@ static int proxy_search_bytree(struct ldb_module *module, struct ldb_request *re } if (load_proxy_info(module) != 0) { - return -1; + return LDB_ERR_OPERATIONS_ERROR; } /* see if the dn is within olddn */ @@ -269,7 +269,7 @@ static int proxy_search_bytree(struct ldb_module *module, struct ldb_request *re newreq = talloc(module, struct ldb_request); if (newreq == NULL) { - return -1; + return LDB_ERR_OPERATIONS_ERROR; } newreq->op.search.tree = proxy_convert_tree(module, req->op.search.tree); @@ -298,7 +298,7 @@ static int proxy_search_bytree(struct ldb_module *module, struct ldb_request *re if (ret != LDB_SUCCESS) { ldb_set_errstring(module->ldb, ldb_errstring(proxy->upstream)); talloc_free(newreq); - return -1; + return LDB_ERR_OPERATIONS_ERROR; } for (i = 0; i < newreq->op.search.res->count; i++) { diff --git a/source/dsdb/samdb/ldb_modules/repl_meta_data.c b/source/dsdb/samdb/ldb_modules/repl_meta_data.c index dd5faf8..34e235a 100644 --- a/source/dsdb/samdb/ldb_modules/repl_meta_data.c +++ b/source/dsdb/samdb/ldb_modules/repl_meta_data.c @@ -124,16 +124,16 @@ static int add_time_element(struct ldb_message *msg, const char *attr, time_t t) char *s; if (ldb_msg_find_element(msg, attr) != NULL) { - return 0; + return LDB_SUCCESS; } s = ldb_timestring(msg, t); if (s == NULL) { - return -1; + return LDB_ERR_OPERATIONS_ERROR; } if (ldb_msg_add_string(msg, attr, s) != 0) { - return -1; + return LDB_ERR_OPERATIONS_ERROR; } el = ldb_msg_find_element(msg, attr); @@ -141,7 +141,7 @@ static int add_time_element(struct ldb_message *msg, const char *attr, time_t t) is ignored */ el->flags = LDB_FLAG_MOD_REPLACE; - return 0; + return LDB_SUCCESS; } /* @@ -152,11 +152,11 @@ static int add_uint64_element(struct ldb_message *msg, const char *attr, uint64_ struct ldb_message_element *el; if (ldb_msg_find_element(msg, attr) != NULL) { - return 0; + return LDB_SUCCESS; } if (ldb_msg_add_fmt(msg, attr, "%llu", (unsigned long long)v) != 0) { - return -1; + return LDB_ERR_OPERATIONS_ERROR; } el = ldb_msg_find_element(msg, attr); @@ -164,7 +164,7 @@ static int add_uint64_element(struct ldb_message *msg, const char *attr, uint64_ is ignored */ el->flags = LDB_FLAG_MOD_REPLACE; - return 0; + return LDB_SUCCESS; } static int replmd_replPropertyMetaData1_attid_sort(const struct replPropertyMetaData1 *m1, diff --git a/source/dsdb/samdb/ldb_modules/schema_fsmo.c b/source/dsdb/samdb/ldb_modules/schema_fsmo.c index 968b19c..7c6a6dd 100644 --- a/source/dsdb/samdb/ldb_modules/schema_fsmo.c +++ b/source/dsdb/samdb/ldb_modules/schema_fsmo.c @@ -307,7 +307,7 @@ static int generate_dITContentRules(struct ldb_context *ldb, struct ldb_message } } } - return 0; + return LDB_SUCCESS; } diff --git a/source/lib/ldb-samba/ldif_handlers.c b/source/lib/ldb-samba/ldif_handlers.c index a16582d..46ea095 100644 --- a/source/lib/ldb-samba/ldif_handlers.c +++ b/source/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 0; + return LDB_SUCCESS; } return ldb_handler_copy(ldb, mem_ctx, in, out); } diff --git a/source/lib/ldb_wrap.c b/source/lib/ldb_wrap.c index 6c683a1..8082f4f 100644 --- a/source/lib/ldb_wrap.c +++ b/source/lib/ldb_wrap.c @@ -84,7 +84,7 @@ static int ldb_wrap_destructor(struct ldb_context *ldb) smb_panic("probable memory leak in ldb"); #endif } - return 0; + return LDB_SUCCESS; } /*