diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-12-16 20:45:02 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-12-16 20:56:24 +1100 |
commit | 558a38671af5ea05d9ee1d815f0c1c2dab41a80c (patch) | |
tree | 19752f35e1b1868425157accb0a96456ad6bcbb3 /source4/dsdb/samdb/ldb_modules/extended_dn_out.c | |
parent | 41e403adb0fa76c8d15d5d1ef38b195a6da2265c (diff) | |
download | samba-558a38671af5ea05d9ee1d815f0c1c2dab41a80c.tar.gz samba-558a38671af5ea05d9ee1d815f0c1c2dab41a80c.tar.bz2 samba-558a38671af5ea05d9ee1d815f0c1c2dab41a80c.zip |
s4-dsdb: it is a better pattern to mark a control as done than remove it
removing a control means it can't be seen by any other modules, which
is usually not what is wanted. Better to just mark it non-critical,
which means anyone else who wants to look at it can, but if nobody
does its not an error.
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/extended_dn_out.c')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/extended_dn_out.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/extended_dn_out.c b/source4/dsdb/samdb/ldb_modules/extended_dn_out.c index bd57913ea6..2d0ee6a4aa 100644 --- a/source4/dsdb/samdb/ldb_modules/extended_dn_out.c +++ b/source4/dsdb/samdb/ldb_modules/extended_dn_out.c @@ -553,7 +553,6 @@ static int extended_dn_out_search(struct ldb_module *module, struct ldb_request 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; @@ -652,24 +651,13 @@ static int extended_dn_out_search(struct ldb_module *module, struct ldb_request 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 |