1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-18 17:57:55 +03:00

s4:rootdse LDB module - use LDB result constants

This commit is contained in:
Matthias Dieter Wallnöfer 2010-06-11 10:19:19 +02:00
parent 93fe926842
commit b61fa4b676

View File

@ -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)); v = discard_const_p(struct ldb_val, ldb_msg_find_ldb_val(msg, attrname));
if (v == NULL) { if (v == NULL) {
talloc_free(tmp_ctx); talloc_free(tmp_ctx);
return 0; return LDB_SUCCESS;
} }
dn_string = talloc_strndup(tmp_ctx, (const char *)v->data, v->length); 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); 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); data = talloc_zero(module, struct private_data);
if (data == NULL) { if (data == NULL) {
return -1; ldb_oom(ldb);
return LDB_ERR_OPERATIONS_ERROR;
} }
data->num_controls = 0; data->num_controls = 0;
@ -610,7 +611,7 @@ static int rootdse_init(struct ldb_module *module)
ret = ldb_next_init(module); ret = ldb_next_init(module);
if (ret) { if (ret != LDB_SUCCESS) {
return ret; return ret;
} }