summaryrefslogtreecommitdiff
path: root/source4/lib/ldb/ldb_ldap
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-09-24 23:59:59 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-09-25 00:01:05 +0200
commitb0a95ad2f68cfc87822420c22216d83c0abf0690 (patch)
tree8ac863eafe2c9bc1109404b975ad0f5be8b22154 /source4/lib/ldb/ldb_ldap
parent31e10643c998e64c0ec432553ac9193d978e43f4 (diff)
downloadsamba-b0a95ad2f68cfc87822420c22216d83c0abf0690.tar.gz
samba-b0a95ad2f68cfc87822420c22216d83c0abf0690.tar.bz2
samba-b0a95ad2f68cfc87822420c22216d83c0abf0690.zip
Revert LDB return code patches from Matthias.
Diffstat (limited to 'source4/lib/ldb/ldb_ldap')
-rw-r--r--source4/lib/ldb/ldb_ldap/ldb_ldap.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/source4/lib/ldb/ldb_ldap/ldb_ldap.c b/source4/lib/ldb/ldb_ldap/ldb_ldap.c
index 5026f9c006..a4534c549a 100644
--- a/source4/lib/ldb/ldb_ldap/ldb_ldap.c
+++ b/source4/lib/ldb/ldb_ldap/ldb_ldap.c
@@ -180,14 +180,14 @@ static int lldb_add_msg_attr(struct ldb_context *ldb,
count = ldap_count_values_len(bval);
if (count <= 0) {
- return LDB_ERR_OPERATIONS_ERROR;
+ return -1;
}
el = talloc_realloc(msg, msg->elements, struct ldb_message_element,
msg->num_elements + 1);
if (!el) {
errno = ENOMEM;
- return LDB_ERR_OPERATIONS_ERROR;
+ return -1;
}
msg->elements = el;
@@ -197,7 +197,7 @@ static int lldb_add_msg_attr(struct ldb_context *ldb,
el->name = talloc_strdup(msg->elements, attr);
if (!el->name) {
errno = ENOMEM;
- return LDB_ERR_OPERATIONS_ERROR;
+ return -1;
}
el->flags = 0;
@@ -205,7 +205,7 @@ static int lldb_add_msg_attr(struct ldb_context *ldb,
el->values = talloc_array(msg->elements, struct ldb_val, count);
if (!el->values) {
errno = ENOMEM;
- return LDB_ERR_OPERATIONS_ERROR;
+ return -1;
}
for (i=0;i<count;i++) {
@@ -214,7 +214,7 @@ static int lldb_add_msg_attr(struct ldb_context *ldb,
el->values[i].data = talloc_size(el->values, bval[i]->bv_len+1);
if (!el->values[i].data) {
errno = ENOMEM;
- return LDB_ERR_OPERATIONS_ERROR;
+ return -1;
}
memcpy(el->values[i].data, bval[i]->bv_val, bval[i]->bv_len);
el->values[i].data[bval[i]->bv_len] = 0;
@@ -224,7 +224,7 @@ static int lldb_add_msg_attr(struct ldb_context *ldb,
msg->num_elements++;
- return LDB_SUCCESS;
+ return 0;
}
/*
@@ -785,7 +785,7 @@ static int lldb_connect(struct ldb_context *ldb,
if (module == NULL) {
ldb_oom(ldb);
talloc_free(lldb);
- return LDB_ERR_OPERATIONS_ERROR;
+ return -1;
}
talloc_set_name_const(module, "ldb_ldap backend");
module->ldb = ldb;
@@ -819,11 +819,11 @@ static int lldb_connect(struct ldb_context *ldb,
}
*_module = module;
- return LDB_SUCCESS;
+ return 0;
failed:
talloc_free(module);
- return LDB_ERR_OPERATIONS_ERROR;
+ return -1;
}
const struct ldb_backend_ops ldb_ldap_backend_ops = {