mirror of
https://github.com/samba-team/samba.git
synced 2025-01-24 02:04:21 +03:00
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
This commit is contained in:
parent
302dcd0226
commit
81e8a18181
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user