Update ldb-perfs branch

Simo simo at samba.org
Sun Jun 7 14:59:53 MDT 2015


On Sat, 2015-06-06 at 22:39 -0700, Matthieu Patou wrote:
> Hello All,
> 
> I rebased and updated my branch related to ldb-perfs it's at 
> https://git.samba.org/mat/?p=mat/samba.git;a=shortlog;h=refs/heads/ldb_perfs
> 
> It pass make test on sn-devel.

Hi Mathieu,
the code looks mostly good but I am looking at ldn_dn_set_cadefolded()
and not really liking it. That API makes it way too easy to do great
damage.

Given you really need it only in ltdb_index_filter() to fetch a DN entry
knowing it was stored casefolded, I would rather introduce a function
like: ldb_dn_from_casefolded_ldb_val() (or even
ldb_dn_from_index_ldb_val) The implementation would share most of the
code with the original ldb_dn_from_ldb_val() and just add the casefolded
dn in the proper internal structure.
This way we avoid the risk of someone abusing ldn_dn_set_cadefolded() in
places where it shouldn't be.

Simo.

-- 
Simo Sorce



More information about the samba-technical mailing list