summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2009-12-29 11:40:30 +1100
committerAndrew Tridgell <tridge@samba.org>2010-01-02 08:16:55 +1100
commit81e8a18181d3f24ac837ae0295fc2fca927a7ddf (patch)
tree3caee875972c01eb943cfda4c06a35536128d181 /source4
parent302dcd022633a928050c916561a6f640216fb247 (diff)
downloadsamba-81e8a18181d3f24ac837ae0295fc2fca927a7ddf.tar.gz
samba-81e8a18181d3f24ac837ae0295fc2fca927a7ddf.tar.bz2
samba-81e8a18181d3f24ac837ae0295fc2fca927a7ddf.zip
s4-ldb: allow modules to override error return values
The samldb module overrides the error code for some returns when handling primaryGroupID. We need to take the error from the async callback to allow this to work reliably
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/ldb/common/ldb_modules.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source4/lib/ldb/common/ldb_modules.c b/source4/lib/ldb/common/ldb_modules.c
index e49d46a987..5e9d0e6e98 100644
--- a/source4/lib/ldb/common/ldb_modules.c
+++ b/source4/lib/ldb/common/ldb_modules.c
@@ -606,7 +606,7 @@ int ldb_next_request(struct ldb_module *module, struct ldb_request *request)
* all our modules, and leaves us one less sharp
* corner for module developers to cut themselves on
*/
- ldb_module_done(request, NULL, NULL, ret);
+ ret = ldb_module_done(request, NULL, NULL, ret);
}
return ret;
}
@@ -830,7 +830,9 @@ int ldb_module_done(struct ldb_request *req,
}
req->callback(req, ares);
- return error;
+ /* returning ares->error here allows the callback routines in
+ modules to override the error code */
+ return ares->error;
}
/* to be used *only* in modules init functions.