r12745: Initial work to support a syntax to pass over controls via
authorSimo Sorce <idra@samba.org>
Fri, 6 Jan 2006 19:42:08 +0000 (19:42 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:49:48 +0000 (13:49 -0500)
commit4c685ac0d1638a1d5392dfe733baf0db77e84858
tree979ae06ae2e936f3b211f0d9490e7b05688fc347
parent874dd09759eb0243988f39363c94785ae2e68485
r12745: Initial work to support a syntax to pass over controls via
command line to ldbsearch. Very rough work, no checks are
done on the input yet (will segfault if you make it wrong).
Controls are passed via the --controls switch an are comma
separated (no escaping yet).

General syntax is <ctrl_name>:<criticality>
<ctrl_name> is a string
<criticality> is 1 or 0

Current semi-parsed controls are:

server_sort
syntax: server_sort:1:0:attributename

1st parm: criticality
2nd parm: reversed
3rd parm: attribute name to be used for sorting

todo: still missing suport for multiple sorting
  attributes and ordering rule
no check on result code

paged_results
syntax: paged_results:1:100

1st parm: criticality
2nd parm: number of results to be returned

todo: ldbsearch will return only the first batch
  (missing code to cycle over conditionally)
no check on result code

extended_dn
syntax: extended_dn:1:0

1st parm: criticality
2nd parm: type, see MS docs on meaning

Simo.
source/lib/ldb/tools/cmdline.c
source/lib/ldb/tools/cmdline.h
source/lib/ldb/tools/ldbsearch.c
source/setup/provision_init.ldif