Cosmetic corrections for the DSDB module
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Tue, 9 Sep 2008 13:06:13 +0000 (15:06 +0200)
committerSimo Sorce <idra@samba.org>
Mon, 13 Oct 2008 14:11:30 +0000 (10:11 -0400)
This commit applies some cosmetic corrections for the DSDB (Directory Server Database).

source4/dsdb/samdb/ldb_modules/kludge_acl.c
source4/dsdb/samdb/ldb_modules/proxy.c
source4/dsdb/samdb/ldb_modules/repl_meta_data.c
source4/dsdb/samdb/ldb_modules/schema_fsmo.c
source4/lib/ldb-samba/ldif_handlers.c

index 6e6da5581d628488fc2b5d44f607f3abf91b778b..865e1c7286823bdbd61c5607a97f9c26dc426151 100644 (file)
@@ -141,7 +141,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;
 
 }
 
index 18b0649dda90a35d0fec7331a3302469b61c0c17..932fd3bcb6b284dbb2711de37225b89b32320d1c 100644 (file)
@@ -73,7 +73,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");
@@ -152,7 +152,7 @@ static int load_proxy_info(struct ldb_module *module)
 
        talloc_free(res);
 
-       return 0;
+       return LDB_SUCCESS;
 
 failed:
        talloc_free(res);
@@ -160,7 +160,7 @@ failed:
        talloc_free(proxy->newdn);
        talloc_free(proxy->upstream);
        proxy->upstream = NULL;
-       return -1;
+       return LDB_ERR_OPERATIONS_ERROR;
 }
 
 
index 13a979b6f808fe5a2bbd95abd7ff0efd538b3c6a..d10c95eacb382302203840910db927a6705cc45f 100644 (file)
@@ -90,16 +90,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);
@@ -107,7 +107,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;
 }
 
 /*
@@ -118,11 +118,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);
@@ -130,7 +130,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,
index 1c0dccf3705c4aa905c55f62c2ab9b23e524c691..0266654811ffd511deb71d994447c6b11a13b3dc 100644 (file)
@@ -319,7 +319,7 @@ static int generate_dITContentRules(struct ldb_context *ldb, struct ldb_message
                        }
                }
        }
-       return 0;
+       return LDB_SUCCESS;
 }
 
 
index a16582d29458a1e0b23cfa7e822c0e1e8fecf4a1..46ea09554dc610880012d4510ae42c2b1d791c0b 100644 (file)
@@ -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);
 }