struct ldb_control *control;
struct ldb_control *storage_format_control;
struct ldb_extended_dn_control *extended_ctrl = NULL;
- struct ldb_control **saved_controls;
struct extended_search_context *ac;
struct ldb_request *down_req;
char **new_attrs;
return ret;
}
- /* Remove extended DN and storage format controls */
-
+ /* mark extended DN and storage format controls as done */
if (control) {
- /* save it locally and remove it from the list */
- /* we do not need to replace them later as we
- * are keeping the original req intact */
- if (!save_controls(control, down_req, &saved_controls)) {
- return LDB_ERR_OPERATIONS_ERROR;
- }
+ control->critical = 0;
}
if (storage_format_control) {
- /* save it locally and remove it from the list */
- /* we do not need to replace them later as we
- * are keeping the original req intact */
- if (!save_controls(storage_format_control, down_req, &saved_controls)) {
- return LDB_ERR_OPERATIONS_ERROR;
- }
+ storage_format_control->critical = 0;
}
/* Add in dereference control, if we were asked to, we are
{
int ret;
struct ldb_request *new_req;
- struct ldb_control **saved_controls;
struct ldb_control *control = ldb_request_get_control(req, LDB_CONTROL_SERVER_LAZY_COMMIT);
if (!control) {
return ldb_next_request(module, req);
return ret;
}
- save_controls(control, req, &saved_controls);
+ control->critical = 0;
return ldb_next_request(module, new_req);
}
{
struct ldb_context *ldb;
struct ldb_control *control;
- struct ldb_control **saved_controls;
struct ldb_request *down_req;
struct ldb_parse_tree *new_tree = req->op.search.tree;
int ret;
return ret;
}
- /* if a control is there remove if from the modified request */
- if (control && !save_controls(control, down_req, &saved_controls)) {
- return LDB_ERR_OPERATIONS_ERROR;
+ /* mark the control as done */
+ if (control) {
+ control->critical = 0;
}
/* perform the search */