summaryrefslogtreecommitdiff
path: root/source4/lib/ldb
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-10-06 19:27:17 +0200
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>2009-10-06 19:41:16 +0200
commit8536e1b947ad8a2bc5596a9a1de9a58262153ebf (patch)
treefaac1f52c49a524211f8f80c56f525741c3b54e2 /source4/lib/ldb
parent0d7c34a5b4362ae8b1083a8bcf3a4115c37cafde (diff)
downloadsamba-8536e1b947ad8a2bc5596a9a1de9a58262153ebf.tar.gz
samba-8536e1b947ad8a2bc5596a9a1de9a58262153ebf.tar.bz2
samba-8536e1b947ad8a2bc5596a9a1de9a58262153ebf.zip
s4:various LDB modules - "build_request" functions - propagate result codes back
It's very useful to know the exact result code when something fails and not only a generic (by the module) created one. Sure, there are some exception cases with specific results (special message constellations, attributes, values...) which shouldn't be changed at all (examples of them are in the "ldap.py" test). Therefore I looked very carefully to not change them.
Diffstat (limited to 'source4/lib/ldb')
-rw-r--r--source4/lib/ldb/modules/asq.c4
-rw-r--r--source4/lib/ldb/modules/paged_results.c3
-rw-r--r--source4/lib/ldb/modules/sort.c2
3 files changed, 6 insertions, 3 deletions
diff --git a/source4/lib/ldb/modules/asq.c b/source4/lib/ldb/modules/asq.c
index 0819f7f559..491868301c 100644
--- a/source4/lib/ldb/modules/asq.c
+++ b/source4/lib/ldb/modules/asq.c
@@ -237,7 +237,7 @@ static int asq_build_first_request(struct asq_context *ac, struct ldb_request **
ac, asq_base_callback,
ac->req);
if (ret != LDB_SUCCESS) {
- return LDB_ERR_OPERATIONS_ERROR;
+ return ret;
}
return LDB_SUCCESS;
@@ -292,7 +292,7 @@ static int asq_build_multiple_requests(struct asq_context *ac, bool *terminated)
ac, asq_reqs_callback,
ac->req);
if (ret != LDB_SUCCESS) {
- return LDB_ERR_OPERATIONS_ERROR;
+ return ret;
}
/* remove the ASQ control itself */
diff --git a/source4/lib/ldb/modules/paged_results.c b/source4/lib/ldb/modules/paged_results.c
index b712f84872..774109ff06 100644
--- a/source4/lib/ldb/modules/paged_results.c
+++ b/source4/lib/ldb/modules/paged_results.c
@@ -347,6 +347,9 @@ static int paged_search(struct ldb_module *module, struct ldb_request *req)
ac,
paged_search_callback,
req);
+ if (ret != LDB_SUCCESS) {
+ return ret;
+ }
/* save it locally and remove it from the list */
/* we do not need to replace them later as we
diff --git a/source4/lib/ldb/modules/sort.c b/source4/lib/ldb/modules/sort.c
index b4ea017b32..f0aea77018 100644
--- a/source4/lib/ldb/modules/sort.c
+++ b/source4/lib/ldb/modules/sort.c
@@ -315,7 +315,7 @@ static int server_sort_search(struct ldb_module *module, struct ldb_request *req
server_sort_search_callback,
req);
if (ret != LDB_SUCCESS) {
- return LDB_ERR_OPERATIONS_ERROR;
+ return ret;
}
/* save it locally and remove it from the list */