From b61fa4b67686aa5df69c28ca86d8d26aaa3ba9d4 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Fri, 11 Jun 2010 10:19:19 +0200 Subject: s4:rootdse LDB module - use LDB result constants --- source4/dsdb/samdb/ldb_modules/rootdse.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source4/dsdb') diff --git a/source4/dsdb/samdb/ldb_modules/rootdse.c b/source4/dsdb/samdb/ldb_modules/rootdse.c index 5fffef7c86..bf5642019c 100644 --- a/source4/dsdb/samdb/ldb_modules/rootdse.c +++ b/source4/dsdb/samdb/ldb_modules/rootdse.c @@ -83,7 +83,7 @@ static int expand_dn_in_message(struct ldb_module *module, struct ldb_message *m v = discard_const_p(struct ldb_val, ldb_msg_find_ldb_val(msg, attrname)); if (v == NULL) { talloc_free(tmp_ctx); - return 0; + return LDB_SUCCESS; } dn_string = talloc_strndup(tmp_ctx, (const char *)v->data, v->length); @@ -152,7 +152,7 @@ static int expand_dn_in_message(struct ldb_module *module, struct ldb_message *m talloc_free(tmp_ctx); - return 0; + return LDB_SUCCESS; } @@ -597,7 +597,8 @@ static int rootdse_init(struct ldb_module *module) data = talloc_zero(module, struct private_data); if (data == NULL) { - return -1; + ldb_oom(ldb); + return LDB_ERR_OPERATIONS_ERROR; } data->num_controls = 0; @@ -610,7 +611,7 @@ static int rootdse_init(struct ldb_module *module) ret = ldb_next_init(module); - if (ret) { + if (ret != LDB_SUCCESS) { return ret; } -- cgit