1
0
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:
Andrew Tridgell 2009-12-29 11:40:30 +11:00
parent 302dcd0226
commit 81e8a18181

View File

@ -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.