Patch for LDB sort check

Andrew Bartlett abartlet at
Thu Jul 23 02:35:55 MDT 2009

On Mon, 2009-07-13 at 01:10 +0400, Matthieu Patou wrote:
> Andrew,
> I resubmit a cleaner (well conforming to samba coding style) patch.
> Please reply if something else has to be changed as I mostly forgot your 
> irc remarks on it ...

Thanks, I do have a few comments (sorry for the delay):

Please rename it to LDAP-SORT (the choice of client lib does not
actually make it different to any other LDAP test).

Also, please do not do:

+       ctrl = talloc_array(ctx, struct ldb_control *, 2);
+       ctrl[0] = talloc(ctrl, struct ldb_control);
+       ctrl[0]->oid = LDB_CONTROL_SERVER_SORT_OID;
+       ctrl[0]->critical = true;

But instead specify no controls, and then call


Also, for the actual control:
+       control = talloc_array(ctrl[0], struct ldb_server_sort_control
*, 2);

There is no need for this to be an array.

Finally, Any chance of having this in git-format-patch format?


Andrew Bartlett

Andrew Bartlett
Authentication Developer, Samba Team 
Samba Developer, Cisco Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <>

More information about the samba-technical mailing list