VLV: fix handling with show_deleted and similar controls
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Fri, 8 Jul 2016 02:20:15 +0000 (14:20 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 19 Jul 2016 11:41:12 +0000 (13:41 +0200)
commit31707cdeaa8f1c800a83080e9d3959f32bd7d8cb
tree3cacc0a522f51ad05c53ca587aa7c33f81b31eef
parent8bb14af5844da89a0af39504135ed22a2b4f022e
VLV: fix handling with show_deleted and similar controls

The first search in each round of VLV performs the search then saves
the results in the form of an array of GUIDs, which subsequent calls
refer to to get different ranges from the same search. These
subsequent calls make an individual search for each GUID. If the
original search had the show_deleted control, the array may contain
GUIDs for deleted items, which would not be seen on the later
searches without the same control.

So we save all controls except the VLV itself and the sort control
(which won't affect the search for a single GUID) and reuse them on
the  subsequent VLV searches.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/dsdb/samdb/ldb_modules/vlv_pagination.c