[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: (ITS#8866) RFE: slapo-unique to return filter used in diagnostic message
- To: openldap-its@OpenLDAP.org
- Subject: Re: (ITS#8866) RFE: slapo-unique to return filter used in diagnostic message
- From: ondra@mistotebe.net
- Date: Fri, 26 Oct 2018 14:22:06 +0000
- Auto-submitted: auto-generated (OpenLDAP-ITS)
On Fri, Oct 26, 2018 at 08:12:13AM +0000, michael@stroeder.com wrote:
> On 10/26/18 4:01 AM, Quanah Gibson-Mount wrote:
>> This patch has been applied to OpenLDAP HEAD with a correction to the
>> memory allocation functions. I'll discuss with Howard about whether or
>> not to add it to 2.4.47.
>
> With your memory allocation correction, op->o_tmpalloc() and
> op->o_tmpfree(), this does not work as expected with 2.4.x. It does
> *not* return the filter used for uniqueness check.
> (I did not test master yet.)
>
> [...]
> Result with patch backported from git master using op->o_tmpalloc() and
> op->o_tmpfree():
>
> non-unique attributes found with non-unique attribute
> ^^^^^^^^^^^^^^^^^^^^
> Seems to repeat parts of the buffer?
>
> In my original patch the use of ch_malloc() and ch_free() was simply
> copied from other overlay code. There are many occurences of ch_malloc()
> and ch_free() throughout the whole code.
Yes, but `key` had already been freed a few lines earlier and using
o_tmpalloc reliably exposes the issue where ch_malloc just masks it.
This is now fixed in master.
--
OndÅ?ej KuznÃk
Senior Software Engineer
Symas Corporation http://www.symas.com
Packaged, certified, and supported LDAP solutions powered by OpenLDAP